[Libreoffice-commits] libcdr.git: inc/libcdr src/lib
Fridrich Å trba
fridrich.strba at bluewin.ch
Wed Dec 18 01:45:29 PST 2013
inc/libcdr/CDRDocument.h | 5 +++--
inc/libcdr/CMXDocument.h | 5 +++--
inc/libcdr/Makefile.am | 1 +
inc/libcdr/libcdr_api.h | 45 +++++++++++++++++++++++++++++++++++++++++++++
src/lib/CDRDocument.cpp | 4 ++--
src/lib/CMXDocument.cpp | 4 ++--
src/lib/Makefile.am | 3 ++-
7 files changed, 58 insertions(+), 9 deletions(-)
New commits:
commit 3e06fd204357adc066efd1375540f0eb1908bb1c
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Wed Dec 18 10:44:18 2013 +0100
Export only needed stuff on Windows
Change-Id: I004e93c6159bfd7479ea14f2e40fefe9b20953b6
diff --git a/inc/libcdr/CDRDocument.h b/inc/libcdr/CDRDocument.h
index 5f11f87..fd93d07 100644
--- a/inc/libcdr/CDRDocument.h
+++ b/inc/libcdr/CDRDocument.h
@@ -32,6 +32,7 @@
#define __CDRDOCUMENT_H__
#include <librevenge/librevenge.h>
+#include "libcdr_api.h"
namespace libcdr
{
@@ -39,9 +40,9 @@ class CDRDocument
{
public:
- static bool isSupported(librevenge::RVNGInputStream *input);
+ static CDRAPI bool isSupported(librevenge::RVNGInputStream *input);
- static bool parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
+ static CDRAPI bool parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
};
} // namespace libcdr
diff --git a/inc/libcdr/CMXDocument.h b/inc/libcdr/CMXDocument.h
index b19d537..fe9cc17 100644
--- a/inc/libcdr/CMXDocument.h
+++ b/inc/libcdr/CMXDocument.h
@@ -30,6 +30,7 @@
#define __CMXDOCUMENT_H__
#include <librevenge/librevenge.h>
+#include "libcdr_api.h"
namespace libcdr
{
@@ -37,9 +38,9 @@ class CMXDocument
{
public:
- static bool isSupported(librevenge::RVNGInputStream *input);
+ static CDRAPI bool isSupported(librevenge::RVNGInputStream *input);
- static bool parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
+ static CDRAPI bool parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
};
} // namespace libcdr
diff --git a/inc/libcdr/Makefile.am b/inc/libcdr/Makefile.am
index 16634fc..214dcd4 100644
--- a/inc/libcdr/Makefile.am
+++ b/inc/libcdr/Makefile.am
@@ -1,4 +1,5 @@
EXTRA_DIST = \
libcdr.h \
+ libcdr_api.h \
CDRDocument.h \
CMXDocument.h
diff --git a/inc/libcdr/libcdr_api.h b/inc/libcdr/libcdr_api.h
new file mode 100644
index 0000000..6197b10
--- /dev/null
+++ b/inc/libcdr/libcdr_api.h
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* libcdr
+ * Version: MPL 1.1 / GPLv2+ / LGPLv2+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Fridrich Strba <fridrich.strba at bluewin.ch>
+ *
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
+ * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
+ * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
+ * instead of those above.
+ */
+
+#ifndef __LIBCDR_API_H__
+#define __LIBCDR_API_H__
+
+#ifdef DLL_EXPORT
+#ifdef LIBCDR_BUILD
+#define CDRAPI __declspec(dllexport)
+#else
+#define CDRAPI __declspec(dllimport)
+#endif
+#else
+#define CDRAPI
+#endif
+
+#endif
+/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
diff --git a/src/lib/CDRDocument.cpp b/src/lib/CDRDocument.cpp
index aad658c..9530f26 100644
--- a/src/lib/CDRDocument.cpp
+++ b/src/lib/CDRDocument.cpp
@@ -79,7 +79,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 Corel Draw Document that libcdr is able to parse
*/
-bool libcdr::CDRDocument::isSupported(librevenge::RVNGInputStream *input)
+CDRAPI bool libcdr::CDRDocument::isSupported(librevenge::RVNGInputStream *input)
{
librevenge::RVNGInputStream *tmpInput = input;
try
@@ -122,7 +122,7 @@ CDRPaintInterface class implementation when needed. This is often commonly calle
\param painter A CDRPainterInterface implementation
\return A value that indicates whether the parsing was successful
*/
-bool libcdr::CDRDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter)
+CDRAPI bool libcdr::CDRDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter)
{
input->seek(0, librevenge::RVNG_SEEK_SET);
bool retVal = false;
diff --git a/src/lib/CMXDocument.cpp b/src/lib/CMXDocument.cpp
index 39145a5..37327f1 100644
--- a/src/lib/CMXDocument.cpp
+++ b/src/lib/CMXDocument.cpp
@@ -42,7 +42,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 Corel Draw Document that libcdr is able to parse
*/
-bool libcdr::CMXDocument::isSupported(librevenge::RVNGInputStream *input)
+CDRAPI bool libcdr::CMXDocument::isSupported(librevenge::RVNGInputStream *input)
try
{
input->seek(0, librevenge::RVNG_SEEK_SET);
@@ -74,7 +74,7 @@ CDRPaintInterface class implementation when needed. This is often commonly calle
\param painter A CDRPainterInterface implementation
\return A value that indicates whether the parsing was successful
*/
-bool libcdr::CMXDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter)
+CDRAPI bool libcdr::CMXDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter)
{
input->seek(0, librevenge::RVNG_SEEK_SET);
CDRParserState ps;
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 13a94c0..b3613d7 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -8,10 +8,11 @@ lib_LTLIBRARIES = libcdr- at CDR_MAJOR_VERSION@. at CDR_MINOR_VERSION@.la
libcdr_ at CDR_MAJOR_VERSION@_ at CDR_MINOR_VERSION@_includedir = $(includedir)/libcdr- at CDR_MAJOR_VERSION@. at CDR_MINOR_VERSION@/libcdr
libcdr_ at CDR_MAJOR_VERSION@_ at CDR_MINOR_VERSION@_include_HEADERS = \
$(top_srcdir)/inc/libcdr/libcdr.h \
+ $(top_srcdir)/inc/libcdr/libcdr_api.h \
$(top_srcdir)/inc/libcdr/CDRDocument.h \
$(top_srcdir)/inc/libcdr/CMXDocument.h
-AM_CXXFLAGS = -I$(top_srcdir)/inc $(REVENGE_CFLAGS) $(LCMS2_CFLAGS) $(ZLIB_CFLAGS) $(ICU_CFLAGS) $(DEBUG_CXXFLAGS)
+AM_CXXFLAGS = -I$(top_srcdir)/inc $(REVENGE_CFLAGS) $(LCMS2_CFLAGS) $(ZLIB_CFLAGS) $(ICU_CFLAGS) $(DEBUG_CXXFLAGS) -DLIBCDR_BUILD=1
libcdr_ at CDR_MAJOR_VERSION@_ at CDR_MINOR_VERSION@_la_LIBADD = $(REVENGE_LIBS) $(LCMS2_LIBS) $(ZLIB_LIBS) $(ICU_LIBS) @LIBCDR_WIN32_RESOURCE@
libcdr_ at CDR_MAJOR_VERSION@_ at CDR_MINOR_VERSION@_la_DEPENDENCIES = @LIBCDR_WIN32_RESOURCE@
More information about the Libreoffice-commits
mailing list