From 51dcbfb8ad170dd928a3abbd436899181d12971d Mon Sep 17 00:00:00 2001 From: gouldtj Date: Mon, 31 Jul 2006 05:14:42 +0000 Subject: [PATCH] r13107@tres: ted | 2006-07-30 11:47:41 -0700 Getting the basic build stuff in. No we're building libwpg --- src/Makefile.am | 2 + src/Makefile_insert | 1 + src/extension/internal/libwpg/Makefile.am | 100 ------------------ .../internal/libwpg/libwpg-stream.rc.in | 31 ------ .../internal/libwpg/{libwpg.h.in => libwpg.h} | 5 - src/extension/internal/libwpg/libwpg.rc.in | 31 ------ src/extension/internal/wpg-input.cpp | 40 +++---- 7 files changed, 23 insertions(+), 187 deletions(-) delete mode 100644 src/extension/internal/libwpg/Makefile.am delete mode 100644 src/extension/internal/libwpg/libwpg-stream.rc.in rename src/extension/internal/libwpg/{libwpg.h.in => libwpg.h} (84%) delete mode 100644 src/extension/internal/libwpg/libwpg.rc.in diff --git a/src/Makefile.am b/src/Makefile.am index 764ae3dc3..7c8115701 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,6 +32,7 @@ include dom/Makefile_insert include extension/Makefile_insert include extension/implementation/Makefile_insert include extension/internal/Makefile_insert +include extension/internal/libwpg/Makefile_insert include extension/script/Makefile_insert include helper/Makefile_insert include inkjar/Makefile_insert @@ -73,6 +74,7 @@ noinst_LIBRARIES = \ dom/libdom.a \ extension/implementation/libimplementation.a \ extension/internal/libinternal.a \ + extension/internal/libwpg/libwpg.a \ extension/libextension.a \ extension/script/libscript.a \ helper/libspchelp.a \ diff --git a/src/Makefile_insert b/src/Makefile_insert index e096ef5e4..dd65108ce 100644 --- a/src/Makefile_insert +++ b/src/Makefile_insert @@ -284,6 +284,7 @@ inkscape_private_libs = \ extension/libextension.a \ extension/implementation/libimplementation.a \ extension/internal/libinternal.a \ + extension/internal/libwpg/libwpg.a \ extension/script/libscript.a \ dom/libdom.a \ xml/libspxml.a \ diff --git a/src/extension/internal/libwpg/Makefile.am b/src/extension/internal/libwpg/Makefile.am deleted file mode 100644 index e8b4495d5..000000000 --- a/src/extension/internal/libwpg/Makefile.am +++ /dev/null @@ -1,100 +0,0 @@ -EXTRA_DIST = \ - libwpg.h.in \ - libwpg.rc.in \ - libwpg-stream.rc.in - -# These may be in the builddir too -BUILD_EXTRA_DIST = \ - libwpg.rc \ - libwpg-stream.rc - -if PLATFORM_WIN32 -no_undefined = -no-undefined -version_info = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -else -no_undefined = -version_info = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -endif - -if OS_WIN32 -install-libtool-import-lib: - $(INSTALL) .libs/libwpg-1.dll.a $(DESTDIR)$(libdir) - $(INSTALL) .libs/libwpg-stream-1.dll.a $(DESTDIR)$(libdir) - -uninstall-libtool-import-lib: - -rm $(DESTDIR)$(libdir)/libwpg-1.dll.a - -rm $(DESTDIR)$(libdir)/libwpg-stream-1.dll.a - -else -install-libtool-import-lib: -uninstall-libtool-import-lib: -endif - -lib_LTLIBRARIES = libwpg-1.la libwpg-stream-1.la -libwpg_1_includedir = $(includedir)/libwpg-1/libwpg -libwpg_1_include_HEADERS = \ - libwpg.h \ - WPGraphics.h \ - WPGColor.h \ - WPGPen.h \ - WPGBrush.h \ - WPGGradient.h \ - WPGPoint.h \ - WPGRect.h \ - WPGPath.h \ - WPGStream.h \ - WPGPaintInterface.h - -AM_CXXFLAGS = $(LIBWPG_CXXFLAGS) $(DEBUG_CXXFLAGS) - -libwpg_1_la_LIBADD = $(LIBWPG_LIBS) @LIBWPG_WIN32_RESOURCE@ -libwpg_1_la_DEPENDENCIES = @LIBWPG_WIN32_RESOURCE@ -libwpg_1_la_LDFLAGS = $(version_info) -export-dynamic $(no_undefined) -libwpg_1_la_SOURCES = \ - WPGraphics.cpp \ - WPGPen.cpp \ - WPGGradient.cpp \ - WPGPoint.cpp \ - WPGPath.cpp \ - WPGHeader.cpp \ - WPGXParser.cpp \ - WPG1Parser.cpp \ - WPG2Parser.cpp \ - libwpg.h \ - libwpg_utils.h \ - WPGColor.h \ - WPGPen.h \ - WPGBrush.h \ - WPGPath.h \ - WPGGradient.h \ - WPGHeader.h \ - WPGXParser.h \ - WPG1Parser.h \ - WPG2Parser.h \ - WPGPaintInterface.h - -libwpg_stream_1_includedir = $(includedir)/libwpg-1/libwpg -libwpg_stream_1_include_HEADERS = WPGStreamImplementation.h - -libwpg_stream_1_la_LIBADD = $(LIBWPG_LIBS) @LIBWPG_STREAM_WIN32_RESOURCE@ -libwpg_stream_1_la_DEPENDENCIES = @LIBWPG_STREAM_WIN32_RESOURCE@ -libwpg_stream_1_la_LDFLAGS = $(version_info) -export-dynamic $(no_undefined) -libwpg_stream_1_la_SOURCES = \ - WPGOLEStream.cpp \ - WPGStreamImplementation.cpp \ - WPGOLEStream.h - -if OS_WIN32 - -@LIBWPG_WIN32_RESOURCE@ : libwpg.rc - $(top_srcdir)/build/win32/lt-compile-resource libwpg.rc @LIBWPG_WIN32_RESOURCE@ - -@LIBWPG_STREAM_WIN32_RESOURCE@ : libwpg.rc - $(top_srcdir)/build/win32/lt-compile-resource libwpg-stream.rc @LIBWPG_STREAM_WIN32_RESOURCE@ - -endif - - -install-data-local: install-libtool-import-lib - -uninstall-local: uninstall-libtool-import-lib diff --git a/src/extension/internal/libwpg/libwpg-stream.rc.in b/src/extension/internal/libwpg/libwpg-stream.rc.in deleted file mode 100644 index ad297d222..000000000 --- a/src/extension/internal/libwpg/libwpg-stream.rc.in +++ /dev/null @@ -1,31 +0,0 @@ -#include - -VS_VERSION_INFO VERSIONINFO - FILEVERSION @WPG_MAJOR_VERSION@,@WPG_MINOR_VERSION@,@WPG_MICRO_VERSION@,BUILDNUMBER - PRODUCTVERSION @WPG_MAJOR_VERSION@,@WPG_MINOR_VERSION@,@WPG_MICRO_VERSION@,0 - FILEFLAGSMASK 0 - FILEFLAGS 0 - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE VFT2_UNKNOWN - BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "CompanyName", "The libwpg developer community" - VALUE "FileDescription", "libwpg-stream" - VALUE "FileVersion", "@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.@WPG_MICRO_VERSION@.BUILDNUMBER" - VALUE "InternalName", "libwpg-stream-1" - VALUE "LegalCopyright", "Copyright (C) 2004 Marc Oude Kotte, other contributers" - VALUE "OriginalFilename", "libwpg-stream-1.dll" - VALUE "ProductName", "libwpg" - VALUE "ProductVersion", "@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.@WPG_MICRO_VERSION@" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END - END - diff --git a/src/extension/internal/libwpg/libwpg.h.in b/src/extension/internal/libwpg/libwpg.h similarity index 84% rename from src/extension/internal/libwpg/libwpg.h.in rename to src/extension/internal/libwpg/libwpg.h index fcbf99349..feba0502d 100644 --- a/src/extension/internal/libwpg/libwpg.h.in +++ b/src/extension/internal/libwpg/libwpg.h @@ -27,11 +27,6 @@ #ifndef __LIBWPG_H__ #define __LIBWPG_H__ -#define LIBWPG_VERSION_MAJOR @WPG_MAJOR_VERSION@ -#define LIBWPG_VERSION_MINOR @WPG_MINOR_VERSION@ -#define LIBWPG_VERSION_REVISION @WPG_MICRO_VERSION@ -#define LIBWPG_VERSION_STRING "@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.@WPG_MICRO_VERSION@" - #include "WPGraphics.h" #include "WPGPaintInterface.h" #include "WPGStream.h" diff --git a/src/extension/internal/libwpg/libwpg.rc.in b/src/extension/internal/libwpg/libwpg.rc.in deleted file mode 100644 index e2278a0a0..000000000 --- a/src/extension/internal/libwpg/libwpg.rc.in +++ /dev/null @@ -1,31 +0,0 @@ -#include - -VS_VERSION_INFO VERSIONINFO - FILEVERSION @WPG_MAJOR_VERSION@,@WPG_MINOR_VERSION@,@WPG_MICRO_VERSION@,BUILDNUMBER - PRODUCTVERSION @WPG_MAJOR_VERSION@,@WPG_MINOR_VERSION@,@WPG_MICRO_VERSION@,0 - FILEFLAGSMASK 0 - FILEFLAGS 0 - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE VFT2_UNKNOWN - BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "CompanyName", "The libwpg developer community" - VALUE "FileDescription", "libwpg" - VALUE "FileVersion", "@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.@WPG_MICRO_VERSION@.BUILDNUMBER" - VALUE "InternalName", "libwpg-1" - VALUE "LegalCopyright", "Copyright (C) 2004 Marc Oude Kotte, other contributers" - VALUE "OriginalFilename", "libwpg-1.dll" - VALUE "ProductName", "libwpg" - VALUE "ProductVersion", "@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.@WPG_MICRO_VERSION@" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END - END - diff --git a/src/extension/internal/wpg-input.cpp b/src/extension/internal/wpg-input.cpp index bc65ad5b9..4f296f2ab 100644 --- a/src/extension/internal/wpg-input.cpp +++ b/src/extension/internal/wpg-input.cpp @@ -25,14 +25,14 @@ #include -#include "libwpg.h" -#include "WPGStreamImplementation.h" +#include "libwpg/libwpg.h" +#include "libwpg/WPGStreamImplementation.h" using namespace libwpg; -class SvgPainter : public libwpg::WPGPaintInterface { +class InkscapePainter : public libwpg::WPGPaintInterface { public: - SvgPainter(); + InkscapePainter(); void startDocument(double imageWidth, double imageHeight); void endDocument(); @@ -56,11 +56,11 @@ private: void writeStyle(); }; -SvgPainter::SvgPainter(): m_fillRule(AlternatingFill), m_gradientIndex(1) +InkscapePainter::InkscapePainter(): m_fillRule(AlternatingFill), m_gradientIndex(1) { } -void SvgPainter::startDocument(double width, double height) +void InkscapePainter::startDocument(double width, double height) { printf("\n"); printf("\n"); } -void SvgPainter::setPen(const WPGPen& pen) +void InkscapePainter::setPen(const WPGPen& pen) { m_pen = pen; } -void SvgPainter::setBrush(const WPGBrush& brush) +void InkscapePainter::setBrush(const WPGBrush& brush) { m_brush = brush; @@ -121,22 +121,22 @@ void SvgPainter::setBrush(const WPGBrush& brush) } } -void SvgPainter::setFillRule(FillRule rule) +void InkscapePainter::setFillRule(FillRule rule) { m_fillRule = rule; } -void SvgPainter::startLayer(unsigned int id) +void InkscapePainter::startLayer(unsigned int id) { printf("\n", id); } -void SvgPainter::endLayer(unsigned int) +void InkscapePainter::endLayer(unsigned int) { printf("\n"); } -void SvgPainter::drawRectangle(const WPGRect& rect, double rx, double ry) +void InkscapePainter::drawRectangle(const WPGRect& rect, double rx, double ry) { printf("\n"); } -void SvgPainter::drawEllipse(const WPGPoint& center, double rx, double ry) +void InkscapePainter::drawEllipse(const WPGPoint& center, double rx, double ry) { printf("\n"); } -void SvgPainter::drawPolygon(const WPGPointArray& vertices) +void InkscapePainter::drawPolygon(const WPGPointArray& vertices) { if(vertices.count() < 2) return; @@ -186,7 +186,7 @@ void SvgPainter::drawPolygon(const WPGPointArray& vertices) } } -void SvgPainter::drawPath(const WPGPath& path) +void InkscapePainter::drawPath(const WPGPath& path) { printf("