summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorJean-Noël Rouvignac <jn.rouvignac@gmail.com>2013-01-30 11:44:23 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-01-30 12:54:40 +0000
commit97eb8a6e0eb830f37dcba64a51d725aab4c5ff53 (patch)
treea1a95b8249052d846a997ad1729758168d6a3b24 /linguistic
parentf8569cd9a28a3a8856dba4ad53218aa6cc073521 (diff)
Removed several useless macros: A2OU, A2S, C2U, C2S, OUSTR, OUSTRING
Change-Id: Ie859cb2dfdc7103c379fce56be88eef8fe390afd Reviewed-on: https://gerrit.libreoffice.org/1924 Tested-by: Luboš Luňák <l.lunak@suse.cz> Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/inc/linguistic/misc.hxx3
-rw-r--r--linguistic/source/convdic.hxx2
-rw-r--r--linguistic/source/convdiclist.hxx2
-rw-r--r--linguistic/source/convdicxml.cxx16
-rw-r--r--linguistic/source/dicimp.cxx2
-rw-r--r--linguistic/source/dlistimp.cxx4
-rw-r--r--linguistic/source/dlistimp.hxx2
-rw-r--r--linguistic/source/hhconvdic.cxx4
-rw-r--r--linguistic/source/hhconvdic.hxx2
-rw-r--r--linguistic/source/lngopt.cxx2
-rw-r--r--linguistic/source/lngopt.hxx2
-rw-r--r--linguistic/source/lngsvcmgr.hxx2
-rw-r--r--linguistic/source/misc.cxx4
-rw-r--r--linguistic/source/misc2.cxx6
-rw-r--r--linguistic/workben/sprophelp.cxx14
-rw-r--r--linguistic/workben/sspellimp.cxx12
16 files changed, 37 insertions, 42 deletions
diff --git a/linguistic/inc/linguistic/misc.hxx b/linguistic/inc/linguistic/misc.hxx
index 8b54d2889d4f..df5e1eedc78c 100644
--- a/linguistic/inc/linguistic/misc.hxx
+++ b/linguistic/inc/linguistic/misc.hxx
@@ -64,9 +64,6 @@ class LocaleDataWrapper;
namespace linguistic
{
-// ascii to OUString conversion
-#define A2OU(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
-
/// Flags to be used with the multi-path related functions
/// @see GetDictionaryPaths
#define PATH_FLAG_INTERNAL 0x01
diff --git a/linguistic/source/convdic.hxx b/linguistic/source/convdic.hxx
index 13729687f2d3..5beb83f859b7 100644
--- a/linguistic/source/convdic.hxx
+++ b/linguistic/source/convdic.hxx
@@ -155,7 +155,7 @@ public:
inline ::rtl::OUString ConvDic::getImplementationName_Static() throw()
{
- return A2OU( "com.sun.star.lingu2.ConvDic" );
+ return OUString( "com.sun.star.lingu2.ConvDic" );
}
diff --git a/linguistic/source/convdiclist.hxx b/linguistic/source/convdiclist.hxx
index bc526facc5c3..437c0a153078 100644
--- a/linguistic/source/convdiclist.hxx
+++ b/linguistic/source/convdiclist.hxx
@@ -102,7 +102,7 @@ public:
inline ::rtl::OUString ConvDicList::getImplementationName_Static() throw()
{
- return A2OU( "com.sun.star.lingu2.ConvDicList" );
+ return OUString( "com.sun.star.lingu2.ConvDicList" );
}
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index 2daa2c88537f..7b6f71ea6e48 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -67,9 +67,9 @@ static const OUString ConversionTypeToText( sal_Int16 nConversionType )
{
OUString aRes;
if (nConversionType == ConversionDictionaryType::HANGUL_HANJA)
- aRes = A2OU( CONV_TYPE_HANGUL_HANJA );
+ aRes = CONV_TYPE_HANGUL_HANJA;
else if (nConversionType == ConversionDictionaryType::SCHINESE_TCHINESE)
- aRes = A2OU( CONV_TYPE_SCHINESE_TCHINESE );
+ aRes = CONV_TYPE_SCHINESE_TCHINESE;
return aRes;
}
@@ -317,8 +317,8 @@ sal_Bool ConvDicXMLExport::Export()
sal_uInt32 ConvDicXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum /*eClass*/ )
{
- _GetNamespaceMap().Add( A2OU( "tcd" ),
- A2OU( XML_NAMESPACE_TCD_STRING ), XML_NAMESPACE_TCD );
+ _GetNamespaceMap().Add( "tcd",
+ XML_NAMESPACE_TCD_STRING, XML_NAMESPACE_TCD );
GetDocHandler()->startDocument();
@@ -389,7 +389,7 @@ void ConvDicXMLExport::_ExportContent()
::rtl::OUString SAL_CALL ConvDicXMLExport::getImplementationName()
throw( uno::RuntimeException )
{
- return A2OU( "com.sun.star.lingu2.ConvDicXMLExport" );
+ return OUString( "com.sun.star.lingu2.ConvDicXMLExport" );
}
@@ -397,8 +397,8 @@ void SAL_CALL ConvDicXMLImport::startDocument(void)
throw( xml::sax::SAXException, uno::RuntimeException )
{
// register namespace at first possible opportunity
- GetNamespaceMap().Add( A2OU( "tcd" ),
- A2OU( XML_NAMESPACE_TCD_STRING ), XML_NAMESPACE_TCD );
+ GetNamespaceMap().Add( "tcd",
+ XML_NAMESPACE_TCD_STRING, XML_NAMESPACE_TCD );
SvXMLImport::startDocument();
}
@@ -425,7 +425,7 @@ SvXMLImportContext * ConvDicXMLImport::CreateContext(
OUString SAL_CALL ConvDicXMLImport::getImplementationName()
throw( uno::RuntimeException )
{
- return A2OU( "com.sun.star.lingu2.ConvDicXMLImport" );
+ return OUString( "com.sun.star.lingu2.ConvDicXMLImport" );
}
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 231779b8e7dd..1adb901b74e9 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -1059,7 +1059,7 @@ void DicEntry::splitDicFileWord(const OUString &rDicFileWord,
{
MutexGuard aGuard( GetLinguMutex() );
- static const OUString aDelim( A2OU( "==" ) );
+ static const OUString aDelim( "==" );
sal_Int32 nDelimPos = rDicFileWord.indexOf( aDelim );
if (-1 != nDelimPos)
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 5e1b1ffe35b0..ba9c6a34a004 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -667,7 +667,7 @@ void DicList::_CreateDicList()
// create IgnoreAllList dictionary with empty URL (non persistent)
// and add it to list
- rtl::OUString aDicName( A2OU( "IgnoreAllList" ) );
+ rtl::OUString aDicName( "IgnoreAllList" );
uno::Reference< XDictionary > xIgnAll(
createDictionary( aDicName, LinguLanguageToLocale( LANGUAGE_NONE ),
DictionaryType_POSITIVE, rtl::OUString() ) );
@@ -772,7 +772,7 @@ uno::Sequence< rtl::OUString > DicList::getSupportedServiceNames_Static() throw(
osl::MutexGuard aGuard( GetLinguMutex() );
uno::Sequence< rtl::OUString > aSNS( 1 ); // more than 1 service possible
- aSNS.getArray()[0] = A2OU( SN_DICTIONARY_LIST );
+ aSNS.getArray()[0] = SN_DICTIONARY_LIST;
return aSNS;
}
diff --git a/linguistic/source/dlistimp.hxx b/linguistic/source/dlistimp.hxx
index a058f41e8357..f00c20337043 100644
--- a/linguistic/source/dlistimp.hxx
+++ b/linguistic/source/dlistimp.hxx
@@ -132,7 +132,7 @@ public:
inline ::rtl::OUString DicList::getImplementationName_Static() throw()
{
- return A2OU( "com.sun.star.lingu2.DicList" );
+ return OUString( "com.sun.star.lingu2.DicList" );
}
diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx
index 2f5a54934fda..96cdc7e28524 100644
--- a/linguistic/source/hhconvdic.cxx
+++ b/linguistic/source/hhconvdic.cxx
@@ -143,8 +143,8 @@ uno::Sequence< OUString > HHConvDic::getSupportedServiceNames_Static()
throw()
{
uno::Sequence< OUString > aSNS( 2 );
- aSNS.getArray()[0] = A2OU( SN_CONV_DICTIONARY );
- aSNS.getArray()[1] = A2OU( SN_HH_CONV_DICTIONARY );
+ aSNS.getArray()[0] = SN_CONV_DICTIONARY;
+ aSNS.getArray()[1] = SN_HH_CONV_DICTIONARY;
return aSNS;
}
diff --git a/linguistic/source/hhconvdic.hxx b/linguistic/source/hhconvdic.hxx
index b3717f8ac7c3..0a1257b4e302 100644
--- a/linguistic/source/hhconvdic.hxx
+++ b/linguistic/source/hhconvdic.hxx
@@ -60,7 +60,7 @@ public:
inline ::rtl::OUString HHConvDic::getImplementationName_Static() throw()
{
- return A2OU( "com.sun.star.lingu2.HHConvDic" );
+ return OUString( "com.sun.star.lingu2.HHConvDic" );
}
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 856866165b06..aff53c3171d3 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -459,7 +459,7 @@ uno::Sequence< OUString > LinguProps::getSupportedServiceNames_Static()
MutexGuard aGuard( GetLinguMutex() );
uno::Sequence< OUString > aSNS( 1 ); // more than 1 service possible
- aSNS.getArray()[0] = A2OU( SN_LINGU_PROPERTIES );
+ aSNS.getArray()[0] = SN_LINGU_PROPERTIES;
return aSNS;
}
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index 7d109e231b99..949692e24388 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -151,7 +151,7 @@ public:
inline ::rtl::OUString LinguProps::getImplementationName_Static() throw()
{
- return A2OU( "com.sun.star.lingu2.LinguProps" );
+ return OUString( "com.sun.star.lingu2.LinguProps" );
}
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index 91de15e7f5c7..192b98ef6ad8 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -185,7 +185,7 @@ public:
inline ::rtl::OUString LngSvcMgr::getImplementationName_Static()
{
- return A2OU( "com.sun.star.lingu2.LngSvcMgr" );
+ return OUString( "com.sun.star.lingu2.LngSvcMgr" );
}
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index cf590d5119f7..266013188728 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -425,7 +425,7 @@ sal_Bool IsReadOnly( const String &rURL, sal_Bool *pbExist )
bExists = aContent.isDocument();
if (bExists)
{
- Any aAny( aContent.getPropertyValue( A2OU( "IsReadOnly" ) ) );
+ Any aAny( aContent.getPropertyValue( "IsReadOnly" ) );
aAny >>= bRes;
}
}
@@ -790,7 +790,7 @@ uno::Reference< XDictionary > GetIgnoreAllList()
uno::Reference< XDictionary > xRes;
uno::Reference< XDictionaryList > xDL( GetDictionaryList() );
if (xDL.is())
- xRes = xDL->getDictionaryByName( A2OU("IgnoreAllList") );
+ xRes = xDL->getDictionaryByName( "IgnoreAllList" );
return xRes;
}
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index f7e1794a457e..a4ef6d9dbb74 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.cxx
@@ -84,7 +84,7 @@ static uno::Sequence< rtl::OUString > GetMultiPaths_Impl(
aWriteable.AppendAscii( "_writable" );
uno::Reference< beans::XPropertySet > xPathSettings( xMgr->createInstance(
- A2OU( "com.sun.star.util.PathSettings" ) ), uno::UNO_QUERY_THROW );
+ "com.sun.star.util.PathSettings" ), uno::UNO_QUERY_THROW );
xPathSettings->getPropertyValue( aInternal ) >>= aInternalPaths;
xPathSettings->getPropertyValue( aUser ) >>= aUserPaths;
xPathSettings->getPropertyValue( aWriteable ) >>= aWritablePath;
@@ -128,7 +128,7 @@ static uno::Sequence< rtl::OUString > GetMultiPaths_Impl(
rtl::OUString GetDictionaryWriteablePath()
{
- uno::Sequence< rtl::OUString > aPaths( GetMultiPaths_Impl( A2OU("Dictionary"), PATH_FLAG_WRITABLE ) );
+ uno::Sequence< rtl::OUString > aPaths( GetMultiPaths_Impl( "Dictionary", PATH_FLAG_WRITABLE ) );
DBG_ASSERT( aPaths.getLength() == 1, "Dictionary_writable path corrupted?" );
String aRes;
if (aPaths.getLength() > 0)
@@ -138,7 +138,7 @@ rtl::OUString GetDictionaryWriteablePath()
uno::Sequence< rtl::OUString > GetDictionaryPaths( sal_Int16 nPathFlags )
{
- return GetMultiPaths_Impl( A2OU("Dictionary"), nPathFlags );
+ return GetMultiPaths_Impl( "Dictionary", nPathFlags );
}
String GetWritableDictionaryURL( const String &rDicName )
diff --git a/linguistic/workben/sprophelp.cxx b/linguistic/workben/sprophelp.cxx
index 7360aebc92c4..636866fd2deb 100644
--- a/linguistic/workben/sprophelp.cxx
+++ b/linguistic/workben/sprophelp.cxx
@@ -40,8 +40,6 @@ using namespace linguistic;
using ::rtl::OUString;
-#define A2OU(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
-
PropertyChgHelper::PropertyChgHelper(
@@ -191,32 +189,32 @@ PropertyHelper_Spell::PropertyHelper_Spell(
sal_Bool *pbVal = NULL,
*pbResVal = NULL;
- if (A2OU( UPN_IS_GERMAN_PRE_REFORM ) == pPropName[i])
+ if (OUString( UPN_IS_GERMAN_PRE_REFORM ) == pPropName[i])
{
pbVal = &bIsGermanPreReform;
pbResVal = &bResIsGermanPreReform;
}
- else if (A2OU( UPN_IS_IGNORE_CONTROL_CHARACTERS ) == pPropName[i])
+ else if (OUString( UPN_IS_IGNORE_CONTROL_CHARACTERS ) == pPropName[i])
{
pbVal = &bIsIgnoreControlCharacters;
pbResVal = &bResIsIgnoreControlCharacters;
}
- else if (A2OU( UPN_IS_USE_DICTIONARY_LIST ) == pPropName[i])
+ else if (OUString( UPN_IS_USE_DICTIONARY_LIST ) == pPropName[i])
{
pbVal = &bIsUseDictionaryList;
pbResVal = &bResIsUseDictionaryList;
}
- else if (A2OU( UPN_IS_SPELL_UPPER_CASE ) == pPropName[i])
+ else if (OUString( UPN_IS_SPELL_UPPER_CASE ) == pPropName[i])
{
pbVal = &bIsSpellUpperCase;
pbResVal = &bResIsSpellUpperCase;
}
- else if (A2OU( UPN_IS_SPELL_WITH_DIGITS ) == pPropName[i])
+ else if (OUString( UPN_IS_SPELL_WITH_DIGITS ) == pPropName[i])
{
pbVal = &bIsSpellWithDigits;
pbResVal = &bResIsSpellWithDigits;
}
- else if (A2OU( UPN_IS_SPELL_CAPITALIZATION ) == pPropName[i])
+ else if (OUString( UPN_IS_SPELL_CAPITALIZATION ) == pPropName[i])
{
pbVal = &bIsSpellCapitalization;
pbResVal = &bResIsSpellCapitalization;
diff --git a/linguistic/workben/sspellimp.cxx b/linguistic/workben/sspellimp.cxx
index 003ceab5021a..067f9b60f71d 100644
--- a/linguistic/workben/sspellimp.cxx
+++ b/linguistic/workben/sspellimp.cxx
@@ -90,9 +90,9 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
{
aSuppLocales.realloc( 3 );
Locale *pLocale = aSuppLocales.getArray();
- pLocale[0] = Locale( A2OU("en"), A2OU("US"), OUString() );
- pLocale[1] = Locale( A2OU("de"), A2OU("DE"), OUString() );
- pLocale[2] = Locale( A2OU("de"), A2OU("CH"), OUString() );
+ pLocale[0] = Locale( "en", "US", OUString() );
+ pLocale[1] = Locale( "de", "DE", OUString() );
+ pLocale[2] = Locale( "de", "CH"), OUString() );
}
return aSuppLocales;
@@ -218,7 +218,7 @@ Reference< XSpellAlternatives >
if (STRING_NOTFOUND != aTmp.SearchAscii( "liss" ))
{
- aTmp.SearchAndReplaceAllAscii( "liss", A2OU("liz") );
+ aTmp.SearchAndReplaceAllAscii( "liss", "liz" );
xRes = new SpellAlternatives( aTmp, nLang,
SpellFailure::IS_NEGATIVE_WORD, ::com::sun::star::uno::Sequence< ::rtl::OUString >() );
}
@@ -334,7 +334,7 @@ OUString SAL_CALL
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
- return A2OU( "OpenOffice example spellchecker" );
+ return OUString( "OpenOffice example spellchecker" );
}
@@ -441,7 +441,7 @@ Sequence< OUString > SpellChecker::getSupportedServiceNames_Static()
MutexGuard aGuard( GetLinguMutex() );
Sequence< OUString > aSNS( 1 ); // more than 1 service possible
- aSNS.getArray()[0] = A2OU( SN_SPELLCHECKER );
+ aSNS.getArray()[0] = SN_SPELLCHECKER;
return aSNS;
}