[Libreoffice-commits] core.git: desktop/inc desktop/source desktop/unx

Stephan Bergmann sbergman at redhat.com
Sun Apr 13 14:27:23 PDT 2014


 desktop/inc/app.hxx                                          |    4 
 desktop/source/app/dispatchwatcher.cxx                       |    8 -
 desktop/source/deployment/gui/dp_gui_dialog2.cxx             |    1 
 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx   |    1 
 desktop/source/deployment/gui/dp_gui_updatedialog.cxx        |    6 -
 desktop/source/deployment/gui/license_dialog.cxx             |    3 
 desktop/source/deployment/inc/dp_package.hxx                 |   45 +++++++++++
 desktop/source/deployment/inc/dp_registry.hxx                |   43 ++++++++++
 desktop/source/deployment/manager/dp_informationprovider.cxx |    3 
 desktop/source/deployment/manager/dp_manager.cxx             |    8 -
 desktop/source/deployment/misc/dp_descriptioninfoset.cxx     |    9 --
 desktop/source/deployment/registry/dp_registry.cxx           |   12 --
 desktop/source/deployment/registry/package/dp_package.cxx    |    1 
 desktop/source/lib/init.cxx                                  |    4 
 desktop/source/migration/services/jvmfwk.cxx                 |    5 -
 desktop/source/pkgchk/unopkg/unopkg_misc.cxx                 |    2 
 desktop/unx/source/pagein.c                                  |    3 
 desktop/unx/source/pagein.h                                  |   29 +++++++
 desktop/unx/source/start.c                                   |    4 
 19 files changed, 138 insertions(+), 53 deletions(-)

New commits:
commit f5051821bc5da0fa7b3de78d21aee305fce3d46b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sun Apr 13 23:26:48 2014 +0200

    Clean up function declarations and some unused functions
    
    Change-Id: Ie35d71a03d2f89cd72836db21fac8746a9e85b09

diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 4b17159..67fc3fb 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -22,6 +22,7 @@
 
 // stl includes first
 #include <map>
+#include <boost/optional.hpp>
 #include <boost/scoped_ptr.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <vcl/svapp.hxx>
@@ -188,6 +189,9 @@ class Desktop : public Application
         static ResMgr*          pResMgr;
 };
 
+OUString GetURL_Impl(
+    const OUString& rName, boost::optional< OUString > const & cwdUrl );
+
 }
 
 #endif // INCLUDED_DESKTOP_INC_APP_HXX
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 6067c34..5b0e270 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -25,6 +25,7 @@
 #include "sfx2/app.hxx"
 #include <svl/fstathelper.hxx>
 
+#include "app.hxx"
 #include "dispatchwatcher.hxx"
 #include <rtl/ustring.hxx>
 #include <comphelper/processfactory.hxx>
@@ -67,9 +68,6 @@ using namespace ::com::sun::star::task;
 namespace desktop
 {
 
-OUString GetURL_Impl(
-    const OUString& rName, boost::optional< OUString > const & cwdUrl );
-
 struct DispatchHolder
 {
     DispatchHolder( const URL& rURL, Reference< XDispatch >& rDispatch ) :
@@ -163,7 +161,7 @@ DispatchWatcher::~DispatchWatcher()
 
 sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequestsList, bool bNoTerminate )
 {
-    Reference< XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
+    Reference< XDesktop2 > xDesktop = css::frame::Desktop::create( ::comphelper::getProcessComponentContext() );
 
     DispatchList::const_iterator    p;
     std::vector< DispatchHolder >   aDispatches;
@@ -628,7 +626,7 @@ void SAL_CALL DispatchWatcher::dispatchFinished( const DispatchResultEvent& ) th
     if ( !nCount && !OfficeIPCThread::AreRequestsPending() )
     {
         // We have to check if we have an open task otherwise we have to shutdown the office.
-        Reference< XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
+        Reference< XDesktop2 > xDesktop = css::frame::Desktop::create( ::comphelper::getProcessComponentContext() );
         Reference< XElementAccess > xList( xDesktop->getFrames(), UNO_QUERY );
 
         if ( !xList->hasElements() )
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 4bacb56..4b26288 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -136,7 +136,6 @@ class ExtBoxWithBtns_Impl : public ExtensionBox_Impl
     DECL_DLLPRIVATE_LINK( HandleOptionsBtn, void * );
     DECL_DLLPRIVATE_LINK( HandleEnableBtn, void * );
     DECL_DLLPRIVATE_LINK( HandleRemoveBtn, void * );
-    DECL_DLLPRIVATE_LINK( HandleHyperlink, FixedHyperlink * );
 
 public:
                     ExtBoxWithBtns_Impl(Window* pParent);
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 4dcf946..6808f99 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -155,7 +155,6 @@ public:
 
     Dialog * activeDialog() { return m_pDialogHelper ? m_pDialogHelper->getWindow() : NULL; }
 
-    void setTitle( const OUString& rNewTitle ) { m_sTitle = rNewTitle; }
     void startProgress();
     void stopProgress();
     void progressSection( const OUString &rText,
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 870636c..b71cc23 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -218,12 +218,6 @@ private:
         uno::Reference< deployment::XPackage > const & package,
         uno::Any const & exception) const;
 
-    uno::Sequence< uno::Reference< xml::dom::XElement > >
-    getUpdateInformation(
-        uno::Reference< deployment::XPackage > const & package,
-        uno::Sequence< OUString > const & urls,
-        OUString const & identifier) const;
-
     OUString getUpdateDisplayString(
         dp_gui::UpdateData const & data, OUString const & version = OUString()) const;
 
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index 9758d80..50a5f96 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -62,13 +62,10 @@ public:
 
     sal_Bool IsEndReached() const;
     sal_Bool EndReached() const { return mbEndReached; }
-    void SetEndReached( sal_Bool bEnd ) { mbEndReached = bEnd; }
 
     void SetEndReachedHdl( const Link& rHdl )  { maEndReachedHdl = rHdl; }
-    const Link& GetAutocompleteHdl() const { return maEndReachedHdl; }
 
     void SetScrolledHdl( const Link& rHdl )  { maScrolledHdl = rHdl; }
-    const Link& GetScrolledHdl() const { return maScrolledHdl; }
 
     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
 
diff --git a/desktop/source/deployment/inc/dp_package.hxx b/desktop/source/deployment/inc/dp_package.hxx
new file mode 100644
index 0000000..579b008
--- /dev/null
+++ b/desktop/source/deployment/inc/dp_package.hxx
@@ -0,0 +1,45 @@
+/* -*- 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_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_PACKAGE_HXX
+#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_PACKAGE_HXX
+
+#include <sal/config.h>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <rtl/ustring.hxx>
+
+namespace com { namespace sun { namespace star {
+    namespace deployment { class XPackageRegistry; }
+    namespace uno { class XComponentContext; }
+} } }
+
+namespace dp_registry { namespace backend { namespace bundle {
+
+css::uno::Reference<css::deployment::XPackageRegistry> create(
+    css::uno::Reference<css::deployment::XPackageRegistry> const &
+        xRootRegistry,
+    OUString const & context, OUString const & cachePath, bool readOnly,
+    css::uno::Reference<css::uno::XComponentContext> const & xComponentContext);
+
+} } }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_registry.hxx b/desktop/source/deployment/inc/dp_registry.hxx
new file mode 100644
index 0000000..347359e
--- /dev/null
+++ b/desktop/source/deployment/inc/dp_registry.hxx
@@ -0,0 +1,43 @@
+/* -*- 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_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_REGISTRY_HXX
+#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_REGISTRY_HXX
+
+#include <sal/config.h>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <rtl/ustring.hxx>
+
+namespace com { namespace sun { namespace star {
+    namespace deployment { class XPackageRegistry; }
+    namespace uno { class XComponentContext; }
+} } }
+
+namespace dp_registry {
+
+css::uno::Reference<css::deployment::XPackageRegistry> create(
+    OUString const & context, OUString const & cachePath, bool readOnly,
+    css::uno::Reference<css::uno::XComponentContext> const & xComponentContext);
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index 1ef2a14..2a3b7cf 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -64,9 +64,6 @@ class PackageInformationProvider :
                  PackageInformationProvider( uno::Reference< uno::XComponentContext >const& xContext);
     virtual     ~PackageInformationProvider();
 
-    static uno::Sequence< OUString > getServiceNames();
-    static OUString getImplName();
-
     // XPackageInformationProvider
     virtual OUString SAL_CALL getPackageLocation( const OUString& extensionId )
         throw ( uno::RuntimeException, std::exception ) SAL_OVERRIDE;
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index c5c8fba..0b460e8 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -19,6 +19,7 @@
 
 #include <config_features.h>
 
+#include "dp_registry.hxx"
 #include "dp_ucb.h"
 #include "dp_resource.h"
 #include "dp_platform.hxx"
@@ -70,13 +71,6 @@ namespace dp_log {
 extern comphelper::service_decl::ServiceDecl const serviceDecl;
 }
 
-namespace dp_registry {
-Reference<deployment::XPackageRegistry> create(
-    OUString const & context,
-    OUString const & cachePath, bool readOnly,
-    Reference<XComponentContext> const & xComponentContext );
-}
-
 namespace dp_manager {
 
 struct MatchTempDir
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 6b51b98..d22d8c5 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -26,6 +26,7 @@
 #include "comphelper/seqstream.hxx"
 #include "comphelper/makesequence.hxx"
 #include "comphelper/processfactory.hxx"
+#include "boost/noncopyable.hpp"
 #include "boost/optional.hpp"
 #include "com/sun/star/configuration/theDefaultProvider.hpp"
 #include "com/sun/star/container/XNameAccess.hpp"
@@ -58,7 +59,9 @@ namespace {
 
 using css::uno::Reference;
 
-class EmptyNodeList: public ::cppu::WeakImplHelper1< css::xml::dom::XNodeList >
+class EmptyNodeList:
+    public cppu::WeakImplHelper1<css::xml::dom::XNodeList>,
+    private boost::noncopyable
 {
 public:
     EmptyNodeList();
@@ -69,10 +72,6 @@ public:
 
     virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL
     item(::sal_Int32 index) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
-private:
-    EmptyNodeList(EmptyNodeList &); // not defined
-    void operator =(EmptyNodeList &); // not defined
 };
 
 EmptyNodeList::EmptyNodeList() {}
diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx
index 998d6b5..0c98858 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -17,8 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
 
+#include "dp_package.hxx"
 #include "dp_registry.hrc"
+#include "dp_registry.hxx"
 #include "dp_misc.h"
 #include "dp_resource.h"
 #include "dp_interact.h"
@@ -51,15 +54,6 @@ using namespace ::com::sun::star::ucb;
 
 namespace dp_registry {
 
-namespace backend {
-namespace bundle {
-Reference<deployment::XPackageRegistry> create(
-    Reference<deployment::XPackageRegistry> const & xRootRegistry,
-    OUString const & context, OUString const & cachePath, bool readOnly,
-    Reference<XComponentContext> const & xComponentContext );
-}
-}
-
 namespace {
 
 typedef ::cppu::WeakComponentImplHelper2<
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 8944ba6..687793d 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -19,6 +19,7 @@
 
 
 #include "dp_package.hrc"
+#include "dp_package.hxx"
 #include "dp_backend.h"
 #include "dp_ucb.h"
 #include "dp_interact.h"
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a965be7..da4b854 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -126,8 +126,6 @@ static OUString getAbsoluteURL(const char* pURL)
 extern "C"
 {
 
-SAL_DLLPUBLIC_EXPORT LibreOffice *liblibreoffice_hook(void);
-
 static void doc_destroy(LibreOfficeDocument* pThis);
 static int  doc_saveAs(LibreOfficeDocument* pThis, const char* pUrl, const char* pFormat);
 static int  doc_saveAsWithOptions(LibreOfficeDocument* pThis, const char* pUrl, const char* pFormat, const char* pFilterOptions);
@@ -389,7 +387,7 @@ static int lo_initialize(LibreOffice* pThis, const char* pAppPath)
     return bInitialized;
 }
 
-LibreOffice *liblibreoffice_hook(void)
+SAL_DLLPUBLIC_EXPORT LibreOffice *liblibreoffice_hook(void)
 {
     if (!gImpl)
     {
diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx
index 00b4678..c4420e5 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -27,6 +27,7 @@
 #include "rtl/bootstrap.hxx"
 #include "sal/types.h"
 #include "sal/config.h"
+#include "boost/noncopyable.hpp"
 #include "boost/scoped_array.hpp"
 #include "com/sun/star/lang/XServiceInfo.hpp"
 #include "com/sun/star/lang/XInitialization.hpp"
@@ -57,10 +58,8 @@ using namespace com::sun::star::configuration::backend;
 namespace migration
 {
 
-class CJavaInfo
+class CJavaInfo: private boost::noncopyable
 {
-    CJavaInfo(const CJavaInfo&);
-    CJavaInfo& operator = (const CJavaInfo&);
 public:
     JavaInfo* pData;
     CJavaInfo();
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index c422e4a..2e1fbcb 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -47,8 +47,6 @@ using namespace ::com::sun::star::ucb;
 
 namespace unopkg {
 
-bool getLockFilePath(OUString & out);
-
 OUString toString( OptionInfo const * info )
 {
     OSL_ASSERT( info != 0 );
diff --git a/desktop/unx/source/pagein.c b/desktop/unx/source/pagein.c
index ef1f932..6ffa07b 100644
--- a/desktop/unx/source/pagein.c
+++ b/desktop/unx/source/pagein.c
@@ -18,6 +18,7 @@
  */
 
 #include "file_image.h"
+#include "pagein.h"
 
 #include <unistd.h>
 #include <errno.h>
@@ -49,8 +50,6 @@ cleanup_and_leave:
     return (result);
 }
 
-extern int pagein_execute (int argc, char **argv);
-
 /* main */
 int pagein_execute (int argc, char **argv)
 {
diff --git a/desktop/unx/source/pagein.h b/desktop/unx/source/pagein.h
new file mode 100644
index 0000000..929bab8
--- /dev/null
+++ b/desktop/unx/source/pagein.h
@@ -0,0 +1,29 @@
+/* -*- 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_DESKTOP_UNX_SOURCE_PAGEIN_H
+#define INCLUDED_DESKTOP_UNX_SOURCE_PAGEIN_H
+
+#include <sal/config.h>
+
+int pagein_execute(int argc, char **argv);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 77464b1..13be4a4 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -35,6 +35,7 @@
 
 #include "args.h"
 #include "../../source/inc/exithelper.h"
+#include "pagein.h"
 #include "splashx.h"
 
 #define PIPEDEFAULTPATH      "/tmp"
@@ -598,9 +599,6 @@ system_checks( void )
 #endif
 }
 
-/* re-use the pagein code */
-extern int pagein_execute (int argc, char **argv);
-
 static char *build_pagein_path (Args *args, const char *pagein_name)
 {
     char *path;


More information about the Libreoffice-commits mailing list