summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-17 15:27:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-18 10:53:02 +0200
commit5cff38911cc8515b3223c658d8acc8c4c6b46399 (patch)
tree8f36f0c12af60a53936868f9bf2e459096660d92 /lingucomponent
parentcdd4b528a4d200aa322891373c80e2bc8e6cd16c (diff)
strip out trivial indirection
Change-Id: If025c6ed77faa52383609367169611c2a3e89360 Reviewed-on: https://gerrit.libreoffice.org/43473 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/Library_MacOSXSpell.mk1
-rw-r--r--lingucomponent/Library_hyphen.mk1
-rw-r--r--lingucomponent/Library_lnth.mk1
-rw-r--r--lingucomponent/Library_spell.mk1
-rw-r--r--lingucomponent/source/hyphenator/hyphen/hreg.cxx46
-rw-r--r--lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx10
-rw-r--r--lingucomponent/source/hyphenator/hyphen/hyphenimp.hxx3
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macreg.mm51
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx3
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macspellimp.mm10
-rw-r--r--lingucomponent/source/spellcheck/spell/sreg.cxx47
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx11
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.hxx3
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.cxx9
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.hxx3
-rw-r--r--lingucomponent/source/thesaurus/libnth/ntreg.cxx46
16 files changed, 28 insertions, 218 deletions
diff --git a/lingucomponent/Library_MacOSXSpell.mk b/lingucomponent/Library_MacOSXSpell.mk
index 493de33da846..f244673a1c4c 100644
--- a/lingucomponent/Library_MacOSXSpell.mk
+++ b/lingucomponent/Library_MacOSXSpell.mk
@@ -42,7 +42,6 @@ $(eval $(call gb_Library_use_externals,MacOSXSpell,\
))
$(eval $(call gb_Library_add_objcxxobjects,MacOSXSpell,\
- lingucomponent/source/spellcheck/macosxspell/macreg \
lingucomponent/source/spellcheck/macosxspell/macspellimp \
))
diff --git a/lingucomponent/Library_hyphen.mk b/lingucomponent/Library_hyphen.mk
index 6e771351de47..b1b6ea23ec87 100644
--- a/lingucomponent/Library_hyphen.mk
+++ b/lingucomponent/Library_hyphen.mk
@@ -41,7 +41,6 @@ $(eval $(call gb_Library_use_externals,hyphen,\
))
$(eval $(call gb_Library_add_exception_objects,hyphen,\
- lingucomponent/source/hyphenator/hyphen/hreg \
lingucomponent/source/hyphenator/hyphen/hyphenimp \
))
diff --git a/lingucomponent/Library_lnth.mk b/lingucomponent/Library_lnth.mk
index 500e1c8eef19..1351a2f406d8 100644
--- a/lingucomponent/Library_lnth.mk
+++ b/lingucomponent/Library_lnth.mk
@@ -43,7 +43,6 @@ $(eval $(call gb_Library_use_externals,lnth,\
$(eval $(call gb_Library_add_exception_objects,lnth,\
lingucomponent/source/thesaurus/libnth/nthesdta \
lingucomponent/source/thesaurus/libnth/nthesimp \
- lingucomponent/source/thesaurus/libnth/ntreg \
))
# vim: set noet sw=4 ts=4:
diff --git a/lingucomponent/Library_spell.mk b/lingucomponent/Library_spell.mk
index e7d8a318271a..fd55ca0ebc76 100644
--- a/lingucomponent/Library_spell.mk
+++ b/lingucomponent/Library_spell.mk
@@ -41,7 +41,6 @@ $(eval $(call gb_Library_use_externals,spell,\
))
$(eval $(call gb_Library_add_exception_objects,spell,\
- lingucomponent/source/spellcheck/spell/sreg \
lingucomponent/source/spellcheck/spell/sspellimp \
))
diff --git a/lingucomponent/source/hyphenator/hyphen/hreg.cxx b/lingucomponent/source/hyphenator/hyphen/hreg.cxx
deleted file mode 100644
index 853d904d5df8..000000000000
--- a/lingucomponent/source/hyphenator/hyphen/hreg.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- 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 .
- */
-
-#include <cppuhelper/factory.hxx>
-#include <rtl/string.hxx>
-
-#include <com/sun/star/registry/XRegistryKey.hpp>
-
-#include <hyphenimp.hxx>
-
-using namespace com::sun::star::lang;
-using namespace com::sun::star::registry;
-
-// definition of the two functions that are used to provide the services
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL hyphen_component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
-{
- void * pRet = Hyphenator_getFactory(
- pImplName,
- static_cast< XMultiServiceFactory * >( pServiceManager ) );
-
- return pRet;
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
index f4b1f86545f3..aa7e23ed160d 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
@@ -834,15 +834,18 @@ Sequence< OUString > Hyphenator::getSupportedServiceNames_Static()
return aSNS;
}
-void * SAL_CALL Hyphenator_getFactory( const sal_Char * pImplName,
- XMultiServiceFactory * pServiceManager )
+extern "C"
+{
+
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL hyphen_component_getFactory(
+ const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = nullptr;
if ( Hyphenator::getImplementationName_Static().equalsAscii( pImplName ) )
{
Reference< XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
- pServiceManager,
+ static_cast< XMultiServiceFactory * >( pServiceManager ),
Hyphenator::getImplementationName_Static(),
Hyphenator_CreateInstance,
Hyphenator::getSupportedServiceNames_Static());
@@ -853,4 +856,5 @@ void * SAL_CALL Hyphenator_getFactory( const sal_Char * pImplName,
return pRet;
}
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.hxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.hxx
index 75406e898831..94b1f294c787 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.hxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.hxx
@@ -129,9 +129,6 @@ inline OUString Hyphenator::getImplementationName_Static() throw()
return OUString( "org.openoffice.lingu.LibHnjHyphenator" );
}
-void * SAL_CALL Hyphenator_getFactory(
- char const * pImplName, css::lang::XMultiServiceFactory * pServiceManager);
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lingucomponent/source/spellcheck/macosxspell/macreg.mm b/lingucomponent/source/spellcheck/macosxspell/macreg.mm
deleted file mode 100644
index cce38184c969..000000000000
--- a/lingucomponent/source/spellcheck/macosxspell/macreg.mm
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- 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 .
- */
-
-
-
-#include <cppuhelper/factory.hxx>
-#include <rtl/string.hxx>
-
-#include <com/sun/star/registry/XRegistryKey.hpp>
-
-#include <macspellimp.hxx>
-
-using namespace com::sun::star::lang;
-using namespace com::sun::star::registry;
-
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL MacOSXSpell_component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
-{
- void * pRet = nullptr;
- pRet = MacSpellChecker_getFactory(
- pImplName,
- static_cast< XMultiServiceFactory * >( pServiceManager ),
- pRegistryKey );
-
- return pRet;
-}
-
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
index c489bee337f2..e0c075ecbc72 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
@@ -123,9 +123,6 @@ inline OUString MacSpellChecker::getImplementationName_Static() throw()
return OUString( "org.openoffice.lingu.MacOSXSpellChecker" );
}
-void * SAL_CALL MacSpellChecker_getFactory(
- char const * pImplName, XMultiServiceFactory * pServiceManager, void *);
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
index 4519e2a98fd7..145c45c3884e 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
@@ -523,15 +523,18 @@ Sequence< OUString > MacSpellChecker::getSupportedServiceNames_Static()
return aSNS;
}
-void * SAL_CALL MacSpellChecker_getFactory( const sal_Char * pImplName,
- XMultiServiceFactory * pServiceManager, void * )
+extern "C"
+{
+
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL MacOSXSpell_component_getFactory(
+ const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = nullptr;
if ( MacSpellChecker::getImplementationName_Static().equalsAscii( pImplName ) )
{
Reference< XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
- pServiceManager,
+ static_cast< XMultiServiceFactory * >( pServiceManager ),
MacSpellChecker::getImplementationName_Static(),
MacSpellChecker_CreateInstance,
MacSpellChecker::getSupportedServiceNames_Static());
@@ -542,6 +545,7 @@ void * SAL_CALL MacSpellChecker_getFactory( const sal_Char * pImplName,
return pRet;
}
+}
diff --git a/lingucomponent/source/spellcheck/spell/sreg.cxx b/lingucomponent/source/spellcheck/spell/sreg.cxx
deleted file mode 100644
index 2aa96896d360..000000000000
--- a/lingucomponent/source/spellcheck/spell/sreg.cxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- 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 .
- */
-
-#include <cppuhelper/factory.hxx>
-#include <rtl/string.hxx>
-
-#include <com/sun/star/registry/XRegistryKey.hpp>
-
-#include <sspellimp.hxx>
-
-using namespace com::sun::star::lang;
-using namespace com::sun::star::registry;
-
-// definition of the two functions that are used to provide the services
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL spell_component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
-{
- void * pRet = nullptr;
- pRet = SpellChecker_getFactory(
- pImplName,
- static_cast< XMultiServiceFactory * >( pServiceManager ) );
-
- return pRet;
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index e541a5ef314e..26f07978790f 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -667,15 +667,18 @@ Sequence< OUString > SpellChecker::getSupportedServiceNames_Static()
return aSNS;
}
-void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName,
- XMultiServiceFactory * pServiceManager )
+extern "C"
+{
+
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL spell_component_getFactory(
+ const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = nullptr;
if ( SpellChecker::getImplementationName_Static().equalsAscii( pImplName ) )
{
Reference< XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
- pServiceManager,
+ static_cast< XMultiServiceFactory * >( pServiceManager ),
SpellChecker::getImplementationName_Static(),
SpellChecker_CreateInstance,
SpellChecker::getSupportedServiceNames_Static());
@@ -686,4 +689,6 @@ void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName,
return pRet;
}
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.hxx b/lingucomponent/source/spellcheck/spell/sspellimp.hxx
index 285ab715ad0a..4a06ad6bfd6d 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.hxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.hxx
@@ -118,9 +118,6 @@ inline OUString SpellChecker::getImplementationName_Static() throw()
return OUString( "org.openoffice.lingu.MySpellSpellChecker" );
}
-void * SAL_CALL SpellChecker_getFactory(
- char const * pImplName, css::lang::XMultiServiceFactory * pServiceManager);
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 19906445ce0f..9c008ef4ad9d 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -634,8 +634,10 @@ Sequence< OUString > Thesaurus::getSupportedServiceNames_Static()
return aSNS;
}
-void * SAL_CALL Thesaurus_getFactory( const sal_Char * pImplName,
- XMultiServiceFactory * pServiceManager )
+extern "C"
+{
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL lnth_component_getFactory(
+ const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = nullptr;
if ( Thesaurus::getImplementationName_Static().equalsAscii( pImplName ) )
@@ -643,7 +645,7 @@ void * SAL_CALL Thesaurus_getFactory( const sal_Char * pImplName,
Reference< XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
- pServiceManager,
+ static_cast< XMultiServiceFactory * >( pServiceManager ),
Thesaurus::getImplementationName_Static(),
Thesaurus_CreateInstance,
Thesaurus::getSupportedServiceNames_Static());
@@ -653,5 +655,6 @@ void * SAL_CALL Thesaurus_getFactory( const sal_Char * pImplName,
}
return pRet;
}
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx
index 17f1249c1b11..bd9e1c4082f7 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx
@@ -130,9 +130,6 @@ inline OUString Thesaurus::getImplementationName_Static() throw()
return OUString( "org.openoffice.lingu.new.Thesaurus" );
}
-void * SAL_CALL Thesaurus_getFactory(
- char const * pImplName, css::lang::XMultiServiceFactory * pServiceManager);
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lingucomponent/source/thesaurus/libnth/ntreg.cxx b/lingucomponent/source/thesaurus/libnth/ntreg.cxx
deleted file mode 100644
index f83ecb28b972..000000000000
--- a/lingucomponent/source/thesaurus/libnth/ntreg.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- 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 .
- */
-
-#include <cppuhelper/factory.hxx>
-#include <rtl/string.hxx>
-
-#include <com/sun/star/registry/XRegistryKey.hpp>
-
-#include <nthesimp.hxx>
-
-using namespace com::sun::star::lang;
-using namespace com::sun::star::registry;
-
-// definition of the two functions that are used to provide the services
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL lnth_component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
-{
- void * pRet = Thesaurus_getFactory(
- pImplName,
- static_cast< XMultiServiceFactory * >( pServiceManager ) );
-
- return pRet;
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */