summaryrefslogtreecommitdiffstats
path: root/src/extension
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-03-02 06:10:16 +0000
committerJon A. Cruz <jon@joncruz.org>2010-03-02 06:10:16 +0000
commitfd703018ee505f643f866aa4e0cc3f1bebf7aa7d (patch)
tree6719a17bafdb9a4f36419999859b934e39d805d6 /src/extension
parentStarting a (useful) derivation of http://colivre.coop.br/Aurium/InkscapeAreaC... (diff)
downloadinkscape-fd703018ee505f643f866aa4e0cc3f1bebf7aa7d.tar.gz
inkscape-fd703018ee505f643f866aa4e0cc3f1bebf7aa7d.zip
Cleanup on id access.
(bzr r9127)
Diffstat (limited to 'src/extension')
-rw-r--r--src/extension/execution-env.cpp4
-rw-r--r--src/extension/implementation/script.cpp10
-rw-r--r--src/extension/init.cpp16
-rw-r--r--src/extension/internal/javafx-out.cpp8
-rw-r--r--src/extension/internal/pov-out.cpp34
5 files changed, 36 insertions, 36 deletions
diff --git a/src/extension/execution-env.cpp b/src/extension/execution-env.cpp
index e8d7c4baf..7ed389195 100644
--- a/src/extension/execution-env.cpp
+++ b/src/extension/execution-env.cpp
@@ -58,7 +58,7 @@ ExecutionEnv::ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Imp
sp_desktop_selection(desktop)->itemList();
while ( selected != NULL ) {
Glib::ustring selected_id;
- selected_id = SP_OBJECT_ID(*selected);
+ selected_id = (*selected)->getId();
_selected.insert(_selected.end(), selected_id);
//std::cout << "Selected: " << selected_id << std::endl;
++selected;
@@ -127,7 +127,7 @@ ExecutionEnv::createWorkingDialog (void) {
SPDesktop *desktop = (SPDesktop *)_doc;
GtkWidget *toplevel = gtk_widget_get_toplevel(&(desktop->canvas->widget));
- if (!toplevel || !GTK_WIDGET_TOPLEVEL (toplevel))
+ if (!toplevel || !GTK_WIDGET_TOPLEVEL (toplevel))
return;
Gtk::Window *window = Glib::wrap(GTK_WINDOW(toplevel), false);
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp
index 4e8d0b360..60623191f 100644
--- a/src/extension/implementation/script.cpp
+++ b/src/extension/implementation/script.cpp
@@ -65,8 +65,8 @@ namespace Implementation {
/** \brief Make GTK+ events continue to come through a little bit
- This just keeps coming the events through so that we'll make the GUI
- update and look pretty.
+ This just keeps coming the events through so that we'll make the GUI
+ update and look pretty.
*/
void Script::pump_events (void) {
while ( Gtk::Main::events_pending() ) {
@@ -97,9 +97,9 @@ Script::interpreter_t const Script::interpreterTab[] = {
/** \brief Look up an interpreter name, and translate to something that
- is executable
+ is executable
\param interpNameArg The name of the interpreter that we're looking
- for, should be an entry in interpreterTab
+ for, should be an entry in interpreterTab
*/
Glib::ustring Script::resolveInterpreterExecutable(const Glib::ustring &interpNameArg)
{
@@ -739,7 +739,7 @@ void Script::effect(Inkscape::Extension::Effect *module,
while ( selected != NULL ) {
Glib::ustring selected_id;
selected_id += "--id=";
- selected_id += (*selected)->id;
+ selected_id += (*selected)->getId();
params.insert(params.begin(), selected_id);
++selected;
}
diff --git a/src/extension/init.cpp b/src/extension/init.cpp
index 84cc45de9..777e3d718 100644
--- a/src/extension/init.cpp
+++ b/src/extension/init.cpp
@@ -124,10 +124,10 @@ update_pref(Glib::ustring const &pref_path,
/*
gboolean missing=TRUE;
for (GSList *list = extension_family; list; list = g_slist_next(list)) {
- g_assert( list->data );
+ g_assert( list->data );
- Inkscape::Extension *extension;
- extension = reinterpret_cast<Inkscape::Extension *>(list->data);
+ Inkscape::Extension *extension;
+ extension = reinterpret_cast<Inkscape::Extension *>(list->data);
if (!strcmp(extension->get_id(),pref)) missing=FALSE;
}
@@ -185,7 +185,7 @@ init()
Internal::BlurEdge::init();
Internal::GimpGrad::init();
Internal::Grid::init();
-
+
/* Raster Effects */
#ifdef WITH_IMAGE_MAGICK
Internal::Bitmap::AdaptiveThreshold::init();
@@ -224,14 +224,14 @@ init()
Internal::Bitmap::Wave::init();
#endif /* WITH_IMAGE_MAGICK */
- Internal::Filter::Filter::filters_all();
+ Internal::Filter::Filter::filters_all();
/* Load search path for extensions */
if (Inkscape::Extension::Extension::search_path.size() == 0)
{
- Inkscape::Extension::Extension::search_path.push_back(profile_path("extensions"));
-
- Inkscape::Extension::Extension::search_path.push_back(g_strdup(INKSCAPE_EXTENSIONDIR));
+ Inkscape::Extension::Extension::search_path.push_back(profile_path("extensions"));
+
+ Inkscape::Extension::Extension::search_path.push_back(g_strdup(INKSCAPE_EXTENSIONDIR));
}
diff --git a/src/extension/internal/javafx-out.cpp b/src/extension/internal/javafx-out.cpp
index a2f387406..ca061a63a 100644
--- a/src/extension/internal/javafx-out.cpp
+++ b/src/extension/internal/javafx-out.cpp
@@ -707,7 +707,7 @@ bool JavaFXOutput::doTreeRecursive(SPDocument *doc, SPObject *obj)
* Check the type of node and process
*/
String id;
- if (!obj->id)
+ if (!obj->getId())
{
char buf[16];
sprintf(buf, "id%d", idindex++);
@@ -715,7 +715,7 @@ bool JavaFXOutput::doTreeRecursive(SPDocument *doc, SPObject *obj)
}
else
{
- id = obj->id;
+ id = obj->getId();
}
if (SP_IS_ITEM(obj))
{
@@ -773,7 +773,7 @@ bool JavaFXOutput::doBody(SPDocument *doc, SPObject *obj)
* Check the type of node and process
*/
String id;
- if (!obj->id)
+ if (!obj->getId())
{
char buf[16];
sprintf(buf, "id%d", idindex++);
@@ -781,7 +781,7 @@ bool JavaFXOutput::doBody(SPDocument *doc, SPObject *obj)
}
else
{
- id = obj->id;
+ id = obj->getId();
}
if (SP_IS_ITEM(obj)) {
diff --git a/src/extension/internal/pov-out.cpp b/src/extension/internal/pov-out.cpp
index 1cb14fb58..16877c370 100644
--- a/src/extension/internal/pov-out.cpp
+++ b/src/extension/internal/pov-out.cpp
@@ -312,12 +312,12 @@ bool PovOutput::doCurve(SPItem *item, const String &id)
int segmentCount = 0;
/**
* For all Subpaths in the <path>
- */
+ */
for (Geom::PathVector::const_iterator pit = pathv.begin(); pit != pathv.end(); ++pit)
{
/**
* For all segments in the subpath, including extra closing segment defined by 2geom
- */
+ */
for (Geom::Path::const_iterator cit = pit->begin(); cit != pit->end_closed(); ++cit)
{
@@ -340,14 +340,14 @@ bool PovOutput::doCurve(SPItem *item, const String &id)
nrSegments += segmentCount;
/**
- * at moment of writing, 2geom lacks proper initialization of empty intervals in rect...
- */
- Geom::Rect cminmax( pathv.front().initialPoint(), pathv.front().initialPoint() );
-
-
+ * at moment of writing, 2geom lacks proper initialization of empty intervals in rect...
+ */
+ Geom::Rect cminmax( pathv.front().initialPoint(), pathv.front().initialPoint() );
+
+
/**
* For all Subpaths in the <path>
- */
+ */
for (Geom::PathVector::const_iterator pit = pathv.begin(); pit != pathv.end(); ++pit)
{
@@ -355,7 +355,7 @@ bool PovOutput::doCurve(SPItem *item, const String &id)
/**
* For all segments in the subpath, including extra closing segment defined by 2geom
- */
+ */
for (Geom::Path::const_iterator cit = pit->begin(); cit != pit->end_closed(); ++cit)
{
@@ -372,7 +372,7 @@ bool PovOutput::doCurve(SPItem *item, const String &id)
nrNodes += 8;
}
else if(Geom::CubicBezier const *cubic = dynamic_cast<Geom::CubicBezier const*>(&*cit))
- {
+ {
std::vector<Geom::Point> points = cubic->points();
Geom::Point p0 = points[0];
Geom::Point p1 = points[1];
@@ -383,7 +383,7 @@ bool PovOutput::doCurve(SPItem *item, const String &id)
nrNodes += 8;
}
else
- {
+ {
err("logical error, because pathv_to_linear_and_cubic_beziers was used");
return false;
}
@@ -444,7 +444,7 @@ bool PovOutput::doTreeRecursive(SPDocument *doc, SPObject *obj)
{
String id;
- if (!obj->id)
+ if (!obj->getId())
{
char buf[16];
sprintf(buf, "id%d", idIndex++);
@@ -452,7 +452,7 @@ bool PovOutput::doTreeRecursive(SPDocument *doc, SPObject *obj)
}
else
{
- id = obj->id;
+ id = obj->getId();
}
if (SP_IS_ITEM(obj))
@@ -467,9 +467,9 @@ bool PovOutput::doTreeRecursive(SPDocument *doc, SPObject *obj)
*/
for (SPObject *child = obj->firstChild() ; child ; child = child->next)
{
- if (!doTreeRecursive(doc, child))
- return false;
- }
+ if (!doTreeRecursive(doc, child))
+ return false;
+ }
return true;
}
@@ -610,7 +610,7 @@ void PovOutput::saveDocument(SPDocument *doc, gchar const *filename_utf8)
err("Could not output curves for %s", filename_utf8);
return;
}
-
+
String curveBuf = outbuf;
outbuf.clear();