[Libreoffice-commits] .: basebmp/CppunitTest_basebmp.mk basebmp/inc

Tor Lillqvist tml at kemper.freedesktop.org
Fri Sep 2 02:00:28 PDT 2011


 basebmp/CppunitTest_basebmp.mk       |    5 ++++
 basebmp/inc/basebmp/basebmpdllapi.h  |   41 +++++++++++++++++++++++++++++++++++
 basebmp/inc/basebmp/bitmapdevice.hxx |    8 ------
 basebmp/inc/basebmp/debug.hxx        |    5 ++--
 4 files changed, 50 insertions(+), 9 deletions(-)

New commits:
commit 6eb586506d14f7e51b4f97297430ceabf276785b
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Fri Sep 2 11:49:46 2011 +0300

    Add a foodllapi.h file here too and use it
    
    Factor out the DLLPUBLIC dance from bitmapdevice.hxx to a separate
    headers as is the normal convention.
    
    Decorate the new debugDump() with BASEBMP_DLLPUBLIC in the header.
    Otherwise the definition (which uses SAL_DLLPUBLIC_EXPORT) doesn't
    match the declaration.

diff --git a/basebmp/CppunitTest_basebmp.mk b/basebmp/CppunitTest_basebmp.mk
index 90d7de5..1f16fc1 100644
--- a/basebmp/CppunitTest_basebmp.mk
+++ b/basebmp/CppunitTest_basebmp.mk
@@ -28,6 +28,11 @@
 
 $(eval $(call gb_CppunitTest_CppunitTest,basebmp_test))
 
+$(eval $(call gb_CppunitTest_set_include,basebmp_test,\
+	-I$(realpath $(SRCDIR)/basebmp/inc/) \
+	$$(INCLUDE) \
+))
+
 $(eval $(call gb_CppunitTest_add_exception_objects,basebmp_test, \
 	basebmp/test/basictest \
 	basebmp/test/bmpmasktest \
diff --git a/basebmp/inc/basebmp/basebmpdllapi.h b/basebmp/inc/basebmp/basebmpdllapi.h
new file mode 100644
index 0000000..9dca0c5
--- /dev/null
+++ b/basebmp/inc/basebmp/basebmpdllapi.h
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_BASEBMP_BASEBMPDLLAPI_H
+#define INCLUDED_BASEBMP_BASEBMPDLLAPI_H
+
+#if defined BASEBMP_DLLIMPLEMENTATION
+#define BASEBMP_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define BASEBMP_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define BASEBMP_DLLPRIVATE SAL_DLLPRIVATE
+
+#endif /* INCLUDED_BASEBMP_BASEBMPDLLAPI_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basebmp/inc/basebmp/bitmapdevice.hxx b/basebmp/inc/basebmp/bitmapdevice.hxx
index 0db4099..56101f3 100644
--- a/basebmp/inc/basebmp/bitmapdevice.hxx
+++ b/basebmp/inc/basebmp/bitmapdevice.hxx
@@ -31,6 +31,7 @@
 
 #include <sal/types.h>
 #include <basebmp/drawmodes.hxx>
+#include <basebmp/basebmpdllapi.h>
 
 #include <boost/scoped_ptr.hpp>
 #include <boost/shared_ptr.hpp>
@@ -39,13 +40,6 @@
 #include <boost/noncopyable.hpp>
 #include <vector>
 
-#if defined BASEBMP_DLLIMPLEMENTATION
-#define BASEBMP_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define BASEBMP_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-#define BASEBMP_DLLPRIVATE SAL_DLLPRIVATE
-
 namespace basegfx
 {
     class B2IPoint;
diff --git a/basebmp/inc/basebmp/debug.hxx b/basebmp/inc/basebmp/debug.hxx
index c5660b9..e9481ac 100644
--- a/basebmp/inc/basebmp/debug.hxx
+++ b/basebmp/inc/basebmp/debug.hxx
@@ -31,6 +31,7 @@
 
 #include <iostream>
 #include <boost/shared_ptr.hpp>
+#include <basebmp/basebmpdllapi.h>
 
 namespace basebmp
 {
@@ -44,8 +45,8 @@ namespace basebmp
         @param rOutputStream
         Stream to write output to.
     */
-    void debugDump( const boost::shared_ptr< BitmapDevice >& rDevice,
-                    ::std::ostream&                          rOutputStream );
+    void BASEBMP_DLLPUBLIC debugDump( const boost::shared_ptr< BitmapDevice >& rDevice,
+                                      ::std::ostream&                          rOutputStream );
 }
 
 #endif /* INCLUDED_BASEBMP_DEBUG_HXX */


More information about the Libreoffice-commits mailing list