diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-01-19 23:09:51 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-01-19 23:09:51 +0100 |
commit | 77759ceb233ddd23ceb0f5062178f89474ccb8a6 (patch) | |
tree | 7cf5f6a9b065a49b0ece5efee23b1a64ab610440 | |
parent | bd90607962033d3ae4fbf4dd247acc32190f2507 (diff) |
Replace suitable equalsAscii calls with equalsAsciiL.
22 files changed, 55 insertions, 54 deletions
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index a2e358c4b4..8fd809a14b 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -1765,7 +1765,7 @@ void SwSpellIter::CreatePortion(uno::Reference< XSpellAlternatives > xAlt, const beans::PropertyValue* pProperties = pGrammarResult->aProperties.getConstArray(); for( sal_Int32 nProp = 0; nProp < pGrammarResult->aProperties.getLength(); ++nProp ) { - if( pProperties->Name.equalsAscii("DialogTitle") ) + if( pProperties->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DialogTitle") ) ) { pProperties->Value >>= aPortion.sDialogTitle; break; diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 2428223b5f..0a979ffc1d 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -605,7 +605,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData const beans::PropertyValue *pArg = rArguments.getConstArray(); for (sal_Int32 i = 0; i < nArgs; ++i) { - if (pArg[i].Name.equalsAscii( "DataRowSource" )) + if (pArg[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DataRowSource"))) { chart::ChartDataRowSource eSource; if (!(pArg[i].Value >>= eSource)) @@ -617,22 +617,22 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData } bDtaSrcIsColumns = eSource == chart::ChartDataRowSource_COLUMNS; } - else if (pArg[i].Name.equalsAscii( "FirstCellAsLabel" )) + else if (pArg[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FirstCellAsLabel"))) { if (!(pArg[i].Value >>= bFirstIsLabel)) throw lang::IllegalArgumentException(); } - else if (pArg[i].Name.equalsAscii( "CellRangeRepresentation" )) + else if (pArg[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CellRangeRepresentation"))) { if (!(pArg[i].Value >>= aRangeRepresentation)) throw lang::IllegalArgumentException(); } - else if (pArg[i].Name.equalsAscii( "SequenceMapping" )) + else if (pArg[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SequenceMapping"))) { if (!(pArg[i].Value >>= aSequenceMapping)) throw lang::IllegalArgumentException(); } - else if (pArg[i].Name.equalsAscii( "ChartOleObjectName" )) + else if (pArg[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ChartOleObjectName"))) { if (!(pArg[i].Value >>= aChartOleObjectName)) throw lang::IllegalArgumentException(); diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 493306f72f..090357ed4b 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -462,19 +462,19 @@ throw (uno::RuntimeException) return C2U("com.sun.star.text.BaseIndex") == rServiceName || ((TOX_INDEX == m_pImpl->m_eTOXType) && - rServiceName.equalsAscii("com.sun.star.text.DocumentIndex")) + rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentIndex"))) || ((TOX_CONTENT == m_pImpl->m_eTOXType) && - rServiceName.equalsAscii("com.sun.star.text.ContentIndex")) + rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.ContentIndex"))) || ((TOX_USER == m_pImpl->m_eTOXType) && - rServiceName.equalsAscii("com.sun.star.text.UserDefinedIndex")) + rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.UserDefinedIndex"))) || ((TOX_ILLUSTRATIONS == m_pImpl->m_eTOXType) && - rServiceName.equalsAscii("com.sun.star.text.IllustrationsIndex")) + rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.IllustrationsIndex"))) || ((TOX_TABLES == m_pImpl->m_eTOXType) && - rServiceName.equalsAscii("com.sun.star.text.TableIndex")) + rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TableIndex"))) || ((TOX_OBJECTS == m_pImpl->m_eTOXType) && - rServiceName.equalsAscii("com.sun.star.text.ObjectIndex")) + rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.ObjectIndex"))) || ((TOX_AUTHORITIES == m_pImpl->m_eTOXType) && - rServiceName.equalsAscii("com.sun.star.text.Bibliography")); + rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.Bibliography"))); } uno::Sequence< OUString > SAL_CALL @@ -2803,7 +2803,8 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, SwFormToken aToken(TOKEN_END); for(sal_Int32 j = 0; j < nProperties; j++) { - if (pProperties[j].Name.equalsAscii("TokenType")) + if (pProperties[j].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("TokenType"))) { const OUString sTokenType = lcl_AnyToString(pProperties[j].Value); diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 7b6dd1c2b2..23a96f9747 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -2637,7 +2637,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties( const OUString& rPropName = pProperties[n].Name; // old and new sortdescriptor - if (rPropName.equalsAscii("IsSortInTable")) + if (rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsSortInTable"))) { if (aValue.getValueType() == ::getBooleanCppuType()) { @@ -2648,7 +2648,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties( bRet = sal_False; } } - else if (rPropName.equalsAscii("Delimiter")) + else if (rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Delimiter"))) { sal_Unicode uChar = sal_Unicode(); if (aValue >>= uChar) @@ -2661,7 +2661,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties( } } // old sortdescriptor - else if (rPropName.equalsAscii("SortColumns")) + else if (rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SortColumns"))) { bOldSortdescriptor = sal_True; sal_Bool bTemp(sal_False); @@ -2674,7 +2674,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties( bRet = sal_False; } } - else if ( rPropName.equalsAscii("IsCaseSensitive")) + else if ( rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsCaseSensitive"))) { bOldSortdescriptor = sal_True; sal_Bool bTemp(sal_False); @@ -2687,7 +2687,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties( bRet = sal_False; } } - else if (rPropName.equalsAscii("CollatorLocale")) + else if (rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CollatorLocale"))) { bOldSortdescriptor = sal_True; lang::Locale aLocale; @@ -2775,7 +2775,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties( } } // new sortdescriptor - else if (rPropName.equalsAscii("IsSortColumns")) + else if (rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsSortColumns"))) { bNewSortdescriptor = sal_True; if (aValue.getValueType() == ::getBooleanCppuType()) @@ -2788,7 +2788,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties( bRet = sal_False; } } - else if (rPropName.equalsAscii("SortFields")) + else if (rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SortFields"))) { bNewSortdescriptor = sal_True; uno::Sequence < table::TableSortField > aFields; @@ -2897,7 +2897,7 @@ throw (uno::RuntimeException) { SolarMutexGuard g; - if (!rServiceName.equalsAscii("com.sun.star.text.TextContent")) + if (!rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextContent"))) { throw uno::RuntimeException(); } diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index be193735e1..c1f66c68ce 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1308,7 +1308,7 @@ throw (uno::RuntimeException) { SolarMutexGuard g; - if (!rServiceName.equalsAscii("com.sun.star.text.TextContent")) + if (!rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("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 1f8083108b..122d3721e1 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -1290,7 +1290,7 @@ throw (uno::RuntimeException) { SolarMutexGuard g; - if (!rServiceName.equalsAscii("com.sun.star.text.TextContent")) + if (!rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextContent"))) { throw uno::RuntimeException(); } diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index b1124c7ab2..436a2bbd15 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -1430,7 +1430,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, if (!pMeta) throw lang::DisposedException(); - if (rPropertyName.equalsAscii("NumberFormat")) + if (rPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("NumberFormat"))) { sal_Int32 nNumberFormat(0); if (rValue >>= nNumberFormat) @@ -1438,7 +1438,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, pMeta->SetNumberFormat(static_cast<sal_uInt32>(nNumberFormat)); } } - else if (rPropertyName.equalsAscii("IsFixedLanguage")) + else if (rPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsFixedLanguage"))) { bool b(false); if (rValue >>= b) @@ -1465,12 +1465,12 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::Any any; - if (rPropertyName.equalsAscii("NumberFormat")) + if (rPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("NumberFormat"))) { const ::rtl::OUString text( getPresentation(sal_False) ); any <<= static_cast<sal_Int32>(pMeta->GetNumberFormat(text)); } - else if (rPropertyName.equalsAscii("IsFixedLanguage")) + else if (rPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsFixedLanguage"))) { any <<= pMeta->IsFixedLanguage(); } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 57f1ecaa97..cf1729a51a 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2047,7 +2047,7 @@ lcl_ApplyCellProperties( { const OUString & rName = rCellProperties[nProperty].Name; const uno::Any & rValue = rCellProperties[nProperty].Value; - if (rName.equalsAscii("VerticalMerge")) + if (rName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("VerticalMerge"))) { // determine left border position // add the cell to a queue of merged cells diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 3823952460..553b95d215 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1320,11 +1320,11 @@ void SwDocShell::Execute(SfxRequest& rReq) sal_Int32 nColonPos = sTmpl.indexOf( sal_Unicode(':') ); OUString sPrefix = sTmpl.copy( 0L, nColonPos ); - if( sPrefix.equalsAscii("Style")) + if( sPrefix.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Style"))) { aTemplateName = sTmpl.copy( 7L ); //get string behind "Style: " } - else if( sPrefix.equalsAscii("Outline")) + else if( sPrefix.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Outline"))) { nTemplateOutlineLevel = ( sTmpl.copy( 15L )).toInt32(); //get string behind "Outline: Leve "; bCreateByOutlineLevel = true; diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index cb4c440cba..b7a69e280e 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1290,11 +1290,11 @@ 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.equalsAscii( "CopyCount" ) - ||( pPrintOptions[nOption].Name.equalsAscii( "FileName" )) - ||( pPrintOptions[nOption].Name.equalsAscii( "Collate" )) - ||( pPrintOptions[nOption].Name.equalsAscii( "Pages" )) - ||( pPrintOptions[nOption].Name.equalsAscii( "Wait" ))) + 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")))) { aOptions.realloc( nOpts + 1 ); aOptions[ nOpts ].Name = pPrintOptions[nOption].Name; diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx index cf83bcba42..21e55ed51e 100644 --- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx +++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx @@ -70,7 +70,7 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(Window* pParent, uno::Sequence< b const beans::PropertyValue* pValues = rValues.getConstArray(); for(sal_Int32 nValue = 0; nValue < rValues.getLength(); ++nValue ) { - if(pValues[nValue].Name.equalsAscii("Command")) + if(pValues[nValue].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Command"))) { String sDescription = m_aDescriptionFI.GetText(); OUString sTemp; diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx index aa0b2598fb..f267396f87 100644 --- a/sw/source/ui/dbui/mailmergehelper.cxx +++ b/sw/source/ui/dbui/mailmergehelper.cxx @@ -771,7 +771,7 @@ uno::Any SwMailTransferable::getPropertyValue( const ::rtl::OUString& rPropertyN throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { uno::Any aRet; - if( rPropertyName.equalsAscii( "URL" ) ) + if( rPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL"))) aRet <<= m_aURL; return aRet; } diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 307b241fbe..ccacbc595d 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -365,7 +365,7 @@ OUString RetrieveLabelFromCommand( const OUString& aCmdURL ) { for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if ( aPropSeq[i].Name.equalsAscii( "Name" )) + if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ) ) ) { aPropSeq[i].Value >>= aStr; break; diff --git a/sw/source/ui/uno/SwXFilterOptions.cxx b/sw/source/ui/uno/SwXFilterOptions.cxx index 03e5e753d6..8d8aa1c4b3 100644 --- a/sw/source/ui/uno/SwXFilterOptions.cxx +++ b/sw/source/ui/uno/SwXFilterOptions.cxx @@ -98,7 +98,7 @@ void SwXFilterOptions::setPropertyValues( const uno::Sequence<beans::PropertyV rProp.Value >>= sFilterName; else if ( aPropName == ::rtl::OUString(FILTER_OPTIONS_NAME) ) rProp.Value >>= sFilterOptions; - else if ( aPropName.equalsAscii( "InputStream" ) ) + else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) ) rProp.Value >>= xInputStream; } } diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 68fe62c228..ad3cba0060 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2364,7 +2364,7 @@ SfxViewShell * SwXTextDocument::GetRenderView( const beans::PropertyValue *pProps = rOptions.getConstArray(); for (sal_Int32 i = 0; i < nLen; ++i) { - if (pProps[i].Name.equalsAscii( "View" )) + if (pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "View" ) )) { aTmp = pProps[i].Value; break; diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 31f4d5f2a0..e6dfaf8517 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -1053,8 +1053,8 @@ OUString SwXTextView::getImplementationName(void) throw( RuntimeException ) sal_Bool SwXTextView::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - return rServiceName.equalsAscii("com.sun.star.text.TextDocumentView") || - rServiceName.equalsAscii("com.sun.star.view.OfficeDocumentView"); + return rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextDocumentView")) || + rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.view.OfficeDocumentView")); } Sequence< OUString > SwXTextView::getSupportedServiceNames(void) throw( RuntimeException ) diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx index f7cdf62f78..29c91445ab 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx @@ -52,7 +52,7 @@ sal_Bool HeaderFooterHelper::isHeaderFooter( const uno::Reference< text::XText > { uno::Reference< lang::XServiceInfo > xServiceInfo( xText, uno::UNO_QUERY_THROW ); rtl::OUString aImplName = xServiceInfo->getImplementationName(); - if( aImplName.equalsAscii("SwXHeadFootText") ) + if( aImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SwXHeadFootText")) ) return sal_True; return sal_False; } diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx index 80dfe57e1e..4303e4813a 100644 --- a/sw/source/ui/vba/vbapagesetup.cxx +++ b/sw/source/ui/vba/vbapagesetup.cxx @@ -145,7 +145,7 @@ void SAL_CALL SwVbaPageSetup::setFooterDistance( double _footerdistance ) throw sal_Bool SAL_CALL SwVbaPageSetup::getDifferentFirstPageHeaderFooter() throw (uno::RuntimeException) { rtl::OUString pageStyle = getStyleOfFirstPage(); - if( pageStyle.equalsAscii( "First Page" ) ) + if( pageStyle.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "First Page" ) ) ) return sal_True; return sal_False; @@ -237,9 +237,9 @@ rtl::OUString SwVbaPageSetup::getStyleOfFirstPage() throw (uno::RuntimeException sal_Int32 wdSectionStart = word::WdSectionStart::wdSectionNewPage; uno::Reference< container::XNamed > xNamed( mxPageProps, uno::UNO_QUERY_THROW ); rtl::OUString sStyleName = xNamed->getName(); - if( sStyleName.equalsAscii("Left Page") ) + if( sStyleName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Left Page")) ) wdSectionStart = word::WdSectionStart::wdSectionEvenPage; - else if( sStyleName.equalsAscii("Right Page") ) + else if( sStyleName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Right Page")) ) wdSectionStart = word::WdSectionStart::wdSectionOddPage; else wdSectionStart = word::WdSectionStart::wdSectionNewPage; diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index 560ae185bb..383bcd69de 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -748,7 +748,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run rtl::OUString aPageStyleName; xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName; sal_Bool bFirstPage = sal_False; - if( aPageStyleName.equalsAscii( "First Page" ) ) + if( aPageStyleName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "First Page" ) ) ) bFirstPage = sal_True; if( nView == word::WdSeekView::wdSeekFirstPageHeader ) { diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx index 77e3a464f6..b35624c3d1 100644 --- a/sw/source/ui/vba/vbatables.cxx +++ b/sw/source/ui/vba/vbatables.cxx @@ -36,7 +36,7 @@ sal_Bool lcl_isInHeaderFooter( const uno::Reference< text::XTextTable >& xTable uno::Reference< text::XText > xText = xTextContent->getAnchor()->getText(); uno::Reference< lang::XServiceInfo > xServiceInfo( xText, uno::UNO_QUERY_THROW ); rtl::OUString aImplName = xServiceInfo->getImplementationName(); - if( aImplName.equalsAscii("SwXHeadFootText") ) + if( aImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SwXHeadFootText")) ) return sal_True; return sal_False; } diff --git a/sw/source/ui/vba/vbatablesofcontents.cxx b/sw/source/ui/vba/vbatablesofcontents.cxx index 640e191d08..0401e8add5 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().equalsAscii("com.sun.star.text.ContentIndex") ) + if( xToc->getServiceName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.ContentIndex")) ) { maToc.push_back( xToc ); } diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx index b53b1d5150..7ce8f8818e 100644 --- a/sw/source/ui/vba/vbaview.cxx +++ b/sw/source/ui/vba/vbaview.cxx @@ -87,11 +87,11 @@ SwVbaView::getSeekView() throw (css::uno::RuntimeException) } uno::Reference< lang::XServiceInfo > xServiceInfo( xCurrentText, uno::UNO_QUERY_THROW ); rtl::OUString aImplName = xServiceInfo->getImplementationName(); - if( aImplName.equalsAscii("SwXBodyText") ) + if( aImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SwXBodyText")) ) { return word::WdSeekView::wdSeekMainDocument; } - else if( aImplName.equalsAscii("SwXHeadFootText") ) + else if( aImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SwXHeadFootText")) ) { if( HeaderFooterHelper::isHeader( mxModel ) ) { @@ -112,7 +112,7 @@ SwVbaView::getSeekView() throw (css::uno::RuntimeException) return word::WdSeekView::wdSeekPrimaryFooter; } } - else if( aImplName.equalsAscii("SwXFootnote") ) + else if( aImplName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SwXFootnote")) ) { if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Endnote") ) ) ) return word::WdSeekView::wdSeekEndnotes; @@ -313,7 +313,7 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) uno::Reference< beans::XPropertySet > xCursorProps( mxViewCursor, uno::UNO_QUERY_THROW ); rtl::OUString aPageStyleName; xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName; - if( aPageStyleName.equalsAscii("First Page") ) + if( aPageStyleName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("First Page")) ) { // go to the beginning of where the next style is used sal_Bool hasNextPage = sal_False; |