diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:54:22 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:54:22 +0200 |
commit | c28c3b962e5e7ba0fc09627a98d01143b7e1c5fd (patch) | |
tree | ecba4bf1fa015274975550489246f7fb826c3d92 /lingucomponent | |
parent | 17a09feea5ed9c93cde886dabf12e498a30a52bc (diff) | |
parent | 840db100e2bac521dcee8c4932a5f69487116155 (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
lingucomponent/source/spellcheck/spell/sspellimp.cxx
setup_native/prj/build.lst
setup_native/prj/d.lst
wizards/Jar_query.mk
wizards/Module_wizards.mk
wizards/Zip_launcher.mk
wizards/com/sun/star/wizards/report/makefile.mk
wizards/prj/build.lst
wizards/prj/d.lst
wizards/util/target.pmk
Diffstat (limited to 'lingucomponent')
31 files changed, 186 insertions, 209 deletions
diff --git a/lingucomponent/inc/pch/precompiled_lingucomponent.cxx b/lingucomponent/inc/pch/precompiled_lingucomponent.cxx index 5e9246aec..250f31762 100644 --- a/lingucomponent/inc/pch/precompiled_lingucomponent.cxx +++ b/lingucomponent/inc/pch/precompiled_lingucomponent.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,3 +28,4 @@ #include "precompiled_lingucomponent.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/inc/pch/precompiled_lingucomponent.hxx b/lingucomponent/inc/pch/precompiled_lingucomponent.hxx index debf1b13e..0aeb34493 100644 --- a/lingucomponent/inc/pch/precompiled_lingucomponent.hxx +++ b/lingucomponent/inc/pch/precompiled_lingucomponent.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,3 +32,4 @@ #include <tools/debug.hxx> #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/prj/d.lst b/lingucomponent/prj/d.lst index 4760a299c..690135049 100644 --- a/lingucomponent/prj/d.lst +++ b/lingucomponent/prj/d.lst @@ -1,53 +1,53 @@ -..\%__SRC%\bin\*.dat %_DEST%\bin%_EXT%\*.dat -..\%__SRC%\bin\*.idx %_DEST%\bin%_EXT%\*.idx -..\%__SRC%\bin\*.aff %_DEST%\bin%_EXT%\*.aff -..\%__SRC%\bin\*.dic %_DEST%\bin%_EXT%\*.dic -..\%__SRC%\bin\*.lst %_DEST%\bin%_EXT%\*.lst - -..\%__SRC%\bin\lnth* %_DEST%\bin%_EXT%\lnth* -..\%__SRC%\lib\ilnth* %_DEST%\lib%_EXT%\ilnth* -..\%__SRC%\lib\liblnth.a %_DEST%\lib%_EXT%\liblnth.a -..\%__SRC%\lib\liblnth*.dylib %_DEST%\lib%_EXT%\liblnth*.dylib -..\%__SRC%\lib\liblnth*.so %_DEST%\lib%_EXT%\liblnth*.so - -..\%__SRC%\bin\spell* %_DEST%\bin%_EXT%\spell* -..\%__SRC%\lib\ilspell* %_DEST%\lib%_EXT%\ilspell* -..\%__SRC%\lib\libspell*.dylib %_DEST%\lib%_EXT%\libspell*.dylib -..\%__SRC%\lib\libspell*.so %_DEST%\lib%_EXT%\libspell*.so - -..\%__SRC%\bin\hunspell* %_DEST%\bin%_EXT%\hunspell* -..\%__SRC%\lib\ilhunspell* %_DEST%\lib%_EXT%\ilhunspell* -..\%__SRC%\lib\libhunspell*.dylib %_DEST%\lib%_EXT%\libhunspell*.dylib -..\%__SRC%\lib\libhunspell*.so %_DEST%\lib%_EXT%\libhunspell*.so - -..\%__SRC%\bin\hyph* %_DEST%\bin%_EXT%\hyph* -..\%__SRC%\lib\ihyph* %_DEST%\lib%_EXT%\ihyph* -..\%__SRC%\lib\libhnj.* %_DEST%\lib%_EXT%\libhnj.* -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib -..\%__SRC%\lib\libhyphen*.so %_DEST%\lib%_EXT%\libhyphen*.so - -..\%__SRC%\bin\ulingu* %_DEST%\bin%_EXT%\ulingu* -..\%__SRC%\lib\ilulingu* %_DEST%\lib%_EXT%\iulingu* -..\%__SRC%\lib\libulingu.a %_DEST%\lib%_EXT%\libulingu.a -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib - -..\%__SRC%\bin\guesslan* %_DEST%\bin%_EXT%\guesslan* -..\%__SRC%\lib\iguesslang* %_DEST%\lib%_EXT%\iguesslang* -..\%__SRC%\lib\libguesslang*.dylib %_DEST%\lib%_EXT%\libguesslang*.dylib -..\%__SRC%\lib\libguesslang*.so %_DEST%\lib%_EXT%\libguesslang*.so - -..\%__SRC%\lib\libMacOSXSpell*.dylib %_DEST%\lib%_EXT%\libMacOSXSpell*.dylib - - -mkdir: %_DEST%\xml%_EXT%\registry -mkdir: %_DEST%\xml%_EXT%\registry\data -mkdir: %_DEST%\xml%_EXT%\registry\data\org -mkdir: %_DEST%\xml%_EXT%\registry\data\org\openoffice -mkdir: %_DEST%\xml%_EXT%\registry\data\org\openoffice\Office -..\config\*.xcu %_DEST%\xml%_EXT%\registry\data\org\openoffice\Office\*.xcu - -..\%__SRC%\misc\MacOSXSpell.component %_DEST%\xml%_EXT%\MacOSXSpell.component -..\%__SRC%\misc\guesslang.component %_DEST%\xml%_EXT%\guesslang.component -..\%__SRC%\misc\hyphen.component %_DEST%\xml%_EXT%\hyphen.component -..\%__SRC%\misc\lnth.component %_DEST%\xml%_EXT%\lnth.component -..\%__SRC%\misc\spell.component %_DEST%\xml%_EXT%\spell.component +..\%__SRC%\bin\*.dat %_DEST%\bin\*.dat +..\%__SRC%\bin\*.idx %_DEST%\bin\*.idx +..\%__SRC%\bin\*.aff %_DEST%\bin\*.aff +..\%__SRC%\bin\*.dic %_DEST%\bin\*.dic +..\%__SRC%\bin\*.lst %_DEST%\bin\*.lst + +..\%__SRC%\bin\lnth* %_DEST%\bin\lnth* +..\%__SRC%\lib\ilnth* %_DEST%\lib\ilnth* +..\%__SRC%\lib\liblnth.a %_DEST%\lib\liblnth.a +..\%__SRC%\lib\liblnth*.dylib %_DEST%\lib\liblnth*.dylib +..\%__SRC%\lib\liblnth*.so %_DEST%\lib\liblnth*.so + +..\%__SRC%\bin\spell* %_DEST%\bin\spell* +..\%__SRC%\lib\ilspell* %_DEST%\lib\ilspell* +..\%__SRC%\lib\libspell*.dylib %_DEST%\lib\libspell*.dylib +..\%__SRC%\lib\libspell*.so %_DEST%\lib\libspell*.so + +..\%__SRC%\bin\hunspell* %_DEST%\bin\hunspell* +..\%__SRC%\lib\ilhunspell* %_DEST%\lib\ilhunspell* +..\%__SRC%\lib\libhunspell*.dylib %_DEST%\lib\libhunspell*.dylib +..\%__SRC%\lib\libhunspell*.so %_DEST%\lib\libhunspell*.so + +..\%__SRC%\bin\hyph* %_DEST%\bin\hyph* +..\%__SRC%\lib\ihyph* %_DEST%\lib\ihyph* +..\%__SRC%\lib\libhnj.* %_DEST%\lib\libhnj.* +..\%__SRC%\lib\*.dylib %_DEST%\lib\*.dylib +..\%__SRC%\lib\libhyphen*.so %_DEST%\lib\libhyphen*.so + +..\%__SRC%\bin\ulingu* %_DEST%\bin\ulingu* +..\%__SRC%\lib\ilulingu* %_DEST%\lib\iulingu* +..\%__SRC%\lib\libulingu.a %_DEST%\lib\libulingu.a +..\%__SRC%\lib\*.dylib %_DEST%\lib\*.dylib + +..\%__SRC%\bin\guesslan* %_DEST%\bin\guesslan* +..\%__SRC%\lib\iguesslang* %_DEST%\lib\iguesslang* +..\%__SRC%\lib\libguesslang*.dylib %_DEST%\lib\libguesslang*.dylib +..\%__SRC%\lib\libguesslang*.so %_DEST%\lib\libguesslang*.so + +..\%__SRC%\lib\libMacOSXSpell*.dylib %_DEST%\lib\libMacOSXSpell*.dylib + + +mkdir: %_DEST%\xml\registry +mkdir: %_DEST%\xml\registry\data +mkdir: %_DEST%\xml\registry\data\org +mkdir: %_DEST%\xml\registry\data\org\openoffice +mkdir: %_DEST%\xml\registry\data\org\openoffice\Office +..\config\*.xcu %_DEST%\xml\registry\data\org\openoffice\Office\*.xcu + +..\%__SRC%\misc\MacOSXSpell.component %_DEST%\xml\MacOSXSpell.component +..\%__SRC%\misc\guesslang.component %_DEST%\xml\guesslang.component +..\%__SRC%\misc\hyphen.component %_DEST%\xml\hyphen.component +..\%__SRC%\misc\lnth.component %_DEST%\xml\lnth.component +..\%__SRC%\misc\spell.component %_DEST%\xml\spell.component diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx index 8ccf152d7..9fff12566 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,13 +55,13 @@ extern void * SAL_CALL Hyphenator_getFactory( extern "C" { -void SAL_CALL component_getImplementationEnvironment( +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { void * pRet = Hyphenator_getFactory( @@ -75,3 +76,4 @@ void * SAL_CALL component_getFactory( /////////////////////////////////////////////////////////////////////////// +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx index b20440201..6cc84e3fd 100755..100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,8 +36,6 @@ #include <cppuhelper/factory.hxx> // helper for factories #include <com/sun/star/registry/XRegistryKey.hpp> #include <i18npool/mslangid.hxx> -#include <unotools/pathoptions.hxx> -#include <unotools/useroptions.hxx> #include <tools/debug.hxx> #include <unotools/processfactory.hxx> #include <osl/mutex.hxx> @@ -65,7 +64,6 @@ using namespace utl; using namespace osl; -using namespace rtl; using namespace com::sun::star; using namespace com::sun::star::beans; using namespace com::sun::star::lang; @@ -73,6 +71,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::linguistic2; using namespace linguistic; +using ::rtl::OUString; + // values asigned to capitalization types #define CAPTYPE_UNKNOWN 0 #define CAPTYPE_NOCAP 1 @@ -81,8 +81,6 @@ using namespace linguistic; #define CAPTYPE_MIXED 4 // min, max - -//#define Min(a,b) (a < b ? a : b) #define Max(a,b) (a > b ? a : b) /////////////////////////////////////////////////////////////////////////// @@ -97,26 +95,24 @@ Hyphenator::Hyphenator() : numdict = 0; } - Hyphenator::~Hyphenator() { if (pPropHelper) pPropHelper->RemoveAsPropListener(); - if ((numdict) && (aDicts)) + if (numdict && aDicts) { - for (int i=0; i < numdict; i++) + for (int i=0; i < numdict; ++i) { - if (aDicts[i].apCC) delete aDicts[i].apCC; - aDicts[i].apCC = NULL; + delete aDicts[i].apCC; + if (aDicts[i].aPtr) + hnj_hyphen_free(aDicts[i].aPtr); } - } - if (aDicts) delete[] aDicts; - aDicts = NULL; - numdict = 0; delete pPropHelper; -} + } + delete[] aDicts; +} PropertyHelper_Hyphenation& Hyphenator::GetPropHelper_Impl() { @@ -208,7 +204,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales() // add dictionary information aDicts = new HDInfo[numdict]; - + k = 0; for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt) { @@ -652,7 +648,6 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const while((n >=0) && (lcword[n] == '.')) n--; n++; - // fprintf(stderr,"hyphenate... %s\n",lcword); fflush(stderr); if (n > 0) { const bool bFailed = 0 != hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, @@ -682,7 +677,6 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const for (int c = n; c < wordlen; c++) hyphens[c] = '0'; hyphens[wordlen] = '\0'; - // fprintf(stderr,"... %s\n",hyphens); fflush(stderr); sal_Int16 nHyphCount = 0; sal_Int16 i; @@ -712,8 +706,6 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const } hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear(); - //fprintf(stderr,"result is %s\n",OU2A(hyphenatedWord)); - //fflush(stderr); xRes = PossibleHyphens::CreatePossibleHyphens( aWord, LocaleToLanguage( aLocale ), hyphenatedWord, aHyphPos ); @@ -861,9 +853,8 @@ void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments ) pPropHelper = new PropertyHelper_Hyphenation( (XHyphenator *) this, xPropSet ); pPropHelper->AddAsPropListener(); //! after a reference is established } - else - { - DBG_ERROR( "wrong number of arguments in sequence" ); + else { + OSL_FAIL( "wrong number of arguments in sequence" ); } } } @@ -976,3 +967,5 @@ void * SAL_CALL Hyphenator_getFactory( const sal_Char * pImplName, #undef CAPTYPE_INITCAP #undef CAPTYPE_ALLCAP #undef CAPTYPE_MIXED + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx index 48178dfc3..07815d43e 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -157,3 +158,4 @@ inline OUString Hyphenator::getImplementationName_Static() throw() #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk index 6f767d8bf..c09723d52 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk @@ -32,9 +32,7 @@ TARGET = hyphen_lib ENABLE_EXCEPTIONS=TRUE USE_DEFFILE=TRUE -.IF "$(GUI)"=="OS2" -HNJLIB=hyphen.lib -.ELIF "$(GUI)"=="UNX" || "$(COM)"=="GCC" +.IF "$(GUI)"=="UNX" || "$(COM)"=="GCC" HNJLIB=-lhyphen .ELSE HNJLIB=hyphen.lib @@ -47,7 +45,7 @@ HNJLIB=hyphen.lib # --- Files -------------------------------------------------------- .IF "$(SYSTEM_HUNSPELL)" != "YES" -HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell +HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell -DHUNSPELL_STATIC .ENDIF CFLAGS += -I..$/..$/..$/lingutil $(HUNSPELL_CFLAGS) diff --git a/lingucomponent/source/languageguessing/altstrfunc.cxx b/lingucomponent/source/languageguessing/altstrfunc.cxx index 210285a7c..5461a2267 100644 --- a/lingucomponent/source/languageguessing/altstrfunc.cxx +++ b/lingucomponent/source/languageguessing/altstrfunc.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*************************************************************************** * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,3 +47,4 @@ int start(const std::string &s1, const std::string &s2){ return ret; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/languageguessing/altstrfunc.hxx b/lingucomponent/source/languageguessing/altstrfunc.hxx index 87d339d8d..5ddeda4ee 100644 --- a/lingucomponent/source/languageguessing/altstrfunc.hxx +++ b/lingucomponent/source/languageguessing/altstrfunc.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*************************************************************************** * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,3 +40,4 @@ int start(const std::string &s1, const std::string &s2); #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/languageguessing/guess.cxx b/lingucomponent/source/languageguessing/guess.cxx index 24fe34b4e..2a377dc0f 100644 --- a/lingucomponent/source/languageguessing/guess.cxx +++ b/lingucomponent/source/languageguessing/guess.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*************************************************************************** * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -134,3 +135,5 @@ bool Guess::operator==(string lang) toString += GetEncoding(); return start(toString, lang); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/languageguessing/guess.hxx b/lingucomponent/source/languageguessing/guess.hxx index e007a1ba9..b05913bb2 100644 --- a/lingucomponent/source/languageguessing/guess.hxx +++ b/lingucomponent/source/languageguessing/guess.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*************************************************************************** * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,3 +70,5 @@ class Guess{ }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx index 0314f1757..8dc21453c 100644 --- a/lingucomponent/source/languageguessing/guesslang.cxx +++ b/lingucomponent/source/languageguessing/guesslang.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -41,9 +42,6 @@ #include <simpleguesser.hxx> #include <guess.hxx> -//#include <cppuhelper/queryinterface.hxx> // helper for queryInterface() impl - -//#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/registry/XRegistryKey.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/linguistic2/XLanguageGuessing.hpp> @@ -51,6 +49,8 @@ #include <unotools/localfilehelper.hxx> #include <osl/thread.h> +#include <sal/macros.h> + using namespace ::rtl; using namespace ::osl; using namespace ::cppu; @@ -66,7 +66,6 @@ namespace css = ::com::sun::star; #define A2OU(x) ::rtl::OUString::createFromAscii( x ) #define SERVICENAME "com.sun.star.linguistic2.LanguageGuessing" - #define IMPLNAME "com.sun.star.lingu2.LanguageGuessing" static Sequence< OUString > getSupportedServiceNames_LangGuess_Impl() @@ -174,7 +173,7 @@ void LangGuess_Impl::EnsureInitialized() {"sa", ""}, {"ta", ""}, {"th", ""}, {"qu", ""}, {"yi", ""} }; - sal_Int32 nNum = sizeof(aDisable) / sizeof(aDisable[0]); + sal_Int32 nNum = SAL_N_ELEMENTS(aDisable); Sequence< Locale > aDisableSeq( nNum ); Locale *pDisableSeq = aDisableSeq.getArray(); for (sal_Int32 i = 0; i < nNum; ++i) @@ -191,40 +190,6 @@ void LangGuess_Impl::EnsureInitialized() //************************************************************************* -/* TL: currently not part of the API -Sequence< com::sun::star::lang::Locale > SAL_CALL LangGuess_Impl::guessLanguages( - const rtl::OUString &rText, - sal_Int32 nStartPos, - sal_Int32 nLen ) - throw (RuntimeException) -{ - Sequence< com::sun::star::lang::Locale > aRes; - - OString o = OUStringToOString( rText, RTL_TEXTENCODING_UTF8 ); - vector<Guess> gs = m_aGuesser.GuessLanguage(o.pData->buffer); - - aRes.realloc(gs.size()); - - com::sun::star::lang::Locale *pRes = aRes.getArray(); - -#ifdef DEBUG - std::cout << " We have " << gs.size() << " candidates" << std::endl; -#endif - - for(int i = 0; i < gs.size() ; i++ ){ - com::sun::star::lang::Locale current_aRes; - - current_aRes.Language = A2OU( gs[i].getLanguage().c_str() ); - current_aRes.Country = A2OU( gs[i].getCountry().c_str() ); - - pRes[i] = current_aRes; - } - - return aRes; -} -*/ -//************************************************************************* - Locale SAL_CALL LangGuess_Impl::guessPrimaryLanguage( const ::rtl::OUString& rText, ::sal_Int32 nStartPos, @@ -262,8 +227,6 @@ void LangGuess_Impl::SetFingerPrintsDB( OString conf_file_path(path); conf_file_path += conf_file_name; - //cout << "Conf file : " << conf_file_path.getStr() << " directory : " << path.getStr() << endl; - m_aGuesser.SetDBPath((const char*)conf_file_path.getStr(), (const char*)path.getStr()); } @@ -459,13 +422,13 @@ static struct ::cppu::ImplementationEntry s_component_entries [] = extern "C" { -void SAL_CALL component_getImplementationEnvironment( +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( sal_Char const ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( sal_Char const * implName, lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry ) { @@ -475,3 +438,4 @@ void * SAL_CALL component_getFactory( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/languageguessing/simpleguesser.cxx b/lingucomponent/source/languageguessing/simpleguesser.cxx index b6a8ee527..68c53318f 100644 --- a/lingucomponent/source/languageguessing/simpleguesser.cxx +++ b/lingucomponent/source/languageguessing/simpleguesser.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*************************************************************************** * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -154,7 +155,7 @@ vector<Guess> SimpleGuesser::GuessLanguage(char* text) Guess SimpleGuesser::GuessPrimaryLanguage(char* text) { vector<Guess> ret = GuessLanguage(text); - if(ret.size() > 0){ + if(!ret.empty()){ return GuessLanguage(text)[0]; } else{ @@ -232,3 +233,5 @@ void SimpleGuesser::SetDBPath(const char* path, const char* prefix){ } h = special_textcat_Init(path, prefix); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/languageguessing/simpleguesser.hxx b/lingucomponent/source/languageguessing/simpleguesser.hxx index d10f41bcb..ee76b0781 100644 --- a/lingucomponent/source/languageguessing/simpleguesser.hxx +++ b/lingucomponent/source/languageguessing/simpleguesser.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*************************************************************************** * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -119,3 +120,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx index 15c019a14..e9cfc46f1 100755..100644 --- a/lingucomponent/source/lingutil/lingutil.cxx +++ b/lingucomponent/source/lingutil/lingutil.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,18 +30,9 @@ #include "precompiled_lingucomponent.hxx" #if defined(WNT) -#include <tools/prewin.h> +#include <windows.h> #endif -#if defined(WNT) -#include <Windows.h> -#endif - -#if defined(WNT) -#include <tools/postwin.h> -#endif - - #include <osl/thread.h> #include <osl/file.hxx> #include <tools/debug.hxx> @@ -60,7 +52,7 @@ #include <lingutil.hxx> #include <dictmgr.hxx> - +#include <sal/macros.h> using ::com::sun::star::lang::Locale; @@ -88,7 +80,7 @@ rtl::OString Win_GetShortPathName( const rtl::OUString &rLongPathName ) rtl::OString aRes; sal_Unicode aShortBuffer[1024] = {0}; - sal_Int32 nShortBufSize = sizeof( aShortBuffer ) / sizeof( aShortBuffer[0] ); + sal_Int32 nShortBufSize = SAL_N_ELEMENTS( aShortBuffer ); // use the version of 'GetShortPathName' that can deal with Unicode... sal_Int32 nShortLen = GetShortPathNameW( @@ -99,7 +91,7 @@ rtl::OString Win_GetShortPathName( const rtl::OUString &rLongPathName ) if (nShortLen < nShortBufSize) // conversion successful? aRes = rtl::OString( OU2ENC( rtl::OUString( aShortBuffer, nShortLen ), osl_getThreadTextEncoding()) ); else - DBG_ERROR( "Win_GetShortPathName: buffer to short" ); + OSL_FAIL( "Win_GetShortPathName: buffer to short" ); return aRes; } @@ -124,9 +116,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy rtl::OUString aSystemPrefix; rtl::OUString aSystemSuffix; #endif - bool bSpell = false; - bool bHyph = false; - bool bThes = false; if (strcmp( pDicType, "DICT" ) == 0) { aFormatName = A2OU("DICT_SPELL"); @@ -135,7 +124,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy aSystemDir = A2OU( DICT_SYSTEM_DIR ); aSystemSuffix = aDicExtension; #endif - bSpell = true; } else if (strcmp( pDicType, "HYPH" ) == 0) { @@ -146,7 +134,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy aSystemPrefix = A2OU( "hyph_" ); aSystemSuffix = aDicExtension; #endif - bHyph = true; } else if (strcmp( pDicType, "THES" ) == 0) { @@ -157,7 +144,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy aSystemPrefix = A2OU( "th_" ); aSystemSuffix = A2OU( "_v2.dat" ); #endif - bThes = true; } @@ -173,7 +159,7 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy if (aSystemDicts.open() == osl::FileBase::E_None) { osl::DirectoryItem aItem; - osl::FileStatus aFileStatus(FileStatusMask_FileURL); + osl::FileStatus aFileStatus(osl_FileStatus_Mask_FileURL); while (aSystemDicts.getNextItem(aItem) == osl::FileBase::E_None) { aItem.getFileStatus(aFileStatus); @@ -254,7 +240,7 @@ void MergeNewStyleDicsAndOldStyleDics( if (nLang == LANGUAGE_DONTKNOW || nLang == LANGUAGE_NONE) { - DBG_ERROR( "old style dictionary with invalid language found!" ); + OSL_FAIL( "old style dictionary with invalid language found!" ); continue; } @@ -264,7 +250,7 @@ void MergeNewStyleDicsAndOldStyleDics( } else { - DBG_ERROR( "old style dictionary with no language found!" ); + OSL_FAIL( "old style dictionary with no language found!" ); } } } @@ -291,3 +277,4 @@ rtl_TextEncoding getTextEncodingFromCharset(const sal_Char* pCharset) ////////////////////////////////////////////////////////////////////// +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/lingutil/lingutil.hxx b/lingucomponent/source/lingutil/lingutil.hxx index d636dcbaa..53f322d80 100644 --- a/lingucomponent/source/lingutil/lingutil.hxx +++ b/lingucomponent/source/lingutil/lingutil.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,7 +39,9 @@ #include <list> -#define A2OU(x) ::rtl::OUString::createFromAscii( x ) +#ifndef A2OU +# define A2OU(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x )) +#endif #define OU2A(rtlOUString) \ ::rtl::OString((rtlOUString).getStr(), (rtlOUString).getLength(), \ @@ -111,3 +114,4 @@ rtl_TextEncoding getTextEncodingFromCharset(const sal_Char* pCharset); #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/lingutil/makefile.mk b/lingucomponent/source/lingutil/makefile.mk index 7d19eac9e..87df6aea5 100644 --- a/lingucomponent/source/lingutil/makefile.mk +++ b/lingucomponent/source/lingutil/makefile.mk @@ -38,7 +38,7 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk .IF "$(SYSTEM_HUNSPELL)" != "YES" -HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell +HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell -DHUNSPELL_STATIC .ENDIF .IF "$(SYSTEM_DICTS)" == "YES" diff --git a/lingucomponent/source/spellcheck/macosxspell/macreg.cxx b/lingucomponent/source/spellcheck/macosxspell/macreg.cxx index 8c431d4be..13d806dbb 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macreg.cxx +++ b/lingucomponent/source/spellcheck/macosxspell/macreg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,7 +35,6 @@ #include <com/sun/star/registry/XRegistryKey.hpp> -using namespace rtl; using namespace com::sun::star::lang; using namespace com::sun::star::registry; @@ -54,13 +54,13 @@ extern void * SAL_CALL MacSpellChecker_getFactory( extern "C" { -void SAL_CALL component_getImplementationEnvironment( +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { void * pRet = NULL; @@ -76,3 +76,4 @@ void * SAL_CALL component_getFactory( /////////////////////////////////////////////////////////////////////////// +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx index eb73aca71..fd9004e28 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx @@ -1,7 +1,8 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,27 +38,29 @@ #include <unotools/processfactory.hxx> #include <osl/mutex.hxx> -//#include <hunspell.hxx> #include <dictmgr.hxx> #include <macspellimp.hxx> -//#include <linguistic/lngprops.hxx> #include <linguistic/spelldta.hxx> #include <unotools/pathoptions.hxx> #include <unotools/useroptions.hxx> #include <osl/file.hxx> #include <rtl/ustrbuf.hxx> - using namespace utl; using namespace osl; -using namespace rtl; using namespace com::sun::star; using namespace com::sun::star::beans; using namespace com::sun::star::lang; using namespace com::sun::star::uno; using namespace com::sun::star::linguistic2; using namespace linguistic; + +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OUStringBuffer; +using ::rtl::OUStringToOString; + /////////////////////////////////////////////////////////////////////////// // dbg_dump for development #if OSL_DEBUG_LEVEL > 1 @@ -94,7 +97,6 @@ const sal_Char *dbg_dump(rtl_uString *pStr) MacSpellChecker::MacSpellChecker() : aEvtListeners ( GetLinguMutex() ) { -// aDicts = NULL; aDEncs = NULL; aDLocs = NULL; aDNames = NULL; @@ -111,14 +113,6 @@ MacSpellChecker::MacSpellChecker() : MacSpellChecker::~MacSpellChecker() { - // if (aDicts) { - // for (int i = 0; i < numdict; i++) { - // if (aDicts[i]) delete aDicts[i]; - // aDicts[i] = NULL; - // } - // delete[] aDicts; - // } - // aDicts = NULL; numdict = 0; if (aDEncs) delete[] aDEncs; aDEncs = NULL; @@ -163,7 +157,6 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales() rtl_TextEncoding aEnc = RTL_TEXTENCODING_UTF8; std::vector<objc_object *> postspdict; - //std::vector<dictentry *> postspdict; std::vector<dictentry *> postupdict; @@ -225,11 +218,7 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales() numlocs++; } aDLocs[k] = nLoc; - //pointer to Hunspell dictionary - not needed for MAC - //aDicts[k] = NULL; aDEncs[k] = 0; - // Dictionary file names not valid for Mac Spell - //aDNames[k] = aPathOpt.GetLinguisticPath() + A2OU("/ooo/") + A2OU(postspdict[i]->filename); k++; } @@ -238,7 +227,6 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales() } else { /* no dictionary.lst found so register no dictionaries */ numdict = 0; - //aDicts = NULL; aDEncs = NULL; aDLocs = NULL; aDNames = NULL; @@ -555,7 +543,7 @@ void SAL_CALL pPropHelper->AddAsPropListener(); //! after a reference is established } else - DBG_ERROR( "wrong number of arguments in sequence" ); + OSL_FAIL( "wrong number of arguments in sequence" ); } } @@ -665,3 +653,5 @@ void * SAL_CALL MacSpellChecker_getFactory( const sal_Char * pImplName, /////////////////////////////////////////////////////////////////////////// + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx index b7445a3c0..7e20d332c 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,12 +55,13 @@ #include <lingutil.hxx> -using namespace ::rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::linguistic2; +using ::rtl::OUString; + /////////////////////////////////////////////////////////////////////////// @@ -150,3 +152,4 @@ inline OUString MacSpellChecker::getImplementationName_Static() throw() #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/spellcheck/macosxspell/makefile.mk b/lingucomponent/source/spellcheck/macosxspell/makefile.mk index 4e88b808d..0a724f0f1 100644 --- a/lingucomponent/source/spellcheck/macosxspell/makefile.mk +++ b/lingucomponent/source/spellcheck/macosxspell/makefile.mk @@ -39,7 +39,7 @@ USE_DEFFILE=TRUE .INCLUDE : settings.mk .IF "$(SYSTEM_HUNSPELL)" != "YES" -HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell +HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell -DHUNSPELL_STATIC .ENDIF CXXFLAGS += $(HUNSPELL_CFLAGS) @@ -65,7 +65,6 @@ SHL1TARGET= $(TARGET)$(DLLPOSTFIX) SHL1STDLIBS= \ $(CPPULIB) \ $(CPPUHELPERLIB) \ - $(VOSLIB) \ $(TOOLSLIB) \ $(SVLLIB) \ $(SALLIB) \ diff --git a/lingucomponent/source/spellcheck/spell/makefile.mk b/lingucomponent/source/spellcheck/spell/makefile.mk index 56dd79939..81a683c99 100644 --- a/lingucomponent/source/spellcheck/spell/makefile.mk +++ b/lingucomponent/source/spellcheck/spell/makefile.mk @@ -33,7 +33,7 @@ ENABLE_EXCEPTIONS=TRUE USE_DEFFILE=TRUE .IF "$(SYSTEM_HUNSPELL)" != "YES" -HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell +HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell -DHUNSPELL_STATIC .ENDIF #----- Settings --------------------------------------------------------- diff --git a/lingucomponent/source/spellcheck/spell/sreg.cxx b/lingucomponent/source/spellcheck/spell/sreg.cxx index fa2c67840..6c96975c0 100644 --- a/lingucomponent/source/spellcheck/spell/sreg.cxx +++ b/lingucomponent/source/spellcheck/spell/sreg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,14 +35,12 @@ #include <com/sun/star/registry/XRegistryKey.hpp> -using namespace rtl; using namespace com::sun::star::lang; using namespace com::sun::star::registry; //////////////////////////////////////// // declaration of external RegEntry-functions defined by the service objects // - extern void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, @@ -53,13 +52,13 @@ extern void * SAL_CALL SpellChecker_getFactory( extern "C" { -void SAL_CALL component_getImplementationEnvironment( +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { void * pRet = NULL; @@ -75,3 +74,4 @@ void * SAL_CALL component_getFactory( /////////////////////////////////////////////////////////////////////////// +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index f00f005a3..eebdfb580 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,7 +60,6 @@ using namespace utl; using namespace osl; -using namespace rtl; using namespace com::sun::star; using namespace com::sun::star::beans; using namespace com::sun::star::lang; @@ -67,13 +67,17 @@ using namespace com::sun::star::uno; using namespace com::sun::star::linguistic2; using namespace linguistic; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; +using ::rtl::OString; + // XML-header of SPELLML queries #define SPELLML_HEADER "<?xml?>" /////////////////////////////////////////////////////////////////////////// -SpellChecker::SpellChecker() : - aEvtListeners ( GetLinguMutex() ) +SpellChecker::SpellChecker() + : aEvtListeners(GetLinguMutex()) { aDicts = NULL; aDEncs = NULL; @@ -84,32 +88,30 @@ SpellChecker::SpellChecker() : numdict = 0; } - SpellChecker::~SpellChecker() { if (aDicts) { - for (int i = 0; i < numdict; i++) + for (int i = 0; i < numdict; ++i) { - if (aDicts[i]) delete aDicts[i]; + delete aDicts[i]; aDicts[i] = NULL; } delete[] aDicts; } aDicts = NULL; numdict = 0; - if (aDEncs) delete[] aDEncs; + delete[] aDEncs; aDEncs = NULL; - if (aDLocs) delete[] aDLocs; + delete[] aDLocs; aDLocs = NULL; - if (aDNames) delete[] aDNames; + delete[] aDNames; aDNames = NULL; - if (pPropHelper) + if (xPropHelper.is()) pPropHelper->RemoveAsPropListener(); delete pPropHelper; } - PropertyHelper_Spelling & SpellChecker::GetPropHelper_Impl() { if (!pPropHelper) @@ -578,9 +580,8 @@ void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments ) pPropHelper = new PropertyHelper_Spelling( (XSpellChecker *) this, xPropSet ); pPropHelper->AddAsPropListener(); //! after a reference is established } - else - { - DBG_ERROR( "wrong number of arguments in sequence" ); + else { + OSL_FAIL( "wrong number of arguments in sequence" ); } } } @@ -596,6 +597,7 @@ void SAL_CALL SpellChecker::dispose() bDisposing = sal_True; EventObject aEvtObj( (XSpellChecker *) this ); aEvtListeners.disposeAndClear( aEvtObj ); + xPropHelper.clear(); } } @@ -687,3 +689,5 @@ void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName, /////////////////////////////////////////////////////////////////////////// + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.hxx b/lingucomponent/source/spellcheck/spell/sspellimp.hxx index 530e4e3ef..09417d4dc 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.hxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -139,3 +140,4 @@ inline OUString SpellChecker::getImplementationName_Static() throw() #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/thesaurus/libnth/makefile.mk b/lingucomponent/source/thesaurus/libnth/makefile.mk index 91d39d2d3..1cbecd32d 100644 --- a/lingucomponent/source/thesaurus/libnth/makefile.mk +++ b/lingucomponent/source/thesaurus/libnth/makefile.mk @@ -37,9 +37,6 @@ USE_DEFFILE=TRUE .IF "$(GUI)"=="UNX" MYTHESLIB=-lmythes .ENDIF # unx -.IF "$(GUI)"=="OS2" -MYTHESLIB=$(SLB)\libmythes.lib -.ENDIF # os2 .IF "$(GUI)"=="WNT" MYTHESLIB=libmythes.lib .ENDIF # wnt @@ -52,7 +49,7 @@ MYTHESLIB=libmythes.lib # --- Files -------------------------------------------------------- .IF "$(SYSTEM_HUNSPELL)" != "YES" -HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell +HUNSPELL_CFLAGS += -I$(SOLARINCDIR)$/hunspell -DHUNSPELL_STATIC .ENDIF .IF "$(SYSTEM_MYTHES)" != "YES" diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.cxx b/lingucomponent/source/thesaurus/libnth/nthesdta.cxx index f0c81f66b..549c9c0e4 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesdta.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesdta.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,18 +36,16 @@ #include "nthesdta.hxx" #include <linguistic/misc.hxx> -// #include "lngsvcmgr.hxx" - - using namespace utl; using namespace osl; -using namespace rtl; using namespace com::sun::star; using namespace com::sun::star::beans; using namespace com::sun::star::lang; using namespace com::sun::star::uno; using namespace com::sun::star::linguistic2; +using ::rtl::OUString; + namespace linguistic { @@ -114,3 +113,4 @@ void Meaning::SetMeaning( const OUString &rTerm ) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx index 4e1766840..6e0352bf7 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx +++ b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -84,3 +85,4 @@ public: #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 65aa7e249..ccbf55fe5 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,7 +66,6 @@ using namespace utl; using namespace osl; -using namespace rtl; using namespace com::sun::star; using namespace com::sun::star::beans; using namespace com::sun::star::lang; @@ -73,7 +73,9 @@ using namespace com::sun::star::uno; using namespace com::sun::star::linguistic2; using namespace linguistic; - +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OUStringToOString; /////////////////////////////////////////////////////////////////////////// @@ -605,7 +607,7 @@ void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments ) pPropHelper->AddAsPropListener(); //! after a reference is established } else - DBG_ERROR( "wrong number of arguments in sequence" ); + OSL_FAIL( "wrong number of arguments in sequence" ); } } @@ -781,3 +783,5 @@ void * SAL_CALL Thesaurus_getFactory( const sal_Char * pImplName, #undef CAPTYPE_INITCAP #undef CAPTYPE_ALLCAP #undef CAPTYPE_MIXED + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx index fc24fc88f..ab4783302 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -167,3 +168,5 @@ inline OUString Thesaurus::getImplementationName_Static() throw() /////////////////////////////////////////////////////////////////////////// #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lingucomponent/source/thesaurus/libnth/ntreg.cxx b/lingucomponent/source/thesaurus/libnth/ntreg.cxx index 71dbe7d08..8b82336e2 100644 --- a/lingucomponent/source/thesaurus/libnth/ntreg.cxx +++ b/lingucomponent/source/thesaurus/libnth/ntreg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,13 +54,13 @@ extern void * SAL_CALL Thesaurus_getFactory( extern "C" { -void SAL_CALL component_getImplementationEnvironment( +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { void * pRet = Thesaurus_getFactory( @@ -74,3 +75,4 @@ void * SAL_CALL component_getFactory( /////////////////////////////////////////////////////////////////////////// +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |