commit fca28533281ee3875e1444998e36e2ae348266fa Author: Felipe Weckx Date: Fri Aug 15 09:33:38 2014 -0300 support to librevenge and libvisio >= 0.1 diff --git a/NEWS b/NEWS index 943f0cc..93ac894 100644 --- NEWS +++ NEWS @@ -1,3 +1,6 @@ +2014-08-14 vsd2svg 0.2.0 + * Update to work with libvisio-0.1 and librevenge + 2012-09-02 vsd2svg 0.0.2 * First working version diff --git a/configure.ac b/configure.ac index 9fd7fc1..3bc64ff 100644 --- configure.ac +++ configure.ac @@ -4,7 +4,7 @@ AC_PREREQ([2.67]) m4_define([vsd2svg_version_major],[0]) -m4_define([vsd2svg_version_minor],[1]) +m4_define([vsd2svg_version_minor],[2]) m4_define([vsd2svg_version_micro],[0]) m4_define([vsd2svg_version],[vsd2svg_version_major.vsd2svg_version_minor.vsd2svg_version_micro]) @@ -49,7 +49,8 @@ AC_CONFIG_FILES([Makefile build/Makefile build/win32/Makefile \ src/Makefile]) # Checks for libraries. -PKG_CHECK_MODULES([libvisio],[libvisio-0.0]) +PKG_CHECK_MODULES([libvisio],[libvisio-0.1]) +PKG_CHECK_MODULES([librevenge],[librevenge-0.0 librevenge-stream-0.0 librevenge-generators-0.0]) # Checks for header files. AC_CHECK_HEADERS([windows.h], [AM_CONDITIONAL([WINDOWS_H], true)], diff --git a/installer/rpm/mingw32-vsd2svg.spec b/installer/rpm/mingw32-vsd2svg.spec index 0eec9b5..09fae22 100644 --- installer/rpm/mingw32-vsd2svg.spec +++ installer/rpm/mingw32-vsd2svg.spec @@ -8,7 +8,7 @@ Name: mingw32-vsd2svg Summary: Convert VSD files into SVG files -Version: 0.1.0 +Version: 0.2.0 Release: 0 License: GPLv2+ Group: Graphics diff --git a/src/Makefile.am b/src/Makefile.am index 43c8874..00e5904 100644 --- src/Makefile.am +++ src/Makefile.am @@ -3,14 +3,14 @@ if WINDOWS_H bin_PROGRAMS += vsd2svg-win vsd2svg_win_DEPENDENCIES = @VSD2SVG_WIN_WIN32_RESOURCE@ vsd2svg_win_SOURCES = vsd2svg-win.cpp - vsd2svg_win_LDADD = $(libvisio_LIBS) -lcomdlg32 @VSD2SVG_WIN_WIN32_RESOURCE@ + vsd2svg_win_LDADD = $(libvisio_LIBS) $(librevenge_LIBS) -lcomdlg32 @VSD2SVG_WIN_WIN32_RESOURCE@ vsd2svg_win_LDFLAGS = -mwindows endif -AM_CPPFLAGS = $(libvisio_CFLAGS) +AM_CPPFLAGS = $(libvisio_CFLAGS) $(librevenge_CFLAGS) vsd2svg_SOURCES = vsd2svg.cpp -vsd2svg_LDADD = $(libvisio_LIBS) +vsd2svg_LDADD = $(libvisio_LIBS) $(librevenge_LIBS) if WINDOWS_H @VSD2SVG_WIN_WIN32_RESOURCE@ : vsd2svg-win.rc $(vsd2svg_win_OBJECTS) diff --git a/src/vsd2svg-win.cpp b/src/vsd2svg-win.cpp index f8162db..a8f8f41 100644 --- src/vsd2svg-win.cpp +++ src/vsd2svg-win.cpp @@ -28,19 +28,19 @@ #include #include #include +#include +#include +#include #include -#include -#include #include #include #include using namespace std; -char gszVersion[] = "vsd2svg-win 0.1.0"; +char gszVersion[] = "vsd2svg-win 0.2.0"; unsigned giDrawingPageCount = 0; -libvisio::VSDStringVector output; - +librevenge::RVNGStringVector output; int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { @@ -116,7 +116,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, return 1; } - WPXFileStream input(szTmpVisio); + librevenge::RVNGFileStream input(szTmpVisio); if (!libvisio::VisioDocument::isSupported(&input)) { MessageBox(NULL, @@ -128,7 +128,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, return 1; } - if (!libvisio::VisioDocument::generateSVG(&input, output)) { + librevenge::RVNGSVGDrawingGenerator generator(output, "svg"); + if (!libvisio::VisioDocument::parse(&input, &generator)) { MessageBox(NULL, "ERROR: SVG generation failed!", gszVersion, MB_ICONERROR); diff --git a/src/vsd2svg.cpp b/src/vsd2svg.cpp index 9be3a84..bf26886 100644 --- src/vsd2svg.cpp +++ src/vsd2svg.cpp @@ -27,9 +27,10 @@ #include #include #include +#include +#include +#include #include -#include -#include #include #include @@ -73,7 +74,7 @@ int main(int argc, char *argv[]) return 1; } - WPXFileStream input(argv[1 + allpages]); + librevenge::RVNGFileStream input(argv[1 + allpages]); if (!libvisio::VisioDocument::isSupported(&input)) { cerr << @@ -82,8 +83,9 @@ int main(int argc, char *argv[]) return 1; } - libvisio::VSDStringVector output; - if (!libvisio::VisioDocument::generateSVG(&input, output)) { + librevenge::RVNGStringVector output; + librevenge::RVNGSVGDrawingGenerator generator(output, "svg"); + if (!libvisio::VisioDocument::parse(&input, &generator)) { cerr << "ERROR: SVG Generation failed!" << endl; return 1; }