diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-10 08:26:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-10 09:51:34 +0200 |
commit | 239ceb315521d9e88fb8290ba391c70a53095af4 (patch) | |
tree | 89d2c12874823ae5eea38385e5f89d5cc902b707 /oox/source/drawingml/diagram | |
parent | 58a9c936bb065384d50e122ee2ac9037dd60cc32 (diff) |
loplugin:ostr in oox
Change-Id: I08124ce2da1facbe2e84aa4a7a8e25fec24fa962
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167428
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/drawingml/diagram')
-rw-r--r-- | oox/source/drawingml/diagram/datamodel.cxx | 6 | ||||
-rw-r--r-- | oox/source/drawingml/diagram/diagram.cxx | 22 | ||||
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 6 |
3 files changed, 17 insertions, 17 deletions
diff --git a/oox/source/drawingml/diagram/datamodel.cxx b/oox/source/drawingml/diagram/datamodel.cxx index 97691af43fd8..3dbddc790851 100644 --- a/oox/source/drawingml/diagram/datamodel.cxx +++ b/oox/source/drawingml/diagram/datamodel.cxx @@ -207,7 +207,7 @@ void DiagramData::secureStyleDataFromShapeToModel(::oox::drawingml::Shape& rShap // text properties if(!bIsBackgroundShape - && xServiceInfo->supportsService("com.sun.star.drawing.TextProperties")) + && xServiceInfo->supportsService(u"com.sun.star.drawing.TextProperties"_ustr)) { addProperty(UNO_NAME_CHAR_COLOR, xInfo, pTarget->maProperties, xPropSet); addProperty(UNO_NAME_CHAR_HEIGHT, xInfo, pTarget->maProperties, xPropSet); @@ -216,7 +216,7 @@ void DiagramData::secureStyleDataFromShapeToModel(::oox::drawingml::Shape& rShap } // fill properties - if(xServiceInfo->supportsService("com.sun.star.drawing.FillProperties")) + if(xServiceInfo->supportsService(u"com.sun.star.drawing.FillProperties"_ustr)) { css::drawing::FillStyle eFillStyle(css::drawing::FillStyle_NONE); if (xInfo->hasPropertyByName(UNO_NAME_FILLSTYLE)) @@ -245,7 +245,7 @@ void DiagramData::secureStyleDataFromShapeToModel(::oox::drawingml::Shape& rShap // line properties if(!bIsBackgroundShape - && xServiceInfo->supportsService("com.sun.star.drawing.LineProperties")) + && xServiceInfo->supportsService(u"com.sun.star.drawing.LineProperties"_ustr)) { css::drawing::LineStyle eLineStyle(css::drawing::LineStyle_NONE); if (xInfo->hasPropertyByName(UNO_NAME_LINESTYLE)) diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index f63185549c23..a415cd33ffd8 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -194,8 +194,8 @@ void Diagram::syncDiagramFontHeights() { double fFontScale = 0.0; double fSpacingScale = 0.0; - xPropertySet->getPropertyValue("TextFitToSizeFontScale") >>= fFontScale; - xPropertySet->getPropertyValue("TextFitToSizeSpacingScale") >>= fSpacingScale; + xPropertySet->getPropertyValue(u"TextFitToSizeFontScale"_ustr) >>= fFontScale; + xPropertySet->getPropertyValue(u"TextFitToSizeSpacingScale"_ustr) >>= fSpacingScale; if (fFontScale > 0 && fSpacingScale > 0 && (fFontScale < fMinFontScale || (fFontScale == fMinFontScale && fSpacingScale < fMinSpacingScale))) @@ -214,8 +214,8 @@ void Diagram::syncDiagramFontHeights() uno::Reference<beans::XPropertySet> xPropertySet(rShapePair.second, uno::UNO_QUERY); if (xPropertySet.is()) { - xPropertySet->setPropertyValue("TextFitToSizeFontScale", uno::Any(fMinFontScale)); - xPropertySet->setPropertyValue("TextFitToSizeSpacingScale", uno::Any(fMinSpacingScale)); + xPropertySet->setPropertyValue(u"TextFitToSizeFontScale"_ustr, uno::Any(fMinFontScale)); + xPropertySet->setPropertyValue(u"TextFitToSizeSpacingScale"_ustr, uno::Any(fMinSpacingScale)); } } } @@ -330,7 +330,7 @@ void loadDiagram( ShapePtr const & pShape, importFragment(rFilter, loadFragment(rFilter,xRefDataModel), - "OOXData", + u"OOXData"_ustr, pDiagram, xRefDataModel); @@ -368,7 +368,7 @@ void loadDiagram( ShapePtr const & pShape, importFragment(rFilter, loadFragment(rFilter,xRefLayout), - "OOXLayout", + u"OOXLayout"_ustr, pDiagram, xRefLayout); } @@ -381,7 +381,7 @@ void loadDiagram( ShapePtr const & pShape, importFragment(rFilter, loadFragment(rFilter,xRefQStyle), - "OOXStyle", + u"OOXStyle"_ustr, pDiagram, xRefQStyle); } @@ -390,8 +390,8 @@ void loadDiagram( ShapePtr const & pShape, { // We still want to add the XDocuments to the DiagramDomMap DiagramDomMap& rMainDomMap = pDiagram->getDomMap(); - rMainDomMap[OUString("OOXLayout")] = loadFragment(rFilter,rLayoutPath); - rMainDomMap[OUString("OOXStyle")] = loadFragment(rFilter,rQStylePath); + rMainDomMap[u"OOXLayout"_ustr] = loadFragment(rFilter,rLayoutPath); + rMainDomMap[u"OOXStyle"_ustr] = loadFragment(rFilter,rQStylePath); } // colors @@ -402,14 +402,14 @@ void loadDiagram( ShapePtr const & pShape, importFragment(rFilter, loadFragment(rFilter,xRefColorStyle), - "OOXColor", + u"OOXColor"_ustr, pDiagram, xRefColorStyle); } if( !pData->getExtDrawings().empty() ) { - const DiagramColorMap::const_iterator aColor = pDiagram->getColors().find("node0"); + const DiagramColorMap::const_iterator aColor = pDiagram->getColors().find(u"node0"_ustr); if( aColor != pDiagram->getColors().end() && !aColor->second.maTextFillColors.empty()) { // TODO(F1): well, actually, there might be *several* color diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 6ee4b88322d0..c59f87a6f94f 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -130,7 +130,7 @@ void SnakeAlg::layoutShapeChildren(const AlgAtom& rAlg, const ShapePtr& rShape, double fSpaceFromConstraint = 1.0; LayoutPropertyMap aPropertiesByName; std::map<sal_Int32, LayoutProperty> aPropertiesByType; - LayoutProperty& rParent = aPropertiesByName[""]; + LayoutProperty& rParent = aPropertiesByName[u""_ustr]; rParent[XML_w] = fShapeWidth; rParent[XML_h] = fShapeHeight; for (const auto& rConstr : rConstraints) @@ -551,7 +551,7 @@ void CompositeAlg::layoutShapeChildren(AlgAtom& rAlg, const ShapePtr& rShape, const std::vector<Constraint>& rConstraints) { LayoutPropertyMap aProperties; - LayoutProperty& rParent = aProperties[""]; + LayoutProperty& rParent = aProperties[u""_ustr]; sal_Int32 nParentXOffset = 0; @@ -1164,7 +1164,7 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const std::vector<Constraint>& } LayoutPropertyMap aProperties; - LayoutProperty& rParent = aProperties[""]; + LayoutProperty& rParent = aProperties[u""_ustr]; rParent[XML_w] = rShape->getSize().Width; rParent[XML_h] = rShape->getSize().Height; rParent[XML_l] = 0; |