diff options
Diffstat (limited to 'oox/source/drawingml')
34 files changed, 557 insertions, 553 deletions
diff --git a/oox/source/drawingml/chart/axiscontext.cxx b/oox/source/drawingml/chart/axiscontext.cxx index b90857785e32..8f1defe40bea 100644 --- a/oox/source/drawingml/chart/axiscontext.cxx +++ b/oox/source/drawingml/chart/axiscontext.cxx @@ -50,7 +50,7 @@ ContextHandlerRef AxisDispUnitsContext::onCreateContext( sal_Int32 nElement, con switch( nElement ) { case C_TOKEN( builtInUnit ): - mrModel.mnBuiltInUnit = rAttribs.getString( XML_val, "thousands" ); + mrModel.mnBuiltInUnit = rAttribs.getString( XML_val, u"thousands"_ustr ); return nullptr; case C_TOKEN( custUnit ): mrModel.mfCustomUnit = rAttribs.getDouble( XML_val, 0.0 ); diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index 9e749d6b54c0..6a2ab5a12875 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -156,7 +156,7 @@ void AxisConverter::convertFromModel(const Reference<XCoordinateSystem>& rxCoord ObjectFormatter& rFormatter = getFormatter(); // create the axis object (always) - xAxis.set( createInstance( "com.sun.star.chart2.Axis" ), UNO_QUERY_THROW ); + xAxis.set( createInstance( u"com.sun.star.chart2.Axis"_ustr ), UNO_QUERY_THROW ); PropertySet aAxisProp( xAxis ); // #i58688# axis enabled aAxisProp.setProperty( PROP_Show, !mrModel.mbDeleted ); diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx index e73a457d9160..dc233fec8129 100644 --- a/oox/source/drawingml/chart/chartspaceconverter.cxx +++ b/oox/source/drawingml/chart/chartspaceconverter.cxx @@ -122,7 +122,7 @@ static bool lcl_useWorkaroundForNoGapInOOXML( Reference< chart2::XChartDocument continue; OUString aRoleName; - xPropSet->getPropertyValue("Role") >>= aRoleName; + xPropSet->getPropertyValue(u"Role"_ustr) >>= aRoleName; if (aRoleName == "values-y") { const uno::Sequence<uno::Any> aData = xValues->getData(); diff --git a/oox/source/drawingml/chart/datasourceconverter.cxx b/oox/source/drawingml/chart/datasourceconverter.cxx index c07ea397d537..4598572b4723 100644 --- a/oox/source/drawingml/chart/datasourceconverter.cxx +++ b/oox/source/drawingml/chart/datasourceconverter.cxx @@ -73,7 +73,7 @@ Reference< XDataSequence > DataSequenceConverter::createDataSequence( const OUSt bool bDateCategories = (mrModel.meFormatType == SvNumFormatType::DATE) && (rRole == "categories"); xDataSeq = getChartConverter().createDataSequence(getChartDocument()->getDataProvider(), mrModel, - rRole, bDateCategories ? OUString("date") : OUString("")); + rRole, bDateCategories ? u"date"_ustr : u""_ustr); // set sequence role PropertySet aSeqProp( xDataSeq ); diff --git a/oox/source/drawingml/chart/datatableconverter.cxx b/oox/source/drawingml/chart/datatableconverter.cxx index 4e42b7468ebc..5118ae22bb16 100644 --- a/oox/source/drawingml/chart/datatableconverter.cxx +++ b/oox/source/drawingml/chart/datatableconverter.cxx @@ -43,7 +43,7 @@ void DataTableConverter::convertFromModel(uno::Reference<chart2::XDiagram> const try { uno::Reference<chart2::XDataTable> xDataTable( - createInstance("com.sun.star.chart2.DataTable"), uno::UNO_QUERY_THROW); + createInstance(u"com.sun.star.chart2.DataTable"_ustr), uno::UNO_QUERY_THROW); rxDiagram->setDataTable(xDataTable); PropertySet aPropSet(xDataTable); diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index 1184c2a80bf1..0d746ab783f8 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -986,7 +986,7 @@ void ObjectTypeFormatter::convertAutomaticFill( PropertySet& rPropSet, sal_Int32 ObjectFormatterData::ObjectFormatterData( const XmlFilterBase& rFilter, const Reference< XChartDocument >& rxChartDoc, const ChartSpaceModel& rChartSpace ) : mrFilter( rFilter ), maModelObjHelper( Reference< XMultiServiceFactory >( rxChartDoc, UNO_QUERY ) ), - maEnUsLocale( "en", "US", OUString() ), + maEnUsLocale( u"en"_ustr, u"US"_ustr, OUString() ), mnMaxSeriesIdx( -1 ) { for(auto const &rEntry : spObjTypeFormatEntries) diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx index cd2ec9e5bdc9..fdb12d9a7f64 100644 --- a/oox/source/drawingml/chart/plotareaconverter.cxx +++ b/oox/source/drawingml/chart/plotareaconverter.cxx @@ -320,7 +320,7 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel ) Reference< XDiagram > xDiagram; try { - xDiagram.set( createInstance( "com.sun.star.chart2.Diagram" ), UNO_QUERY_THROW ); + xDiagram.set( createInstance( u"com.sun.star.chart2.Diagram"_ustr ), UNO_QUERY_THROW ); getChartDocument()->setFirstDiagram( xDiagram ); } catch( Exception& ) diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 2d07f26493ef..4efe54f3c2e8 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -84,7 +84,7 @@ Reference< XLabeledDataSequence > lclCreateLabeledDataSequence( if( pTitle ) { TextConverter aTextConv( rParent, *pTitle ); - xTitleSeq = aTextConv.createDataSequence( "label" ); + xTitleSeq = aTextConv.createDataSequence( u"label"_ustr ); } // create the labeled data sequence, if values or title are present @@ -384,7 +384,7 @@ void DataLabelConverter::convertFromModel( const Reference< XDataSeries >& rxDat { css::uno::Reference< XDataPointCustomLabelField > xCustomLabel = DataPointCustomLabelField::create( xContext ); xCustomLabel->setFieldType( DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_NEWLINE ); - xCustomLabel->setString("\n"); + xCustomLabel->setString(u"\n"_ustr); aSequenceRange[ nPos++ ] = xCustomLabel; } } @@ -497,7 +497,7 @@ void ErrorBarConverter::convertFromModel( const Reference< XDataSeries >& rxData try { - Reference< XPropertySet > xErrorBar( createInstance( "com.sun.star.chart2.ErrorBar" ), UNO_QUERY_THROW ); + Reference< XPropertySet > xErrorBar( createInstance( u"com.sun.star.chart2.ErrorBar"_ustr ), UNO_QUERY_THROW ); PropertySet aBarProp( xErrorBar ); // plus/minus bars @@ -778,7 +778,7 @@ Reference< XDataSeries > SeriesConverter::createDataSeries( const TypeGroupConve const TypeGroupInfo& rTypeInfo = rTypeGroup.getTypeInfo(); // create the data series object - Reference< XDataSeries > xDataSeries( createInstance( "com.sun.star.chart2.DataSeries" ), UNO_QUERY ); + Reference< XDataSeries > xDataSeries( createInstance( u"com.sun.star.chart2.DataSeries"_ustr ), UNO_QUERY ); PropertySet aSeriesProp( xDataSeries ); // attach data and title sequences to series @@ -789,7 +789,7 @@ Reference< XDataSeries > SeriesConverter::createDataSeries( const TypeGroupConve // create vector of all value sequences ::std::vector< Reference< XLabeledDataSequence > > aLabeledSeqVec; // add Y values - Reference< XLabeledDataSequence > xYValueSeq = createValueSequence( "values-y" ); + Reference< XLabeledDataSequence > xYValueSeq = createValueSequence( u"values-y"_ustr ); if( xYValueSeq.is() ) { aLabeledSeqVec.push_back( xYValueSeq ); @@ -804,13 +804,13 @@ Reference< XDataSeries > SeriesConverter::createDataSeries( const TypeGroupConve // add X values of scatter and bubble charts if( !rTypeInfo.mbCategoryAxis ) { - Reference< XLabeledDataSequence > xXValueSeq = createCategorySequence( "values-x" ); + Reference< XLabeledDataSequence > xXValueSeq = createCategorySequence( u"values-x"_ustr ); if( xXValueSeq.is() ) aLabeledSeqVec.push_back( xXValueSeq ); // add size values of bubble charts if( rTypeInfo.meTypeId == TYPEID_BUBBLE ) { - Reference< XLabeledDataSequence > xSizeValueSeq = createLabeledDataSequence( SeriesModel::POINTS, "values-size", true ); + Reference< XLabeledDataSequence > xSizeValueSeq = createLabeledDataSequence( SeriesModel::POINTS, u"values-size"_ustr, true ); if( xSizeValueSeq.is() ) aLabeledSeqVec.push_back( xSizeValueSeq ); } diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index 3fc352afed7e..b5d9ecd67d97 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -166,7 +166,7 @@ void TitleConverter::convertFromModel( const Reference< XTitled >& rxTitled, con try { // create the title object and set the string data - Reference< XTitle > xTitle( createInstance( "com.sun.star.chart2.Title" ), UNO_QUERY_THROW ); + Reference< XTitle > xTitle( createInstance( u"com.sun.star.chart2.Title"_ustr ), UNO_QUERY_THROW ); xTitle->setText( aStringSeq ); rxTitled->setTitleObject( xTitle ); @@ -207,7 +207,7 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram ) namespace cssc2 = ::com::sun::star::chart2; // create the legend - Reference< XLegend > xLegend( createInstance( "com.sun.star.chart2.Legend" ), UNO_QUERY_THROW ); + Reference< XLegend > xLegend( createInstance( u"com.sun.star.chart2.Legend"_ustr ), UNO_QUERY_THROW ); rxDiagram->setLegend( xLegend ); PropertySet aPropSet( xLegend ); aPropSet.setProperty( PROP_Show, true ); diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx index 9e8691be5919..8c2886671761 100644 --- a/oox/source/drawingml/chart/typegroupconverter.cxx +++ b/oox/source/drawingml/chart/typegroupconverter.cxx @@ -286,7 +286,7 @@ Reference< XLabeledDataSequence > TypeGroupConverter::createCategorySequence() if( elem->maSources.has( SeriesModel::CATEGORIES ) ) { SeriesConverter aSeriesConv(*this, *elem); - xLabeledSeq = aSeriesConv.createCategorySequence( "categories" ); + xLabeledSeq = aSeriesConv.createCategorySequence( u"categories"_ustr ); if (xLabeledSeq.is()) break; } @@ -311,7 +311,7 @@ Reference< XLabeledDataSequence > TypeGroupConverter::createCategorySequence() aSeq.maData[ i ] <<= OUString::number( i + 1 ); } SeriesConverter aSeriesConv( *this, aModel ); - xLabeledSeq = aSeriesConv.createCategorySequence( "categories" ); + xLabeledSeq = aSeriesConv.createCategorySequence( u"categories"_ustr ); } return xLabeledSeq; } @@ -383,7 +383,7 @@ void TypeGroupConverter::convertFromModel( const Reference< XDiagram >& rxDiagra if( maTypeInfo.meTypeId == TYPEID_STOCK ) { // create the data series object - Reference< XDataSeries > xDataSeries( createInstance( "com.sun.star.chart2.DataSeries" ), UNO_QUERY ); + Reference< XDataSeries > xDataSeries( createInstance( u"com.sun.star.chart2.DataSeries"_ustr ), UNO_QUERY ); Reference< XDataSink > xDataSink( xDataSeries, UNO_QUERY ); if( xDataSink.is() ) { diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx index 9462fc03095c..422faf1f93dc 100644 --- a/oox/source/drawingml/color.cxx +++ b/oox/source/drawingml/color.cxx @@ -459,34 +459,34 @@ OUString Color::getColorTransformationName( sal_Int32 nElement ) { switch( nElement ) { - case XML_red: return "red"; - case XML_redMod: return "redMod"; - case XML_redOff: return "redOff"; - case XML_green: return "green"; - case XML_greenMod: return "greenMod"; - case XML_greenOff: return "greenOff"; - case XML_blue: return "blue"; - case XML_blueMod: return "blueMod"; - case XML_blueOff: return "blueOff"; - case XML_alpha: return "alpha"; - case XML_alphaMod: return "alphaMod"; - case XML_alphaOff: return "alphaOff"; - case XML_hue: return "hue"; - case XML_hueMod: return "hueMod"; - case XML_hueOff: return "hueOff"; - case XML_sat: return "sat"; - case XML_satMod: return "satMod"; - case XML_satOff: return "satOff"; - case XML_lum: return "lum"; - case XML_lumMod: return "lumMod"; - case XML_lumOff: return "lumOff"; - case XML_shade: return "shade"; - case XML_tint: return "tint"; - case XML_gray: return "gray"; - case XML_comp: return "comp"; - case XML_inv: return "inv"; - case XML_gamma: return "gamma"; - case XML_invGamma: return "invGamma"; + case XML_red: return u"red"_ustr; + case XML_redMod: return u"redMod"_ustr; + case XML_redOff: return u"redOff"_ustr; + case XML_green: return u"green"_ustr; + case XML_greenMod: return u"greenMod"_ustr; + case XML_greenOff: return u"greenOff"_ustr; + case XML_blue: return u"blue"_ustr; + case XML_blueMod: return u"blueMod"_ustr; + case XML_blueOff: return u"blueOff"_ustr; + case XML_alpha: return u"alpha"_ustr; + case XML_alphaMod: return u"alphaMod"_ustr; + case XML_alphaOff: return u"alphaOff"_ustr; + case XML_hue: return u"hue"_ustr; + case XML_hueMod: return u"hueMod"_ustr; + case XML_hueOff: return u"hueOff"_ustr; + case XML_sat: return u"sat"_ustr; + case XML_satMod: return u"satMod"_ustr; + case XML_satOff: return u"satOff"_ustr; + case XML_lum: return u"lum"_ustr; + case XML_lumMod: return u"lumMod"_ustr; + case XML_lumOff: return u"lumOff"_ustr; + case XML_shade: return u"shade"_ustr; + case XML_tint: return u"tint"_ustr; + case XML_gray: return u"gray"_ustr; + case XML_comp: return u"comp"_ustr; + case XML_inv: return u"inv"_ustr; + case XML_gamma: return u"gamma"_ustr; + case XML_invGamma: return u"invGamma"_ustr; } SAL_WARN( "oox.drawingml", "Color::getColorTransformationName - unexpected transformation type" ); return OUString(); diff --git a/oox/source/drawingml/connectorhelper.cxx b/oox/source/drawingml/connectorhelper.cxx index e54b586c2365..c8954d000e04 100644 --- a/oox/source/drawingml/connectorhelper.cxx +++ b/oox/source/drawingml/connectorhelper.cxx @@ -301,15 +301,15 @@ void ConnectorHelper::applyConnections(oox::drawingml::ShapePtr& pConnector, return; // MS Office allows route between shapes with small distance. LO default is 5mm. - xPropSet->setPropertyValue("EdgeNode1HorzDist", uno::Any(sal_Int32(0))); - xPropSet->setPropertyValue("EdgeNode1VertDist", uno::Any(sal_Int32(0))); - xPropSet->setPropertyValue("EdgeNode2HorzDist", uno::Any(sal_Int32(0))); - xPropSet->setPropertyValue("EdgeNode2VertDist", uno::Any(sal_Int32(0))); + xPropSet->setPropertyValue(u"EdgeNode1HorzDist"_ustr, uno::Any(sal_Int32(0))); + xPropSet->setPropertyValue(u"EdgeNode1VertDist"_ustr, uno::Any(sal_Int32(0))); + xPropSet->setPropertyValue(u"EdgeNode2HorzDist"_ustr, uno::Any(sal_Int32(0))); + xPropSet->setPropertyValue(u"EdgeNode2VertDist"_ustr, uno::Any(sal_Int32(0))); // A OOXML curvedConnector uses a routing method which is basically incompatible with the // traditional way of LibreOffice. A compatible way was added and needs to be enabled before // connections are set, so that the method is used in the default routing. - xPropSet->setPropertyValue("EdgeOOXMLCurve", uno::Any(true)); + xPropSet->setPropertyValue(u"EdgeOOXMLCurve"_ustr, uno::Any(true)); oox::drawingml::ConnectorShapePropertiesList aConnectorShapeProperties = pConnector->getConnectorShapeProperties(); @@ -325,9 +325,9 @@ void ConnectorHelper::applyConnections(oox::drawingml::ShapePtr& pConnector, { // Connect to the found shape. if (aIt.mbStartShape) - xPropSet->setPropertyValue("StartShape", uno::Any(xShape)); + xPropSet->setPropertyValue(u"StartShape"_ustr, uno::Any(xShape)); else - xPropSet->setPropertyValue("EndShape", uno::Any(xShape)); + xPropSet->setPropertyValue(u"EndShape"_ustr, uno::Any(xShape)); // The first four glue points are the default glue points, which are set by LibreOffice. // They do not belong to the preset geometry of the shape. @@ -366,9 +366,9 @@ void ConnectorHelper::applyConnections(oox::drawingml::ShapePtr& pConnector, } if (aIt.mbStartShape) - xPropSet->setPropertyValue("StartGluePointIndex", uno::Any(nGlueId)); + xPropSet->setPropertyValue(u"StartGluePointIndex"_ustr, uno::Any(nGlueId)); else - xPropSet->setPropertyValue("EndGluePointIndex", uno::Any(nGlueId)); + xPropSet->setPropertyValue(u"EndGluePointIndex"_ustr, uno::Any(nGlueId)); } } } diff --git a/oox/source/drawingml/customshapepresetdata.cxx b/oox/source/drawingml/customshapepresetdata.cxx index 6f9d2acffd1b..597f19b5943e 100644 --- a/oox/source/drawingml/customshapepresetdata.cxx +++ b/oox/source/drawingml/customshapepresetdata.cxx @@ -375,25 +375,25 @@ uno::Sequence<beans::PropertyValue> lcl_parseHandle(std::string_view rValue) if (o3tl::starts_with(aToken, "Name = \"Position\"")) lcl_parseHandlePosition(aRet, aToken); else if (o3tl::starts_with(aToken, "Name = \"RangeXMaximum\"")) - lcl_parseHandleRange(aRet, aToken, "RangeXMaximum"); + lcl_parseHandleRange(aRet, aToken, u"RangeXMaximum"_ustr); else if (o3tl::starts_with(aToken, "Name = \"RangeXMinimum\"")) - lcl_parseHandleRange(aRet, aToken, "RangeXMinimum"); + lcl_parseHandleRange(aRet, aToken, u"RangeXMinimum"_ustr); else if (o3tl::starts_with(aToken, "Name = \"RangeYMaximum\"")) - lcl_parseHandleRange(aRet, aToken, "RangeYMaximum"); + lcl_parseHandleRange(aRet, aToken, u"RangeYMaximum"_ustr); else if (o3tl::starts_with(aToken, "Name = \"RangeYMinimum\"")) - lcl_parseHandleRange(aRet, aToken, "RangeYMinimum"); + lcl_parseHandleRange(aRet, aToken, u"RangeYMinimum"_ustr); else if (o3tl::starts_with(aToken, "Name = \"RadiusRangeMaximum\"")) - lcl_parseHandleRange(aRet, aToken, "RadiusRangeMaximum"); + lcl_parseHandleRange(aRet, aToken, u"RadiusRangeMaximum"_ustr); else if (o3tl::starts_with(aToken, "Name = \"RadiusRangeMinimum\"")) - lcl_parseHandleRange(aRet, aToken, "RadiusRangeMinimum"); + lcl_parseHandleRange(aRet, aToken, u"RadiusRangeMinimum"_ustr); else if (o3tl::starts_with(aToken, "Name = \"RefX\"")) - lcl_parseHandleRef(aRet, aToken, "RefX"); + lcl_parseHandleRef(aRet, aToken, u"RefX"_ustr); else if (o3tl::starts_with(aToken, "Name = \"RefY\"")) - lcl_parseHandleRef(aRet, aToken, "RefY"); + lcl_parseHandleRef(aRet, aToken, u"RefY"_ustr); else if (o3tl::starts_with(aToken, "Name = \"RefR\"")) - lcl_parseHandleRef(aRet, aToken, "RefR"); + lcl_parseHandleRef(aRet, aToken, u"RefR"_ustr); else if (o3tl::starts_with(aToken, "Name = \"RefAngle\"")) - lcl_parseHandleRef(aRet, aToken, "RefAngle"); + lcl_parseHandleRef(aRet, aToken, u"RefAngle"_ustr); else SAL_WARN("oox", "lcl_parseHandle: unexpected token: " << aToken); } @@ -822,7 +822,7 @@ namespace oox::drawingml { void CustomShapeProperties::initializePresetDataMap() { - OUString aPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/oox-drawingml-cs-presets"); + OUString aPath(u"$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/filter/oox-drawingml-cs-presets"_ustr); rtl::Bootstrap::expandMacros(aPath); SvFileStream aStream(aPath, StreamMode::READ); if (aStream.GetError() != ERRCODE_NONE) diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index f5dfae2e56df..2efb2dd68078 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -222,7 +222,7 @@ void CustomShapeProperties::pushToPropSet( else { PropertyMap aPropertyMap; - aPropertyMap.setProperty( PROP_Type, OUString( "ooxml-non-primitive" )); + aPropertyMap.setProperty( PROP_Type, u"ooxml-non-primitive"_ustr); aPropertyMap.setProperty( PROP_MirroredX, mbMirroredX ); aPropertyMap.setProperty( PROP_MirroredY, mbMirroredY ); if( mnTextPreRotateAngle ) 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; diff --git a/oox/source/drawingml/effectproperties.cxx b/oox/source/drawingml/effectproperties.cxx index 8424e3436c1a..83df8d59c57f 100644 --- a/oox/source/drawingml/effectproperties.cxx +++ b/oox/source/drawingml/effectproperties.cxx @@ -71,23 +71,23 @@ void EffectProperties::pushToPropMap( PropertyMap& rPropMap, // Default values of sx, sy should be 100000 in this case. sal_Int32 nAttrBlur = 0; - std::map< OUString, css::uno::Any >::const_iterator attribIt = it->maAttribs.find( "dir" ); + std::map< OUString, css::uno::Any >::const_iterator attribIt = it->maAttribs.find( u"dir"_ustr ); if( attribIt != it->maAttribs.end() ) attribIt->second >>= nAttrDir; - attribIt = it->maAttribs.find( "dist" ); + attribIt = it->maAttribs.find( u"dist"_ustr ); if( attribIt != it->maAttribs.end() ) attribIt->second >>= nAttrDist; - attribIt = it->maAttribs.find( "sx" ); + attribIt = it->maAttribs.find( u"sx"_ustr ); if( attribIt != it->maAttribs.end() ) attribIt->second >>= nAttrSizeX; - attribIt = it->maAttribs.find( "sy" ); + attribIt = it->maAttribs.find( u"sy"_ustr ); if( attribIt != it->maAttribs.end() ) attribIt->second >>= nAttrSizeY; - attribIt = it->maAttribs.find( "blurRad" ); + attribIt = it->maAttribs.find( u"blurRad"_ustr ); if( attribIt != it->maAttribs.end() ) attribIt->second >>= nAttrBlur; diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx index bb81f5a720db..9e5fbd983689 100644 --- a/oox/source/drawingml/effectpropertiescontext.cxx +++ b/oox/source/drawingml/effectpropertiescontext.cxx @@ -37,37 +37,37 @@ EffectPropertiesContext::~EffectPropertiesContext() void EffectPropertiesContext::saveUnsupportedAttribs( Effect& rEffect, const AttributeList& rAttribs ) { if( rAttribs.hasAttribute( XML_algn ) ) - rEffect.maAttribs["algn"] <<= rAttribs.getStringDefaulted( XML_algn); + rEffect.maAttribs[u"algn"_ustr] <<= rAttribs.getStringDefaulted( XML_algn); if( rAttribs.hasAttribute( XML_blurRad ) ) - rEffect.maAttribs["blurRad"] <<= rAttribs.getInteger( XML_blurRad, 0 ); + rEffect.maAttribs[u"blurRad"_ustr] <<= rAttribs.getInteger( XML_blurRad, 0 ); if( rAttribs.hasAttribute( XML_dir ) ) - rEffect.maAttribs["dir"] <<= rAttribs.getInteger( XML_dir, 0 ); + rEffect.maAttribs[u"dir"_ustr] <<= rAttribs.getInteger( XML_dir, 0 ); if( rAttribs.hasAttribute( XML_dist ) ) - rEffect.maAttribs["dist"] <<= rAttribs.getInteger( XML_dist, 0 ); + rEffect.maAttribs[u"dist"_ustr] <<= rAttribs.getInteger( XML_dist, 0 ); if( rAttribs.hasAttribute( XML_kx ) ) - rEffect.maAttribs["kx"] <<= rAttribs.getInteger( XML_kx, 0 ); + rEffect.maAttribs[u"kx"_ustr] <<= rAttribs.getInteger( XML_kx, 0 ); if( rAttribs.hasAttribute( XML_ky ) ) - rEffect.maAttribs["ky"] <<= rAttribs.getInteger( XML_ky, 0 ); + rEffect.maAttribs[u"ky"_ustr] <<= rAttribs.getInteger( XML_ky, 0 ); if( rAttribs.hasAttribute( XML_rotWithShape ) ) - rEffect.maAttribs["rotWithShape"] <<= rAttribs.getInteger( XML_rotWithShape, 0 ); + rEffect.maAttribs[u"rotWithShape"_ustr] <<= rAttribs.getInteger( XML_rotWithShape, 0 ); if( rAttribs.hasAttribute( XML_sx ) ) - rEffect.maAttribs["sx"] <<= rAttribs.getInteger( XML_sx, 0 ); + rEffect.maAttribs[u"sx"_ustr] <<= rAttribs.getInteger( XML_sx, 0 ); if( rAttribs.hasAttribute( XML_sy ) ) - rEffect.maAttribs["sy"] <<= rAttribs.getInteger( XML_sy, 0 ); + rEffect.maAttribs[u"sy"_ustr] <<= rAttribs.getInteger( XML_sy, 0 ); if( rAttribs.hasAttribute( XML_rad ) ) - rEffect.maAttribs["rad"] <<= rAttribs.getInteger( XML_rad, 0 ); + rEffect.maAttribs[u"rad"_ustr] <<= rAttribs.getInteger( XML_rad, 0 ); if( rAttribs.hasAttribute( XML_endA ) ) - rEffect.maAttribs["endA"] <<= rAttribs.getInteger( XML_endA, 0 ); + rEffect.maAttribs[u"endA"_ustr] <<= rAttribs.getInteger( XML_endA, 0 ); if( rAttribs.hasAttribute( XML_endPos ) ) - rEffect.maAttribs["endPos"] <<= rAttribs.getInteger( XML_endPos, 0 ); + rEffect.maAttribs[u"endPos"_ustr] <<= rAttribs.getInteger( XML_endPos, 0 ); if( rAttribs.hasAttribute( XML_fadeDir ) ) - rEffect.maAttribs["fadeDir"] <<= rAttribs.getInteger( XML_fadeDir, 0 ); + rEffect.maAttribs[u"fadeDir"_ustr] <<= rAttribs.getInteger( XML_fadeDir, 0 ); if( rAttribs.hasAttribute( XML_stA ) ) - rEffect.maAttribs["stA"] <<= rAttribs.getInteger( XML_stA, 0 ); + rEffect.maAttribs[u"stA"_ustr] <<= rAttribs.getInteger( XML_stA, 0 ); if( rAttribs.hasAttribute( XML_stPos ) ) - rEffect.maAttribs["stPos"] <<= rAttribs.getInteger( XML_stPos, 0 ); + rEffect.maAttribs[u"stPos"_ustr] <<= rAttribs.getInteger( XML_stPos, 0 ); if( rAttribs.hasAttribute( XML_grow ) ) - rEffect.maAttribs["grow"] <<= rAttribs.getInteger( XML_grow, 0 ); + rEffect.maAttribs[u"grow"_ustr] <<= rAttribs.getInteger( XML_grow, 0 ); } ContextHandlerRef EffectPropertiesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 73563c5c333a..f671eea2e043 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -308,12 +308,12 @@ awt::Size lclGetOriginalSize( const GraphicHelper& rGraphicHelper, const Referen try { Reference< beans::XPropertySet > xGraphicPropertySet( rxGraphic, UNO_QUERY_THROW ); - if( xGraphicPropertySet->getPropertyValue( "Size100thMM" ) >>= aSizeHmm ) + if( xGraphicPropertySet->getPropertyValue( u"Size100thMM"_ustr ) >>= aSizeHmm ) { if( !aSizeHmm.Width && !aSizeHmm.Height ) { // MAPMODE_PIXEL USED :-( awt::Size aSourceSizePixel( 0, 0 ); - if( xGraphicPropertySet->getPropertyValue( "SizePixel" ) >>= aSourceSizePixel ) + if( xGraphicPropertySet->getPropertyValue( u"SizePixel"_ustr ) >>= aSourceSizePixel ) aSizeHmm = rGraphicHelper.convertScreenPixelToHmm( aSourceSizePixel ); } } @@ -924,8 +924,8 @@ css::beans::PropertyValue ArtisticEffectProperties::getEffect() if( mrOleObjectInfo.maEmbeddedData.hasElements() ) { css::uno::Sequence< css::beans::PropertyValue > aGraphicSeq{ - comphelper::makePropertyValue("Id", mrOleObjectInfo.maProgId), - comphelper::makePropertyValue("Data", mrOleObjectInfo.maEmbeddedData) + comphelper::makePropertyValue(u"Id"_ustr, mrOleObjectInfo.maProgId), + comphelper::makePropertyValue(u"Data"_ustr, mrOleObjectInfo.maEmbeddedData) }; pSeq[i].Name = "OriginalGraphic"; @@ -952,53 +952,53 @@ OUString ArtisticEffectProperties::getEffectString( sal_Int32 nToken ) switch( nToken ) { // effects - case OOX_TOKEN( a14, artisticBlur ): return "artisticBlur"; - case OOX_TOKEN( a14, artisticCement ): return "artisticCement"; - case OOX_TOKEN( a14, artisticChalkSketch ): return "artisticChalkSketch"; - case OOX_TOKEN( a14, artisticCrisscrossEtching ): return "artisticCrisscrossEtching"; - case OOX_TOKEN( a14, artisticCutout ): return "artisticCutout"; - case OOX_TOKEN( a14, artisticFilmGrain ): return "artisticFilmGrain"; - case OOX_TOKEN( a14, artisticGlass ): return "artisticGlass"; - case OOX_TOKEN( a14, artisticGlowDiffused ): return "artisticGlowDiffused"; - case OOX_TOKEN( a14, artisticGlowEdges ): return "artisticGlowEdges"; - case OOX_TOKEN( a14, artisticLightScreen ): return "artisticLightScreen"; - case OOX_TOKEN( a14, artisticLineDrawing ): return "artisticLineDrawing"; - case OOX_TOKEN( a14, artisticMarker ): return "artisticMarker"; - case OOX_TOKEN( a14, artisticMosiaicBubbles ): return "artisticMosiaicBubbles"; - case OOX_TOKEN( a14, artisticPaintStrokes ): return "artisticPaintStrokes"; - case OOX_TOKEN( a14, artisticPaintBrush ): return "artisticPaintBrush"; - case OOX_TOKEN( a14, artisticPastelsSmooth ): return "artisticPastelsSmooth"; - case OOX_TOKEN( a14, artisticPencilGrayscale ): return "artisticPencilGrayscale"; - case OOX_TOKEN( a14, artisticPencilSketch ): return "artisticPencilSketch"; - case OOX_TOKEN( a14, artisticPhotocopy ): return "artisticPhotocopy"; - case OOX_TOKEN( a14, artisticPlasticWrap ): return "artisticPlasticWrap"; - case OOX_TOKEN( a14, artisticTexturizer ): return "artisticTexturizer"; - case OOX_TOKEN( a14, artisticWatercolorSponge ): return "artisticWatercolorSponge"; - case OOX_TOKEN( a14, brightnessContrast ): return "brightnessContrast"; - case OOX_TOKEN( a14, colorTemperature ): return "colorTemperature"; - case OOX_TOKEN( a14, saturation ): return "saturation"; - case OOX_TOKEN( a14, sharpenSoften ): return "sharpenSoften"; + case OOX_TOKEN( a14, artisticBlur ): return u"artisticBlur"_ustr; + case OOX_TOKEN( a14, artisticCement ): return u"artisticCement"_ustr; + case OOX_TOKEN( a14, artisticChalkSketch ): return u"artisticChalkSketch"_ustr; + case OOX_TOKEN( a14, artisticCrisscrossEtching ): return u"artisticCrisscrossEtching"_ustr; + case OOX_TOKEN( a14, artisticCutout ): return u"artisticCutout"_ustr; + case OOX_TOKEN( a14, artisticFilmGrain ): return u"artisticFilmGrain"_ustr; + case OOX_TOKEN( a14, artisticGlass ): return u"artisticGlass"_ustr; + case OOX_TOKEN( a14, artisticGlowDiffused ): return u"artisticGlowDiffused"_ustr; + case OOX_TOKEN( a14, artisticGlowEdges ): return u"artisticGlowEdges"_ustr; + case OOX_TOKEN( a14, artisticLightScreen ): return u"artisticLightScreen"_ustr; + case OOX_TOKEN( a14, artisticLineDrawing ): return u"artisticLineDrawing"_ustr; + case OOX_TOKEN( a14, artisticMarker ): return u"artisticMarker"_ustr; + case OOX_TOKEN( a14, artisticMosiaicBubbles ): return u"artisticMosiaicBubbles"_ustr; + case OOX_TOKEN( a14, artisticPaintStrokes ): return u"artisticPaintStrokes"_ustr; + case OOX_TOKEN( a14, artisticPaintBrush ): return u"artisticPaintBrush"_ustr; + case OOX_TOKEN( a14, artisticPastelsSmooth ): return u"artisticPastelsSmooth"_ustr; + case OOX_TOKEN( a14, artisticPencilGrayscale ): return u"artisticPencilGrayscale"_ustr; + case OOX_TOKEN( a14, artisticPencilSketch ): return u"artisticPencilSketch"_ustr; + case OOX_TOKEN( a14, artisticPhotocopy ): return u"artisticPhotocopy"_ustr; + case OOX_TOKEN( a14, artisticPlasticWrap ): return u"artisticPlasticWrap"_ustr; + case OOX_TOKEN( a14, artisticTexturizer ): return u"artisticTexturizer"_ustr; + case OOX_TOKEN( a14, artisticWatercolorSponge ): return u"artisticWatercolorSponge"_ustr; + case OOX_TOKEN( a14, brightnessContrast ): return u"brightnessContrast"_ustr; + case OOX_TOKEN( a14, colorTemperature ): return u"colorTemperature"_ustr; + case OOX_TOKEN( a14, saturation ): return u"saturation"_ustr; + case OOX_TOKEN( a14, sharpenSoften ): return u"sharpenSoften"_ustr; // attributes - case XML_visible: return "visible"; - case XML_trans: return "trans"; - case XML_crackSpacing: return "crackSpacing"; - case XML_pressure: return "pressure"; - case XML_numberOfShades: return "numberOfShades"; - case XML_grainSize: return "grainSize"; - case XML_intensity: return "intensity"; - case XML_smoothness: return "smoothness"; - case XML_gridSize: return "gridSize"; - case XML_pencilSize: return "pencilSize"; - case XML_size: return "size"; - case XML_brushSize: return "brushSize"; - case XML_scaling: return "scaling"; - case XML_detail: return "detail"; - case XML_bright: return "bright"; - case XML_contrast: return "contrast"; - case XML_colorTemp: return "colorTemp"; - case XML_sat: return "sat"; - case XML_amount: return "amount"; + case XML_visible: return u"visible"_ustr; + case XML_trans: return u"trans"_ustr; + case XML_crackSpacing: return u"crackSpacing"_ustr; + case XML_pressure: return u"pressure"_ustr; + case XML_numberOfShades: return u"numberOfShades"_ustr; + case XML_grainSize: return u"grainSize"_ustr; + case XML_intensity: return u"intensity"_ustr; + case XML_smoothness: return u"smoothness"_ustr; + case XML_gridSize: return u"gridSize"_ustr; + case XML_pencilSize: return u"pencilSize"_ustr; + case XML_size: return u"size"_ustr; + case XML_brushSize: return u"brushSize"_ustr; + case XML_scaling: return u"scaling"_ustr; + case XML_detail: return u"detail"_ustr; + case XML_bright: return u"bright"_ustr; + case XML_contrast: return u"contrast"_ustr; + case XML_colorTemp: return u"colorTemp"_ustr; + case XML_sat: return u"sat"_ustr; + case XML_amount: return u"amount"_ustr; } SAL_WARN( "oox.drawingml", "ArtisticEffectProperties::getEffectString: unexpected token " << nToken ); return OUString(); diff --git a/oox/source/drawingml/fontworkhelpers.cxx b/oox/source/drawingml/fontworkhelpers.cxx index a72534fd53b2..d9fa4fb8d4d6 100644 --- a/oox/source/drawingml/fontworkhelpers.cxx +++ b/oox/source/drawingml/fontworkhelpers.cxx @@ -150,8 +150,8 @@ void FontworkHelpers::putCustomShapeIntoTextPathMode( // Set attributes in CustomShapeGeometry xDefaulter->createCustomShapeDefaults(sFontworkType); - auto aGeomPropSeq - = xSet->getPropertyValue("CustomShapeGeometry").get<uno::Sequence<beans::PropertyValue>>(); + auto aGeomPropSeq = xSet->getPropertyValue(u"CustomShapeGeometry"_ustr) + .get<uno::Sequence<beans::PropertyValue>>(); auto aGeomPropVec = comphelper::sequenceToContainer<std::vector<beans::PropertyValue>>(aGeomPropSeq); @@ -1102,25 +1102,25 @@ void lcl_addColorTransformationToGrabBagStack(const model::ComplexColor& rComple switch (rColorTransform.meType) { case model::TransformationType::LumMod: - pGrabBagStack->push("lumMod"); - pGrabBagStack->push("attributes"); - pGrabBagStack->addInt32("val", rColorTransform.mnValue * 10); + pGrabBagStack->push(u"lumMod"_ustr); + pGrabBagStack->push(u"attributes"_ustr); + pGrabBagStack->addInt32(u"val"_ustr, rColorTransform.mnValue * 10); pGrabBagStack->pop(); pGrabBagStack->pop(); break; case model::TransformationType::LumOff: - pGrabBagStack->push("lumOff"); - pGrabBagStack->push("attributes"); - pGrabBagStack->addInt32("val", rColorTransform.mnValue * 10); + pGrabBagStack->push(u"lumOff"_ustr); + pGrabBagStack->push(u"attributes"_ustr); + pGrabBagStack->addInt32(u"val"_ustr, rColorTransform.mnValue * 10); pGrabBagStack->pop(); pGrabBagStack->pop(); break; case model::TransformationType::Alpha: - pGrabBagStack->push("alpha"); - pGrabBagStack->push("attributes"); + pGrabBagStack->push(u"alpha"_ustr); + pGrabBagStack->push(u"attributes"_ustr); // model::TransformationType::Alpha is designed to be used with a:alpha, which has // opacity. But w14:alpha uses transparency. So convert it here. - pGrabBagStack->addInt32("val", + pGrabBagStack->addInt32(u"val"_ustr, oox::drawingml::MAX_PERCENT - rColorTransform.mnValue * 10); pGrabBagStack->pop(); pGrabBagStack->pop(); @@ -1185,7 +1185,7 @@ ColorMapType lcl_createColorMapFromShapeProps( else { sal_Int32 nFillColor(0); - if (rXPropSetInfo->hasPropertyByName("FillColor")) + if (rXPropSetInfo->hasPropertyByName(u"FillColor"_ustr)) rXPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor; aSingleColor = ::Color(ColorTransparency, nFillColor).getBColor().clamp(); } @@ -1222,8 +1222,8 @@ ColorMapType lcl_createColorMapFromShapeProps( // it instead of the color from the color stop. GradientStopColor aFixColor; bool bUseThemeColor(!rbHasColorGradient - && FontworkHelpers::getThemeColorFromShape("FillComplexColor", rXPropSet, - aFixColor.TTColor)); + && FontworkHelpers::getThemeColorFromShape(u"FillComplexColor"_ustr, + rXPropSet, aFixColor.TTColor)); for (auto itC = aColorStops.begin(), itT = aTransStops.begin(); itC != aColorStops.end() && itT != aTransStops.end(); ++itC, ++itT) @@ -1269,7 +1269,7 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( std::unique_ptr<oox::GrabBagStack> pGrabBagStack; // CharTextFillTextEffect - pGrabBagStack.reset(new oox::GrabBagStack("textFill")); + pGrabBagStack.reset(new oox::GrabBagStack(u"textFill"_ustr)); drawing::FillStyle eFillStyle = drawing::FillStyle_SOLID; if (xPropSetInfo->hasPropertyByName(u"FillStyle"_ustr)) rXPropSet->getPropertyValue(u"FillStyle"_ustr) >>= eFillStyle; @@ -1289,7 +1289,7 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( { case drawing::FillStyle_NONE: { - pGrabBagStack->appendElement("noFill", uno::Any()); + pGrabBagStack->appendElement(u"noFill"_ustr, uno::Any()); break; } case drawing::FillStyle_GRADIENT: @@ -1304,27 +1304,27 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( ColorMapType aColorMap = lcl_createColorMapFromShapeProps( rXPropSet, xPropSetInfo, aColorGradient, bHasColorGradient, aTransparenceGradient, bHasTransparenceGradient); - pGrabBagStack->push("gradFill"); - pGrabBagStack->push("gsLst"); + pGrabBagStack->push(u"gradFill"_ustr); + pGrabBagStack->push(u"gsLst"_ustr); for (auto it = aColorMap.begin(); it != aColorMap.end(); ++it) { - pGrabBagStack->push("gs"); - pGrabBagStack->push("attributes"); - pGrabBagStack->addInt32("pos", (*it).first); + pGrabBagStack->push(u"gs"_ustr); + pGrabBagStack->push(u"attributes"_ustr); + pGrabBagStack->addInt32(u"pos"_ustr, (*it).first); pGrabBagStack->pop(); if ((*it).second.TTColor.getThemeColorType() == model::ThemeColorType::Unknown) { - pGrabBagStack->push("srgbClr"); - pGrabBagStack->push("attributes"); - pGrabBagStack->addString("val", (*it).second.RGBColor.AsRGBHexString()); + pGrabBagStack->push(u"srgbClr"_ustr); + pGrabBagStack->push(u"attributes"_ustr); + pGrabBagStack->addString(u"val"_ustr, (*it).second.RGBColor.AsRGBHexString()); pGrabBagStack->pop(); // maCurrentElement:'srgbClr', maPropertyList:'attributes' } else { - pGrabBagStack->push("schemeClr"); - pGrabBagStack->push("attributes"); + pGrabBagStack->push(u"schemeClr"_ustr); + pGrabBagStack->push(u"attributes"_ustr); pGrabBagStack->addString( - "val", lcl_getW14MarkupStringForThemeColor((*it).second.TTColor)); + u"val"_ustr, lcl_getW14MarkupStringForThemeColor((*it).second.TTColor)); pGrabBagStack->pop(); // maCurrentElement:'schemeClr', maPropertyList:'attributes' } @@ -1354,11 +1354,11 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( nAngleOOX = ((3600 - aColorGradient.Angle + 900) % 3600) * 6000; else if (bHasTransparenceGradient) nAngleOOX = ((3600 - aTransparenceGradient.Angle + 900) % 3600) * 6000; - pGrabBagStack->push("lin"); - pGrabBagStack->push("attributes"); - pGrabBagStack->addInt32("ang", nAngleOOX); + pGrabBagStack->push(u"lin"_ustr); + pGrabBagStack->push(u"attributes"_ustr); + pGrabBagStack->addInt32(u"ang"_ustr, nAngleOOX); // LibreOffice cannot scale a gradient to the shape size. - pGrabBagStack->addString("scaled", "0"); + pGrabBagStack->addString(u"scaled"_ustr, u"0"_ustr); } else { @@ -1367,39 +1367,40 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( // (2) To get the same size of gradient area, the element 'tileRect' is needed, but // that is not available for <w14:textFill> element. // So we can only set a reasonably suitable focus point. - pGrabBagStack->push("path"); - pGrabBagStack->push("attributes"); + pGrabBagStack->push(u"path"_ustr); + pGrabBagStack->push(u"attributes"_ustr); if (eGradientStyle == awt::GradientStyle_RADIAL || eGradientStyle == awt::GradientStyle_ELLIPTICAL) - pGrabBagStack->addString("path", "circle"); + pGrabBagStack->addString(u"path"_ustr, u"circle"_ustr); else - pGrabBagStack->addString("path", "rect"); + pGrabBagStack->addString(u"path"_ustr, u"rect"_ustr); pGrabBagStack->pop(); - pGrabBagStack->push("fillToRect"); - pGrabBagStack->push("attributes"); + pGrabBagStack->push(u"fillToRect"_ustr); + pGrabBagStack->push(u"attributes"_ustr); sal_Int32 nLeftPercent = bHasColorGradient ? aColorGradient.XOffset : aTransparenceGradient.XOffset; sal_Int32 nTopPercent = bHasColorGradient ? aColorGradient.YOffset : aTransparenceGradient.YOffset; - pGrabBagStack->addInt32("l", nLeftPercent * 1000); - pGrabBagStack->addInt32("t", nTopPercent * 1000); - pGrabBagStack->addInt32("r", (100 - nLeftPercent) * 1000); - pGrabBagStack->addInt32("b", (100 - nTopPercent) * 1000); + pGrabBagStack->addInt32(u"l"_ustr, nLeftPercent * 1000); + pGrabBagStack->addInt32(u"t"_ustr, nTopPercent * 1000); + pGrabBagStack->addInt32(u"r"_ustr, (100 - nLeftPercent) * 1000); + pGrabBagStack->addInt32(u"b"_ustr, (100 - nTopPercent) * 1000); } // all remaining pop() calls are in the final getRootProperty() method break; } case drawing::FillStyle_SOLID: { - pGrabBagStack->push("solidFill"); + pGrabBagStack->push(u"solidFill"_ustr); model::ComplexColor aComplexColor; // It is either "schemeClr" or "srgbClr". - if (FontworkHelpers::getThemeColorFromShape("FillComplexColor", rXPropSet, + if (FontworkHelpers::getThemeColorFromShape(u"FillComplexColor"_ustr, rXPropSet, aComplexColor)) { - pGrabBagStack->push("schemeClr"); - pGrabBagStack->push("attributes"); - pGrabBagStack->addString("val", lcl_getW14MarkupStringForThemeColor(aComplexColor)); + pGrabBagStack->push(u"schemeClr"_ustr); + pGrabBagStack->push(u"attributes"_ustr); + pGrabBagStack->addString(u"val"_ustr, + lcl_getW14MarkupStringForThemeColor(aComplexColor)); pGrabBagStack->pop(); // maCurrentElement:'schemeClr', maPropertyList:'attributes' lcl_addColorTransformationToGrabBagStack(aComplexColor, pGrabBagStack); // maCurrentElement:'schemeClr', maPropertyList:'attributes', maybe 'lumMod' and @@ -1407,13 +1408,13 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( } else { - pGrabBagStack->push("srgbClr"); + pGrabBagStack->push(u"srgbClr"_ustr); sal_Int32 nFillColor(0); if (xPropSetInfo->hasPropertyByName(u"FillColor"_ustr)) rXPropSet->getPropertyValue(u"FillColor"_ustr) >>= nFillColor; - pGrabBagStack->push("attributes"); + pGrabBagStack->push(u"attributes"_ustr); ::Color aColor(ColorTransparency, nFillColor); - pGrabBagStack->addString("val", aColor.AsRGBHexString()); + pGrabBagStack->addString(u"val"_ustr, aColor.AsRGBHexString()); pGrabBagStack->pop(); // maCurrentElement:'srgbClr', maPropertyList:'attributes' } @@ -1423,9 +1424,9 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( rXPropSet->getPropertyValue(u"FillTransparence"_ustr) >>= nFillTransparence; if (nFillTransparence != 0) { - pGrabBagStack->push("alpha"); - pGrabBagStack->push("attributes"); - pGrabBagStack->addInt32("val", nFillTransparence * 1000); + pGrabBagStack->push(u"alpha"_ustr); + pGrabBagStack->push(u"attributes"_ustr); + pGrabBagStack->addInt32(u"val"_ustr, nFillTransparence * 1000); } // all remaining pop() calls are in the final getRootProperty() method break; @@ -1441,15 +1442,15 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( rUpdatePropVec.push_back(aCharTextFillTextEffect); // CharTextOutlineTextEffect - pGrabBagStack.reset(new oox::GrabBagStack("textOutline")); + pGrabBagStack.reset(new oox::GrabBagStack(u"textOutline"_ustr)); // attributes - pGrabBagStack->push("attributes"); + pGrabBagStack->push(u"attributes"_ustr); // line width sal_Int32 nLineWidth(0); if (xPropSetInfo->hasPropertyByName(u"LineWidth"_ustr)) rXPropSet->getPropertyValue(u"LineWidth"_ustr) >>= nLineWidth; - pGrabBagStack->addInt32("w", nLineWidth * 360); + pGrabBagStack->addInt32(u"w"_ustr, nLineWidth * 360); // cap for dashes drawing::LineCap eLineCap = drawing::LineCap_BUTT; if (xPropSetInfo->hasPropertyByName(u"LineCap"_ustr)) @@ -1459,10 +1460,10 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( sCap = u"rnd"_ustr; else if (eLineCap == drawing::LineCap_SQUARE) sCap = u"sq"_ustr; - pGrabBagStack->addString("cap", sCap); + pGrabBagStack->addString(u"cap"_ustr, sCap); // LO has no compound lines and always centers the lines - pGrabBagStack->addString("cmpd", u"sng"_ustr); - pGrabBagStack->addString("alng", u"ctr"_ustr); + pGrabBagStack->addString(u"cmpd"_ustr, u"sng"_ustr); + pGrabBagStack->addString(u"alng"_ustr, u"ctr"_ustr); pGrabBagStack->pop(); // maCurrentElement:'textOutline', maPropertyList:'attributes' @@ -1474,31 +1475,33 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( // implemented in LO. So only 'noFill' and 'solidFill'. if (eLineStyle == drawing::LineStyle_NONE) { - pGrabBagStack->appendElement("noFill", uno::Any()); + pGrabBagStack->appendElement(u"noFill"_ustr, uno::Any()); } else { - pGrabBagStack->push("solidFill"); + pGrabBagStack->push(u"solidFill"_ustr); // It is either "schemeClr" or "srgbClr". model::ComplexColor aComplexColor; - if (FontworkHelpers::getThemeColorFromShape("LineComplexColor", rXPropSet, aComplexColor)) + if (FontworkHelpers::getThemeColorFromShape(u"LineComplexColor"_ustr, rXPropSet, + aComplexColor)) { - pGrabBagStack->push("schemeClr"); - pGrabBagStack->push("attributes"); - pGrabBagStack->addString("val", lcl_getW14MarkupStringForThemeColor(aComplexColor)); + pGrabBagStack->push(u"schemeClr"_ustr); + pGrabBagStack->push(u"attributes"_ustr); + pGrabBagStack->addString(u"val"_ustr, + lcl_getW14MarkupStringForThemeColor(aComplexColor)); pGrabBagStack->pop(); lcl_addColorTransformationToGrabBagStack(aComplexColor, pGrabBagStack); // maCurrentElement:'schemeClr', maPropertylist:'attributes' } else // not a theme color { - pGrabBagStack->push("srgbClr"); - pGrabBagStack->push("attributes"); + pGrabBagStack->push(u"srgbClr"_ustr); + pGrabBagStack->push(u"attributes"_ustr); sal_Int32 nLineColor(0); if (xPropSetInfo->hasPropertyByName(u"LineColor"_ustr)) rXPropSet->getPropertyValue(u"LineColor"_ustr) >>= nLineColor; ::Color aColor(ColorTransparency, nLineColor); - pGrabBagStack->addString("val", aColor.AsRGBHexString()); + pGrabBagStack->addString(u"val"_ustr, aColor.AsRGBHexString()); pGrabBagStack->pop(); // maCurrentElement:'srgbClr', maPropertylist:'attributes' } @@ -1508,9 +1511,9 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( rXPropSet->getPropertyValue(u"LineTransparence"_ustr) >>= nLineTransparence; if (nLineTransparence != 0) { - pGrabBagStack->push("alpha"); - pGrabBagStack->push("attributes"); - pGrabBagStack->addInt32("val", nLineTransparence * 1000); + pGrabBagStack->push(u"alpha"_ustr); + pGrabBagStack->push(u"attributes"_ustr); + pGrabBagStack->addInt32(u"val"_ustr, nLineTransparence * 1000); pGrabBagStack->pop(); // maCurrentElement: 'alpha' pGrabBagStack->pop(); // maCurrentElement: 'srgbClr' or 'schemeClr' } @@ -1523,7 +1526,7 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( // prstDash if (eLineStyle == drawing::LineStyle_DASH) { - pGrabBagStack->push("prstDash"); + pGrabBagStack->push(u"prstDash"_ustr); OUString sPrstDash = u"sysDot"_ustr; drawing::LineDash aLineDash; if (xPropSetInfo->hasPropertyByName(u"LineDash"_ustr) @@ -1538,8 +1541,8 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( // ToDo: There may be a named dash style, but that is unlikely for Fontwork shapes. So // I skip it for now and use the "sysDot" fallback. } - pGrabBagStack->push("attributes"); - pGrabBagStack->addString("val", sPrstDash); + pGrabBagStack->push(u"attributes"_ustr); + pGrabBagStack->addString(u"val"_ustr, sPrstDash); pGrabBagStack->pop(); // maCurrentElement:'prstDash' pGrabBagStack->pop(); // maCurrentElement:'textOutline' } @@ -1551,14 +1554,14 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( if (xPropSetInfo->hasPropertyByName(u"LineJoint"_ustr)) rXPropSet->getPropertyValue(u"LineJoint"_ustr) >>= eLineJoint; if (eLineJoint == drawing::LineJoint_NONE || eLineJoint == drawing::LineJoint_BEVEL) - pGrabBagStack->appendElement("bevel", uno::Any()); + pGrabBagStack->appendElement(u"bevel"_ustr, uno::Any()); else if (eLineJoint == drawing::LineJoint_ROUND) - pGrabBagStack->appendElement("round", uno::Any()); + pGrabBagStack->appendElement(u"round"_ustr, uno::Any()); else // MITER or deprecated MIDDLE { - pGrabBagStack->push("miter"); - pGrabBagStack->push("attributes"); - pGrabBagStack->addInt32("lim", 0); // As of Feb. 2023 LO cannot render other values. + pGrabBagStack->push(u"miter"_ustr); + pGrabBagStack->push(u"attributes"_ustr); + pGrabBagStack->addInt32(u"lim"_ustr, 0); // As of Feb. 2023 LO cannot render other values. pGrabBagStack->pop(); // maCurrentElement:'attributes' pGrabBagStack->pop(); // maCurrentElement:'miter' } @@ -1575,7 +1578,7 @@ void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps( // used for <w:color> element. That is evaluated by applications, which do not understand w14 // namespace, or if w14:textFill is omitted. model::ComplexColor aComplexColor; - if (FontworkHelpers::getThemeColorFromShape("FillComplexColor", rXPropSet, aComplexColor)) + if (FontworkHelpers::getThemeColorFromShape(u"FillComplexColor"_ustr, rXPropSet, aComplexColor)) { // CharThemeColor beans::PropertyValue aCharThemeColor; @@ -1653,14 +1656,15 @@ void FontworkHelpers::applyUpdatesToCharInteropGrabBag( // Now apply the updates to the CharInteropGrabBag of this run uno::Sequence<beans::PropertyValue> aCharInteropGrabBagSeq; - if (xRunPropSetInfo->hasPropertyByName("CharInteropGrabBag")) - xRunPropSet->getPropertyValue("CharInteropGrabBag") >>= aCharInteropGrabBagSeq; + if (xRunPropSetInfo->hasPropertyByName(u"CharInteropGrabBag"_ustr)) + xRunPropSet->getPropertyValue(u"CharInteropGrabBag"_ustr) + >>= aCharInteropGrabBagSeq; comphelper::SequenceAsHashMap aGrabBagMap(aCharInteropGrabBagSeq); for (const auto& rProp : rUpdatePropVec) { aGrabBagMap[rProp.Name] = rProp.Value; // [] inserts if not exists } - xRunPropSet->setPropertyValue("CharInteropGrabBag", + xRunPropSet->setPropertyValue(u"CharInteropGrabBag"_ustr, uno::Any(aGrabBagMap.getAsConstPropertyValueList())); } } diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index 511f9295f7fd..9207c6244e9c 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -118,7 +118,7 @@ ContextHandlerRef GraphicShapeContext::onCreateContext( sal_Int32 aElementToken, if ((getNamespace( aElementToken ) == NMSP_vml) && mpShapePtr) { - mpShapePtr->setServiceName("com.sun.star.drawing.CustomShape"); + mpShapePtr->setServiceName(u"com.sun.star.drawing.CustomShape"_ustr); CustomShapePropertiesPtr pCstmShpProps (mpShapePtr->getCustomShapeProperties()); diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 5b2109ca2d88..a32553c767a5 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -414,9 +414,9 @@ void Shape::addShape( const Reference<css::drawing::XShape>& xBgShape = pBgShape->getXShape(); Reference<XPropertySet> xBgProps(xBgShape, uno::UNO_QUERY); drawing::FillStyle eFillStyle = drawing::FillStyle_NONE; - xBgProps->getPropertyValue("FillStyle") >>= eFillStyle; + xBgProps->getPropertyValue(u"FillStyle"_ustr) >>= eFillStyle; drawing::LineStyle eLineStyle = drawing::LineStyle_NONE; - xBgProps->getPropertyValue("LineStyle") >>= eLineStyle; + xBgProps->getPropertyValue(u"LineStyle"_ustr) >>= eLineStyle; if (eFillStyle == drawing::FillStyle_NONE && eLineStyle == drawing::LineStyle_NONE) { @@ -815,7 +815,7 @@ static void lcl_copyCharPropsToShape(const uno::Reference<drawing::XShape>& xSha ParagraphAdjust eAdjust = ParagraphAdjust_LEFT; if (pParagraph->getProperties().getParaAdjust()) eAdjust = *pParagraph->getProperties().getParaAdjust(); - xSet->setPropertyValue("ParaAdjust", uno::Any(eAdjust)); + xSet->setPropertyValue(u"ParaAdjust"_ustr, uno::Any(eAdjust)); SdrObject* pShape = SdrObject::getSdrObjectFromXShape(xShape); assert(pShape); SdrTextHorzAdjust eHorzAdjust = lcl_convertAdjust(eAdjust); @@ -960,7 +960,7 @@ Reference< XShape > const & Shape::createAndInsert( else if (rServiceName == "com.sun.star.drawing.GraphicObjectShape" && mpGraphicPropertiesPtr && !mpGraphicPropertiesPtr->m_sMediaPackageURL.isEmpty()) { - aServiceName = finalizeServiceName( rFilterBase, "com.sun.star.presentation.MediaShape", aShapeRectHmm ); + aServiceName = finalizeServiceName( rFilterBase, u"com.sun.star.presentation.MediaShape"_ustr, aShapeRectHmm ); bIsEmbMedia = true; } else @@ -1245,17 +1245,17 @@ Reference< XShape > const & Shape::createAndInsert( } if( !msDescription.isEmpty() ) { - xSet->setPropertyValue( "Description", Any( msDescription ) ); + xSet->setPropertyValue( u"Description"_ustr, Any( msDescription ) ); } if (m_isDecorative) { - xSet->setPropertyValue("Decorative", Any(m_isDecorative)); + xSet->setPropertyValue(u"Decorative"_ustr, Any(m_isDecorative)); } // set the placeholder height to "0" if it has the 'TextAutoGrowHeight' property // the placeholder height is set later to the correct size. bool bAutoGrowHeight = false; - xSet->getPropertyValue("TextAutoGrowHeight") >>= bAutoGrowHeight; + xSet->getPropertyValue(u"TextAutoGrowHeight"_ustr) >>= bAutoGrowHeight; if (bAutoGrowHeight && mxShape->getShapeType().startsWith("com.sun.star.presentation.")) { awt::Size aSize(mxShape->getSize().Width, 0); @@ -1268,15 +1268,15 @@ Reference< XShape > const & Shape::createAndInsert( if ( mbHidden || mbHiddenMasterShape ) { SAL_INFO("oox.drawingml", "Shape::createAndInsert: invisible shape with id='" << msId << "'"); - xSet->setPropertyValue( "Visible", Any( false ) ); + xSet->setPropertyValue( u"Visible"_ustr, Any( false ) ); // In Excel hidden means not printed, let's use visibility for now until that's handled separately - xSet->setPropertyValue( "Printable", Any( false ) ); + xSet->setPropertyValue( u"Printable"_ustr, Any( false ) ); } if (mbLocked) { - xSet->setPropertyValue("MoveProtect", Any(true)); - xSet->setPropertyValue("SizeProtect", Any(true)); + xSet->setPropertyValue(u"MoveProtect"_ustr, Any(true)); + xSet->setPropertyValue(u"SizeProtect"_ustr, Any(true)); } ActionLockGuard const alg(mxShape); @@ -1287,7 +1287,7 @@ Reference< XShape > const & Shape::createAndInsert( uno::Reference< text::XText > xText( mxShape, uno::UNO_QUERY ); if ( xText.is() ) { - xText->setString( "" ); + xText->setString( u""_ustr ); } } @@ -1297,9 +1297,9 @@ Reference< XShape > const & Shape::createAndInsert( // the shape first, and it can be read only after the shape is // inserted into the document, so delay the actual import until here SvGlobalName name(SO3_SM_CLASSID); - xSet->setPropertyValue("CLSID", uno::Any(name.GetHexName())); + xSet->setPropertyValue(u"CLSID"_ustr, uno::Any(name.GetHexName())); uno::Reference<embed::XEmbeddedObject> const xObj( - xSet->getPropertyValue("EmbeddedObject"), uno::UNO_QUERY); + xSet->getPropertyValue(u"EmbeddedObject"_ustr), uno::UNO_QUERY); if (xObj.is()) { uno::Reference<uno::XInterface> const xMathModel(xObj->getComponent()); @@ -1321,7 +1321,7 @@ Reference< XShape > const & Shape::createAndInsert( // dmapper needs the original rotation angle for calculating square wrap. This angle is not // available as property there, so store it in InteropGrabBag. - putPropertyToGrabBag("mso-rotation-angle", Any(mnRotation)); + putPropertyToGrabBag(u"mso-rotation-angle"_ustr, Any(mnRotation)); if( pTheme ) { @@ -1346,7 +1346,7 @@ Reference< XShape > const & Shape::createAndInsert( {"LineWidth", uno::Any(aLineProperties.getLineWidth())}, {"Transformations", uno::Any(pLineRef->maPhClr.getTransformations())} }); - putPropertyToGrabBag( "StyleLnRef", Any( aProperties ) ); + putPropertyToGrabBag( u"StyleLnRef"_ustr, Any( aProperties ) ); } if( const ShapeStyleRef* pFillRef = getShapeStyleRef( XML_fillRef ) ) { @@ -1367,7 +1367,7 @@ Reference< XShape > const & Shape::createAndInsert( {"Transformations", uno::Any(pFillRef->maPhClr.getTransformations())} }); - putPropertyToGrabBag( "StyleFillRef", Any( aProperties ) ); + putPropertyToGrabBag( u"StyleFillRef"_ustr, Any( aProperties ) ); } } if( const ShapeStyleRef* pEffectRef = getShapeStyleRef( XML_effectRef ) ) @@ -1382,7 +1382,7 @@ Reference< XShape > const & Shape::createAndInsert( {"Idx", uno::Any(pEffectRef->mnThemedIdx)}, {"Transformations", uno::Any(pEffectRef->maPhClr.getTransformations())} }); - putPropertyToGrabBag( "StyleEffectRef", Any( aProperties ) ); + putPropertyToGrabBag( u"StyleEffectRef"_ustr, Any( aProperties ) ); } } ShapePropertyMap aShapeProps( rFilterBase.getModelObjectHelper() ); @@ -1515,13 +1515,13 @@ Reference< XShape > const & Shape::createAndInsert( { uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aGrabBag; - propertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag; + propertySet->getPropertyValue(u"FrameInteropGrabBag"_ustr) >>= aGrabBag; sal_Int32 length = aGrabBag.getLength(); aGrabBag.realloc( length+1); auto pGrabBag = aGrabBag.getArray(); pGrabBag[length].Name = "mso-orig-shape-type"; pGrabBag[length].Value <<= mpCustomShapePropertiesPtr->getShapePresetTypeName(); - propertySet->setPropertyValue("FrameInteropGrabBag",uno::Any(aGrabBag)); + propertySet->setPropertyValue(u"FrameInteropGrabBag"_ustr,uno::Any(aGrabBag)); } //If the text box has links then save the link information so that //it can be accessed in DomainMapper_Impl.cxx while chaining the text frames. @@ -1529,7 +1529,7 @@ Reference< XShape > const & Shape::createAndInsert( { uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aGrabBag; - propertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag; + propertySet->getPropertyValue(u"FrameInteropGrabBag"_ustr) >>= aGrabBag; sal_Int32 length = aGrabBag.getLength(); aGrabBag.realloc( length + 3 ); auto pGrabBag = aGrabBag.getArray(); @@ -1539,7 +1539,7 @@ Reference< XShape > const & Shape::createAndInsert( pGrabBag[length + 1 ].Value <<= getLinkedTxbxAttributes().id; pGrabBag[length + 2 ].Name = "Txbx-Seq"; pGrabBag[length + 2 ].Value <<= getLinkedTxbxAttributes().seq; - propertySet->setPropertyValue("FrameInteropGrabBag",uno::Any(aGrabBag)); + propertySet->setPropertyValue(u"FrameInteropGrabBag"_ustr,uno::Any(aGrabBag)); } // TextFrames have BackColor, not FillColor @@ -1593,7 +1593,7 @@ Reference< XShape > const & Shape::createAndInsert( static constexpr OUString aGrabBagPropName = u"FrameInteropGrabBag"_ustr; uno::Sequence<beans::PropertyValue> aGrabBag; xPropertySet->getPropertyValue(aGrabBagPropName) >>= aGrabBag; - beans::PropertyValue aPair(comphelper::makePropertyValue("mso-rotation-angle", + beans::PropertyValue aPair(comphelper::makePropertyValue(u"mso-rotation-angle"_ustr, mnRotation)); if (aGrabBag.hasElements()) { @@ -1669,7 +1669,7 @@ Reference< XShape > const & Shape::createAndInsert( { uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aGrabBag; - propertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag; + propertySet->getPropertyValue(u"InteropGrabBag"_ustr) >>= aGrabBag; sal_Int32 length = aGrabBag.getLength(); aGrabBag.realloc( length + 3 ); auto pGrabBag = aGrabBag.getArray(); @@ -1679,7 +1679,7 @@ Reference< XShape > const & Shape::createAndInsert( pGrabBag[length + 1 ].Value <<= getLinkedTxbxAttributes().id; pGrabBag[length + 2 ].Name = "Txbx-Seq"; pGrabBag[length + 2 ].Value <<= getLinkedTxbxAttributes().seq; - propertySet->setPropertyValue("InteropGrabBag",uno::Any(aGrabBag)); + propertySet->setPropertyValue(u"InteropGrabBag"_ustr,uno::Any(aGrabBag)); } PropertySet( xSet ).setProperties( aShapeProps ); @@ -1702,7 +1702,7 @@ Reference< XShape > const & Shape::createAndInsert( if (mbLockedCanvas) { - putPropertyToGrabBag( "LockedCanvas", Any( true ) ); + putPropertyToGrabBag( u"LockedCanvas"_ustr, Any( true ) ); if (aServiceName == "com.sun.star.drawing.LineShape") { // It seems the position and size for lines inside a locked canvas is absolute. @@ -1713,30 +1713,30 @@ Reference< XShape > const & Shape::createAndInsert( if (mbWordprocessingCanvas) { - putPropertyToGrabBag("WordprocessingCanvas", Any(true)); + putPropertyToGrabBag(u"WordprocessingCanvas"_ustr, Any(true)); } // Store original fill and line colors of the shape and the theme color name to InteropGrabBag std::vector<beans::PropertyValue> aProperties { - comphelper::makePropertyValue("EmuLineWidth", aLineProperties.moLineWidth.value_or(0)), - comphelper::makePropertyValue("OriginalSolidFillClr", aShapeProps.getProperty(PROP_FillColor)), - comphelper::makePropertyValue("OriginalLnSolidFillClr", aShapeProps.getProperty(PROP_LineColor)) + comphelper::makePropertyValue(u"EmuLineWidth"_ustr, aLineProperties.moLineWidth.value_or(0)), + comphelper::makePropertyValue(u"OriginalSolidFillClr"_ustr, aShapeProps.getProperty(PROP_FillColor)), + comphelper::makePropertyValue(u"OriginalLnSolidFillClr"_ustr, aShapeProps.getProperty(PROP_LineColor)) }; OUString sColorFillScheme = aFillProperties.maFillColor.getSchemeColorName(); if( !aFillProperties.maFillColor.isPlaceHolder() && !sColorFillScheme.isEmpty() ) { - aProperties.push_back(comphelper::makePropertyValue("SpPrSolidFillSchemeClr", sColorFillScheme)); - aProperties.push_back(comphelper::makePropertyValue("SpPrSolidFillSchemeClrTransformations", aFillProperties.maFillColor.getTransformations())); + aProperties.push_back(comphelper::makePropertyValue(u"SpPrSolidFillSchemeClr"_ustr, sColorFillScheme)); + aProperties.push_back(comphelper::makePropertyValue(u"SpPrSolidFillSchemeClrTransformations"_ustr, aFillProperties.maFillColor.getTransformations())); } OUString sLnColorFillScheme = aLineProperties.maLineFill.maFillColor.getSchemeColorName(); if( !aLineProperties.maLineFill.maFillColor.isPlaceHolder() && !sLnColorFillScheme.isEmpty() ) { - aProperties.push_back(comphelper::makePropertyValue("SpPrLnSolidFillSchemeClr", sLnColorFillScheme)); + aProperties.push_back(comphelper::makePropertyValue(u"SpPrLnSolidFillSchemeClr"_ustr, sLnColorFillScheme)); auto aResolvedSchemeClr = aLineProperties.maLineFill.maFillColor; aResolvedSchemeClr.clearTransformations(); - aProperties.push_back(comphelper::makePropertyValue("SpPrLnSolidFillResolvedSchemeClr", aResolvedSchemeClr.getColor(rGraphicHelper, nFillPhClr))); - aProperties.push_back(comphelper::makePropertyValue("SpPrLnSolidFillSchemeClrTransformations", aLineProperties.maLineFill.maFillColor.getTransformations())); + aProperties.push_back(comphelper::makePropertyValue(u"SpPrLnSolidFillResolvedSchemeClr"_ustr, aResolvedSchemeClr.getColor(rGraphicHelper, nFillPhClr))); + aProperties.push_back(comphelper::makePropertyValue(u"SpPrLnSolidFillSchemeClrTransformations"_ustr, aLineProperties.maLineFill.maFillColor.getTransformations())); } putPropertiesToGrabBag(comphelper::containerToSequence(aProperties)); @@ -1752,26 +1752,26 @@ Reference< XShape > const & Shape::createAndInsert( // save position std::vector<beans::PropertyValue> aGradientStop { - comphelper::makePropertyValue("Pos", rPos) + comphelper::makePropertyValue(u"Pos"_ustr, rPos) }; OUString sStopColorScheme = rColor.getSchemeColorName(); if( sStopColorScheme.isEmpty() ) { // save RGB color - aGradientStop.push_back(comphelper::makePropertyValue("RgbClr", rColor.getColor(rGraphicHelper, nFillPhClr))); + aGradientStop.push_back(comphelper::makePropertyValue(u"RgbClr"_ustr, rColor.getColor(rGraphicHelper, nFillPhClr))); // in the case of a RGB color, transformations are already applied to // the color with the exception of alpha transformations. We only need // to keep the transparency value to calculate the alpha value later. if( rColor.hasTransparency() ) - aGradientStop.push_back(comphelper::makePropertyValue("Transparency", rColor.getTransparency())); + aGradientStop.push_back(comphelper::makePropertyValue(u"Transparency"_ustr, rColor.getTransparency())); } else { // save color with scheme name - aGradientStop.push_back(comphelper::makePropertyValue("SchemeClr", sStopColorScheme)); + aGradientStop.push_back(comphelper::makePropertyValue(u"SchemeClr"_ustr, sStopColorScheme)); // save all color transformations - aGradientStop.push_back(comphelper::makePropertyValue("Transformations", rColor.getTransformations())); + aGradientStop.push_back(comphelper::makePropertyValue(u"Transformations"_ustr, rColor.getTransformations())); } aGradientStops.push_back(comphelper::makePropertyValue(OUString::number(i), comphelper::containerToSequence(aGradientStop))); @@ -1780,8 +1780,8 @@ Reference< XShape > const & Shape::createAndInsert( // If getFillProperties.moFillType is unused that means gradient is defined by a theme // which is already saved into StyleFillRef property, so no need to save the explicit values too if( getFillProperties().moFillType.has_value() ) - putPropertyToGrabBag( "GradFillDefinition", uno::Any(comphelper::containerToSequence(aGradientStops))); - putPropertyToGrabBag( "OriginalGradFill", aShapeProps.getProperty(PROP_FillGradient) ); + putPropertyToGrabBag( u"GradFillDefinition"_ustr, uno::Any(comphelper::containerToSequence(aGradientStops))); + putPropertyToGrabBag( u"OriginalGradFill"_ustr, aShapeProps.getProperty(PROP_FillGradient) ); } // store unsupported effect attributes in the grab bag @@ -1795,7 +1795,7 @@ Reference< XShape > const & Shape::createAndInsert( { std::vector<beans::PropertyValue> aEffectsGrabBag { - comphelper::makePropertyValue("Attribs", aEffect.Value) + comphelper::makePropertyValue(u"Attribs"_ustr, aEffect.Value) }; Color& aColor( it->moColor ); @@ -1803,19 +1803,19 @@ Reference< XShape > const & Shape::createAndInsert( if( sColorScheme.isEmpty() ) { // RGB color and transparency value - aEffectsGrabBag.push_back(comphelper::makePropertyValue("RgbClr", aColor.getColor(rGraphicHelper, nFillPhClr))); - aEffectsGrabBag.push_back(comphelper::makePropertyValue("RgbClrTransparency", aColor.getTransparency())); + aEffectsGrabBag.push_back(comphelper::makePropertyValue(u"RgbClr"_ustr, aColor.getColor(rGraphicHelper, nFillPhClr))); + aEffectsGrabBag.push_back(comphelper::makePropertyValue(u"RgbClrTransparency"_ustr, aColor.getTransparency())); } else { // scheme color with name and transformations - aEffectsGrabBag.push_back(comphelper::makePropertyValue("SchemeClr", sColorScheme)); - aEffectsGrabBag.push_back(comphelper::makePropertyValue("SchemeClrTransformations", aColor.getTransformations())); + aEffectsGrabBag.push_back(comphelper::makePropertyValue(u"SchemeClr"_ustr, sColorScheme)); + aEffectsGrabBag.push_back(comphelper::makePropertyValue(u"SchemeClrTransformations"_ustr, aColor.getTransformations())); } aEffects.push_back(comphelper::makePropertyValue(aEffect.Name, comphelper::containerToSequence(aEffectsGrabBag))); } } - putPropertyToGrabBag("EffectProperties", uno::Any(comphelper::containerToSequence(aEffects))); + putPropertyToGrabBag(u"EffectProperties"_ustr, uno::Any(comphelper::containerToSequence(aEffects))); } // add 3D effects if any to GrabBag. They are still used in export. @@ -1830,7 +1830,7 @@ Reference< XShape > const & Shape::createAndInsert( {"LightRig", uno::Any(aLightRig3DEffects)}, {"Shape3D", uno::Any(aShape3DEffects)} }); - putPropertyToGrabBag( "3DEffectProperties", Any( a3DEffectsGrabBag ) ); + putPropertyToGrabBag( u"3DEffectProperties"_ustr, Any( a3DEffectsGrabBag ) ); } if( bIsCustomShape && getTextBody()) @@ -1847,25 +1847,25 @@ Reference< XShape > const & Shape::createAndInsert( {"LightRig", uno::Any(aTextLightRig3DEffects)}, {"Shape3D", uno::Any(aTextShape3DEffects)} }); - putPropertyToGrabBag( "Text3DEffectProperties", Any( aText3DEffectsGrabBag ) ); + putPropertyToGrabBag( u"Text3DEffectProperties"_ustr, Any( aText3DEffectsGrabBag ) ); } } // store bitmap artistic effects in the grab bag if( !mpGraphicPropertiesPtr->maBlipProps.maEffect.isEmpty() ) - putPropertyToGrabBag( "ArtisticEffectProperties", + putPropertyToGrabBag( u"ArtisticEffectProperties"_ustr, Any( mpGraphicPropertiesPtr->maBlipProps.maEffect.getEffect() ) ); } else if( mbLockedCanvas ) { //If we have aServiceName as "com.sun.star.drawing.GroupShape" and lockedCanvas - putPropertyToGrabBag( "LockedCanvas", Any( true ) ); + putPropertyToGrabBag( u"LockedCanvas"_ustr, Any( true ) ); } else if (mbWordprocessingCanvas) { - putPropertyToGrabBag("WordprocessingCanvas", Any(true)); - putPropertyToGrabBag("mso-edit-as", Any(OUString("canvas"))); // for export VML Fallback + putPropertyToGrabBag(u"WordprocessingCanvas"_ustr, Any(true)); + putPropertyToGrabBag(u"mso-edit-as"_ustr, Any(u"canvas"_ustr)); // for export VML Fallback } // These can have a custom geometry, so position should be set here, @@ -1887,19 +1887,19 @@ Reference< XShape > const & Shape::createAndInsert( { case XML_line: case XML_straightConnector1: - xSet->setPropertyValue("EdgeKind", Any(ConnectorType_LINE)); + xSet->setPropertyValue(u"EdgeKind"_ustr, Any(ConnectorType_LINE)); break; case XML_bentConnector2: case XML_bentConnector3: case XML_bentConnector4: case XML_bentConnector5: - xSet->setPropertyValue("EdgeKind", Any(ConnectorType_STANDARD)); + xSet->setPropertyValue(u"EdgeKind"_ustr, Any(ConnectorType_STANDARD)); break; case XML_curvedConnector2: case XML_curvedConnector3: case XML_curvedConnector4: case XML_curvedConnector5: - xSet->setPropertyValue("EdgeKind", Any(ConnectorType_CURVE)); + xSet->setPropertyValue(u"EdgeKind"_ustr, Any(ConnectorType_CURVE)); break; default: break; @@ -1939,7 +1939,7 @@ Reference< XShape > const & Shape::createAndInsert( nTextAreaRotateAngle += 5400000; nTextPreRotateAngle -= 5400000; // compensate the additional text area rotation } - putPropertyToGrabBag("Upright", Any(true)); + putPropertyToGrabBag(u"Upright"_ustr, Any(true)); } /* OOX measures text rotation clockwise in 1/60000th degrees, relative to the containing shape. set*Angle wants degrees counter-clockwise. */ @@ -1949,9 +1949,9 @@ Reference< XShape > const & Shape::createAndInsert( auto sHorzOverflow = getTextBody()->getTextProperties().msHorzOverflow; if (!sHorzOverflow.isEmpty()) - putPropertyToGrabBag("horzOverflow", uno::Any(getTextBody()->getTextProperties().msHorzOverflow)); + putPropertyToGrabBag(u"horzOverflow"_ustr, uno::Any(getTextBody()->getTextProperties().msHorzOverflow)); if (XML_ellipsis == getTextBody()->getTextProperties().moVertOverflow) - putPropertyToGrabBag("vertOverflow", uno::Any(OUString{"ellipsis"})); + putPropertyToGrabBag(u"vertOverflow"_ustr, uno::Any(u"ellipsis"_ustr)); } // Note that the script oox/source/drawingml/customshapes/generatePresetsData.pl looks @@ -2015,7 +2015,7 @@ Reference< XShape > const & Shape::createAndInsert( } } } - xText->setString(""); + xText->setString(u""_ustr); Reference < XTextCursor > xAt = xText->createTextCursor(); getTextBody()->insertAt( rFilterBase, xText, xAt, aCharStyleProperties, mpMasterTextListStyle ); @@ -2071,9 +2071,9 @@ Reference< XShape > const & Shape::createAndInsert( && aServiceName != "com.sun.star.drawing.GroupShape") { uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY); - propertySet->setPropertyValue("GlowEffectRadius", Any(convertEmuToHmm(aEffectProperties.maGlow.moGlowRad.value()))); - propertySet->setPropertyValue("GlowEffectColor", Any(aEffectProperties.maGlow.moGlowColor.getColor(rGraphicHelper))); - propertySet->setPropertyValue("GlowEffectTransparency", Any(aEffectProperties.maGlow.moGlowColor.getTransparency())); + propertySet->setPropertyValue(u"GlowEffectRadius"_ustr, Any(convertEmuToHmm(aEffectProperties.maGlow.moGlowRad.value()))); + propertySet->setPropertyValue(u"GlowEffectColor"_ustr, Any(aEffectProperties.maGlow.moGlowColor.getColor(rGraphicHelper))); + propertySet->setPropertyValue(u"GlowEffectTransparency"_ustr, Any(aEffectProperties.maGlow.moGlowColor.getTransparency())); } // Set soft edge effect properties @@ -2081,7 +2081,7 @@ Reference< XShape > const & Shape::createAndInsert( { uno::Reference<beans::XPropertySet> propertySet(mxShape, uno::UNO_QUERY); propertySet->setPropertyValue( - "SoftEdgeRadius", Any(convertEmuToHmm(aEffectProperties.maSoftEdge.moRad.value()))); + u"SoftEdgeRadius"_ustr, Any(convertEmuToHmm(aEffectProperties.maSoftEdge.moRad.value()))); } // Set the stroke and fill-color properties of the OLE shape @@ -2173,8 +2173,8 @@ void Shape::convertSmartArtToMetafile(XmlFilterBase const & rFilterBase) { Reference<XPropertySet> xSet(mxShape, UNO_QUERY_THROW); - xSet->setPropertyValue("MoveProtect", Any(true)); - xSet->setPropertyValue("SizeProtect", Any(true)); + xSet->setPropertyValue(u"MoveProtect"_ustr, Any(true)); + xSet->setPropertyValue(u"SizeProtect"_ustr, Any(true)); // Replace existing shapes with a new Graphic Object rendered // from them @@ -2219,16 +2219,16 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase const & rFilte static_cast < sal_Int32 > ( ( fPixelsPer100thmm * aActualSize.Height ) + 0.5 ) ); Sequence< PropertyValue > aFilterData{ - comphelper::makePropertyValue("PixelWidth", aSize.Width), - comphelper::makePropertyValue("PixelHeight", aSize.Height), - comphelper::makePropertyValue("LogicalWidth", aActualSize.Width), - comphelper::makePropertyValue("LogicalHeight", aActualSize.Height) + comphelper::makePropertyValue(u"PixelWidth"_ustr, aSize.Width), + comphelper::makePropertyValue(u"PixelHeight"_ustr, aSize.Height), + comphelper::makePropertyValue(u"LogicalWidth"_ustr, aActualSize.Width), + comphelper::makePropertyValue(u"LogicalHeight"_ustr, aActualSize.Height) }; Sequence < PropertyValue > aDescriptor{ - comphelper::makePropertyValue("OutputStream", xOutputStream), - comphelper::makePropertyValue("FilterName", OUString("SVM")), // Rendering format - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"OutputStream"_ustr, xOutputStream), + comphelper::makePropertyValue(u"FilterName"_ustr, u"SVM"_ustr), // Rendering format + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; Reference < lang::XComponent > xSourceDoc( mxShape, UNO_QUERY_THROW ); @@ -2248,12 +2248,12 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase const & rFilte Reference < graphic::XGraphic > xGraphic( aGraphic.GetXGraphic() ); Reference < lang::XMultiServiceFactory > xServiceFact( rFilterBase.getModel(), UNO_QUERY_THROW ); - xShape.set( xServiceFact->createInstance( "com.sun.star.drawing.GraphicObjectShape" ), UNO_QUERY_THROW ); + xShape.set( xServiceFact->createInstance( u"com.sun.star.drawing.GraphicObjectShape"_ustr ), UNO_QUERY_THROW ); Reference < XPropertySet > xPropSet( xShape, UNO_QUERY_THROW ); - xPropSet->setPropertyValue( "Graphic", Any( xGraphic ) ); - xPropSet->setPropertyValue( "MoveProtect", Any( true ) ); - xPropSet->setPropertyValue( "SizeProtect", Any( true ) ); - xPropSet->setPropertyValue( "Name", Any( OUString( "RenderedShapes" ) ) ); + xPropSet->setPropertyValue( u"Graphic"_ustr, Any( xGraphic ) ); + xPropSet->setPropertyValue( u"MoveProtect"_ustr, Any( true ) ); + xPropSet->setPropertyValue( u"SizeProtect"_ustr, Any( true ) ); + xPropSet->setPropertyValue( u"Name"_ustr, Any( u"RenderedShapes"_ustr ) ); } catch( const Exception& ) { @@ -2325,7 +2325,7 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& { // set the chart2 OLE class ID at the OLE shape PropertySet aShapeProp( mxShape ); - aShapeProp.setProperty( PROP_CLSID, OUString( "12dcae26-281f-416f-a234-c3086127382e" ) ); + aShapeProp.setProperty( PROP_CLSID, u"12dcae26-281f-416f-a234-c3086127382e"_ustr ); // get the XModel interface of the embedded object from the OLE shape Reference< frame::XModel > xDocModel; diff --git a/oox/source/drawingml/shape3dproperties.cxx b/oox/source/drawingml/shape3dproperties.cxx index ca1e7574219a..e000f1b9c5b6 100644 --- a/oox/source/drawingml/shape3dproperties.cxx +++ b/oox/source/drawingml/shape3dproperties.cxx @@ -34,68 +34,68 @@ OUString Generic3DProperties::getCameraPrstName( sal_Int32 nElement ) { switch( nElement ) { - case XML_legacyObliqueTopLeft: return "legacyObliqueTopLeft"; - case XML_legacyObliqueTop: return "legacyObliqueTop"; - case XML_legacyObliqueTopRight: return "legacyObliqueTopRight"; - case XML_legacyObliqueLeft: return "legacyObliqueLeft"; - case XML_legacyObliqueFront: return "legacyObliqueFront"; - case XML_legacyObliqueRight: return "legacyObliqueRight"; - case XML_legacyObliqueBottomLeft: return "legacyObliqueBottomLeft"; - case XML_legacyObliqueBottom: return "legacyObliqueBottom"; - case XML_legacyObliqueBottomRight: return "legacyObliqueBottomRight"; - case XML_legacyPerspectiveTopLeft: return "legacyPerspectiveTopLeft"; - case XML_legacyPerspectiveTop: return "legacyPerspectiveTop"; - case XML_legacyPerspectiveTopRight: return "legacyPerspectiveTopRight"; - case XML_legacyPerspectiveLeft: return "legacyPerspectiveLeft"; - case XML_legacyPerspectiveFront: return "legacyPerspectiveFront"; - case XML_legacyPerspectiveRight: return "legacyPerspectiveRight"; - case XML_legacyPerspectiveBottomLeft: return "legacyPerspectiveBottomLeft"; - case XML_legacyPerspectiveBottom: return "legacyPerspectiveBottom"; - case XML_legacyPerspectiveBottomRight: return "legacyPerspectiveBottomRight"; - case XML_orthographicFront: return "orthographicFront"; - case XML_isometricTopUp: return "isometricTopUp"; - case XML_isometricTopDown: return "isometricTopDown"; - case XML_isometricBottomUp: return "isometricBottomUp"; - case XML_isometricBottomDown: return "isometricBottomDown"; - case XML_isometricLeftUp: return "isometricLeftUp"; - case XML_isometricLeftDown: return "isometricLeftDown"; - case XML_isometricRightUp: return "isometricRightUp"; - case XML_isometricRightDown: return "isometricRightDown"; - case XML_isometricOffAxis1Left: return "isometricOffAxis1Left"; - case XML_isometricOffAxis1Right: return "isometricOffAxis1Right"; - case XML_isometricOffAxis1Top: return "isometricOffAxis1Top"; - case XML_isometricOffAxis2Left: return "isometricOffAxis2Left"; - case XML_isometricOffAxis2Right: return "isometricOffAxis2Right"; - case XML_isometricOffAxis2Top: return "isometricOffAxis2Top"; - case XML_isometricOffAxis3Left: return "isometricOffAxis3Left"; - case XML_isometricOffAxis3Right: return "isometricOffAxis3Right"; - case XML_isometricOffAxis3Bottom: return "isometricOffAxis3Bottom"; - case XML_isometricOffAxis4Left: return "isometricOffAxis4Left"; - case XML_isometricOffAxis4Right: return "isometricOffAxis4Right"; - case XML_isometricOffAxis4Bottom: return "isometricOffAxis4Bottom"; - case XML_obliqueTopLeft: return "obliqueTopLeft"; - case XML_obliqueTop: return "obliqueTop"; - case XML_obliqueTopRight: return "obliqueTopRight"; - case XML_obliqueLeft: return "obliqueLeft"; - case XML_obliqueRight: return "obliqueRight"; - case XML_obliqueBottomLeft: return "obliqueBottomLeft"; - case XML_obliqueBottom: return "obliqueBottom"; - case XML_obliqueBottomRight: return "obliqueBottomRight"; - case XML_perspectiveFront: return "perspectiveFront"; - case XML_perspectiveLeft: return "perspectiveLeft"; - case XML_perspectiveRight: return "perspectiveRight"; - case XML_perspectiveAbove: return "perspectiveAbove"; - case XML_perspectiveBelow: return "perspectiveBelow"; - case XML_perspectiveAboveLeftFacing: return "perspectiveAboveLeftFacing"; - case XML_perspectiveAboveRightFacing: return "perspectiveAboveRightFacing"; - case XML_perspectiveContrastingLeftFacing: return "perspectiveContrastingLeftFacing"; - case XML_perspectiveContrastingRightFacing: return "perspectiveContrastingRightFacing"; - case XML_perspectiveHeroicLeftFacing: return "perspectiveHeroicLeftFacing"; - case XML_perspectiveHeroicRightFacing: return "perspectiveHeroicRightFacing"; - case XML_perspectiveHeroicExtremeLeftFacing: return "perspectiveHeroicExtremeLeftFacing"; - case XML_perspectiveHeroicExtremeRightFacing: return "perspectiveHeroicExtremeRightFacing"; - case XML_perspectiveRelaxed: return "perspectiveRelaxed"; - case XML_perspectiveRelaxedModerately: return "perspectiveRelaxedModerately"; + case XML_legacyObliqueTopLeft: return u"legacyObliqueTopLeft"_ustr; + case XML_legacyObliqueTop: return u"legacyObliqueTop"_ustr; + case XML_legacyObliqueTopRight: return u"legacyObliqueTopRight"_ustr; + case XML_legacyObliqueLeft: return u"legacyObliqueLeft"_ustr; + case XML_legacyObliqueFront: return u"legacyObliqueFront"_ustr; + case XML_legacyObliqueRight: return u"legacyObliqueRight"_ustr; + case XML_legacyObliqueBottomLeft: return u"legacyObliqueBottomLeft"_ustr; + case XML_legacyObliqueBottom: return u"legacyObliqueBottom"_ustr; + case XML_legacyObliqueBottomRight: return u"legacyObliqueBottomRight"_ustr; + case XML_legacyPerspectiveTopLeft: return u"legacyPerspectiveTopLeft"_ustr; + case XML_legacyPerspectiveTop: return u"legacyPerspectiveTop"_ustr; + case XML_legacyPerspectiveTopRight: return u"legacyPerspectiveTopRight"_ustr; + case XML_legacyPerspectiveLeft: return u"legacyPerspectiveLeft"_ustr; + case XML_legacyPerspectiveFront: return u"legacyPerspectiveFront"_ustr; + case XML_legacyPerspectiveRight: return u"legacyPerspectiveRight"_ustr; + case XML_legacyPerspectiveBottomLeft: return u"legacyPerspectiveBottomLeft"_ustr; + case XML_legacyPerspectiveBottom: return u"legacyPerspectiveBottom"_ustr; + case XML_legacyPerspectiveBottomRight: return u"legacyPerspectiveBottomRight"_ustr; + case XML_orthographicFront: return u"orthographicFront"_ustr; + case XML_isometricTopUp: return u"isometricTopUp"_ustr; + case XML_isometricTopDown: return u"isometricTopDown"_ustr; + case XML_isometricBottomUp: return u"isometricBottomUp"_ustr; + case XML_isometricBottomDown: return u"isometricBottomDown"_ustr; + case XML_isometricLeftUp: return u"isometricLeftUp"_ustr; + case XML_isometricLeftDown: return u"isometricLeftDown"_ustr; + case XML_isometricRightUp: return u"isometricRightUp"_ustr; + case XML_isometricRightDown: return u"isometricRightDown"_ustr; + case XML_isometricOffAxis1Left: return u"isometricOffAxis1Left"_ustr; + case XML_isometricOffAxis1Right: return u"isometricOffAxis1Right"_ustr; + case XML_isometricOffAxis1Top: return u"isometricOffAxis1Top"_ustr; + case XML_isometricOffAxis2Left: return u"isometricOffAxis2Left"_ustr; + case XML_isometricOffAxis2Right: return u"isometricOffAxis2Right"_ustr; + case XML_isometricOffAxis2Top: return u"isometricOffAxis2Top"_ustr; + case XML_isometricOffAxis3Left: return u"isometricOffAxis3Left"_ustr; + case XML_isometricOffAxis3Right: return u"isometricOffAxis3Right"_ustr; + case XML_isometricOffAxis3Bottom: return u"isometricOffAxis3Bottom"_ustr; + case XML_isometricOffAxis4Left: return u"isometricOffAxis4Left"_ustr; + case XML_isometricOffAxis4Right: return u"isometricOffAxis4Right"_ustr; + case XML_isometricOffAxis4Bottom: return u"isometricOffAxis4Bottom"_ustr; + case XML_obliqueTopLeft: return u"obliqueTopLeft"_ustr; + case XML_obliqueTop: return u"obliqueTop"_ustr; + case XML_obliqueTopRight: return u"obliqueTopRight"_ustr; + case XML_obliqueLeft: return u"obliqueLeft"_ustr; + case XML_obliqueRight: return u"obliqueRight"_ustr; + case XML_obliqueBottomLeft: return u"obliqueBottomLeft"_ustr; + case XML_obliqueBottom: return u"obliqueBottom"_ustr; + case XML_obliqueBottomRight: return u"obliqueBottomRight"_ustr; + case XML_perspectiveFront: return u"perspectiveFront"_ustr; + case XML_perspectiveLeft: return u"perspectiveLeft"_ustr; + case XML_perspectiveRight: return u"perspectiveRight"_ustr; + case XML_perspectiveAbove: return u"perspectiveAbove"_ustr; + case XML_perspectiveBelow: return u"perspectiveBelow"_ustr; + case XML_perspectiveAboveLeftFacing: return u"perspectiveAboveLeftFacing"_ustr; + case XML_perspectiveAboveRightFacing: return u"perspectiveAboveRightFacing"_ustr; + case XML_perspectiveContrastingLeftFacing: return u"perspectiveContrastingLeftFacing"_ustr; + case XML_perspectiveContrastingRightFacing: return u"perspectiveContrastingRightFacing"_ustr; + case XML_perspectiveHeroicLeftFacing: return u"perspectiveHeroicLeftFacing"_ustr; + case XML_perspectiveHeroicRightFacing: return u"perspectiveHeroicRightFacing"_ustr; + case XML_perspectiveHeroicExtremeLeftFacing: return u"perspectiveHeroicExtremeLeftFacing"_ustr; + case XML_perspectiveHeroicExtremeRightFacing: return u"perspectiveHeroicExtremeRightFacing"_ustr; + case XML_perspectiveRelaxed: return u"perspectiveRelaxed"_ustr; + case XML_perspectiveRelaxedModerately: return u"perspectiveRelaxedModerately"_ustr; } SAL_WARN( "oox.drawingml", "Generic3DProperties::getCameraPrstName - unexpected prst type" ); return OUString(); @@ -105,33 +105,33 @@ OUString Generic3DProperties::getLightRigName( sal_Int32 nElement ) { switch( nElement ) { - case XML_legacyFlat1: return "legacyFlat1"; - case XML_legacyFlat2: return "legacyFlat2"; - case XML_legacyFlat3: return "legacyFlat3"; - case XML_legacyFlat4: return "legacyFlat4"; - case XML_legacyNormal1: return "legacyNormal1"; - case XML_legacyNormal2: return "legacyNormal2"; - case XML_legacyNormal3: return "legacyNormal3"; - case XML_legacyNormal4: return "legacyNormal4"; - case XML_legacyHarsh1: return "legacyHarsh1"; - case XML_legacyHarsh2: return "legacyHarsh2"; - case XML_legacyHarsh3: return "legacyHarsh3"; - case XML_legacyHarsh4: return "legacyHarsh4"; - case XML_threePt: return "threePt"; - case XML_balanced: return "balanced"; - case XML_soft: return "soft"; - case XML_harsh: return "harsh"; - case XML_flood: return "flood"; - case XML_contrasting: return "contrasting"; - case XML_morning: return "morning"; - case XML_sunrise: return "sunrise"; - case XML_sunset: return "sunset"; - case XML_chilly: return "chilly"; - case XML_freezing: return "freezing"; - case XML_flat: return "flat"; - case XML_twoPt: return "twoPt"; - case XML_glow: return "glow"; - case XML_brightRoom: return "brightRoom"; + case XML_legacyFlat1: return u"legacyFlat1"_ustr; + case XML_legacyFlat2: return u"legacyFlat2"_ustr; + case XML_legacyFlat3: return u"legacyFlat3"_ustr; + case XML_legacyFlat4: return u"legacyFlat4"_ustr; + case XML_legacyNormal1: return u"legacyNormal1"_ustr; + case XML_legacyNormal2: return u"legacyNormal2"_ustr; + case XML_legacyNormal3: return u"legacyNormal3"_ustr; + case XML_legacyNormal4: return u"legacyNormal4"_ustr; + case XML_legacyHarsh1: return u"legacyHarsh1"_ustr; + case XML_legacyHarsh2: return u"legacyHarsh2"_ustr; + case XML_legacyHarsh3: return u"legacyHarsh3"_ustr; + case XML_legacyHarsh4: return u"legacyHarsh4"_ustr; + case XML_threePt: return u"threePt"_ustr; + case XML_balanced: return u"balanced"_ustr; + case XML_soft: return u"soft"_ustr; + case XML_harsh: return u"harsh"_ustr; + case XML_flood: return u"flood"_ustr; + case XML_contrasting: return u"contrasting"_ustr; + case XML_morning: return u"morning"_ustr; + case XML_sunrise: return u"sunrise"_ustr; + case XML_sunset: return u"sunset"_ustr; + case XML_chilly: return u"chilly"_ustr; + case XML_freezing: return u"freezing"_ustr; + case XML_flat: return u"flat"_ustr; + case XML_twoPt: return u"twoPt"_ustr; + case XML_glow: return u"glow"_ustr; + case XML_brightRoom: return u"brightRoom"_ustr; } SAL_WARN( "oox.drawingml", "Generic3DProperties::getLightRigName - unexpected token" ); return OUString(); @@ -141,14 +141,14 @@ OUString Generic3DProperties::getLightRigDirName( sal_Int32 nElement ) { switch( nElement ) { - case XML_tl: return "tl"; - case XML_t: return "t"; - case XML_tr: return "tr"; - case XML_l: return "l"; - case XML_r: return "r"; - case XML_bl: return "bl"; - case XML_b: return "b"; - case XML_br: return "br"; + case XML_tl: return u"tl"_ustr; + case XML_t: return u"t"_ustr; + case XML_tr: return u"tr"_ustr; + case XML_l: return u"l"_ustr; + case XML_r: return u"r"_ustr; + case XML_bl: return u"bl"_ustr; + case XML_b: return u"b"_ustr; + case XML_br: return u"br"_ustr; } SAL_WARN( "oox.drawingml", "Generic3DProperties::getLightRigDirName - unexpected token" ); return OUString(); @@ -158,18 +158,18 @@ OUString Generic3DProperties::getBevelPresetTypeString( sal_Int32 nType ) { switch (nType) { - case XML_relaxedInset: return "relaxedInset"; - case XML_circle: return "circle"; - case XML_slope: return "slope"; - case XML_cross: return "cross"; - case XML_angle: return "angle"; - case XML_softRound: return "softRound"; - case XML_convex: return "convex"; - case XML_coolSlant: return "coolSlant"; - case XML_divot: return "divot"; - case XML_riblet: return "riblet"; - case XML_hardEdge: return "hardEdge"; - case XML_artDeco: return "artDeco"; + case XML_relaxedInset: return u"relaxedInset"_ustr; + case XML_circle: return u"circle"_ustr; + case XML_slope: return u"slope"_ustr; + case XML_cross: return u"cross"_ustr; + case XML_angle: return u"angle"_ustr; + case XML_softRound: return u"softRound"_ustr; + case XML_convex: return u"convex"_ustr; + case XML_coolSlant: return u"coolSlant"_ustr; + case XML_divot: return u"divot"_ustr; + case XML_riblet: return u"riblet"_ustr; + case XML_hardEdge: return u"hardEdge"_ustr; + case XML_artDeco: return u"artDeco"_ustr; } SAL_WARN( "oox.drawingml", "Generic3DProperties::getBevelPresetTypeString - unexpected token" ); return OUString(); @@ -179,22 +179,22 @@ OUString Generic3DProperties::getPresetMaterialTypeString( sal_Int32 nType ) { switch (nType) { - case XML_legacyMatte: return "legacyMatte"; - case XML_legacyPlastic: return "legacyPlastic"; - case XML_legacyMetal: return "legacyMetal"; - case XML_legacyWireframe: return "legacyWireframe"; - case XML_matte: return "matte"; - case XML_plastic: return "plastic"; - case XML_metal: return "metal"; - case XML_warmMatte: return "warmMatte"; - case XML_translucentPowder: return "translucentPowder"; - case XML_powder: return "powder"; - case XML_dkEdge: return "dkEdge"; - case XML_softEdge: return "softEdge"; - case XML_clear: return "clear"; - case XML_flat: return "flat"; - case XML_softmetal: return "softmetal"; - case XML_none: return "none"; + case XML_legacyMatte: return u"legacyMatte"_ustr; + case XML_legacyPlastic: return u"legacyPlastic"_ustr; + case XML_legacyMetal: return u"legacyMetal"_ustr; + case XML_legacyWireframe: return u"legacyWireframe"_ustr; + case XML_matte: return u"matte"_ustr; + case XML_plastic: return u"plastic"_ustr; + case XML_metal: return u"metal"_ustr; + case XML_warmMatte: return u"warmMatte"_ustr; + case XML_translucentPowder: return u"translucentPowder"_ustr; + case XML_powder: return u"powder"_ustr; + case XML_dkEdge: return u"dkEdge"_ustr; + case XML_softEdge: return u"softEdge"_ustr; + case XML_clear: return u"clear"_ustr; + case XML_flat: return u"flat"_ustr; + case XML_softmetal: return u"softmetal"_ustr; + case XML_none: return u"none"_ustr; } SAL_WARN( "oox.drawingml", "Generic3DProperties::getPresetMaterialTypeString - unexpected token" ); return OUString(); @@ -318,12 +318,12 @@ css::uno::Sequence< css::beans::PropertyValue > Generic3DProperties::getColorAtt if( sColorScheme.isEmpty() ) { // RGB color and transparency value - return { comphelper::makePropertyValue("rgbClr", rColor.getColor( rGraphicHelper, rPhClr )), - comphelper::makePropertyValue("rgbClrTransparency", rColor.getTransparency()) }; + return { comphelper::makePropertyValue(u"rgbClr"_ustr, rColor.getColor( rGraphicHelper, rPhClr )), + comphelper::makePropertyValue(u"rgbClrTransparency"_ustr, rColor.getTransparency()) }; } // scheme color with name and transformations - return { comphelper::makePropertyValue("schemeClr", sColorScheme), - comphelper::makePropertyValue("schemeClrTransformations", + return { comphelper::makePropertyValue(u"schemeClr"_ustr, sColorScheme), + comphelper::makePropertyValue(u"schemeClrTransformations"_ustr, rColor.getTransformations()) }; } diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx index 78ec4f61feeb..c04960240ec7 100644 --- a/oox/source/drawingml/table/tablecell.cxx +++ b/oox/source/drawingml/table/tablecell.cxx @@ -244,10 +244,10 @@ static void applyTableStylePart( const ::oox::core::XmlFilterBase& rFilterBase, static void applyTableCellProperties( const Reference < css::table::XCell >& rxCell, const TableCell& rTableCell ) { Reference< XPropertySet > xPropSet( rxCell, UNO_QUERY_THROW ); - xPropSet->setPropertyValue( "TextUpperDistance", Any( static_cast< sal_Int32 >( rTableCell.getTopMargin() / 360 ) ) ); - xPropSet->setPropertyValue( "TextRightDistance", Any( static_cast< sal_Int32 >( rTableCell.getRightMargin() / 360 ) ) ); - xPropSet->setPropertyValue( "TextLeftDistance", Any( static_cast< sal_Int32 >( rTableCell.getLeftMargin() / 360 ) ) ); - xPropSet->setPropertyValue( "TextLowerDistance", Any( static_cast< sal_Int32 >( rTableCell.getBottomMargin() / 360 ) ) ); + xPropSet->setPropertyValue( u"TextUpperDistance"_ustr, Any( static_cast< sal_Int32 >( rTableCell.getTopMargin() / 360 ) ) ); + xPropSet->setPropertyValue( u"TextRightDistance"_ustr, Any( static_cast< sal_Int32 >( rTableCell.getRightMargin() / 360 ) ) ); + xPropSet->setPropertyValue( u"TextLeftDistance"_ustr, Any( static_cast< sal_Int32 >( rTableCell.getLeftMargin() / 360 ) ) ); + xPropSet->setPropertyValue( u"TextLowerDistance"_ustr, Any( static_cast< sal_Int32 >( rTableCell.getBottomMargin() / 360 ) ) ); drawing::TextVerticalAdjust eVA; switch( rTableCell.getAnchorToken() ) @@ -259,7 +259,7 @@ static void applyTableCellProperties( const Reference < css::table::XCell >& rxC default: case XML_t: eVA = drawing::TextVerticalAdjust_TOP; break; } - xPropSet->setPropertyValue( "TextVerticalAdjust", Any( eVA ) ); + xPropSet->setPropertyValue( u"TextVerticalAdjust"_ustr, Any( eVA ) ); } void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle, @@ -575,7 +575,7 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, cons if ( getVertToken() == XML_eaVert ) { - xPropSet->setPropertyValue("TextWritingMode", Any(css::text::WritingMode_TB_RL)); + xPropSet->setPropertyValue(u"TextWritingMode"_ustr, Any(css::text::WritingMode_TB_RL)); } getTextBody()->insertAt( rFilterBase, xText, xAt, aTextStyleProps, pMasterTextListStyle ); @@ -596,19 +596,19 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, cons if ( getVertToken() == XML_vert ) { - xPropSet->setPropertyValue("RotateAngle", Any(short(27000))); + xPropSet->setPropertyValue(u"RotateAngle"_ustr, Any(short(27000))); } else if ( getVertToken() == XML_vert270 ) { - xPropSet->setPropertyValue("RotateAngle", Any(short(9000))); + xPropSet->setPropertyValue(u"RotateAngle"_ustr, Any(short(9000))); } else if ( getVertToken() != XML_horz && getVertToken() != XML_eaVert ) { // put the vert value in the grab bag for roundtrip const OUString aTokenName(StaticTokenMap().getUnicodeTokenName(getVertToken())); Sequence<PropertyValue> aGrabBag; - xPropSet->getPropertyValue("CellInteropGrabBag") >>= aGrabBag; - PropertyValue aPropertyValue = comphelper::makePropertyValue("mso-tcPr-vert-value", aTokenName); + xPropSet->getPropertyValue(u"CellInteropGrabBag"_ustr) >>= aGrabBag; + PropertyValue aPropertyValue = comphelper::makePropertyValue(u"mso-tcPr-vert-value"_ustr, aTokenName); if (aGrabBag.hasElements()) { sal_Int32 nLength = aGrabBag.getLength(); @@ -619,7 +619,7 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, cons { aGrabBag = { aPropertyValue }; } - xPropSet->setPropertyValue("CellInteropGrabBag", Any(aGrabBag)); + xPropSet->setPropertyValue(u"CellInteropGrabBag"_ustr, Any(aGrabBag)); } } diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx index 38f655af1e5c..ab4f4d69e1df 100644 --- a/oox/source/drawingml/table/tableproperties.cxx +++ b/oox/source/drawingml/table/tableproperties.cxx @@ -54,7 +54,7 @@ static void CreateTableRows( const uno::Reference< XTableRows >& xTableRows, con for (sal_Int32 n = 0; n < nCols; ++n) { Reference< XPropertySet > xPropSet( xIndexAccess->getByIndex( n ), UNO_QUERY_THROW ); - xPropSet->setPropertyValue( "Height", Any( static_cast< sal_Int32 >( aTableRowIter->getHeight() / 360 ) ) ); + xPropSet->setPropertyValue( u"Height"_ustr, Any( static_cast< sal_Int32 >( aTableRowIter->getHeight() / 360 ) ) ); ++aTableRowIter; } } @@ -69,7 +69,7 @@ static void CreateTableColumns( const Reference< XTableColumns >& xTableColumns, for (sal_Int32 n = 0; n < nCols; ++n) { Reference< XPropertySet > xPropSet( xIndexAccess->getByIndex( n ), UNO_QUERY_THROW ); - xPropSet->setPropertyValue( "Width", Any( static_cast< sal_Int32 >( *aTableGridIter++ / 360 ) ) ); + xPropSet->setPropertyValue( u"Width"_ustr, Any( static_cast< sal_Int32 >( *aTableGridIter++ / 360 ) ) ); } } @@ -127,7 +127,7 @@ void TableProperties::pushToPropSet(const ::oox::core::XmlFilterBase& rFilterBas const Reference<XPropertySet>& xPropSet, const TextListStylePtr& pMasterTextListStyle) { - uno::Reference<XColumnRowRange> xColumnRowRange(xPropSet->getPropertyValue("Model"), + uno::Reference<XColumnRowRange> xColumnRowRange(xPropSet->getPropertyValue(u"Model"_ustr), uno::UNO_QUERY_THROW); CreateTableColumns(xColumnRowRange->getColumns(), mvTableGrid); diff --git a/oox/source/drawingml/textbody.cxx b/oox/source/drawingml/textbody.cxx index 266ff44b22f9..9d0d2c8d2aac 100644 --- a/oox/source/drawingml/textbody.cxx +++ b/oox/source/drawingml/textbody.cxx @@ -60,7 +60,7 @@ void TextBody::insertAt( TextListStyle aMasterTextStyle(*pMasterTextListStylePtr); Reference<css::beans::XPropertySet> xPropertySet(xAt, UNO_QUERY); - float nCharHeight = xPropertySet->getPropertyValue("CharHeight").get<float>(); + float nCharHeight = xPropertySet->getPropertyValue(u"CharHeight"_ustr).get<float>(); size_t nIndex = 0; for (auto const& paragraph : maParagraphs) { @@ -145,7 +145,7 @@ void TextBody::ApplyStyleEmpty( Reference< XPropertySet > xProps(xText, UNO_QUERY); PropertyMap aioBulletList; aioBulletList.setProperty< sal_Int32 >(PROP_LeftMargin, 0); // Init bullets left margin to 0 (no bullets). - float nCharHeight = xProps->getPropertyValue("CharHeight").get<float>(); + float nCharHeight = xProps->getPropertyValue(u"CharHeight"_ustr).get<float>(); TextParagraphProperties aParaProp; aParaProp.apply(*pTextParagraphStyle); aParaProp.pushToPropSet(&rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index ceebe876e052..2508513f89d1 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -106,7 +106,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper cons // ST_PositiveCoordinate32 const sal_Int32 nSpacing = o3tl::convert(rAttribs.getInteger(XML_spcCol, 0), o3tl::Length::emu, o3tl::Length::mm100); - xProps->setPropertyValue("AutomaticDistance", css::uno::Any(nSpacing)); + xProps->setPropertyValue(u"AutomaticDistance"_ustr, css::uno::Any(nSpacing)); mrTextBodyProp.maPropertyMap.setAnyProperty(PROP_TextColumns, css::uno::Any(xCols)); } diff --git a/oox/source/drawingml/texteffectscontext.cxx b/oox/source/drawingml/texteffectscontext.cxx index 25df357f5a06..78ffe113bed3 100644 --- a/oox/source/drawingml/texteffectscontext.cxx +++ b/oox/source/drawingml/texteffectscontext.cxx @@ -127,12 +127,12 @@ void TextEffectsContext::pushAttributeToGrabBag (sal_Int32 aAttributeId, const O void TextEffectsContext::processAttributes(const AttributeList& rAttribs) { - mpGrabBagStack->push("attributes"); + mpGrabBagStack->push(u"attributes"_ustr); switch(mnCurrentElement) { case OOX_TOKEN(w14, glow): { - pushAttributeToGrabBag(OOX_TOKEN(w14, rad), "rad", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, rad), u"rad"_ustr, rAttribs); } break; case OOX_TOKEN(w14, srgbClr): @@ -148,129 +148,129 @@ void TextEffectsContext::processAttributes(const AttributeList& rAttribs) case OOX_TOKEN(w14, lumOff): case OOX_TOKEN(w14, lumMod): { - pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, val), u"val"_ustr, rAttribs); } break; case OOX_TOKEN(w14, shadow): { - pushAttributeToGrabBag(OOX_TOKEN(w14, blurRad), "blurRad", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, dist), "dist", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, dir), "dir", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, sx), "sx", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, sy), "sy", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, kx), "kx", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, ky), "ky", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, algn), "algn", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, blurRad), u"blurRad"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, dist), u"dist"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, dir), u"dir"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, sx), u"sx"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, sy), u"sy"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, kx), u"kx"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, ky), u"ky"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, algn), u"algn"_ustr, rAttribs); } break; case OOX_TOKEN(w14, reflection): { - pushAttributeToGrabBag(OOX_TOKEN(w14, blurRad), "blurRad", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, stA), "stA", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, stPos), "stPos", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, endA), "endA", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, endPos), "endPos", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, dist), "dist", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, dir), "dir", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, fadeDir), "fadeDir", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, sx), "sx", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, sy), "sy", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, kx), "kx", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, ky), "ky", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, algn), "algn", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, blurRad), u"blurRad"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, stA), u"stA"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, stPos), u"stPos"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, endA), u"endA"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, endPos), u"endPos"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, dist), u"dist"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, dir), u"dir"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, fadeDir), u"fadeDir"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, sx), u"sx"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, sy), u"sy"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, kx), u"kx"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, ky), u"ky"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, algn), u"algn"_ustr, rAttribs); } break; case OOX_TOKEN(w14, textOutline): { - pushAttributeToGrabBag(OOX_TOKEN(w14, w), "w", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, cap), "cap", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, cmpd), "cmpd", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, algn), "algn", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, w), u"w"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, cap), u"cap"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, cmpd), u"cmpd"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, algn), u"algn"_ustr, rAttribs); } break; case OOX_TOKEN(w14, prstDash): { - pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, val), u"val"_ustr, rAttribs); } break; case OOX_TOKEN(w14, gs): { - pushAttributeToGrabBag(OOX_TOKEN(w14, pos), "pos", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, pos), u"pos"_ustr, rAttribs); } break; case OOX_TOKEN(w14, lin): { - pushAttributeToGrabBag(OOX_TOKEN(w14, ang), "ang", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, scaled), "scaled", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, ang), u"ang"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, scaled), u"scaled"_ustr, rAttribs); } break; case OOX_TOKEN(w14, path): { - pushAttributeToGrabBag(OOX_TOKEN(w14, path), "path", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, path), u"path"_ustr, rAttribs); } break; case OOX_TOKEN(w14, fillToRect): { - pushAttributeToGrabBag(OOX_TOKEN(w14, l), "l", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, t), "t", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, r), "r", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, b), "b", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, l), u"l"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, t), u"t"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, r), u"r"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, b), u"b"_ustr, rAttribs); } break; case OOX_TOKEN(w14, miter): { - pushAttributeToGrabBag(OOX_TOKEN(w14, lim), "lim", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, lim), u"lim"_ustr, rAttribs); } break; case OOX_TOKEN(w14, camera): { - pushAttributeToGrabBag(OOX_TOKEN(w14, prst), "prst", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, prst), u"prst"_ustr, rAttribs); } break; case OOX_TOKEN(w14, lightRig): { - pushAttributeToGrabBag(OOX_TOKEN(w14, rig), "rig", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, dir), "dir", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, rig), u"rig"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, dir), u"dir"_ustr, rAttribs); } break; case OOX_TOKEN(w14, rot): { - pushAttributeToGrabBag(OOX_TOKEN(w14, lat), "lat", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, lon), "lon", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, rev), "rev", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, lat), u"lat"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, lon), u"lon"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, rev), u"rev"_ustr, rAttribs); } break; case OOX_TOKEN(w14, props3d): { - pushAttributeToGrabBag(OOX_TOKEN(w14, extrusionH), "extrusionH", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, contourW), "contourW", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, prstMaterial), "prstMaterial", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, extrusionH), u"extrusionH"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, contourW), u"contourW"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, prstMaterial), u"prstMaterial"_ustr, rAttribs); } break; case OOX_TOKEN(w14, bevelT): case OOX_TOKEN(w14, bevelB): { - pushAttributeToGrabBag(OOX_TOKEN(w14, w), "w", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, h), "h", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, prst), "prst", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, w), u"w"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, h), u"h"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, prst), u"prst"_ustr, rAttribs); } break; case OOX_TOKEN(w14, ligatures): case OOX_TOKEN(w14, numForm): case OOX_TOKEN(w14, numSpacing): { - pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, val), u"val"_ustr, rAttribs); } break; case OOX_TOKEN(w14, styleSet): { - pushAttributeToGrabBag(OOX_TOKEN(w14, id), "id", rAttribs); - pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, id), u"id"_ustr, rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, val), u"val"_ustr, rAttribs); } break; case OOX_TOKEN(w14, cntxtAlts): { - pushAttributeToGrabBag(OOX_TOKEN(w14, val), "val", rAttribs); + pushAttributeToGrabBag(OOX_TOKEN(w14, val), u"val"_ustr, rAttribs); } break; default: diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx index ce38159c5e99..1c9641996cdd 100644 --- a/oox/source/drawingml/textfield.cxx +++ b/oox/source/drawingml/textfield.cxx @@ -72,7 +72,7 @@ void lclCreateTextFields( std::vector< Reference< XTextField > > & aFields, { if (o3tl::starts_with(p, u"'")) { - xIface = xFactory->createInstance( "com.sun.star.text.TextField.Custom" ); + xIface = xFactory->createInstance( u"com.sun.star.text.TextField.Custom"_ustr ); aFields.emplace_back( xIface, UNO_QUERY ); return; } @@ -80,23 +80,23 @@ void lclCreateTextFields( std::vector< Reference< XTextField > > & aFields, SvxDateFormat eDateFormat = TextField::getLODateFormat(sType); if (eDateFormat != SvxDateFormat::AppDefault) { - xIface = xFactory->createInstance( "com.sun.star.text.TextField.DateTime" ); + xIface = xFactory->createInstance( u"com.sun.star.text.TextField.DateTime"_ustr ); aFields.emplace_back( xIface, UNO_QUERY ); Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW ); - xProps->setPropertyValue("NumberFormat", Any(static_cast<sal_Int32>(eDateFormat))); - xProps->setPropertyValue("IsDate", Any(true)); - xProps->setPropertyValue("IsFixed", Any(false)); + xProps->setPropertyValue(u"NumberFormat"_ustr, Any(static_cast<sal_Int32>(eDateFormat))); + xProps->setPropertyValue(u"IsDate"_ustr, Any(true)); + xProps->setPropertyValue(u"IsFixed"_ustr, Any(false)); } SvxTimeFormat eTimeFormat = TextField::getLOTimeFormat(sType); if (eTimeFormat != SvxTimeFormat::AppDefault) { - xIface = xFactory->createInstance( "com.sun.star.text.TextField.DateTime" ); + xIface = xFactory->createInstance( u"com.sun.star.text.TextField.DateTime"_ustr ); aFields.emplace_back( xIface, UNO_QUERY ); Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW ); - xProps->setPropertyValue("NumberFormat", Any(static_cast<sal_Int32>(eTimeFormat))); - xProps->setPropertyValue("IsDate", Any(false)); - xProps->setPropertyValue("IsFixed", Any(false)); + xProps->setPropertyValue(u"NumberFormat"_ustr, Any(static_cast<sal_Int32>(eTimeFormat))); + xProps->setPropertyValue(u"IsDate"_ustr, Any(false)); + xProps->setPropertyValue(u"IsFixed"_ustr, Any(false)); } } catch(const Exception &) @@ -106,44 +106,44 @@ void lclCreateTextFields( std::vector< Reference< XTextField > > & aFields, } else if ( sType == u"slidenum" ) { - xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageNumber" ); + xIface = xFactory->createInstance( u"com.sun.star.text.TextField.PageNumber"_ustr ); aFields.emplace_back( xIface, UNO_QUERY ); } else if ( sType == u"slidecount" ) { - xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageCount" ); + xIface = xFactory->createInstance( u"com.sun.star.text.TextField.PageCount"_ustr ); aFields.emplace_back( xIface, UNO_QUERY ); } else if ( sType == u"slidename" ) { - xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageName" ); + xIface = xFactory->createInstance( u"com.sun.star.text.TextField.PageName"_ustr ); aFields.emplace_back( xIface, uno::UNO_QUERY ); } else if ( o3tl::starts_with(sType, u"file") ) { int idx = o3tl::toInt32(sType.substr(4)); - xIface = xFactory->createInstance( "com.sun.star.text.TextField.FileName" ); + xIface = xFactory->createInstance( u"com.sun.star.text.TextField.FileName"_ustr ); aFields.emplace_back( xIface, UNO_QUERY ); Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW ); switch( idx ) { case 1: // Path - xProps->setPropertyValue("FileFormat", Any(sal_Int16(1))); + xProps->setPropertyValue(u"FileFormat"_ustr, Any(sal_Int16(1))); break; case 2: // File name without extension - xProps->setPropertyValue("FileFormat", Any(sal_Int16(2))); + xProps->setPropertyValue(u"FileFormat"_ustr, Any(sal_Int16(2))); break; case 3: // File name with extension - xProps->setPropertyValue("FileFormat", Any(sal_Int16(3))); + xProps->setPropertyValue(u"FileFormat"_ustr, Any(sal_Int16(3))); break; default: // Path/File name - xProps->setPropertyValue("FileFormat", Any(sal_Int16(0))); + xProps->setPropertyValue(u"FileFormat"_ustr, Any(sal_Int16(0))); } } else if( sType == u"author" ) { - xIface = xFactory->createInstance( "com.sun.star.text.TextField.Author" ); + xIface = xFactory->createInstance( u"com.sun.star.text.TextField.Author"_ustr ); aFields.emplace_back( xIface, UNO_QUERY ); } } @@ -189,7 +189,7 @@ sal_Int32 TextField::insertAt( } else { - xText->insertString( xAt, " ", false ); + xText->insertString( xAt, u" "_ustr, false ); } xText->insertTextContent( xAt, xContent, false ); } diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx index 860a9a4adf57..d5d4a59e5494 100644 --- a/oox/source/drawingml/textparagraph.cxx +++ b/oox/source/drawingml/textparagraph.cxx @@ -179,7 +179,7 @@ void TextParagraph::insertAt( // If the shape is Stacked then set Stacked into the TextParagraphProperties Reference<XPropertySet> xProps2(xText, UNO_QUERY); - sal_Int16 nWritingMode = xProps2->getPropertyValue("WritingMode").get<sal_Int16>(); + sal_Int16 nWritingMode = xProps2->getPropertyValue(u"WritingMode"_ustr).get<sal_Int16>(); if (nWritingMode == text::WritingMode2::STACKED) { aParaProp.getTextParagraphPropertyMap().setProperty(PROP_WritingMode, nWritingMode); @@ -192,7 +192,7 @@ void TextParagraph::insertAt( // empty paragraphs do not have bullets in ppt if ( !nParagraphSize ) { - xProps->setPropertyValue( "NumberingLevel", Any( static_cast< sal_Int16 >( -1 ) ) ); + xProps->setPropertyValue( u"NumberingLevel"_ustr, Any( static_cast< sal_Int16 >( -1 ) ) ); } // FIXME this is causing a lot of disruption (ie does not work). I wonder what to do -- Hub diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index f011878f3dbf..54c1d23c7b1a 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -89,19 +89,19 @@ void BulletList::setNone( ) void BulletList::setSuffixParenBoth() { - msNumberingSuffix <<= OUString( ")" ); - msNumberingPrefix <<= OUString( "(" ); + msNumberingSuffix <<= u")"_ustr; + msNumberingPrefix <<= u"("_ustr; } void BulletList::setSuffixParenRight() { - msNumberingSuffix <<= OUString( ")" ); + msNumberingSuffix <<= u")"_ustr; msNumberingPrefix <<= OUString(); } void BulletList::setSuffixPeriod() { - msNumberingSuffix <<= OUString( "." ); + msNumberingSuffix <<= u"."_ustr; msNumberingPrefix <<= OUString(); } @@ -113,7 +113,7 @@ void BulletList::setSuffixNone() void BulletList::setSuffixMinusRight() { - msNumberingSuffix <<= OUString( "-" ); + msNumberingSuffix <<= u"-"_ustr; msNumberingPrefix <<= OUString(); } @@ -535,7 +535,7 @@ float TextParagraphProperties::getCharHeightPoints( float fDefault ) const // debugging pptx import problems. void TextParagraphProperties::dump() const { - Reference< css::drawing::XShape > xShape( oox::ppt::PowerPointImport::mpDebugFilterBase->getModelFactory()->createInstance( "com.sun.star.presentation.TitleTextShape" ), UNO_QUERY ); + Reference< css::drawing::XShape > xShape( oox::ppt::PowerPointImport::mpDebugFilterBase->getModelFactory()->createInstance( u"com.sun.star.presentation.TitleTextShape"_ustr ), UNO_QUERY ); Reference< css::text::XText > xText( xShape, UNO_QUERY ); Reference< css::drawing::XDrawPage > xDebugPage(ppt::SlidePersist::mxDebugPage.get(), UNO_QUERY); @@ -544,7 +544,7 @@ void TextParagraphProperties::dump() const PropertyMap emptyMap; - xText->setString( "debug" ); + xText->setString( u"debug"_ustr ); Reference< css::text::XTextCursor > xStart = xText->createTextCursor(); xStart->gotoEnd( true ); Reference< XPropertySet > xPropSet( xStart, UNO_QUERY ); diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index 2146d9ed04b0..138bfe395621 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -56,14 +56,14 @@ double lclGetGraphicAspectRatio( const Reference< XGraphic >& rxGraphic ) double fRatio = 1.0; Reference< com::sun::star::beans::XPropertySet > xGraphicPropertySet( rxGraphic, UNO_QUERY_THROW ); css::awt::Size aSizeHmm( 0, 0 ); - xGraphicPropertySet->getPropertyValue( "Size100thMM" ) >>= aSizeHmm; + xGraphicPropertySet->getPropertyValue( u"Size100thMM"_ustr ) >>= aSizeHmm; if( aSizeHmm.Width > 0 && aSizeHmm.Height > 0) return double(aSizeHmm.Width)/double(aSizeHmm.Height); else { css::awt::Size aSourceSizePixel( 0, 0 ); - xGraphicPropertySet->getPropertyValue( "SizePixel" ) >>= aSourceSizePixel; + xGraphicPropertySet->getPropertyValue( u"SizePixel"_ustr ) >>= aSourceSizePixel; if( aSourceSizePixel.Width > 0 && aSourceSizePixel.Height > 0 ) return double(aSourceSizePixel.Width)/double(aSourceSizePixel.Height); diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx index 3eca13d4ad8f..faee78f78244 100644 --- a/oox/source/drawingml/textrun.cxx +++ b/oox/source/drawingml/textrun.cxx @@ -65,10 +65,10 @@ sal_Int32 TextRun::insertAt( PropertySet aPropSet( xStart ); Reference<XPropertyState> xState(xStart, UNO_QUERY); - Any aOldFontName = xState->getPropertyDefault("CharFontName"); - Any aOldFontPitch = xState->getPropertyDefault("CharFontPitch"); - Any aOldFontFamily = xState->getPropertyDefault("CharFontFamily"); - Any aOldFontCharSet = xState->getPropertyDefault("CharFontCharSet"); + Any aOldFontName = xState->getPropertyDefault(u"CharFontName"_ustr); + Any aOldFontPitch = xState->getPropertyDefault(u"CharFontPitch"_ustr); + Any aOldFontFamily = xState->getPropertyDefault(u"CharFontFamily"_ustr); + Any aOldFontCharSet = xState->getPropertyDefault(u"CharFontCharSet"_ustr); TextCharacterProperties aTextCharacterProps( rTextCharacterStyle ); @@ -146,7 +146,7 @@ sal_Int32 TextRun::insertAt( { SAL_WARN("oox", "OOX: URL field" ); Reference< XMultiServiceFactory > xFactory( rFilterBase.getModel(), UNO_QUERY ); - Reference< XTextField > xField( xFactory->createInstance( "com.sun.star.text.TextField.URL" ), UNO_QUERY ); + Reference< XTextField > xField( xFactory->createInstance( u"com.sun.star.text.TextField.URL"_ustr ), UNO_QUERY ); if( xField.is() ) { Reference< XTextCursor > xTextFieldCursor = xText->createTextCursor(); |