diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:22:44 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:00:26 +0000 |
commit | 8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch) | |
tree | 2dbddceebf0f96492adc5652697e8efce8a8ba06 /editeng | |
parent | fe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (diff) |
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:
s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms
Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/misc/acorrcfg.cxx | 4 | ||||
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unonrule.cxx | 10 | ||||
-rw-r--r-- | editeng/source/uno/unopracc.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unotext.cxx | 10 | ||||
-rw-r--r-- | editeng/source/uno/unotext2.cxx | 4 |
6 files changed, 16 insertions, 16 deletions
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx index f7cba0448461..7156590a3f7d 100644 --- a/editeng/source/misc/acorrcfg.cxx +++ b/editeng/source/misc/acorrcfg.cxx @@ -217,7 +217,7 @@ void SvxBaseAutoCorrCfg::Load(sal_Bool bInit) } SvxBaseAutoCorrCfg::SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rPar) : - utl::ConfigItem(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/AutoCorrect"))), + utl::ConfigItem(rtl::OUString("Office.Common/AutoCorrect")), rParent(rPar) { } @@ -526,7 +526,7 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit) } SvxSwAutoCorrCfg::SvxSwAutoCorrCfg(SvxAutoCorrCfg& rPar) : - utl::ConfigItem(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Writer/AutoFunction"))), + utl::ConfigItem(rtl::OUString("Office.Writer/AutoFunction")), rParent(rPar) { } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 3c78120bc0c3..cdc9d2ef13ef 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -2403,7 +2403,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() try { ::ucbhelper::Content aContent ( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), uno::Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - aContent.executeCommand ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "delete" ) ), makeAny ( sal_Bool (sal_True ) ) ); + aContent.executeCommand ( OUString( "delete" ), makeAny ( sal_Bool (sal_True ) ) ); } catch (...) { diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index d8937a746e3a..7440ca6af899 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -158,7 +158,7 @@ const char pSvxUnoNumberingRulesService[] = "com.sun.star.text.NumberingRules"; OUString SAL_CALL SvxUnoNumberingRules::getImplementationName( ) throw(RuntimeException) { - return OUString( RTL_CONSTASCII_USTRINGPARAM( "SvxUnoNumberingRules" ) ); + return OUString( "SvxUnoNumberingRules" ); } sal_Bool SAL_CALL SvxUnoNumberingRules::supportsService( const OUString& ServiceName ) throw(RuntimeException) @@ -211,7 +211,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex( sa sal_Unicode nCode = rFmt.GetBulletChar(); OUString aStr( &nCode, 1 ); aVal <<= aStr; - beans::PropertyValue aBulletProp( OUString(RTL_CONSTASCII_USTRINGPARAM("BulletChar")), -1, aVal, beans::PropertyState_DIRECT_VALUE); + beans::PropertyValue aBulletProp( OUString("BulletChar"), -1, aVal, beans::PropertyState_DIRECT_VALUE); pArray[nIdx++] = aBulletProp; } @@ -233,7 +233,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex( sa RTL_TEXTENCODING_ASCII_US); aVal <<= aURL; - const beans::PropertyValue aGraphicProp( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicURL")), -1, aVal, beans::PropertyState_DIRECT_VALUE); + const beans::PropertyValue aGraphicProp( OUString("GraphicURL"), -1, aVal, beans::PropertyState_DIRECT_VALUE); pArray[nIdx++] = aGraphicProp; } } @@ -242,7 +242,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex( sa const Size aSize( rFmt.GetGraphicSize() ); const awt::Size aUnoSize( aSize.Width(), aSize.Height() ); aVal <<= aUnoSize; - const beans::PropertyValue aGraphicSizeProp(OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicSize")), -1, aVal, beans::PropertyState_DIRECT_VALUE ); + const beans::PropertyValue aGraphicSizeProp(OUString("GraphicSize"), -1, aVal, beans::PropertyState_DIRECT_VALUE ); pArray[nIdx++] = aGraphicSizeProp; } @@ -255,7 +255,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex( sa aVal <<= (sal_Int32)rFmt.GetFirstLineOffset(); pArray[nIdx++] = beans::PropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_FIRST_LINE_OFFSET)), -1, aVal, beans::PropertyState_DIRECT_VALUE); - pArray[nIdx++] = beans::PropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("SymbolTextDistance")), -1, aVal, beans::PropertyState_DIRECT_VALUE); + pArray[nIdx++] = beans::PropertyValue(OUString("SymbolTextDistance"), -1, aVal, beans::PropertyState_DIRECT_VALUE); aVal <<= (sal_Int32)rFmt.GetBulletColor().GetColor(); pArray[nIdx++] = beans::PropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_NRULE_BULLET_COLOR)), -1, aVal, beans::PropertyState_DIRECT_VALUE); diff --git a/editeng/source/uno/unopracc.cxx b/editeng/source/uno/unopracc.cxx index d7e1cf75b25d..30b35357314d 100644 --- a/editeng/source/uno/unopracc.cxx +++ b/editeng/source/uno/unopracc.cxx @@ -131,7 +131,7 @@ uno::Sequence< sal_Int8 > SAL_CALL SvxAccessibleTextPropertySet::getImplementati // XServiceInfo ::rtl::OUString SAL_CALL SAL_CALL SvxAccessibleTextPropertySet::getImplementationName (void) throw (uno::RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("SvxAccessibleTextPropertySet")); + return ::rtl::OUString("SvxAccessibleTextPropertySet"); } sal_Bool SAL_CALL SvxAccessibleTextPropertySet::supportsService (const ::rtl::OUString& sServiceName) throw (uno::RuntimeException) diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 659f0f163978..cc8cd4cd7bbb 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -1669,7 +1669,7 @@ uno::Reference< text::XText > SAL_CALL SvxUnoTextRange::getText() OUString SAL_CALL SvxUnoTextRange::getImplementationName() throw(uno::RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextRange")); + return OUString("SvxUnoTextRange"); } // ==================================================================== @@ -2091,8 +2091,8 @@ void SvxPropertyValuesToItemSet( if (pEntry->nFlags & beans::PropertyAttribute::READONLY) // should be PropertyVetoException which is not yet defined for the new import API's functions - throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) ); - //throw PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) ); + throw uno::RuntimeException( OUString( "Property is read-only: " ) + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) ); + //throw PropertyVetoException ( OUString( "Property is read-only: " ) + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) ); if (pEntry->nWID == WID_FONTDESC) { @@ -2138,7 +2138,7 @@ void SvxPropertyValuesToItemSet( pPropSet->setPropertyValue( pProps[i].Name, pProps[i].Value, rItemSet ); } else - throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) ); + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) ); } } @@ -2266,7 +2266,7 @@ void SvxUnoTextBase::copyText( OUString SAL_CALL SvxUnoTextBase::getImplementationName() throw(uno::RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextBase")); + return OUString("SvxUnoTextBase"); } uno::Sequence< OUString > SAL_CALL SvxUnoTextBase::getSupportedServiceNames( ) diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index 886b99e23e7a..bf18992295e4 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -365,7 +365,7 @@ void SAL_CALL SvxUnoTextContent::setPropertyToDefault( const OUString& PropertyN OUString SAL_CALL SvxUnoTextContent::getImplementationName() throw(uno::RuntimeException) { - return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextContent") ); + return OUString("SvxUnoTextContent"); } uno::Sequence< OUString > SAL_CALL SvxUnoTextContent::getSupportedServiceNames() @@ -677,7 +677,7 @@ void SAL_CALL SvxUnoTextCursor::setString( const OUString& aString ) throw(uno:: // lang::XServiceInfo OUString SAL_CALL SvxUnoTextCursor::getImplementationName() throw(uno::RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextCursor")); + return OUString("SvxUnoTextCursor"); } sal_Bool SAL_CALL SvxUnoTextCursor::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) |