diff options
| author | Jabiertxof <jabier.arraiza@marker.es> | 2019-07-05 17:47:11 +0000 |
|---|---|---|
| committer | Jabiertxof <jabier.arraiza@marker.es> | 2019-07-05 17:47:11 +0000 |
| commit | e9298ea62f34a06cb531855ddcab90d52035df22 (patch) | |
| tree | e8b2c6d381021d6ea2e43f28872f29fb113c060b /src | |
| parent | Allow styling def sections and go to the eleemnt (diff) | |
| download | inkscape-e9298ea62f34a06cb531855ddcab90d52035df22.tar.gz inkscape-e9298ea62f34a06cb531855ddcab90d52035df22.zip | |
Fix coding style
Diffstat (limited to 'src')
| -rw-r--r-- | src/document.h | 10 | ||||
| -rw-r--r-- | src/ui/dialog/styledialog.cpp | 17 | ||||
| -rw-r--r-- | src/ui/dialog/styledialog.h | 4 | ||||
| -rw-r--r-- | src/ui/dialog/xml-tree.cpp | 2 |
4 files changed, 17 insertions, 16 deletions
diff --git a/src/document.h b/src/document.h index 9c81e5243..609d665bc 100644 --- a/src/document.h +++ b/src/document.h @@ -146,12 +146,14 @@ public: void do_change_uri(char const *const filename, bool const rebase); void changeUriAndHrefs(char const *uri); - void setXMLDialogSelectedObject(SPObject * activexmltree) {_activexmltree = activexmltree;} - SPObject * getXMLDialogSelectedObject() {return _activexmltree;} -private: + void setXMLDialogSelectedObject(SPObject *activexmltree) { _activexmltree = activexmltree; } + SPObject *getXMLDialogSelectedObject() { return _activexmltree; } + + private: void _importDefsNode(SPDocument *source, Inkscape::XML::Node *defs, Inkscape::XML::Node *target_defs); SPObject *_activexmltree; -public: + + public: void importDefs(SPDocument *source); unsigned int vacuumDocument(); diff --git a/src/ui/dialog/styledialog.cpp b/src/ui/dialog/styledialog.cpp index 05a57b552..e2263f559 100644 --- a/src/ui/dialog/styledialog.cpp +++ b/src/ui/dialog/styledialog.cpp @@ -355,16 +355,15 @@ void StyleDialog::setCurrentSelector(Glib::ustring current_selector) _readStyleElement(); } -//copied from style.cpp:1499 -static bool -is_url(char const *p) +// copied from style.cpp:1499 +static bool is_url(char const *p) { if (p == nullptr) return false; -/** \todo - * FIXME: I'm not sure if this applies to SVG as well, but CSS2 says any URIs - * in property values must start with 'url('. - */ + /** \todo + * FIXME: I'm not sure if this applies to SVG as well, but CSS2 says any URIs + * in property values must start with 'url('. + */ return (g_ascii_strncasecmp(p, "url(", 4) == 0); } @@ -537,7 +536,7 @@ void StyleDialog::_readStyleElement() row[_mColumns._colLinked] = false; if (is_url(iter->get_value().c_str())) { Glib::ustring id = iter->get_value(); - id = id.substr(5,id.size()-6); + id = id.substr(5, id.size() - 6); SPObject *elemref = nullptr; if ((elemref = document->getObjectById(id.c_str()))) { row[_mColumns._colHref] = elemref; @@ -854,7 +853,7 @@ void StyleDialog::_onLinkObj(Glib::ustring path, Glib::RefPtr<Gtk::TreeStore> st Gtk::TreeModel::Row row = *store->get_iter(path); if (row && row[_mColumns._colLinked]) { - SPObject * linked = row[_mColumns._colHref]; + SPObject *linked = row[_mColumns._colHref]; if (linked) { Inkscape::Selection *selection = getDesktop()->getSelection(); getDesktop()->getDocument()->setXMLDialogSelectedObject(linked); diff --git a/src/ui/dialog/styledialog.h b/src/ui/dialog/styledialog.h index fa92f49c7..90b9d298f 100644 --- a/src/ui/dialog/styledialog.h +++ b/src/ui/dialog/styledialog.h @@ -102,8 +102,8 @@ class StyleDialog : public Widget::Panel { Gtk::TreeModelColumn<Glib::ustring> _colSelector; // Style or matching object id. Gtk::TreeModelColumn<gint> _colSelectorPos; // Position of the selector to handle dup selectors Gtk::TreeModelColumn<Glib::ustring> _colOwner; // Store the owner of the property for popup - Gtk::TreeModelColumn<bool> _colLinked; // Go to another element - Gtk::TreeModelColumn<SPObject *> _colHref; // Go to another element + Gtk::TreeModelColumn<bool> _colLinked; // Other object linked + Gtk::TreeModelColumn<SPObject *> _colHref; // Is going to another object }; ModelColumns _mColumns; diff --git a/src/ui/dialog/xml-tree.cpp b/src/ui/dialog/xml-tree.cpp index 38fb6d026..91c24bd4c 100644 --- a/src/ui/dialog/xml-tree.cpp +++ b/src/ui/dialog/xml-tree.cpp @@ -459,7 +459,7 @@ void XmlTree::set_dt_select(Inkscape::XML::Node *repr) } else { object = nullptr; } - + blocked++; if ( object && in_dt_coordsys(*object) && !(SP_IS_STRING(object) || |
