From 9f2fde7ab5de20926bb25a6b298b4e5dffb66eb2 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 16 Oct 2009 00:05:16 +0200 Subject: #i103496#: split svtools; improve ConfitItems --- linguistic/inc/misc.hxx | 1 - linguistic/source/convdic.cxx | 15 +++++++++------ linguistic/source/convdiclist.cxx | 2 +- linguistic/source/convdiclist.hxx | 2 +- linguistic/source/convdicxml.hxx | 2 +- linguistic/source/gciterator.cxx | 6 ++++-- linguistic/source/grammarchecker.cxx | 2 +- linguistic/source/hyphdsp.cxx | 2 +- linguistic/source/hyphdta.cxx | 2 +- linguistic/source/lngopt.cxx | 1 - linguistic/source/lngopt.hxx | 6 +++--- linguistic/source/lngsvcmgr.cxx | 17 ++++++++++------- linguistic/source/lngsvcmgr.hxx | 2 +- linguistic/source/makefile.mk | 12 +++++++----- linguistic/source/misc.cxx | 7 ++++--- linguistic/source/spelldsp.cxx | 2 +- linguistic/source/thesdsp.cxx | 2 +- 17 files changed, 46 insertions(+), 37 deletions(-) (limited to 'linguistic') diff --git a/linguistic/inc/misc.hxx b/linguistic/inc/misc.hxx index a588491ef4d6..683641f045a5 100644 --- a/linguistic/inc/misc.hxx +++ b/linguistic/inc/misc.hxx @@ -50,7 +50,6 @@ #include #include #include -#include namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index c55e4ef30f4c..68cc76277fe5 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -68,7 +68,7 @@ #include "convdic.hxx" -#include "convdicxml.hxx" +//#include "convdicxml.hxx" #include "misc.hxx" #include "defs.hxx" @@ -87,7 +87,7 @@ using namespace linguistic; /////////////////////////////////////////////////////////////////////////// - +#if XML void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport ) { if (rMainURL.Len() == 0) @@ -165,7 +165,7 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport ) { } } - +#endif BOOL IsConvDic( const String &rFileURL, INT16 &nLang, sal_Int16 &nConvType ) { @@ -186,6 +186,7 @@ BOOL IsConvDic( const String &rFileURL, INT16 &nLang, sal_Int16 &nConvType ) // first argument being 0 should stop the file from being parsed // up to the end (reading all entries) when the required // data (language, conversion type) is found. +#if XML ConvDicXMLImport *pImport = new ConvDicXMLImport( 0, rFileURL ); //!! keep a first reference to ensure the lifetime of the object !! @@ -201,6 +202,7 @@ BOOL IsConvDic( const String &rFileURL, INT16 &nLang, sal_Int16 &nConvType ) nLang = pImport->GetLanguage(); nConvType = pImport->GetConversionType(); } +#endif return bRes; } @@ -266,12 +268,12 @@ void ConvDic::Load() //!! prevent function from being called recursively via HasEntry, AddEntry bNeedEntries = FALSE; - +#if XML ConvDicXMLImport *pImport = new ConvDicXMLImport( this, aMainURL ); //!! keep a first reference to ensure the lifetime of the object !! uno::Reference< XInterface > xRef( (document::XFilter *) pImport, UNO_QUERY ); ReadThroughDic( aMainURL, *pImport ); // will implicitly add the entries - +#endif bIsModified = FALSE; } @@ -326,7 +328,7 @@ void ConvDic::Save() // prepare arguments (prepend doc handler to given arguments) uno::Reference< xml::sax::XDocumentHandler > xDocHandler( xSaxWriter, UNO_QUERY ); - +#if XML ConvDicXMLExport *pExport = new ConvDicXMLExport( *this, aMainURL, xDocHandler ); //!! keep a first(!) reference until everything is done to //!! ensure the proper lifetime of the object @@ -335,6 +337,7 @@ void ConvDic::Save() DBG_ASSERT( !pStream->GetError(), "I/O error while writing to stream" ); if (bRet) bIsModified = FALSE; +#endif } DBG_ASSERT( !bIsModified, "dictionary still modified after save. Save failed?" ); } diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 098ae669ddd6..058da1ec794f 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -36,7 +36,7 @@ #include #include #include -#include +//#include #include #include // helper for factories #include diff --git a/linguistic/source/convdiclist.hxx b/linguistic/source/convdiclist.hxx index 7a7f866a69a1..8467955b4d87 100644 --- a/linguistic/source/convdiclist.hxx +++ b/linguistic/source/convdiclist.hxx @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include "misc.hxx" diff --git a/linguistic/source/convdicxml.hxx b/linguistic/source/convdicxml.hxx index f0a3ae4417d4..f3bd86c90c9a 100644 --- a/linguistic/source/convdicxml.hxx +++ b/linguistic/source/convdicxml.hxx @@ -77,7 +77,7 @@ public: void _ExportAutoStyles() {} void _ExportMasterStyles() {} void _ExportContent(); - sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ); +// sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ); sal_Bool Export(); }; diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index bb63e9bb8c8b..2697d5880b80 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -63,7 +63,6 @@ #include #include #include -#include #include #include @@ -790,7 +789,10 @@ sal_Int32 GrammarCheckingIterator::GetSuggestedEndOfSentence( uno::Reference< i18n::XBreakIterator > xBreakIterator; if (!m_xBreakIterator.is()) { - m_xBreakIterator = vcl::unohelper::CreateBreakIterator(); + uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); + if ( xMSF.is() ) + xBreakIterator = uno::Reference < i18n::XBreakIterator >( xMSF->createInstance( + ::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator") ), uno::UNO_QUERY ); } sal_Int32 nTextLen = rText.getLength(); sal_Int32 nEndPosition = nTextLen; diff --git a/linguistic/source/grammarchecker.cxx b/linguistic/source/grammarchecker.cxx index 3d4953b8e17a..8b0b5a74ce4b 100644 --- a/linguistic/source/grammarchecker.cxx +++ b/linguistic/source/grammarchecker.cxx @@ -34,7 +34,7 @@ #include #include #include -#include +//#include #include #include #include diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx index a04d01c0d1a7..419f1a3cf4a9 100644 --- a/linguistic/source/hyphdsp.cxx +++ b/linguistic/source/hyphdsp.cxx @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include diff --git a/linguistic/source/hyphdta.cxx b/linguistic/source/hyphdta.cxx index 5286a6aada22..ea7d8e7c8233 100644 --- a/linguistic/source/hyphdta.cxx +++ b/linguistic/source/hyphdta.cxx @@ -39,7 +39,7 @@ #include #include -#include +#include #include //using namespace utl; diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx index 6b7b74a68d86..6eb59fa09ef4 100644 --- a/linguistic/source/lngopt.cxx +++ b/linguistic/source/lngopt.cxx @@ -36,7 +36,6 @@ #include "misc.hxx" #include #include -#include #include // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type #include // helper for implementations diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx index 34a9259545d3..f690fc1112c8 100644 --- a/linguistic/source/lngopt.hxx +++ b/linguistic/source/lngopt.hxx @@ -42,15 +42,15 @@ #include #include #include -#include +#include #include #include #include -#include -#include +#include #include "misc.hxx" #include "defs.hxx" +#include namespace com { namespace sun { namespace star { namespace beans { diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index a002799efedc..3a8e3e017fae 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -288,7 +288,7 @@ class LngSvcMgrListenerHelper : > { LngSvcMgr &rMyManager; - Timer aLaunchTimer; +// Timer aLaunchTimer; //cppu::OMultiTypeInterfaceContainerHelper aListeners; ::cppu::OInterfaceContainerHelper aLngSvcMgrListeners; @@ -304,7 +304,8 @@ class LngSvcMgrListenerHelper : void LaunchEvent( INT16 nLngSvcEvtFlags ); - DECL_LINK( TimeOut, Timer* ); +// DECL_LINK( TimeOut, Timer* ); + long Timeout(); public: LngSvcMgrListenerHelper( LngSvcMgr &rLngSvcMgr, @@ -363,8 +364,8 @@ LngSvcMgrListenerHelper::LngSvcMgrListenerHelper( //! listeners, and each of them is launching an event of it's own!) //! Thus this behaviour is necessary to avoid unecessary actions of //! this objects listeners! - aLaunchTimer.SetTimeout( 2000 ); - aLaunchTimer.SetTimeoutHdl( LINK( this, LngSvcMgrListenerHelper, TimeOut ) ); +// aLaunchTimer.SetTimeout( 2000 ); +// aLaunchTimer.SetTimeoutHdl( LINK( this, LngSvcMgrListenerHelper, TimeOut ) ); nCombinedLngSvcEvt = 0; } @@ -385,11 +386,12 @@ void SAL_CALL LngSvcMgrListenerHelper::disposing( const lang::EventObject& rSour } -IMPL_LINK( LngSvcMgrListenerHelper, TimeOut, Timer*, pTimer ) +//IMPL_LINK( LngSvcMgrListenerHelper, TimeOut, Timer*, pTimer ) +long LngSvcMgrListenerHelper::Timeout() { osl::MutexGuard aGuard( GetLinguMutex() ); - if (&aLaunchTimer == pTimer) +// if (&aLaunchTimer == pTimer) { // change event source to LinguServiceManager since the listeners // probably do not know (and need not to know) about the specific @@ -416,7 +418,8 @@ IMPL_LINK( LngSvcMgrListenerHelper, TimeOut, Timer*, pTimer ) void LngSvcMgrListenerHelper::AddLngSvcEvt( INT16 nLngSvcEvt ) { nCombinedLngSvcEvt |= nLngSvcEvt; - aLaunchTimer.Start(); +// aLaunchTimer.Start(); + Timeout(); } diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx index aa7587527587..9716b082ddd5 100644 --- a/linguistic/source/lngsvcmgr.hxx +++ b/linguistic/source/lngsvcmgr.hxx @@ -43,7 +43,7 @@ #include #include -#include +//#include #include "misc.hxx" #include "defs.hxx" diff --git a/linguistic/source/makefile.mk b/linguistic/source/makefile.mk index ccc9d1343f6f..6db2fae4daf9 100644 --- a/linguistic/source/makefile.mk +++ b/linguistic/source/makefile.mk @@ -41,10 +41,12 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- +# $(SLO)$/convdicxml.obj\ + + SLOFILES = \ $(SLO)$/convdiclist.obj\ $(SLO)$/convdic.obj\ - $(SLO)$/convdicxml.obj\ $(SLO)$/dicimp.obj\ $(SLO)$/dlistimp.obj\ $(SLO)$/hhconvdic.obj\ @@ -72,14 +74,14 @@ SHL1STDLIBS= \ $(VOSLIB) \ $(TOOLSLIB) \ $(I18NISOLANGLIB) \ - $(SVTOOLLIB) \ - $(SVLLIB) \ - $(VCLLIB) \ + $(SVLLIB) \ $(SALLIB) \ $(UCBHELPERLIB) \ $(UNOTOOLSLIB) \ - $(XMLOFFLIB) \ $(ICUUCLIB) + +# $(VCLLIB) \ +# $(XMLOFFLIB) \ # build DLL SHL1LIBS= $(SLB)$/$(TARGET).lib diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx index 8d754054422a..1067a9c369c9 100644 --- a/linguistic/source/misc.cxx +++ b/linguistic/source/misc.cxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -52,6 +52,7 @@ #include #include #include +#include #include @@ -59,7 +60,7 @@ #include "defs.hxx" #include "lngprops.hxx" #include "hyphdta.hxx" - +#include using namespace utl; using namespace osl; @@ -92,7 +93,7 @@ LocaleDataWrapper & GetLocaleDataWrapper( INT16 nLang ) { static LocaleDataWrapper aLclDtaWrp( getProcessServiceFactory(), - CreateLocale( Application::GetSettings().GetUILanguage() ) ); + CreateLocale( SvtSysLocale().GetUILanguage() ) ); const Locale &rLcl = aLclDtaWrp.getLoadedLocale(); Locale aLcl( CreateLocale( nLang ) ); diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index 48e64163dbe4..35cf6304f105 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx index cc0623d1dd82..e9a8617cf698 100644 --- a/linguistic/source/thesdsp.cxx +++ b/linguistic/source/thesdsp.cxx @@ -32,7 +32,7 @@ #include "precompiled_linguistic.hxx" #include #include -#include +#include #include // helper for factories #include -- cgit v1.2.3