[Libreoffice-commits] libvisio.git: inc/libvisio src/lib
Fridrich Å trba
fridrich.strba at bluewin.ch
Wed Dec 18 01:36:47 PST 2013
inc/libvisio/VisioDocument.h | 16 +++++++++++++---
src/lib/Makefile.am | 1 +
src/lib/VisioDocument.cpp | 6 +++---
3 files changed, 17 insertions(+), 6 deletions(-)
New commits:
commit 953c53d206307e5129b3282e093c57d70d491796
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Wed Dec 18 10:36:21 2013 +0100
Export only needed stuff on Windows
Change-Id: Iac43500280f5639caf13e4f4171a83e1eade6ece
diff --git a/inc/libvisio/VisioDocument.h b/inc/libvisio/VisioDocument.h
index dab307f..4e3a8fa 100644
--- a/inc/libvisio/VisioDocument.h
+++ b/inc/libvisio/VisioDocument.h
@@ -33,6 +33,16 @@
#include <librevenge/librevenge.h>
+#ifdef DLL_EXPORT
+#ifdef LIBVISIO_BUILD
+#define VSDAPI __declspec(dllexport)
+#else
+#define VSDAPI __declspec(dllimport)
+#endif
+#else
+#define VSDAPI
+#endif
+
namespace libvisio
{
@@ -40,11 +50,11 @@ class VisioDocument
{
public:
- static bool isSupported(librevenge::RVNGInputStream *input);
+ static VSDAPI bool isSupported(librevenge::RVNGInputStream *input);
- static bool parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
+ static VSDAPI bool parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
- static bool parseStencils(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
+ static VSDAPI bool parseStencils(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
};
} // namespace libvisio
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index a3b4247..6080d31 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -11,6 +11,7 @@ libvisio_ at VSD_MAJOR_VERSION@_ at VSD_MINOR_VERSION@_include_HEADERS = \
$(top_srcdir)/inc/libvisio/VisioDocument.h
AM_CXXFLAGS = \
+ -DLIBVISIO_BUILD=1 \
-I$(top_srcdir)/inc \
-I$(top_srcdir)/src/lib \
-I$(top_builddir)/src/lib \
diff --git a/src/lib/VisioDocument.cpp b/src/lib/VisioDocument.cpp
index 20db396..eade1f5 100644
--- a/src/lib/VisioDocument.cpp
+++ b/src/lib/VisioDocument.cpp
@@ -341,7 +341,7 @@ Analyzes the content of an input stream to see if it can be parsed
\return A value that indicates whether the content from the input
stream is a Visio Document that libvisio able to parse
*/
-bool libvisio::VisioDocument::isSupported(librevenge::RVNGInputStream *input)
+VSDAPI bool libvisio::VisioDocument::isSupported(librevenge::RVNGInputStream *input)
{
if (isBinaryVisioDocument(input))
return true;
@@ -360,7 +360,7 @@ librevenge::RVNGDrawingInterface class implementation when needed. This is often
\param painter A WPGPainterInterface implementation
\return A value that indicates whether the parsing was successful
*/
-bool libvisio::VisioDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter)
+VSDAPI bool libvisio::VisioDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter)
{
if (isBinaryVisioDocument(input))
{
@@ -391,7 +391,7 @@ when needed.
\param painter A WPGPainterInterface implementation
\return A value that indicates whether the parsing was successful
*/
-bool libvisio::VisioDocument::parseStencils(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter)
+VSDAPI bool libvisio::VisioDocument::parseStencils(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter)
{
if (isBinaryVisioDocument(input))
{
More information about the Libreoffice-commits
mailing list