[Libreoffice-commits] core.git: comphelper/Library_comphelper.mk comphelper/source desktop/source include/comphelper include/osl sal/osl sal/util
Tor Lillqvist
tml at collabora.com
Thu Apr 2 03:29:28 PDT 2015
comphelper/Library_comphelper.mk | 1
comphelper/source/misc/lok.cxx | 34 +++++++++++++++++++++++++++++++++
desktop/source/app/officeipcthread.cxx | 6 ++---
desktop/source/lib/init.cxx | 4 +--
include/comphelper/lok.hxx | 30 +++++++++++++++++++++++++++++
include/osl/lok.hxx | 34 ---------------------------------
sal/osl/all/utility.cxx | 17 ----------------
sal/util/sal.map | 5 ----
8 files changed, 70 insertions(+), 61 deletions(-)
New commits:
commit cbd8587ffb4b4e01705fc7f07fc4740382b78a08
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Apr 2 13:22:04 2015 +0300
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
diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk
index e36fe31..2192217 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 0000000..71bc922
--- /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 8c0ac21..d148b8a 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 339e3fd..450757a 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
similarity index 63%
rename from include/osl/lok.hxx
rename to include/comphelper/lok.hxx
index 3b241ef..8ddfb5a 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 a84111c..25611ca 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 c8bcdba..2a87243 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:
More information about the Libreoffice-commits
mailing list