Code

Added missing (and very important) file.
[inkscape.git] / src / extension / internal / wpg-input.cpp
index fd0cdff3947094e98c3ea74c4f21a00f2c812452..c37d5705b4bc0b0077fc2506a9b129ed0b6bd79f 100644 (file)
@@ -39,6 +39,9 @@
  */
 
 #include <stdio.h>
+#include "config.h"
+
+#ifdef WITH_LIBWPG
 
 #include "wpg-input.h"
 #include "extension/system.h"
@@ -46,7 +49,8 @@
 #include "document.h"
 
 #include "libwpg/libwpg.h"
-#include "libwpg/WPGSVGGenerator.h"
+#include "libwpg/WPGStreamImplementation.h"
+
 
 using namespace libwpg;
 
@@ -57,9 +61,9 @@ namespace Internal {
 
 SPDocument *
 WpgInput::open(Inkscape::Extension::Input * mod, const gchar * uri) {
-    WPGInputStream* input = new WPGFileStream(uri);
-    if (input->isOle()) {
-        WPGInputStream* olestream = input->getWPGOleStream();
+    WPXInputStream* input = new libwpg::WPGFileStream(uri);
+    if (input->isOLEStream()) {
+        WPXInputStream* olestream = input->getDocumentOLEStream();
         if (olestream) {
             delete input;
             input = olestream;
@@ -94,7 +98,7 @@ WpgInput::init(void) {
     Inkscape::Extension::Extension * ext;
 
     ext = Inkscape::Extension::build_from_mem(
-        "<inkscape-extension>\n"
+        "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n"
             "<name>" N_("WPG Input") "</name>\n"
             "<id>org.inkscape.input.wpg</id>\n"
             "<input>\n"
@@ -107,6 +111,7 @@ WpgInput::init(void) {
 } // init
 
 } } }  /* namespace Inkscape, Extension, Implementation */
+#endif /* WITH_LIBWPG */
 
 /*
   Local Variables: