loplugin:ostr in svgio

Change-Id: I9869f8558a69d5a6b6ac3165c627b943c00e787e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167653
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
This commit is contained in:
Noel Grandin
2024-05-15 12:53:22 +02:00
parent 436f823c7c
commit 75111c745a
8 changed files with 751 additions and 751 deletions
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -56,7 +56,7 @@ uno::Reference<io::XInputStream> TestParsing::parseSvg(const OUString& aSource)
void TestParsing::testSimpleRectangle()
{
OUString aSvgFile = "/svgio/qa/cppunit/data/VisiotorTest-Rect.svg";
OUString aSvgFile = u"/svgio/qa/cppunit/data/VisiotorTest-Rect.svg"_ustr;
OUString aUrl = m_directories.getURLFromSrc(aSvgFile);
OUString aPath = m_directories.getPathFromSrc(aSvgFile);
@@ -89,7 +89,7 @@ void TestParsing::testSimpleRectangle()
void TestParsing::testPath()
{
OUString aSvgFile = "/svgio/qa/cppunit/data/path.svg";
OUString aSvgFile = u"/svgio/qa/cppunit/data/path.svg"_ustr;
OUString aUrl = m_directories.getURLFromSrc(aSvgFile);
OUString aPath = m_directories.getPathFromSrc(aSvgFile);
@@ -109,7 +109,7 @@ void TestParsing::testPath()
CPPUNIT_ASSERT_EQUAL(gfx::DrawCommandType::Path, pDrawBase->getType());
auto* pDrawPath = static_cast<gfx::DrawPath*>(pDrawBase);
CPPUNIT_ASSERT_EQUAL(OUString("m1 1h42v24h-42v-24z"),
CPPUNIT_ASSERT_EQUAL(u"m1 1h42v24h-42v-24z"_ustr,
basegfx::utils::exportToSvgD(pDrawPath->maPolyPolygon, true, true, false));
CPPUNIT_ASSERT_EQUAL(0.0, pDrawPath->mnStrokeWidth);
CPPUNIT_ASSERT(bool(pDrawPath->mpStrokeColor));
+1 -1
View File
@@ -103,7 +103,7 @@ namespace svgio::svgreader
const SvgStyleAttributes& rSvgStyleAttributes)
{
const SvgStringVector& rFontFamilyVector = rSvgStyleAttributes.getFontFamily();
OUString aFontFamily("Times New Roman");
OUString aFontFamily(u"Times New Roman"_ustr);
if(!rFontFamilyVector.empty())
aFontFamily=rFontFamilyVector[0];
+6 -6
View File
@@ -43,16 +43,16 @@ void SvgFilterNode::apply(drawinglayer::primitive2d::Primitive2DContainer& rTarg
const auto& rChildren = getChildren();
const sal_uInt32 nCount(rChildren.size());
addGraphicSourceToMapper("SourceGraphic", rTarget);
addGraphicSourceToMapper(u"SourceGraphic"_ustr, rTarget);
// TODO: For now, map SourceAlpha, BackgroundImage,
// BackgroundAlpha, FillPaint and StrokePaint to rTarget
// so at least something is displayed
addGraphicSourceToMapper("SourceAlpha", rTarget);
addGraphicSourceToMapper("BackgroundImage", rTarget);
addGraphicSourceToMapper("BackgroundAlpha", rTarget);
addGraphicSourceToMapper("FillPaint", rTarget);
addGraphicSourceToMapper("StrokePaint", rTarget);
addGraphicSourceToMapper(u"SourceAlpha"_ustr, rTarget);
addGraphicSourceToMapper(u"BackgroundImage"_ustr, rTarget);
addGraphicSourceToMapper(u"BackgroundAlpha"_ustr, rTarget);
addGraphicSourceToMapper(u"FillPaint"_ustr, rTarget);
addGraphicSourceToMapper(u"StrokePaint"_ustr, rTarget);
// apply children's filters
for (sal_uInt32 a(0); a < nCount; a++)
+1 -1
View File
@@ -295,7 +295,7 @@ namespace {
if(pParent && pParent->getType() == SVGToken::Svg)
{
// #i125329# find Css selector '*', add as last element if found
const SvgStyleAttributes* pNew = getDocument().findGlobalCssStyleAttributes("*");
const SvgStyleAttributes* pNew = getDocument().findGlobalCssStyleAttributes(u"*"_ustr);
if(pNew)
{
@@ -215,7 +215,7 @@ namespace svgio::svgreader
// check for '!important' CssStyle mark, currently not supported
// but needs to be extracted for correct parsing
OUString aTokenImportant("!important");
OUString aTokenImportant(u"!important"_ustr);
const sal_Int32 nIndexTokenImportant(aOUTokenValue.indexOf(aTokenImportant));
if(-1 != nIndexTokenImportant)
@@ -2460,7 +2460,7 @@ namespace svgio::svgreader
// All together gives:
if(Visibility::hidden == maVisibility
&& SVGToken::G == mrOwner.getType()
&& nullptr != mrOwner.getDocument().findSvgNodeById("ooo:meta_slides"))
&& nullptr != mrOwner.getDocument().findSvgNodeById(u"ooo:meta_slides"_ustr))
{
const SvgNode* pParent(mrOwner.getParent());
+1 -1
View File
@@ -664,7 +664,7 @@ namespace svgio::svgreader
// but does not need to be.
bool bEmbedInFinalTransformPxTo100ThMM(true);
if(getDocument().findSvgNodeById("ooo:meta_slides")
if(getDocument().findSvgNodeById(u"ooo:meta_slides"_ustr)
&& !getWidth().isSet()
&& !getHeight().isSet())
{
+3 -3
View File
@@ -96,7 +96,7 @@ namespace svgio::svgreader
// that use entities to define XML namespaces.
uno::Reference<lang::XInitialization> const xInit(xParser,
uno::UNO_QUERY_THROW);
uno::Sequence<uno::Any> args{ uno::Any(OUString("DoSmeplease")) };
uno::Sequence<uno::Any> args{ uno::Any(u"DoSmeplease"_ustr) };
xInit->initialize(args);
// connect parser and filter
@@ -177,7 +177,7 @@ namespace svgio::svgreader
OUString SAL_CALL XSvgParser::getImplementationName()
{
return "svgio::svgreader::XSvgParser";
return u"svgio::svgreader::XSvgParser"_ustr;
}
sal_Bool SAL_CALL XSvgParser::supportsService(const OUString& rServiceName)
@@ -187,7 +187,7 @@ namespace svgio::svgreader
uno::Sequence< OUString > SAL_CALL XSvgParser::getSupportedServiceNames()
{
return { "com.sun.star.graphic.SvgTools" };
return { u"com.sun.star.graphic.SvgTools"_ustr };
}
} // end of namespace svgio::svgreader