summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/dialog/langbox.cxx6
-rw-r--r--svx/source/dialog/rubydialog.cxx18
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx6
-rw-r--r--svx/source/smarttags/SmartTagMgr.cxx26
-rw-r--r--svx/source/table/accessibletableshape.cxx4
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx8
6 files changed, 34 insertions, 34 deletions
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index c36517d553f3..f8bbd9e99699 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -227,17 +227,17 @@ void SvxLanguageBox::SetLanguageList( sal_Int16 nLangList,
if (LANG_LIST_SPELL_AVAIL & nLangList)
{
- aTmp = xAvail->getAvailableLocales( A2OU( SN_SPELLCHECKER ) );
+ aTmp = xAvail->getAvailableLocales( SN_SPELLCHECKER );
aSpellAvailLang = lcl_LocaleSeqToLangSeq( aTmp );
}
if (LANG_LIST_HYPH_AVAIL & nLangList)
{
- aTmp = xAvail->getAvailableLocales( A2OU( SN_HYPHENATOR ) );
+ aTmp = xAvail->getAvailableLocales( SN_HYPHENATOR );
aHyphAvailLang = lcl_LocaleSeqToLangSeq( aTmp );
}
if (LANG_LIST_THES_AVAIL & nLangList)
{
- aTmp = xAvail->getAvailableLocales( A2OU( SN_THESAURUS ) );
+ aTmp = xAvail->getAvailableLocales( SN_THESAURUS );
aThesAvailLang = lcl_LocaleSeqToLangSeq( aTmp );
}
}
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 7f0fd525c9ed..6b1e52352ba6 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -51,7 +51,7 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::container;
using rtl::OUString;
-#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
+#define cChar rtl::OUString::createFromAscii(cChar)
SFX_IMPL_CHILDWINDOW( SvxRubyChildWindow, SID_RUBY_DIALOG );
@@ -186,11 +186,11 @@ void SvxRubyData_Impl::AssertOneEntry()
Sequence<PropertyValue>& rValues = aRubyValues.getArray()[0];
rValues.realloc(5);
PropertyValue* pValues = rValues.getArray();
- pValues[0].Name = C2U(cRubyBaseText);
- pValues[1].Name = C2U(cRubyText);
- pValues[2].Name = C2U(cRubyAdjust);
- pValues[3].Name = C2U(cRubyIsAbove);
- pValues[4].Name = C2U(cRubyCharStyleName);
+ pValues[0].Name = cRubyBaseText;
+ pValues[1].Name = cRubyText;
+ pValues[2].Name = cRubyAdjust;
+ pValues[3].Name = cRubyIsAbove;
+ pValues[4].Name = cRubyCharStyleName;
}
}
@@ -317,13 +317,13 @@ void SvxRubyDialog::Activate()
try
{
Reference<XNameAccess> xFam = xSupplier->getStyleFamilies();
- Any aChar = xFam->getByName(C2U(cCharacterStyles));
+ Any aChar = xFam->getByName(cCharacterStyles);
Reference<XNameContainer> xChar;
aChar >>= xChar;
Reference<XIndexAccess> xCharIdx(xChar, UNO_QUERY);
if(xCharIdx.is())
{
- OUString sUIName(C2U(cDisplayName));
+ OUString sUIName(cDisplayName);
for(sal_Int32 nStyle = 0; nStyle < xCharIdx->getCount(); nStyle++)
{
Any aStyle = xCharIdx->getByIndex(nStyle);
@@ -488,7 +488,7 @@ void SvxRubyDialog::Update()
if(nPosition > -1)
m_pPositionLB->SelectEntryPos(nPosition ? 1 : 0);
if(!nLen || (bCharStyleEqual && sCharStyleName.isEmpty()))
- sCharStyleName = C2U(cRubies);
+ sCharStyleName = cRubies;
if(!sCharStyleName.isEmpty())
{
for(sal_uInt16 i = 0; i < m_pCharStyleLB->GetEntryCount(); i++)
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 38cdd3a7e5c2..05be4aa986c9 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -64,7 +64,7 @@ using namespace com::sun::star::container;
using namespace com::sun::star::style;
using rtl::OUString;
-#define C2U(cChar) OUString::createFromAscii(cChar)
+#define cChar OUString::createFromAscii(cChar)
#define NUM_PAGETYPE_BULLET 0
#define NUM_PAGETYPE_SINGLENUM 1
#define NUM_PAGETYPE_NUM 2
@@ -211,7 +211,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
aOrgRect.TopLeft(), aRectSize,
*pVDev );
// Now comes the text
- const OUString sValue(C2U(cValue));
+ const OUString sValue(cValue);
if( NUM_PAGETYPE_SINGLENUM == nPageType ||
NUM_PAGETYPE_BULLET == nPageType )
{
@@ -333,7 +333,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
for(sal_Int32 nParentLevel = i - nStartLevel; nParentLevel < i; nParentLevel++)
{
OUString sTmp(sLevelTexts[nParentLevel]);
- sTmp += C2U(".");
+ sTmp += ".";
lcl_PaintLevel(pVDev,
aNumberingTypes[nParentLevel],
sBulletChars[nParentLevel],
diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx
index 229214f19616..a5eb25d39963 100644
--- a/svx/source/smarttags/SmartTagMgr.cxx
+++ b/svx/source/smarttags/SmartTagMgr.cxx
@@ -48,7 +48,7 @@ using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::i18n;
-#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
+#define cChar rtl::OUString::createFromAscii(cChar)
SmartTagMgr::SmartTagMgr( const rtl::OUString& rApplicationName )
@@ -199,7 +199,7 @@ void SmartTagMgr::WriteConfiguration( const bool* pIsLabelTextWithSmartTags,
try
{
- mxConfigurationSettings->setPropertyValue( C2U("RecognizeSmartTags"), aEnabled );
+ mxConfigurationSettings->setPropertyValue( "RecognizeSmartTags", aEnabled );
bCommit = true;
}
catch ( ::com::sun::star::uno::Exception& )
@@ -221,7 +221,7 @@ void SmartTagMgr::WriteConfiguration( const bool* pIsLabelTextWithSmartTags,
try
{
- mxConfigurationSettings->setPropertyValue( C2U("ExcludedSmartTagTypes"), aNewTypes );
+ mxConfigurationSettings->setPropertyValue( "ExcludedSmartTagTypes", aNewTypes );
bCommit = true;
}
catch ( ::com::sun::star::uno::Exception& )
@@ -296,9 +296,9 @@ void SmartTagMgr::changesOccurred( const util::ChangesEvent& rEvent ) throw( Run
rtl::OUString sTemp;
pElementChanges[i].Accessor >>= sTemp;
- if ( sTemp == C2U( "ExcludedSmartTagTypes" ) )
+ if ( sTemp == "ExcludedSmartTagTypes" )
bExcludedTypes = true;
- else if ( sTemp == C2U( "RecognizeSmartTags" ) )
+ else if ( sTemp == "RecognizeSmartTags" )
bRecognize = true;
}
@@ -316,7 +316,7 @@ void SmartTagMgr::LoadLibraries()
return;
// load recognizers: No recognizers -> nothing to do.
- Reference < container::XEnumeration > rEnum = rContent->createContentEnumeration( C2U("com.sun.star.smarttags.SmartTagRecognizer"));
+ Reference < container::XEnumeration > rEnum = rContent->createContentEnumeration( "com.sun.star.smarttags.SmartTagRecognizer");
if ( !rEnum.is() || !rEnum->hasMoreElements() )
return;
@@ -343,7 +343,7 @@ void SmartTagMgr::LoadLibraries()
}
// load actions: No actions -> nothing to do.
- rEnum = rContent->createContentEnumeration( C2U("com.sun.star.smarttags.SmartTagAction"));
+ rEnum = rContent->createContentEnumeration( "com.sun.star.smarttags.SmartTagAction");
if ( !rEnum.is() )
return;
@@ -377,9 +377,9 @@ void SmartTagMgr::LoadLibraries()
*/
void SmartTagMgr::PrepareConfiguration( const rtl::OUString& rConfigurationGroupName )
{
- Any aAny = makeAny( C2U( "/org.openoffice.Office.Common/SmartTags/" ) + rConfigurationGroupName );
+ Any aAny = makeAny( "/org.openoffice.Office.Common/SmartTags/" + rConfigurationGroupName );
beans::PropertyValue aPathArgument;
- aPathArgument.Name = C2U( "nodepath" );
+ aPathArgument.Name = "nodepath";
aPathArgument.Value = aAny;
Sequence< Any > aArguments( 1 );
aArguments[ 0 ] <<= aPathArgument;
@@ -390,7 +390,7 @@ void SmartTagMgr::PrepareConfiguration( const rtl::OUString& rConfigurationGroup
try
{
xConfigurationAccess = xConfProv->createInstanceWithArguments(
- C2U("com.sun.star.configuration.ConfigurationUpdateAccess" ), aArguments );
+ "com.sun.star.configuration.ConfigurationUpdateAccess", aArguments );
}
catch ( uno::Exception& )
{
@@ -402,7 +402,7 @@ void SmartTagMgr::PrepareConfiguration( const rtl::OUString& rConfigurationGroup
try
{
xConfigurationAccess = xConfProv->createInstanceWithArguments(
- C2U("com.sun.star.configuration.ConfigurationAccess" ), aArguments );
+ "com.sun.star.configuration.ConfigurationAccess", aArguments );
}
catch ( uno::Exception& )
{
@@ -424,7 +424,7 @@ void SmartTagMgr::ReadConfiguration( bool bExcludedTypes, bool bRecognize )
{
maDisabledSmartTagTypes.clear();
- Any aAny = mxConfigurationSettings->getPropertyValue( C2U("ExcludedSmartTagTypes") );
+ Any aAny = mxConfigurationSettings->getPropertyValue( "ExcludedSmartTagTypes" );
Sequence< rtl::OUString > aValues;
aAny >>= aValues;
@@ -436,7 +436,7 @@ void SmartTagMgr::ReadConfiguration( bool bExcludedTypes, bool bRecognize )
if ( bRecognize )
{
- Any aAny = mxConfigurationSettings->getPropertyValue( C2U("RecognizeSmartTags") );
+ Any aAny = mxConfigurationSettings->getPropertyValue( "RecognizeSmartTags" );
sal_Bool bValue = sal_True;
aAny >>= bValue;
diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx
index b362b144664e..00ca92be5a14 100644
--- a/svx/source/table/accessibletableshape.cxx
+++ b/svx/source/table/accessibletableshape.cxx
@@ -47,7 +47,7 @@ using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::table;
using namespace ::com::sun::star::container;
-#define C2U(x) OUString(RTL_CONSTASCII_USTRINGPARAM(x))
+#define x OUString(RTL_CONSTASCII_USTRINGPARAM(x))
namespace accessibility
{
@@ -259,7 +259,7 @@ void AccessibleTableShape::Init()
{
Reference< XPropertySet > xSet( mxShape, UNO_QUERY_THROW );
- Reference< XTable > xTable( xSet->getPropertyValue(C2U("Model")), UNO_QUERY_THROW );
+ Reference< XTable > xTable( xSet->getPropertyValue("Model"), UNO_QUERY_THROW );
mxImpl->init( this, xTable );
}
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx
index b766059962cc..119fdd3be16e 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx
@@ -43,7 +43,7 @@ using namespace ::com::sun::star;
#define SERVICE_IMPLEMENTATION_NAME ::rtl::OUString("com.sun.star.comp.linguistic2.ChineseTranslationDialog")
#define SERVICE_NAME ::rtl::OUString("com.sun.star.linguistic2.ChineseTranslationDialog")
-#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
+#define cChar rtl::OUString::createFromAscii(cChar)
ChineseTranslation_UnoDialog::ChineseTranslation_UnoDialog( const uno::Reference< uno::XComponentContext >& xContext )
: m_xCC( xContext )
@@ -233,15 +233,15 @@ uno::Any SAL_CALL ChineseTranslation_UnoDialog::getPropertyValue( const ::rtl::O
m_pDialog->getSettings( bDirectionToSimplified, bTranslateCommonTerms );
}
- if( rPropertyName.equals( C2U("IsDirectionToSimplified") ) )
+ if( rPropertyName.equals( "IsDirectionToSimplified" ) )
{
aRet <<= bDirectionToSimplified;
}
- else if( rPropertyName.equals( C2U("IsUseCharacterVariants") ) )
+ else if( rPropertyName.equals( "IsUseCharacterVariants" ) )
{
aRet <<= bUseCharacterVariants;
}
- else if( rPropertyName.equals( C2U("IsTranslateCommonTerms") ) )
+ else if( rPropertyName.equals( "IsTranslateCommonTerms" ) )
{
aRet <<= bTranslateCommonTerms;
}