summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2011-02-11 20:57:22 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2011-02-11 20:57:22 -0600
commit0d0135e1eee740fea515bac226e4eddf5f48d957 (patch)
treeebcbeb233b055bd27317d1d5d485613cc914ead1
parent7ba4039b217358c49076a58e0f79fb6f661e6a1b (diff)
merge non-conflicting changes in linguistic
-rw-r--r--linguistic/inc/iprcache.hxx2
-rw-r--r--linguistic/inc/linguistic/hyphdta.hxx2
-rw-r--r--linguistic/inc/linguistic/lngprophelp.hxx2
-rw-r--r--linguistic/inc/linguistic/lngprops.hxx2
-rw-r--r--linguistic/inc/linguistic/misc.hxx6
-rw-r--r--linguistic/inc/linguistic/spelldta.hxx2
-rw-r--r--linguistic/inc/pch/precompiled_linguistic.cxx2
-rw-r--r--linguistic/inc/pch/precompiled_linguistic.hxx2
-rw-r--r--linguistic/inc/thesdta.hxx2
-rw-r--r--linguistic/source/convdic.cxx12
-rw-r--r--linguistic/source/convdic.hxx2
-rw-r--r--linguistic/source/convdiclist.cxx8
-rw-r--r--linguistic/source/convdiclist.hxx2
-rw-r--r--linguistic/source/convdicxml.cxx20
-rw-r--r--linguistic/source/convdicxml.hxx2
-rw-r--r--linguistic/source/defs.hxx4
-rwxr-xr-xlinguistic/source/dicimp.cxx2
-rw-r--r--linguistic/source/dicimp.hxx2
-rw-r--r--linguistic/source/dlistimp.cxx2
-rw-r--r--linguistic/source/dlistimp.hxx2
-rw-r--r--linguistic/source/gciterator.cxx4
-rw-r--r--linguistic/source/gciterator.hxx2
-rw-r--r--linguistic/source/grammarchecker.cxx8
-rw-r--r--linguistic/source/grammarchecker.hxx2
-rw-r--r--linguistic/source/hhconvdic.cxx8
-rw-r--r--linguistic/source/hhconvdic.hxx2
-rw-r--r--linguistic/source/hyphdsp.cxx3
-rw-r--r--linguistic/source/hyphdsp.hxx2
-rw-r--r--linguistic/source/hyphdta.cxx2
-rw-r--r--linguistic/source/iprcache.cxx6
-rw-r--r--linguistic/source/lngopt.cxx25
-rw-r--r--linguistic/source/lngopt.hxx4
-rw-r--r--linguistic/source/lngprophelp.cxx16
-rw-r--r--linguistic/source/lngreg.cxx2
-rw-r--r--linguistic/source/lngsvcmgr.cxx42
-rw-r--r--linguistic/source/lngsvcmgr.hxx6
-rw-r--r--linguistic/source/misc.cxx7
-rw-r--r--linguistic/source/misc2.cxx2
-rw-r--r--linguistic/source/spelldsp.cxx2
-rw-r--r--linguistic/source/spelldsp.hxx2
-rw-r--r--linguistic/source/spelldta.cxx2
-rw-r--r--linguistic/source/thesdsp.cxx2
-rw-r--r--linguistic/source/thesdsp.hxx4
-rw-r--r--linguistic/source/thesdta.cxx2
-rw-r--r--linguistic/workben/sprophelp.cxx8
-rw-r--r--linguistic/workben/sprophelp.hxx2
-rw-r--r--linguistic/workben/sreg.cxx2
-rw-r--r--linguistic/workben/sspellimp.cxx4
-rw-r--r--linguistic/workben/sspellimp.hxx7
49 files changed, 156 insertions, 104 deletions
diff --git a/linguistic/inc/iprcache.hxx b/linguistic/inc/iprcache.hxx
index 7d0f028c09..515e7ebe19 100644
--- a/linguistic/inc/iprcache.hxx
+++ b/linguistic/inc/iprcache.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.
@@ -129,3 +130,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/inc/linguistic/hyphdta.hxx b/linguistic/inc/linguistic/hyphdta.hxx
index 1d8b9f2b16..b7c2c908e3 100644
--- a/linguistic/inc/linguistic/hyphdta.hxx
+++ b/linguistic/inc/linguistic/hyphdta.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.
@@ -144,3 +145,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/inc/linguistic/lngprophelp.hxx b/linguistic/inc/linguistic/lngprophelp.hxx
index 323d40bc72..f8d46f4a08 100644
--- a/linguistic/inc/linguistic/lngprophelp.hxx
+++ b/linguistic/inc/linguistic/lngprophelp.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.
@@ -286,3 +287,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/inc/linguistic/lngprops.hxx b/linguistic/inc/linguistic/lngprops.hxx
index c13bdd4874..d285aba124 100644
--- a/linguistic/inc/linguistic/lngprops.hxx
+++ b/linguistic/inc/linguistic/lngprops.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.
@@ -60,3 +61,4 @@
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/inc/linguistic/misc.hxx b/linguistic/inc/linguistic/misc.hxx
index c85981fabe..5853e81d92 100644
--- a/linguistic/inc/linguistic/misc.hxx
+++ b/linguistic/inc/linguistic/misc.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.
@@ -76,7 +77,7 @@ namespace linguistic
{
// ascii to OUString conversion
-#define A2OU(x) ::rtl::OUString::createFromAscii( x )
+#define A2OU(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
/// Flags to be used with the multi-path related functions
/// @see GetDictionaryPaths, GetLinguisticPaths
@@ -165,7 +166,7 @@ String GetModulePath( SvtPathOptions::Pathes ePath, BOOL bAddAccessDelim = TRUE
String GetWritableDictionaryURL( const String &rDicName );
// looks for the specified file in the list of paths.
-// In case of multiple occurences only the first found is returned.
+// In case of multiple occurrences only the first found is returned.
String SearchFileInPaths( const String &rFile, const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rPaths );
@@ -267,3 +268,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/inc/linguistic/spelldta.hxx b/linguistic/inc/linguistic/spelldta.hxx
index a7dc79037f..c0f5aebe23 100644
--- a/linguistic/inc/linguistic/spelldta.hxx
+++ b/linguistic/inc/linguistic/spelldta.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.
@@ -132,3 +133,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/inc/pch/precompiled_linguistic.cxx b/linguistic/inc/pch/precompiled_linguistic.cxx
index e0de179557..32cfae296c 100644
--- a/linguistic/inc/pch/precompiled_linguistic.cxx
+++ b/linguistic/inc/pch/precompiled_linguistic.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.
@@ -27,3 +28,4 @@
#include "precompiled_linguistic.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/inc/pch/precompiled_linguistic.hxx b/linguistic/inc/pch/precompiled_linguistic.hxx
index 54f93806c5..f4a40710f1 100644
--- a/linguistic/inc/pch/precompiled_linguistic.hxx
+++ b/linguistic/inc/pch/precompiled_linguistic.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.
@@ -30,3 +31,4 @@
#ifdef PRECOMPILED_HEADERS
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/inc/thesdta.hxx b/linguistic/inc/thesdta.hxx
index 9c58482870..8c692b46f3 100644
--- a/linguistic/inc/thesdta.hxx
+++ b/linguistic/inc/thesdta.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.
@@ -82,3 +83,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index 7fa917f441..a194554f4c 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.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.
@@ -144,18 +145,12 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport )
try
{
xParser->parseStream( aParserInput ); // implicitly calls ConvDicXMLImport::CreateContext
- if (rImport.GetSuccess())
- nError = 0;
}
catch( xml::sax::SAXParseException& )
{
-// if( bEncrypted )
-// nError = ERRCODE_SFX_WRONGPASSWORD;
}
catch( xml::sax::SAXException& )
{
-// if( bEncrypted )
-// nError = ERRCODE_SFX_WRONGPASSWORD;
}
catch( io::IOException& )
{
@@ -304,7 +299,7 @@ void ConvDic::Save()
{
xSaxWriter = uno::Reference< io::XActiveDataSource >(
xServiceFactory->createInstance(
- OUString::createFromAscii( "com.sun.star.xml.sax.Writer" ) ), UNO_QUERY );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer")) ), UNO_QUERY );
}
catch (uno::Exception &)
{
@@ -717,7 +712,7 @@ sal_Bool SAL_CALL ConvDic::supportsService( const OUString& rServiceName )
{
MutexGuard aGuard( GetLinguMutex() );
sal_Bool bRes = sal_False;
- if (rServiceName.equalsAscii( SN_CONV_DICTIONARY ))
+ if (rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SN_CONV_DICTIONARY)))
bRes = sal_True;
return bRes;
}
@@ -742,3 +737,4 @@ uno::Sequence< OUString > ConvDic::getSupportedServiceNames_Static()
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/convdic.hxx b/linguistic/source/convdic.hxx
index b23276ffe0..793ea851f3 100644
--- a/linguistic/source/convdic.hxx
+++ b/linguistic/source/convdic.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.
@@ -177,3 +178,4 @@ inline ::rtl::OUString ConvDic::getImplementationName_Static() throw()
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index 58ca0a8034..2006ae354c 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.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.
@@ -42,9 +43,7 @@
#include <com/sun/star/linguistic2/ConversionDictionaryType.hpp>
#include <com/sun/star/util/XFlushable.hpp>
#include <com/sun/star/lang/Locale.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.h>
-#endif
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
@@ -321,7 +320,7 @@ void SAL_CALL ConvDicNameContainer::removeByName( const OUString& rName )
{
::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ),
uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
- aCnt.executeCommand( OUString::createFromAscii( "delete" ), makeAny( sal_Bool( sal_True ) ) );
+ aCnt.executeCommand( OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), makeAny( sal_Bool( sal_True ) ) );
}
catch( ::com::sun::star::ucb::CommandAbortedException& )
{
@@ -662,7 +661,7 @@ sal_Bool SAL_CALL ConvDicList::supportsService( const OUString& rServiceName )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
- return rServiceName.equalsAscii( SN_CONV_DICTIONARY_LIST );
+ return rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SN_CONV_DICTIONARY_LIST));
}
@@ -714,3 +713,4 @@ void * SAL_CALL ConvDicList_getFactory(
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/convdiclist.hxx b/linguistic/source/convdiclist.hxx
index 440a0e34d4..383f1c54b8 100644
--- a/linguistic/source/convdiclist.hxx
+++ b/linguistic/source/convdiclist.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.
@@ -120,3 +121,4 @@ inline ::rtl::OUString ConvDicList::getImplementationName_Static() throw()
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index a185ccffdb..15d780af48 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.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.
@@ -44,9 +45,7 @@
#include <com/sun/star/util/XFlushable.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/EventObject.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.h>
-#endif
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/util/XFlushListener.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
@@ -225,7 +224,7 @@ SvXMLImportContext * ConvDicXMLImportContext::CreateChildContext(
const uno::Reference< xml::sax::XAttributeList > & /*rxAttrList*/ )
{
SvXMLImportContext *pContext = 0;
- if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAscii( "text-conversion-dictionary" ))
+ if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("text-conversion-dictionary")))
pContext = new ConvDicXMLDictionaryContext_Impl( GetConvDicImport(), nPrefix, rLocalName );
else
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
@@ -246,9 +245,9 @@ void ConvDicXMLDictionaryContext_Impl::StartElement(
GetKeyByAttrName( aAttrName, &aLocalName );
OUString aValue = rxAttrList->getValueByIndex(i);
- if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAscii( "lang" ))
+ if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("lang")))
nLanguage = MsLangId::convertIsoStringToLanguage( aValue );
- else if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAscii( "conversion-type" ))
+ else if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("conversion-type")))
nConversionType = GetConversionTypeFromText( aValue );
}
GetConvDicImport().SetLanguage( nLanguage );
@@ -265,7 +264,7 @@ SvXMLImportContext * ConvDicXMLDictionaryContext_Impl::CreateChildContext(
const uno::Reference< xml::sax::XAttributeList > & /*rxAttrList*/ )
{
SvXMLImportContext *pContext = 0;
- if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAscii( "entry" ))
+ if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("entry")))
pContext = new ConvDicXMLEntryTextContext_Impl( GetConvDicImport(), nPrefix, rLocalName, *this );
else
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
@@ -279,7 +278,7 @@ SvXMLImportContext * ConvDicXMLEntryTextContext_Impl::CreateChildContext(
const uno::Reference< xml::sax::XAttributeList > & /*rxAttrList*/ )
{
SvXMLImportContext *pContext = 0;
- if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAscii( "right-text" ))
+ if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("right-text")))
pContext = new ConvDicXMLRightTextContext_Impl( GetConvDicImport(), nPrefix, rLocalName, *this );
else
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
@@ -298,9 +297,9 @@ void ConvDicXMLEntryTextContext_Impl::StartElement(
GetKeyByAttrName( aAttrName, &aLocalName );
OUString aValue = rxAttrList->getValueByIndex(i);
- if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAscii( "left-text" ))
+ if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("left-text")))
aLeftText = aValue;
- if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAscii( "property-type" ))
+ if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("property-type")))
nPropertyType = (sal_Int16) aValue.toInt32();
}
}
@@ -444,7 +443,7 @@ SvXMLImportContext * ConvDicXMLImport::CreateContext(
const uno::Reference < xml::sax::XAttributeList > & /*rxAttrList*/ )
{
SvXMLImportContext *pContext = 0;
- if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAscii( "text-conversion-dictionary" ))
+ if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("text-conversion-dictionary")))
pContext = new ConvDicXMLDictionaryContext_Impl( *this, nPrefix, rLocalName );
else
pContext = new SvXMLImportContext( *this, nPrefix, rLocalName );
@@ -460,3 +459,4 @@ OUString SAL_CALL ConvDicXMLImport::getImplementationName()
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/convdicxml.hxx b/linguistic/source/convdicxml.hxx
index a4ef3e4964..e1326c1163 100644
--- a/linguistic/source/convdicxml.hxx
+++ b/linguistic/source/convdicxml.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.
@@ -132,3 +133,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/defs.hxx b/linguistic/source/defs.hxx
index 20fbce08e7..68f320df57 100644
--- a/linguistic/source/defs.hxx
+++ b/linguistic/source/defs.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.
@@ -40,7 +41,7 @@ class SvStream;
///////////////////////////////////////////////////////////////////////////
-#define A2OU(x) ::rtl::OUString::createFromAscii( x )
+typedef boost::shared_ptr< SvStream > SvStreamPtr;
typedef boost::shared_ptr< SvStream > SvStreamPtr;
@@ -134,3 +135,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 3460246dbc..f96da93318 100755
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.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.
@@ -1152,3 +1153,4 @@ OUString SAL_CALL DicEntry::getReplacementText( )
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/dicimp.hxx b/linguistic/source/dicimp.hxx
index b4c31288c6..456ef997d2 100644
--- a/linguistic/source/dicimp.hxx
+++ b/linguistic/source/dicimp.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.
@@ -236,3 +237,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 872b942dea..f250bfb4af 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.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.
@@ -942,3 +943,4 @@ static BOOL IsVers2OrNewer( const String& rFileURL, USHORT& nLng, BOOL& bNeg )
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/dlistimp.hxx b/linguistic/source/dlistimp.hxx
index 87a3ca58f9..f4b7e0a4c4 100644
--- a/linguistic/source/dlistimp.hxx
+++ b/linguistic/source/dlistimp.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.
@@ -149,3 +150,4 @@ inline ::rtl::OUString DicList::getImplementationName_Static() throw()
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index db212d4d60..25411b07b3 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.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.
@@ -26,6 +27,7 @@
************************************************************************/
#include "precompiled_linguistic.hxx"
+#include <sal/macros.h>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -137,7 +139,7 @@ static sal_Unicode aWhiteSpaces[] =
0xfffb /* INTERLINEAR ANNOTATION TERMINATOR */
};
-static int nWhiteSpaces = sizeof( aWhiteSpaces ) / sizeof( aWhiteSpaces[0] );
+static int nWhiteSpaces = SAL_N_ELEMENTS( aWhiteSpaces );
static bool lcl_IsWhiteSpace( sal_Unicode cChar )
{
diff --git a/linguistic/source/gciterator.hxx b/linguistic/source/gciterator.hxx
index 1888726704..9932c599d7 100644
--- a/linguistic/source/gciterator.hxx
+++ b/linguistic/source/gciterator.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.
@@ -207,3 +208,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/grammarchecker.cxx b/linguistic/source/grammarchecker.cxx
index ac401c68fc..98c1e2e523 100644
--- a/linguistic/source/grammarchecker.cxx
+++ b/linguistic/source/grammarchecker.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.
@@ -162,10 +163,10 @@ uno::Sequence< linguistic2::SingleGrammarError > GrammarChecker::GrammarChecking
Error_t aError;
uno::Sequence< OUString > aSuggestion(1);
OUString *pSeggestion = aSuggestion.getArray();
- pSeggestion[0] = OUString::createFromAscii("Modified");
+ pSeggestion[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Modified"));
- aError[OUString::createFromAscii("GrammarError")] = aSuggestion;
- aError[OUString::createFromAscii("Grammar Error")] = aSuggestion;
+ aError[OUString(RTL_CONSTASCII_USTRINGPARAM("GrammarError"))] = aSuggestion;
+ aError[OUString(RTL_CONSTASCII_USTRINGPARAM("Grammar Error"))] = aSuggestion;
typedef std::vector< linguistic2::SingleGrammarError> ErrorVector_t;
ErrorVector_t aErrorVector;
@@ -303,3 +304,4 @@ void * SAL_CALL GrammarChecker_getFactory( const sal_Char * pImplName, lang::XMu
return pRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/grammarchecker.hxx b/linguistic/source/grammarchecker.hxx
index 7c7f6cd5aa..bae78b6c15 100644
--- a/linguistic/source/grammarchecker.hxx
+++ b/linguistic/source/grammarchecker.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.
@@ -106,3 +107,4 @@ inline ::rtl::OUString GrammarChecker::getImplementationName_Static()
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx
index ff83f7a71d..d309072123 100644
--- a/linguistic/source/hhconvdic.cxx
+++ b/linguistic/source/hhconvdic.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.
@@ -42,9 +43,7 @@
#include <com/sun/star/linguistic2/XConversionDictionary.hpp>
#include <com/sun/star/linguistic2/ConversionDictionaryType.hpp>
#include <com/sun/star/lang/Locale.hpp>
-#ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
#include <com/sun/star/uno/Reference.h>
-#endif
#include <com/sun/star/registry/XRegistryKey.hpp>
#include "hhconvdic.hxx"
@@ -141,8 +140,8 @@ sal_Bool SAL_CALL HHConvDic::supportsService( const OUString& rServiceName )
{
MutexGuard aGuard( GetLinguMutex() );
sal_Bool bRes = sal_False;
- if (rServiceName.equalsAscii( SN_CONV_DICTIONARY )||
- rServiceName.equalsAscii( SN_HH_CONV_DICTIONARY ))
+ if (rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SN_CONV_DICTIONARY)) ||
+ rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SN_HH_CONV_DICTIONARY)))
bRes = sal_True;
return bRes;
}
@@ -167,3 +166,4 @@ uno::Sequence< OUString > HHConvDic::getSupportedServiceNames_Static()
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/hhconvdic.hxx b/linguistic/source/hhconvdic.hxx
index f83f924af8..36388f825b 100644
--- a/linguistic/source/hhconvdic.hxx
+++ b/linguistic/source/hhconvdic.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.
@@ -76,3 +77,4 @@ inline ::rtl::OUString HHConvDic::getImplementationName_Static() throw()
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index 71222dcc6c..ba9562016f 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -245,7 +245,7 @@ Sequence< Locale > SAL_CALL HyphenatorDispatcher::getLocales()
}
-BOOL SAL_CALL HyphenatorDispatcher::hasLocale(const Locale& rLocale)
+sal_Bool SAL_CALL HyphenatorDispatcher::hasLocale(const Locale& rLocale)
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -734,3 +734,4 @@ LinguDispatcher::DspType HyphenatorDispatcher::GetDspType() const
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/hyphdsp.hxx b/linguistic/source/hyphdsp.hxx
index 846c4fea0c..5bd3dcc6c5 100644
--- a/linguistic/source/hyphdsp.hxx
+++ b/linguistic/source/hyphdsp.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.
@@ -170,3 +171,4 @@ inline ::com::sun::star::uno::Reference<
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/hyphdta.cxx b/linguistic/source/hyphdta.cxx
index 633bc19c5a..70bbbca426 100644
--- a/linguistic/source/hyphdta.cxx
+++ b/linguistic/source/hyphdta.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.
@@ -187,3 +188,4 @@ Sequence< sal_Int16 > SAL_CALL PossibleHyphens::getHyphenationPositions()
} // namespace linguistic
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/iprcache.cxx b/linguistic/source/iprcache.cxx
index 95a646ccdb..fc49cbf5cd 100644
--- a/linguistic/source/iprcache.cxx
+++ b/linguistic/source/iprcache.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.
@@ -99,7 +100,7 @@ static void lcl_AddAsPropertyChangeListener(
for (int i = 0; i < NUM_FLUSH_PROPS; ++i)
{
rPropSet->addPropertyChangeListener(
- A2OU(aFlushProperties[i].pPropName), xListener );
+ ::rtl::OUString::createFromAscii(aFlushProperties[i].pPropName), xListener );
}
}
}
@@ -114,7 +115,7 @@ static void lcl_RemoveAsPropertyChangeListener(
for (int i = 0; i < NUM_FLUSH_PROPS; ++i)
{
rPropSet->removePropertyChangeListener(
- A2OU(aFlushProperties[i].pPropName), xListener );
+ ::rtl::OUString::createFromAscii(aFlushProperties[i].pPropName), xListener );
}
}
}
@@ -282,3 +283,4 @@ void SpellCache::AddWord( const OUString& rWord, LanguageType nLang )
} // namespace linguistic
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index c3d25f30e7..12d126c8aa 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.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.
@@ -28,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_linguistic.hxx"
+#include <sal/macros.h>
#include "lngopt.hxx"
#include "linguistic/lngprops.hxx"
#include "linguistic/misc.hxx"
@@ -64,7 +66,7 @@ using namespace com::sun::star::registry;
// static member intialization
SvtLinguOptions * LinguOptions::pData = NULL;
-vos::ORefCount LinguOptions::aRefCount;
+oslInterlockedCount LinguOptions::nRefCount;
LinguOptions::LinguOptions()
@@ -76,14 +78,14 @@ LinguOptions::LinguOptions()
aLinguCfg.GetOptions( *pData );
}
- ++aRefCount;
+ osl_incrementInterlockedCount( &nRefCount );
}
LinguOptions::LinguOptions(const LinguOptions & /*rOpt*/)
{
DBG_ASSERT( pData, "lng : data missing" );
- ++aRefCount;
+ osl_incrementInterlockedCount( &nRefCount );
}
@@ -91,7 +93,7 @@ LinguOptions::~LinguOptions()
{
MutexGuard aGuard( GetLinguMutex() );
- if (--aRefCount == 0)
+ if ( osl_decrementInterlockedCount( &nRefCount ) == 0 )
{
delete pData; pData = NULL;
}
@@ -297,17 +299,11 @@ OUString LinguOptions::GetName( INT32 nWID )
OUString aRes;
- INT32 nLen = sizeof( aWID_Name ) / sizeof( aWID_Name[0] );
- if (0 <= nWID && nWID < nLen
- && aWID_Name[ nWID ].nWID == nWID)
- {
- aRes = OUString( RTL_CONSTASCII_USTRINGPARAM(
- aWID_Name[ nWID ].pPropertyName ) );
- }
+ INT32 nLen = SAL_N_ELEMENTS( aWID_Name );
+ if (0 <= nWID && nWID < nLen && aWID_Name[ nWID ].nWID == nWID)
+ aRes = OUString::createFromAscii(aWID_Name[nWID].pPropertyName);
else
- {
- DBG_ASSERT( 0,"lng : unknown WID");
- }
+ OSL_ENSURE(false, "lng : unknown WID");
return aRes;
}
@@ -686,3 +682,4 @@ void * SAL_CALL LinguProps_getFactory( const sal_Char * pImplName,
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index 0392335318..5602c1a30f 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.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.
@@ -68,7 +69,7 @@ namespace com { namespace sun { namespace star {
class LinguOptions
{
static SvtLinguOptions *pData;
- static vos::ORefCount aRefCount; // number of objects of this class
+ static oslInterlockedCount nRefCount; // number of objects of this class
//! uses default assignment-operator
@@ -184,3 +185,4 @@ inline ::rtl::OUString LinguProps::getImplementationName_Static() throw()
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx
index 6697e5eb55..da6750ddb8 100644
--- a/linguistic/source/lngprophelp.cxx
+++ b/linguistic/source/lngprophelp.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.
@@ -29,6 +30,7 @@
#include "precompiled_linguistic.hxx"
#include <tools/debug.hxx>
+#include <sal/macros.h>
#include <com/sun/star/linguistic2/LinguServiceEvent.hpp>
#include <com/sun/star/linguistic2/LinguServiceEventFlags.hpp>
@@ -63,7 +65,7 @@ static const char *aCH[] =
UPN_IS_USE_DICTIONARY_LIST,
};
-static int nCHCount = sizeof(aCH) / sizeof(aCH[0]);
+static int nCHCount = SAL_N_ELEMENTS(aCH);
PropertyChgHelper::PropertyChgHelper(
@@ -80,7 +82,7 @@ PropertyChgHelper::PropertyChgHelper(
OUString *pName = aPropNames.getArray();
for (INT32 i = 0; i < nCHCount; ++i)
{
- pName[i] = A2OU( aCH[i] );
+ pName[i] = ::rtl::OUString::createFromAscii( aCH[i] );
}
SetDefaultValues();
@@ -117,7 +119,8 @@ void PropertyChgHelper::AddPropNames( const char *pNewNames[], INT32 nCount )
OUString *pName = GetPropNames().getArray();
for (INT32 i = 0; i < nCount; ++i)
{
- pName[ nLen + i ] = A2OU( pNewNames[ i ] );
+ pName[ nLen + i ] = ::rtl::OUString::createFromAscii( pNewNames[ i ] );
+
}
}
}
@@ -388,7 +391,7 @@ PropertyHelper_Spell::PropertyHelper_Spell(
Reference< XPropertySet > &rxPropSet ) :
PropertyChgHelper ( rxSource, rxPropSet, AE_SPELLCHECKER )
{
- AddPropNames( aSP, sizeof(aSP) / sizeof(aSP[0]) );
+ AddPropNames( aSP, SAL_N_ELEMENTS(aSP));
SetDefaultValues();
GetCurrentValues();
@@ -534,7 +537,7 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals )
const PropertyValue *pVal = rPropVals.getConstArray();
for (INT32 i = 0; i < nLen; ++i)
{
- if (pVal[i].Name.equalsAscii( UPN_MAX_NUMBER_OF_SUGGESTIONS ))
+ if (pVal[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UPN_MAX_NUMBER_OF_SUGGESTIONS)))
{
pVal[i].Value >>= nResMaxNumberOfSuggestions;
}
@@ -576,7 +579,7 @@ PropertyHelper_Hyphen::PropertyHelper_Hyphen(
Reference< XPropertySet > &rxPropSet ) :
PropertyChgHelper ( rxSource, rxPropSet, AE_HYPHENATOR )
{
- AddPropNames( aHP, sizeof(aHP) / sizeof(aHP[0]) );
+ AddPropNames( aHP, SAL_N_ELEMENTS(aHP));
SetDefaultValues();
GetCurrentValues();
}
@@ -715,3 +718,4 @@ void PropertyHelper_Hyphen::SetTmpPropVals( const PropertyValues &rPropVals )
} // namespace linguistic
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/lngreg.cxx b/linguistic/source/lngreg.cxx
index be7fb66b9a..72876519ab 100644
--- a/linguistic/source/lngreg.cxx
+++ b/linguistic/source/lngreg.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.
@@ -138,3 +139,4 @@ void * SAL_CALL component_getFactory(
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 84daadf156..20030917de 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.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.
@@ -580,10 +581,6 @@ LngSvcMgr::LngSvcMgr() :
utl::ConfigItem( String::CreateFromAscii( "Office.Linguistic" ) ),
aEvtListeners ( GetLinguMutex() )
{
- bHasAvailSpellLocales =
- bHasAvailGrammarLocales =
- bHasAvailHyphLocales =
- bHasAvailThesLocales =
bDisposing = FALSE;
pSpellDsp = 0;
@@ -1479,39 +1476,21 @@ uno::Sequence< lang::Locale > SAL_CALL
uno::Sequence< lang::Locale > aRes;
uno::Sequence< lang::Locale > *pAvailLocales = NULL;
- BOOL *pHasAvailLocales = NULL;
if (0 == rServiceName.compareToAscii( SN_SPELLCHECKER ))
- {
pAvailLocales = &aAvailSpellLocales;
- pHasAvailLocales = &bHasAvailSpellLocales;
- }
else if (0 == rServiceName.compareToAscii( SN_GRAMMARCHECKER ))
- {
pAvailLocales = &aAvailGrammarLocales;
- pHasAvailLocales = &bHasAvailGrammarLocales;
- }
else if (0 == rServiceName.compareToAscii( SN_HYPHENATOR ))
- {
pAvailLocales = &aAvailHyphLocales;
- pHasAvailLocales = &bHasAvailHyphLocales;
- }
else if (0 == rServiceName.compareToAscii( SN_THESAURUS ))
- {
pAvailLocales = &aAvailThesLocales;
- pHasAvailLocales = &bHasAvailThesLocales;
- }
- // about pHasAvailLocales: nowadays (with OOo lingu in SO) we want to know immediately about
+ // Nowadays (with OOo lingu in SO) we want to know immediately about
// new downloaded dictionaries and have them ready right away if the Tools/Options...
// is used to activate them. Thus we can not rely anymore on buffered data.
- if (pAvailLocales /*&& pHasAvailLocales */)
- {
-// if (!*pHasAvailLocales)
-// {
- *pAvailLocales = GetAvailLocales(
- getAvailableServices( rServiceName, lang::Locale() ) );
-// *pHasAvailLocales = TRUE;
-// }
+ if (pAvailLocales)
+ {
+ *pAvailLocales = GetAvailLocales(getAvailableServices(rServiceName, lang::Locale()));
aRes = *pAvailLocales;
}
@@ -1684,7 +1663,7 @@ BOOL LngSvcMgr::SaveCfgSvcs( const String &rServiceName )
{
DBG_ASSERT( 0, "node name missing" );
}
- OUString aNodeName( A2OU(pNodeName) );
+ OUString aNodeName( ::rtl::OUString::createFromAscii(pNodeName) );
for (INT32 i = 0; i < nLen; ++i)
{
@@ -1804,7 +1783,7 @@ uno::Sequence< OUString > SAL_CALL
OUString *pNames = aNames.getArray();
if ( 0 == rServiceName.compareToAscii( SN_SPELLCHECKER ) )
{
- OUString aNode( OUString::createFromAscii( "ServiceManager/SpellCheckerList" ));
+ OUString aNode( RTL_CONSTASCII_USTRINGPARAM("ServiceManager/SpellCheckerList"));
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
if (lcl_SeqHasString( aNodeEntries, aCfgLocale ))
{
@@ -1819,7 +1798,7 @@ uno::Sequence< OUString > SAL_CALL
}
else if ( 0 == rServiceName.compareToAscii( SN_GRAMMARCHECKER ) )
{
- OUString aNode( OUString::createFromAscii( "ServiceManager/GrammarCheckerList" ));
+ OUString aNode( RTL_CONSTASCII_USTRINGPARAM("ServiceManager/GrammarCheckerList"));
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
if (lcl_SeqHasString( aNodeEntries, aCfgLocale ))
{
@@ -1834,7 +1813,7 @@ uno::Sequence< OUString > SAL_CALL
}
else if ( 0 == rServiceName.compareToAscii( SN_HYPHENATOR ) )
{
- OUString aNode( OUString::createFromAscii( "ServiceManager/HyphenatorList" ));
+ OUString aNode( RTL_CONSTASCII_USTRINGPARAM("ServiceManager/HyphenatorList"));
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
if (lcl_SeqHasString( aNodeEntries, aCfgLocale ))
{
@@ -1849,7 +1828,7 @@ uno::Sequence< OUString > SAL_CALL
}
else if ( 0 == rServiceName.compareToAscii( SN_THESAURUS ) )
{
- OUString aNode( OUString::createFromAscii( "ServiceManager/ThesaurusList" ));
+ OUString aNode( RTL_CONSTASCII_USTRINGPARAM("ServiceManager/ThesaurusList"));
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
if (lcl_SeqHasString( aNodeEntries, aCfgLocale ))
{
@@ -2025,3 +2004,4 @@ void * SAL_CALL LngSvcMgr_getFactory(
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index e91be208fc..54200518f1 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.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.
@@ -113,10 +114,6 @@ class LngSvcMgr :
SvcInfoArray * pAvailThesSvcs;
BOOL bDisposing;
- BOOL bHasAvailSpellLocales;
- BOOL bHasAvailGrammarLocales;
- BOOL bHasAvailHyphLocales;
- BOOL bHasAvailThesLocales;
// disallow copy-constructor and assignment-operator for now
LngSvcMgr(const LngSvcMgr &);
@@ -199,3 +196,4 @@ inline ::rtl::OUString LngSvcMgr::getImplementationName_Static()
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index be0763cfb8..4c33724816 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.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.
@@ -27,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_linguistic.hxx"
+#include <sal/macros.h>
#include <tools/string.hxx>
#include <tools/fsys.hxx>
#include <tools/debug.hxx>
@@ -835,7 +837,7 @@ static const sal_uInt32 the_aDigitZeroes [] =
BOOL HasDigits( const OUString &rText )
{
- static const int nNumDigitZeroes = sizeof(the_aDigitZeroes) / sizeof(the_aDigitZeroes[0]);
+ static const int nNumDigitZeroes = SAL_N_ELEMENTS(the_aDigitZeroes);
const sal_Int32 nLen = rText.getLength();
sal_Int32 i = 0;
@@ -890,7 +892,7 @@ uno::Reference< XInterface > GetOneInstanceService( const char *pServiceName )
{
try
{
- xRef = xMgr->createInstance( A2OU( pServiceName ) );
+ xRef = xMgr->createInstance( ::rtl::OUString::createFromAscii( pServiceName ) );
}
catch (uno::Exception &)
{
@@ -1007,3 +1009,4 @@ void SAL_CALL
} // namespace linguistic
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index 40d7a3be93..8031171308 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.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.
@@ -298,3 +299,4 @@ String SearchFileInPaths(
} // namespace linguistic
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index a21dbd45e2..621960471a 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.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.
@@ -869,3 +870,4 @@ void SpellCheckerDispatcher::FlushSpellCache()
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx
index 52340fecde..19d6111dfd 100644
--- a/linguistic/source/spelldsp.hxx
+++ b/linguistic/source/spelldsp.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.
@@ -161,3 +162,4 @@ inline ::com::sun::star::uno::Reference<
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx
index 813584b932..5545caa470 100644
--- a/linguistic/source/spelldta.cxx
+++ b/linguistic/source/spelldta.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.
@@ -364,3 +365,4 @@ void SpellAlternatives::SetAlternatives( const Sequence< OUString > &rAlt )
} // namespace linguistic
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx
index fba39f54f1..13add1a60c 100644
--- a/linguistic/source/thesdsp.cxx
+++ b/linguistic/source/thesdsp.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.
@@ -280,3 +281,4 @@ LinguDispatcher::DspType ThesaurusDispatcher::GetDspType() const
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/thesdsp.hxx b/linguistic/source/thesdsp.hxx
index 97259e1678..3b12cf1b1c 100644
--- a/linguistic/source/thesdsp.hxx
+++ b/linguistic/source/thesdsp.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.
@@ -45,7 +46,7 @@
#include <cppuhelper/implbase5.hxx> // helper for implementations
#include <cppuhelper/interfacecontainer.h>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <boost/shared_ptr.hpp>
#include <map>
@@ -127,3 +128,4 @@ inline ::com::sun::star::uno::Reference<
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/thesdta.cxx b/linguistic/source/thesdta.cxx
index b76b914c32..82de7cfb7e 100644
--- a/linguistic/source/thesdta.cxx
+++ b/linguistic/source/thesdta.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.
@@ -81,3 +82,4 @@ uno::Sequence< OUString > SAL_CALL ThesaurusMeaning::querySynonyms()
} // namespace linguistic
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/workben/sprophelp.cxx b/linguistic/workben/sprophelp.cxx
index db72008c03..4940864c11 100644
--- a/linguistic/workben/sprophelp.cxx
+++ b/linguistic/workben/sprophelp.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.
@@ -51,7 +52,7 @@ using namespace com::sun::star::linguistic2;
using namespace linguistic;
-#define A2OU(x) ::rtl::OUString::createFromAscii( x )
+#define A2OU(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
///////////////////////////////////////////////////////////////////////////
@@ -68,7 +69,7 @@ PropertyChgHelper::PropertyChgHelper(
OUString *pName = aPropNames.getArray();
for (INT32 i = 0; i < nPropCount; ++i)
{
- pName[i] = A2OU( pPropNames[i] );
+ pName[i] = ::rtl::OUString::createFromAscii( pPropNames[i] );
}
}
@@ -192,7 +193,7 @@ static const char *aSP[] =
PropertyHelper_Spell::PropertyHelper_Spell(
const Reference< XInterface > & rxSource,
Reference< XPropertySet > &rxPropSet ) :
- PropertyChgHelper ( rxSource, rxPropSet, aSP, sizeof(aSP) / sizeof(aSP[0]) )
+ PropertyChgHelper ( rxSource, rxPropSet, aSP, SAL_N_ELEMENTS(aSP))
{
SetDefault();
INT32 nLen = GetPropNames().getLength();
@@ -370,3 +371,4 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals )
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/workben/sprophelp.hxx b/linguistic/workben/sprophelp.hxx
index 30a7656acc..c84f7de550 100644
--- a/linguistic/workben/sprophelp.hxx
+++ b/linguistic/workben/sprophelp.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.
@@ -170,3 +171,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/workben/sreg.cxx b/linguistic/workben/sreg.cxx
index f574977cab..b466c9dc57 100644
--- a/linguistic/workben/sreg.cxx
+++ b/linguistic/workben/sreg.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.
@@ -83,3 +84,4 @@ void * SAL_CALL component_getFactory(
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/workben/sspellimp.cxx b/linguistic/workben/sspellimp.cxx
index 8ac51a7a00..e6735a60c6 100644
--- a/linguistic/workben/sspellimp.cxx
+++ b/linguistic/workben/sspellimp.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.
@@ -37,9 +38,7 @@
#include <unotools/processfactory.hxx>
#include <osl/mutex.hxx>
-#ifndef _SPELLIMP_HXX
#include <sspellimp.hxx>
-#endif
#include "linguistic/lngprops.hxx"
#include "linguistic/spelldta.hxx"
@@ -510,3 +509,4 @@ void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName,
///////////////////////////////////////////////////////////////////////////
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/workben/sspellimp.hxx b/linguistic/workben/sspellimp.hxx
index 8f6494f478..676e1ecc3b 100644
--- a/linguistic/workben/sspellimp.hxx
+++ b/linguistic/workben/sspellimp.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.
@@ -51,9 +52,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::linguistic2;
-
-#define A2OU(x) ::rtl::OUString::createFromAscii( x )
-
///////////////////////////////////////////////////////////////////////////
@@ -167,7 +165,7 @@ public:
inline OUString SpellChecker::getImplementationName_Static() throw()
{
- return A2OU( "com.sun.star.lingu.examples.SpellChecker" );
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.lingu.examples.SpellChecker" ));
}
@@ -175,3 +173,4 @@ inline OUString SpellChecker::getImplementationName_Static() throw()
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */