summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-10-06 07:38:24 +0200
committerMathias Bauer <mba@openoffice.org>2009-10-06 07:38:24 +0200
commitb06310548b2b1908ac9a03f225acae109a3af5c3 (patch)
treef46346af0dd6c7527efa52070bf41ca9f7ee38d9 /linguistic
parent71db90a924df762c6f0884e26d9483470d91341f (diff)
#103496#: move VCL free ConfigItems to unotools
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/inc/lngprops.hxx36
-rw-r--r--linguistic/inc/misc.hxx26
-rw-r--r--linguistic/source/convdiclist.cxx134
-rw-r--r--linguistic/source/dlistimp.cxx28
-rw-r--r--linguistic/source/lngopt.cxx10
-rw-r--r--linguistic/source/lngopt.hxx6
-rw-r--r--linguistic/source/lngsvcmgr.cxx20
-rw-r--r--linguistic/source/misc.cxx16
-rw-r--r--linguistic/source/misc2.cxx40
9 files changed, 158 insertions, 158 deletions
diff --git a/linguistic/inc/lngprops.hxx b/linguistic/inc/lngprops.hxx
index 41052f9eb1..4a104eed58 100644
--- a/linguistic/inc/lngprops.hxx
+++ b/linguistic/inc/lngprops.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,7 +31,7 @@
#ifndef _LINGUISTIC_LNGPROPS_HHX_
#define _LINGUISTIC_LNGPROPS_HHX_
-#include <svtools/linguprops.hxx>
+#include <unotools/linguprops.hxx>
// maximal number of suggestions to be returned in spelling context-menu
// (may not include results added by looking up user dictionaries)
@@ -41,24 +41,24 @@
//!! Don't change values! They are used as the property handles in
//!! the service description
#define WID_IS_GERMAN_PRE_REFORM UPH_IS_GERMAN_PRE_REFORM /*! deprecated !*/
-#define WID_IS_USE_DICTIONARY_LIST UPH_IS_USE_DICTIONARY_LIST
+#define WID_IS_USE_DICTIONARY_LIST UPH_IS_USE_DICTIONARY_LIST
#define WID_IS_IGNORE_CONTROL_CHARACTERS UPH_IS_IGNORE_CONTROL_CHARACTERS
-#define WID_IS_SPELL_UPPER_CASE UPH_IS_SPELL_UPPER_CASE
-#define WID_IS_SPELL_WITH_DIGITS UPH_IS_SPELL_WITH_DIGITS
-#define WID_IS_SPELL_CAPITALIZATION UPH_IS_SPELL_CAPITALIZATION
-#define WID_HYPH_MIN_LEADING UPH_HYPH_MIN_LEADING
-#define WID_HYPH_MIN_TRAILING UPH_HYPH_MIN_TRAILING
-#define WID_HYPH_MIN_WORD_LENGTH UPH_HYPH_MIN_WORD_LENGTH
-#define WID_DEFAULT_LOCALE UPH_DEFAULT_LOCALE
-#define WID_IS_SPELL_AUTO UPH_IS_SPELL_AUTO
+#define WID_IS_SPELL_UPPER_CASE UPH_IS_SPELL_UPPER_CASE
+#define WID_IS_SPELL_WITH_DIGITS UPH_IS_SPELL_WITH_DIGITS
+#define WID_IS_SPELL_CAPITALIZATION UPH_IS_SPELL_CAPITALIZATION
+#define WID_HYPH_MIN_LEADING UPH_HYPH_MIN_LEADING
+#define WID_HYPH_MIN_TRAILING UPH_HYPH_MIN_TRAILING
+#define WID_HYPH_MIN_WORD_LENGTH UPH_HYPH_MIN_WORD_LENGTH
+#define WID_DEFAULT_LOCALE UPH_DEFAULT_LOCALE
+#define WID_IS_SPELL_AUTO UPH_IS_SPELL_AUTO
#define WID_IS_SPELL_HIDE UPH_IS_SPELL_HIDE /*! deprecated !*/
-#define WID_IS_SPELL_IN_ALL_LANGUAGES UPH_IS_SPELL_IN_ALL_LANGUAGES /*! deprecated !*/
-#define WID_IS_SPELL_SPECIAL UPH_IS_SPELL_SPECIAL
-#define WID_IS_HYPH_AUTO UPH_IS_HYPH_AUTO
-#define WID_IS_HYPH_SPECIAL UPH_IS_HYPH_SPECIAL
-#define WID_IS_WRAP_REVERSE UPH_IS_WRAP_REVERSE
-#define WID_DEFAULT_LANGUAGE UPH_DEFAULT_LANGUAGE
-#define WID_DEFAULT_LOCALE_CJK UPH_DEFAULT_LOCALE_CJK
+#define WID_IS_SPELL_IN_ALL_LANGUAGES UPH_IS_SPELL_IN_ALL_LANGUAGES /*! deprecated !*/
+#define WID_IS_SPELL_SPECIAL UPH_IS_SPELL_SPECIAL
+#define WID_IS_HYPH_AUTO UPH_IS_HYPH_AUTO
+#define WID_IS_HYPH_SPECIAL UPH_IS_HYPH_SPECIAL
+#define WID_IS_WRAP_REVERSE UPH_IS_WRAP_REVERSE
+#define WID_DEFAULT_LANGUAGE UPH_DEFAULT_LANGUAGE
+#define WID_DEFAULT_LOCALE_CJK UPH_DEFAULT_LOCALE_CJK
#define WID_DEFAULT_LOCALE_CTL UPH_DEFAULT_LOCALE_CTL
#endif
diff --git a/linguistic/inc/misc.hxx b/linguistic/inc/misc.hxx
index 803341bb8b..307fd2a16b 100644
--- a/linguistic/inc/misc.hxx
+++ b/linguistic/inc/misc.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,7 +44,7 @@
#include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type
#include <cppuhelper/implbase1.hxx> // helper for implementations
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <i18npool/lang.h>
#include <tools/string.hxx>
#include <unotools/charclass.hxx>
@@ -89,7 +89,7 @@ namespace linguistic
#define PATH_FLAG_WRITABLE 0x04
#define PATH_FLAG_ALL (PATH_FLAG_INTERNAL | PATH_FLAG_USER | PATH_FLAG_WRITABLE)
-
+
// AddEntryToDic return values
#define DIC_ERR_NONE 0
#define DIC_ERR_FULL 1
@@ -138,7 +138,7 @@ LanguageType
LangSeqToLocaleSeq( const ::com::sun::star::uno::Sequence< INT16 > &rLangSeq );
::com::sun::star::uno::Sequence< INT16 >
- LocaleSeqToLangSeq( ::com::sun::star::uno::Sequence<
+ LocaleSeqToLangSeq( ::com::sun::star::uno::Sequence<
::com::sun::star::lang::Locale > &rLocaleSeq );
///////////////////////////////////////////////////////////////////////////
@@ -179,7 +179,7 @@ INT32 GetPosInWordToCheck( const rtl::OUString &rTxt, INT32 nPos );
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenatedWord >
- RebuildHyphensAndControlChars( const rtl::OUString &rOrigWord,
+ RebuildHyphensAndControlChars( const rtl::OUString &rOrigWord,
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenatedWord > &rxHyphWord );
@@ -210,24 +210,24 @@ BOOL IsNumeric( const String &rText );
///////////////////////////////////////////////////////////////////////////
BOOL IsUseDicList( const ::com::sun::star::beans::PropertyValues &rProperties,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > &rxPropSet );
BOOL IsIgnoreControlChars( const ::com::sun::star::beans::PropertyValues &rProperties,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > &rxPropSet );
-::com::sun::star::uno::Reference<
+::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XDictionaryEntry >
- SearchDicList(
+ SearchDicList(
const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList >& rDicList,
- const ::rtl::OUString& rWord, INT16 nLanguage,
+ const ::rtl::OUString& rWord, INT16 nLanguage,
BOOL bSearchPosDics, BOOL bSearchSpellEntry );
-sal_uInt8 AddEntryToDic(
+sal_uInt8 AddEntryToDic(
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > &rxDic,
const ::rtl::OUString &rWord, sal_Bool bIsNeg,
- const ::rtl::OUString &rRplcTxt, sal_Int16 nRplcLang,
+ const ::rtl::OUString &rRplcTxt, sal_Int16 nRplcLang,
sal_Bool bStripDot = sal_True );
sal_Bool SaveDictionaries( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList > &xDicList );
@@ -241,7 +241,7 @@ sal_Bool SaveDictionaries( const ::com::sun::star::uno::Reference< ::com::sun::s
class AppExitListener :
public cppu::WeakImplHelper1
- <
+ <
::com::sun::star::frame::XTerminateListener
>
{
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index 1d5729b34b..decb46f35c 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,9 +33,9 @@
#include <tools/fsys.hxx>
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/useroptions.hxx>
-#include <svtools/lingucfg.hxx>
+#include <unotools/pathoptions.hxx>
+#include <unotools/useroptions.hxx>
+#include <unotools/lingucfg.hxx>
#include <sfx2/docfile.hxx>
#include <vcl/svapp.hxx>
#include <rtl/instance.hxx>
@@ -98,7 +98,7 @@ String GetConvDicMainURL( const String &rDicName, const String &rDirectoryURL )
DBG_ASSERT(!aURLObj.HasError(), "invalid URL");
if (aURLObj.HasError())
return String();
- else
+ else
return aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
}
@@ -139,7 +139,7 @@ public:
virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeByName( const ::rtl::OUString& Name ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
+
// looks for conversion dictionaries with the specified extension
// in the directory and adds them to the container
void AddConvDics( const String &rSearchDirPathURL, const String &rExtension );
@@ -149,10 +149,10 @@ public:
INT32 GetCount() const { return aConvDics.getLength(); }
uno::Reference< XConversionDictionary > GetByName( const OUString& rName );
-
+
const uno::Reference< XConversionDictionary > GetByIndex( INT32 nIdx )
- {
- return aConvDics.getConstArray()[nIdx];
+ {
+ return aConvDics.getConstArray()[nIdx];
}
};
@@ -190,7 +190,7 @@ void ConvDicNameContainer::FlushDics() const
}
-INT32 ConvDicNameContainer::GetIndexByName_Impl(
+INT32 ConvDicNameContainer::GetIndexByName_Impl(
const OUString& rName )
{
INT32 nRes = -1;
@@ -205,7 +205,7 @@ INT32 ConvDicNameContainer::GetIndexByName_Impl(
}
-uno::Reference< XConversionDictionary > ConvDicNameContainer::GetByName(
+uno::Reference< XConversionDictionary > ConvDicNameContainer::GetByName(
const OUString& rName )
{
uno::Reference< XConversionDictionary > xRes;
@@ -216,7 +216,7 @@ uno::Reference< XConversionDictionary > ConvDicNameContainer::GetByName(
}
-uno::Type SAL_CALL ConvDicNameContainer::getElementType( )
+uno::Type SAL_CALL ConvDicNameContainer::getElementType( )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -224,7 +224,7 @@ uno::Type SAL_CALL ConvDicNameContainer::getElementType( )
}
-sal_Bool SAL_CALL ConvDicNameContainer::hasElements( )
+sal_Bool SAL_CALL ConvDicNameContainer::hasElements( )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -232,7 +232,7 @@ sal_Bool SAL_CALL ConvDicNameContainer::hasElements( )
}
-uno::Any SAL_CALL ConvDicNameContainer::getByName( const OUString& rName )
+uno::Any SAL_CALL ConvDicNameContainer::getByName( const OUString& rName )
throw (NoSuchElementException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -243,7 +243,7 @@ uno::Any SAL_CALL ConvDicNameContainer::getByName( const OUString& rName )
}
-uno::Sequence< OUString > SAL_CALL ConvDicNameContainer::getElementNames( )
+uno::Sequence< OUString > SAL_CALL ConvDicNameContainer::getElementNames( )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -258,7 +258,7 @@ uno::Sequence< OUString > SAL_CALL ConvDicNameContainer::getElementNames( )
}
-sal_Bool SAL_CALL ConvDicNameContainer::hasByName( const OUString& rName )
+sal_Bool SAL_CALL ConvDicNameContainer::hasByName( const OUString& rName )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -266,9 +266,9 @@ sal_Bool SAL_CALL ConvDicNameContainer::hasByName( const OUString& rName )
}
-void SAL_CALL ConvDicNameContainer::replaceByName(
- const OUString& rName,
- const uno::Any& rElement )
+void SAL_CALL ConvDicNameContainer::replaceByName(
+ const OUString& rName,
+ const uno::Any& rElement )
throw (IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -284,27 +284,27 @@ void SAL_CALL ConvDicNameContainer::replaceByName(
}
-void SAL_CALL ConvDicNameContainer::insertByName(
- const OUString& rName,
- const Any& rElement )
+void SAL_CALL ConvDicNameContainer::insertByName(
+ const OUString& rName,
+ const Any& rElement )
throw (IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
-
+
if (GetByName( rName ).is())
throw ElementExistException();
uno::Reference< XConversionDictionary > xNew;
rElement >>= xNew;
if (!xNew.is() || xNew->getName() != rName)
throw IllegalArgumentException();
-
+
INT32 nLen = aConvDics.getLength();
aConvDics.realloc( nLen + 1 );
aConvDics.getArray()[ nLen ] = xNew;
}
-void SAL_CALL ConvDicNameContainer::removeByName( const OUString& rName )
+void SAL_CALL ConvDicNameContainer::removeByName( const OUString& rName )
throw (NoSuchElementException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -345,11 +345,11 @@ void SAL_CALL ConvDicNameContainer::removeByName( const OUString& rName )
}
-void ConvDicNameContainer::AddConvDics(
- const String &rSearchDirPathURL,
+void ConvDicNameContainer::AddConvDics(
+ const String &rSearchDirPathURL,
const String &rExtension )
{
- const Sequence< OUString > aDirCnt(
+ const Sequence< OUString > aDirCnt(
utl::LocalFileHelper::GetFolderContents( rSearchDirPathURL, FALSE ) );
const OUString *pDirCnt = aDirCnt.getConstArray();
INT32 nEntries = aDirCnt.getLength();
@@ -372,8 +372,8 @@ void ConvDicNameContainer::AddConvDics(
{
// get decoded dictionary file name
INetURLObject aURLObj( aURL );
- String aDicName = aURLObj.getBase( INetURLObject::LAST_SEGMENT,
- true, INetURLObject::DECODE_WITH_CHARSET,
+ String aDicName = aURLObj.getBase( INetURLObject::LAST_SEGMENT,
+ true, INetURLObject::DECODE_WITH_CHARSET,
RTL_TEXTENCODING_UTF8 );
uno::Reference < XConversionDictionary > xDic;
@@ -408,7 +408,7 @@ class StaticWithInit_ {
public:
/** Gets the static. Mutual exclusion is performed using the
osl global mutex.
-
+
@return
static variable
*/
@@ -466,7 +466,7 @@ ConvDicList::~ConvDicList()
if (!bDisposing && pNameContainer)
pNameContainer->FlushDics();
-
+
pExitListener->Deactivate();
}
@@ -485,7 +485,7 @@ ConvDicNameContainer & ConvDicList::GetNameContainer()
if (!pNameContainer)
{
pNameContainer = new ConvDicNameContainer( *this );
- pNameContainer->AddConvDics( GetDictionaryWriteablePath(),
+ pNameContainer->AddConvDics( GetDictionaryWriteablePath(),
A2OU( CONV_DIC_EXT ) );
xNameContainer = pNameContainer;
@@ -496,7 +496,7 @@ ConvDicNameContainer & ConvDicList::GetNameContainer()
const OUString *pActiveConvDics = aOpt.aActiveConvDics.getConstArray();
for (INT32 i = 0; i < nLen; ++i)
{
- uno::Reference< XConversionDictionary > xDic =
+ uno::Reference< XConversionDictionary > xDic =
pNameContainer->GetByName( pActiveConvDics[i] );
if (xDic.is())
xDic->setActive( sal_True );
@@ -527,10 +527,10 @@ uno::Reference< container::XNameContainer > SAL_CALL ConvDicList::getDictionaryC
}
-uno::Reference< XConversionDictionary > SAL_CALL ConvDicList::addNewDictionary(
- const OUString& rName,
- const Locale& rLocale,
- sal_Int16 nConvDicType )
+uno::Reference< XConversionDictionary > SAL_CALL ConvDicList::addNewDictionary(
+ const OUString& rName,
+ const Locale& rLocale,
+ sal_Int16 nConvDicType )
throw (NoSupportException, ElementExistException, RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -539,7 +539,7 @@ uno::Reference< XConversionDictionary > SAL_CALL ConvDicList::addNewDictionary(
if (GetNameContainer().hasByName( rName ))
throw ElementExistException();
-
+
uno::Reference< XConversionDictionary > xRes;
String aDicMainURL( GetConvDicMainURL( rName, GetDictionaryWriteablePath() ) );
if (nLang == LANGUAGE_KOREAN &&
@@ -552,7 +552,7 @@ uno::Reference< XConversionDictionary > SAL_CALL ConvDicList::addNewDictionary(
{
xRes = new ConvDic( rName, nLang, nConvDicType, FALSE, aDicMainURL );
}
-
+
if (!xRes.is())
throw NoSupportException();
else
@@ -566,20 +566,20 @@ uno::Reference< XConversionDictionary > SAL_CALL ConvDicList::addNewDictionary(
}
-uno::Sequence< OUString > SAL_CALL ConvDicList::queryConversions(
- const OUString& rText,
- sal_Int32 nStartPos,
- sal_Int32 nLength,
- const Locale& rLocale,
- sal_Int16 nConversionDictionaryType,
- ConversionDirection eDirection,
- sal_Int32 nTextConversionOptions )
+uno::Sequence< OUString > SAL_CALL ConvDicList::queryConversions(
+ const OUString& rText,
+ sal_Int32 nStartPos,
+ sal_Int32 nLength,
+ const Locale& rLocale,
+ sal_Int16 nConversionDictionaryType,
+ ConversionDirection eDirection,
+ sal_Int32 nTextConversionOptions )
throw (IllegalArgumentException, NoSupportException, RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
/*INT16 nLang = LocaleToLanguage( rLocale );*/
-
+
INT32 nCount = 0;
uno::Sequence< OUString > aRes( 20 );
OUString *pRes = aRes.getArray();
@@ -595,7 +595,7 @@ uno::Sequence< OUString > SAL_CALL ConvDicList::queryConversions(
bSupported |= bMatch;
if (bMatch && xDic->isActive())
{
- Sequence< OUString > aNewConv( xDic->getConversions(
+ Sequence< OUString > aNewConv( xDic->getConversions(
rText, nStartPos, nLength,
eDirection, nTextConversionOptions ) );
INT32 nNewLen = aNewConv.getLength();
@@ -621,21 +621,21 @@ uno::Sequence< OUString > SAL_CALL ConvDicList::queryConversions(
}
-sal_Int16 SAL_CALL ConvDicList::queryMaxCharCount(
- const Locale& rLocale,
- sal_Int16 nConversionDictionaryType,
- ConversionDirection eDirection )
+sal_Int16 SAL_CALL ConvDicList::queryMaxCharCount(
+ const Locale& rLocale,
+ sal_Int16 nConversionDictionaryType,
+ ConversionDirection eDirection )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
-
+
sal_Int16 nRes = 0;
GetNameContainer();
INT32 nLen = GetNameContainer().GetCount();
for (INT32 i = 0; i < nLen; ++i)
{
const uno::Reference< XConversionDictionary > xDic( GetNameContainer().GetByIndex(i) );
- if (xDic.is() &&
+ if (xDic.is() &&
xDic->getLocale() == rLocale &&
xDic->getConversionType() == nConversionDictionaryType)
{
@@ -648,7 +648,7 @@ sal_Int16 SAL_CALL ConvDicList::queryMaxCharCount(
}
-void SAL_CALL ConvDicList::dispose( )
+void SAL_CALL ConvDicList::dispose( )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -663,8 +663,8 @@ void SAL_CALL ConvDicList::dispose( )
}
-void SAL_CALL ConvDicList::addEventListener(
- const uno::Reference< XEventListener >& rxListener )
+void SAL_CALL ConvDicList::addEventListener(
+ const uno::Reference< XEventListener >& rxListener )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -673,8 +673,8 @@ void SAL_CALL ConvDicList::addEventListener(
}
-void SAL_CALL ConvDicList::removeEventListener(
- const uno::Reference< XEventListener >& rxListener )
+void SAL_CALL ConvDicList::removeEventListener(
+ const uno::Reference< XEventListener >& rxListener )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -683,7 +683,7 @@ void SAL_CALL ConvDicList::removeEventListener(
}
-OUString SAL_CALL ConvDicList::getImplementationName( )
+OUString SAL_CALL ConvDicList::getImplementationName( )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -691,7 +691,7 @@ OUString SAL_CALL ConvDicList::getImplementationName( )
}
-sal_Bool SAL_CALL ConvDicList::supportsService( const OUString& rServiceName )
+sal_Bool SAL_CALL ConvDicList::supportsService( const OUString& rServiceName )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -699,7 +699,7 @@ sal_Bool SAL_CALL ConvDicList::supportsService( const OUString& rServiceName )
}
-uno::Sequence< OUString > SAL_CALL ConvDicList::getSupportedServiceNames( )
+uno::Sequence< OUString > SAL_CALL ConvDicList::getSupportedServiceNames( )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -707,7 +707,7 @@ uno::Sequence< OUString > SAL_CALL ConvDicList::getSupportedServiceNames( )
}
-uno::Sequence< OUString > ConvDicList::getSupportedServiceNames_Static()
+uno::Sequence< OUString > ConvDicList::getSupportedServiceNames_Static()
throw()
{
uno::Sequence< OUString > aSNS( 1 );
@@ -718,7 +718,7 @@ uno::Sequence< OUString > ConvDicList::getSupportedServiceNames_Static()
///////////////////////////////////////////////////////////////////////////
-uno::Reference< uno::XInterface > SAL_CALL ConvDicList_CreateInstance(
+uno::Reference< uno::XInterface > SAL_CALL ConvDicList_CreateInstance(
const uno::Reference< XMultiServiceFactory > & /*rSMgr*/ )
throw(Exception)
{
@@ -750,7 +750,7 @@ sal_Bool SAL_CALL ConvDicList_writeInfo(
}
-void * SAL_CALL ConvDicList_getFactory(
+void * SAL_CALL ConvDicList_getFactory(
const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
{
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 0436504c2b..044bb0a845 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,8 +39,8 @@
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
#include <i18npool/mslangid.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/pathoptions.hxx>
+#include <unotools/useroptions.hxx>
#include <sfx2/docfile.hxx>
#include <vcl/svapp.hxx>
#include <cppuhelper/factory.hxx> // helper for factories
@@ -317,9 +317,9 @@ DicList::~DicList()
}
-void DicList::SearchForDictionaries(
+void DicList::SearchForDictionaries(
DictionaryVec_t&rDicList,
- const String &rDicDirURL,
+ const String &rDicDirURL,
BOOL bIsWriteablePath )
{
osl::MutexGuard aGuard( GetLinguMutex() );
@@ -374,10 +374,10 @@ void DicList::SearchForDictionaries(
{
// get decoded dictionary file name
INetURLObject aURLObj( aURL );
- String aDicName = aURLObj.getName( INetURLObject::LAST_SEGMENT,
- true, INetURLObject::DECODE_WITH_CHARSET,
+ String aDicName = aURLObj.getName( INetURLObject::LAST_SEGMENT,
+ true, INetURLObject::DECODE_WITH_CHARSET,
RTL_TEXTENCODING_UTF8 );
-
+
DictionaryType eType = bNeg ? DictionaryType_NEGATIVE : DictionaryType_POSITIVE;
uno::Reference< XDictionary > xDic =
new DictionaryNeo( aDicName, nLang, eType, aURL, bIsWriteablePath );
@@ -686,8 +686,8 @@ void DicList::_CreateDicList()
xIgnAll->setActive( TRUE );
addDictionary( xIgnAll );
}
-
-
+
+
// evaluate list of dictionaries to be activated from configuration
//
//! to suppress overwriting the list of active dictionaries in the
@@ -707,11 +707,11 @@ void DicList::_CreateDicList()
xDic->setActive( TRUE );
}
}
-
+
// suppress collected events during creation of the dictionary list.
// there should be no events during creation.
pDicEvtLstnrHelper->ClearEvents();
-
+
pDicEvtLstnrHelper->EndCollectEvents();
bInCreation = FALSE;
@@ -932,11 +932,11 @@ static BOOL IsVers2OrNewer( const String& rFileURL, USHORT& nLng, BOOL& bNeg )
// get stream to be used
SfxMedium aMedium( rFileURL, STREAM_READ | STREAM_SHARE_DENYWRITE, FALSE );
SvStream *pStream = aMedium.GetInStream();
-
+
int nDicVersion = ReadDicVersion (pStream, nLng, bNeg);
if (2 == nDicVersion || nDicVersion >= 5)
return TRUE;
-
+
return FALSE;
}
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index fc6f4c7cc3..903afa2448 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,7 +35,7 @@
#include "lngprops.hxx"
#include "misc.hxx"
#include <tools/debug.hxx>
-#include <svtools/lingucfg.hxx>
+#include <unotools/lingucfg.hxx>
#include <vcl/svapp.hxx>
#include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type
@@ -338,7 +338,7 @@ const SfxItemPropertyMapEntry* lcl_GetLinguProps()
&::getCppuType( (sal_Int16*)0 ), 0, 0 },
{ MAP_CHAR_LEN(UPN_HYPH_MIN_WORD_LENGTH), WID_HYPH_MIN_WORD_LENGTH,
&::getCppuType( (sal_Int16*)0 ), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_GERMAN_PRE_REFORM), WID_IS_GERMAN_PRE_REFORM, /*! deprecated !*/
+ { MAP_CHAR_LEN(UPN_IS_GERMAN_PRE_REFORM), WID_IS_GERMAN_PRE_REFORM, /*! deprecated !*/
&::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN(UPN_IS_HYPH_AUTO), WID_IS_HYPH_AUTO,
&::getBooleanCppuType(), 0, 0 },
@@ -350,9 +350,9 @@ const SfxItemPropertyMapEntry* lcl_GetLinguProps()
&::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN(UPN_IS_SPELL_CAPITALIZATION), WID_IS_SPELL_CAPITALIZATION,
&::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_SPELL_HIDE), WID_IS_SPELL_HIDE, /*! deprecated !*/
+ { MAP_CHAR_LEN(UPN_IS_SPELL_HIDE), WID_IS_SPELL_HIDE, /*! deprecated !*/
&::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_SPELL_IN_ALL_LANGUAGES), WID_IS_SPELL_IN_ALL_LANGUAGES, /*! deprecated !*/
+ { MAP_CHAR_LEN(UPN_IS_SPELL_IN_ALL_LANGUAGES), WID_IS_SPELL_IN_ALL_LANGUAGES, /*! deprecated !*/
&::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN(UPN_IS_SPELL_SPECIAL), WID_IS_SPELL_SPECIAL,
&::getBooleanCppuType(), 0, 0 },
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index 2188ef4d88..63a4f63a98 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,7 +41,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/XPropertyAccess.hpp>
#include <com/sun/star/lang/XComponent.hpp>
-#include <svtools/lingucfg.hxx>
+#include <unotools/lingucfg.hxx>
#include <svtools/itemprop.hxx>
#include <unotools/configitem.hxx>
#include <com/sun/star/uno/Any.h>
@@ -87,7 +87,7 @@ public:
BOOL SetValue( ::com::sun::star::uno::Any &rOld,
const ::com::sun::star::uno::Any &rVal, INT32 nWID );
void GetValue( ::com::sun::star::uno::Any &rVal, INT32 nWID ) const;
-
+
static ::rtl::OUString GetName( INT32 nWID );
const ::com::sun::star::uno::Sequence< rtl::OUString >
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 2a70e9eeb1..e5d9a39d19 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +40,7 @@
#include <com/sun/star/linguistic2/LinguServiceEventFlags.hpp>
#include <tools/solar.h>
-#include <svtools/lingucfg.hxx>
+#include <unotools/lingucfg.hxx>
#include <unotools/processfactory.hxx>
#include <i18npool/lang.h>
#include <i18npool/mslangid.hxx>
@@ -134,7 +134,7 @@ static uno::Sequence< lang::Locale > GetAvailLocales(
aLanguages.insert( nLang );
}
}
- else
+ else
{
DBG_ASSERT( 0, "interface not supported by service" );
}
@@ -753,7 +753,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
pThesDsp->SetServiceList( CreateLocale(nLang), aSvcImplNames );
}
}
- else
+ else
{
DBG_ASSERT( 0, "nofified for unexpected property" );
}
@@ -801,9 +801,9 @@ void LngSvcMgr::GetGrammarCheckerDsp_Impl( sal_Bool bSetSvcList )
uno::Reference< linguistic2::XProofreadingIterator > xGCI;
try
{
- uno::Reference< lang::XMultiServiceFactory > xMgr(
+ uno::Reference< lang::XMultiServiceFactory > xMgr(
utl::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
- xGCI = uno::Reference< linguistic2::XProofreadingIterator >(
+ xGCI = uno::Reference< linguistic2::XProofreadingIterator >(
xMgr->createInstance( A2OU( SN_GRAMMARCHECKINGITERATOR ) ), uno::UNO_QUERY_THROW );
}
catch (uno::Exception &)
@@ -887,7 +887,7 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl()
DBG_ASSERT( 0, "createInstance failed" );
}
}
-
+
if (xSvc.is())
{
OUString aImplName;
@@ -953,7 +953,7 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
DBG_ASSERT( 0, "createInstance failed" );
}
}
-
+
if (xSvc.is())
{
OUString aImplName;
@@ -1671,7 +1671,7 @@ BOOL LngSvcMgr::SaveCfgSvcs( const String &rServiceName )
pNodeName = "ServiceManager/HyphenatorList";
else if (pDsp == pThesDsp)
pNodeName = "ServiceManager/ThesaurusList";
- else
+ else
{
DBG_ASSERT( 0, "node name missing" );
}
@@ -1765,7 +1765,7 @@ static uno::Sequence< OUString > GetLangSvc( const uno::Any &rVal )
aRes.realloc(1);
aRes.getArray()[0] = aImplName;
}
- else
+ else
{
DBG_ASSERT( 0, "GetLangSvc: unexpected type encountered" );
}
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 2df19215fd..d54a5b278a 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,7 @@
#include <tools/string.hxx>
#include <tools/fsys.hxx>
#include <tools/debug.hxx>
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <svtools/lngmisc.hxx>
#include <ucbhelper/content.hxx>
#include <i18npool/mslangid.hxx>
@@ -90,10 +90,10 @@ osl::Mutex & GetLinguMutex()
LocaleDataWrapper & GetLocaleDataWrapper( INT16 nLang )
{
- static LocaleDataWrapper aLclDtaWrp(
- getProcessServiceFactory(),
+ static LocaleDataWrapper aLclDtaWrp(
+ getProcessServiceFactory(),
CreateLocale( Application::GetSettings().GetUILanguage() ) );
-
+
const Locale &rLcl = aLclDtaWrp.getLoadedLocale();
Locale aLcl( CreateLocale( nLang ) );
if (aLcl.Language != rLcl.Language ||
@@ -243,8 +243,8 @@ sal_Int32 LevDistance( const OUString &rTxt1, const OUString &rTxt2 )
sal_Unicode c1i = rTxt1.getStr()[i - 1];
sal_Unicode c2k = rTxt2.getStr()[k - 1];
sal_Int32 nCost = c1i == c2k ? 0 : 1;
- sal_Int32 nNew = Minimum( aData.Value(i-1, k ) + 1,
- aData.Value(i , k-1) + 1,
+ sal_Int32 nNew = Minimum( aData.Value(i-1, k ) + 1,
+ aData.Value(i , k-1) + 1,
aData.Value(i-1, k-1) + nCost );
// take transposition (exchange with left or right char) in account
if (2 < i && 2 < k)
@@ -798,7 +798,7 @@ sal_Unicode ToUpper( const sal_Unicode cChar, INT16 nLanguage )
// sorted(!) array of unicode ranges for code points that are exclusively(!) used as numbers
// and thus may NOT not be part of names or words like the Chinese/Japanese number characters
-static const sal_uInt32 the_aDigitZeroes [] =
+static const sal_uInt32 the_aDigitZeroes [] =
{
0x00000030, //0039 ; Decimal # Nd [10] DIGIT ZERO..DIGIT NINE
0x00000660, //0669 ; Decimal # Nd [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index 297366322f..ffd54b78f8 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,7 +35,7 @@
#include <tools/urlobj.hxx>
#include <ucbhelper/content.hxx>
#include <tools/debug.hxx>
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <unotools/processfactory.hxx>
#include <unotools/localfilehelper.hxx>
#include <unotools/localedatawrapper.hxx>
@@ -63,7 +63,7 @@ BOOL FileExists( const String &rMainURL )
{
try
{
- ::ucbhelper::Content aContent( rMainURL,
+ ::ucbhelper::Content aContent( rMainURL,
uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >());
bExists = aContent.isDocument();
}
@@ -99,7 +99,7 @@ String GetFileURL( SvtPathOptions::Pathes ePath, const String &rFileName )
String GetModulePath( SvtPathOptions::Pathes ePath, BOOL bAddAccessDelim )
{
String aRes;
-
+
SvtPathOptions aPathOpt;
switch (ePath)
{
@@ -131,7 +131,7 @@ String GetModulePath( SvtPathOptions::Pathes ePath, BOOL bAddAccessDelim )
aRes += '/';
#endif
}
-
+
return aRes;
}
@@ -146,7 +146,7 @@ rtl::OUString StripTrailingChars( rtl::OUString &rTxt, sal_Unicode cChar )
sal_Int32 nIdx = nTxtLen - 1;
while (nIdx >= 0 && rTxt[ nIdx-- ] == cChar)
++nTrailing;
-
+
rtl::OUString aRes( rTxt.copy( nTxtLen - nTrailing ) );
rTxt = rTxt.copy( 0, nTxtLen - nTrailing );
return aRes;
@@ -154,7 +154,7 @@ rtl::OUString StripTrailingChars( rtl::OUString &rTxt, sal_Unicode cChar )
///////////////////////////////////////////////////////////////////////////
-static uno::Sequence< rtl::OUString > GetMultiPaths_Impl(
+static uno::Sequence< rtl::OUString > GetMultiPaths_Impl(
const rtl::OUString &rPathPrefix,
sal_Int16 nPathFlags )
{
@@ -162,7 +162,7 @@ static uno::Sequence< rtl::OUString > GetMultiPaths_Impl(
uno::Sequence< rtl::OUString > aInternalPaths;
uno::Sequence< rtl::OUString > aUserPaths;
rtl::OUString aWritablePath;
-
+
bool bSuccess = true;
uno::Reference< lang::XMultiServiceFactory > xMgr( utl::getProcessServiceFactory() );
if (xMgr.is())
@@ -176,7 +176,7 @@ static uno::Sequence< rtl::OUString > GetMultiPaths_Impl(
aUser .AppendAscii( "_user" );
aWriteable.AppendAscii( "_writable" );
- uno::Reference< beans::XPropertySet > xPathSettings( xMgr->createInstance(
+ uno::Reference< beans::XPropertySet > xPathSettings( xMgr->createInstance(
A2OU( "com.sun.star.util.PathSettings" ) ), uno::UNO_QUERY_THROW );
xPathSettings->getPropertyValue( aInternal ) >>= aInternalPaths;
xPathSettings->getPropertyValue( aUser ) >>= aUserPaths;
@@ -185,7 +185,7 @@ static uno::Sequence< rtl::OUString > GetMultiPaths_Impl(
catch (uno::Exception &)
{
bSuccess = false;
- }
+ }
}
if (bSuccess)
{
@@ -211,10 +211,10 @@ static uno::Sequence< rtl::OUString > GetMultiPaths_Impl(
const bool bAddInternal = &rPathSeq == &aInternalPaths && (nPathFlags & PATH_FLAG_INTERNAL);
if ((bAddUser || bAddInternal) && pPathSeq[k].getLength() > 0)
pRes[ nCount++ ] = pPathSeq[k];
- }
- }
+ }
+ }
aRes.realloc( nCount );
- }
+ }
return aRes;
}
@@ -227,17 +227,17 @@ rtl::OUString GetDictionaryWriteablePath()
if (aPaths.getLength() > 0)
aRes = aPaths[0];
return aRes;
-}
+}
uno::Sequence< rtl::OUString > GetDictionaryPaths( sal_Int16 nPathFlags )
{
return GetMultiPaths_Impl( A2OU("Dictionary"), nPathFlags );
}
-
+
uno::Sequence< rtl::OUString > GetLinguisticPaths( sal_Int16 nPathFlags )
{
return GetMultiPaths_Impl( A2OU("Linguistic"), nPathFlags );
-}
+}
String GetWritableDictionaryURL( const String &rDicName )
{
@@ -256,12 +256,12 @@ String GetWritableDictionaryURL( const String &rDicName )
}
-String SearchFileInPaths(
- const String &rFile,
+String SearchFileInPaths(
+ const String &rFile,
const uno::Sequence< rtl::OUString > &rPaths )
{
//!! see also SvtPathOptions::SearchFile for the riginal code
-
+
String aRes;
// check in all paths...
@@ -295,7 +295,7 @@ String SearchFileInPaths(
}
return aRes;
-}
+}
} // namespace linguistic