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 | e2682561337c521f10fa2c87594c86c01b3c662a (patch) | |
tree | a8cb220cf9888183c2de5edd3644597c63b67b9a /lingucomponent/source/hyphenator/altlinuxhyph/hyphen | |
parent | 68f53efa2572acc661c8a75ee2ec09f87348aa65 (diff) | |
parent | f9c2beb2cdb4ae448d22ae390c63159b88df9e9e (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/source/hyphenator/altlinuxhyph/hyphen')
4 files changed, 23 insertions, 28 deletions
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx index 9d975a83b8ef..c808227885d6 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 6230272fdd14..d8419b3600ba 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() { @@ -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 eebb67ed67f4..fb2ba59c3d9e 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 6f767d8bfa9e..c09723d52a92 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) |