diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 19:49:53 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 20:03:42 +0200 |
commit | d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch) | |
tree | b5a12df1fcae025715633469b75ab4c9b6f6d279 /sw | |
parent | 0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff) |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/access/accpreview.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/crsr/pam.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/portxt.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/unocore/unoidx.cxx | 51 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj2.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unoparagraph.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unosett.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 11 | ||||
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltexti.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/dbmgr.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/uno/unotxdoc.cxx | 15 | ||||
-rw-r--r-- | sw/source/ui/uno/unotxvw.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/vba/vbatablesofcontents.cxx | 2 |
16 files changed, 47 insertions, 84 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 diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index d690dee87125..e50cbb5e8aa4 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -259,7 +259,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( SwFrmFmt *pFrmFmt = 0; SwOLENode *pOLENd = 0; - if( rHRef.copy( 0, nPos ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.ServiceName") ) ) + if( rHRef.copy( 0, nPos ) == "vnd.sun.star.ServiceName" ) { sal_Bool bInsert = sal_False; SvGlobalName aClassName; diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index bc8b93b34af2..900ada03d97f 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1310,11 +1310,9 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, const beans::PropertyValue* pPrintOptions = rMergeDescriptor.aPrintOptions.getConstArray(); for( sal_Int32 nOption = 0; nOption < rMergeDescriptor.aPrintOptions.getLength(); ++nOption) { - if( pPrintOptions[nOption].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CopyCount")) - ||( pPrintOptions[nOption].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FileName"))) - ||( pPrintOptions[nOption].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Collate" ))) - ||( pPrintOptions[nOption].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Pages"))) - ||( pPrintOptions[nOption].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Wait")))) + if( pPrintOptions[nOption].Name == "CopyCount" || pPrintOptions[nOption].Name == "FileName" + || pPrintOptions[nOption].Name == "Collate" || pPrintOptions[nOption].Name == "Pages" + || pPrintOptions[nOption].Name == "Wait" ) { aOptions.realloc( nOpts + 1 ); aOptions[ nOpts ].Name = pPrintOptions[nOption].Name; diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 5aabb0843b5e..d56f9075f9f2 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -4221,13 +4221,13 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if ( aCntntAtPos.aFnd.pFldmark != NULL) { IFieldmark *fieldBM = const_cast< IFieldmark* > ( aCntntAtPos.aFnd.pFldmark ); - if (fieldBM->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ) ) + if ( fieldBM->GetFieldname( ) == ODF_FORMCHECKBOX ) { ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(fieldBM); pCheckboxFm->SetChecked(!pCheckboxFm->IsChecked()); pCheckboxFm->Invalidate(); rSh.InvalidateWindows( rView.GetVisArea() ); - } else if (fieldBM->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ) { + } else if ( fieldBM->GetFieldname() == ODF_FORMDROPDOWN ) { rView.ExecFieldPopup( aDocPt, fieldBM ); fieldBM->Invalidate(); rSh.InvalidateWindows( rView.GetVisArea() ); diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 2f9a6900ec57..1404d2d701f6 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -1770,21 +1770,16 @@ OUString SwXTextDocument::getImplementationName(void) throw( RuntimeException ) sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - if ( - (rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.document.OfficeDocument" ))) || - (rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.text.GenericTextDocument"))) - ) - return sal_True; + if ( rServiceName == "com.sun.star.document.OfficeDocument" || rServiceName == "com.sun.star.text.GenericTextDocument" ) + return sal_True; sal_Bool bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell)); sal_Bool bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell)); sal_Bool bTextDoc = (!bWebDoc && !bGlobalDoc); - return ( - (bWebDoc && rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.WebDocument" ))) || - (bGlobalDoc && rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.GlobalDocument"))) || - (bTextDoc && rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextDocument" ))) - ); + return ( (bWebDoc && rServiceName == "com.sun.star.text.WebDocument") + || (bGlobalDoc && rServiceName == "com.sun.star.text.GlobalDocument") + || (bTextDoc && rServiceName == "com.sun.star.text.TextDocument") ); } Sequence< OUString > SwXTextDocument::getSupportedServiceNames(void) throw( RuntimeException ) diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 8660f18bb2fe..d96a47eb4d88 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -1042,8 +1042,7 @@ OUString SwXTextView::getImplementationName(void) throw( RuntimeException ) sal_Bool SwXTextView::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - return rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextDocumentView")) || - rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.view.OfficeDocumentView")); + return rServiceName == "com.sun.star.text.TextDocumentView" || rServiceName == "com.sun.star.view.OfficeDocumentView"; } Sequence< OUString > SwXTextView::getSupportedServiceNames(void) throw( RuntimeException ) diff --git a/sw/source/ui/vba/vbatablesofcontents.cxx b/sw/source/ui/vba/vbatablesofcontents.cxx index c05627ff84a9..4e37ecbfb9db 100644 --- a/sw/source/ui/vba/vbatablesofcontents.cxx +++ b/sw/source/ui/vba/vbatablesofcontents.cxx @@ -77,7 +77,7 @@ public: for( sal_Int32 i = 0; i < nCount; i++ ) { uno::Reference< text::XDocumentIndex > xToc( xDocIndexes->getByIndex(i), uno::UNO_QUERY_THROW ); - if( xToc->getServiceName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.ContentIndex")) ) + if( xToc->getServiceName() == "com.sun.star.text.ContentIndex" ) { maToc.push_back( xToc ); } |