summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-04 12:47:02 +0200
committerNoel Grandin <noel@peralex.com>2015-11-04 12:47:39 +0200
commitf927cf4d23432341921c55e6983edf9c8ebe7ff7 (patch)
tree494c7f6547456c7e015c6a3e97f24e9925593668
parenta66c83d90cdfb8714ef9096d60a60ae807812063 (diff)
loplugin:stringconstant
Change-Id: Ic135382652966e80c288f3407508bdaf0c60316e
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx12
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx10
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx66
-rw-r--r--sw/source/core/doc/docxforms.cxx4
-rw-r--r--sw/source/core/edit/edlingu.cxx2
-rw-r--r--sw/source/core/text/txthyph.cxx2
-rw-r--r--sw/source/filter/basflt/iodetect.cxx2
-rw-r--r--sw/source/filter/html/htmlbas.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx12
-rw-r--r--sw/source/ui/vba/vbaautotextentry.cxx8
-rw-r--r--sw/source/ui/vba/vbarange.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx2
-rw-r--r--sw/source/uibase/dialog/swabstdlg.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx2
-rw-r--r--sw/source/uibase/sidebar/PagePropertyPanel.cxx2
-rw-r--r--sw/source/uibase/uiview/srcview.cxx2
-rw-r--r--sw/source/uibase/uiview/view.cxx2
20 files changed, 68 insertions, 72 deletions
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 3e069305baf3..bc7b8983857d 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -256,18 +256,18 @@ DECLARE_ODFIMPORT_TEST(testTdf74524, "tdf74524.odt")
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
uno::Any aField1 = xFields->nextElement();
uno::Reference<lang::XServiceInfo> xServiceInfo1(aField1, uno::UNO_QUERY);
- CPPUNIT_ASSERT(xServiceInfo1->supportsService(OUString("com.sun.star.text.textfield.PageNumber")));
+ CPPUNIT_ASSERT(xServiceInfo1->supportsService("com.sun.star.text.textfield.PageNumber"));
uno::Reference<beans::XPropertySet> xPropertySet(aField1, uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(style::NumberingType::PAGE_DESCRIPTOR)), xPropertySet->getPropertyValue(OUString("NumberingType")));
- CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(0)), xPropertySet->getPropertyValue(OUString("Offset")));
- CPPUNIT_ASSERT_EQUAL(uno::makeAny(text::PageNumberType_CURRENT), xPropertySet->getPropertyValue(OUString("SubType")));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(style::NumberingType::PAGE_DESCRIPTOR)), xPropertySet->getPropertyValue("NumberingType"));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(0)), xPropertySet->getPropertyValue("Offset"));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(text::PageNumberType_CURRENT), xPropertySet->getPropertyValue("SubType"));
uno::Reference<text::XTextContent> xField1(aField1, uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("1"), xField1->getAnchor()->getString());
uno::Any aField2 = xFields->nextElement();
uno::Reference<lang::XServiceInfo> xServiceInfo2(aField2, uno::UNO_QUERY);
- CPPUNIT_ASSERT(xServiceInfo2->supportsService(OUString("com.sun.star.text.textfield.Annotation")));
+ CPPUNIT_ASSERT(xServiceInfo2->supportsService("com.sun.star.text.textfield.Annotation"));
uno::Reference<beans::XPropertySet> xPropertySet2(aField2, uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Comment 1")), xPropertySet2->getPropertyValue(OUString("Content")));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Comment 1")), xPropertySet2->getPropertyValue("Content"));
uno::Reference<text::XTextContent> xField2(aField2, uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("Hello 1World"), xField2->getAnchor()->getString());
CPPUNIT_ASSERT(!xFields->hasMoreElements());
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 4e4427c5e22e..d6cd49c585a2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -393,7 +393,7 @@ DECLARE_OOXMLEXPORT_TEST(testSmartart, "smartart.docx")
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag(0);
- xTextDocumentPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
+ xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
bool bTheme = false;
@@ -417,7 +417,7 @@ DECLARE_OOXMLEXPORT_TEST(testSmartart, "smartart.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xGroup->getCount()); // 1 rendered bitmap from the original shapes
uno::Reference<beans::XPropertySet> xGroupPropertySet(getShape(1), uno::UNO_QUERY);
- xGroupPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
+ xGroupPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
bool bData = false, bLayout = false, bQStyle = false, bColor = false, bDrawing = false;
@@ -508,7 +508,7 @@ DECLARE_OOXMLEXPORT_TEST(testCustomXmlGrabBag, "customxml.docx")
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag(0);
- xTextDocumentPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
+ xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
bool CustomXml = false;
for(int i = 0; i < aGrabBag.getLength(); ++i)
@@ -536,7 +536,7 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXGrabBag, "activex.docx")
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag(0);
- xTextDocumentPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
+ xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
bool bActiveX = false;
for(int i = 0; i < aGrabBag.getLength(); ++i)
@@ -564,7 +564,7 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXBinGrabBag, "activexbin.docx")
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag(0);
- xTextDocumentPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
+ xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
bool bActiveX = false;
for(int i = 0; i < aGrabBag.getLength(); ++i)
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index bf24caade498..7e5eaab3b164 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -142,7 +142,7 @@ public:
args[0].Value <<= OUString("com.sun.star.text.TextDocument");
args[0].State = beans::PropertyState_DIRECT_VALUE;
- uno::Reference<lang::XComponent> xComponent = xLoader->loadComponentFromURL(aURL, OUString("_default"), 0, args);
+ uno::Reference<lang::XComponent> xComponent = xLoader->loadComponentFromURL(aURL, "_default", 0, args);
OUString sMessage = "loading succeeded: " + aURL;
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sMessage, RTL_TEXTENCODING_UTF8).getStr(), !xComponent.is());
}
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index ff1d65ed9388..43da84fa9c62 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1294,19 +1294,19 @@ void SwUiWriterTest::testTdf77340()
uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<style::XStyle> xStyle(xFactory->createInstance("com.sun.star.style.ParagraphStyle"), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xPropSet(xStyle, uno::UNO_QUERY_THROW);
- xPropSet->setPropertyValue(OUString("ParaBackColor"), uno::makeAny(sal_Int32(0xFF00FF)));
+ xPropSet->setPropertyValue("ParaBackColor", uno::makeAny(sal_Int32(0xFF00FF)));
uno::Reference<style::XStyleFamiliesSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xNameAccess(xSupplier->getStyleFamilies());
uno::Reference<container::XNameContainer> xNameCont;
xNameAccess->getByName("ParagraphStyles") >>= xNameCont;
- xNameCont->insertByName(OUString("myStyle"), uno::makeAny(xStyle));
+ xNameCont->insertByName("myStyle", uno::makeAny(xStyle));
CPPUNIT_ASSERT_EQUAL(OUString("myStyle"), xStyle->getName());
//Setting the properties with proper values
- xPropSet->setPropertyValue(OUString("PageDescName"), uno::makeAny(OUString("First Page")));
- xPropSet->setPropertyValue(OUString("PageNumberOffset"), uno::makeAny(sal_Int16(3)));
+ xPropSet->setPropertyValue("PageDescName", uno::makeAny(OUString("First Page")));
+ xPropSet->setPropertyValue("PageNumberOffset", uno::makeAny(sal_Int16(3)));
//Getting the properties and checking that they have proper values
- CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("First Page")), xPropSet->getPropertyValue(OUString("PageDescName")));
- CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(3)), xPropSet->getPropertyValue(OUString("PageNumberOffset")));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("First Page")), xPropSet->getPropertyValue("PageDescName"));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(3)), xPropSet->getPropertyValue("PageNumberOffset"));
}
void SwUiWriterTest::testTdf79236()
@@ -1417,8 +1417,8 @@ void SwUiWriterTest::testTextSearch()
CPPUNIT_ASSERT_EQUAL(uno::makeAny(float(com::sun::star::awt::FontWeight::BOLD)), aPropVal2[0].Value);
//specifying the search attributes
uno::Reference<beans::XPropertySet> xPropSet(xSearchDes, uno::UNO_QUERY_THROW);
- xPropSet->setPropertyValue(OUString("SearchWords"), uno::makeAny(true));
- xPropSet->setPropertyValue(OUString("SearchCaseSensitive"), uno::makeAny(true));
+ xPropSet->setPropertyValue("SearchWords", uno::makeAny(true));
+ xPropSet->setPropertyValue("SearchCaseSensitive", uno::makeAny(true));
//this will search all the BOLD words
uno::Reference<container::XIndexAccess> xIndex(xSearch->findAll(xSearchDes));
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndex->getCount());
@@ -2174,7 +2174,7 @@ void SwUiWriterTest::testTdf90808()
uno::Reference<text::XText> xText(xTextRange->getText(), uno::UNO_QUERY);
uno::Reference<text::XParagraphCursor> xCrsr(xText->createTextCursor(), uno::UNO_QUERY);
//inserting text into document so that the paragraph is not empty
- xText->setString(OUString("Hello World!"));
+ xText->setString("Hello World!");
uno::Reference<lang::XMultiServiceFactory> xFact(mxComponent, uno::UNO_QUERY);
//creating bookmark 1
uno::Reference<text::XTextContent> xHeadingBookmark1(xFact->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY);
@@ -2274,42 +2274,42 @@ void SwUiWriterTest::testPropertyDefaults()
uno::Reference<beans::XPropertyState> xPropState(xInterface, uno::UNO_QUERY);
//testing CharFontName from style::CharacterProperties
//getting property default
- uno::Any aCharFontName = xPropState->getPropertyDefault(OUString("CharFontName"));
+ uno::Any aCharFontName = xPropState->getPropertyDefault("CharFontName");
//asserting property default and defaults received from "css.text.Defaults" service
- CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue(OUString("CharFontName")), aCharFontName);
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharFontName"), aCharFontName);
//changing the default value
- xPropSet->setPropertyValue(OUString("CharFontName"), uno::makeAny(OUString("Symbol")));
- CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Symbol")), xPropSet->getPropertyValue(OUString("CharFontName")));
+ xPropSet->setPropertyValue("CharFontName", uno::makeAny(OUString("Symbol")));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Symbol")), xPropSet->getPropertyValue("CharFontName"));
//resetting the value to default
- xPropState->setPropertyToDefault(OUString("CharFontName"));
- CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue(OUString("CharFontName")), aCharFontName);
+ xPropState->setPropertyToDefault("CharFontName");
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharFontName"), aCharFontName);
//testing CharHeight from style::CharacterProperties
//getting property default
- uno::Any aCharHeight = xPropState->getPropertyDefault(OUString("CharHeight"));
+ uno::Any aCharHeight = xPropState->getPropertyDefault("CharHeight");
//asserting property default and defaults received from "css.text.Defaults" service
- CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue(OUString("CharHeight")), aCharHeight);
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharHeight"), aCharHeight);
//changing the default value
- xPropSet->setPropertyValue(OUString("CharHeight"), uno::makeAny(float(14)));
- CPPUNIT_ASSERT_EQUAL(uno::makeAny(float(14)), xPropSet->getPropertyValue(OUString("CharHeight")));
+ xPropSet->setPropertyValue("CharHeight", uno::makeAny(float(14)));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(float(14)), xPropSet->getPropertyValue("CharHeight"));
//resetting the value to default
- xPropState->setPropertyToDefault(OUString("CharHeight"));
- CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue(OUString("CharHeight")), aCharHeight);
+ xPropState->setPropertyToDefault("CharHeight");
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharHeight"), aCharHeight);
//testing CharWeight from style::CharacterProperties
- uno::Any aCharWeight = xPropSet->getPropertyValue(OUString("CharWeight"));
+ uno::Any aCharWeight = xPropSet->getPropertyValue("CharWeight");
//changing the default value
- xPropSet->setPropertyValue(OUString("CharWeight"), uno::makeAny(float(awt::FontWeight::BOLD)));
- CPPUNIT_ASSERT_EQUAL(uno::makeAny(float(awt::FontWeight::BOLD)), xPropSet->getPropertyValue(OUString("CharWeight")));
+ xPropSet->setPropertyValue("CharWeight", uno::makeAny(float(awt::FontWeight::BOLD)));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(float(awt::FontWeight::BOLD)), xPropSet->getPropertyValue("CharWeight"));
//resetting the value to default
- xPropState->setPropertyToDefault(OUString("CharWeight"));
- CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue(OUString("CharWeight")), aCharWeight);
+ xPropState->setPropertyToDefault("CharWeight");
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharWeight"), aCharWeight);
//testing CharUnderline from style::CharacterProperties
- uno::Any aCharUnderline = xPropSet->getPropertyValue(OUString("CharUnderline"));
+ uno::Any aCharUnderline = xPropSet->getPropertyValue("CharUnderline");
//changing the default value
- xPropSet->setPropertyValue(OUString("CharUnderline"), uno::makeAny(sal_Int16(awt::FontUnderline::SINGLE)));
- CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(awt::FontUnderline::SINGLE)), xPropSet->getPropertyValue(OUString("CharUnderline")));
+ xPropSet->setPropertyValue("CharUnderline", uno::makeAny(sal_Int16(awt::FontUnderline::SINGLE)));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(awt::FontUnderline::SINGLE)), xPropSet->getPropertyValue("CharUnderline"));
//resetting the value to default
- xPropState->setPropertyToDefault(OUString("CharUnderline"));
- CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue(OUString("CharUnderline")), aCharUnderline);
+ xPropState->setPropertyToDefault("CharUnderline");
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharUnderline"), aCharUnderline);
}
void SwUiWriterTest::testTableBackgroundColor()
@@ -2362,7 +2362,7 @@ void SwUiWriterTest::testTdf88899()
uno::Reference<text::XTextField> xTextField(xFact->createInstance("com.sun.star.text.textfield.docinfo.Custom"), uno::UNO_QUERY);
//Setting Name Property
uno::Reference<beans::XPropertySet> xPropSet(xTextField, uno::UNO_QUERY_THROW);
- xPropSet->setPropertyValue(OUString("Name"), uno::makeAny(OUString("dateTime")));
+ xPropSet->setPropertyValue("Name", uno::makeAny(OUString("dateTime")));
//Setting NumberFormat
uno::Reference<util::XNumberFormatsSupplier> xNumberFormatsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<util::XNumberFormatTypes> xNumFormat(xNumberFormatsSupplier->getNumberFormats(), uno::UNO_QUERY);
@@ -2370,7 +2370,7 @@ void SwUiWriterTest::testTdf88899()
alocale.Language = "en";
alocale.Country = "US";
sal_Int16 key = xNumFormat->getStandardFormat(util::NumberFormat::DATETIME, alocale);
- xPropSet->setPropertyValue(OUString("NumberFormat"), uno::makeAny(sal_Int16(key)));
+ xPropSet->setPropertyValue("NumberFormat", uno::makeAny(sal_Int16(key)));
//Inserting Text Content
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextRange> xTextRange(xTextDocument->getText(), uno::UNO_QUERY);
diff --git a/sw/source/core/doc/docxforms.cxx b/sw/source/core/doc/docxforms.cxx
index db8d5c4428d0..f5254546acd0 100644
--- a/sw/source/core/doc/docxforms.cxx
+++ b/sw/source/core/doc/docxforms.cxx
@@ -66,7 +66,7 @@ void SwDoc::initXForms( bool bCreateDefaultModel )
xModule.set(pShell->GetModel(), css::uno::UNO_QUERY);
OSL_ENSURE( xModule.is(), "SwDoc::initXForms: no XModule at the document!" );
if ( xModule.is() )
- xModule->setIdentifier( OUString( "com.sun.star.xforms.XMLFormDocument" ) );
+ xModule->setIdentifier( "com.sun.star.xforms.XMLFormDocument" );
// create default model
if( bCreateDefaultModel && mxXForms.is() )
@@ -75,7 +75,7 @@ void SwDoc::initXForms( bool bCreateDefaultModel )
Reference<XModel2> xModel = xforms::Model::create( comphelper::getProcessComponentContext() );
xModel->setID( sName );
Reference<XFormsUIHelper1>( xModel, uno::UNO_QUERY_THROW )->newInstance(
- OUString("Instance 1"),
+ "Instance 1",
OUString(), sal_True );
xModel->initialize();
mxXForms->insertByName( sName, makeAny( xModel ) );
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index e91cdfe20d47..e7dfcf26b1ce 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -417,7 +417,7 @@ bool SwHyphIter::IsAuto()
{
uno::Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() );
return xProp.is() && *static_cast<sal_Bool const *>(xProp->getPropertyValue(
- OUString(UPN_IS_HYPH_AUTO) ).getValue());
+ UPN_IS_HYPH_AUTO ).getValue());
}
void SwHyphIter::ShowSelection()
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 3841ea07321e..3e528f587c8c 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -45,7 +45,7 @@ Reference< XHyphenatedWord > SwTextFormatInfo::HyphWord(
Reference< XHyphenatedWord > xHyphWord;
if( xHyph.is() )
- xHyphWord = xHyph->hyphenate( OUString(rText),
+ xHyphWord = xHyph->hyphenate( rText,
g_pBreakIt->GetLocale( m_pFnt->GetLanguage() ),
rText.getLength() - nMinTrail, GetHyphValues() );
return xHyphWord;
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index b4d4fb1d789a..257f09cda84d 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -93,7 +93,7 @@ bool SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::s
try
{
SotClipboardFormatId nStgFormatId = SotStorage::GetFormatID( rStg );
- bRet = rStg->isStreamElement( OUString("content.xml") );
+ bRet = rStg->isStreamElement( "content.xml" );
if ( bRet )
bRet = ( nStgFormatId != SotClipboardFormatId::NONE && ( rFilter.GetFormat() == nStgFormatId ) );
}
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index ec4143e5d38e..d6b8de214630 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -144,7 +144,7 @@ void SwHTMLParser::EndScript()
{
aBasicModule = "Modul";
aBasicModule += OUString::number( (sal_Int32)(++nSBModuleCnt) );
- bFound = xModLib->hasByName( OUString( aBasicModule ) );
+ bFound = xModLib->hasByName( aBasicModule );
}
}
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 3ddf5945e826..c4ea3b7fca30 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3554,7 +3554,7 @@ void WW8Export::RestoreMacroCmds()
try
{
uno::Reference < io::XStream > xSrcStream =
- xSrcRoot->openStreamElement( OUString(SL::aMSMacroCmds), embed::ElementModes::READ );
+ xSrcRoot->openStreamElement( SL::aMSMacroCmds, embed::ElementModes::READ );
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( xSrcStream );
if ( pStream && SVSTREAM_OK == pStream->GetError())
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 77409e519607..4d56d1d4bb9a 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4669,7 +4669,7 @@ void SwWW8ImplReader::StoreMacroCmds()
try
{
uno::Reference < io::XStream > xStream =
- xRoot->openStreamElement( OUString(SL::aMSMacroCmds), embed::ElementModes::READWRITE );
+ xRoot->openStreamElement( SL::aMSMacroCmds, embed::ElementModes::READWRITE );
std::unique_ptr<SvStream> xOutStream(::utl::UcbStreamHelper::CreateStream(xStream));
sal_uInt32 lcbCmds = std::min<sal_uInt32>(m_pWwFib->lcbCmds, m_pTableStream->remainingSize());
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 99d4c7a86937..3307cd560004 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1392,14 +1392,12 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
if ( !bUnixForceZeroExtLeading )
{
- xProps->setPropertyValue(
- OUString("UnxForceZeroExtLeading"), makeAny( true ) );
+ xProps->setPropertyValue( "UnxForceZeroExtLeading", makeAny( true ) );
}
if ( !bUseOldPrinterMetrics )
{
- xProps->setPropertyValue(
- OUString("UseOldPrinterMetrics"), makeAny( true ) );
+ xProps->setPropertyValue( "UseOldPrinterMetrics", makeAny( true ) );
}
// Old LO versions had 66 as the value for small caps percentage, later changed to 80.
@@ -1408,14 +1406,12 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
// are considered to be old files, so set the compatibility option too.
if ( !bSmallCapsPercentage66 )
{
- xProps->setPropertyValue(
- OUString("SmallCapsPercentage66"), makeAny( true ) );
+ xProps->setPropertyValue( "SmallCapsPercentage66", makeAny( true ) );
}
if ( !bTabOverflow )
{
- xProps->setPropertyValue(
- OUString("TabOverflow"), makeAny( false ) );
+ xProps->setPropertyValue( "TabOverflow", makeAny( false ) );
}
if ( !bUnbreakableNumberings )
diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx
index 5d57e3008a6c..4bf5b59e4340 100644
--- a/sw/source/ui/vba/vbaautotextentry.cxx
+++ b/sw/source/ui/vba/vbaautotextentry.cxx
@@ -41,14 +41,14 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R
if( pWhere )
{
uno::Reference< text::XTextRange > xTextRange = pWhere->getXTextRange();
- xTextRange->setString( OUString("x") ); // set marker
+ xTextRange->setString( "x" ); // set marker
uno::Reference< text::XTextRange > xEndMarker = xTextRange->getEnd();
- xEndMarker->setString( OUString("x") ); // set marker
+ xEndMarker->setString( "x" ); // set marker
uno::Reference< text::XText > xText = pWhere->getXText();
mxEntry->applyTo( xEndMarker->getStart() );
uno::Reference< text::XTextCursor > xTC = xText->createTextCursorByRange( xTextRange->getStart() );
xTC->goRight( 1, sal_True );
- xTC->setString( OUString("") ); // remove marker
+ xTC->setString( "" ); // remove marker
// remove the blank paragraph if it is a rich text
bool bRich = false;
_richtext >>= bRich;
@@ -68,7 +68,7 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R
xTVCursor->gotoRange( xEndMarker->getEnd(), sal_False );
}
}
- xEndMarker->setString( OUString("") ); // remove marker
+ xEndMarker->setString( "" ); // remove marker
xTC = xText->createTextCursorByRange( xEndMarker->getEnd() );
pWhere->setXTextCursor( xTC );
}
diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx
index 368eb230b764..ae76f189ef27 100644
--- a/sw/source/ui/vba/vbarange.cxx
+++ b/sw/source/ui/vba/vbarange.cxx
@@ -224,7 +224,7 @@ SwVbaRange::Select() throw ( uno::RuntimeException, std::exception )
void SAL_CALL
SwVbaRange::InsertParagraph() throw ( uno::RuntimeException, std::exception )
{
- mxTextCursor->setString( OUString("") );
+ mxTextCursor->setString( "" );
InsertParagraphBefore();
}
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index fd7d888a1d51..09c4b5fc55f1 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -1004,7 +1004,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
xCtrlAcc->setValue( ExtendedFilePickerElementIds::LISTBOX_TEMPLATE,
ListboxControlActions::SET_SELECT_ITEM, aSelectPos );
xCtrlAcc->setLabel( ExtendedFilePickerElementIds::LISTBOX_TEMPLATE,
- OUString(SW_RES( STR_FDLG_TEMPLATE_NAME )));
+ SW_RES( STR_FDLG_TEMPLATE_NAME ));
}
catch (const Exception&)
{
diff --git a/sw/source/uibase/dialog/swabstdlg.cxx b/sw/source/uibase/dialog/swabstdlg.cxx
index 34c84c93d6e7..449e584f499e 100644
--- a/sw/source/uibase/dialog/swabstdlg.cxx
+++ b/sw/source/uibase/dialog/swabstdlg.cxx
@@ -45,7 +45,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName,
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
fp = reinterpret_cast<SwAbstractDialogFactory* (SAL_CALL*)()>(
- aDialogLibrary.getFunctionSymbol( OUString("SwCreateDialogFactory")));
+ aDialogLibrary.getFunctionSymbol( "SwCreateDialogFactory" ));
#else
fp = SwCreateDialogFactory();
#endif
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 5b46cd3f5ff2..39bd292393dc 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1829,7 +1829,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
embed::InsertedObjectInfo aInfo = xClipboardCreator->createInstanceInitFromClipboard(
xTmpStor,
- OUString( "DummyName" ),
+ "DummyName",
uno::Sequence< beans::PropertyValue >() );
// TODO/LATER: in future InsertedObjectInfo will be used to get container related information
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
index 025b006409f5..a869b44e3f49 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
@@ -753,7 +753,7 @@ void PagePropertyPanel::StartUndo()
{
if ( mxUndoManager.is() )
{
- mxUndoManager->enterUndoContext( OUString("") );
+ mxUndoManager->enterUndoContext( "" );
}
}
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 259d8ec9aabf..fe991822fab2 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -319,7 +319,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
{
// filter not found
OUString sHtml("HTML");
- xFltMgr->appendFilter( sHtml, OUString("*.html;*.htm") );
+ xFltMgr->appendFilter( sHtml, "*.html;*.htm" );
xFltMgr->setCurrentFilter( sHtml ) ;
}
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index d6f7783d39b5..4eb4d60596c3 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -984,7 +984,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface();
uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame(
- OUString("_beamer"), frame::FrameSearchFlag::CHILDREN);
+ "_beamer", frame::FrameSearchFlag::CHILDREN);
if(xBeamerFrame.is())
{
SwDBData aData = m_pWrtShell->GetDBData();