summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 14:28:18 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 14:30:05 +0200
commit8a01ee624318ac08800af89d988971114637a04e (patch)
treee4acf35e42ab0c1d0b593bd8970fa2c435f90c95 /sw/source
parent6cf547f02c79278430ee75483a3128076cfc609e (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Pattern used: find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\) ) *) *)$/\1\2 ( \3 == \4 )/' \{\} \;
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx6
-rw-r--r--sw/source/filter/xml/xmlimp.cxx12
-rw-r--r--sw/source/ui/lingu/olmenu.cxx2
-rw-r--r--sw/source/ui/uiview/view.cxx22
-rw-r--r--sw/source/ui/uno/SwXFilterOptions.cxx2
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx2
-rw-r--r--sw/source/ui/vba/vbapagesetup.cxx2
-rw-r--r--sw/source/ui/vba/vbaselection.cxx2
8 files changed, 25 insertions, 25 deletions
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index d5b8a6422a48..ea77e4f3103e 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -987,11 +987,11 @@ void makeRedline( SwPaM& rPaM,
IDocumentRedlineAccess* pRedlineAccess = rPaM.GetDoc();
RedlineType_t eType = nsRedlineType_t::REDLINE_INSERT;
- if( rRedlineType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Delete" ) ))
+ if ( rRedlineType == "Delete" )
eType = nsRedlineType_t::REDLINE_DELETE;
- else if( rRedlineType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Format" ) ))
+ else if ( rRedlineType == "Format" )
eType = nsRedlineType_t::REDLINE_FORMAT;
- else if( rRedlineType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "TextTable" ) ))
+ else if ( rRedlineType == "TextTable" )
eType = nsRedlineType_t::REDLINE_TABLE;
else if( !rRedlineType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Insert" ) ))
throw lang::IllegalArgumentException();
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index f19a20a8bcea..6fa217848770 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1061,37 +1061,37 @@ void SwXMLImport::SetViewSettings(const Sequence < PropertyValue > & aViewProps)
for (sal_Int32 i = 0; i < nCount ; i++)
{
- if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaTop" ) ) )
+ if ( pValue->Name == "ViewAreaTop" )
{
pValue->Value >>= nTmp;
aRect.setY( static_cast< long >(bTwip ? MM100_TO_TWIP ( nTmp ) : nTmp) );
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaLeft" ) ) )
+ else if ( pValue->Name == "ViewAreaLeft" )
{
pValue->Value >>= nTmp;
aRect.setX( static_cast< long >(bTwip ? MM100_TO_TWIP ( nTmp ) : nTmp) );
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaWidth" ) ) )
+ else if ( pValue->Name == "ViewAreaWidth" )
{
pValue->Value >>= nTmp;
Size aSize( aRect.GetSize() );
aSize.Width() = static_cast< long >(bTwip ? MM100_TO_TWIP ( nTmp ) : nTmp);
aRect.SetSize( aSize );
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaHeight" ) ) )
+ else if ( pValue->Name == "ViewAreaHeight" )
{
pValue->Value >>= nTmp;
Size aSize( aRect.GetSize() );
aSize.Height() = static_cast< long >(bTwip ? MM100_TO_TWIP ( nTmp ) : nTmp);
aRect.SetSize( aSize );
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ShowRedlineChanges" ) ) )
+ else if ( pValue->Name == "ShowRedlineChanges" )
{
bShowRedlineChanges = *(sal_Bool *)(pValue->Value.getValue());
bChangeShowRedline = sal_True;
}
// Headers and footers are not displayed in BrowseView anymore
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "InBrowseMode" ) ) )
+ else if ( pValue->Name == "InBrowseMode" )
{
bBrowseMode = *(sal_Bool *)(pValue->Value.getValue());
bChangeBrowseMode = sal_True;
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index f5ddbb58fa82..5e54f1055d61 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -356,7 +356,7 @@ OUString RetrieveLabelFromCommand( const OUString& aCmdURL )
{
for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
{
- if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ) ) )
+ if ( aPropSeq[i].Name == "Name" )
{
aPropSeq[i].Value >>= aStr;
break;
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 284409b1a7f8..c8be512048b0 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -1294,61 +1294,61 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
for (sal_Int16 i = 0 ; i < nLength; i++)
{
- if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ViewLeft" ) ) )
+ if ( pValue->Name == "ViewLeft" )
{
pValue->Value >>= nX;
nX = MM100_TO_TWIP( nX );
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ViewTop" ) ) )
+ else if ( pValue->Name == "ViewTop" )
{
pValue->Value >>= nY;
nY = MM100_TO_TWIP( nY );
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VisibleLeft" ) ) )
+ else if ( pValue->Name == "VisibleLeft" )
{
pValue->Value >>= nLeft;
nLeft = MM100_TO_TWIP( nLeft );
bGotVisibleLeft = sal_True;
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VisibleTop" ) ) )
+ else if ( pValue->Name == "VisibleTop" )
{
pValue->Value >>= nTop;
nTop = MM100_TO_TWIP( nTop );
bGotVisibleTop = sal_True;
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VisibleRight" ) ) )
+ else if ( pValue->Name == "VisibleRight" )
{
pValue->Value >>= nRight;
nRight = MM100_TO_TWIP( nRight );
bGotVisibleRight = sal_True;
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VisibleBottom" ) ) )
+ else if ( pValue->Name == "VisibleBottom" )
{
pValue->Value >>= nBottom;
nBottom = MM100_TO_TWIP( nBottom );
bGotVisibleBottom = sal_True;
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ZoomType" ) ) )
+ else if ( pValue->Name == "ZoomType" )
{
pValue->Value >>= nZoomType;
bGotZoomType = sal_True;
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ZoomFactor" ) ) )
+ else if ( pValue->Name == "ZoomFactor" )
{
pValue->Value >>= nZoomFactor;
bGotZoomFactor = sal_True;
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ViewLayoutColumns" ) ) )
+ else if ( pValue->Name == "ViewLayoutColumns" )
{
pValue->Value >>= nViewLayoutColumns;
bGotViewLayoutColumns = sal_True;
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ViewLayoutBookMode" ) ) )
+ else if ( pValue->Name == "ViewLayoutBookMode" )
{
bViewLayoutBookMode = * (sal_Bool *) pValue->Value.getValue();
bGotViewLayoutBookMode = sal_True;
}
- else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsSelectedFrame" ) ) )
+ else if ( pValue->Name == "IsSelectedFrame" )
{
pValue->Value >>= bSelectedFrame;
bGotIsSelectedFrame = sal_True;
diff --git a/sw/source/ui/uno/SwXFilterOptions.cxx b/sw/source/ui/uno/SwXFilterOptions.cxx
index a82e155e0f79..76e3204286cb 100644
--- a/sw/source/ui/uno/SwXFilterOptions.cxx
+++ b/sw/source/ui/uno/SwXFilterOptions.cxx
@@ -96,7 +96,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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) )
+ else if ( aPropName == "InputStream" )
rProp.Value >>= xInputStream;
}
}
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 3ca2deeef3c0..2f9a6900ec57 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -2365,7 +2365,7 @@ SfxViewShell * SwXTextDocument::GetRenderView(
const beans::PropertyValue *pProps = rOptions.getConstArray();
for (sal_Int32 i = 0; i < nLen; ++i)
{
- if (pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "View" ) ))
+ if ( pProps[i].Name == "View" )
{
aTmp = pProps[i].Value;
break;
diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx
index 0668001abe28..184ece7327b2 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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "First Page" ) ) )
+ if ( pageStyle == "First Page" )
return sal_True;
return sal_False;
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 7d0266369f18..13bc019ef7ef 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -747,7 +747,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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "First Page" ) ) )
+ if ( aPageStyleName == "First Page" )
bFirstPage = sal_True;
if( nView == word::WdSeekView::wdSeekFirstPageHeader )
{