summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-28 17:56:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-29 16:42:33 +0100
commit042033f1e6da22616cb76c8d950c20c9efecbad5 (patch)
tree26b3f1f42d067506f44550b410f3fb9640616a5b /sw/source/filter/ww8
parentccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff)
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx4
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx6
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.hxx2
7 files changed, 13 insertions, 13 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6f76dcbaebaa..1134900df65e 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7010,7 +7010,7 @@ void DocxAttributeOutput::FontPitchType( FontPitch ePitch ) const
m_pSerializer->singleElementNS(XML_w, XML_pitch, FSNS(XML_w, XML_val), pPitch);
}
-void DocxAttributeOutput::EmbedFont( const OUString& name, FontFamily family, FontPitch pitch )
+void DocxAttributeOutput::EmbedFont( std::u16string_view name, FontFamily family, FontPitch pitch )
{
if( !m_rExport.m_rDoc.getIDocumentSettingAccess().get( DocumentSettingId::EMBED_FONTS ))
return; // no font embedding with this document
@@ -7025,7 +7025,7 @@ static char toHexChar( int value )
return value >= 10 ? value + 'A' - 10 : value + '0';
}
-void DocxAttributeOutput::EmbedFontStyle( const OUString& name, int tag, FontFamily family, FontItalic italic,
+void DocxAttributeOutput::EmbedFontStyle( std::u16string_view name, int tag, FontFamily family, FontItalic italic,
FontWeight weight, FontPitch pitch )
{
// Embed font if at least viewing is allowed (in which case the opening app must check
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index ed9fe43c5dbf..20781b13ceb3 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -325,7 +325,7 @@ public:
void FontPitchType( FontPitch ePitch ) const;
/// Write out the font into the document, if it's an embedded font.
- void EmbedFont( const OUString& name, FontFamily family, FontPitch pitch );
+ void EmbedFont( std::u16string_view name, FontFamily family, FontPitch pitch );
/// Definition of a numbering instance.
virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) override;
@@ -435,7 +435,7 @@ private:
void WriteFFData( const FieldInfos& rInfos );
void WritePendingPlaceholder();
- void EmbedFontStyle( const OUString& name, int tag, FontFamily family, FontItalic italic, FontWeight weight,
+ void EmbedFontStyle( std::u16string_view name, int tag, FontFamily family, FontItalic italic, FontWeight weight,
FontPitch pitch );
/**
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index ebff8c9db442..fdee9d097f31 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1062,8 +1062,8 @@ public:
virtual void OutputField( const SwField* pField, ww::eField eFieldType,
const OUString& rFieldCmd, FieldFlags nMode = FieldFlags::All ) override;
- void StartCommentOutput( const OUString& rName );
- void EndCommentOutput( const OUString& rName );
+ void StartCommentOutput( std::u16string_view rName );
+ void EndCommentOutput( std::u16string_view rName );
void OutGrf(const ww8::Frame &rFrame);
bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> const& xOleStg,
const tools::SvRef<SotStorage>& xObjStg, OUString const& rStorageName,
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 1cd22f2ee910..e05882cd09ad 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1893,15 +1893,15 @@ void WW8Export::OutputField( const SwField* pField, ww::eField eFieldType,
InsertSpecialChar( *this, 0x15, nullptr, bIncludeEmptyPicLocation );
}
-void WW8Export::StartCommentOutput(const OUString& rName)
+void WW8Export::StartCommentOutput(std::u16string_view rName)
{
const OUString sStr{ FieldString(ww::eQUOTE) + "[" + rName + "] " };
OutputField(nullptr, ww::eQUOTE, sStr, FieldFlags::Start | FieldFlags::CmdStart);
}
-void WW8Export::EndCommentOutput(const OUString& rName)
+void WW8Export::EndCommentOutput(std::u16string_view rName)
{
- const OUString sStr{ " [" + rName + "] " };
+ const OUString sStr{ OUString::Concat(" [") + rName + "] " };
OutputField(nullptr, ww::eQUOTE, sStr, FieldFlags::CmdEnd | FieldFlags::End |
FieldFlags::Close);
}
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index c141c857f37c..d76614290239 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -159,9 +159,9 @@ static Color WW8TransCol(SVBT32 nWC)
return Color(nWC[0], nWC[1], nWC[2]);
}
-void wwFrameNamer::SetUniqueGraphName(SwFrameFormat *pFrameFormat, const OUString &rFixed)
+void wwFrameNamer::SetUniqueGraphName(SwFrameFormat *pFrameFormat, std::u16string_view rFixed)
{
- if (mbIsDisabled || rFixed.isEmpty())
+ if (mbIsDisabled || rFixed.empty())
return;
pFrameFormat->SetName(msSeed+OUString::number(++mnImportedGraphicsCount) + ": " + rFixed);
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index b3d4fba36294..c8e52560564c 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -382,7 +382,7 @@ bool BasicProjImportHelper::import( const uno::Reference< io::XInputStream >& rx
oox::StorageRef vbaStg = root.openSubStorage( "Macros" , false );
if ( vbaStg )
{
- oox::ole::VbaProject aVbaPrj( mxCtx, mrDocShell.GetModel(), "Writer" );
+ oox::ole::VbaProject aVbaPrj( mxCtx, mrDocShell.GetModel(), u"Writer" );
bRet = aVbaPrj.importVbaProject( *vbaStg );
}
}
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 7629d2e5a63d..57b53e05589c 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -942,7 +942,7 @@ private:
wwFrameNamer& operator=(wwFrameNamer const&) = delete;
public:
- void SetUniqueGraphName(SwFrameFormat *pFrameFormat, const OUString &rFixedPart);
+ void SetUniqueGraphName(SwFrameFormat *pFrameFormat, std::u16string_view rFixedPart);
wwFrameNamer(bool bIsDisabled, const OUString &rSeed)
: msSeed(rSeed), mnImportedGraphicsCount(0), mbIsDisabled(bIsDisabled)
{