summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-11-19 13:22:44 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-11-19 15:23:35 +0100
commit56c89190a2c717d6c24f2826f3b82ffe41b0ab6e (patch)
tree33929e7c7177de0bea5a6512bb2b70dfecab5847 /vcl/source
parente4d8f186d07aa1999e16abff3381e37b8764e964 (diff)
Extended loplugin:ostr: vcl
Change-Id: I2a9d5383d1831d8bf61e5280d66556d71fccae52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159666 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/filter/GraphicFormatDetector.cxx14
-rw-r--r--vcl/source/filter/graphicfilter.cxx2
-rw-r--r--vcl/source/filter/idxf/dxfentrd.cxx10
-rw-r--r--vcl/source/filter/ieps/ieps.cxx2
-rw-r--r--vcl/source/filter/ipdf/pdfdocument.cxx88
-rw-r--r--vcl/source/gdi/WidgetDefinition.cxx2
-rw-r--r--vcl/source/gdi/WidgetDefinitionReader.cxx68
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx4
-rw-r--r--vcl/source/gdi/gdimtf.cxx4
-rw-r--r--vcl/source/gdi/mtfxmldump.cxx116
-rw-r--r--vcl/source/gdi/pdfobjectcopier.cxx12
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx52
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx4
-rw-r--r--vcl/source/outdev/gradient.cxx4
-rw-r--r--vcl/source/outdev/transparent.cxx4
-rw-r--r--vcl/source/pdf/XmpMetadata.cxx81
-rw-r--r--vcl/source/treelist/iconview.cxx2
-rw-r--r--vcl/source/treelist/imap2.cxx4
-rw-r--r--vcl/source/window/DocWindow.cxx2
-rw-r--r--vcl/source/window/floatwin.cxx2
20 files changed, 242 insertions, 235 deletions
diff --git a/vcl/source/filter/GraphicFormatDetector.cxx b/vcl/source/filter/GraphicFormatDetector.cxx
index 38a6ec28585e..a878a8ca111d 100644
--- a/vcl/source/filter/GraphicFormatDetector.cxx
+++ b/vcl/source/filter/GraphicFormatDetector.cxx
@@ -1119,7 +1119,8 @@ bool GraphicFormatDetector::checkEPS()
maMetadata.mnFormat = GraphicFileFormat::EPS;
return true;
}
- else if (checkArrayForMatchingStrings(pFirstBytesAsCharArray, 30, { "%!PS-Adobe", " EPS" }))
+ else if (checkArrayForMatchingStrings(pFirstBytesAsCharArray, 30,
+ { "%!PS-Adobe"_ostr, " EPS"_ostr }))
{
maMetadata.mnFormat = GraphicFileFormat::EPS;
return true;
@@ -1228,7 +1229,7 @@ bool GraphicFormatDetector::checkRAS()
bool GraphicFormatDetector::checkXPM()
{
const char* pFirstBytesAsCharArray = reinterpret_cast<char*>(maFirstBytes.data());
- if (matchArrayWithString(pFirstBytesAsCharArray, 256, "/* XPM */"))
+ if (matchArrayWithString(pFirstBytesAsCharArray, 256, "/* XPM */"_ostr))
{
maMetadata.mnFormat = GraphicFileFormat::XPM;
return true;
@@ -1247,7 +1248,7 @@ bool GraphicFormatDetector::checkXBM()
const char* pBufferAsCharArray = reinterpret_cast<char*>(pBuffer.get());
- if (checkArrayForMatchingStrings(pBufferAsCharArray, nSize, { "#define", "_width" }))
+ if (checkArrayForMatchingStrings(pBufferAsCharArray, nSize, { "#define"_ostr, "_width"_ostr }))
{
maMetadata.mnFormat = GraphicFileFormat::XBM;
return true;
@@ -1272,14 +1273,15 @@ bool GraphicFormatDetector::checkSVG()
// #119176# SVG files which have no xml header at all have shown up this is optional
// check for "xml" then "version" then "DOCTYPE" and "svg" tags
if (checkArrayForMatchingStrings(pCheckArrayAsCharArray, nCheckSize,
- { "<?xml", "version", "DOCTYPE", "svg" }))
+ { "<?xml"_ostr, "version"_ostr, "DOCTYPE"_ostr, "svg"_ostr }))
{
bIsSvg = true;
}
// check for svg element in 1st 256 bytes
// search for '<svg'
- if (!bIsSvg && checkArrayForMatchingStrings(pCheckArrayAsCharArray, nCheckSize, { "<svg" }))
+ if (!bIsSvg
+ && checkArrayForMatchingStrings(pCheckArrayAsCharArray, nCheckSize, { "<svg"_ostr }))
{
bIsSvg = true;
}
@@ -1306,7 +1308,7 @@ bool GraphicFormatDetector::checkSVG()
}
// search for '<svg'
- if (checkArrayForMatchingStrings(pCheckArrayAsCharArray, nCheckSize, { "<svg" }))
+ if (checkArrayForMatchingStrings(pCheckArrayAsCharArray, nCheckSize, { "<svg"_ostr }))
{
bIsSvg = true;
}
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index f082e5b17d8b..374645ba9f27 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1808,7 +1808,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, std::u16string_vi
aCodec.BeginCompression( ZCODEC_DEFAULT_COMPRESSION, /*gzLib*/true );
// the inner modify time/filename doesn't really matter in this context because
// compressed graphic formats are meant to be opened as is - not to be extracted
- aCodec.SetCompressionMetadata( "inner", 0, nUncompressedCRC32 );
+ aCodec.SetCompressionMetadata( "inner"_ostr, 0, nUncompressedCRC32 );
aCodec.Compress( rCompressableStm, rOStm );
tools::Long nCompressedLength = aCodec.EndCompression();
if ( rOStm.GetError() || nCompressedLength <= 0 )
diff --git a/vcl/source/filter/idxf/dxfentrd.cxx b/vcl/source/filter/idxf/dxfentrd.cxx
index b4915c6573f8..9f9e075514db 100644
--- a/vcl/source/filter/idxf/dxfentrd.cxx
+++ b/vcl/source/filter/idxf/dxfentrd.cxx
@@ -26,8 +26,8 @@
//--------------------------DXFBasicEntity--------------------------------------
DXFBasicEntity::DXFBasicEntity(DXFEntityType eThisType)
- : m_sLayer("0")
- , m_sLineType("BYLAYER")
+ : m_sLayer("0"_ostr)
+ , m_sLineType("BYLAYER"_ostr)
{
eType=eThisType;
pSucc=nullptr;
@@ -192,7 +192,7 @@ void DXFSolidEntity::EvaluateGroup(DXFGroupReader & rDGR)
DXFTextEntity::DXFTextEntity()
: DXFBasicEntity(DXF_TEXT)
- , m_sStyle("STANDARD")
+ , m_sStyle("STANDARD"_ostr)
{
fHeight=1.0;
fRotAngle=0.0;
@@ -289,7 +289,7 @@ void DXFInsertEntity::EvaluateGroup(DXFGroupReader & rDGR)
DXFAttDefEntity::DXFAttDefEntity()
: DXFBasicEntity(DXF_ATTDEF)
- , m_sStyle("STANDARD")
+ , m_sStyle("STANDARD"_ostr)
{
fHeight=1.0;
nAttrFlags=0;
@@ -332,7 +332,7 @@ void DXFAttDefEntity::EvaluateGroup(DXFGroupReader & rDGR)
DXFAttribEntity::DXFAttribEntity()
: DXFBasicEntity(DXF_ATTRIB)
- , m_sStyle("STANDARD")
+ , m_sStyle("STANDARD"_ostr)
{
fHeight=1.0;
nAttrFlags=0;
diff --git a/vcl/source/filter/ieps/ieps.cxx b/vcl/source/filter/ieps/ieps.cxx
index dd2c1597abaf..bb4ea06b2a7a 100644
--- a/vcl/source/filter/ieps/ieps.cxx
+++ b/vcl/source/filter/ieps/ieps.cxx
@@ -427,7 +427,7 @@ static bool RenderAsBMP(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
static void CreateMtfReplacementAction( GDIMetaFile& rMtf, SvStream& rStrm, sal_uInt32 nOrigPos, sal_uInt32 nPSSize,
sal_uInt32 nPosWMF, sal_uInt32 nSizeWMF, sal_uInt32 nPosTIFF, sal_uInt32 nSizeTIFF )
{
- OString aComment("EPSReplacementGraphic");
+ OString aComment("EPSReplacementGraphic"_ostr);
if ( nSizeWMF || nSizeTIFF )
{
std::vector<sal_uInt8> aWMFBuf;
diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx
index 53d3d37b4e86..159db9a38ba2 100644
--- a/vcl/source/filter/ipdf/pdfdocument.cxx
+++ b/vcl/source/filter/ipdf/pdfdocument.cxx
@@ -107,7 +107,7 @@ sal_uInt32 PDFDocument::GetNextSignature()
sal_uInt32 nRet = 0;
for (const auto& pSignature : GetSignatureWidgets())
{
- auto pT = dynamic_cast<PDFLiteralStringElement*>(pSignature->Lookup("T"));
+ auto pT = dynamic_cast<PDFLiteralStringElement*>(pSignature->Lookup("T"_ostr));
if (!pT)
continue;
@@ -212,7 +212,7 @@ sal_Int32 PDFDocument::WriteAppearanceObject(tools::Rectangle& rSignatureRectang
}
// Calculate the bounding box.
- PDFElement* pMediaBox = pPage->Lookup("MediaBox");
+ PDFElement* pMediaBox = pPage->Lookup("MediaBox"_ostr);
auto pMediaBoxArray = dynamic_cast<PDFArrayElement*>(pMediaBox);
if (!pMediaBoxArray || pMediaBoxArray->GetElements().size() < 4)
{
@@ -236,7 +236,7 @@ sal_Int32 PDFDocument::WriteAppearanceObject(tools::Rectangle& rSignatureRectang
}
rSignatureRectangle.setHeight(pHeight->GetValue());
- if (PDFObjectElement* pContentStream = pPage->LookupObject("Contents"))
+ if (PDFObjectElement* pContentStream = pPage->LookupObject("Contents"_ostr))
{
aContentStreams.push_back(pContentStream);
}
@@ -352,7 +352,7 @@ sal_Int32 PDFDocument::WriteAnnotObject(PDFObjectElement const& rFirstPage, sal_
bool PDFDocument::WritePageObject(PDFObjectElement& rFirstPage, sal_Int32 nAnnotId)
{
- PDFElement* pAnnots = rFirstPage.Lookup("Annots");
+ PDFElement* pAnnots = rFirstPage.Lookup("Annots"_ostr);
auto pAnnotsReference = dynamic_cast<PDFReferenceElement*>(pAnnots);
if (pAnnotsReference)
{
@@ -428,8 +428,8 @@ bool PDFDocument::WritePageObject(PDFObjectElement& rFirstPage, sal_Int32 nAnnot
PDFDictionaryElement* pDictionary = rFirstPage.GetDictionary();
// Offset right before the end of the Annots array.
- sal_uInt64 nAnnotsEndOffset = pDictionary->GetKeyOffset("Annots")
- + pDictionary->GetKeyValueLength("Annots") - 1;
+ sal_uInt64 nAnnotsEndOffset = pDictionary->GetKeyOffset("Annots"_ostr)
+ + pDictionary->GetKeyValueLength("Annots"_ostr) - 1;
// Length of beginning of the dictionary -> Annots end.
sal_uInt64 nAnnotsBeforeEndLength = nAnnotsEndOffset - rFirstPage.GetDictionaryOffset();
m_aEditBuffer.WriteBytes(static_cast<const char*>(m_aEditBuffer.GetData())
@@ -456,7 +456,7 @@ bool PDFDocument::WritePageObject(PDFObjectElement& rFirstPage, sal_Int32 nAnnot
bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& pRoot)
{
if (m_pXRefStream)
- pRoot = dynamic_cast<PDFReferenceElement*>(m_pXRefStream->Lookup("Root"));
+ pRoot = dynamic_cast<PDFReferenceElement*>(m_pXRefStream->Lookup("Root"_ostr));
else
{
if (!m_pTrailer)
@@ -464,7 +464,7 @@ bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& p
SAL_WARN("vcl.filter", "PDFDocument::Sign: found no trailer");
return false;
}
- pRoot = dynamic_cast<PDFReferenceElement*>(m_pTrailer->Lookup("Root"));
+ pRoot = dynamic_cast<PDFReferenceElement*>(m_pTrailer->Lookup("Root"_ostr));
}
if (!pRoot)
{
@@ -483,7 +483,7 @@ bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& p
SAL_WARN("vcl.filter", "PDFDocument::Sign: invalid catalog obj id");
return false;
}
- PDFElement* pAcroForm = pCatalog->Lookup("AcroForm");
+ PDFElement* pAcroForm = pCatalog->Lookup("AcroForm"_ostr);
auto pAcroFormReference = dynamic_cast<PDFReferenceElement*>(pAcroForm);
if (pAcroFormReference)
{
@@ -505,7 +505,7 @@ bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& p
// If this is nullptr, then the AcroForm object is not in an object stream.
SvMemoryStream* pStreamBuffer = pAcroFormObject->GetStreamBuffer();
- if (!pAcroFormObject->Lookup("Fields"))
+ if (!pAcroFormObject->Lookup("Fields"_ostr))
{
SAL_WARN("vcl.filter",
"PDFDocument::Sign: AcroForm object without required Fields key");
@@ -520,8 +520,8 @@ bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& p
}
// Offset right before the end of the Fields array.
- sal_uInt64 nFieldsEndOffset = pAcroFormDictionary->GetKeyOffset("Fields")
- + pAcroFormDictionary->GetKeyValueLength("Fields")
+ sal_uInt64 nFieldsEndOffset = pAcroFormDictionary->GetKeyOffset("Fields"_ostr)
+ + pAcroFormDictionary->GetKeyValueLength("Fields"_ostr)
- strlen("]");
// Length of beginning of the object dictionary -> Fields end.
@@ -585,7 +585,7 @@ bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& p
else
{
// AcroForm key is already there, insert our reference at the Fields end.
- auto it = pAcroFormDictionary->GetItems().find("Fields");
+ auto it = pAcroFormDictionary->GetItems().find("Fields"_ostr);
if (it == pAcroFormDictionary->GetItems().end())
{
SAL_WARN("vcl.filter", "PDFDocument::Sign: AcroForm without required Fields key");
@@ -600,8 +600,9 @@ bool PDFDocument::WriteCatalogObject(sal_Int32 nAnnotId, PDFReferenceElement*& p
}
// Offset right before the end of the Fields array.
- sal_uInt64 nFieldsEndOffset = pAcroFormDictionary->GetKeyOffset("Fields")
- + pAcroFormDictionary->GetKeyValueLength("Fields") - 1;
+ sal_uInt64 nFieldsEndOffset = pAcroFormDictionary->GetKeyOffset("Fields"_ostr)
+ + pAcroFormDictionary->GetKeyValueLength("Fields"_ostr)
+ - 1;
// Length of beginning of the Catalog dictionary -> Fields end.
sal_uInt64 nFieldsBeforeEndLength = nFieldsEndOffset - pCatalog->GetDictionaryOffset();
m_aEditBuffer.WriteBytes(static_cast<const char*>(m_aEditBuffer.GetData())
@@ -705,7 +706,7 @@ void PDFDocument::WriteXRef(sal_uInt64 nXRefOffset, PDFReferenceElement const* p
" 0 obj\n<</DecodeParms<</Columns 5/Predictor 12>>/Filter/FlateDecode");
// ID.
- auto pID = dynamic_cast<PDFArrayElement*>(m_pXRefStream->Lookup("ID"));
+ auto pID = dynamic_cast<PDFArrayElement*>(m_pXRefStream->Lookup("ID"_ostr));
if (pID)
{
const std::vector<PDFElement*>& rElements = pID->GetElements();
@@ -736,7 +737,7 @@ void PDFDocument::WriteXRef(sal_uInt64 nXRefOffset, PDFReferenceElement const* p
m_aEditBuffer.WriteOString("] ");
// Info.
- auto pInfo = dynamic_cast<PDFReferenceElement*>(m_pXRefStream->Lookup("Info"));
+ auto pInfo = dynamic_cast<PDFReferenceElement*>(m_pXRefStream->Lookup("Info"_ostr));
if (pInfo)
{
m_aEditBuffer.WriteOString("/Info ");
@@ -816,7 +817,7 @@ void PDFDocument::WriteXRef(sal_uInt64 nXRefOffset, PDFReferenceElement const* p
m_aEditBuffer.WriteOString(" ");
m_aEditBuffer.WriteNumberAsString(pRoot->GetGenerationValue());
m_aEditBuffer.WriteOString(" R\n");
- auto pInfo = dynamic_cast<PDFReferenceElement*>(m_pTrailer->Lookup("Info"));
+ auto pInfo = dynamic_cast<PDFReferenceElement*>(m_pTrailer->Lookup("Info"_ostr));
if (pInfo)
{
m_aEditBuffer.WriteOString("/Info ");
@@ -825,7 +826,7 @@ void PDFDocument::WriteXRef(sal_uInt64 nXRefOffset, PDFReferenceElement const* p
m_aEditBuffer.WriteNumberAsString(pInfo->GetGenerationValue());
m_aEditBuffer.WriteOString(" R\n");
}
- auto pID = dynamic_cast<PDFArrayElement*>(m_pTrailer->Lookup("ID"));
+ auto pID = dynamic_cast<PDFArrayElement*>(m_pTrailer->Lookup("ID"_ostr));
if (pID)
{
const std::vector<PDFElement*>& rElements = pID->GetElements();
@@ -1210,7 +1211,7 @@ bool PDFDocument::Tokenize(SvStream& rStream, TokenizeMode eMode,
if (!pObj)
continue;
- PDFElement* pLookup = pObj->Lookup("Length");
+ PDFElement* pLookup = pObj->Lookup("Length"_ostr);
auto pReference = dynamic_cast<PDFReferenceElement*>(pLookup);
if (pReference)
{
@@ -1406,14 +1407,14 @@ bool PDFDocument::Read(SvStream& rStream)
PDFNumberElement* pPrev = nullptr;
if (m_pTrailer)
{
- pPrev = dynamic_cast<PDFNumberElement*>(m_pTrailer->Lookup("Prev"));
+ pPrev = dynamic_cast<PDFNumberElement*>(m_pTrailer->Lookup("Prev"_ostr));
// Remember the offset of this trailer in the correct order. It's
// possible that newer trailers don't have a larger offset.
m_aTrailerOffsets.push_back(m_pTrailer->GetLocation());
}
else if (m_pXRefStream)
- pPrev = dynamic_cast<PDFNumberElement*>(m_pXRefStream->Lookup("Prev"));
+ pPrev = dynamic_cast<PDFNumberElement*>(m_pXRefStream->Lookup("Prev"_ostr));
if (pPrev)
nStartXRef = pPrev->GetValue();
@@ -1467,7 +1468,7 @@ size_t PDFDocument::FindStartXRef(SvStream& rStream)
rStream.Seek(nBeforePeek);
if (nSize != aBuf.size())
aBuf.resize(nSize);
- OString aPrefix("startxref");
+ OString aPrefix("startxref"_ostr);
// Find the last startxref at the end of the document.
auto itLastValid = aBuf.end();
auto it = aBuf.begin();
@@ -1534,7 +1535,7 @@ void PDFDocument::ReadXRefStream(SvStream& rStream)
// So that the Prev key can be looked up later.
m_pXRefStream = pObject;
- PDFElement* pLookup = pObject->Lookup("Length");
+ PDFElement* pLookup = pObject->Lookup("Length"_ostr);
auto pNumber = dynamic_cast<PDFNumberElement*>(pLookup);
if (!pNumber)
{
@@ -1564,7 +1565,7 @@ void PDFDocument::ReadXRefStream(SvStream& rStream)
std::vector<char> aBuf(nLength);
rStream.ReadBytes(aBuf.data(), aBuf.size());
- auto pFilter = dynamic_cast<PDFNameElement*>(pObject->Lookup("Filter"));
+ auto pFilter = dynamic_cast<PDFNameElement*>(pObject->Lookup("Filter"_ostr));
if (!pFilter)
{
SAL_WARN("vcl.filter", "PDFDocument::ReadXRefStream: no Filter found");
@@ -1580,14 +1581,15 @@ void PDFDocument::ReadXRefStream(SvStream& rStream)
int nColumns = 1;
int nPredictor = 1;
- if (auto pDecodeParams = dynamic_cast<PDFDictionaryElement*>(pObject->Lookup("DecodeParms")))
+ if (auto pDecodeParams
+ = dynamic_cast<PDFDictionaryElement*>(pObject->Lookup("DecodeParms"_ostr)))
{
const std::map<OString, PDFElement*>& rItems = pDecodeParams->GetItems();
- auto it = rItems.find("Columns");
+ auto it = rItems.find("Columns"_ostr);
if (it != rItems.end())
if (auto pColumns = dynamic_cast<PDFNumberElement*>(it->second))
nColumns = pColumns->GetValue();
- it = rItems.find("Predictor");
+ it = rItems.find("Predictor"_ostr);
if (it != rItems.end())
if (auto pPredictor = dynamic_cast<PDFNumberElement*>(it->second))
nPredictor = pPredictor->GetValue();
@@ -1605,12 +1607,12 @@ void PDFDocument::ReadXRefStream(SvStream& rStream)
}
// Look up the first and the last entry we need to read.
- auto pIndex = dynamic_cast<PDFArrayElement*>(pObject->Lookup("Index"));
+ auto pIndex = dynamic_cast<PDFArrayElement*>(pObject->Lookup("Index"_ostr));
std::vector<size_t> aFirstObjects;
std::vector<size_t> aNumberOfObjects;
if (!pIndex)
{
- auto pSize = dynamic_cast<PDFNumberElement*>(pObject->Lookup("Size"));
+ auto pSize = dynamic_cast<PDFNumberElement*>(pObject->Lookup("Size"_ostr));
if (pSize)
{
aFirstObjects.push_back(0);
@@ -1655,7 +1657,7 @@ void PDFDocument::ReadXRefStream(SvStream& rStream)
// Look up the format of a single entry.
const int nWSize = 3;
- auto pW = dynamic_cast<PDFArrayElement*>(pObject->Lookup("W"));
+ auto pW = dynamic_cast<PDFArrayElement*>(pObject->Lookup("W"_ostr));
if (!pW || pW->GetElements().size() < nWSize)
{
SAL_WARN("vcl.filter", "PDFDocument::ReadXRefStream: W not found or has < 3 elements");
@@ -1912,7 +1914,7 @@ const std::vector<std::unique_ptr<PDFElement>>& PDFDocument::GetElements() const
/// Visits the page tree recursively, looking for page objects.
static void visitPages(PDFObjectElement* pPages, std::vector<PDFObjectElement*>& rRet)
{
- auto pKidsRef = pPages->Lookup("Kids");
+ auto pKidsRef = pPages->Lookup("Kids"_ostr);
auto pKids = dynamic_cast<PDFArrayElement*>(pKidsRef);
if (!pKids)
{
@@ -1957,7 +1959,7 @@ static void visitPages(PDFObjectElement* pPages, std::vector<PDFObjectElement*>&
continue;
}
- auto pName = dynamic_cast<PDFNameElement*>(pKidObject->Lookup("Type"));
+ auto pName = dynamic_cast<PDFNameElement*>(pKidObject->Lookup("Type"_ostr));
if (pName && pName->GetValue() == "Pages")
// Pages inside pages: recurse.
visitPages(pKidObject, rRet);
@@ -1984,9 +1986,9 @@ PDFObjectElement* PDFDocument::GetCatalog()
}
if (pTrailer)
- pRoot = dynamic_cast<PDFReferenceElement*>(pTrailer->Lookup("Root"));
+ pRoot = dynamic_cast<PDFReferenceElement*>(pTrailer->Lookup("Root"_ostr));
else if (m_pXRefStream)
- pRoot = dynamic_cast<PDFReferenceElement*>(m_pXRefStream->Lookup("Root"));
+ pRoot = dynamic_cast<PDFReferenceElement*>(m_pXRefStream->Lookup("Root"_ostr));
if (!pRoot)
{
@@ -2008,7 +2010,7 @@ std::vector<PDFObjectElement*> PDFDocument::GetPages()
return aRet;
}
- PDFObjectElement* pPages = pCatalog->LookupObject("Pages");
+ PDFObjectElement* pPages = pCatalog->LookupObject("Pages"_ostr);
if (!pPages)
{
SAL_WARN("vcl.filter", "PDFDocument::GetPages: catalog (obj " << pCatalog->GetObjectValue()
@@ -2034,7 +2036,7 @@ std::vector<PDFObjectElement*> PDFDocument::GetSignatureWidgets()
if (!pPage)
continue;
- PDFElement* pAnnotsElement = pPage->Lookup("Annots");
+ PDFElement* pAnnotsElement = pPage->Lookup("Annots"_ostr);
auto pAnnots = dynamic_cast<PDFArrayElement*>(pAnnotsElement);
if (!pAnnots)
{
@@ -2063,7 +2065,7 @@ std::vector<PDFObjectElement*> PDFDocument::GetSignatureWidgets()
if (!pAnnotObject)
continue;
- auto pFT = dynamic_cast<PDFNameElement*>(pAnnotObject->Lookup("FT"));
+ auto pFT = dynamic_cast<PDFNameElement*>(pAnnotObject->Lookup("FT"_ostr));
if (!pFT || pFT->GetValue() != "Sig")
continue;
@@ -2499,7 +2501,7 @@ void PDFObjectElement::ParseStoredObjects()
return;
}
- auto pType = dynamic_cast<PDFNameElement*>(Lookup("Type"));
+ auto pType = dynamic_cast<PDFNameElement*>(Lookup("Type"_ostr));
if (!pType || pType->GetValue() != "ObjStm")
{
if (!pType)
@@ -2510,7 +2512,7 @@ void PDFObjectElement::ParseStoredObjects()
return;
}
- auto pFilter = dynamic_cast<PDFNameElement*>(Lookup("Filter"));
+ auto pFilter = dynamic_cast<PDFNameElement*>(Lookup("Filter"_ostr));
if (!pFilter || pFilter->GetValue() != "FlateDecode")
{
if (!pFilter)
@@ -2521,14 +2523,14 @@ void PDFObjectElement::ParseStoredObjects()
return;
}
- auto pFirst = dynamic_cast<PDFNumberElement*>(Lookup("First"));
+ auto pFirst = dynamic_cast<PDFNumberElement*>(Lookup("First"_ostr));
if (!pFirst)
{
SAL_WARN("vcl.filter", "PDFObjectElement::ParseStoredObjects: no First");
return;
}
- auto pN = dynamic_cast<PDFNumberElement*>(Lookup("N"));
+ auto pN = dynamic_cast<PDFNumberElement*>(Lookup("N"_ostr));
if (!pN)
{
SAL_WARN("vcl.filter", "PDFObjectElement::ParseStoredObjects: no N");
@@ -2536,7 +2538,7 @@ void PDFObjectElement::ParseStoredObjects()
}
size_t nN = pN->GetValue();
- auto pLength = dynamic_cast<PDFNumberElement*>(Lookup("Length"));
+ auto pLength = dynamic_cast<PDFNumberElement*>(Lookup("Length"_ostr));
if (!pLength)
{
SAL_WARN("vcl.filter", "PDFObjectElement::ParseStoredObjects: no length");
diff --git a/vcl/source/gdi/WidgetDefinition.cxx b/vcl/source/gdi/WidgetDefinition.cxx
index bd6019815e0f..c7d6032dfccc 100644
--- a/vcl/source/gdi/WidgetDefinition.cxx
+++ b/vcl/source/gdi/WidgetDefinition.cxx
@@ -70,7 +70,7 @@ WidgetDefinitionPart::getStates(ControlType eType, ControlPart ePart, ControlSta
bAdd = false;
}
- OString sExtra = "any";
+ OString sExtra = "any"_ostr;
switch (eType)
{
diff --git a/vcl/source/gdi/WidgetDefinitionReader.cxx b/vcl/source/gdi/WidgetDefinitionReader.cxx
index a36c62564ea2..f5373b035cdd 100644
--- a/vcl/source/gdi/WidgetDefinitionReader.cxx
+++ b/vcl/source/gdi/WidgetDefinitionReader.cxx
@@ -67,7 +67,7 @@ bool readSetting(OString const& rInputString, OString& rOutputString)
OString getValueOrAny(OString const& rInputString)
{
if (rInputString.isEmpty())
- return "any";
+ return "any"_ostr;
return rInputString;
}
@@ -202,34 +202,34 @@ void WidgetDefinitionReader::readDrawingDefinition(
if (rWalker.name() == "rect")
{
Color aStrokeColor;
- readColor(rWalker.attribute("stroke"), aStrokeColor);
+ readColor(rWalker.attribute("stroke"_ostr), aStrokeColor);
Color aFillColor;
- readColor(rWalker.attribute("fill"), aFillColor);
- OString sStrokeWidth = rWalker.attribute("stroke-width");
+ readColor(rWalker.attribute("fill"_ostr), aFillColor);
+ OString sStrokeWidth = rWalker.attribute("stroke-width"_ostr);
sal_Int32 nStrokeWidth = -1;
if (!sStrokeWidth.isEmpty())
nStrokeWidth = sStrokeWidth.toInt32();
sal_Int32 nRx = -1;
- OString sRx = rWalker.attribute("rx");
+ OString sRx = rWalker.attribute("rx"_ostr);
if (!sRx.isEmpty())
nRx = sRx.toInt32();
sal_Int32 nRy = -1;
- OString sRy = rWalker.attribute("ry");
+ OString sRy = rWalker.attribute("ry"_ostr);
if (!sRy.isEmpty())
nRy = sRy.toInt32();
- OString sX1 = rWalker.attribute("x1");
+ OString sX1 = rWalker.attribute("x1"_ostr);
float fX1 = sX1.isEmpty() ? 0.0 : sX1.toFloat();
- OString sY1 = rWalker.attribute("y1");
+ OString sY1 = rWalker.attribute("y1"_ostr);
float fY1 = sY1.isEmpty() ? 0.0 : sY1.toFloat();
- OString sX2 = rWalker.attribute("x2");
+ OString sX2 = rWalker.attribute("x2"_ostr);
float fX2 = sX2.isEmpty() ? 1.0 : sX2.toFloat();
- OString sY2 = rWalker.attribute("y2");
+ OString sY2 = rWalker.attribute("y2"_ostr);
float fY2 = sY2.isEmpty() ? 1.0 : sY2.toFloat();
rpState->addDrawRectangle(aStrokeColor, nStrokeWidth, aFillColor, fX1, fY1, fX2, fY2,
@@ -238,36 +238,36 @@ void WidgetDefinitionReader::readDrawingDefinition(
else if (rWalker.name() == "line")
{
Color aStrokeColor;
- readColor(rWalker.attribute("stroke"), aStrokeColor);
+ readColor(rWalker.attribute("stroke"_ostr), aStrokeColor);
- OString sStrokeWidth = rWalker.attribute("stroke-width");
+ OString sStrokeWidth = rWalker.attribute("stroke-width"_ostr);
sal_Int32 nStrokeWidth = -1;
if (!sStrokeWidth.isEmpty())
nStrokeWidth = sStrokeWidth.toInt32();
- OString sX1 = rWalker.attribute("x1");
+ OString sX1 = rWalker.attribute("x1"_ostr);
float fX1 = sX1.isEmpty() ? -1.0 : sX1.toFloat();
- OString sY1 = rWalker.attribute("y1");
+ OString sY1 = rWalker.attribute("y1"_ostr);
float fY1 = sY1.isEmpty() ? -1.0 : sY1.toFloat();
- OString sX2 = rWalker.attribute("x2");
+ OString sX2 = rWalker.attribute("x2"_ostr);
float fX2 = sX2.isEmpty() ? -1.0 : sX2.toFloat();
- OString sY2 = rWalker.attribute("y2");
+ OString sY2 = rWalker.attribute("y2"_ostr);
float fY2 = sY2.isEmpty() ? -1.0 : sY2.toFloat();
rpState->addDrawLine(aStrokeColor, nStrokeWidth, fX1, fY1, fX2, fY2);
}
else if (rWalker.name() == "image")
{
- OString sSource = rWalker.attribute("source");
+ OString sSource = rWalker.attribute("source"_ostr);
rpState->addDrawImage(m_rResourcePath
+ OStringToOUString(sSource, RTL_TEXTENCODING_UTF8));
}
else if (rWalker.name() == "external")
{
- OString sSource = rWalker.attribute("source");
+ OString sSource = rWalker.attribute("source"_ostr);
rpState->addDrawExternal(m_rResourcePath
+ OStringToOUString(sSource, RTL_TEXTENCODING_UTF8));
}
@@ -284,40 +284,40 @@ void WidgetDefinitionReader::readDefinition(tools::XmlWalker& rWalker,
{
if (rWalker.name() == "part")
{
- OString sPart = rWalker.attribute("value");
+ OString sPart = rWalker.attribute("value"_ostr);
ControlPart ePart = xmlStringToControlPart(sPart);
std::shared_ptr<WidgetDefinitionPart> pPart = std::make_shared<WidgetDefinitionPart>();
- OString sWidth = rWalker.attribute("width");
+ OString sWidth = rWalker.attribute("width"_ostr);
if (!sWidth.isEmpty())
{
sal_Int32 nWidth = sWidth.isEmpty() ? 0 : sWidth.toInt32();
pPart->mnWidth = nWidth;
}
- OString sHeight = rWalker.attribute("height");
+ OString sHeight = rWalker.attribute("height"_ostr);
if (!sHeight.isEmpty())
{
sal_Int32 nHeight = sHeight.isEmpty() ? 0 : sHeight.toInt32();
pPart->mnHeight = nHeight;
}
- OString sMarginHeight = rWalker.attribute("margin-height");
+ OString sMarginHeight = rWalker.attribute("margin-height"_ostr);
if (!sMarginHeight.isEmpty())
{
sal_Int32 nMarginHeight = sMarginHeight.isEmpty() ? 0 : sMarginHeight.toInt32();
pPart->mnMarginHeight = nMarginHeight;
}
- OString sMarginWidth = rWalker.attribute("margin-width");
+ OString sMarginWidth = rWalker.attribute("margin-width"_ostr);
if (!sMarginWidth.isEmpty())
{
sal_Int32 nMarginWidth = sMarginWidth.isEmpty() ? 0 : sMarginWidth.toInt32();
pPart->mnMarginWidth = nMarginWidth;
}
- OString sOrientation = rWalker.attribute("orientation");
+ OString sOrientation = rWalker.attribute("orientation"_ostr);
if (!sOrientation.isEmpty())
{
pPart->msOrientation = sOrientation;
@@ -339,14 +339,14 @@ void WidgetDefinitionReader::readPart(tools::XmlWalker& rWalker,
{
if (rWalker.name() == "state")
{
- OString sEnabled = getValueOrAny(rWalker.attribute("enabled"));
- OString sFocused = getValueOrAny(rWalker.attribute("focused"));
- OString sPressed = getValueOrAny(rWalker.attribute("pressed"));
- OString sRollover = getValueOrAny(rWalker.attribute("rollover"));
- OString sDefault = getValueOrAny(rWalker.attribute("default"));
- OString sSelected = getValueOrAny(rWalker.attribute("selected"));
- OString sButtonValue = getValueOrAny(rWalker.attribute("button-value"));
- OString sExtra = getValueOrAny(rWalker.attribute("extra"));
+ OString sEnabled = getValueOrAny(rWalker.attribute("enabled"_ostr));
+ OString sFocused = getValueOrAny(rWalker.attribute("focused"_ostr));
+ OString sPressed = getValueOrAny(rWalker.attribute("pressed"_ostr));
+ OString sRollover = getValueOrAny(rWalker.attribute("rollover"_ostr));
+ OString sDefault = getValueOrAny(rWalker.attribute("default"_ostr));
+ OString sSelected = getValueOrAny(rWalker.attribute("selected"_ostr));
+ OString sButtonValue = getValueOrAny(rWalker.attribute("button-value"_ostr));
+ OString sExtra = getValueOrAny(rWalker.attribute("extra"_ostr));
std::shared_ptr<WidgetDefinitionState> pState = std::make_shared<WidgetDefinitionState>(
sEnabled, sFocused, sPressed, sRollover, sDefault, sSelected, sButtonValue, sExtra);
@@ -459,7 +459,7 @@ bool WidgetDefinitionReader::read(WidgetDefinition& rWidgetDefinition)
auto pair = aStyleColorMap.find(aWalker.name());
if (pair != aStyleColorMap.end())
{
- readColor(aWalker.attribute("value"), *pair->second);
+ readColor(aWalker.attribute("value"_ostr), *pair->second);
}
aWalker.next();
}
@@ -473,7 +473,7 @@ bool WidgetDefinitionReader::read(WidgetDefinition& rWidgetDefinition)
auto pair = aSettingMap.find(aWalker.name());
if (pair != aSettingMap.end())
{
- readSetting(aWalker.attribute("value"), *pair->second);
+ readSetting(aWalker.attribute("value"_ostr), *pair->second);
}
aWalker.next();
}
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index ce7977599bc2..95c42c5df724 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -238,7 +238,7 @@ namespace
WriteSvtGraphicStroke( aMemStm, rStroke );
rTarget.AddAction(
new MetaCommentAction(
- "XPATHSTROKE_SEQ_BEGIN",
+ "XPATHSTROKE_SEQ_BEGIN"_ostr,
0,
static_cast< const sal_uInt8* >(aMemStm.GetData()),
aMemStm.TellEnd()));
@@ -251,7 +251,7 @@ namespace
WriteSvtGraphicFill( aMemStm, rFilling );
rTarget.AddAction(
new MetaCommentAction(
- "XPATHFILL_SEQ_BEGIN",
+ "XPATHFILL_SEQ_BEGIN"_ostr,
0,
static_cast< const sal_uInt8* >(aMemStm.GetData()),
aMemStm.TellEnd()));
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index ecb7c25aa368..fb4ff37dfa9d 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -1141,7 +1141,7 @@ void GDIMetaFile::Rotate( Degree10 nAngle10 )
aStroke.getPath( aPath );
aStroke.setPath( ImplGetRotatedPolygon( aPath, aRotAnchor, aRotOffset, fSin, fCos ) );
WriteSvtGraphicStroke( aDest, aStroke );
- aMtf.AddAction( new MetaCommentAction( "XPATHSTROKE_SEQ_BEGIN", 0,
+ aMtf.AddAction( new MetaCommentAction( "XPATHSTROKE_SEQ_BEGIN"_ostr, 0,
static_cast<const sal_uInt8*>( aDest.GetData()), aDest.Tell() ) );
}
else
@@ -1152,7 +1152,7 @@ void GDIMetaFile::Rotate( Degree10 nAngle10 )
aFill.getPath( aPath );
aFill.setPath( ImplGetRotatedPolyPolygon( aPath, aRotAnchor, aRotOffset, fSin, fCos ) );
WriteSvtGraphicFill( aDest, aFill );
- aMtf.AddAction( new MetaCommentAction( "XPATHFILL_SEQ_BEGIN", 0,
+ aMtf.AddAction( new MetaCommentAction( "XPATHFILL_SEQ_BEGIN"_ostr, 0,
static_cast<const sal_uInt8*>( aDest.GetData()), aDest.Tell() ) );
}
}
diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx
index f507fddb284e..a5e0a716c5af 100644
--- a/vcl/source/gdi/mtfxmldump.cxx
+++ b/vcl/source/gdi/mtfxmldump.cxx
@@ -276,62 +276,62 @@ OString convertLineStyleToString(const MetaActionType nActionType)
{
switch (nActionType)
{
- case MetaActionType::NONE: return "null";
- case MetaActionType::PIXEL: return "pixel";
- case MetaActionType::POINT: return "point";
- case MetaActionType::LINE: return "line";
- case MetaActionType::RECT: return "rect";
- case MetaActionType::ROUNDRECT: return "roundrect";
- case MetaActionType::ELLIPSE: return "ellipse";
- case MetaActionType::ARC: return "arc";
- case MetaActionType::PIE: return "pie";
- case MetaActionType::CHORD: return "chord";
- case MetaActionType::POLYLINE: return "polyline";
- case MetaActionType::POLYGON: return "polygon";
- case MetaActionType::POLYPOLYGON: return "polypolygon";
- case MetaActionType::TEXT: return "text";
- case MetaActionType::TEXTARRAY: return "textarray";
- case MetaActionType::STRETCHTEXT: return "stretchtext";
- case MetaActionType::TEXTRECT: return "textrect";
- case MetaActionType::TEXTLINE: return "textline";
- case MetaActionType::BMP: return "bmp";
- case MetaActionType::BMPSCALE: return "bmpscale";
- case MetaActionType::BMPSCALEPART: return "bmpscalepart";
- case MetaActionType::BMPEX: return "bmpex";
- case MetaActionType::BMPEXSCALE: return "bmpexscale";
- case MetaActionType::BMPEXSCALEPART: return "bmpexscalepart";
- case MetaActionType::MASK: return "mask";
- case MetaActionType::MASKSCALE: return "maskscale";
- case MetaActionType::MASKSCALEPART: return "maskscalepart";
- case MetaActionType::GRADIENT: return "gradient";
- case MetaActionType::GRADIENTEX: return "gradientex";
- case MetaActionType::HATCH: return "hatch";
- case MetaActionType::WALLPAPER: return "wallpaper";
- case MetaActionType::CLIPREGION: return "clipregion";
- case MetaActionType::ISECTRECTCLIPREGION: return "sectrectclipregion";
- case MetaActionType::ISECTREGIONCLIPREGION: return "sectregionclipregion";
- case MetaActionType::MOVECLIPREGION: return "moveclipregion";
- case MetaActionType::LINECOLOR: return "linecolor";
- case MetaActionType::FILLCOLOR: return "fillcolor";
- case MetaActionType::TEXTCOLOR: return "textcolor";
- case MetaActionType::TEXTFILLCOLOR: return "textfillcolor";
- case MetaActionType::TEXTLINECOLOR: return "textlinecolor";
- case MetaActionType::OVERLINECOLOR: return "overlinecolor";
- case MetaActionType::TEXTALIGN: return "textalign";
- case MetaActionType::MAPMODE: return "mapmode";
- case MetaActionType::FONT: return "font";
- case MetaActionType::PUSH: return "push";
- case MetaActionType::POP: return "pop";
- case MetaActionType::RASTEROP: return "rasterop";
- case MetaActionType::Transparent: return "transparent";
- case MetaActionType::FLOATTRANSPARENT: return "floattransparent";
- case MetaActionType::EPS: return "eps";
- case MetaActionType::REFPOINT: return "refpoint";
- case MetaActionType::COMMENT: return "comment";
- case MetaActionType::LAYOUTMODE: return "layoutmode";
- case MetaActionType::TEXTLANGUAGE: return "textlanguage";
+ case MetaActionType::NONE: return "null"_ostr;
+ case MetaActionType::PIXEL: return "pixel"_ostr;
+ case MetaActionType::POINT: return "point"_ostr;
+ case MetaActionType::LINE: return "line"_ostr;
+ case MetaActionType::RECT: return "rect"_ostr;
+ case MetaActionType::ROUNDRECT: return "roundrect"_ostr;
+ case MetaActionType::ELLIPSE: return "ellipse"_ostr;
+ case MetaActionType::ARC: return "arc"_ostr;
+ case MetaActionType::PIE: return "pie"_ostr;
+ case MetaActionType::CHORD: return "chord"_ostr;
+ case MetaActionType::POLYLINE: return "polyline"_ostr;
+ case MetaActionType::POLYGON: return "polygon"_ostr;
+ case MetaActionType::POLYPOLYGON: return "polypolygon"_ostr;
+ case MetaActionType::TEXT: return "text"_ostr;
+ case MetaActionType::TEXTARRAY: return "textarray"_ostr;
+ case MetaActionType::STRETCHTEXT: return "stretchtext"_ostr;
+ case MetaActionType::TEXTRECT: return "textrect"_ostr;
+ case MetaActionType::TEXTLINE: return "textline"_ostr;
+ case MetaActionType::BMP: return "bmp"_ostr;
+ case MetaActionType::BMPSCALE: return "bmpscale"_ostr;
+ case MetaActionType::BMPSCALEPART: return "bmpscalepart"_ostr;
+ case MetaActionType::BMPEX: return "bmpex"_ostr;
+ case MetaActionType::BMPEXSCALE: return "bmpexscale"_ostr;
+ case MetaActionType::BMPEXSCALEPART: return "bmpexscalepart"_ostr;
+ case MetaActionType::MASK: return "mask"_ostr;
+ case MetaActionType::MASKSCALE: return "maskscale"_ostr;
+ case MetaActionType::MASKSCALEPART: return "maskscalepart"_ostr;
+ case MetaActionType::GRADIENT: return "gradient"_ostr;
+ case MetaActionType::GRADIENTEX: return "gradientex"_ostr;
+ case MetaActionType::HATCH: return "hatch"_ostr;
+ case MetaActionType::WALLPAPER: return "wallpaper"_ostr;
+ case MetaActionType::CLIPREGION: return "clipregion"_ostr;
+ case MetaActionType::ISECTRECTCLIPREGION: return "sectrectclipregion"_ostr;
+ case MetaActionType::ISECTREGIONCLIPREGION: return "sectregionclipregion"_ostr;
+ case MetaActionType::MOVECLIPREGION: return "moveclipregion"_ostr;
+ case MetaActionType::LINECOLOR: return "linecolor"_ostr;
+ case MetaActionType::FILLCOLOR: return "fillcolor"_ostr;
+ case MetaActionType::TEXTCOLOR: return "textcolor"_ostr;
+ case MetaActionType::TEXTFILLCOLOR: return "textfillcolor"_ostr;
+ case MetaActionType::TEXTLINECOLOR: return "textlinecolor"_ostr;
+ case MetaActionType::OVERLINECOLOR: return "overlinecolor"_ostr;
+ case MetaActionType::TEXTALIGN: return "textalign"_ostr;
+ case MetaActionType::MAPMODE: return "mapmode"_ostr;
+ case MetaActionType::FONT: return "font"_ostr;
+ case MetaActionType::PUSH: return "push"_ostr;
+ case MetaActionType::POP: return "pop"_ostr;
+ case MetaActionType::RASTEROP: return "rasterop"_ostr;
+ case MetaActionType::Transparent: return "transparent"_ostr;
+ case MetaActionType::FLOATTRANSPARENT: return "floattransparent"_ostr;
+ case MetaActionType::EPS: return "eps"_ostr;
+ case MetaActionType::REFPOINT: return "refpoint"_ostr;
+ case MetaActionType::COMMENT: return "comment"_ostr;
+ case MetaActionType::LAYOUTMODE: return "layoutmode"_ostr;
+ case MetaActionType::TEXTLANGUAGE: return "textlanguage"_ostr;
}
- return "";
+ return ""_ostr;
}
OUString convertBitmapExTransparentType(BitmapEx const & rBitmapEx)
@@ -539,11 +539,11 @@ void writeRectangle(tools::XmlWriter& rWriter, tools::Rectangle const& rRectangl
rWriter.attribute("left", rRectangle.Left());
rWriter.attribute("top", rRectangle.Top());
if (rRectangle.IsWidthEmpty())
- rWriter.attribute("right", OString("empty"));
+ rWriter.attribute("right", "empty"_ostr);
else
rWriter.attribute("right", rRectangle.Right());
if (rRectangle.IsHeightEmpty())
- rWriter.attribute("bottom", OString("empty"));
+ rWriter.attribute("bottom", "empty"_ostr);
else
rWriter.attribute("bottom", rRectangle.Bottom());
}
@@ -1557,7 +1557,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, tools::XmlWriter& r
default:
{
rWriter.startElement(sCurrentElementTag);
- rWriter.attribute("note", OString("not implemented in xml dump"));
+ rWriter.attribute("note", "not implemented in xml dump"_ostr);
rWriter.endElement();
}
break;
diff --git a/vcl/source/gdi/pdfobjectcopier.cxx b/vcl/source/gdi/pdfobjectcopier.cxx
index e0e1599f384c..0d07c0df7f67 100644
--- a/vcl/source/gdi/pdfobjectcopier.cxx
+++ b/vcl/source/gdi/pdfobjectcopier.cxx
@@ -181,7 +181,8 @@ OString PDFObjectCopier::copyExternalResources(filter::PDFObjectElement& rPage,
// Get the rKind subset of the resource dictionary.
std::map<OString, filter::PDFElement*> aItems;
filter::PDFObjectElement* pKindObject = nullptr;
- if (auto pResources = dynamic_cast<filter::PDFDictionaryElement*>(rPage.Lookup("Resources")))
+ if (auto pResources
+ = dynamic_cast<filter::PDFDictionaryElement*>(rPage.Lookup("Resources"_ostr)))
{
// Resources is a direct dictionary.
filter::PDFElement* pLookup = pResources->LookupElement(rKind);
@@ -203,7 +204,7 @@ OString PDFObjectCopier::copyExternalResources(filter::PDFObjectElement& rPage,
aItems = pReferenced->GetDictionaryItems();
}
}
- else if (filter::PDFObjectElement* pPageResources = rPage.LookupObject("Resources"))
+ else if (filter::PDFObjectElement* pPageResources = rPage.LookupObject("Resources"_ostr))
{
// Resources is an indirect object.
filter::PDFElement* pValue = pPageResources->Lookup(rKind);
@@ -278,7 +279,8 @@ void PDFObjectCopier::copyPageResources(filter::PDFObjectElement* pPage, OString
{
rLine.append(" /Resources <<");
static const std::initializer_list<OString> aKeys
- = { "ColorSpace", "ExtGState", "Font", "XObject", "Shading", "Pattern" };
+ = { "ColorSpace"_ostr, "ExtGState"_ostr, "Font"_ostr,
+ "XObject"_ostr, "Shading"_ostr, "Pattern"_ostr };
for (const auto& rKey : aKeys)
{
rLine.append(copyExternalResources(*pPage, rKey, rCopiedResources));
@@ -300,8 +302,8 @@ sal_Int32 PDFObjectCopier::copyPageStreams(std::vector<filter::PDFObjectElement*
SvMemoryStream& rPageStream = pPageStream->GetMemory();
- auto pFilter = dynamic_cast<filter::PDFNameElement*>(pContent->Lookup("Filter"));
- auto pFilterArray = dynamic_cast<filter::PDFArrayElement*>(pContent->Lookup("Filter"));
+ auto pFilter = dynamic_cast<filter::PDFNameElement*>(pContent->Lookup("Filter"_ostr));
+ auto pFilterArray = dynamic_cast<filter::PDFArrayElement*>(pContent->Lookup("Filter"_ostr));
if (!pFilter && pFilterArray)
{
auto& aElements = pFilterArray->GetElements();
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index e8b9cf7a777c..f132c585fde3 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -439,7 +439,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
OString::number( static_cast<const PDFWriter::RadioButtonWidget&>(i_rControl).RadioGroup );
}
else
- aPartialName = OString( "Widget" );
+ aPartialName = "Widget"_ostr;
}
if( ! m_aContext.AllowDuplicateFieldNames )
@@ -4185,7 +4185,7 @@ void PDFWriterImpl::createDefaultPushButtonAppearance( PDFWidget& rButton, const
pop();
- rButton.m_aAppearances[ "N" ][ "Standard" ] = new SvMemoryStream();
+ rButton.m_aAppearances[ "N"_ostr ][ "Standard"_ostr ] = new SvMemoryStream();
/* seems like a bad hack but at least works in both AR5 and 6:
we draw the button ourselves and tell AR
@@ -4293,7 +4293,7 @@ void PDFWriterImpl::createDefaultEditAppearance( PDFWidget& rEdit, const PDFWrit
endRedirect();
pop();
- rEdit.m_aAppearances[ "N" ][ "Standard" ] = pEditStream;
+ rEdit.m_aAppearances[ "N"_ostr ][ "Standard"_ostr ] = pEditStream;
rEdit.m_aDAString = aDA.makeStringAndClear();
}
@@ -4321,7 +4321,7 @@ void PDFWriterImpl::createDefaultListBoxAppearance( PDFWidget& rBox, const PDFWr
endRedirect();
pop();
- rBox.m_aAppearances[ "N" ][ "Standard" ] = pListBoxStream;
+ rBox.m_aAppearances[ "N"_ostr ][ "Standard"_ostr ] = pListBoxStream;
// prepare DA string
OStringBuffer aDA( 256 );
@@ -4462,14 +4462,14 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
aDA.append( "> Tj\nET\nQ\nEMC\n" );
writeBuffer( aDA );
endRedirect();
- rBox.m_aAppearances[ "N" ][ "Yes" ] = pCheckStream;
+ rBox.m_aAppearances[ "N"_ostr ][ "Yes"_ostr ] = pCheckStream;
// write 'unchecked' appearance stream
SvMemoryStream* pUncheckStream = new SvMemoryStream( 256, 256 );
beginRedirect( pUncheckStream, aCheckRect );
writeBuffer( "/Tx BMC\nEMC\n" );
endRedirect();
- rBox.m_aAppearances[ "N" ][ "Off" ] = pUncheckStream;
+ rBox.m_aAppearances[ "N"_ostr ][ "Off"_ostr ] = pUncheckStream;
}
void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const PDFWriter::RadioButtonWidget& rWidget )
@@ -4559,13 +4559,13 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
endRedirect();
pop();
- rBox.m_aAppearances[ "N" ][ "Yes" ] = pCheckStream;
+ rBox.m_aAppearances[ "N"_ostr ][ "Yes"_ostr ] = pCheckStream;
SvMemoryStream* pUncheckStream = new SvMemoryStream( 256, 256 );
beginRedirect( pUncheckStream, aCheckRect );
writeBuffer( "/Tx BMC\nEMC\n" );
endRedirect();
- rBox.m_aAppearances[ "N" ][ "Off" ] = pUncheckStream;
+ rBox.m_aAppearances[ "N"_ostr ][ "Off"_ostr ] = pUncheckStream;
}
bool PDFWriterImpl::emitAppearances( PDFWidget& rWidget, OStringBuffer& rAnnotDict )
@@ -4684,10 +4684,10 @@ bool PDFWriterImpl::emitWidgetAnnotations()
{
if ( !rWidget.m_aOnValue.isEmpty() )
{
- auto app_it = rWidget.m_aAppearances.find( "N" );
+ auto app_it = rWidget.m_aAppearances.find( "N"_ostr );
if( app_it != rWidget.m_aAppearances.end() )
{
- auto stream_it = app_it->second.find( "Yes" );
+ auto stream_it = app_it->second.find( "Yes"_ostr );
if( stream_it != app_it->second.end() )
{
SvMemoryStream* pStream = stream_it->second;
@@ -4703,10 +4703,10 @@ bool PDFWriterImpl::emitWidgetAnnotations()
if ( !rWidget.m_aOffValue.isEmpty() )
{
- auto app_it = rWidget.m_aAppearances.find( "N" );
+ auto app_it = rWidget.m_aAppearances.find( "N"_ostr );
if( app_it != rWidget.m_aAppearances.end() )
{
- auto stream_it = app_it->second.find( "Off" );
+ auto stream_it = app_it->second.find( "Off"_ostr );
if( stream_it != app_it->second.end() )
{
SvMemoryStream* pStream = stream_it->second;
@@ -9125,7 +9125,7 @@ void PDFWriterImpl::writeReferenceXObject(const ReferenceXObjectEmit& rEmit)
}
double aOrigin[2] = { 0.0, 0.0 };
- if (auto* pArray = dynamic_cast<filter::PDFArrayElement*>(pPage->Lookup("MediaBox")))
+ if (auto* pArray = dynamic_cast<filter::PDFArrayElement*>(pPage->Lookup("MediaBox"_ostr)))
{
const auto& rElements = pArray->GetElements();
if (rElements.size() >= 4)
@@ -9140,9 +9140,9 @@ void PDFWriterImpl::writeReferenceXObject(const ReferenceXObjectEmit& rEmit)
}
std::vector<filter::PDFObjectElement*> aContentStreams;
- if (filter::PDFObjectElement* pContentStream = pPage->LookupObject("Contents"))
+ if (filter::PDFObjectElement* pContentStream = pPage->LookupObject("Contents"_ostr))
aContentStreams.push_back(pContentStream);
- else if (auto pArray = dynamic_cast<filter::PDFArrayElement*>(pPage->Lookup("Contents")))
+ else if (auto pArray = dynamic_cast<filter::PDFArrayElement*>(pPage->Lookup("Contents"_ostr)))
{
for (const auto pElement : pArray->GetElements())
{
@@ -9166,7 +9166,7 @@ void PDFWriterImpl::writeReferenceXObject(const ReferenceXObjectEmit& rEmit)
// Merge link annotations from pPage to our page.
std::vector<filter::PDFObjectElement*> aAnnots;
- if (auto pArray = dynamic_cast<filter::PDFArrayElement*>(pPage->Lookup("Annots")))
+ if (auto pArray = dynamic_cast<filter::PDFArrayElement*>(pPage->Lookup("Annots"_ostr)))
{
for (const auto pElement : pArray->GetElements())
{
@@ -9182,13 +9182,13 @@ void PDFWriterImpl::writeReferenceXObject(const ReferenceXObjectEmit& rEmit)
continue;
}
- auto pType = dynamic_cast<filter::PDFNameElement*>(pObject->Lookup("Type"));
+ auto pType = dynamic_cast<filter::PDFNameElement*>(pObject->Lookup("Type"_ostr));
if (!pType || pType->GetValue() != "Annot")
{
continue;
}
- auto pSubtype = dynamic_cast<filter::PDFNameElement*>(pObject->Lookup("Subtype"));
+ auto pSubtype = dynamic_cast<filter::PDFNameElement*>(pObject->Lookup("Subtype"_ostr));
if (!pSubtype || pSubtype->GetValue() != "Link")
{
continue;
@@ -9224,7 +9224,7 @@ void PDFWriterImpl::writeReferenceXObject(const ReferenceXObjectEmit& rEmit)
tools::Long nWidth = aSize.Width();
tools::Long nHeight = aSize.Height();
basegfx::B2DRange aBBox(0, 0, aSize.Width(), aSize.Height());
- if (auto pRotate = dynamic_cast<filter::PDFNumberElement*>(pPage->Lookup("Rotate")))
+ if (auto pRotate = dynamic_cast<filter::PDFNumberElement*>(pPage->Lookup("Rotate"_ostr)))
{
// The original page was rotated, then construct a transformation matrix which does the
// same with our form object.
@@ -10729,7 +10729,7 @@ void PDFWriterImpl::beginStructureElementMCSeq()
! m_aStructure[ m_nCurrentStructElement ].m_bOpenMCSeq // already opened sequence
)
{
- OString aLine = "/Artifact ";
+ OString aLine = "/Artifact "_ostr;
writeBuffer( aLine );
// emit property list if requested
OStringBuffer buf;
@@ -11055,7 +11055,7 @@ void PDFWriterImpl::addInternalStructureContainer( PDFStructureElement& rEle )
std::vector< sal_Int32 > aNewChildren;
// add Div in RoleMap, in case no one else did (TODO: is it needed? Is it dangerous?)
- OString aAliasName("Div");
+ OString aAliasName("Div"_ostr);
addRoleMap(aAliasName, PDFWriter::Division);
while( rEle.m_aKids.size() > ncMaxPDFArraySize )
@@ -11635,10 +11635,10 @@ void PDFWriterImpl::ensureUniqueRadioOnValues()
PDFWidget& rKid = m_aWidgets[nKidIndex];
if ( !rKid.m_aOnValue.isEmpty() )
{
- auto app_it = rKid.m_aAppearances.find( "N" );
+ auto app_it = rKid.m_aAppearances.find( "N"_ostr );
if( app_it != rKid.m_aAppearances.end() )
{
- auto stream_it = app_it->second.find( "Yes" );
+ auto stream_it = app_it->second.find( "Yes"_ostr );
if( stream_it != app_it->second.end() )
{
SvMemoryStream* pStream = stream_it->second;
@@ -11654,10 +11654,10 @@ void PDFWriterImpl::ensureUniqueRadioOnValues()
if ( !rKid.m_aOffValue.isEmpty() )
{
- auto app_it = rKid.m_aAppearances.find( "N" );
+ auto app_it = rKid.m_aAppearances.find( "N"_ostr );
if( app_it != rKid.m_aAppearances.end() )
{
- auto stream_it = app_it->second.find( "Off" );
+ auto stream_it = app_it->second.find( "Off"_ostr );
if( stream_it != app_it->second.end() )
{
SvMemoryStream* pStream = stream_it->second;
@@ -11896,7 +11896,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
rNewWidget.m_aValue = OUString::number( m_nSignatureObject );
rNewWidget.m_aValue += " 0 R";
// let's add a fake appearance
- rNewWidget.m_aAppearances[ "N" ][ "Standard" ] = new SvMemoryStream();
+ rNewWidget.m_aAppearances[ "N"_ostr ][ "Standard"_ostr ] = new SvMemoryStream();
}
#endif
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 37583d0b01d1..58fc31aafdf8 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -604,7 +604,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
if( pA->GetComment() == "XPATHSTROKE_SEQ_BEGIN" )
{
- sSeqEnd = OString("XPATHSTROKE_SEQ_END");
+ sSeqEnd = "XPATHSTROKE_SEQ_END"_ostr;
SvtGraphicStroke aStroke;
ReadSvtGraphicStroke( aMemStm, aStroke );
@@ -689,7 +689,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
else if ( pA->GetComment() == "XPATHFILL_SEQ_BEGIN" )
{
- sSeqEnd = OString("XPATHFILL_SEQ_END");
+ sSeqEnd = "XPATHFILL_SEQ_END"_ostr;
SvtGraphicFill aFill;
ReadSvtGraphicFill( aMemStm, aFill );
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index d7fb11afd5d5..e3803d660d67 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -193,12 +193,12 @@ void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly,
}
else
{
- mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_BEGIN" ) );
+ mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_BEGIN"_ostr ) );
mpMetaFile->AddAction( new MetaGradientExAction( rPolyPoly, rGradient ) );
ClipAndDrawGradientMetafile ( rGradient, rPolyPoly );
- mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_END" ) );
+ mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_END"_ostr ) );
}
}
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 8817f54c738d..ce933f9417c7 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -1845,9 +1845,9 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
Point(), aBandBmp.GetSizePixel(),
aBandBmp, nMaxBmpDPIX, nMaxBmpDPIY);
- rOutMtf.AddAction( new MetaCommentAction( "PRNSPOOL_TRANSPARENTBITMAP_BEGIN" ) );
+ rOutMtf.AddAction( new MetaCommentAction( "PRNSPOOL_TRANSPARENTBITMAP_BEGIN"_ostr ) );
rOutMtf.AddAction( new MetaBmpScaleAction( aDstPtPix, aDstSzPix, aBandBmp ) );
- rOutMtf.AddAction( new MetaCommentAction( "PRNSPOOL_TRANSPARENTBITMAP_END" ) );
+ rOutMtf.AddAction( new MetaCommentAction( "PRNSPOOL_TRANSPARENTBITMAP_END"_ostr ) );
aPaintVDev->mbMap = true;
mbMap = bOldMap;
diff --git a/vcl/source/pdf/XmpMetadata.cxx b/vcl/source/pdf/XmpMetadata.cxx
index e90befdc05b6..53bf3902ab2b 100644
--- a/vcl/source/pdf/XmpMetadata.cxx
+++ b/vcl/source/pdf/XmpMetadata.cxx
@@ -41,8 +41,9 @@ void XmpMetadata::write()
{
tools::XmlWriter aXmlWriter(mpMemoryStream.get());
aXmlWriter.startDocument(2, false);
- aXmlWriter.startElement("x", "xmpmeta", "adobe:ns:meta/");
- aXmlWriter.startElement("rdf", "RDF", "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
+ aXmlWriter.startElement("x"_ostr, "xmpmeta"_ostr, "adobe:ns:meta/"_ostr);
+ aXmlWriter.startElement("rdf"_ostr, "RDF"_ostr,
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#"_ostr);
// PDF/A part ( ISO 19005-1:2005 - 6.7.11 )
if (mnPDF_A > 0)
@@ -50,15 +51,15 @@ void XmpMetadata::write()
OString sPdfVersion = OString::number(mnPDF_A);
aXmlWriter.startElement("rdf:Description");
- aXmlWriter.attribute("rdf:about", OString(""));
- aXmlWriter.attribute("xmlns:pdfaid", OString("http://www.aiim.org/pdfa/ns/id/"));
+ aXmlWriter.attribute("rdf:about", ""_ostr);
+ aXmlWriter.attribute("xmlns:pdfaid", "http://www.aiim.org/pdfa/ns/id/"_ostr);
aXmlWriter.startElement("pdfaid:part");
aXmlWriter.content(sPdfVersion);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaid:conformance");
- aXmlWriter.content("B");
+ aXmlWriter.content("B"_ostr);
aXmlWriter.endElement();
aXmlWriter.endElement();
@@ -71,11 +72,11 @@ void XmpMetadata::write()
|| !msSource.isEmpty() || !msType.isEmpty())
{
aXmlWriter.startElement("rdf:Description");
- aXmlWriter.attribute("rdf:about", OString(""));
- aXmlWriter.attribute("xmlns:dc", OString("http://purl.org/dc/elements/1.1/"));
+ aXmlWriter.attribute("rdf:about", ""_ostr);
+ aXmlWriter.attribute("xmlns:dc", "http://purl.org/dc/elements/1.1/"_ostr);
aXmlWriter.startElement("dc:format");
- aXmlWriter.content("application/pdf");
+ aXmlWriter.content("application/pdf"_ostr);
aXmlWriter.endElement();
if (!msTitle.isEmpty())
@@ -84,7 +85,7 @@ void XmpMetadata::write()
aXmlWriter.startElement("dc:title");
aXmlWriter.startElement("rdf:Alt");
aXmlWriter.startElement("rdf:li");
- aXmlWriter.attribute("xml:lang", OString("x-default"));
+ aXmlWriter.attribute("xml:lang", "x-default"_ostr);
aXmlWriter.content(msTitle);
aXmlWriter.endElement();
aXmlWriter.endElement();
@@ -105,7 +106,7 @@ void XmpMetadata::write()
aXmlWriter.startElement("dc:description");
aXmlWriter.startElement("rdf:Alt");
aXmlWriter.startElement("rdf:li");
- aXmlWriter.attribute("xml:lang", OString("x-default"));
+ aXmlWriter.attribute("xml:lang", "x-default"_ostr);
aXmlWriter.content(msSubject);
aXmlWriter.endElement();
aXmlWriter.endElement();
@@ -167,7 +168,7 @@ void XmpMetadata::write()
aXmlWriter.startElement("dc:rights");
aXmlWriter.startElement("rdf:Alt");
aXmlWriter.startElement("rdf:li");
- aXmlWriter.attribute("xml:lang", OString("x-default"));
+ aXmlWriter.attribute("xml:lang", "x-default"_ostr);
aXmlWriter.content(msRights);
aXmlWriter.endElement();
aXmlWriter.endElement();
@@ -194,74 +195,74 @@ void XmpMetadata::write()
if (mnPDF_A != 0)
{ // tdf#157517 PDF/A extension schema is required
aXmlWriter.startElement("rdf:Description");
- aXmlWriter.attribute("rdf:about", OString(""));
+ aXmlWriter.attribute("rdf:about", ""_ostr);
aXmlWriter.attribute("xmlns:pdfaExtension",
- OString("http://www.aiim.org/pdfa/ns/extension/"));
+ "http://www.aiim.org/pdfa/ns/extension/"_ostr);
aXmlWriter.attribute("xmlns:pdfaSchema",
- OString("http://www.aiim.org/pdfa/ns/schema#"));
+ "http://www.aiim.org/pdfa/ns/schema#"_ostr);
aXmlWriter.attribute("xmlns:pdfaProperty",
- OString("http://www.aiim.org/pdfa/ns/property#"));
+ "http://www.aiim.org/pdfa/ns/property#"_ostr);
aXmlWriter.startElement("pdfaExtension:schemas");
aXmlWriter.startElement("rdf:Bag");
aXmlWriter.startElement("rdf:li");
- aXmlWriter.attribute("rdf:parseType", OString("Resource"));
+ aXmlWriter.attribute("rdf:parseType", "Resource"_ostr);
aXmlWriter.startElement("pdfaSchema:namespaceURI");
- aXmlWriter.content("http://www.aiim.org/pdfua/ns/id/");
+ aXmlWriter.content("http://www.aiim.org/pdfua/ns/id/"_ostr);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaSchema:prefix");
- aXmlWriter.content("pdfuaid");
+ aXmlWriter.content("pdfuaid"_ostr);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaSchema:schema");
- aXmlWriter.content("PDF/UA identification schema");
+ aXmlWriter.content("PDF/UA identification schema"_ostr);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaSchema:property");
aXmlWriter.startElement("rdf:Seq");
aXmlWriter.startElement("rdf:li");
- aXmlWriter.attribute("rdf:parseType", OString("Resource"));
+ aXmlWriter.attribute("rdf:parseType", "Resource"_ostr);
aXmlWriter.startElement("pdfaProperty:category");
- aXmlWriter.content("internal");
+ aXmlWriter.content("internal"_ostr);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaProperty:description");
- aXmlWriter.content("PDF/UA version identifier");
+ aXmlWriter.content("PDF/UA version identifier"_ostr);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaProperty:name");
- aXmlWriter.content("part");
+ aXmlWriter.content("part"_ostr);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaProperty:valueType");
- aXmlWriter.content("Integer");
+ aXmlWriter.content("Integer"_ostr);
aXmlWriter.endElement();
aXmlWriter.endElement(); // rdf:li
aXmlWriter.startElement("rdf:li");
- aXmlWriter.attribute("rdf:parseType", OString("Resource"));
+ aXmlWriter.attribute("rdf:parseType", "Resource"_ostr);
aXmlWriter.startElement("pdfaProperty:category");
- aXmlWriter.content("internal");
+ aXmlWriter.content("internal"_ostr);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaProperty:description");
- aXmlWriter.content("PDF/UA amendment identifier");
+ aXmlWriter.content("PDF/UA amendment identifier"_ostr);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaProperty:name");
- aXmlWriter.content("amd");
+ aXmlWriter.content("amd"_ostr);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaProperty:valueType");
- aXmlWriter.content("Text");
+ aXmlWriter.content("Text"_ostr);
aXmlWriter.endElement();
aXmlWriter.endElement(); // rdf:li
aXmlWriter.startElement("rdf:li");
- aXmlWriter.attribute("rdf:parseType", OString("Resource"));
+ aXmlWriter.attribute("rdf:parseType", "Resource"_ostr);
aXmlWriter.startElement("pdfaProperty:category");
- aXmlWriter.content("internal");
+ aXmlWriter.content("internal"_ostr);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaProperty:description");
- aXmlWriter.content("PDF/UA corrigenda identifier");
+ aXmlWriter.content("PDF/UA corrigenda identifier"_ostr);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaProperty:name");
- aXmlWriter.content("corr");
+ aXmlWriter.content("corr"_ostr);
aXmlWriter.endElement();
aXmlWriter.startElement("pdfaProperty:valueType");
- aXmlWriter.content("Text");
+ aXmlWriter.content("Text"_ostr);
aXmlWriter.endElement();
aXmlWriter.endElement(); // rdf:li
@@ -274,8 +275,8 @@ void XmpMetadata::write()
}
OString sPdfUaVersion = OString::number(1);
aXmlWriter.startElement("rdf:Description");
- aXmlWriter.attribute("rdf:about", OString(""));
- aXmlWriter.attribute("xmlns:pdfuaid", OString("http://www.aiim.org/pdfua/ns/id/"));
+ aXmlWriter.attribute("rdf:about", ""_ostr);
+ aXmlWriter.attribute("xmlns:pdfuaid", "http://www.aiim.org/pdfua/ns/id/"_ostr);
aXmlWriter.startElement("pdfuaid:part");
aXmlWriter.content(sPdfUaVersion);
@@ -288,8 +289,8 @@ void XmpMetadata::write()
if (!msProducer.isEmpty() || !msKeywords.isEmpty() || !msPDFVersion.isEmpty())
{
aXmlWriter.startElement("rdf:Description");
- aXmlWriter.attribute("rdf:about", OString(""));
- aXmlWriter.attribute("xmlns:pdf", OString("http://ns.adobe.com/pdf/1.3/"));
+ aXmlWriter.attribute("rdf:about", ""_ostr);
+ aXmlWriter.attribute("xmlns:pdf", "http://ns.adobe.com/pdf/1.3/"_ostr);
if (!msProducer.isEmpty())
{
aXmlWriter.startElement("pdf:Producer");
@@ -313,8 +314,8 @@ void XmpMetadata::write()
// XMP Basic schema
aXmlWriter.startElement("rdf:Description");
- aXmlWriter.attribute("rdf:about", OString(""));
- aXmlWriter.attribute("xmlns:xmp", OString("http://ns.adobe.com/xap/1.0/"));
+ aXmlWriter.attribute("rdf:about", ""_ostr);
+ aXmlWriter.attribute("xmlns:xmp", "http://ns.adobe.com/xap/1.0/"_ostr);
if (!m_sCreatorTool.isEmpty())
{
aXmlWriter.startElement("xmp:CreatorTool");
diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx
index bd4368e9a998..e80a29b0bc0b 100644
--- a/vcl/source/treelist/iconview.cxx
+++ b/vcl/source/treelist/iconview.cxx
@@ -275,7 +275,7 @@ static OString extractPngString(const SvLBoxContextBmp* pBmpItem)
return aBuffer.makeStringAndClear();
}
- return "";
+ return ""_ostr;
}
void IconView::DumpEntryAndSiblings(tools::JsonWriter& rJsonWriter, SvTreeListEntry* pEntry)
diff --git a/vcl/source/treelist/imap2.cxx b/vcl/source/treelist/imap2.cxx
index 0c3d4d8bf9e2..154380139246 100644
--- a/vcl/source/treelist/imap2.cxx
+++ b/vcl/source/treelist/imap2.cxx
@@ -245,7 +245,7 @@ void ImageMap::ImpReadCERNLine( std::string_view rLine )
{
OString aStr( comphelper::string::stripStart(rLine, ' ') );
aStr = comphelper::string::stripStart(aStr, '\t');
- aStr = aStr.replaceAll(";", "");
+ aStr = aStr.replaceAll(";"_ostr, ""_ostr);
aStr = aStr.toAsciiLowerCase();
const char* pStr = aStr.getStr();
@@ -378,7 +378,7 @@ void ImageMap::ImpReadNCSALine( std::string_view rLine )
{
OString aStr( comphelper::string::stripStart(rLine, ' ') );
aStr = comphelper::string::stripStart(aStr, '\t');
- aStr = aStr.replaceAll(";", "");
+ aStr = aStr.replaceAll(";"_ostr, ""_ostr);
aStr = aStr.toAsciiLowerCase();
const char* pStr = aStr.getStr();
diff --git a/vcl/source/window/DocWindow.cxx b/vcl/source/window/DocWindow.cxx
index 971252553b9a..fe2ce61dfb4c 100644
--- a/vcl/source/window/DocWindow.cxx
+++ b/vcl/source/window/DocWindow.cxx
@@ -25,7 +25,7 @@ void DocWindow::SetPointer(PointerStyle nPointer)
PointerStyle aPointer = GetPointer();
// We don't map all possible pointers hence we need a default
- OString aPointerString = "default";
+ OString aPointerString = "default"_ostr;
auto aIt = vcl::gaLOKPointerMap.find(aPointer);
if (aIt != vcl::gaLOKPointerMap.end())
{
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 9adcbefda372..3f9bee4041f2 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -658,7 +658,7 @@ void FloatingWindow::PixelInvalidate(const tools::Rectangle* /*pRectangle*/)
const tools::Rectangle aRect(Point(0,0), Size(GetSizePixel().Width()+1, GetSizePixel().Height()+1));
std::vector<vcl::LOKPayloadItem> aPayload
{
- std::make_pair(OString("rectangle"), aRect.toString())
+ std::make_pair("rectangle"_ostr, aRect.toString())
};
const vcl::ILibreOfficeKitNotifier* pNotifier = pParent->GetLOKNotifier();
pNotifier->notifyWindow(GetLOKWindowId(), "invalidate", aPayload);