diff options
30 files changed, 219 insertions, 220 deletions
diff --git a/include/oox/drawingml/shapepropertymap.hxx b/include/oox/drawingml/shapepropertymap.hxx index a9e4ea405273..11670c02edf4 100644 --- a/include/oox/drawingml/shapepropertymap.hxx +++ b/include/oox/drawingml/shapepropertymap.hxx @@ -128,7 +128,7 @@ public: } bool setProperty(ShapeProperty ePropId, const ::Color& rValue) { - return setAnyProperty(ePropId, css::uno::makeAny(rValue)); + return setAnyProperty(ePropId, css::uno::Any(rValue)); } using PropertyMap::setAnyProperty; diff --git a/include/oox/helper/propertyset.hxx b/include/oox/helper/propertyset.hxx index f729a29fb17b..676ec4cebf82 100644 --- a/include/oox/helper/propertyset.hxx +++ b/include/oox/helper/propertyset.hxx @@ -108,7 +108,7 @@ public: bool setProperty( sal_Int32 nPropId, const Type& rValue ) { return setAnyProperty( nPropId, css::uno::Any( rValue ) ); } bool setProperty( sal_Int32 nPropId, ::Color rValue ) - { return setAnyProperty( nPropId, css::uno::makeAny( rValue ) ); } + { return setAnyProperty( nPropId, css::uno::Any( rValue ) ); } /** Puts the passed properties into the property set. Tries to use the XMultiPropertySet interface. @param rPropNames The property names. MUST be ordered alphabetically. diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 73e6d90e1649..e8e1a138984b 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -1224,7 +1224,7 @@ void XmlFilterBase::exportCustomFragments() { const OUString aType = comphelper::OFOPXMLHelper::GetContentTypeByName(aContentTypes, aFilename); const OUString aContentType = (aType.getLength() ? aType : OUString("application/octet-stream")); - xProps->setPropertyValue("MediaType", uno::makeAny(aContentType)); + xProps->setPropertyValue("MediaType", uno::Any(aContentType)); } } } diff --git a/oox/source/docprop/docprophandler.cxx b/oox/source/docprop/docprophandler.cxx index c2609a8227d8..9a23991a47c9 100644 --- a/oox/source/docprop/docprophandler.cxx +++ b/oox/source/docprop/docprophandler.cxx @@ -373,7 +373,7 @@ void SAL_CALL OOXMLDocPropHandler::endFastElement( ::sal_Int32 ) // the property has string type, so it is valid // even with an empty value - characters() has // not been called in that case - AddCustomProperty(uno::makeAny(OUString())); + AddCustomProperty(uno::Any(OUString())); } break; } @@ -412,27 +412,27 @@ void SAL_CALL OOXMLDocPropHandler::characters( const OUString& aChars ) { case COREPR_TOKEN( category ): m_aCustomPropertyName = "OOXMLCorePropertyCategory"; - AddCustomProperty( uno::makeAny( aChars ) ); // the property has string type + AddCustomProperty( uno::Any( aChars ) ); // the property has string type break; case COREPR_TOKEN( contentStatus ): m_aCustomPropertyName = "OOXMLCorePropertyContentStatus"; - AddCustomProperty( uno::makeAny( aChars ) ); // the property has string type + AddCustomProperty( uno::Any( aChars ) ); // the property has string type break; case COREPR_TOKEN( contentType ): m_aCustomPropertyName = "OOXMLCorePropertyContentType"; - AddCustomProperty( uno::makeAny( aChars ) ); // the property has string type + AddCustomProperty( uno::Any( aChars ) ); // the property has string type break; case DC_TOKEN( identifier ): m_aCustomPropertyName = "OOXMLCorePropertyIdentifier"; - AddCustomProperty( uno::makeAny( aChars ) ); // the property has string type + AddCustomProperty( uno::Any( aChars ) ); // the property has string type break; case COREPR_TOKEN( version ): m_aCustomPropertyName = "OOXMLCorePropertyVersion"; - AddCustomProperty( uno::makeAny( aChars ) ); // the property has string type + AddCustomProperty( uno::Any( aChars ) ); // the property has string type break; case DCT_TOKEN( created ): @@ -536,28 +536,28 @@ void SAL_CALL OOXMLDocPropHandler::characters( const OUString& aChars ) m_aCustomPropertyName = "HyperlinksChanged"; // tdf#103987 Don't create custom property if the value is default if ( aChars.toBoolean() ) - AddCustomProperty( uno::makeAny( aChars.toBoolean() ) ); // the property has boolean type + AddCustomProperty( uno::Any( aChars.toBoolean() ) ); // the property has boolean type break; case EXTPR_TOKEN( LinksUpToDate ): m_aCustomPropertyName = "LinksUpToDate"; // tdf#103987 Don't create custom property if the value is default if ( aChars.toBoolean() ) - AddCustomProperty( uno::makeAny( aChars.toBoolean() ) ); // the property has boolean type + AddCustomProperty( uno::Any( aChars.toBoolean() ) ); // the property has boolean type break; case EXTPR_TOKEN( ScaleCrop ): m_aCustomPropertyName = "ScaleCrop"; // tdf#103987 Don't create custom property if the value is default if ( aChars.toBoolean() ) - AddCustomProperty( uno::makeAny( aChars.toBoolean() ) ); // the property has boolean type + AddCustomProperty( uno::Any( aChars.toBoolean() ) ); // the property has boolean type break; case EXTPR_TOKEN( SharedDoc ): m_aCustomPropertyName = "ShareDoc"; // tdf#103987 Don't create custom property if the value is default if ( aChars.toBoolean() ) - AddCustomProperty( uno::makeAny( aChars.toBoolean() ) ); // the property has boolean type + AddCustomProperty( uno::Any( aChars.toBoolean() ) ); // the property has boolean type break; case EXTPR_TOKEN( DocSecurity ): @@ -567,60 +567,60 @@ void SAL_CALL OOXMLDocPropHandler::characters( const OUString& aChars ) // 1 - password protected, 2 - recommended read-only // 4 - enforced read-only, 8 - locked for annotation if ( aChars.toInt32() != 0 ) - AddCustomProperty( uno::makeAny( aChars.toInt32() ) ); // the property has sal_Int32 type + AddCustomProperty( uno::Any( aChars.toInt32() ) ); // the property has sal_Int32 type break; case EXTPR_TOKEN( HiddenSlides ): m_aCustomPropertyName = "HiddenSlides"; // tdf#103987 Don't create custom property if the value is default if ( aChars.toInt32() != 0 ) - AddCustomProperty( uno::makeAny( aChars.toInt32() ) ); // the property has sal_Int32 type + AddCustomProperty( uno::Any( aChars.toInt32() ) ); // the property has sal_Int32 type break; case EXTPR_TOKEN( MMClips ): m_aCustomPropertyName = "MMClips"; // tdf#103987 Don't create custom property if the value is default if ( aChars.toInt32() != 0 ) - AddCustomProperty( uno::makeAny( aChars.toInt32() ) ); // the property has sal_Int32 type + AddCustomProperty( uno::Any( aChars.toInt32() ) ); // the property has sal_Int32 type break; case EXTPR_TOKEN( Notes ): m_aCustomPropertyName = "Notes"; // tdf#103987 Don't create custom property if the value is default if ( aChars.toInt32() != 0 ) - AddCustomProperty( uno::makeAny( aChars.toInt32() ) ); // the property has sal_Int32 type + AddCustomProperty( uno::Any( aChars.toInt32() ) ); // the property has sal_Int32 type break; case EXTPR_TOKEN( Slides ): m_aCustomPropertyName = "Slides"; // tdf#103987 Don't create custom property if the value is default if ( aChars.toInt32() != 0 ) - AddCustomProperty( uno::makeAny( aChars.toInt32() ) ); // the property has sal_Int32 type + AddCustomProperty( uno::Any( aChars.toInt32() ) ); // the property has sal_Int32 type break; case EXTPR_TOKEN( AppVersion ): m_aCustomPropertyName = "AppVersion"; - AddCustomProperty( uno::makeAny( aChars ) ); // the property has string type + AddCustomProperty( uno::Any( aChars ) ); // the property has string type break; case EXTPR_TOKEN( Company ): m_aCustomPropertyName = "Company"; - AddCustomProperty( uno::makeAny( aChars ) ); // the property has string type + AddCustomProperty( uno::Any( aChars ) ); // the property has string type break; case EXTPR_TOKEN( HyperlinkBase ): m_aCustomPropertyName = "HyperlinkBase"; - AddCustomProperty( uno::makeAny( aChars ) ); // the property has string type + AddCustomProperty( uno::Any( aChars ) ); // the property has string type break; case EXTPR_TOKEN( Manager ): m_aCustomPropertyName = "Manager"; - AddCustomProperty( uno::makeAny( aChars ) ); // the property has string type + AddCustomProperty( uno::Any( aChars ) ); // the property has string type break; case EXTPR_TOKEN( PresentationFormat ): m_aCustomPropertyName = "PresentationFormat"; - AddCustomProperty( uno::makeAny( aChars ) ); // the property has string type + AddCustomProperty( uno::Any( aChars ) ); // the property has string type break; case EXTPR_TOKEN( Lines ): @@ -643,42 +643,42 @@ void SAL_CALL OOXMLDocPropHandler::characters( const OUString& aChars ) switch( m_nType ) { case VT_TOKEN( bool ): - AddCustomProperty( uno::makeAny( aChars.toBoolean() ) ); + AddCustomProperty( uno::Any( aChars.toBoolean() ) ); break; case VT_TOKEN( bstr ): case VT_TOKEN( lpstr ): case VT_TOKEN( lpwstr ): // the property has string type - AddCustomProperty( uno::makeAny( AttributeConversion::decodeXString( aChars ) ) ); + AddCustomProperty( uno::Any( AttributeConversion::decodeXString( aChars ) ) ); m_CustomStringPropertyState = INSERTED; break; case VT_TOKEN( date ): case VT_TOKEN( filetime ): - AddCustomProperty( uno::makeAny( GetDateTimeFromW3CDTF( aChars ) ) ); + AddCustomProperty( uno::Any( GetDateTimeFromW3CDTF( aChars ) ) ); break; case VT_TOKEN( i1 ): case VT_TOKEN( i2 ): - AddCustomProperty( uno::makeAny( static_cast<sal_Int16>(aChars.toInt32()) ) ); + AddCustomProperty( uno::Any( static_cast<sal_Int16>(aChars.toInt32()) ) ); break; case VT_TOKEN( i4 ): case VT_TOKEN( int ): - AddCustomProperty( uno::makeAny( aChars.toInt32() ) ); + AddCustomProperty( uno::Any( aChars.toInt32() ) ); break; case VT_TOKEN( i8 ): - AddCustomProperty( uno::makeAny( aChars.toInt64() ) ); + AddCustomProperty( uno::Any( aChars.toInt64() ) ); break; case VT_TOKEN( r4 ): - AddCustomProperty( uno::makeAny( aChars.toFloat() ) ); + AddCustomProperty( uno::Any( aChars.toFloat() ) ); break; case VT_TOKEN( r8 ): - AddCustomProperty( uno::makeAny( aChars.toDouble() ) ); + AddCustomProperty( uno::Any( aChars.toDouble() ) ); break; default: diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx index d33e0086cc08..774d784a6eb7 100644 --- a/oox/source/drawingml/chart/chartspaceconverter.cxx +++ b/oox/source/drawingml/chart/chartspaceconverter.cxx @@ -44,7 +44,7 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::UNO_QUERY_THROW; -using ::com::sun::star::uno::makeAny; +using ::com::sun::star::uno::Any; using ::com::sun::star::drawing::XDrawPageSupplier; using ::com::sun::star::drawing::XShapes; using ::com::sun::star::chart2::XDiagram; @@ -299,7 +299,7 @@ void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExtern { Reference< css::chart::XChartDocument > xChartDoc( getChartDocument(), UNO_QUERY ); PropertySet aProps( xChartDoc->getDiagram() ); - aProps.setProperty( PROP_ExternalData , uno::makeAny(mrModel.maSheetPath) ); + aProps.setProperty( PROP_ExternalData , uno::Any(mrModel.maSheetPath) ); } } diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index 07b8682974f8..44b3d3a3f0ea 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -1123,9 +1123,9 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo // Setting "LinkNumberFormatToSource" does not really work, at least not for axis :-/ if (!bAxis) - rPropSet.setProperty(PROP_LinkNumberFormatToSource, makeAny(rNumberFormat.mbSourceLinked)); + rPropSet.setProperty(PROP_LinkNumberFormatToSource, Any(rNumberFormat.mbSourceLinked)); else - rPropSet.setProperty(PROP_LinkNumberFormatToSource, makeAny(rNumberFormat.maFormatCode.isEmpty())); + rPropSet.setProperty(PROP_LinkNumberFormatToSource, Any(rNumberFormat.maFormatCode.isEmpty())); } void ObjectFormatter::convertAutomaticFill( PropertySet& rPropSet, ObjectType eObjType, sal_Int32 nSeriesIdx ) diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 72253723f91c..3ace8e9a703e 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -203,12 +203,12 @@ void importBorderProperties( PropertySet& rPropSet, Shape& rShape, const Graphic if (rLP.moLineWidth.has()) { sal_Int32 nWidth = convertEmuToHmm(rLP.moLineWidth.get()); - rPropSet.setProperty(PROP_LabelBorderWidth, uno::makeAny(nWidth)); - rPropSet.setProperty(PROP_LabelBorderStyle, uno::makeAny(drawing::LineStyle_SOLID)); + rPropSet.setProperty(PROP_LabelBorderWidth, uno::Any(nWidth)); + rPropSet.setProperty(PROP_LabelBorderStyle, uno::Any(drawing::LineStyle_SOLID)); } const Color& aColor = rLP.maLineFill.maFillColor; ::Color nColor = aColor.getColor(rGraphicHelper); - rPropSet.setProperty(PROP_LabelBorderColor, uno::makeAny(nColor)); + rPropSet.setProperty(PROP_LabelBorderColor, uno::Any(nColor)); } void importFillProperties( PropertySet& rPropSet, Shape& rShape, const GraphicHelper& rGraphicHelper, ModelObjectHelper& rModelObjHelper ) @@ -221,7 +221,7 @@ void importFillProperties( PropertySet& rPropSet, Shape& rShape, const GraphicHe const Color& aColor = rFP.maFillColor; ::Color nColor = aColor.getColor(rGraphicHelper); - rPropSet.setProperty(PROP_LabelFillColor, uno::makeAny(nColor)); + rPropSet.setProperty(PROP_LabelFillColor, uno::Any(nColor)); } else if(rFP.moFillType.has() && rFP.moFillType.get() == XML_pattFill) { @@ -236,7 +236,7 @@ void importFillProperties( PropertySet& rPropSet, Shape& rShape, const GraphicHe const Color& aColor = rFP.maPatternProps.maPattBgColor; ::Color nColor = aColor.getColor(rGraphicHelper); - rPropSet.setProperty(PROP_LabelFillColor, uno::makeAny(nColor)); + rPropSet.setProperty(PROP_LabelFillColor, uno::Any(nColor)); } } @@ -384,7 +384,7 @@ void DataLabelConverter::convertFromModel( const Reference< XDataSeries >& rxDat } } - aPropSet.setProperty( PROP_CustomLabelFields, makeAny( aSequence ) ); + aPropSet.setProperty( PROP_CustomLabelFields, Any( aSequence ) ); convertTextProperty(aPropSet, getFormatter(), mrModel.mxText->mxTextBody); } } diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index 113c7fea7a9e..91684393c627 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -255,7 +255,7 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram ) aPropSet.setProperty( PROP_Expansion, eLegendExpand ); if (bTopRight && !bManualLayout) - aPropSet.setProperty( PROP_RelativePosition , makeAny(eRelPos)); + aPropSet.setProperty( PROP_RelativePosition , Any(eRelPos)); aPropSet.setProperty(PROP_Overlay, mrModel.mbOverlay); diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index 2ccc67805945..efba958fa0e4 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -209,7 +209,7 @@ void Diagram::syncDiagramFontHeights() uno::Reference<beans::XPropertySet> xPropertySet(rShapePair.second, uno::UNO_QUERY); if (xPropertySet.is()) { - xPropertySet->setPropertyValue("TextFitToSizeScale", uno::makeAny(nMinScale)); + xPropertySet->setPropertyValue("TextFitToSizeScale", uno::Any(nMinScale)); } } } diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index ade146ad7bd6..4b0eafe97fee 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -630,9 +630,9 @@ static void lcl_createPresetShape(const uno::Reference<drawing::XShape>& xShape, } // Set properties - xSet->setPropertyValue( UNO_NAME_TEXT_AUTOGROWHEIGHT, uno::makeAny( false ) ); - xSet->setPropertyValue( UNO_NAME_TEXT_AUTOGROWWIDTH, uno::makeAny( false ) ); - xSet->setPropertyValue( UNO_NAME_FILLSTYLE, uno::makeAny( drawing::FillStyle_SOLID ) ); + xSet->setPropertyValue( UNO_NAME_TEXT_AUTOGROWHEIGHT, uno::Any( false ) ); + xSet->setPropertyValue( UNO_NAME_TEXT_AUTOGROWWIDTH, uno::Any( false ) ); + xSet->setPropertyValue( UNO_NAME_FILLSTYLE, uno::Any( drawing::FillStyle_SOLID ) ); // ToDo: Old binary WordArt does not allow different styles for different paragraphs, so it // was not necessary to examine all paragraphs. Solution for DrawingML is needed. @@ -646,33 +646,33 @@ static void lcl_createPresetShape(const uno::Reference<drawing::XShape>& xShape, if (pProperties.moBold.has() && pProperties.moBold.get()) { - xSet->setPropertyValue( UNO_NAME_CHAR_WEIGHT, uno::makeAny( css::awt::FontWeight::BOLD ) ); + xSet->setPropertyValue( UNO_NAME_CHAR_WEIGHT, uno::Any( css::awt::FontWeight::BOLD ) ); } if (pProperties.moItalic.has() && pProperties.moItalic.get()) { - xSet->setPropertyValue( UNO_NAME_CHAR_POSTURE, uno::makeAny( css::awt::FontSlant::FontSlant_ITALIC ) ); + xSet->setPropertyValue( UNO_NAME_CHAR_POSTURE, uno::Any( css::awt::FontSlant::FontSlant_ITALIC ) ); } if (pProperties.moHeight.has()) { sal_Int32 nHeight = pProperties.moHeight.get() / 100; - xSet->setPropertyValue( UNO_NAME_CHAR_HEIGHT, uno::makeAny( nHeight ) ); + xSet->setPropertyValue( UNO_NAME_CHAR_HEIGHT, uno::Any( nHeight ) ); } if (pProperties.maFillProperties.maFillColor.isUsed()) { const sal_Int32 aFillColor = static_cast<sal_Int32>( pProperties.maFillProperties.maFillColor.getColor( rGraphicHelper ).GetRGBColor() ); - xSet->setPropertyValue( UNO_NAME_FILLCOLOR, uno::makeAny( aFillColor ) ); + xSet->setPropertyValue( UNO_NAME_FILLCOLOR, uno::Any( aFillColor ) ); } else { // Set default color - xSet->setPropertyValue( UNO_NAME_FILLCOLOR, uno::makeAny( COL_BLACK ) ); + xSet->setPropertyValue( UNO_NAME_FILLCOLOR, uno::Any( COL_BLACK ) ); } { ParagraphAdjust eAdjust = ParagraphAdjust_LEFT; if (pParagraph->getProperties().getParaAdjust()) eAdjust = *pParagraph->getProperties().getParaAdjust(); - xSet->setPropertyValue( "ParaAdjust", uno::makeAny( eAdjust ) ); + xSet->setPropertyValue( "ParaAdjust", uno::Any( eAdjust ) ); SdrObject* pShape = SdrObject::getSdrObjectFromXShape( xShape ); assert(pShape); SdrTextHorzAdjust eHorzAdjust = lcl_convertAdjust( eAdjust ); @@ -722,7 +722,7 @@ static void lcl_createPresetShape(const uno::Reference<drawing::XShape>& xShape, // Apply geometry properties uno::Sequence<beans::PropertyValue> aPropertyValues( comphelper::InitPropertySequence( - { { sTextPath, uno::makeAny( true ) }, + { { sTextPath, uno::Any( true ) }, { "TextPathMode", uno::Any( drawing::EnhancedCustomShapeTextPathMode_PATH ) }, { "ScaleX", uno::Any(bScaleX) } } ) ); @@ -741,7 +741,7 @@ static void lcl_createPresetShape(const uno::Reference<drawing::XShape>& xShape, xSet->setPropertyValue( "CustomShapeGeometry", - uno::makeAny(comphelper::containerToSequence(aGeomPropVec))); + uno::Any(comphelper::containerToSequence(aGeomPropVec))); } // Some helper methods for createAndInsert @@ -1147,7 +1147,7 @@ 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::makeAny(name.GetHexName())); + xSet->setPropertyValue("CLSID", uno::Any(name.GetHexName())); uno::Reference<embed::XEmbeddedObject> const xObj( xSet->getPropertyValue("EmbeddedObject"), uno::UNO_QUERY); if (xObj.is()) @@ -1185,14 +1185,14 @@ Reference< XShape > const & Shape::createAndInsert( // Store style-related properties to InteropGrabBag to be able to export them back uno::Sequence<beans::PropertyValue> aProperties = comphelper::InitPropertySequence( { - {"SchemeClr", uno::makeAny(pLineRef->maPhClr.getSchemeColorName())}, - {"Idx", uno::makeAny(pLineRef->mnThemedIdx)}, - {"Color", uno::makeAny(nLinePhClr)}, - {"LineStyle", uno::makeAny(aLineProperties.getLineStyle())}, - {"LineCap", uno::makeAny(aLineProperties.getLineCap())}, - {"LineJoint", uno::makeAny(aLineProperties.getLineJoint())}, - {"LineWidth", uno::makeAny(aLineProperties.getLineWidth())}, - {"Transformations", uno::makeAny(pLineRef->maPhClr.getTransformations())} + {"SchemeClr", uno::Any(pLineRef->maPhClr.getSchemeColorName())}, + {"Idx", uno::Any(pLineRef->mnThemedIdx)}, + {"Color", uno::Any(nLinePhClr)}, + {"LineStyle", uno::Any(aLineProperties.getLineStyle())}, + {"LineCap", uno::Any(aLineProperties.getLineCap())}, + {"LineJoint", uno::Any(aLineProperties.getLineJoint())}, + {"LineWidth", uno::Any(aLineProperties.getLineWidth())}, + {"Transformations", uno::Any(pLineRef->maPhClr.getTransformations())} }); putPropertyToGrabBag( "StyleLnRef", Any( aProperties ) ); } @@ -1209,10 +1209,10 @@ Reference< XShape > const & Shape::createAndInsert( { uno::Sequence<beans::PropertyValue> aProperties = comphelper::InitPropertySequence( { - {"SchemeClr", uno::makeAny(sColorScheme)}, - {"Idx", uno::makeAny(pFillRef->mnThemedIdx)}, - {"Color", uno::makeAny(nFillPhClr)}, - {"Transformations", uno::makeAny(pFillRef->maPhClr.getTransformations())} + {"SchemeClr", uno::Any(sColorScheme)}, + {"Idx", uno::Any(pFillRef->mnThemedIdx)}, + {"Color", uno::Any(nFillPhClr)}, + {"Transformations", uno::Any(pFillRef->maPhClr.getTransformations())} }); putPropertyToGrabBag( "StyleFillRef", Any( aProperties ) ); @@ -1226,9 +1226,9 @@ Reference< XShape > const & Shape::createAndInsert( // Store style-related properties to InteropGrabBag to be able to export them back uno::Sequence<beans::PropertyValue> aProperties = comphelper::InitPropertySequence( { - {"SchemeClr", uno::makeAny(pEffectRef->maPhClr.getSchemeColorName())}, - {"Idx", uno::makeAny(pEffectRef->mnThemedIdx)}, - {"Transformations", uno::makeAny(pEffectRef->maPhClr.getTransformations())} + {"SchemeClr", uno::Any(pEffectRef->maPhClr.getSchemeColorName())}, + {"Idx", uno::Any(pEffectRef->mnThemedIdx)}, + {"Transformations", uno::Any(pEffectRef->maPhClr.getTransformations())} }); putPropertyToGrabBag( "StyleEffectRef", Any( aProperties ) ); } @@ -1300,7 +1300,7 @@ Reference< XShape > const & Shape::createAndInsert( OUString sShapePresetTypeName(reinterpret_cast< const char* >( aNameSeq.getConstArray()), aNameSeq.getLength(), RTL_TEXTENCODING_UTF8); pGrabBag[length].Value <<= sShapePresetTypeName; - propertySet->setPropertyValue("FrameInteropGrabBag",uno::makeAny(aGrabBag)); + propertySet->setPropertyValue("FrameInteropGrabBag",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. @@ -1318,7 +1318,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::makeAny(aGrabBag)); + propertySet->setPropertyValue("FrameInteropGrabBag",uno::Any(aGrabBag)); } // TextFrames have BackColor, not FillColor @@ -1384,7 +1384,7 @@ Reference< XShape > const & Shape::createAndInsert( { aGrabBag = { aPair }; } - xPropertySet->setPropertyValue(aGrabBagPropName, uno::makeAny(aGrabBag)); + xPropertySet->setPropertyValue(aGrabBagPropName, uno::Any(aGrabBag)); } // TextFrames have ShadowFormat, not individual shadow properties. std::optional<sal_Int32> oShadowDistance; @@ -1456,7 +1456,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::makeAny(aGrabBag)); + propertySet->setPropertyValue("InteropGrabBag",uno::Any(aGrabBag)); } // If the shape is a picture placeholder. @@ -1610,9 +1610,9 @@ Reference< XShape > const & Shape::createAndInsert( { uno::Sequence<beans::PropertyValue> a3DEffectsGrabBag = comphelper::InitPropertySequence( { - {"Camera", uno::makeAny(aCamera3DEffects)}, - {"LightRig", uno::makeAny(aLightRig3DEffects)}, - {"Shape3D", uno::makeAny(aShape3DEffects)} + {"Camera", uno::Any(aCamera3DEffects)}, + {"LightRig", uno::Any(aLightRig3DEffects)}, + {"Shape3D", uno::Any(aShape3DEffects)} }); putPropertyToGrabBag( "3DEffectProperties", Any( a3DEffectsGrabBag ) ); } @@ -1627,9 +1627,9 @@ Reference< XShape > const & Shape::createAndInsert( { uno::Sequence<beans::PropertyValue> aText3DEffectsGrabBag = comphelper::InitPropertySequence( { - {"Camera", uno::makeAny(aTextCamera3DEffects)}, - {"LightRig", uno::makeAny(aTextLightRig3DEffects)}, - {"Shape3D", uno::makeAny(aTextShape3DEffects)} + {"Camera", uno::Any(aTextCamera3DEffects)}, + {"LightRig", uno::Any(aTextLightRig3DEffects)}, + {"Shape3D", uno::Any(aTextShape3DEffects)} }); putPropertyToGrabBag( "Text3DEffectProperties", Any( aText3DEffectsGrabBag ) ); } @@ -1717,10 +1717,10 @@ Reference< XShape > const & Shape::createAndInsert( auto sHorzOverflow = getTextBody()->getTextProperties().msHorzOverflow; if (!sHorzOverflow.isEmpty()) - putPropertyToGrabBag("horzOverflow", uno::makeAny(getTextBody()->getTextProperties().msHorzOverflow)); + putPropertyToGrabBag("horzOverflow", uno::Any(getTextBody()->getTextProperties().msHorzOverflow)); auto nVertOverflow = getTextBody()->getTextProperties().msVertOverflow; if (!nVertOverflow.isEmpty()) - putPropertyToGrabBag("vertOverflow", uno::makeAny(getTextBody()->getTextProperties().msVertOverflow)); + putPropertyToGrabBag("vertOverflow", uno::Any(getTextBody()->getTextProperties().msVertOverflow)); } // Note that the script oox/source/drawingml/customshapes/generatePresetsData.pl looks @@ -1751,9 +1751,9 @@ Reference< XShape > const & Shape::createAndInsert( { // use the same logic for rotation from VML exporter (SimpleShape::implConvertAndInsert at vmlshape.cxx) Degree100 nAngle = NormAngle36000( Degree100((mnRotation - nCameraRotation) / -600) ); - aPropertySet.setAnyProperty( PROP_RotateAngle, makeAny( sal_Int32( nAngle.get() ) ) ); - aPropertySet.setAnyProperty( PROP_HoriOrientPosition, makeAny( maPosition.X ) ); - aPropertySet.setAnyProperty( PROP_VertOrientPosition, makeAny( maPosition.Y ) ); + aPropertySet.setAnyProperty( PROP_RotateAngle, Any( sal_Int32( nAngle.get() ) ) ); + aPropertySet.setAnyProperty( PROP_HoriOrientPosition, Any( maPosition.X ) ); + aPropertySet.setAnyProperty( PROP_VertOrientPosition, Any( maPosition.Y ) ); } // in some cases, we don't have any text body. @@ -1793,7 +1793,7 @@ Reference< XShape > const & Shape::createAndInsert( { // If the first paragraph is centered, then set the para adjustment of // the shape itself to centered as well. - aPropertySet.setAnyProperty(PROP_ParaAdjust, uno::makeAny(eAdjust)); + aPropertySet.setAnyProperty(PROP_ParaAdjust, uno::Any(eAdjust)); } } } @@ -1806,7 +1806,7 @@ Reference< XShape > const & Shape::createAndInsert( if(const ShapeStyleRef* pFontRef = getShapeStyleRef(XML_fontRef)) { ::Color nCharColor = pFontRef->maPhClr.getColor(rGraphicHelper); - aPropertySet.setAnyProperty(PROP_CharColor, uno::makeAny(nCharColor)); + aPropertySet.setAnyProperty(PROP_CharColor, uno::Any(nCharColor)); } } @@ -1814,9 +1814,9 @@ Reference< XShape > const & Shape::createAndInsert( if ( aEffectProperties.maGlow.moGlowRad.has() ) { uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY); - propertySet->setPropertyValue("GlowEffectRadius", makeAny(convertEmuToHmm(aEffectProperties.maGlow.moGlowRad.get()))); - propertySet->setPropertyValue("GlowEffectColor", makeAny(aEffectProperties.maGlow.moGlowColor.getColor(rGraphicHelper))); - propertySet->setPropertyValue("GlowEffectTransparency", makeAny(aEffectProperties.maGlow.moGlowColor.getTransparency())); + propertySet->setPropertyValue("GlowEffectRadius", Any(convertEmuToHmm(aEffectProperties.maGlow.moGlowRad.get()))); + propertySet->setPropertyValue("GlowEffectColor", Any(aEffectProperties.maGlow.moGlowColor.getColor(rGraphicHelper))); + propertySet->setPropertyValue("GlowEffectTransparency", Any(aEffectProperties.maGlow.moGlowColor.getTransparency())); } // Set soft edge effect properties @@ -1824,7 +1824,7 @@ Reference< XShape > const & Shape::createAndInsert( { uno::Reference<beans::XPropertySet> propertySet(mxShape, uno::UNO_QUERY); propertySet->setPropertyValue( - "SoftEdgeRadius", makeAny(convertEmuToHmm(aEffectProperties.maSoftEdge.moRad.get()))); + "SoftEdgeRadius", Any(convertEmuToHmm(aEffectProperties.maSoftEdge.moRad.get()))); } } diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index 583ccf7b6d77..7be4d89ae57c 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -221,7 +221,7 @@ static void pushToGrabBag( PropertySet& rPropSet, const std::vector<PropertyValu Any aAnyGrabBag = rPropSet.getAnyProperty(PROP_CharInteropGrabBag); aAnyGrabBag >>= aGrabBag; - rPropSet.setAnyProperty(PROP_CharInteropGrabBag, makeAny(comphelper::concatSequences(aGrabBag, aVectorOfPropertyValues))); + rPropSet.setAnyProperty(PROP_CharInteropGrabBag, Any(comphelper::concatSequences(aGrabBag, aVectorOfPropertyValues))); } void TextCharacterProperties::pushToPropSet( PropertySet& rPropSet, const XmlFilterBase& rFilter ) const diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx index 4fc86776ad1f..664c2dd37d2c 100644 --- a/oox/source/drawingml/textfield.cxx +++ b/oox/source/drawingml/textfield.cxx @@ -129,16 +129,16 @@ void lclCreateTextFields( std::vector< Reference< XTextField > > & aFields, switch( idx ) { case 1: // Path - xProps->setPropertyValue("FileFormat", makeAny<sal_Int16>(1)); + xProps->setPropertyValue("FileFormat", Any(sal_Int16(1))); break; case 2: // File name without extension - xProps->setPropertyValue("FileFormat", makeAny<sal_Int16>(2)); + xProps->setPropertyValue("FileFormat", Any(sal_Int16(2))); break; case 3: // File name with extension - xProps->setPropertyValue("FileFormat", makeAny<sal_Int16>(3)); + xProps->setPropertyValue("FileFormat", Any(sal_Int16(3))); break; default: // Path/File name - xProps->setPropertyValue("FileFormat", makeAny<sal_Int16>(0)); + xProps->setPropertyValue("FileFormat", Any(sal_Int16(0))); } } else if( sType == u"author" ) diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index bcf51d290794..23efb301e963 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -467,7 +467,7 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p if( !rioBulletMap.hasProperty( PROP_BulletRelSize ) ) rioBulletMap.setProperty<sal_Int16>( PROP_BulletRelSize, 100); Sequence< PropertyValue > aBulletPropSeq = rioBulletMap.makePropertyValueSequence(); - xNumRule->replaceByIndex( getLevel(), makeAny( aBulletPropSeq ) ); + xNumRule->replaceByIndex( getLevel(), Any( aBulletPropSeq ) ); } aPropSet.setProperty( PROP_NumberingRules, xNumRule ); diff --git a/oox/source/drawingml/theme.cxx b/oox/source/drawingml/theme.cxx index acadb1be77e3..87bee889538a 100644 --- a/oox/source/drawingml/theme.cxx +++ b/oox/source/drawingml/theme.cxx @@ -114,7 +114,7 @@ void Theme::addTheme(const css::uno::Reference<css::drawing::XDrawPage>& xDrawPa aColorScheme, }; uno::Reference<beans::XPropertySet> xPropertySet(xDrawPage, uno::UNO_QUERY); - xPropertySet->setPropertyValue("Theme", uno::makeAny(aValues)); + xPropertySet->setPropertyValue("Theme", uno::Any(aValues)); } } // namespace oox::drawingml diff --git a/oox/source/export/ColorPropertySet.cxx b/oox/source/export/ColorPropertySet.cxx index e2734a8e7d8e..a0998f195fe4 100644 --- a/oox/source/export/ColorPropertySet.cxx +++ b/oox/source/export/ColorPropertySet.cxx @@ -117,10 +117,10 @@ uno::Any SAL_CALL ColorPropertySet::getPropertyValue( const OUString& aPropertyN { if( aPropertyName == "FillStyle" && m_bIsFillColor ) { - return uno::makeAny(css::drawing::FillStyle_SOLID); + return uno::Any(css::drawing::FillStyle_SOLID); } else if (aPropertyName == m_aColorPropName) - return uno::makeAny( m_nColor ); + return uno::Any( m_nColor ); throw UnknownPropertyException(aPropertyName); } @@ -168,7 +168,7 @@ void SAL_CALL ColorPropertySet::setPropertyToDefault( const OUString& PropertyNa uno::Any SAL_CALL ColorPropertySet::getPropertyDefault( const OUString& aPropertyName ) { if( aPropertyName == m_aColorPropName ) - return uno::makeAny( m_nDefaultColor ); + return uno::Any( m_nDefaultColor ); return uno::Any(); } diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 1d6dfec23f71..8a6d5fa7d298 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -750,9 +750,9 @@ OUString ChartExport::parseFormula( const OUString& rRange ) uno::Sequence<sheet::FormulaToken> aTokens = xParser->parseFormula( rRange, CellAddress( 0, 0, 0 ) ); if( xParserProps.is() ) { - xParserProps->setPropertyValue("FormulaConvention", uno::makeAny(css::sheet::AddressConvention::XL_OOX) ); + xParserProps->setPropertyValue("FormulaConvention", uno::Any(css::sheet::AddressConvention::XL_OOX) ); // For referencing named ranges correctly with special excel chart syntax. - xParserProps->setPropertyValue("RefConventionChartOOXML", uno::makeAny(true) ); + xParserProps->setPropertyValue("RefConventionChartOOXML", uno::Any(true) ); } aResult = xParser->printFormula( aTokens, CellAddress( 0, 0, 0 ) ); } diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index bbeea30af4e5..1c5d34ac3e4a 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -5787,7 +5787,7 @@ void DrawingML::writeDiagramRels(const uno::Sequence<uno::Sequence<uno::Any>>& x + OUString::number(j) + sExtension; PropertySet aProps(xOutStream); - aProps.setAnyProperty(PROP_RelId, uno::makeAny(sRelId.toInt32())); + aProps.setAnyProperty(PROP_RelId, uno::Any(sRelId.toInt32())); mpFB->addRelation(xOutStream, sType, OUStringConcatenation("../" + sFragment)); diff --git a/oox/source/helper/grabbagstack.cxx b/oox/source/helper/grabbagstack.cxx index 7d4f23a27798..761fc9644a66 100644 --- a/oox/source/helper/grabbagstack.cxx +++ b/oox/source/helper/grabbagstack.cxx @@ -64,17 +64,17 @@ void GrabBagStack::pop() Sequence<PropertyValue> aSequence(comphelper::containerToSequence(mCurrentElement.maPropertyList)); mCurrentElement = mStack.top(); mStack.pop(); - appendElement(aName, makeAny(aSequence)); + appendElement(aName, Any(aSequence)); } void GrabBagStack::addInt32(const OUString& aElementName, sal_Int32 aIntValue) { - appendElement(aElementName, makeAny(aIntValue)); + appendElement(aElementName, Any(aIntValue)); } void GrabBagStack::addString(const OUString& aElementName, const OUString& aStringValue) { - appendElement(aElementName, makeAny(aStringValue)); + appendElement(aElementName, Any(aStringValue)); } } // namespace oox diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index 232f4ee9fba9..f45291ea8edc 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -337,7 +337,7 @@ static void lclDumpAnyValue( const Any& value) fprintf (stderr,"%s\n", USS(value.getValueTypeName())); for( int i=0; i<propArrayArray.getLength(); i++ ) { fprintf (stderr,"\t\t\t[%3d] ", i); - lclDumpAnyValue( makeAny (propArrayArray[i]) ); + lclDumpAnyValue( Any (propArrayArray[i]) ); } } else if( value >>= anyArray ) { fprintf (stderr,"%s\n", USS(value.getValueTypeName())); @@ -355,21 +355,21 @@ static void lclDumpAnyValue( const Any& value) fprintf (stderr,"%s\n", USS(value.getValueTypeName())); for( int i=0; i<segArray.getLength(); i++ ) { fprintf (stderr,"\t\t\t[%3d] ", i ); - lclDumpAnyValue( makeAny( segArray[i] ) ); + lclDumpAnyValue( Any( segArray[i] ) ); } } else if( value >>= ppArray ) { fprintf (stderr,"%s\n", USS(value.getValueTypeName())); for( int i=0; i<ppArray.getLength(); i++ ) { fprintf (stderr,"\t\t\t[%3d] ", i ); - lclDumpAnyValue( makeAny( ppArray[i] ) ); + lclDumpAnyValue( Any( ppArray[i] ) ); } } else if( value >>= segment ) { fprintf (stderr,"Command: %d Count: %d\n", segment.Command, segment.Count); } else if( value >>= pp ) { fprintf (stderr,"First: "); - lclDumpAnyValue( makeAny (pp.First) ); + lclDumpAnyValue( Any (pp.First) ); fprintf (stderr,"\t\t\t Second: "); - lclDumpAnyValue( makeAny (pp.Second) ); + lclDumpAnyValue( Any (pp.Second) ); } else if( value >>= par ) { fprintf (stderr,"Parameter (%s): ", USS(par.Value.getValueTypeName())); lclDumpAnyValue( par.Value ); @@ -638,7 +638,7 @@ static const char* lclDumpAnyValueCode( const Any& value, int level) for( int i=0; i<sizeArray.getLength(); i++ ) { printLevel (level); fprintf (stderr, "{\n"); - const char *var = lclDumpAnyValueCode (makeAny (sizeArray[i]), level + 1); + const char *var = lclDumpAnyValueCode (Any (sizeArray[i]), level + 1); printLevel (level + 1); fprintf (stderr, "aSizeSequence [%d] = %s;\n", i, var); printLevel (level); @@ -653,7 +653,7 @@ static const char* lclDumpAnyValueCode( const Any& value, int level) for( int i=0; i<propArrayArray.getLength(); i++ ) { printLevel (level); fprintf (stderr, "{\n"); - const char *var = lclDumpAnyValueCode( makeAny (propArrayArray[i]), level + 1 ); + const char *var = lclDumpAnyValueCode( Any (propArrayArray[i]), level + 1 ); printLevel (level + 1); fprintf (stderr, "aPropSequenceSequence [%d] = %s;\n", i, var); printLevel (level); @@ -713,7 +713,7 @@ static const char* lclDumpAnyValueCode( const Any& value, int level) for( int i=0; i<segTextFrame.getLength(); i++ ) { printLevel (level); fprintf (stderr, "{\n"); - const char *var = lclDumpAnyValueCode (makeAny (segTextFrame[i]), level + 1); + const char *var = lclDumpAnyValueCode (Any (segTextFrame[i]), level + 1); printLevel (level + 1); fprintf (stderr, "aTextFrameSeq [%d] = %s;\n", i, var); printLevel (level); @@ -755,7 +755,7 @@ static const char* lclDumpAnyValueCode( const Any& value, int level) printLevel (level); fprintf (stderr, "{\n"); { - const char* var = lclDumpAnyValueCode( makeAny (textFrame.TopLeft), level + 1 ); + const char* var = lclDumpAnyValueCode( Any (textFrame.TopLeft), level + 1 ); printLevel (level + 1); fprintf (stderr, "aTextFrame.TopLeft = %s;\n", var); } @@ -765,7 +765,7 @@ static const char* lclDumpAnyValueCode( const Any& value, int level) printLevel (level); fprintf (stderr, "{\n"); { - const char* var = lclDumpAnyValueCode( makeAny (textFrame.BottomRight), level + 1 ); + const char* var = lclDumpAnyValueCode( Any (textFrame.BottomRight), level + 1 ); printLevel (level + 1); fprintf (stderr, "aTextFrame.BottomRight = %s;\n", var); } diff --git a/oox/source/ppt/animationspersist.cxx b/oox/source/ppt/animationspersist.cxx index 40655e6863c6..450e3da0065f 100644 --- a/oox/source/ppt/animationspersist.cxx +++ b/oox/source/ppt/animationspersist.cxx @@ -66,7 +66,7 @@ Any addToSequence( const Any& rOldValue, const Any& rNewValue ) { aNewSeq = { rOldValue, rNewValue }; } - return makeAny( aNewSeq ); + return Any( aNewSeq ); } } diff --git a/oox/source/ppt/conditioncontext.cxx b/oox/source/ppt/conditioncontext.cxx index 4a2145e3c540..650d7ef9cb1a 100644 --- a/oox/source/ppt/conditioncontext.cxx +++ b/oox/source/ppt/conditioncontext.cxx @@ -98,7 +98,7 @@ namespace oox::ppt { { if( maCond.mnType == 0 || maCond.mnType == PPT_TOKEN(tn)) { - maCond.maValue = (maEvent.Trigger == EventTrigger::NONE) ? maEvent.Offset : makeAny( maEvent ); + maCond.maValue = (maEvent.Trigger == EventTrigger::NONE) ? maEvent.Offset : Any( maEvent ); } } diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index 87d2e1ee43d7..55e094db652f 100644 --- a/oox/source/ppt/pptimport.cxx +++ b/oox/source/ppt/pptimport.cxx @@ -196,8 +196,8 @@ sal_Bool SAL_CALL PowerPointImport::filter( const Sequence< PropertyValue >& rDe { uno::Sequence<uno::Any> aArguments(comphelper::InitAnyPropertySequence( { - {"IsPPTM", uno::makeAny(exportVBA())}, - {"IsTemplate", uno::makeAny(isExportTemplate())}, + {"IsPPTM", uno::Any(exportVBA())}, + {"IsTemplate", uno::Any(isExportTemplate())}, })); Reference<css::lang::XMultiServiceFactory> aFactory(getComponentContext()->getServiceManager(), UNO_QUERY_THROW); diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx index 66176d0a485a..64aaf62f9a71 100644 --- a/oox/source/ppt/presentationfragmenthandler.cxx +++ b/oox/source/ppt/presentationfragmenthandler.cxx @@ -241,7 +241,7 @@ void PresentationFragmentHandler::saveThemeToGrabBag(const oox::drawingml::Theme ::Color nColor; rClrScheme.getColor(nToken, nColor); - const uno::Any& rColor = uno::makeAny(nColor); + const uno::Any& rColor = uno::Any(nColor); pCurrentTheme[nId].Name = sName; pCurrentTheme[nId].Value = rColor; @@ -668,7 +668,7 @@ void PresentationFragmentHandler::finalizeImport() getFilter().getModelFactory()->createInstance( "com.sun.star.document.Settings"), uno::UNO_QUERY); - xDocSettings->setPropertyValue("ModifyPasswordInfo", uno::makeAny(aResult)); + xDocSettings->setPropertyValue("ModifyPasswordInfo", uno::Any(aResult)); } catch (const uno::Exception&) { diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx index 5d7604ec0952..2701a3f60465 100644 --- a/oox/source/ppt/timenode.cxx +++ b/oox/source/ppt/timenode.cxx @@ -152,7 +152,7 @@ namespace oox::ppt { Event aEvent; aEvent.Trigger = EventTrigger::ON_NEXT; aEvent.Repeat = 0; - xClickNode->setBegin( makeAny( aEvent ) ); + xClickNode->setBegin( Any( aEvent ) ); if( bFirst ) { @@ -182,7 +182,7 @@ namespace oox::ppt { { // first effect does not start on click, so correct // first click nodes begin to 0s - xClickNode->setBegin( makeAny( 0.0 ) ); + xClickNode->setBegin( Any( 0.0 ) ); break; } } diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index f58a1e205ae2..a7637432acdb 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -92,7 +92,7 @@ namespace { // rPoint.X and rPoint.Y are in 1000th of a percent, but we only need ratio. aPair.First <<= static_cast<double>(rPoint.X) / 100000.0; aPair.Second <<= static_cast<double>(rPoint.Y) / 100000.0; - return makeAny(aPair); + return Any(aPair); } } @@ -459,9 +459,9 @@ namespace oox::ppt { rProps[ NP_COLORINTERPOLATION ] <<= mnColorSpace == XML_hsl ? AnimationColorSpace::HSL : AnimationColorSpace::RGB; const GraphicHelper& rGraphicHelper = getFilter().getGraphicHelper(); if( maToClr.isUsed() ) - mpNode->setTo( makeAny( maToClr.getColor( rGraphicHelper ) ) ); + mpNode->setTo( Any( maToClr.getColor( rGraphicHelper ) ) ); if( maFromClr.isUsed() ) - mpNode->setFrom( makeAny( maFromClr.getColor( rGraphicHelper ) ) ); + mpNode->setFrom( Any( maFromClr.getColor( rGraphicHelper ) ) ); if( mbHasByColor ) mpNode->setBy( m_byColor.get() ); } @@ -741,17 +741,17 @@ namespace oox::ppt { if(attribs.hasAttribute( XML_by ) ) { double fBy = attribs.getDouble( XML_by, 0.0 ) / PER_DEGREE; //1 PowerPoint-angle-unit = 1/60000 degree - pNode->setBy( makeAny( fBy ) ); + pNode->setBy( Any( fBy ) ); } if(attribs.hasAttribute( XML_from ) ) { double fFrom = attribs.getDouble( XML_from, 0.0 ) / PER_DEGREE; - pNode->setFrom( makeAny( fFrom ) ); + pNode->setFrom( Any( fFrom ) ); } if(attribs.hasAttribute( XML_to ) ) { double fTo = attribs.getDouble( XML_to, 0.0 ) / PER_DEGREE; - pNode->setTo( makeAny( fTo ) ); + pNode->setTo( Any( fTo ) ); } } diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index 604065be9aad..176ad569e25f 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -70,7 +70,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken if (nVert == XML_eaVert) { xPropertySet->setPropertyValue("TextWritingMode", - uno::makeAny(text::WritingMode_TB_RL)); + uno::Any(text::WritingMode_TB_RL)); } else if (nVert != XML_horz) { @@ -103,7 +103,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken aCustomShapeGeometry["TextPreRotateAngle"] <<= nRotation; xPropertySet->setPropertyValue( "CustomShapeGeometry", - uno::makeAny(aCustomShapeGeometry.getAsConstPropertyValueList())); + uno::Any(aCustomShapeGeometry.getAsConstPropertyValueList())); } } @@ -116,7 +116,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken auto pGrabBag = aGrabBag.getArray(); pGrabBag[length].Name = "Upright"; pGrabBag[length].Value <<= bUpright; - xPropertySet->setPropertyValue("InteropGrabBag", uno::makeAny(aGrabBag)); + xPropertySet->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag)); } if (xServiceInfo.is()) @@ -139,8 +139,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken OUString("TextRightDistance"), OUString("TextLowerDistance") }; for (std::size_t i = 0; i < SAL_N_ELEMENTS(aShapeProps); ++i) if (oInsets[i]) - xPropertySet->setPropertyValue(aShapeProps[i], - uno::makeAny(*oInsets[i])); + xPropertySet->setPropertyValue(aShapeProps[i], uno::Any(*oInsets[i])); } // Handle text vertical adjustment inside a text frame @@ -148,7 +147,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken { drawing::TextVerticalAdjust eAdjust = drawingml::GetTextVerticalAdjust(rAttribs.getToken(XML_anchor, XML_t)); - xPropertySet->setPropertyValue("TextVerticalAdjust", uno::makeAny(eAdjust)); + xPropertySet->setPropertyValue("TextVerticalAdjust", uno::Any(eAdjust)); } // Apply character color of the shape to the shape's textbox. @@ -214,7 +213,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken auto nWrappingType = rAttribs.getToken(XML_wrap, XML_square); xPropertySet->setPropertyValue("TextWordWrap", - uno::makeAny(nWrappingType == XML_square)); + uno::Any(nWrappingType == XML_square)); return this; } @@ -266,11 +265,11 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken if (xServiceInfo->supportsService("com.sun.star.text.TextFrame")) xPropertySet->setPropertyValue( "FrameIsAutomaticHeight", - uno::makeAny(getBaseToken(nElementToken) == XML_spAutoFit)); + uno::Any(getBaseToken(nElementToken) == XML_spAutoFit)); else xPropertySet->setPropertyValue( "TextAutoGrowHeight", - uno::makeAny(getBaseToken(nElementToken) == XML_spAutoFit)); + uno::Any(getBaseToken(nElementToken) == XML_spAutoFit)); } } break; @@ -287,7 +286,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken aCustomShapeGeometry["PresetTextWarp"] <<= preset; xPropertySet->setPropertyValue( "CustomShapeGeometry", - uno::makeAny(aCustomShapeGeometry.getAsConstPropertyValueList())); + uno::Any(aCustomShapeGeometry.getAsConstPropertyValueList())); } } break; diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx index ea587298baa1..081322a4600c 100644 --- a/oox/source/vml/vmldrawing.cxx +++ b/oox/source/vml/vmldrawing.cxx @@ -276,12 +276,12 @@ Reference< XShape > Drawing::createAndInsertXShape( const OUString& rService, else { Reference< XPropertySet > xPropSet( xShape, UNO_QUERY_THROW ); - xPropSet->setPropertyValue( "HoriOrient", makeAny( HoriOrientation::NONE ) ); - xPropSet->setPropertyValue( "VertOrient", makeAny( VertOrientation::NONE ) ); - xPropSet->setPropertyValue( "HoriOrientPosition", makeAny( rShapeRect.X ) ); - xPropSet->setPropertyValue( "VertOrientPosition", makeAny( rShapeRect.Y ) ); - xPropSet->setPropertyValue( "HoriOrientRelation", makeAny( RelOrientation::FRAME ) ); - xPropSet->setPropertyValue( "VertOrientRelation", makeAny( RelOrientation::FRAME ) ); + xPropSet->setPropertyValue( "HoriOrient", Any( HoriOrientation::NONE ) ); + xPropSet->setPropertyValue( "VertOrient", Any( VertOrientation::NONE ) ); + xPropSet->setPropertyValue( "HoriOrientPosition", Any( rShapeRect.X ) ); + xPropSet->setPropertyValue( "VertOrientPosition", Any( rShapeRect.Y ) ); + xPropSet->setPropertyValue( "HoriOrientRelation", Any( RelOrientation::FRAME ) ); + xPropSet->setPropertyValue( "VertOrientRelation", Any( RelOrientation::FRAME ) ); } xShape->setSize( awt::Size( rShapeRect.Width, rShapeRect.Height ) ); } diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index e83209a7e014..241991dac3c8 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -941,7 +941,7 @@ void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, const uno::Referen aGeomPropSeq.realloc(nSize+1); aGeomPropSeq.getArray()[nSize] = lcl_createTextpathProps(); } - rPropMap.setAnyProperty(PROP_CustomShapeGeometry, uno::makeAny(aGeomPropSeq)); + rPropMap.setAnyProperty(PROP_CustomShapeGeometry, uno::Any(aGeomPropSeq)); } if (moStyle.has()) { @@ -960,7 +960,7 @@ void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, const uno::Referen aValue = aValue.copy(1, aValue.getLength() - 2); uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY); - xPropertySet->setPropertyValue("CharFontName", uno::makeAny(aValue)); + xPropertySet->setPropertyValue("CharFontName", uno::Any(aValue)); sFont = aValue; } else if (aName == "font-size") @@ -969,7 +969,7 @@ void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, const uno::Referen float nSize = drawingml::convertEmuToPoints(lclGetEmu(rGraphicHelper, aOptString, 1)); uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY); - xPropertySet->setPropertyValue("CharHeight", uno::makeAny(nSize)); + xPropertySet->setPropertyValue("CharHeight", uno::Any(nSize)); } } } diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 4e2e6e2d224e..4a380480d29c 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -410,7 +410,7 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS if(!maTypeModel.maRotation.isEmpty()) aGrabBag.push_back(comphelper::makePropertyValue("mso-rotation-angle", ConversionHelper::decodeRotation(maTypeModel.maRotation).get())); - propertySet->setPropertyValue("FrameInteropGrabBag", uno::makeAny(comphelper::containerToSequence(aGrabBag))); + propertySet->setPropertyValue("FrameInteropGrabBag", uno::Any(comphelper::containerToSequence(aGrabBag))); sal_Int32 backColorTransparency = 0; propertySet->getPropertyValue("BackColorTransparency") >>= backColorTransparency; @@ -418,7 +418,7 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS backColorTransparency == 100) { // If there is no fill, the Word default is 100% transparency. - propertySet->setPropertyValue("FillTransparence", makeAny(sal_Int16(100))); + propertySet->setPropertyValue("FillTransparence", Any(sal_Int16(100))); } } else @@ -459,14 +459,14 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS pGrabBag[length+3].Name = "LinkChainName"; pGrabBag[length+3].Value <<= sLinkChainName; } - propertySet->setPropertyValue( "InteropGrabBag", uno::makeAny(aGrabBag) ); + propertySet->setPropertyValue( "InteropGrabBag", uno::Any(aGrabBag) ); } } Reference< XControlShape > xControlShape( xShape, uno::UNO_QUERY ); if ( xControlShape.is() && !getTypeModel().mbVisible ) { PropertySet aControlShapeProp( xControlShape->getControl() ); - aControlShapeProp.setProperty( PROP_EnableVisible, uno::makeAny( false ) ); + aControlShapeProp.setProperty( PROP_EnableVisible, uno::Any( false ) ); } xShape = finalImplConvertAndInsert(xShape); @@ -609,7 +609,7 @@ static void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rType // Word supports as-character (inline) and at-character only, absolute can't be inline. rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_CHARACTER); // anchor is set after insertion, so reset to NONE - rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::NONE)); + rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::NONE)); if ( rTypeModel.maPositionVerticalRelative == "page" ) { @@ -636,34 +636,34 @@ static void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rType { // I'm not very sure this is correct either. rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AT_PARAGRAPH); // anchor is set after insertion, so reset to NONE - rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::NONE)); + rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::NONE)); } else // static (is the default) means anchored inline { rPropSet.setProperty(PROP_AnchorType, text::TextContentAnchorType_AS_CHARACTER); // Use top orientation, this one seems similar to what MSO uses as inline - rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::TOP)); + rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::TOP)); } if ( rTypeModel.maPositionHorizontal == "center" ) - rPropSet.setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::CENTER)); + rPropSet.setAnyProperty(PROP_HoriOrient, Any(text::HoriOrientation::CENTER)); else if ( rTypeModel.maPositionHorizontal == "left" ) - rPropSet.setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::LEFT)); + rPropSet.setAnyProperty(PROP_HoriOrient, Any(text::HoriOrientation::LEFT)); else if ( rTypeModel.maPositionHorizontal == "right" ) - rPropSet.setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::RIGHT)); + rPropSet.setAnyProperty(PROP_HoriOrient, Any(text::HoriOrientation::RIGHT)); else if ( rTypeModel.maPositionHorizontal == "inside" ) { - rPropSet.setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::LEFT)); - rPropSet.setAnyProperty(PROP_PageToggle, makeAny(true)); + rPropSet.setAnyProperty(PROP_HoriOrient, Any(text::HoriOrientation::LEFT)); + rPropSet.setAnyProperty(PROP_PageToggle, Any(true)); } else if ( rTypeModel.maPositionHorizontal == "outside" ) { - rPropSet.setAnyProperty(PROP_HoriOrient, makeAny(text::HoriOrientation::RIGHT)); - rPropSet.setAnyProperty(PROP_PageToggle, makeAny(true)); + rPropSet.setAnyProperty(PROP_HoriOrient, Any(text::HoriOrientation::RIGHT)); + rPropSet.setAnyProperty(PROP_PageToggle, Any(true)); } if ( rTypeModel.maPositionHorizontalRelative == "page" ) - rPropSet.setAnyProperty(PROP_HoriOrientRelation, makeAny(text::RelOrientation::PAGE_FRAME)); + rPropSet.setAnyProperty(PROP_HoriOrientRelation, Any(text::RelOrientation::PAGE_FRAME)); else if ( rTypeModel.maPositionHorizontalRelative == "margin" ) rPropSet.setProperty(PROP_HoriOrientRelation, text::RelOrientation::PAGE_PRINT_AREA); else if (rTypeModel.maPositionHorizontalRelative == "right-margin-area" || @@ -676,15 +676,15 @@ static void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rType rPropSet.setProperty(PROP_HoriOrientRelation, text::RelOrientation::FRAME); if ( rTypeModel.maPositionVertical == "center" ) - rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::CENTER)); + rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::CENTER)); else if ( rTypeModel.maPositionVertical == "top" ) - rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::TOP)); + rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::TOP)); else if ( rTypeModel.maPositionVertical == "bottom" ) - rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::BOTTOM)); + rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::BOTTOM)); else if ( rTypeModel.maPositionVertical == "inside" ) - rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::TOP)); + rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::TOP)); else if ( rTypeModel.maPositionVertical == "outside" ) - rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::BOTTOM)); + rPropSet.setAnyProperty(PROP_VertOrient, Any(text::VertOrientation::BOTTOM)); lcl_setSurround( rPropSet, rTypeModel, rGraphicHelper ); } @@ -733,31 +733,31 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes if (!maTypeModel.maWrapDistanceLeft.isEmpty()) aWrapDistanceLeft = maTypeModel.maWrapDistanceLeft; sal_Int32 nWrapDistanceLeft = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, aWrapDistanceLeft, 0, true, false); - PropertySet(xShape).setAnyProperty(PROP_LeftMargin, uno::makeAny(nWrapDistanceLeft)); + PropertySet(xShape).setAnyProperty(PROP_LeftMargin, uno::Any(nWrapDistanceLeft)); OUString aWrapDistanceRight = OUString::number(0x0001BE7C); if (!maTypeModel.maWrapDistanceRight.isEmpty()) aWrapDistanceRight = maTypeModel.maWrapDistanceRight; sal_Int32 nWrapDistanceRight = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, aWrapDistanceRight, 0, true, false); - PropertySet(xShape).setAnyProperty(PROP_RightMargin, uno::makeAny(nWrapDistanceRight)); + PropertySet(xShape).setAnyProperty(PROP_RightMargin, uno::Any(nWrapDistanceRight)); sal_Int32 nWrapDistanceTop = 0; if (!maTypeModel.maWrapDistanceTop.isEmpty()) nWrapDistanceTop = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceTop, 0, false, true); - PropertySet(xShape).setAnyProperty(PROP_TopMargin, uno::makeAny(nWrapDistanceTop)); + PropertySet(xShape).setAnyProperty(PROP_TopMargin, uno::Any(nWrapDistanceTop)); sal_Int32 nWrapDistanceBottom = 0; if (!maTypeModel.maWrapDistanceBottom.isEmpty()) nWrapDistanceBottom = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceBottom, 0, false, true); - PropertySet(xShape).setAnyProperty(PROP_BottomMargin, uno::makeAny(nWrapDistanceBottom)); + PropertySet(xShape).setAnyProperty(PROP_BottomMargin, uno::Any(nWrapDistanceBottom)); if ( maService == "com.sun.star.text.TextFrame" ) { - PropertySet( xShape ).setAnyProperty( PROP_FrameIsAutomaticHeight, makeAny( maTypeModel.mbAutoHeight ) ); - PropertySet( xShape ).setAnyProperty( PROP_SizeType, makeAny( maTypeModel.mbAutoHeight ? SizeType::MIN : SizeType::FIX ) ); + PropertySet( xShape ).setAnyProperty( PROP_FrameIsAutomaticHeight, Any( maTypeModel.mbAutoHeight ) ); + PropertySet( xShape ).setAnyProperty( PROP_SizeType, Any( maTypeModel.mbAutoHeight ? SizeType::MIN : SizeType::FIX ) ); if( getTextBox()->borderDistanceSet ) { - PropertySet( xShape ).setAnyProperty( PROP_LeftBorderDistance, makeAny( sal_Int32( getTextBox()->borderDistanceLeft ))); - PropertySet( xShape ).setAnyProperty( PROP_TopBorderDistance, makeAny( sal_Int32( getTextBox()->borderDistanceTop ))); - PropertySet( xShape ).setAnyProperty( PROP_RightBorderDistance, makeAny( sal_Int32( getTextBox()->borderDistanceRight ))); - PropertySet( xShape ).setAnyProperty( PROP_BottomBorderDistance, makeAny( sal_Int32( getTextBox()->borderDistanceBottom ))); + PropertySet( xShape ).setAnyProperty( PROP_LeftBorderDistance, Any( sal_Int32( getTextBox()->borderDistanceLeft ))); + PropertySet( xShape ).setAnyProperty( PROP_TopBorderDistance, Any( sal_Int32( getTextBox()->borderDistanceTop ))); + PropertySet( xShape ).setAnyProperty( PROP_RightBorderDistance, Any( sal_Int32( getTextBox()->borderDistanceRight ))); + PropertySet( xShape ).setAnyProperty( PROP_BottomBorderDistance, Any( sal_Int32( getTextBox()->borderDistanceBottom ))); } sal_Int16 nWritingMode = text::WritingMode2::LR_TB; @@ -771,11 +771,11 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes } if (nWritingMode != text::WritingMode2::LR_TB) { - PropertySet(xShape).setAnyProperty(PROP_WritingMode, uno::makeAny(nWritingMode)); + PropertySet(xShape).setAnyProperty(PROP_WritingMode, uno::Any(nWritingMode)); } // tdf#123626 if (!maShapeModel.maHyperlink.isEmpty()) - PropertySet(xShape).setAnyProperty(PROP_HyperLinkURL, makeAny(maShapeModel.maHyperlink)); + PropertySet(xShape).setAnyProperty(PROP_HyperLinkURL, Any(maShapeModel.maHyperlink)); } else { @@ -792,7 +792,7 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes sal_Int16 nWidth = maTypeModel.maWidthPercent.toInt32() / 10; // Only apply if nWidth != 0 if ( nWidth ) - PropertySet( xShape ).setAnyProperty(PROP_RelativeWidth, makeAny( nWidth ) ); + PropertySet( xShape ).setAnyProperty(PROP_RelativeWidth, Any( nWidth ) ); } } if ( !maTypeModel.maHeightPercent.isEmpty( ) ) @@ -803,7 +803,7 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes sal_Int16 nHeight = maTypeModel.maHeightPercent.toInt32() / 10; // Only apply if nHeight != 0 if ( nHeight ) - PropertySet( xShape ).setAnyProperty(PROP_RelativeHeight, makeAny( nHeight ) ); + PropertySet( xShape ).setAnyProperty(PROP_RelativeHeight, Any( nHeight ) ); } } @@ -813,18 +813,18 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes eTextVerticalAdjust = drawing::TextVerticalAdjust_CENTER; else if (maTypeModel.maVTextAnchor == "bottom") eTextVerticalAdjust = drawing::TextVerticalAdjust_BOTTOM; - PropertySet(xShape).setAnyProperty(PROP_TextVerticalAdjust, makeAny(eTextVerticalAdjust)); + PropertySet(xShape).setAnyProperty(PROP_TextVerticalAdjust, Any(eTextVerticalAdjust)); // tdf#97618 if(!maTypeModel.maWrapStyle.isEmpty()) - PropertySet(xShape).setAnyProperty(PROP_TextWordWrap, makeAny(maTypeModel.maWrapStyle == "square")); + PropertySet(xShape).setAnyProperty(PROP_TextWordWrap, Any(maTypeModel.maWrapStyle == "square")); // tdf#123626 if (!maShapeModel.maHyperlink.isEmpty()) - PropertySet(xShape).setAnyProperty(PROP_Hyperlink, makeAny(maShapeModel.maHyperlink)); + PropertySet(xShape).setAnyProperty(PROP_Hyperlink, Any(maShapeModel.maHyperlink)); PropertySet(xShape).setAnyProperty(PROP_TextAutoGrowHeight, - makeAny(maTypeModel.mbAutoHeight)); + Any(maTypeModel.mbAutoHeight)); if (getTextBox()) { @@ -832,10 +832,10 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes if (getTextBox()->borderDistanceSet) { awt::Size aSize = xShape->getSize(); - PropertySet(xShape).setAnyProperty(PROP_TextLeftDistance, makeAny(sal_Int32(getTextBox()->borderDistanceLeft))); - PropertySet(xShape).setAnyProperty(PROP_TextUpperDistance, makeAny(sal_Int32(getTextBox()->borderDistanceTop))); - PropertySet(xShape).setAnyProperty(PROP_TextRightDistance, makeAny(sal_Int32(getTextBox()->borderDistanceRight))); - PropertySet(xShape).setAnyProperty(PROP_TextLowerDistance, makeAny(sal_Int32(getTextBox()->borderDistanceBottom))); + PropertySet(xShape).setAnyProperty(PROP_TextLeftDistance, Any(sal_Int32(getTextBox()->borderDistanceLeft))); + PropertySet(xShape).setAnyProperty(PROP_TextUpperDistance, Any(sal_Int32(getTextBox()->borderDistanceTop))); + PropertySet(xShape).setAnyProperty(PROP_TextRightDistance, Any(sal_Int32(getTextBox()->borderDistanceRight))); + PropertySet(xShape).setAnyProperty(PROP_TextLowerDistance, Any(sal_Int32(getTextBox()->borderDistanceBottom))); xShape->setSize(aSize); } } @@ -854,13 +854,13 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes { if (oRotation) { - aPropertySet.setAnyProperty(PROP_RotateAngle, makeAny((*oRotation).get())); + aPropertySet.setAnyProperty(PROP_RotateAngle, Any((*oRotation).get())); uno::Reference<lang::XServiceInfo> xServiceInfo(rxShapes, uno::UNO_QUERY); if (!xServiceInfo->supportsService("com.sun.star.drawing.GroupShape")) { // If rotation is used, simple setPosition() is not enough. - aPropertySet.setAnyProperty(PROP_HoriOrientPosition, makeAny(aShapeRect.X)); - aPropertySet.setAnyProperty(PROP_VertOrientPosition, makeAny(aShapeRect.Y)); + aPropertySet.setAnyProperty(PROP_HoriOrientPosition, Any(aShapeRect.X)); + aPropertySet.setAnyProperty(PROP_VertOrientPosition, Any(aShapeRect.Y)); } } @@ -897,7 +897,7 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes } if (!aPropVec.empty()) - aPropertySet.setAnyProperty(PROP_CustomShapeGeometry, makeAny(comphelper::containerToSequence(aPropVec))); + aPropertySet.setAnyProperty(PROP_CustomShapeGeometry, Any(comphelper::containerToSequence(aPropVec))); } lcl_SetAnchorType(aPropertySet, maTypeModel, rGraphicHelper ); @@ -929,7 +929,7 @@ Reference<XShape> SimpleShape::finalImplConvertAndInsert(const css::uno::Referen // Note: if you set a new property then you have to handle it in the proper // SwTextBoxHelper::syncProperty function. if (maTypeModel.maLayoutFlowAlt == "bottom-to-top") - aPropertySet.setAnyProperty(PROP_TextWritingMode, uno::makeAny(text::WritingMode2::BT_LR)); + aPropertySet.setAnyProperty(PROP_TextWritingMode, uno::Any(text::WritingMode2::BT_LR)); } return ShapeBase::finalImplConvertAndInsert(rxShape); } @@ -961,7 +961,7 @@ Reference< XShape > SimpleShape::createPictureObject(const Reference< XShapes >& } // fdo#70457: preserve rotation information if ( !maTypeModel.maRotation.isEmpty() ) - aPropSet.setAnyProperty(PROP_RotateAngle, makeAny(ConversionHelper::decodeRotation(maTypeModel.maRotation).get())); + aPropSet.setAnyProperty(PROP_RotateAngle, Any(ConversionHelper::decodeRotation(maTypeModel.maRotation).get())); const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper(); lcl_SetAnchorType(aPropSet, maTypeModel, rGraphicHelper); @@ -970,10 +970,10 @@ Reference< XShape > SimpleShape::createPictureObject(const Reference< XShapes >& const sal_Int32 nWrapDistanceRight = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceRight, 0, true, true); const sal_Int32 nWrapDistanceTop = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceTop, 0, false, true); const sal_Int32 nWrapDistanceBottom = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceBottom, 0, false, true); - aPropSet.setProperty(PROP_LeftMargin, uno::makeAny(nWrapDistanceLeft)); - aPropSet.setProperty(PROP_RightMargin, uno::makeAny(nWrapDistanceRight)); - aPropSet.setProperty(PROP_TopMargin, uno::makeAny(nWrapDistanceTop)); - aPropSet.setProperty(PROP_BottomMargin, uno::makeAny(nWrapDistanceBottom)); + aPropSet.setProperty(PROP_LeftMargin, uno::Any(nWrapDistanceLeft)); + aPropSet.setProperty(PROP_RightMargin, uno::Any(nWrapDistanceRight)); + aPropSet.setProperty(PROP_TopMargin, uno::Any(nWrapDistanceTop)); + aPropSet.setProperty(PROP_BottomMargin, uno::Any(nWrapDistanceBottom)); if (maTypeModel.moCropBottom.has() || maTypeModel.moCropLeft.has() || maTypeModel.moCropRight.has() || maTypeModel.moCropTop.has()) { @@ -995,7 +995,7 @@ Reference< XShape > SimpleShape::createPictureObject(const Reference< XShapes >& if (maTypeModel.mnGain == -70 && maTypeModel.mnBlacklevel == 70) { // Map MSO 'washout' to our watermark colormode. - aPropSet.setProperty(PROP_GraphicColorMode, uno::makeAny(drawing::ColorMode_WATERMARK)); + aPropSet.setProperty(PROP_GraphicColorMode, uno::Any(drawing::ColorMode_WATERMARK)); } } return xShape; @@ -1028,7 +1028,7 @@ Reference<XShape> RectangleShape::implConvertAndInsert(const Reference<XShapes>& nRadius = size * nValue / 65536; else if ( cLastChar == '%' ) nRadius = size * nValue / 100; - PropertySet( xShape ).setAnyProperty( PROP_CornerRadius, makeAny( nRadius ) ); + PropertySet( xShape ).setAnyProperty( PROP_CornerRadius, Any( nRadius ) ); } return xShape; } @@ -1443,33 +1443,33 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes // Store signature line properties uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY); - xPropertySet->setPropertyValue("IsSignatureLine", uno::makeAny(true)); + xPropertySet->setPropertyValue("IsSignatureLine", uno::Any(true)); xPropertySet->setPropertyValue("SignatureLineId", - uno::makeAny(getShapeModel().maSignatureId)); + uno::Any(getShapeModel().maSignatureId)); xPropertySet->setPropertyValue( "SignatureLineSuggestedSignerName", - uno::makeAny(getShapeModel().maSignatureLineSuggestedSignerName)); + uno::Any(getShapeModel().maSignatureLineSuggestedSignerName)); xPropertySet->setPropertyValue( "SignatureLineSuggestedSignerTitle", - uno::makeAny(getShapeModel().maSignatureLineSuggestedSignerTitle)); + uno::Any(getShapeModel().maSignatureLineSuggestedSignerTitle)); xPropertySet->setPropertyValue( "SignatureLineSuggestedSignerEmail", - uno::makeAny(getShapeModel().maSignatureLineSuggestedSignerEmail)); + uno::Any(getShapeModel().maSignatureLineSuggestedSignerEmail)); xPropertySet->setPropertyValue( "SignatureLineSigningInstructions", - uno::makeAny(getShapeModel().maSignatureLineSigningInstructions)); + uno::Any(getShapeModel().maSignatureLineSigningInstructions)); xPropertySet->setPropertyValue( "SignatureLineShowSignDate", - uno::makeAny(getShapeModel().mbSignatureLineShowSignDate)); + uno::Any(getShapeModel().mbSignatureLineShowSignDate)); xPropertySet->setPropertyValue( "SignatureLineCanAddComment", - uno::makeAny(getShapeModel().mbSignatureLineCanAddComment)); - xPropertySet->setPropertyValue("SignatureLineIsSigned", uno::makeAny(bIsSigned)); + uno::Any(getShapeModel().mbSignatureLineCanAddComment)); + xPropertySet->setPropertyValue("SignatureLineIsSigned", uno::Any(bIsSigned)); if (!aGraphicPath.isEmpty()) { xGraphic = rFilter.getGraphicHelper().importEmbeddedGraphic(aGraphicPath); - xPropertySet->setPropertyValue("SignatureLineUnsignedImage", uno::makeAny(xGraphic)); + xPropertySet->setPropertyValue("SignatureLineUnsignedImage", uno::Any(xGraphic)); } return xShape; } @@ -1480,7 +1480,7 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes Reference<XShape> xShape = SimpleShape::createEmbeddedPictureObject(rxShapes, rShapeRect, aGraphicPath); // AS_CHARACTER shape: vertical orientation default is bottom, MSO default is top. if ( maTypeModel.maPosition != "absolute" && maTypeModel.maPosition != "relative" ) - PropertySet( xShape ).setAnyProperty( PROP_VertOrient, makeAny(text::VertOrientation::TOP)); + PropertySet( xShape ).setAnyProperty( PROP_VertOrient, Any(text::VertOrientation::TOP)); // Apply stroke props from the type model. oox::drawingml::ShapePropertyMap aPropMap(mrDrawing.getFilter().getModelObjectHelper()); @@ -1558,14 +1558,14 @@ Reference< XShape > GroupShape::implConvertAndInsert( const Reference< XShapes > sal_Int32 nLength = aGrabBag.getLength(); aGrabBag.realloc(nLength + 1); aGrabBag.getArray()[nLength] = comphelper::makePropertyValue("mso-edit-as", maTypeModel.maEditAs); - xPropertySet->setPropertyValue("InteropGrabBag", uno::makeAny(aGrabBag)); + xPropertySet->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag)); } // Make sure group shapes are inline as well, unless there is an explicit different style. PropertySet aPropertySet(xGroupShape); const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper(); lcl_SetAnchorType(aPropertySet, maTypeModel, rGraphicHelper); if (!maTypeModel.maRotation.isEmpty()) - aPropertySet.setAnyProperty(PROP_RotateAngle, makeAny(ConversionHelper::decodeRotation(maTypeModel.maRotation).get())); + aPropertySet.setAnyProperty(PROP_RotateAngle, Any(ConversionHelper::decodeRotation(maTypeModel.maRotation).get())); return xGroupShape; } diff --git a/oox/source/vml/vmltextbox.cxx b/oox/source/vml/vmltextbox.cxx index ed11aa4ec825..1162eb2aa237 100644 --- a/oox/source/vml/vmltextbox.cxx +++ b/oox/source/vml/vmltextbox.cxx @@ -168,7 +168,7 @@ void TextBox::convert(const uno::Reference<drawing::XShape>& xShape) const uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY_THROW); aGrabBag.update( xPropertySet->getPropertyValue("CharInteropGrabBag") ); aGrabBag["mso-pStyle"] <<= sParaStyle; - xPropertySet->setPropertyValue("CharInteropGrabBag", uno::makeAny(aGrabBag.getAsConstPropertyValueList())); + xPropertySet->setPropertyValue("CharInteropGrabBag", uno::Any(aGrabBag.getAsConstPropertyValueList())); } catch (const uno::Exception&) { @@ -194,9 +194,9 @@ void TextBox::convert(const uno::Reference<drawing::XShape>& xShape) const // As a result, we need to set horizontal adjustment here to 'right', // that will result in vertical 'top' after writing mode is applied, // which matches the VML behavior. - xProperties->setPropertyValue("TextHorizontalAdjust", uno::makeAny(drawing::TextHorizontalAdjust_RIGHT)); + xProperties->setPropertyValue("TextHorizontalAdjust", uno::Any(drawing::TextHorizontalAdjust_RIGHT)); - xProperties->setPropertyValue( "TextWritingMode", uno::makeAny( text::WritingMode_TB_RL ) ); + xProperties->setPropertyValue( "TextWritingMode", uno::Any( text::WritingMode_TB_RL ) ); } } // namespace oox::vml |