summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-04-02 13:22:04 +0300
committerTor Lillqvist <tml@collabora.com>2015-04-02 13:28:12 +0300
commitcbd8587ffb4b4e01705fc7f07fc4740382b78a08 (patch)
tree0c780e9ceac1afc62791cd617facb6c00e4a7d32
parentc8cf6766fd38d45b73d49cb85dd5fe2d7e3dba50 (diff)
Move osl::LibreOfficeKit stuff to comphelper for now
Let's see where it actually will be needed. Sal is a "picky" place for new API, even inside LIBO_INTERNAL_ONLY. Change-Id: Ia0c5ee8cfc6ee526c5ad34d2f8aab0b14b5f805b
-rw-r--r--comphelper/Library_comphelper.mk1
-rw-r--r--comphelper/source/misc/lok.cxx34
-rw-r--r--desktop/source/app/officeipcthread.cxx6
-rw-r--r--desktop/source/lib/init.cxx4
-rw-r--r--include/comphelper/lok.hxx (renamed from include/osl/lok.hxx)18
-rw-r--r--sal/osl/all/utility.cxx17
-rw-r--r--sal/util/sal.map5
7 files changed, 47 insertions, 38 deletions
diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk
index e36fe31c2713..2192217a4338 100644
--- a/comphelper/Library_comphelper.mk
+++ b/comphelper/Library_comphelper.mk
@@ -94,6 +94,7 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
comphelper/source/misc/interaction \
comphelper/source/misc/listenernotification \
comphelper/source/misc/logging \
+ comphelper/source/misc/lok \
comphelper/source/misc/mimeconfighelper \
comphelper/source/misc/namedvaluecollection \
comphelper/source/misc/numberedcollection \
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
new file mode 100644
index 000000000000..71bc922c5d5f
--- /dev/null
+++ b/comphelper/source/misc/lok.cxx
@@ -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/.
+ */
+
+#include <comphelper/lok.hxx>
+
+namespace comphelper
+{
+
+namespace LibreOfficeKit
+{
+
+static bool bActive(false);
+
+void setActive()
+{
+ bActive = true;
+}
+
+bool isActive()
+{
+ return bActive;
+}
+
+} // namespace LibreOfficeKit
+
+} // namespace comphelper
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 8c0ac218d6e7..d148b8ae60d8 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -26,7 +26,6 @@
#include "dispatchwatcher.hxx"
#include <boost/scoped_ptr.hpp>
#include <stdio.h>
-#include <osl/lok.hxx>
#include <osl/process.h>
#include <unotools/bootstrap.hxx>
#include <vcl/svapp.hxx>
@@ -40,6 +39,7 @@
#include <unotools/moduleoptions.hxx>
#include <rtl/bootstrap.hxx>
#include <rtl/strbuf.hxx>
+#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <osl/file.hxx>
@@ -467,7 +467,7 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
// from LibreOfficeKit's lo_initialize() I am not completely sure, but that code, and this, is
// such horrible crack that I don't want to change it too much.
- if (osl::LibreOfficeKit::isActive())
+ if (comphelper::LibreOfficeKit::isActive())
{
// Setting nPipeMode to PIPEMODE_CREATED causes the trivial path to be taken below, starting
// the listeing thread. (Which will immediately finish, see the execute() function, but what
@@ -707,7 +707,7 @@ void OfficeIPCThread::execute()
#if HAVE_FEATURE_DESKTOP || defined(ANDROID)
#ifndef ANDROID
- if (osl::LibreOfficeKit::isActive())
+ if (comphelper::LibreOfficeKit::isActive())
return;
#endif
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 339e3fd17ad9..450757a8351f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -22,13 +22,13 @@
#include <tools/errinf.hxx>
#include <osl/file.hxx>
-#include <osl/lok.hxx>
#include <osl/process.h>
#include <osl/thread.h>
#include <rtl/strbuf.hxx>
#include <rtl/bootstrap.hxx>
#include <cppuhelper/bootstrap.hxx>
#include <comphelper/dispatchcommand.hxx>
+#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -853,7 +853,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
if (bInitialized)
return 1;
- osl::LibreOfficeKit::setActive();
+ comphelper::LibreOfficeKit::setActive();
OUString aAppPath;
if (pAppPath)
diff --git a/include/osl/lok.hxx b/include/comphelper/lok.hxx
index 3b241ef49748..8ddfb5a84fde 100644
--- a/include/osl/lok.hxx
+++ b/include/comphelper/lok.hxx
@@ -7,28 +7,24 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_OSL_LOK_HXX
-#define INCLUDED_OSL_LOK_HXX
+#ifndef INCLUDED_COMPHELPER_LOK_HXX
+#define INCLUDED_COMPHELPER_LOK_HXX
-#ifdef LIBO_INTERNAL_ONLY
+#include <comphelper/comphelperdllapi.h>
-#include <sal/saldllapi.h>
-
-namespace osl
+namespace comphelper
{
namespace LibreOfficeKit
{
-SAL_DLLPUBLIC void setActive();
+COMPHELPER_DLLPUBLIC void setActive();
-SAL_DLLPUBLIC bool isActive();
+COMPHELPER_DLLPUBLIC bool isActive();
}
}
-#endif // LIBO_INTERNAL_ONLY
-
-#endif // INCLUDED_OSL_LOK_HXX
+#endif // INCLUDED_COMPHELPER_LOK_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/all/utility.cxx b/sal/osl/all/utility.cxx
index a84111ce7c36..25611ca3347f 100644
--- a/sal/osl/all/utility.cxx
+++ b/sal/osl/all/utility.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <osl/lok.hxx>
#include <osl/time.h>
/*
@@ -46,22 +45,6 @@ public:
static OGlobalTimer aGlobalTimer;
-namespace LibreOfficeKit
-{
-
-static bool bActive(false);
-
-void setActive()
-{
- bActive = true;
-}
-
-bool isActive()
-{
- return bActive;
-}
-
-} // namespace LibreOfficeKit
} // namespace osl
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/util/sal.map b/sal/util/sal.map
index c8bcdbab7699..2a87243e4813 100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -713,11 +713,6 @@ PRIVATE_textenc.1 { # LibreOffice 3.6
_ZN3sal6detail7textenc37handleBadInputUnicodeToTextConversion*;
};
-PRIVATE_4.5 { # LibreOffice 4.5
- _ZN3osl14LibreOfficeKit8isActive*;
- _ZN3osl14LibreOfficeKit9setActive*;
-};
-
# Unique libstdc++ symbols:
GLIBCXX_3.4 {
global: