summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-25 17:35:42 +0200
committerNoel Grandin <noel@peralex.com>2013-11-04 10:11:08 +0200
commit5285beeaa49f6678b471d472868c305c7d9da5f9 (patch)
treea3dbd28995142ab16b448f28e95821115ef5408f /sw
parentaeb41c9b9b7559c6d87bf92807acdc0df9e104cc (diff)
remove redundant calls to OUString constructor in if expression
Convert code like: if( aStr == OUString("xxxx") ) to this: if( aStr == "xxxx" ) Change-Id: I8d201f048477731eff590fb988259ef0935c080c
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx12
-rw-r--r--sw/source/core/unocore/unobkm.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--sw/source/filter/html/swhtml.cxx2
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx2
-rw-r--r--sw/source/ui/envelp/label1.cxx2
-rw-r--r--sw/source/ui/uno/SwXFilterOptions.cxx4
7 files changed, 13 insertions, 13 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 86e50ad4f308..b4ecd7d7b18e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1348,7 +1348,7 @@ DECLARE_OOXML_TEST(testSmartart, "smartart.docx")
sal_Bool bTheme = sal_False;
for(int i = 0; i < aGrabBag.getLength(); ++i)
{
- if (aGrabBag[i].Name == OUString("OOXTheme"))
+ if (aGrabBag[i].Name == "OOXTheme")
{
bTheme = sal_True;
uno::Reference<xml::dom::XDocument> aThemeDom;
@@ -1372,35 +1372,35 @@ DECLARE_OOXML_TEST(testSmartart, "smartart.docx")
sal_Bool bData = sal_False, bLayout = sal_False, bQStyle = sal_False, bColor = sal_False, bDrawing = sal_False;
for(int i = 0; i < aGrabBag.getLength(); ++i)
{
- if (aGrabBag[i].Name == OUString("OOXData"))
+ if (aGrabBag[i].Name == "OOXData")
{
bData = sal_True;
uno::Reference<xml::dom::XDocument> aDataDom;
CPPUNIT_ASSERT(aGrabBag[i].Value >>= aDataDom); // PropertyValue of proper type
CPPUNIT_ASSERT(aDataDom.get()); // Reference not empty
}
- else if (aGrabBag[i].Name == OUString("OOXLayout"))
+ else if (aGrabBag[i].Name == "OOXLayout")
{
bLayout = sal_True;
uno::Reference<xml::dom::XDocument> aLayoutDom;
CPPUNIT_ASSERT(aGrabBag[i].Value >>= aLayoutDom); // PropertyValue of proper type
CPPUNIT_ASSERT(aLayoutDom.get()); // Reference not empty
}
- else if (aGrabBag[i].Name == OUString("OOXStyle"))
+ else if (aGrabBag[i].Name == "OOXStyle")
{
bQStyle = sal_True;
uno::Reference<xml::dom::XDocument> aStyleDom;
CPPUNIT_ASSERT(aGrabBag[i].Value >>= aStyleDom); // PropertyValue of proper type
CPPUNIT_ASSERT(aStyleDom.get()); // Reference not empty
}
- else if (aGrabBag[i].Name == OUString("OOXColor"))
+ else if (aGrabBag[i].Name == "OOXColor")
{
bColor = sal_True;
uno::Reference<xml::dom::XDocument> aColorDom;
CPPUNIT_ASSERT(aGrabBag[i].Value >>= aColorDom); // PropertyValue of proper type
CPPUNIT_ASSERT(aColorDom.get()); // Reference not empty
}
- else if (aGrabBag[i].Name == OUString("OOXDrawing"))
+ else if (aGrabBag[i].Name == "OOXDrawing")
{
bDrawing = sal_True;
uno::Reference<xml::dom::XDocument> aDrawingDom;
diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
index 8e5724619568..3972d451642c 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -666,7 +666,7 @@ SwXFieldmark::CreateXFieldmark(SwDoc & rDoc, ::sw::mark::IMark & rMark)
SwXFieldmark::getCheckboxFieldmark()
{
::sw::mark::ICheckboxFieldmark* pCheckboxFm = NULL;
- if ( getFieldType() == OUString( ODF_FORMCHECKBOX ) )
+ if ( getFieldType() == ODF_FORMCHECKBOX )
{
// evil #TODO #FIXME casting away the const-ness
pCheckboxFm = const_cast<sw::mark::ICheckboxFieldmark*>(dynamic_cast< const ::sw::mark::ICheckboxFieldmark* >( GetBookmark()));
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 334387e6ac53..5227be19f271 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1691,7 +1691,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
for (sal_uInt16 i=0, nEnd = pPrinter->GetPaperBinCount(); i < nEnd; i++ )
{
- if (sTmp == OUString ( pPrinter->GetPaperBinName ( i ) ) )
+ if (sTmp == pPrinter->GetPaperBinName ( i ) )
{
nBin = i;
break;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index c87713804cd3..afcddfd3aecd 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2834,7 +2834,7 @@ void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
IDocumentMarkAccess::BOOKMARK );
// jump to bookmark
- if( JUMPTO_MARK == eJumpTo && pNewMark->GetName() == OUString(sJmpMark) )
+ if( JUMPTO_MARK == eJumpTo && pNewMark->GetName() == sJmpMark )
{
bChkJumpMark = sal_True;
eJumpTo = JUMPTO_NONE;
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index d876c965e298..fb7646c68774 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -753,7 +753,7 @@ sal_Bool SwMailTransferable::isDataFlavorSupported(
const datatransfer::DataFlavor& aFlavor )
throw (uno::RuntimeException)
{
- return (aFlavor.MimeType == OUString(m_aMimeType));
+ return (aFlavor.MimeType == m_aMimeType);
}
uno::Reference< beans::XPropertySetInfo > SwMailTransferable::getPropertySetInfo( ) throw(uno::RuntimeException)
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index a736545fd232..3a64309f1e0a 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -383,7 +383,7 @@ IMPL_LINK_NOARG(SwLabPage, MakeHdl)
if(bInsert)
{
GetParentSwLabDlg()->TypeIds().push_back(i);
- if ( !nLstType && aType == OUString(aItem.aLstType) )
+ if ( !nLstType && aType == aItem.aLstType )
nLstType = GetParentSwLabDlg()->TypeIds().size();
}
}
diff --git a/sw/source/ui/uno/SwXFilterOptions.cxx b/sw/source/ui/uno/SwXFilterOptions.cxx
index 8d73f13fe4f8..2ac92626de3f 100644
--- a/sw/source/ui/uno/SwXFilterOptions.cxx
+++ b/sw/source/ui/uno/SwXFilterOptions.cxx
@@ -85,7 +85,7 @@ void SwXFilterOptions::setPropertyValues( const uno::Sequence<beans::PropertyV
if ( aPropName.equalsAscii( SW_PROP_NAME_STR(UNO_NAME_FILTER_NAME) ) )
rProp.Value >>= sFilterName;
- else if ( aPropName == OUString(FILTER_OPTIONS_NAME) )
+ else if ( aPropName == FILTER_OPTIONS_NAME )
rProp.Value >>= sFilterOptions;
else if ( aPropName == "InputStream" )
rProp.Value >>= xInputStream;
@@ -159,7 +159,7 @@ OUString SwXFilterOptions::getImplementationName() throw(uno::RuntimeException)
sal_Bool SwXFilterOptions::supportsService( const OUString& rServiceName )
throw(uno::RuntimeException)
{
- return rServiceName == OUString(SWFILTEROPTIONSOBJ_SERVICE);
+ return rServiceName == SWFILTEROPTIONSOBJ_SERVICE;
}
uno::Sequence< OUString > SwXFilterOptions::getSupportedServiceNames()