summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-09 12:25:20 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-09 12:25:20 +0200
commit5d81ecff7e81fd7f8b2c19294f220dd7f9ce6166 (patch)
tree2a8f09848bc1f48a70aa6b544412687e8e4d2f49 /linguistic
parent19644e657d1ccfa6cd9f57524cb77beb47161ae7 (diff)
Clean up function declarations and some unused functions
Change-Id: I9e58a0bc56f5df40621185f19b01edf074558464
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/convdiclist.cxx19
-rw-r--r--linguistic/source/convdicxml.cxx10
-rw-r--r--linguistic/source/dicimp.cxx10
-rw-r--r--linguistic/source/dlistimp.cxx1
-rw-r--r--linguistic/source/gciterator.cxx1
-rw-r--r--linguistic/source/lngopt.cxx1
-rw-r--r--linguistic/source/lngreg.cxx38
-rw-r--r--linguistic/source/lngreg.hxx68
-rw-r--r--linguistic/source/lngsvcmgr.cxx9
-rw-r--r--linguistic/source/spelldsp.cxx8
10 files changed, 89 insertions, 76 deletions
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index 20e3dd75136a..4501670ef792 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 2bd7769de16f..6b7fb27e46f8 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 5e3c0fdd53c0..ffab959e8752 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 994ddd10e33d..9b161db7e4e3 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 6f0123025dbf..573dfd0f5983 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 036733d48130..fb5bcff2ea42 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 02437a42af35..deb427dd2af4 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 000000000000..370e079ba1d0
--- /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 a5f57d9775ac..1284d9512e82 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 3ea7d5f4f40b..f2e7ce898bb0 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() {}