summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-10-16 00:05:16 +0200
committerMathias Bauer <mba@openoffice.org>2009-10-16 00:05:16 +0200
commit5bb7ed58d718d37fa56e592ffdaf01cc9a0410af (patch)
tree15dede36d984980b4217224a390064d62cc615ac /linguistic
parentde4a42cf94391345c950caf3b8bbf84982dea42f (diff)
#i103496#: split svtools; improve ConfitItems
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/inc/misc.hxx1
-rw-r--r--linguistic/source/convdic.cxx15
-rw-r--r--linguistic/source/convdiclist.cxx2
-rw-r--r--linguistic/source/convdiclist.hxx2
-rw-r--r--linguistic/source/convdicxml.hxx2
-rw-r--r--linguistic/source/gciterator.cxx6
-rw-r--r--linguistic/source/grammarchecker.cxx2
-rw-r--r--linguistic/source/hyphdsp.cxx2
-rw-r--r--linguistic/source/hyphdta.cxx2
-rw-r--r--linguistic/source/lngopt.cxx1
-rw-r--r--linguistic/source/lngopt.hxx6
-rw-r--r--linguistic/source/lngsvcmgr.cxx17
-rw-r--r--linguistic/source/lngsvcmgr.hxx2
-rw-r--r--linguistic/source/makefile.mk12
-rw-r--r--linguistic/source/misc.cxx7
-rw-r--r--linguistic/source/spelldsp.cxx2
-rw-r--r--linguistic/source/thesdsp.cxx2
17 files changed, 46 insertions, 37 deletions
diff --git a/linguistic/inc/misc.hxx b/linguistic/inc/misc.hxx
index 307fd2a16b..5b3f4bffe4 100644
--- a/linguistic/inc/misc.hxx
+++ b/linguistic/inc/misc.hxx
@@ -50,7 +50,6 @@
#include <unotools/charclass.hxx>
#include <osl/thread.h>
#include <osl/mutex.hxx>
-#include <vcl/svapp.hxx>
namespace com { namespace sun { namespace star { namespace beans {
class XPropertySet;
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index dcda5d93df..33e25fd9a6 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 37967955de..1a6243fa6c 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -36,7 +36,7 @@
#include <unotools/pathoptions.hxx>
#include <unotools/useroptions.hxx>
#include <unotools/lingucfg.hxx>
-#include <vcl/svapp.hxx>
+//#include <vcl/svapp.hxx>
#include <rtl/instance.hxx>
#include <cppuhelper/factory.hxx> // helper for factories
#include <unotools/localfilehelper.hxx>
diff --git a/linguistic/source/convdiclist.hxx b/linguistic/source/convdiclist.hxx
index 65021041d6..36416d5561 100644
--- a/linguistic/source/convdiclist.hxx
+++ b/linguistic/source/convdiclist.hxx
@@ -36,7 +36,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/interfacecontainer.h>
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <tools/debug.hxx>
#include "misc.hxx"
diff --git a/linguistic/source/convdicxml.hxx b/linguistic/source/convdicxml.hxx
index 1ada0a8fb8..86c6aee38b 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 94caf22eec..c20ec2c3d3 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -63,7 +63,6 @@
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/extract.hxx>
#include <cppuhelper/factory.hxx>
-#include <vcl/unohelp.hxx>
#include <i18npool/mslangid.hxx>
#include <unotools/processfactory.hxx>
@@ -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 9cac236ea0..931f9455a0 100644
--- a/linguistic/source/grammarchecker.cxx
+++ b/linguistic/source/grammarchecker.cxx
@@ -34,7 +34,7 @@
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/linguistic2/XGrammarChecker.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <vcl/unohelp.hxx>
+//#include <vcl/unohelp.hxx>
#include <cppuhelper/implbase4.hxx>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index 7bc8c343af..2c342a67d2 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -41,7 +41,7 @@
#include <i18npool/lang.h>
#include <unotools/localedatawrapper.hxx>
#include <tools/debug.hxx>
-#include <svtools/lngmisc.hxx>
+#include <svl/lngmisc.hxx>
#include <unotools/processfactory.hxx>
#include <osl/mutex.hxx>
diff --git a/linguistic/source/hyphdta.cxx b/linguistic/source/hyphdta.cxx
index 34ea7299a9..7a8233d0af 100644
--- a/linguistic/source/hyphdta.cxx
+++ b/linguistic/source/hyphdta.cxx
@@ -39,7 +39,7 @@
#include <rtl/ustrbuf.hxx>
#include <tools/debug.hxx>
-#include <svtools/lngmisc.hxx>
+#include <svl/lngmisc.hxx>
#include <unotools/localedatawrapper.hxx>
//using namespace utl;
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 903afa2448..3b819154e1 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -36,7 +36,6 @@
#include "misc.hxx"
#include <tools/debug.hxx>
#include <unotools/lingucfg.hxx>
-#include <vcl/svapp.hxx>
#include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type
#include <cppuhelper/implbase1.hxx> // helper for implementations
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index 63a4f63a98..695df4ac6c 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -42,15 +42,15 @@
#include <com/sun/star/beans/XPropertyAccess.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <unotools/lingucfg.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include <unotools/configitem.hxx>
#include <com/sun/star/uno/Any.h>
#include <tools/solar.h>
-#include <vcl/timer.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include "misc.hxx"
#include "defs.hxx"
+#include <vos/refernce.hxx>
namespace com { namespace sun { namespace star {
namespace beans {
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index e5d9a39d19..64de21260c 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 1c96adea46..7ee9ad0ba6 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -43,7 +43,7 @@
#include <com/sun/star/linguistic2/XAvailableLocales.hpp>
#include <unotools/configitem.hxx>
-#include <vcl/timer.hxx>
+//#include <vcl/timer.hxx>
#include "misc.hxx"
#include "defs.hxx"
diff --git a/linguistic/source/makefile.mk b/linguistic/source/makefile.mk
index ccc9d1343f..6db2fae4da 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 d54a5b278a..b45e4eca3f 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -34,7 +34,7 @@
#include <tools/fsys.hxx>
#include <tools/debug.hxx>
#include <unotools/pathoptions.hxx>
-#include <svtools/lngmisc.hxx>
+#include <svl/lngmisc.hxx>
#include <ucbhelper/content.hxx>
#include <i18npool/mslangid.hxx>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
@@ -52,6 +52,7 @@
#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
#include <unotools/processfactory.hxx>
#include <unotools/localedatawrapper.hxx>
+#include <unotools/syslocale.hxx>
#include <rtl/instance.hxx>
@@ -59,7 +60,7 @@
#include "defs.hxx"
#include "lngprops.hxx"
#include "hyphdta.hxx"
-
+#include <i18npool/mslangid.hxx>
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 e88a509ccb..2c3c557109 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -40,7 +40,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/processfactory.hxx>
#include <tools/debug.hxx>
-#include <svtools/lngmisc.hxx>
+#include <svl/lngmisc.hxx>
#include <osl/mutex.hxx>
#include <vector>
diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx
index 9ba9f9f9ce..9310b5e213 100644
--- a/linguistic/source/thesdsp.cxx
+++ b/linguistic/source/thesdsp.cxx
@@ -32,7 +32,7 @@
#include "precompiled_linguistic.hxx"
#include <i18npool/lang.h>
#include <tools/debug.hxx>
-#include <svtools/lngmisc.hxx>
+#include <svl/lngmisc.hxx>
#include <cppuhelper/factory.hxx> // helper for factories
#include <com/sun/star/registry/XRegistryKey.hpp>