summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/access/accpreview.cxx5
-rw-r--r--sw/source/core/crsr/pam.cxx2
-rw-r--r--sw/source/core/text/portxt.cxx8
-rw-r--r--sw/source/core/unocore/unofield.cxx9
-rw-r--r--sw/source/core/unocore/unoidx.cxx51
-rw-r--r--sw/source/core/unocore/unoobj2.cxx2
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx2
-rw-r--r--sw/source/core/unocore/unosett.cxx4
-rw-r--r--sw/source/core/unocore/unotbl.cxx11
-rw-r--r--sw/source/core/unocore/unotext.cxx3
10 files changed, 34 insertions, 63 deletions
diff --git a/sw/source/core/access/accpreview.cxx b/sw/source/core/access/accpreview.cxx
index 8f7f122fb9c1..6396f7c30f32 100644
--- a/sw/source/core/access/accpreview.cxx
+++ b/sw/source/core/access/accpreview.cxx
@@ -63,10 +63,7 @@ OUString SwAccessiblePreview::getImplementationName( )
sal_Bool SwAccessiblePreview::supportsService( const OUString& rServiceName )
throw( RuntimeException )
{
- return rServiceName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( sServiceName) ) ||
- rServiceName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( sAccessibleServiceName ) );
+ return rServiceName == sServiceName || rServiceName == sAccessibleServiceName;
}
Sequence<OUString> SwAccessiblePreview::getSupportedServiceNames( )
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 0d9211bdcd0e..66d43b98ae1b 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -744,7 +744,7 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
sw::mark::IFieldmark* pFieldmark = pMarksAccess->getFieldmarkFor( *GetPoint() );
if ( pFieldmark )
- bUnhandledMark = pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) );
+ bUnhandledMark = pFieldmark->GetFieldname( ) == ODF_UNHANDLED;
}
if (!bRet)
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 5a4d71242de4..3932f3754b0f 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -807,13 +807,13 @@ void SwFieldFormPortion::Paint( const SwTxtPaintInfo& rInf ) const
if ( pBM != NULL )
{
- if ( pBM->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ) )
+ if ( pBM->GetFieldname( ) == ODF_FORMCHECKBOX )
{ // a checkbox...
ICheckboxFieldmark* pCheckboxFm = dynamic_cast< ICheckboxFieldmark* >(pBM);
bool checked = pCheckboxFm->IsChecked();
rInf.DrawCheckBox(*this, checked);
}
- else if ( pBM->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) )
+ else if ( pBM->GetFieldname( ) == ODF_FORMDROPDOWN )
{ // a list...
rtl::OUString aTxt;
getCurrentListIndex( pBM, &aTxt );
@@ -838,13 +838,13 @@ sal_Bool SwFieldFormPortion::Format( SwTxtFormatInfo & rInf )
OSL_ENSURE( pBM != NULL, "Where is my form field bookmark???" );
if ( pBM != NULL )
{
- if ( pBM->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ) )
+ if ( pBM->GetFieldname( ) == ODF_FORMCHECKBOX )
{
Width( rInf.GetTxtHeight( ) );
Height( rInf.GetTxtHeight( ) );
SetAscent( rInf.GetAscent( ) );
}
- else if ( pBM->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) )
+ else if ( pBM->GetFieldname( ) == ODF_FORMDROPDOWN )
{
::rtl::OUString aTxt;
getCurrentListIndex( pBM, &aTxt );
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 276a336127e8..75253bd9d7b7 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2381,8 +2381,7 @@ OUString SwXTextFieldMasters::getImplementationName(void) throw( uno::RuntimeExc
sal_Bool SwXTextFieldMasters::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
- return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
- "com.sun.star.text.TextFieldMasters" ));
+ return rServiceName == "com.sun.star.text.TextFieldMasters";
}
uno::Sequence< OUString > SwXTextFieldMasters::getSupportedServiceNames(void) throw( uno::RuntimeException )
@@ -2600,8 +2599,7 @@ OUString SwXTextFieldTypes::getImplementationName(void) throw( uno::RuntimeExcep
sal_Bool SwXTextFieldTypes::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
- return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
- "com.sun.star.text.TextFields" ));
+ return rServiceName == "com.sun.star.text.TextFields";
}
uno::Sequence< OUString > SwXTextFieldTypes::getSupportedServiceNames(void) throw( uno::RuntimeException )
@@ -2691,8 +2689,7 @@ OUString SwXFieldEnumeration::getImplementationName(void) throw( uno::RuntimeExc
sal_Bool SwXFieldEnumeration::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
- return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
- "com.sun.star.text.FieldEnumeration" ));
+ return rServiceName == "com.sun.star.text.FieldEnumeration";
}
uno::Sequence< OUString > SwXFieldEnumeration::getSupportedServiceNames(void) throw( uno::RuntimeException )
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index de9d4331f5f9..1382a034abc3 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -464,20 +464,13 @@ throw (uno::RuntimeException)
SolarMutexGuard g;
return C2U("com.sun.star.text.BaseIndex") == rServiceName
- || ((TOX_INDEX == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentIndex")))
- || ((TOX_CONTENT == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.ContentIndex")))
- || ((TOX_USER == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.UserDefinedIndex")))
- || ((TOX_ILLUSTRATIONS == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.IllustrationsIndex")))
- || ((TOX_TABLES == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TableIndex")))
- || ((TOX_OBJECTS == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.ObjectIndex")))
- || ((TOX_AUTHORITIES == m_pImpl->m_eTOXType) &&
- rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.Bibliography")));
+ || ((TOX_INDEX == m_pImpl->m_eTOXType) && rServiceName == "com.sun.star.text.DocumentIndex")
+ || ((TOX_CONTENT == m_pImpl->m_eTOXType) && rServiceName == "com.sun.star.text.ContentIndex")
+ || ((TOX_USER == m_pImpl->m_eTOXType) && rServiceName == "com.sun.star.text.UserDefinedIndex")
+ || ((TOX_ILLUSTRATIONS == m_pImpl->m_eTOXType) && rServiceName == "com.sun.star.text.IllustrationsIndex")
+ || ((TOX_TABLES == m_pImpl->m_eTOXType) && rServiceName == "com.sun.star.text.TableIndex")
+ || ((TOX_OBJECTS == m_pImpl->m_eTOXType) && rServiceName == "com.sun.star.text.ObjectIndex")
+ || ((TOX_AUTHORITIES == m_pImpl->m_eTOXType) && rServiceName == "com.sun.star.text.Bibliography");
}
uno::Sequence< OUString > SAL_CALL
@@ -2790,8 +2783,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
SwFormToken aToken(TOKEN_END);
for(sal_Int32 j = 0; j < nProperties; j++)
{
- if (pProperties[j].Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("TokenType")))
+ if ( pProperties[j].Name == "TokenType" )
{
const OUString sTokenType =
lcl_AnyToString(pProperties[j].Value);
@@ -2805,8 +2797,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
}
}
}
- else if (pProperties[j].Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("CharacterStyleName")))
+ else if ( pProperties[j].Name == "CharacterStyleName" )
{
String sCharStyleName;
SwStyleNameMapper::FillUIName(
@@ -2818,15 +2809,13 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
aToken.nPoolId = SwStyleNameMapper::GetPoolIdFromUIName (
sCharStyleName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
}
- else if (pProperties[j].Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("TabStopRightAligned")))
+ else if ( pProperties[j].Name == "TabStopRightAligned" )
{
const sal_Bool bRight = lcl_AnyToBool(pProperties[j].Value);
aToken.eTabAlign = bRight ?
SVX_TAB_ADJUST_END : SVX_TAB_ADJUST_LEFT;
}
- else if (pProperties[j].Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("TabStopPosition")))
+ else if ( pProperties[j].Name == "TabStopPosition" )
{
sal_Int32 nPosition = 0;
if (!(pProperties[j].Value >>= nPosition))
@@ -2840,8 +2829,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
}
aToken.nTabStopPosition = nPosition;
}
- else if (pProperties[j].Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("TabStopFillCharacter")))
+ else if ( pProperties[j].Name == "TabStopFillCharacter" )
{
const OUString sFillChar =
lcl_AnyToString(pProperties[j].Value);
@@ -2852,14 +2840,12 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
aToken.cTabFillChar =
sFillChar.isEmpty() ? ' ' : sFillChar[0];
}
- else if (pProperties[j].Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("Text")))
+ else if ( pProperties[j].Name == "Text" )
{
const OUString sText = lcl_AnyToString(pProperties[j].Value);
aToken.sText = sText;
}
- else if (pProperties[j].Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("ChapterFormat")))
+ else if ( pProperties[j].Name == "ChapterFormat" )
{
sal_Int16 nFormat = lcl_AnyToInt16(pProperties[j].Value);
switch(nFormat)
@@ -2885,8 +2871,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
aToken.nChapterFormat = nFormat;
}
// #i53420#
- else if (pProperties[j].Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("ChapterLevel")))
+ else if ( pProperties[j].Name == "ChapterLevel" )
{
const sal_Int16 nLevel = lcl_AnyToInt16(pProperties[j].Value);
if( nLevel < 1 || nLevel > MAXLEVEL )
@@ -2895,8 +2880,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
}
aToken.nOutlineLevel = nLevel;
}
- else if (pProperties[j].Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("BibliographyDataField")))
+ else if ( pProperties[j].Name == "BibliographyDataField" )
{
sal_Int16 nType = 0;
pProperties[j].Value >>= nType;
@@ -2910,8 +2894,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
aToken.nAuthorityField = nType;
}
// #i21237#
- else if (pProperties[j].Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("WithTab")))
+ else if ( pProperties[j].Name == "WithTab" )
{
aToken.bWithTab = lcl_AnyToBool(pProperties[j].Value);
}
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 3262b35f7a09..306117727d4f 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -1311,7 +1311,7 @@ throw (uno::RuntimeException)
{
SolarMutexGuard g;
- if (!rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextContent")))
+ if ( rServiceName != "com.sun.star.text.TextContent" )
{
throw uno::RuntimeException();
}
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index c4e9d6144633..69865551ca30 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -1283,7 +1283,7 @@ throw (uno::RuntimeException)
{
SolarMutexGuard g;
- if (!rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextContent")))
+ if ( rServiceName != "com.sun.star.text.TextContent" )
{
throw uno::RuntimeException();
}
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 74bc40dcf905..2de82b2d3af8 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1681,9 +1681,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
break;
}
}
- if(bExcept &&
- (rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("BulletRelSize")) ||
- rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("BulletColor")) ) )
+ if(bExcept && (rProp.Name == "BulletRelSize" || rProp.Name == "BulletColor" ) )
{
bExcept = sal_False;
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 952616037a20..cf02450203a5 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -3615,13 +3615,10 @@ OUString SwXCellRange::getImplementationName(void) throw( uno::RuntimeException
sal_Bool SwXCellRange::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return
- rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.text.CellRange" ) ) ||
- rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.style.CharacterProperties" ) ) ||
- rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.style.CharacterPropertiesAsian" ) ) ||
- rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.style.CharacterPropertiesComplex") ) ||
- rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.style.ParagraphProperties" ) ) ||
- rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.style.ParagraphPropertiesAsian" ) ) ||
- rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.style.ParagraphPropertiesComplex" ) );
+ rServiceName == "com.sun.star.text.CellRange" || rServiceName == "com.sun.star.style.CharacterProperties"
+ || rServiceName == "com.sun.star.style.CharacterPropertiesAsian" || rServiceName == "com.sun.star.style.CharacterPropertiesComplex"
+ || rServiceName == "com.sun.star.style.ParagraphProperties" || rServiceName == "com.sun.star.style.ParagraphPropertiesAsian"
+ || rServiceName == "com.sun.star.style.ParagraphPropertiesComplex";
}
uno::Sequence< OUString > SwXCellRange::getSupportedServiceNames(void) throw( uno::RuntimeException )
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index cd7d061cfebe..08e6ce57d7bd 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1982,8 +1982,7 @@ lcl_ApplyRowProperties(
for (sal_Int32 nProperty = 0; nProperty < rRowProperties.getLength();
++nProperty)
{
- if (pProperties[ nProperty ].Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("TableColumnSeparators")))
+ if ( pProperties[ nProperty ].Name == "TableColumnSeparators" )
{
// add the separators to access the cell's positions
// for vertical merging later