summaryrefslogtreecommitdiff
path: root/basebmp
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2011-09-02 11:49:46 +0300
committerTor Lillqvist <tlillqvist@suse.com>2011-09-02 11:57:10 +0300
commit6eb586506d14f7e51b4f97297430ceabf276785b (patch)
treef9251039d390613df4fe6424a7a61ebca5302279 /basebmp
parent1d32ee9a536cfff0f93974726f23bff24cea83fb (diff)
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.
Diffstat (limited to 'basebmp')
-rw-r--r--basebmp/CppunitTest_basebmp.mk5
-rw-r--r--basebmp/inc/basebmp/basebmpdllapi.h41
-rw-r--r--basebmp/inc/basebmp/bitmapdevice.hxx8
-rw-r--r--basebmp/inc/basebmp/debug.hxx5
4 files changed, 50 insertions, 9 deletions
diff --git a/basebmp/CppunitTest_basebmp.mk b/basebmp/CppunitTest_basebmp.mk
index 90d7de57e445..1f16fc16c60f 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 000000000000..9dca0c56f225
--- /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 0db4099213f4..56101f34c5b9 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 c5660b9a6a74..e9481ac3d112 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 */