summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-10-21 21:04:06 +0300
committerTor Lillqvist <tml@collabora.com>2019-10-23 17:32:15 +0200
commitd5d9d4d7502efba4340e8117a55a28d831a2104b (patch)
treee1f2ece420e771d5884676900f91aa526bab71cd
parentb0b0788ba040be2bf42aa19313759ba9f4811d38 (diff)
tdf#128302: Use separate REALSVX_DLLIMPLEMENTATION for SvxRuler
We need to know that it really is in the svx library. Using the messed-up SVX_DLLIMPLEMENTATION means that code in the svxcore library thinks it is in the same svxcore library. Change-Id: I38baed3a26ecbd9d02037e60e44424e2235f9f20 Reviewed-on: https://gerrit.libreoffice.org/81281 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--include/svx/realsvxdllapi.h34
-rw-r--r--include/svx/ruler.hxx4
-rw-r--r--svx/Library_svx.mk1
3 files changed, 37 insertions, 2 deletions
diff --git a/include/svx/realsvxdllapi.h b/include/svx/realsvxdllapi.h
new file mode 100644
index 000000000000..693fbc81fdd6
--- /dev/null
+++ b/include/svx/realsvxdllapi.h
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_REALSVXDLLAPI_H
+#define INCLUDED_SVX_REALSVXDLLAPI_H
+
+#include <sal/types.h>
+
+#if defined(REALSVX_DLLIMPLEMENTATION)
+#define REALSVX_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define REALSVX_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define REALSVX_DLLPRIVATE SAL_DLLPRIVATE
+
+#endif // INCLUDED_SVX_REALSVXDLLAPI_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx
index 02baa710d2c8..278322a66d60 100644
--- a/include/svx/ruler.hxx
+++ b/include/svx/ruler.hxx
@@ -22,7 +22,7 @@
#include <vcl/menu.hxx>
#include <svtools/ruler.hxx>
#include <svl/lstner.hxx>
-#include <svx/svxdllapi.h>
+#include <svx/realsvxdllapi.h>
#include <o3tl/typed_flags_set.hxx>
#include <memory>
@@ -80,7 +80,7 @@ namespace o3tl
template<> struct typed_flags<SvxRulerSupportFlags> : is_typed_flags<SvxRulerSupportFlags, 0x00ff> {};
}
-class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
+class REALSVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
{
friend class SvxRulerItem;
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 2fd92c3d6896..59ab0310a584 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_Library_use_custom_headers,svx,\
$(eval $(call gb_Library_add_defs,svx,\
-DSVX_DLLIMPLEMENTATION \
+ -DREALSVX_DLLIMPLEMENTATION \
-DBOOST_SPIRIT_USE_OLD_NAMESPACE \
))