linguistic/source/convdiclist.cxx |   19 +++++-----
 linguistic/source/convdicxml.cxx  |   10 -----
 linguistic/source/dicimp.cxx      |   10 -----
 linguistic/source/dlistimp.cxx    |    1 
 linguistic/source/gciterator.cxx  |    1 
 linguistic/source/lngopt.cxx      |    1 
 linguistic/source/lngreg.cxx      |   38 +--------------------
 linguistic/source/lngreg.hxx      |   68 ++++++++++++++++++++++++++++++++++++++
 linguistic/source/lngsvcmgr.cxx   |    9 ++---
 linguistic/source/spelldsp.cxx    |    8 +---
 10 files changed, 89 insertions(+), 76 deletions(-)

New commits:
commit 5d81ecff7e81fd7f8b2c19294f220dd7f9ce6166
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Wed Apr 9 12:25:20 2014 +0200

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

diff --git a/linguistic/source/convdiclist.cxx 
b/linguistic/source/convdiclist.cxx
index 20e3dd7..4501670 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <boost/noncopyable.hpp>
 #include <com/sun/star/container/XNameContainer.hpp>
 #include <com/sun/star/lang/Locale.hpp>
 #include <com/sun/star/linguistic2/ConversionDictionaryType.hpp>
@@ -41,6 +44,7 @@
 #include "convdiclist.hxx"
 #include "defs.hxx"
 #include "hhconvdic.hxx"
+#include "lngreg.hxx"
 #include "linguistic/misc.hxx"
 
 using namespace osl;
@@ -81,19 +85,15 @@ class ConvDicNameContainer :
     public cppu::WeakImplHelper1
     <
         ::com::sun::star::container::XNameContainer
-    >
+    >,
+    private boost::noncopyable
 {
     uno::Sequence< uno::Reference< XConversionDictionary > >   aConvDics;
-    ConvDicList     &rConvDicList;
-
-    // disallow copy-constructor and assignment-operator for now
-    ConvDicNameContainer(const ConvDicNameContainer &);
-    ConvDicNameContainer & operator = (const ConvDicNameContainer &);
 
     sal_Int32 GetIndexByName_Impl( const OUString& rName );
 
 public:
-    ConvDicNameContainer( ConvDicList &rMyConvDicList );
+    ConvDicNameContainer();
     virtual ~ConvDicNameContainer();
 
     // XElementAccess
@@ -128,8 +128,7 @@ public:
     }
 };
 
-ConvDicNameContainer::ConvDicNameContainer( ConvDicList &rMyConvDicList ) :
-    rConvDicList( rMyConvDicList )
+ConvDicNameContainer::ConvDicNameContainer()
 {
 }
 
@@ -403,7 +402,7 @@ ConvDicNameContainer & ConvDicList::GetNameContainer()
 {
     if (!pNameContainer)
     {
-        pNameContainer = new ConvDicNameContainer( *this );
+        pNameContainer = new ConvDicNameContainer;
         pNameContainer->AddConvDics( GetDictionaryWriteablePath(), 
OUString(CONV_DIC_EXT)  );
         xNameContainer = pNameContainer;
 
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index 2bd7769..6b7fb27 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -92,11 +92,6 @@ public:
     {
     }
 
-    const ConvDicXMLImport & GetConvDicImport() const
-    {
-        return (const ConvDicXMLImport &) GetImport();
-    }
-
     ConvDicXMLImport & GetConvDicImport()
     {
         return (ConvDicXMLImport &) GetImport();
@@ -126,9 +121,6 @@ public:
     // SvXMLImportContext
     virtual void StartElement( const ::com::sun::star::uno::Reference< 
::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
     virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const 
OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > 
&rxAttrList ) SAL_OVERRIDE;
-
-    sal_Int16       GetLanguage() const         { return nLanguage; }
-    sal_Int16   GetConversionType() const   { return nConversionType; }
 };
 
 
@@ -152,8 +144,6 @@ public:
     virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const 
OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > 
&rxAttrList ) SAL_OVERRIDE;
 
     const OUString &    GetLeftText() const { return aLeftText; }
-    sal_Int16           GetPropertyType() const { return nPropertyType; }
-    void                SetPropertyType( sal_Int16 nVal )   { nPropertyType = 
nVal; }
 };
 
 
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 5e3c0fd..ffab959 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -751,16 +751,6 @@ sal_Bool DictionaryNeo::addEntry_Impl(const 
uno::Reference< XDictionaryEntry > x
     return bRes;
 }
 
-
-uno::Reference< XInterface > SAL_CALL DictionaryNeo_CreateInstance(
-            const uno::Reference< XMultiServiceFactory > & /*rSMgr*/ )
-        throw(Exception)
-{
-    uno::Reference< XInterface > xService =
-            (cppu::OWeakObject*) new DictionaryNeo;
-    return xService;
-}
-
 OUString SAL_CALL DictionaryNeo::getName(  )
         throw(RuntimeException, std::exception)
 {
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 994ddd1..9b161db 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -41,6 +41,7 @@
 #include "dlistimp.hxx"
 #include "dicimp.hxx"
 #include "lngopt.hxx"
+#include "lngreg.hxx"
 
 using namespace osl;
 using namespace com::sun::star;
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 6f01230..573dfd0 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -64,6 +64,7 @@
 #include "linguistic/misc.hxx"
 #include "defs.hxx"
 #include "lngopt.hxx"
+#include "lngreg.hxx"
 
 #include "gciterator.hxx"
 
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 036733d..fb5bcff 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -20,6 +20,7 @@
 
 #include <sal/macros.h>
 #include "lngopt.hxx"
+#include "lngreg.hxx"
 #include "linguistic/lngprops.hxx"
 #include "linguistic/misc.hxx"
 #include <tools/debug.hxx>
diff --git a/linguistic/source/lngreg.cxx b/linguistic/source/lngreg.cxx
index 02437a4..deb427d 100644
--- a/linguistic/source/lngreg.cxx
+++ b/linguistic/source/lngreg.cxx
@@ -22,46 +22,12 @@
 
 #include <com/sun/star/registry/XRegistryKey.hpp>
 
+#include <lngreg.hxx>
+
 using namespace com::sun::star::lang;
 
 using namespace com::sun::star::registry;
 
-extern void * SAL_CALL LngSvcMgr_getFactory
-(
-    const sal_Char * pImplName,
-    XMultiServiceFactory * pServiceManager,
-    void * /*pRegistryKey*/
-);
-
-extern void * SAL_CALL DicList_getFactory
-(
-    const sal_Char * pImplName,
-    XMultiServiceFactory * pServiceManager,
-    void *
-);
-
-void * SAL_CALL LinguProps_getFactory
-(
-    const sal_Char * pImplName,
-    XMultiServiceFactory * pServiceManager,
-    void *
-);
-
-extern void * SAL_CALL ConvDicList_getFactory
-(
-    const sal_Char * pImplName,
-    XMultiServiceFactory * pServiceManager,
-    void *
-);
-
-extern void * SAL_CALL GrammarCheckingIterator_getFactory
-(
-    const sal_Char * pImplName,
-    XMultiServiceFactory * pServiceManager,
-    void *
-);
-
-
 extern "C"
 {
 
diff --git a/linguistic/source/lngreg.hxx b/linguistic/source/lngreg.hxx
new file mode 100644
index 0000000..370e079b
--- /dev/null
+++ b/linguistic/source/lngreg.hxx
@@ -0,0 +1,68 @@
+/* -*- 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_LINGUISTIC_SOURCE_LNGREG_HXX
+#define INCLUDED_LINGUISTIC_SOURCE_LNGREG_HXX
+
+#include <sal/config.h>
+
+#include <sal/types.h>
+
+namespace com { namespace sun { namespace star { namespace lang {
+    class XMultiServiceFactory;
+} } } }
+
+extern void * SAL_CALL LngSvcMgr_getFactory
+(
+    const sal_Char * pImplName,
+    css::lang::XMultiServiceFactory * pServiceManager,
+    void * /*pRegistryKey*/
+);
+
+extern void * SAL_CALL DicList_getFactory
+(
+    const sal_Char * pImplName,
+    css::lang::XMultiServiceFactory * pServiceManager,
+    void *
+);
+
+void * SAL_CALL LinguProps_getFactory
+(
+    const sal_Char * pImplName,
+    css::lang::XMultiServiceFactory * pServiceManager,
+    void *
+);
+
+extern void * SAL_CALL ConvDicList_getFactory
+(
+    const sal_Char * pImplName,
+    css::lang::XMultiServiceFactory * pServiceManager,
+    void *
+);
+
+extern void * SAL_CALL GrammarCheckingIterator_getFactory
+(
+    const sal_Char * pImplName,
+    css::lang::XMultiServiceFactory * pServiceManager,
+    void *
+);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index a5f57d9..1284d95 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -35,9 +35,11 @@
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <boost/checked_delete.hpp>
+#include <boost/noncopyable.hpp>
 
 #include "lngsvcmgr.hxx"
 #include "lngopt.hxx"
+#include "lngreg.hxx"
 #include "linguistic/misc.hxx"
 #include "spelldsp.hxx"
 #include "hyphdsp.hxx"
@@ -178,7 +180,8 @@ class LngSvcMgrListenerHelper :
     <
         linguistic2::XLinguServiceEventListener,
         linguistic2::XDictionaryListEventListener
-    >
+    >,
+    private boost::noncopyable
 {
     LngSvcMgr  &rMyManager;
 
@@ -188,10 +191,6 @@ class LngSvcMgrListenerHelper :
 
     sal_Int16   nCombinedLngSvcEvt;
 
-    // disallow copy-constructor and assignment-operator for now
-    LngSvcMgrListenerHelper(const LngSvcMgrListenerHelper &);
-    LngSvcMgrListenerHelper & operator = (const LngSvcMgrListenerHelper &);
-
     void    LaunchEvent( sal_Int16 nLngSvcEvtFlags );
 
     long Timeout();
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index 3ea7d5f..f2e7ce8 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -17,7 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
 
+#include <boost/noncopyable.hpp>
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
 #include <com/sun/star/linguistic2/SpellFailure.hpp>
@@ -53,16 +55,12 @@ using namespace linguistic;
 // Removing entries is done by assigning the empty string.
 // The sequence is constructed from all non empty strings in the original
 // while maintaining the order.
-class ProposalList
+class ProposalList: private boost::noncopyable
 {
     std::vector< OUString > aVec;
 
     sal_Bool    HasEntry( const OUString &rText ) const;
 
-    // make copy c-tor and assignment operator private
-    ProposalList( const ProposalList & );
-    ProposalList & operator = ( const ProposalList & );
-
 public:
     ProposalList()  {}
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to