diff options
author | Thomas Lange <tl@openoffice.org> | 2002-02-19 12:45:46 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2002-02-19 12:45:46 +0000 |
commit | 7758069d0c43abf5d51a846cc1c889a55f2d43d3 (patch) | |
tree | 65564721ebe0ef0c50525d2e6accce0fc6a648f2 /sw/source/core | |
parent | 15d2a50804e07dc039a419eddf24a797288b2996 (diff) |
#97417# avoid loading of lingu DLL during start-up
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/text/guess.cxx | 27 | ||||
-rw-r--r-- | sw/source/core/txtnode/txtedt.cxx | 23 |
2 files changed, 41 insertions, 9 deletions
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index 97433cb2b0ec..883a28d3da25 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -2,9 +2,9 @@ * * $RCSfile: guess.cxx,v $ * - * $Revision: 1.30 $ + * $Revision: 1.31 $ * - * last change: $Author: fme $ $Date: 2001-12-20 11:54:36 $ + * last change: $Author: tl $ $Date: 2002-02-19 13:43:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,11 +67,21 @@ #include <ctype.h> +#ifndef _UNO_LINGU_HXX +#include <svx/unolingu.hxx> +#endif +#ifndef _SHL_HXX +#include <tools/shl.hxx> // needed for SW_MOD() macro +#endif + #ifndef _ERRHDL_HXX #include <errhdl.hxx> // ASSERTs #endif -#ifndef _UNO_LINGU_HXX -#include <svx/unolingu.hxx> +#ifndef _DLELSTNR_HXX_ +#include <dlelstnr.hxx> +#endif +#ifndef _SWMODULE_HXX +#include <swmodule.hxx> #endif #ifndef _TXTCFG_HXX #include <txtcfg.hxx> @@ -359,10 +369,17 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf, rInf.GetFont()->GetLanguage(); const ForbiddenCharacters aForbidden( *rInf.GetTxtFrm()->GetNode()->GetDoc()-> - GetForbiddenCharacters( aLang, TRUE )); + GetForbiddenCharacters( aLang, TRUE )); LineBreakUserOptions aUserOpt( aForbidden.beginLine, aForbidden.endLine, rInf.HasForbiddenChars(), bAllowHanging, sal_False ); + + //! register listener to LinguServiceEvents now in order to get + //! notified about relevant changes in the future + SwModule *pModule = SW_MOD(); + if (!pModule->GetLngSvcEvtListener().is()) + pModule->CreateLngSvcEvtListener(); + // determines first possible line break from nRightPos to // start index of current line LineBreakResults aResult = pBreakIt->xBreak->getLineBreak( diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 055d6f3b2cfd..4545d57d6a6e 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -2,9 +2,9 @@ * * $RCSfile: txtedt.cxx,v $ * - * $Revision: 1.27 $ + * $Revision: 1.28 $ * - * last change: $Author: fme $ $Date: 2002-01-11 08:56:19 $ + * last change: $Author: tl $ $Date: 2002-02-19 13:44:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -107,6 +107,15 @@ #include <unotools/transliterationwrapper.hxx> #endif +#ifndef _DLELSTNR_HXX_ +#include <dlelstnr.hxx> +#endif +#ifndef _SWMODULE_HXX +#include <swmodule.hxx> +#endif +#ifndef _SHL_HXX +#include <tools/shl.hxx> // needed for SW_MOD() macro +#endif #ifndef _SPLARGS_HXX #include <splargs.hxx> #endif @@ -834,13 +843,19 @@ SwRect SwTxtFrm::_AutoSpell( SwCntntNode* pActNode, xub_StrLen nActPos ) nInsertPos = 0; } - Reference< XSpellChecker1 > xSpell( ::GetSpellChecker() ); - BOOL bFresh = nBegin < nEnd; BOOL bACWDirty = FALSE; if( nBegin < nEnd ) { + //! register listener to LinguServiceEvents now in order to get + //! notified about relevant changes in the future + SwModule *pModule = SW_MOD(); + if (!pModule->GetLngSvcEvtListener().is()) + pModule->CreateLngSvcEvtListener(); + + Reference< XSpellChecker1 > xSpell( ::GetSpellChecker() ); + LanguageType eActLang = pNode->GetLang( nBegin ); SwScanner aScanner( pNode, NULL, nBegin, nEnd, FALSE, TRUE ); |