summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2011-06-04 22:33:05 +0000
committerJon A. Cruz <jon@joncruz.org>2011-06-04 22:33:05 +0000
commit884cb98ee0fbc0e883ff0a4f2bda43e2c8803312 (patch)
tree641ecbe3e740a58526ec299a8ccb305f1cbcf373 /src
parentMerge gtk header cleanup by Alex Valavanis. Fixes bug #709847, bug #747512, b... (diff)
downloadinkscape-884cb98ee0fbc0e883ff0a4f2bda43e2c8803312.tar.gz
inkscape-884cb98ee0fbc0e883ff0a4f2bda43e2c8803312.zip
Possible Win32 compile fix.
(bzr r10256)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/emf-win32-inout.cpp3
-rw-r--r--src/extension/internal/emf-win32-print.cpp3
-rw-r--r--src/ui/dialog/filedialogimpl-win32.cpp37
3 files changed, 24 insertions, 19 deletions
diff --git a/src/extension/internal/emf-win32-inout.cpp b/src/extension/internal/emf-win32-inout.cpp
index 8aa26a213..2d97174b1 100644
--- a/src/extension/internal/emf-win32-inout.cpp
+++ b/src/extension/internal/emf-win32-inout.cpp
@@ -28,6 +28,7 @@
#endif
//#include "inkscape.h"
+#include "sp-root.h"
#include "sp-path.h"
#include "style.h"
//#include "color.h"
@@ -126,7 +127,7 @@ emf_print_document_to_file(SPDocument *doc, gchar const *filename)
context.module = mod;
/* fixme: This has to go into module constructor somehow */
/* Create new arena */
- mod->base = SP_ITEM(doc->getRoot());
+ mod->base = doc->getRoot();
mod->arena = NRArena::create();
mod->dkey = SPItem::display_key_new(1);
mod->root = mod->base->invoke_show(mod->arena, mod->dkey, SP_ITEM_SHOW_DISPLAY);
diff --git a/src/extension/internal/emf-win32-print.cpp b/src/extension/internal/emf-win32-print.cpp
index 9662881fe..38db43091 100644
--- a/src/extension/internal/emf-win32-print.cpp
+++ b/src/extension/internal/emf-win32-print.cpp
@@ -50,6 +50,7 @@
#include "style.h"
//#include "sp-paint-server.h"
#include "inkscape-version.h"
+#include "sp-root.h"
//#include "libnrtype/FontFactory.h"
//#include "libnrtype/font-instance.h"
@@ -146,7 +147,7 @@ PrintEmfWin32::begin (Inkscape::Extension::Print *mod, SPDocument *doc)
d.x1 = _width;
d.y1 = _height;
} else {
- SPItem* doc_item = SP_ITEM(doc->getRoot());
+ SPItem* doc_item = doc->getRoot();
doc_item->invoke_bbox(&d, doc_item->i2d_affine(), TRUE);
}
diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp
index 4f0978c05..09c3d0a52 100644
--- a/src/ui/dialog/filedialogimpl-win32.cpp
+++ b/src/ui/dialog/filedialogimpl-win32.cpp
@@ -43,6 +43,7 @@
#include "filedialog.h"
#include "filedialogimpl-win32.h"
+#include "sp-root.h"
#include <zlib.h>
#include <cairomm/win32_surface.h>
@@ -409,7 +410,7 @@ void FileOpenDialogImplWin32::createFilterMenu()
*(filterptr++) = L'\0';
_filter_count = extension_index;
- _filter_index = 2; // Select the 2nd filter in the list - 2 is NOT the 3rd
+ _filter_index = 2; // Select the 2nd filter in the list - 2 is NOT the 3rd
}
void FileOpenDialogImplWin32::GetOpenFileName_thread()
@@ -421,7 +422,7 @@ void FileOpenDialogImplWin32::GetOpenFileName_thread()
WCHAR* current_directory_string = (WCHAR*)g_utf8_to_utf16(
_current_directory.data(), _current_directory.length(),
- NULL, NULL, NULL);
+ NULL, NULL, NULL);
memset(&ofn, 0, sizeof(ofn));
@@ -962,8 +963,10 @@ bool FileOpenDialogImplWin32::set_svg_preview()
g_free(utf8string);
// Check the document loaded properly
- if(svgDoc == NULL) return false;
- if(svgDoc->root == NULL)
+ if (svgDoc == NULL) {
+ return false;
+ }
+ if (svgDoc->getRoot() == NULL)
{
svgDoc->doUnref();
return false;
@@ -989,14 +992,14 @@ bool FileOpenDialogImplWin32::set_svg_preview()
// write object bbox to area
Geom::OptRect maybeArea(area);
svgDoc->ensureUpToDate();
- static_cast<SPItem *>(svgDoc->root)->invoke_bbox( maybeArea,
- static_cast<SPItem *>(svgDoc->root)->i2d_affine(), TRUE);
+ svgDoc->getRoot()->invoke_bbox( maybeArea,
+ svgDoc->getRoot()->i2d_affine(), TRUE);
NRArena *const arena = NRArena::create();
unsigned const key = SPItem::display_key_new(1);
- NRArenaItem *root = static_cast<SPItem*>(svgDoc->root)->invoke_show(
+ NRArenaItem *root = svgDoc->getRoot()->invoke_show(
arena, key, SP_ITEM_SHOW_DISPLAY);
NRGC gc(NULL);
@@ -1033,7 +1036,7 @@ bool FileOpenDialogImplWin32::set_svg_preview()
// Tidy up
svgDoc->doUnref();
- static_cast<SPItem*>(svgDoc->root)->invoke_hide(key);
+ svgDoc->getRoot()->invoke_hide(key);
nr_object_unref((NRObject *) arena);
// Create the GDK pixbuf
@@ -1666,7 +1669,7 @@ void FileSaveDialogImplWin32::createFilterMenu()
*(filterptr++) = 0;
_filter_count = extension_index;
- _filter_index = 1; // A value of 1 selects the 1st filter - NOT the 2nd
+ _filter_index = 1; // A value of 1 selects the 1st filter - NOT the 2nd
}
void FileSaveDialogImplWin32::GetSaveFileName_thread()
@@ -1678,7 +1681,7 @@ void FileSaveDialogImplWin32::GetSaveFileName_thread()
WCHAR* current_directory_string = (WCHAR*)g_utf8_to_utf16(
_current_directory.data(), _current_directory.length(),
- NULL, NULL, NULL);
+ NULL, NULL, NULL);
// Copy the selected file name, converting from UTF-8 to UTF-16
memset(_path_string, 0, sizeof(_path_string));
@@ -1730,14 +1733,14 @@ FileSaveDialogImplWin32::show()
_result = false;
_main_loop = g_main_loop_new(g_main_context_default(), FALSE);
- if(_main_loop != NULL)
- {
- if(Glib::Thread::create(sigc::mem_fun(*this, &FileSaveDialogImplWin32::GetSaveFileName_thread), true))
- g_main_loop_run(_main_loop);
+ if(_main_loop != NULL)
+ {
+ if(Glib::Thread::create(sigc::mem_fun(*this, &FileSaveDialogImplWin32::GetSaveFileName_thread), true))
+ g_main_loop_run(_main_loop);
- if(_result)
- appendExtension(myFilename, (Inkscape::Extension::Output*)_extension);
- }
+ if(_result)
+ appendExtension(myFilename, (Inkscape::Extension::Output*)_extension);
+ }
return _result;
}