summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authormc <>2015-02-18 10:25:23 +0000
committerMarc Jeanmougin <mc>2015-02-18 10:25:23 +0000
commit9e21d00fb1053897420f80d05a9815c5b2bbf312 (patch)
tree9c0f61257c24e936d07526bd4b71a399825519b6 /src/ui
parentOMG IT'S COMPILING. (diff)
downloadinkscape-9e21d00fb1053897420f80d05a9815c5b2bbf312.tar.gz
inkscape-9e21d00fb1053897420f80d05a9815c5b2bbf312.zip
I can't really understand why, but i can now launch inkscape without it segfaulting.
That's an improvement. Next thing: code cleaning, replacing containers with vectors (bzr r13922.1.4)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/export.cpp12
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp2
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp4
3 files changed, 9 insertions, 9 deletions
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index fc6094c9f..0667ba721 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -817,9 +817,9 @@ void Export::onAreaToggled ()
one that's nice */
if (filename.empty()) {
const gchar * id = "object";
- const SelContainer reprlst = SP_ACTIVE_DESKTOP->getSelection()->reprList();
- for(SelContainer::const_iterator i=reprlst.begin(); reprlst.end() != i; i++) {
- Inkscape::XML::Node * repr = (Inkscape::XML::Node *)(*i);
+ const std::vector<XML::Node*> reprlst = SP_ACTIVE_DESKTOP->getSelection()->reprList();
+ for(std::vector<XML::Node*>::const_iterator i=reprlst.begin(); reprlst.end() != i; i++) {
+ Inkscape::XML::Node * repr = (*i);
if (repr->attribute("id")) {
id = repr->attribute("id");
break;
@@ -1226,7 +1226,7 @@ void Export::onExport ()
break;
}
case SELECTION_SELECTION: {
- SelContainer reprlst;
+ std::vector<XML::Node*> reprlst;
SPDocument * doc = SP_ACTIVE_DOCUMENT;
bool modified = false;
@@ -1234,8 +1234,8 @@ void Export::onExport ()
DocumentUndo::setUndoSensitive(doc, false);
reprlst = desktop->getSelection()->reprList();
- for(SelContainer::const_iterator i=reprlst.begin(); reprlst.end() != i; i++) {
- Inkscape::XML::Node * repr = dynamic_cast<Inkscape::XML::Node *>(*i);
+ for(std::vector<Inkscape::XML::Node*>::const_iterator i=reprlst.begin(); reprlst.end() != i; i++) {
+ Inkscape::XML::Node * repr = *i;
const gchar * temp_string;
Glib::ustring dir = Glib::path_get_dirname(filename.c_str());
const gchar* docURI=SP_ACTIVE_DOCUMENT->getURI();
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index 657d6771b..f67c1d173 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -690,7 +690,7 @@ private:
void select_svg_element(){
Inkscape::Selection* sel = _desktop->getSelection();
if (sel->isEmpty()) return;
- Inkscape::XML::Node* node = (Inkscape::XML::Node*) sel->reprList().front();
+ Inkscape::XML::Node* node = sel->reprList().front();
if (!node || !node->matchAttributeName("id")) return;
std::ostringstream xlikhref;
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index 8f5601e3a..12b423602 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -524,7 +524,7 @@ void SvgFontsDialog::set_glyph_description_from_selected_path(){
return;
}
- Inkscape::XML::Node* node = (Inkscape::XML::Node*)(sel->reprList().front());
+ Inkscape::XML::Node* node = sel->reprList().front();
if (!node) return;//TODO: should this be an assert?
if (!node->matchAttributeName("d") || !node->attribute("d")){
char *msg = _("The selected object does not have a <b>path</b> description.");
@@ -566,7 +566,7 @@ void SvgFontsDialog::missing_glyph_description_from_selected_path(){
return;
}
- Inkscape::XML::Node* node = (Inkscape::XML::Node*)(sel->reprList().front());
+ Inkscape::XML::Node* node = sel->reprList().front();
if (!node) return;//TODO: should this be an assert?
if (!node->matchAttributeName("d") || !node->attribute("d")){
char *msg = _("The selected object does not have a <b>path</b> description.");