summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-05-19 17:16:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-05-19 17:16:38 +0200
commit713843bebb27f09b5af9190cf84c57f6076e54aa (patch)
tree1936b003f3ca2a7daf84fa8349d44d801ff58cd5 /sw
parent039913c383477e8ea1d62426df5cc30f6637ebfe (diff)
loplugin:stringcopy: sw
Change-Id: I0a794e1d2a4b7e97133df0f7243817da7caaee1d
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/acchyperlink.cxx4
-rw-r--r--sw/source/core/crsr/annotationmark.cxx2
-rw-r--r--sw/source/core/fields/docufld.cxx2
-rw-r--r--sw/source/core/fields/expfld.cxx2
-rw-r--r--sw/source/core/fields/fldbas.cxx2
-rw-r--r--sw/source/core/fields/reffld.cxx2
-rw-r--r--sw/source/core/fields/tblcalc.cxx2
-rw-r--r--sw/source/core/swg/SwXMLBlockExport.cxx10
-rw-r--r--sw/source/filter/html/htmlform.cxx10
-rw-r--r--sw/source/filter/html/htmlplug.cxx2
-rw-r--r--sw/source/filter/writer/writer.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx10
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx10
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx2
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx4
-rw-r--r--sw/source/filter/xml/xmltexti.cxx8
-rw-r--r--sw/source/ui/dialog/macassgn.cxx26
-rw-r--r--sw/source/ui/envelp/label1.cxx2
-rw-r--r--sw/source/uibase/app/docsh.cxx2
-rw-r--r--sw/source/uibase/config/modcfg.cxx6
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx2
-rw-r--r--sw/source/uibase/envelp/labelcfg.cxx2
-rw-r--r--sw/source/uibase/misc/swruler.cxx2
-rw-r--r--sw/source/uibase/shells/drformsh.cxx2
-rw-r--r--sw/source/uibase/shells/textsh.cxx4
-rw-r--r--sw/source/uibase/shells/textsh1.cxx6
-rw-r--r--sw/source/uibase/uiview/viewling.cxx6
-rw-r--r--sw/source/uibase/uno/SwXDocumentSettings.cxx4
-rw-r--r--sw/source/uibase/utlui/attrdesc.cxx10
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx4
31 files changed, 77 insertions, 77 deletions
diff --git a/sw/source/core/access/acchyperlink.cxx b/sw/source/core/access/acchyperlink.cxx
index 49f7c554023e..1b46c16f6d22 100644
--- a/sw/source/core/access/acchyperlink.cxx
+++ b/sw/source/core/access/acchyperlink.cxx
@@ -167,7 +167,7 @@ uno::Any SAL_CALL SwAccessibleHyperlink::getAccessibleActionObject(
if( pTextAttr )
{
const SwFormatINetFormat& rINetFormat = pTextAttr->GetINetFormat();
- retText = OUString( rINetFormat.GetValue() );
+ retText = rINetFormat.GetValue();
}
uno::Any aRet;
aRet <<= retText;
@@ -194,7 +194,7 @@ sal_Bool SAL_CALL SwAccessibleHyperlink::isValid( )
if( pTextAttr )
{
const SwFormatINetFormat& rINetFormat = pTextAttr->GetINetFormat();
- sText = OUString( rINetFormat.GetValue() );
+ sText = rINetFormat.GetValue();
OUString sToken = "#";
sal_Int32 nPos = sText.indexOf(sToken);
if (nPos==0)//document link
diff --git a/sw/source/core/crsr/annotationmark.cxx b/sw/source/core/crsr/annotationmark.cxx
index 27e8c7973ce6..bca5e903c72a 100644
--- a/sw/source/core/crsr/annotationmark.cxx
+++ b/sw/source/core/crsr/annotationmark.cxx
@@ -67,7 +67,7 @@ namespace sw { namespace mark
// - the annotation field has an empty annotation name or
// - the annotation mark's name differs (on mark creation a name clash had been detected)
if ( pPostItField->GetName().isEmpty()
- || OUString( pPostItField->GetName() ) != GetName() )
+ || pPostItField->GetName() != GetName() )
{
const_cast<SwPostItField*>(pPostItField)->SetName( GetName() );
}
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index a3ec6e1034ec..a9d41cbece2e 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1128,7 +1128,7 @@ OUString SwDocInfoField::GetFieldName() const
}
if (IsFixed())
{
- aStr += " " + OUString(SwViewShell::GetShellRes()->aFixedStr);
+ aStr += " " + SwViewShell::GetShellRes()->aFixedStr;
}
return aStr;
}
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 00cc9799553f..8aafdb2df7f1 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -1072,7 +1072,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= (sal_Int16)nSeqNo;
break;
case FIELD_PROP_PAR1:
- rAny <<= OUString ( SwStyleNameMapper::GetProgName(GetPar1(), SwGetPoolIdFromName::TxtColl ) );
+ rAny <<= SwStyleNameMapper::GetProgName(GetPar1(), SwGetPoolIdFromName::TxtColl );
break;
case FIELD_PROP_PAR2:
{
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 4a7ff47dd136..1bd796bb66f0 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -257,7 +257,7 @@ OUString SwField::GetFieldName() const
OUString sRet = SwFieldType::GetTypeStr( nTypeId );
if (IsFixed())
{
- sRet += " " + OUString(SwViewShell::GetShellRes()->aFixedStr);
+ sRet += " " + SwViewShell::GetShellRes()->aFixedStr;
}
return sRet;
}
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 6d5367f88004..41471f1a5204 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -253,7 +253,7 @@ OUString SwGetRefField::GetExpandedTextOfReferencedTextNode() const
{
const SwTextNode* pReferencedTextNode( GetReferencedTextNode() );
return pReferencedTextNode
- ? OUString(pReferencedTextNode->GetExpandText( 0, -1, true, true, false, false ))
+ ? pReferencedTextNode->GetExpandText( 0, -1, true, true, false, false )
: OUString();
}
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index f5eab5d23521..9fe3b6e449b1 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -104,7 +104,7 @@ OUString SwTableField::GetCommand()
}
}
return (EXTRNL_NAME == GetNameType())
- ? OUString(SwTableFormula::GetFormula())
+ ? SwTableFormula::GetFormula()
: OUString();
}
diff --git a/sw/source/core/swg/SwXMLBlockExport.cxx b/sw/source/core/swg/SwXMLBlockExport.cxx
index 0a20e999790a..1cb361d2ed6d 100644
--- a/sw/source/core/swg/SwXMLBlockExport.cxx
+++ b/sw/source/core/swg/SwXMLBlockExport.cxx
@@ -50,7 +50,7 @@ sal_uInt32 SwXMLBlockListExport::exportDoc(enum XMLTokenEnum )
GetNamespaceMap_().GetNameByKey ( XML_NAMESPACE_BLOCKLIST ) );
AddAttribute( XML_NAMESPACE_BLOCKLIST,
XML_LIST_NAME,
- OUString (rBlockList.GetName()));
+ rBlockList.GetName());
{
SvXMLElementExport aRoot (*this, XML_NAMESPACE_BLOCKLIST, XML_BLOCK_LIST, true, true);
sal_uInt16 nBlocks= rBlockList.GetCount();
@@ -58,13 +58,13 @@ sal_uInt32 SwXMLBlockListExport::exportDoc(enum XMLTokenEnum )
{
AddAttribute( XML_NAMESPACE_BLOCKLIST,
XML_ABBREVIATED_NAME,
- OUString(rBlockList.GetShortName(i)));
+ rBlockList.GetShortName(i));
AddAttribute( XML_NAMESPACE_BLOCKLIST,
XML_PACKAGE_NAME,
- OUString(rBlockList.GetPackageName(i)));
+ rBlockList.GetPackageName(i));
AddAttribute( XML_NAMESPACE_BLOCKLIST,
XML_NAME,
- OUString(rBlockList.GetLongName(i)));
+ rBlockList.GetLongName(i));
AddAttribute( XML_NAMESPACE_BLOCKLIST,
XML_UNFORMATTED_TEXT,
rBlockList.IsOnlyTextBlock(i) ? XML_TRUE : XML_FALSE );
@@ -112,7 +112,7 @@ void SwXMLTextBlockExport::exportDoc(const OUString &rText)
GetNamespaceMap_().GetNameByKey ( XML_NAMESPACE_OFFICE ) );
AddAttribute( XML_NAMESPACE_BLOCKLIST,
XML_LIST_NAME,
- OUString (rBlockList.GetName()));
+ rBlockList.GetName());
{
SvXMLElementExport aDocument (*this, XML_NAMESPACE_OFFICE, XML_DOCUMENT, true, true);
{
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index ee8f0274221b..fb7cf356e1d7 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -596,10 +596,10 @@ static void lcl_html_setFixedFontProperty(
DefaultFontType::FIXED, LANGUAGE_ENGLISH_US,
GetDefaultFontFlags::OnlyOne ) );
Any aTmp;
- aTmp <<= OUString( aFixedFont.GetFamilyName() );
+ aTmp <<= aFixedFont.GetFamilyName();
rPropSet->setPropertyValue("FontName", aTmp );
- aTmp <<= OUString( aFixedFont.GetStyleName() );
+ aTmp <<= aFixedFont.GetStyleName();
rPropSet->setPropertyValue("FontStyleName",
aTmp );
@@ -995,13 +995,13 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
sPropName = "FontName";
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
- aTmp <<= OUString( pFontItem->GetFamilyName() );
+ aTmp <<= pFontItem->GetFamilyName();
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
sPropName = "FontStyleName";
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
- aTmp <<= OUString( pFontItem->GetStyleName() );
+ aTmp <<= pFontItem->GetStyleName();
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
sPropName = "FontFamily";
@@ -1841,7 +1841,7 @@ void SwHTMLParser::InsertInput()
// Die URL erst nach dem Einfuegen setzen, weil sich der
// Download der Grafik erst dann am XModel anmelden kann,
// wenn das Control eingefuegt ist.
- aTmp <<= OUString( URIHelper::SmartRel2Abs(INetURLObject(m_sBaseURL), sImgSrc, Link<OUString *, bool>(), false));
+ aTmp <<= URIHelper::SmartRel2Abs(INetURLObject(m_sBaseURL), sImgSrc, Link<OUString *, bool>(), false);
xPropSet->setPropertyValue("ImageURL",
aTmp );
}
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 98eeb3677cf0..136a8550fd56 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -890,7 +890,7 @@ void SwHTMLParser::InsertFloatingFrame()
bool bHasBorder = aFrameDesc.HasFrameBorder();
Size aMargin = aFrameDesc.GetMargin();
- xSet->setPropertyValue("FrameURL", uno::makeAny( OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ) );
+ xSet->setPropertyValue("FrameURL", uno::makeAny( aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) );
xSet->setPropertyValue("FrameName", uno::makeAny( aName ) );
if ( eScroll == ScrollingMode::Auto )
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 21935dabe1f6..ea80865358bd 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -330,7 +330,7 @@ bool Writer::CopyLocalFileToINet( OUString& rFileNm )
OUString aSrc = rFileNm;
OUString aDest = aTargetUrl.GetPartBeforeLastName();
- aDest += OUString(aFileUrl.GetName());
+ aDest += aFileUrl.GetName();
SfxMedium aSrcFile( aSrc, StreamMode::READ );
SfxMedium aDstFile( aDest, StreamMode::WRITE | StreamMode::SHARE_DENYNONE );
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index f82667c6ed2c..4c44fce688e4 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6245,7 +6245,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
if ( pFont )
{
GetExport().GetId( *pFont ); // ensure font info is written to fontTable.xml
- OString aFamilyName( OUStringToOString( OUString( pFont->GetFamilyName() ), RTL_TEXTENCODING_UTF8 ) );
+ OString aFamilyName( OUStringToOString( pFont->GetFamilyName(), RTL_TEXTENCODING_UTF8 ) );
m_pSerializer->singleElementNS( XML_w, XML_rFonts,
FSNS( XML_w, XML_ascii ), aFamilyName.getStr(),
FSNS( XML_w, XML_hAnsi ), aFamilyName.getStr(),
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 6352aeb63bbb..891216a84183 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1963,7 +1963,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Poi
if (xInfo->supportsService("com.sun.star.form.component.CheckBox"))
{
- m_aRun->append(OUStringToOString(OUString(FieldString(ww::eFORMCHECKBOX)), m_rExport.m_eCurrentEncoding));
+ m_aRun->append(OUStringToOString(FieldString(ww::eFORMCHECKBOX), m_rExport.m_eCurrentEncoding));
m_aRun->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FORMFIELD "{");
m_aRun->append(OOO_STRING_SVTOOLS_RTF_FFTYPE "1"); // 1 = checkbox
// checkbox size in half points, this seems to be always 20, see WW8Export::DoCheckBox()
@@ -2019,7 +2019,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Poi
OUString aTmp;
const sal_Char* pStr;
- m_aRun->append(OUStringToOString(OUString(FieldString(ww::eFORMTEXT)), m_rExport.m_eCurrentEncoding));
+ m_aRun->append(OUStringToOString(FieldString(ww::eFORMTEXT), m_rExport.m_eCurrentEncoding));
m_aRun->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_DATAFIELD " ");
for (int i = 0; i < 8; i++) aBuf.append((sal_Char)0x00);
xPropSet->getPropertyValue("Name") >>= aTmp;
@@ -2069,7 +2069,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Poi
uno::Sequence<sal_Int16> aIntSeq;
uno::Sequence<OUString> aStrSeq;
- m_aRun->append(OUStringToOString(OUString(FieldString(ww::eFORMDROPDOWN)), m_rExport.m_eCurrentEncoding));
+ m_aRun->append(OUStringToOString(FieldString(ww::eFORMDROPDOWN), m_rExport.m_eCurrentEncoding));
m_aRun->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FORMFIELD "{");
m_aRun->append(OOO_STRING_SVTOOLS_RTF_FFTYPE "2"); // 2 = list
m_aRun->append(OOO_STRING_SVTOOLS_RTF_FFHASLISTBOX);
@@ -3488,10 +3488,10 @@ void RtfAttributeOutput::PostitField(const SwField* pField)
}
m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_ATNID " ");
- m_aRunText->append(OUStringToOString(OUString(rPField.GetInitials()), m_rExport.m_eCurrentEncoding));
+ m_aRunText->append(OUStringToOString(rPField.GetInitials(), m_rExport.m_eCurrentEncoding));
m_aRunText->append("}");
m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_ATNAUTHOR " ");
- m_aRunText->append(OUStringToOString(OUString(rPField.GetPar1()), m_rExport.m_eCurrentEncoding));
+ m_aRunText->append(OUStringToOString(rPField.GetPar1(), m_rExport.m_eCurrentEncoding));
m_aRunText->append("}");
m_aRunText->append(OOO_STRING_SVTOOLS_RTF_CHATN);
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 0bbc2216f024..3fe6385e7d3d 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3891,11 +3891,11 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
if ( type )
pDataStrm->WriteUInt16( 0 );
- SwWW8Writer::WriteString_xstz( *pDataStrm, OUString( ffformat ), true );
- SwWW8Writer::WriteString_xstz( *pDataStrm, OUString( ffhelptext ), true );
- SwWW8Writer::WriteString_xstz( *pDataStrm, OUString( ffstattext ), true );
- SwWW8Writer::WriteString_xstz( *pDataStrm, OUString( ffentrymcr ), true );
- SwWW8Writer::WriteString_xstz( *pDataStrm, OUString( ffexitmcr ), true );
+ SwWW8Writer::WriteString_xstz( *pDataStrm, ffformat, true );
+ SwWW8Writer::WriteString_xstz( *pDataStrm, ffhelptext, true );
+ SwWW8Writer::WriteString_xstz( *pDataStrm, ffstattext, true );
+ SwWW8Writer::WriteString_xstz( *pDataStrm, ffentrymcr, true );
+ SwWW8Writer::WriteString_xstz( *pDataStrm, ffexitmcr, true );
if (type==2) {
pDataStrm->WriteUInt16( 0xFFFF );
const int items=aListItems.size();
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 73b134eba59f..abe3475636a4 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -306,7 +306,7 @@ public:
void Write( SvStream *pTableStram ) const;
void WriteDocx( DocxAttributeOutput* rAttrOutput ) const;
void WriteRtf( const RtfAttributeOutput* rAttrOutput ) const;
- OUString GetFamilyName() const { return OUString( msFamilyNm ); }
+ OUString GetFamilyName() const { return msFamilyNm; }
friend bool operator < (const wwFont &r1, const wwFont &r2);
};
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index af4ef9a58bbc..5e51346c7344 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2304,7 +2304,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString,
OUString aNm;
if (xPropSetInfo->hasPropertyByName(aNm = "FontStyleName"))
{
- aTmp <<= OUString( pFontItem->GetStyleName());
+ aTmp <<= pFontItem->GetStyleName();
rPropSet->setPropertyValue( aNm, aTmp );
}
if (xPropSetInfo->hasPropertyByName(aNm = "FontFamily"))
@@ -2323,7 +2323,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString,
rPropSet->setPropertyValue( aNm, aTmp );
}
- aTmp <<= OUString( pFontItem->GetFamilyName());
+ aTmp <<= pFontItem->GetFamilyName();
aFont.SetFamilyName( pFontItem->GetFamilyName() );
aFont.SetStyleName( pFontItem->GetStyleName() );
aFont.SetFamily( pFontItem->GetFamily() );
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 537dbcadb7ae..45a1ea42e847 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -572,7 +572,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink(
uno::Sequence< beans::PropertyValue > aMediaDescriptor( 1 );
aMediaDescriptor[0].Name = "URL";
- aMediaDescriptor[0].Value <<= OUString( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
+ aMediaDescriptor[0].Value <<= aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if ( pDoc->GetDocShell() && pDoc->GetDocShell()->GetMedium() )
{
uno::Reference< task::XInteractionHandler > xInteraction =
@@ -721,7 +721,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
{
if( bValidURL )
xSet->setPropertyValue("PluginURL",
- makeAny( OUString( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ) );
+ makeAny( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) );
if( bValidMimeType )
xSet->setPropertyValue("PluginMimeType",
makeAny( rMimeType ) );
@@ -853,8 +853,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
if ( xSet.is() )
{
xSet->setPropertyValue("FrameURL",
- makeAny( OUString( URIHelper::SmartRel2Abs(
- INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) ) );
+ makeAny( URIHelper::SmartRel2Abs(
+ INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) );
xSet->setPropertyValue("FrameName",
makeAny( rName ) );
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index 8dce604e6229..e3474777369a 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -49,20 +49,20 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
switch( eType )
{
case MACASSGN_AUTOTEXT:
- aItem.AddEvent( OUString( SwResId(STR_EVENT_START_INS_GLOSSARY) ), OUString(),
+ aItem.AddEvent( SwResId(STR_EVENT_START_INS_GLOSSARY), OUString(),
SW_EVENT_START_INS_GLOSSARY );
- aItem.AddEvent( OUString( SwResId(STR_EVENT_END_INS_GLOSSARY) ), OUString(),
+ aItem.AddEvent( SwResId(STR_EVENT_END_INS_GLOSSARY), OUString(),
SW_EVENT_END_INS_GLOSSARY);
// in order for the new handler to become active!
break;
case MACASSGN_ALLFRM:
case MACASSGN_GRAPHIC: // graphics
{
- aItem.AddEvent( OUString( SwResId(STR_EVENT_IMAGE_ERROR) ), OUString(),
+ aItem.AddEvent( SwResId(STR_EVENT_IMAGE_ERROR), OUString(),
SVX_EVENT_IMAGE_ERROR);
- aItem.AddEvent( OUString( SwResId(STR_EVENT_IMAGE_ABORT) ), OUString(),
+ aItem.AddEvent( SwResId(STR_EVENT_IMAGE_ABORT), OUString(),
SVX_EVENT_IMAGE_ABORT);
- aItem.AddEvent( OUString( SwResId(STR_EVENT_IMAGE_LOAD) ), OUString(),
+ aItem.AddEvent( SwResId(STR_EVENT_IMAGE_LOAD), OUString(),
SVX_EVENT_IMAGE_LOAD);
}
SAL_FALLTHROUGH;
@@ -71,13 +71,13 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
if( !bHtmlMode &&
(MACASSGN_FRMURL == eType || MACASSGN_ALLFRM == eType))
{
- aItem.AddEvent( OUString( SwResId( STR_EVENT_FRM_KEYINPUT_A ) ), OUString(),
+ aItem.AddEvent( SwResId( STR_EVENT_FRM_KEYINPUT_A ), OUString(),
SW_EVENT_FRM_KEYINPUT_ALPHA );
- aItem.AddEvent( OUString( SwResId( STR_EVENT_FRM_KEYINPUT_NOA ) ), OUString(),
+ aItem.AddEvent( SwResId( STR_EVENT_FRM_KEYINPUT_NOA ), OUString(),
SW_EVENT_FRM_KEYINPUT_NOALPHA );
- aItem.AddEvent( OUString( SwResId( STR_EVENT_FRM_RESIZE ) ), OUString(),
+ aItem.AddEvent( SwResId( STR_EVENT_FRM_RESIZE ), OUString(),
SW_EVENT_FRM_RESIZE );
- aItem.AddEvent( OUString( SwResId( STR_EVENT_FRM_MOVE ) ), OUString(),
+ aItem.AddEvent( SwResId( STR_EVENT_FRM_MOVE ), OUString(),
SW_EVENT_FRM_MOVE );
}
}
@@ -85,17 +85,17 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
case MACASSGN_OLE: // OLE
{
if( !bHtmlMode )
- aItem.AddEvent( OUString( SwResId(STR_EVENT_OBJECT_SELECT) ), OUString(),
+ aItem.AddEvent( SwResId(STR_EVENT_OBJECT_SELECT), OUString(),
SW_EVENT_OBJECT_SELECT );
}
SAL_FALLTHROUGH;
case MACASSGN_INETFMT: // INetFormat-Attributes
{
- aItem.AddEvent( OUString( SwResId(STR_EVENT_MOUSEOVER_OBJECT) ), OUString(),
+ aItem.AddEvent( SwResId(STR_EVENT_MOUSEOVER_OBJECT), OUString(),
SFX_EVENT_MOUSEOVER_OBJECT );
- aItem.AddEvent( OUString( SwResId(STR_EVENT_MOUSECLICK_OBJECT) ), OUString(),
+ aItem.AddEvent( SwResId(STR_EVENT_MOUSECLICK_OBJECT), OUString(),
SFX_EVENT_MOUSECLICK_OBJECT);
- aItem.AddEvent( OUString( SwResId(STR_EVENT_MOUSEOUT_OBJECT) ), OUString(),
+ aItem.AddEvent( SwResId(STR_EVENT_MOUSEOUT_OBJECT), OUString(),
SFX_EVENT_MOUSEOUT_OBJECT);
}
break;
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index a1fc7fa5655b..31cf6911d9c8 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -531,7 +531,7 @@ void SwLabPage::Reset(const SfxItemSet* rSet)
for(std::vector<OUString>::const_iterator i = GetParentSwLabDlg()->Makes().begin(); i != GetParentSwLabDlg()->Makes().end(); ++i)
{
- if(m_pMakeBox->GetEntryPos(OUString(*i)) == LISTBOX_ENTRY_NOTFOUND)
+ if(m_pMakeBox->GetEntryPos(*i) == LISTBOX_ENTRY_NOTFOUND)
m_pMakeBox->InsertEntry(*i);
}
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 2f1815ab6598..029bccef8456 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -667,7 +667,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
// TODO/MBA: testing
uno::Reference < beans::XPropertySet > xSet( rMedium.GetStorage(), uno::UNO_QUERY );
if ( xSet.is() )
- xSet->setPropertyValue("MediaType", uno::makeAny( OUString( SotExchange::GetFormatMimeType( nSaveClipId ) ) ) );
+ xSet->setPropertyValue("MediaType", uno::makeAny( SotExchange::GetFormatMimeType( nSaveClipId ) ) );
}
catch (const uno::Exception&)
{
diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx
index bb0083ea5d38..793d5cc8b019 100644
--- a/sw/source/uibase/config/modcfg.cxx
+++ b/sw/source/uibase/config/modcfg.cxx
@@ -618,11 +618,11 @@ static void lcl_WriteOpt(const InsCaptionOpt& rOpt, Any* pValues, sal_Int32 nPro
switch(nOffset)
{
case 0: pValues[nProp] <<= rOpt.UseCaption(); break;//Enable
- case 1: pValues[nProp] <<= OUString(rOpt.GetCategory()); break;//Category
+ case 1: pValues[nProp] <<= rOpt.GetCategory(); break;//Category
case 2: pValues[nProp] <<= (sal_Int32)rOpt.GetNumType(); break;//Numbering",
case 3: pValues[nProp] <<= rOpt.GetNumSeparator(); break;//NumberingSeparator",
- case 4: pValues[nProp] <<= OUString(rOpt.GetCaption()); break;//CaptionText",
- case 5: pValues[nProp] <<= OUString(rOpt.GetSeparator());break;//Delimiter",
+ case 4: pValues[nProp] <<= rOpt.GetCaption(); break;//CaptionText",
+ case 5: pValues[nProp] <<= rOpt.GetSeparator();break;//Delimiter",
case 6: pValues[nProp] <<= (sal_Int32)rOpt.GetLevel(); break;//Level",
case 7: pValues[nProp] <<= (sal_Int32)rOpt.GetPos(); break;//Position",
case 8: pValues[nProp] <<= (OUString&)rOpt.GetCharacterStyle(); break; //CharacterStyle
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 421ed22c59c9..cc45bd357a20 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1947,7 +1947,7 @@ uno::Reference< sdbcx::XColumnsSupplier> SwDBManager::GetColumnSupplier(uno::Ref
uno::Reference<beans::XPropertySet> xRowProperties(xRowSet, uno::UNO_QUERY);
xRowProperties->setPropertyValue("DataSourceName", uno::makeAny(sDataSource));
- xRowProperties->setPropertyValue("Command", uno::makeAny(OUString(rTableOrQuery)));
+ xRowProperties->setPropertyValue("Command", uno::makeAny(rTableOrQuery));
xRowProperties->setPropertyValue("CommandType", uno::makeAny(nCommandType));
xRowProperties->setPropertyValue("FetchSize", uno::makeAny((sal_Int32)10));
xRowProperties->setPropertyValue("ActiveConnection", uno::makeAny(xConnection));
diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx
index aceedc727db8..69cd8881875f 100644
--- a/sw/source/uibase/envelp/labelcfg.cxx
+++ b/sw/source/uibase/envelp/labelcfg.cxx
@@ -226,7 +226,7 @@ static Sequence<PropertyValue> lcl_CreateProperties(
pValues[nProp].Name = pNames[nProp];
switch(nProp)
{
- case 0: pValues[nProp].Value <<= OUString(rRec.aType); break;
+ case 0: pValues[nProp].Value <<= rRec.aType; break;
case 1:
{
rMeasure.clear();
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index c2be3f05de94..83d49b785c2e 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -261,7 +261,7 @@ void SwCommentRuler::UpdateCommentHelpText()
nTooltipResId = STR_HIDE_COMMENTS;
else
nTooltipResId = STR_SHOW_COMMENTS;
- SetQuickHelpText( OUString( SwResId( nTooltipResId ) ) );
+ SetQuickHelpText( SwResId( nTooltipResId ) );
}
// TODO Make Ruler return its central rectangle instead of margins.
diff --git a/sw/source/uibase/shells/drformsh.cxx b/sw/source/uibase/shells/drformsh.cxx
index cde7c347c86a..fb5071a75d58 100644
--- a/sw/source/uibase/shells/drformsh.cxx
+++ b/sw/source/uibase/shells/drformsh.cxx
@@ -132,7 +132,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq)
INetURLObject aAbs;
if( pMedium )
aAbs = pMedium->GetURLObject();
- aTmp <<= OUString(URIHelper::SmartRel2Abs(aAbs, rHLinkItem.GetURL()));
+ aTmp <<= URIHelper::SmartRel2Abs(aAbs, rHLinkItem.GetURL());
xPropSet->setPropertyValue( sTargetURL, aTmp );
if( !rHLinkItem.GetTargetFrame().isEmpty() )
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 613a008ad967..4ee04dd89bd4 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -279,9 +279,9 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
aMargin = pMarginItem->GetSize();
if ( pURLItem )
- xSet->setPropertyValue("FrameURL", uno::makeAny( OUString( pURLItem->GetValue() ) ) );
+ xSet->setPropertyValue("FrameURL", uno::makeAny( pURLItem->GetValue() ) );
if ( pNameItem )
- xSet->setPropertyValue("FrameName", uno::makeAny( OUString( pNameItem->GetValue() ) ) );
+ xSet->setPropertyValue("FrameName", uno::makeAny( pNameItem->GetValue() ) );
if ( eScroll == ScrollingMode::Auto )
xSet->setPropertyValue("FrameIsAutoScroll",
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index bc71aad799b6..c5f284426d15 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -257,8 +257,8 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
static short lcl_AskRedlineFlags(vcl::Window *pWin)
{
ScopedVclPtrInstance<MessBox> aQBox( pWin, 0,
- OUString( SwResId( STR_REDLINE_TITLE ) ),
- OUString( SwResId( STR_REDLINE_MSG ) ) );
+ SwResId( STR_REDLINE_TITLE ),
+ SwResId( STR_REDLINE_MSG ) );
aQBox->SetImage( QueryBox::GetStandardImage() );
const ButtonDialogFlags nBtnFlags = ButtonDialogFlags::Default |
ButtonDialogFlags::OK |
@@ -1422,7 +1422,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
const sal_Int16 nWordType = ::i18n::WordType::DICTIONARY_WORD;
bool bWord = rSh.IsInWord( nWordType ) || rSh.IsStartWord( nWordType ) || rSh.IsEndWord( nWordType );
if (bValid && bWord)
- aText = rSh.HasSelection()? OUString(rSh.GetSelText()) : rSh.GetCurWord();
+ aText = rSh.HasSelection()? rSh.GetSelText() : rSh.GetCurWord();
LanguageType nLang = rSh.GetCurLang();
LanguageTag aLanguageTag( nLang);
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 650a42416892..bda2d5cf53d1 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -420,8 +420,8 @@ void SwView::HyphenateDocument()
// do not hyphenate if interactive hyphenation is active elsewhere
if (SwEditShell::HasHyphIter())
{
- ScopedVclPtrInstance<MessBox>( nullptr, WB_OK, OUString( SwResId( STR_HYPH_TITLE ) ),
- OUString( SwResId( STR_MULT_INTERACT_HYPH_WARN ) ) )->Execute();
+ ScopedVclPtrInstance<MessBox>( nullptr, WB_OK, SwResId( STR_HYPH_TITLE ),
+ SwResId( STR_MULT_INTERACT_HYPH_WARN ) )->Execute();
return;
}
@@ -495,7 +495,7 @@ bool SwView::IsValidSelectionForThesaurus() const
OUString SwView::GetThesaurusLookUpText( bool bSelection ) const
{
- return bSelection ? OUString(m_pWrtShell->GetSelText()) : m_pWrtShell->GetCurWord();
+ return bSelection ? m_pWrtShell->GetSelText() : m_pWrtShell->GetCurWord();
}
void SwView::InsertThesaurusSynonym( const OUString &rSynonmText, const OUString &rLookUpText, bool bSelection )
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 660046dc3288..dfc3586184e7 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -386,7 +386,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
if( !mpPrinter && !sPrinterName.isEmpty() && mpDocSh->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
SfxPrinter* pPrinter = mpDoc->getIDocumentDeviceAccess().getPrinter( true );
- if ( OUString ( pPrinter->GetName()) != sPrinterName )
+ if ( pPrinter->GetName() != sPrinterName )
{
VclPtrInstance<SfxPrinter> pNewPrinter( pPrinter->GetOptions().Clone(), sPrinterName );
assert (! pNewPrinter->isDisposed() );
@@ -932,7 +932,7 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
case HANDLE_PRINTER_NAME:
{
SfxPrinter *pPrinter = mpDoc->getIDocumentDeviceAccess().getPrinter( false );
- rValue <<= pPrinter ? OUString ( pPrinter->GetName()) : OUString();
+ rValue <<= pPrinter ? pPrinter->GetName() : OUString();
}
break;
case HANDLE_PRINTER_SETUP:
diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx
index bf179022f7e7..0d6ba76eb06f 100644
--- a/sw/source/uibase/utlui/attrdesc.cxx
+++ b/sw/source/uibase/utlui/attrdesc.cxx
@@ -102,12 +102,12 @@ bool SwFormatCharFormat::GetPresentation
if ( pCharFormat )
{
OUString aStr;
- rText = OUString( SwResId( STR_CHARFMT ) );
+ rText = SwResId( STR_CHARFMT );
pCharFormat->GetPresentation( ePres, eCoreUnit, ePresUnit, aStr );
rText = rText + "(" + aStr + ")";
}
else
- rText = OUString( SwResId( STR_NO_CHARFMT ) );
+ rText = SwResId( STR_NO_CHARFMT );
return true;
}
@@ -162,11 +162,11 @@ bool SwFormatDrop::GetPresentation
rText = OUString::number( GetChars() ) + " ";
}
rText = rText +
- OUString( SwResId( STR_DROP_OVER ) ) +
+ SwResId( STR_DROP_OVER ) +
" " +
OUString::number( GetLines() ) +
" " +
- OUString( SwResId( STR_DROP_LINES ) );
+ SwResId( STR_DROP_LINES );
}
else
rText = SwResId( STR_NO_DROP_LINES );
@@ -252,7 +252,7 @@ bool SwFormatFrameSize::GetPresentation
}
else
{
- rText = OUString( ::GetMetricText( GetHeight(), eCoreUnit, ePresUnit, pIntl ) ) +
+ rText = ::GetMetricText( GetHeight(), eCoreUnit, ePresUnit, pIntl ) +
" " + ::GetSvxString( ::GetMetricId( ePresUnit ) );
}
}
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 1fa40eb160d7..9145fb223c37 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -209,7 +209,7 @@ void SwWrtShell::Insert( const OUString &rStr )
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, GetCursorDescr());
- aRewriter.AddRule(UndoArg2, OUString(SwResId(STR_YIELDS)));
+ aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS));
{
OUString aTmpStr;
aTmpStr += SwResId(STR_START_QUOTE);
@@ -479,7 +479,7 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame
{
try
{
- xSet->setPropertyValue("Formula", uno::makeAny( OUString( aMathData ) ) );
+ xSet->setPropertyValue("Formula", uno::makeAny( aMathData ) );
bActivate = false;
}
catch (const uno::Exception&)