diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-02 14:25:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-03 12:10:52 +0200 |
commit | 4d55513852d41ed72e945597b1f8749c14562012 (patch) | |
tree | bedae34037b1588a69841a2725d012ac5f474c70 /xmloff/source/draw | |
parent | cbc34f69ec6363cd234ad2b1dfe09bfb531238db (diff) |
Just use Any ctor instead of makeAny in xmloff
Change-Id: Ibefb18e5b798ccf1f9d7a5ba1524c9fb1e9bee32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133700
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/XMLGraphicsDefaultStyle.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/draw/XMLImageMapContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/XMLReplacementImageContext.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/draw/animationimport.cxx | 42 | ||||
-rw-r--r-- | xmloff/source/draw/animimp.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlimp.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/draw/shapeimport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/ximpbody.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/ximppage.cxx | 14 | ||||
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 56 | ||||
-rw-r--r-- | xmloff/source/draw/ximpstyl.cxx | 6 |
13 files changed, 77 insertions, 78 deletions
diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index 7bb493731f68..4f9799c48666 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -130,7 +130,7 @@ void XMLGraphicsDefaultStyle::SetDefaults() { // OOo 1.x only supported "true" so that is the more appropriate // default for OOoXML format documents. - xDefaults->setPropertyValue("IsFollowingTextFlow", uno::makeAny(true)); + xDefaults->setPropertyValue("IsFollowingTextFlow", uno::Any(true)); } // NOTE: the only reason why it's legal to check "==" (not "<") against @@ -160,7 +160,7 @@ void XMLGraphicsDefaultStyle::SetDefaults() { Color const nStroke( bIsAOO4 ? Color(128, 128, 128) : COL_BLACK); - xDefaults->setPropertyValue("LineColor", makeAny(nStroke)); + xDefaults->setPropertyValue("LineColor", Any(nStroke)); } Color const nFillColor( bIsAOO4 ? Color(0xCF, 0xE7, 0xF5) : Color(153, 204, 255)); @@ -169,7 +169,7 @@ void XMLGraphicsDefaultStyle::SetDefaults() if (std::none_of(GetProperties().begin(), GetProperties().end(), XMLPropertyByIndex(nFillIndex))) { - xDefaults->setPropertyValue("FillColor", makeAny(nFillColor)); + xDefaults->setPropertyValue("FillColor", Any(nFillColor)); } if (xInfo->hasPropertyByName("FillColor2")) { @@ -178,7 +178,7 @@ void XMLGraphicsDefaultStyle::SetDefaults() if (std::none_of(GetProperties().begin(), GetProperties().end(), XMLPropertyByIndex(nFill2Index))) { - xDefaults->setPropertyValue("FillColor2", makeAny(sal_Int32(nFillColor))); + xDefaults->setPropertyValue("FillColor2", Any(sal_Int32(nFillColor))); } } } diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx index 09958b7ca7f5..1b9c295d03ef 100644 --- a/xmloff/source/draw/XMLImageMapContext.cxx +++ b/xmloff/source/draw/XMLImageMapContext.cxx @@ -536,7 +536,7 @@ void XMLImageMapContext::endFastElement(sal_Int32 ) Reference < XPropertySetInfo > xInfo = xPropertySet->getPropertySetInfo(); if( xInfo.is() && xInfo->hasPropertyByName( gsImageMap ) ) - xPropertySet->setPropertyValue(gsImageMap, uno::makeAny( xImageMap ) ); + xPropertySet->setPropertyValue(gsImageMap, uno::Any( xImageMap ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLReplacementImageContext.cxx b/xmloff/source/draw/XMLReplacementImageContext.cxx index 3d7ad0e62e93..5321d55788b6 100644 --- a/xmloff/source/draw/XMLReplacementImageContext.cxx +++ b/xmloff/source/draw/XMLReplacementImageContext.cxx @@ -29,7 +29,6 @@ #include <sal/log.hxx> using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::makeAny; using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::beans; using namespace css; @@ -75,7 +74,7 @@ void XMLReplacementImageContext::endFastElement(sal_Int32 ) if (xGraphic.is() && xPropSetInfo->hasPropertyByName("Graphic")) { - m_xPropSet->setPropertyValue("Graphic", uno::makeAny(xGraphic)); + m_xPropSet->setPropertyValue("Graphic", uno::Any(xGraphic)); } } diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 8a4cd27d24b5..826b4b0a04bf 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -167,7 +167,7 @@ Any AnimationsImportHelperImpl::convertTarget( const OUString& rValue ) Reference< XShape > _xShape( xRef, UNO_QUERY ); if( _xShape.is() ) - return makeAny( _xShape ); + return Any( _xShape ); Reference< XTextCursor > xTextCursor( xRef, UNO_QUERY ); if( xTextCursor.is() ) @@ -187,7 +187,7 @@ Any AnimationsImportHelperImpl::convertTarget( const OUString& rValue ) // break if start of selection is prior to end of current paragraph if( xRange.is() && (xTextRangeCompare->compareRegionEnds( xStart, xRange ) >= 0 ) ) { - return makeAny( ParagraphTarget( xShape, nParagraph ) ); + return Any( ParagraphTarget( xShape, nParagraph ) ); } nParagraph++; @@ -233,7 +233,7 @@ Any AnimationsImportHelperImpl::convertValue( XMLTokenEnum eAttributeName, const ValuePair aPair; aPair.First = convertValue( eAttributeName, rValue.copy( 0, nCommaPos ) ); aPair.Second = convertValue( eAttributeName, rValue.copy( nCommaPos+1 ) ); - return makeAny( aPair ); + return Any( aPair ); } else { @@ -248,7 +248,7 @@ Any AnimationsImportHelperImpl::convertValue( XMLTokenEnum eAttributeName, const case XML_HEIGHT: case XML_TRANSLATE: { - return makeAny( rValue ); + return Any( rValue ); } case XML_SCALE: @@ -425,7 +425,7 @@ Sequence< TimeFilterPair > AnimationsImportHelperImpl::convertTimeFilter( std::s Any AnimationsImportHelperImpl::convertPath( const OUString& rValue ) { - return makeAny( rValue ); + return Any( rValue ); } @@ -520,7 +520,7 @@ AnimationNodeContext::AnimationNodeContext( if( nPresetClass != EffectPresetClass::CUSTOM ) { Reference< XInitialization > xInit( mxNode, UNO_QUERY_THROW ); - const Any aAny( makeAny( nPresetClass ) ); + const Any aAny( nPresetClass ); Sequence< Any > aArgs( &aAny, 1 ) ; xInit->initialize( aArgs ); } @@ -662,7 +662,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: case XML_ELEMENT(SMIL_SO52, XML_ENDSYNC): { if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toView(), aAnimations_EnumMap_Endsync ) ) - mxNode->setEndSync( makeAny( nEnum ) ); + mxNode->setEndSync( Any( nEnum ) ); } break; case XML_ELEMENT(PRESENTATION, XML_NODE_TYPE): @@ -671,7 +671,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: case XML_ELEMENT(PRESENTATION_OASIS, XML_NODE_TYPE): { if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toView(), aAnimations_EnumMap_EffectNodeType ) ) - aUserData.emplace_back( GetXMLToken( XML_NODE_TYPE ), makeAny( nEnum ) ); + aUserData.emplace_back( GetXMLToken( XML_NODE_TYPE ), Any( nEnum ) ); } break; case XML_ELEMENT(PRESENTATION, XML_PRESET_ID): @@ -679,7 +679,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: case XML_ELEMENT(PRESENTATION_OOO, XML_PRESET_ID): case XML_ELEMENT(PRESENTATION_OASIS, XML_PRESET_ID): { - aUserData.emplace_back( GetXMLToken( XML_PRESET_ID ), makeAny( aIter.toString() ) ); + aUserData.emplace_back( GetXMLToken( XML_PRESET_ID ), Any( aIter.toString() ) ); } break; case XML_ELEMENT(PRESENTATION, XML_PRESET_SUB_TYPE): @@ -687,7 +687,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: case XML_ELEMENT(PRESENTATION_OOO, XML_PRESET_SUB_TYPE): case XML_ELEMENT(PRESENTATION_OASIS, XML_PRESET_SUB_TYPE): { - aUserData.emplace_back( GetXMLToken( XML_PRESET_SUB_TYPE ), makeAny( aIter.toString() ) ); + aUserData.emplace_back( GetXMLToken( XML_PRESET_SUB_TYPE ), Any( aIter.toString() ) ); } break; case XML_ELEMENT(PRESENTATION, XML_PRESET_CLASS): @@ -696,7 +696,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: case XML_ELEMENT(PRESENTATION_OASIS, XML_PRESET_CLASS): { if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toView(), aAnimations_EnumMap_EffectPresetClass ) ) - aUserData.emplace_back( GetXMLToken( XML_PRESET_CLASS ), makeAny( nEnum ) ); + aUserData.emplace_back( GetXMLToken( XML_PRESET_CLASS ), Any( nEnum ) ); } break; case XML_ELEMENT(PRESENTATION, XML_AFTER_EFFECT): @@ -705,7 +705,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: { bool bTemp; if (::sax::Converter::convertBool( bTemp, aIter.toView() )) - aUserData.emplace_back( GetXMLToken( XML_AFTER_EFFECT ), makeAny( bTemp ) ); + aUserData.emplace_back( GetXMLToken( XML_AFTER_EFFECT ), Any( bTemp ) ); } break; case XML_ELEMENT(XLINK, XML_HREF): @@ -713,7 +713,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: if( nNodeType == AnimationNodeType::AUDIO ) { Reference< XAudio > xAudio( mxNode, UNO_QUERY_THROW ); - xAudio->setSource( makeAny(lcl_GetMediaReference(GetImport(), aIter.toString())) ); + xAudio->setSource( Any(lcl_GetMediaReference(GetImport(), aIter.toString())) ); break; } [[fallthrough]]; @@ -758,7 +758,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: case XML_ELEMENT(PRESENTATION_OOO, XML_MASTER_ELEMENT): { Reference< XAnimationNode > xMaster( GetImport().getInterfaceToIdentifierMapper().getReference( aIter.toString() ), UNO_QUERY ); - aUserData.emplace_back( GetXMLToken( XML_MASTER_ELEMENT ), makeAny( xMaster ) ); + aUserData.emplace_back( GetXMLToken( XML_MASTER_ELEMENT ), Any( xMaster ) ); } break; @@ -927,7 +927,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: { Reference< XAnimatePhysics > xAnimatePhysics( mxNode, UNO_QUERY ); if( xAnimatePhysics.is() ) - xAnimatePhysics->setStartVelocityX( makeAny(aIter.toDouble()) ); + xAnimatePhysics->setStartVelocityX( Any(aIter.toDouble()) ); } break; @@ -937,7 +937,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: { Reference< XAnimatePhysics > xAnimatePhysics( mxNode, UNO_QUERY ); if( xAnimatePhysics.is() ) - xAnimatePhysics->setStartVelocityY( makeAny(aIter.toDouble()) ); + xAnimatePhysics->setStartVelocityY( Any(aIter.toDouble()) ); } break; @@ -947,7 +947,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: { Reference< XAnimatePhysics > xAnimatePhysics( mxNode, UNO_QUERY ); if( xAnimatePhysics.is() ) - xAnimatePhysics->setDensity( makeAny(aIter.toDouble()) ); + xAnimatePhysics->setDensity( Any(aIter.toDouble()) ); } break; @@ -957,7 +957,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: { Reference< XAnimatePhysics > xAnimatePhysics( mxNode, UNO_QUERY ); if( xAnimatePhysics.is() ) - xAnimatePhysics->setBounciness( makeAny(aIter.toDouble()) ); + xAnimatePhysics->setBounciness( Any(aIter.toDouble()) ); } break; @@ -1100,7 +1100,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: case XML_ELEMENT(PRESENTATION_SO52, XML_GROUP_ID): case XML_ELEMENT(PRESENTATION_OOO, XML_GROUP_ID): { - aUserData.emplace_back( "group-id", makeAny( aIter.toInt32() ) ); + aUserData.emplace_back( "group-id", Any( aIter.toInt32() ) ); } break; @@ -1125,7 +1125,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: || IsTokenInNamespace(nToken, XML_NAMESPACE_PRESENTATION_OASIS) || IsTokenInNamespace(nToken, XML_NAMESPACE_PRESENTATION_OOO)) { - aUserData.emplace_back( SvXMLImport::getNameFromToken(aIter.getToken()), makeAny( aIter.toString() ) ); + aUserData.emplace_back( SvXMLImport::getNameFromToken(aIter.getToken()), Any( aIter.toString() ) ); } else XMLOFF_WARN_UNKNOWN("xmloff", aIter); @@ -1226,7 +1226,7 @@ Any SAL_CALL AnimationsImport::queryInterface( const Type& aType ) { if ( aType == cppu::UnoType<XAnimationNodeSupplier>::get()) { - return makeAny( Reference<XAnimationNodeSupplier>( this ) ); + return Any( Reference<XAnimationNodeSupplier>( this ) ); } else { diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index 94dff040c288..ffdd3bef7222 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.cxx @@ -547,16 +547,16 @@ void XMLAnimationsEffectContext::endFastElement(sal_Int32 ) const AnimationEffect eEffect = ImplSdXMLgetEffect( meEffect, meDirection, mnStartScale, meKind == XMLE_SHOW ); if (mbTextEffect) - xSet->setPropertyValue( gsTextEffect, makeAny( eEffect ) ); + xSet->setPropertyValue( gsTextEffect, Any( eEffect ) ); else - xSet->setPropertyValue( gsEffect, makeAny( eEffect ) ); - xSet->setPropertyValue( gsSpeed, makeAny( meSpeed ) ); + xSet->setPropertyValue( gsEffect, Any( eEffect ) ); + xSet->setPropertyValue( gsSpeed, Any( meSpeed ) ); if( eEffect == AnimationEffect_PATH && !maPathShapeId.isEmpty() ) { Reference< XShape > xPath( GetImport().getInterfaceToIdentifierMapper().getReference( maPathShapeId ), UNO_QUERY ); if( xPath.is() ) - xSet->setPropertyValue( gsAnimPath, makeAny( xPath ) ); + xSet->setPropertyValue( gsAnimPath, Any( xPath ) ); } } } diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 3cb6034193b0..50a475381203 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -1610,7 +1610,7 @@ void SdXMLExport::ImpWritePresentationStyles() void SdXMLExport::ExportMeta_() { - uno::Sequence<beans::NamedValue> stats { { "ObjectCount", uno::makeAny(mnObjectCount) } }; + uno::Sequence<beans::NamedValue> stats { { "ObjectCount", uno::Any(mnObjectCount) } }; // update document statistics at the model uno::Reference<document::XDocumentPropertiesSupplier> xPropSup(GetModel(), diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 2776880934ec..6ffc7140531e 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -510,7 +510,7 @@ void SdXMLImport::SetViewSettings(const css::uno::Sequence<css::beans::PropertyV try { - xPropSet->setPropertyValue("VisibleArea", uno::makeAny( aVisArea ) ); + xPropSet->setPropertyValue("VisibleArea", uno::Any( aVisArea ) ); } catch(const css::uno::Exception&) { @@ -656,7 +656,7 @@ void SdXMLImport::NotifyContainsEmbeddedFont() { uno::Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY ); if( xProps.is() ) - xProps->setPropertyValue("EmbedFonts", uno::makeAny( true ) ); + xProps->setPropertyValue("EmbedFonts", uno::Any( true ) ); } } diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 9b069a07eb2c..89eceb95982c 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -415,7 +415,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap // as member, thus saving time. DBG_ASSERT(-1 != nIndex, "XMLShapeExport::collectShapeAutoStyles: could not obtain the index for our context id!"); - XMLPropertyState aNewState(nIndex, uno::makeAny(sNumberStyle)); + XMLPropertyState aNewState(nIndex, uno::Any(sNumberStyle)); aPropStates.push_back(aNewState); } } @@ -3315,10 +3315,10 @@ static void lcl_CopyStream( uno::UNO_QUERY); if (xStreamProps.is()) { // this is NOT supported in FileSystemStorage xStreamProps->setPropertyValue("MediaType", - uno::makeAny(rMimeType)); + uno::Any(rMimeType)); xStreamProps->setPropertyValue( // turn off compression "Compressed", - uno::makeAny(false)); + uno::Any(false)); } ::comphelper::OStorageHelper::CopyInputToOutput(xInStream, xOutStream); xOutStream->closeOutput(); diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index bfbcf180feab..930051b2aeec 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -466,7 +466,7 @@ void XMLShapeImportHelper::addShape( uno::Reference< drawing::XShape >& rShape, uno::Reference<beans::XPropertySet> xPropertySet(rShape, uno::UNO_QUERY); if (xPropertySet.is()) { - xPropertySet->setPropertyValue("HandlePathObjScale", uno::makeAny(true)); + xPropertySet->setPropertyValue("HandlePathObjScale", uno::Any(true)); } } } diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index 1f869f520b79..198503eab2cd 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.cxx @@ -196,7 +196,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, + aBookmarkName; } - xProps->setPropertyValue("BookmarkURL", uno::makeAny( sHREF ) ); + xProps->setPropertyValue("BookmarkURL", uno::Any( sHREF ) ); } } diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index c6777d015236..c37b2de99f6c 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -289,7 +289,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 ) static const OUStringLiteral aStrHeaderTextProp( u"HeaderText" ); if( xInfo->hasPropertyByName( aStrHeaderTextProp ) ) xSet->setPropertyValue( aStrHeaderTextProp, - makeAny( GetSdImport().GetHeaderDecl( maUseHeaderDeclName ) ) ); + Any( GetSdImport().GetHeaderDecl( maUseHeaderDeclName ) ) ); } if( !maUseFooterDeclName.isEmpty() ) @@ -297,7 +297,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 ) static const OUStringLiteral aStrFooterTextProp( u"FooterText" ); if( xInfo->hasPropertyByName( aStrFooterTextProp ) ) xSet->setPropertyValue( aStrFooterTextProp, - makeAny( GetSdImport().GetFooterDecl( maUseFooterDeclName ) ) ); + Any( GetSdImport().GetFooterDecl( maUseFooterDeclName ) ) ); } if( !maUseDateTimeDeclName.isEmpty() ) @@ -310,11 +310,11 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 ) const OUString aText( GetSdImport().GetDateTimeDecl( maUseDateTimeDeclName, bFixed, aDateTimeFormat ) ); xSet->setPropertyValue("IsDateTimeFixed", - makeAny( bFixed ) ); + Any( bFixed ) ); if( bFixed ) { - xSet->setPropertyValue( aStrDateTimeTextProp, makeAny( aText ) ); + xSet->setPropertyValue( aStrDateTimeTextProp, Any( aText ) ); } else if( !aDateTimeFormat.isEmpty() ) { @@ -330,7 +330,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 ) if( pSdNumStyle ) { xSet->setPropertyValue("DateTimeFormat", - makeAny( pSdNumStyle->GetDrawKey() ) ); + Any( pSdNumStyle->GetDrawKey() ) ); } } } @@ -391,7 +391,7 @@ void SdXMLGenericPageContext::SetStyle( OUString const & rStyleName ) const_cast<XMLPropStyleContext*>(pPropStyle)->FillPropertySet(xPropSet); if( xBackgroundSet.is() ) - xPropSet1->setPropertyValue( aBackground, uno::makeAny( xBackgroundSet ) ); + xPropSet1->setPropertyValue( aBackground, uno::Any( xBackgroundSet ) ); } } } @@ -442,7 +442,7 @@ void SdXMLGenericPageContext::SetLayout() OUString aPropName("Layout"); Reference< beans::XPropertySetInfo > xInfo( xPropSet->getPropertySetInfo() ); if( xInfo.is() && xInfo->hasPropertyByName( aPropName ) ) - xPropSet->setPropertyValue(aPropName, uno::makeAny( static_cast<sal_Int16>(nType) ) ); + xPropSet->setPropertyValue(aPropName, uno::Any( static_cast<sal_Int16>(nType) ) ); } } } diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index d0e400a8de33..9e2973403142 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -308,7 +308,7 @@ void SdXMLShapeContext::addGluePoint( const uno::Reference< xml::sax::XFastAttri { try { - sal_Int32 nInternalId = mxGluePoints->insert( uno::makeAny( aGluePoint ) ); + sal_Int32 nInternalId = mxGluePoints->insert( uno::Any( aGluePoint ) ); GetImport().GetShapeImport()->addGluePointMapping( mxShape, nId, nInternalId ); } catch(const uno::Exception&) @@ -449,9 +449,9 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape) uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY); uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo(); if (mnRelWidth && xPropertySetInfo->hasPropertyByName("RelativeWidth")) - xPropertySet->setPropertyValue("RelativeWidth", uno::makeAny(mnRelWidth)); + xPropertySet->setPropertyValue("RelativeWidth", uno::Any(mnRelWidth)); if (mnRelHeight && xPropertySetInfo->hasPropertyByName("RelativeHeight")) - xPropertySet->setPropertyValue("RelativeHeight", uno::makeAny(mnRelHeight)); + xPropertySet->setPropertyValue("RelativeHeight", uno::Any(mnRelHeight)); } if( !maShapeId.isEmpty() ) @@ -707,7 +707,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */) uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropSet->getPropertySetInfo(); if (xPropertySetInfo->hasPropertyByName("TextBox")) - xPropSet->setPropertyValue("TextBox", uno::makeAny(mbTextBox)); + xPropSet->setPropertyValue("TextBox", uno::Any(mbTextBox)); // if this is an auto style, set its properties if(bAutoStyle && pDocStyle) @@ -780,7 +780,7 @@ void SdXMLShapeContext::SetThumbnail() // it at the api uno::Reference<graphic::XGraphic> xGraphic = GetImport().loadGraphicByURL(maThumbnailURL); - xPropSet->setPropertyValue("ThumbnailGraphic", uno::makeAny(xGraphic)); + xPropSet->setPropertyValue("ThumbnailGraphic", uno::Any(xGraphic)); } } catch(const uno::Exception&) @@ -965,7 +965,7 @@ void SdXMLRectShapeContext::startFastElement (sal_Int32 nElement, { try { - xPropSet->setPropertyValue("CornerRadius", uno::makeAny( mnRadius ) ); + xPropSet->setPropertyValue("CornerRadius", uno::Any( mnRadius ) ); } catch(const uno::Exception&) { @@ -1629,7 +1629,7 @@ void SdXMLTextBoxShapeContext::startFastElement (sal_Int32 nElement, { try { - xPropSet->setPropertyValue("CornerRadius", uno::makeAny( mnRadius ) ); + xPropSet->setPropertyValue("CornerRadius", uno::Any( mnRadius ) ); } catch(const uno::Exception&) { @@ -1646,7 +1646,7 @@ void SdXMLTextBoxShapeContext::startFastElement (sal_Int32 nElement, try { xPropSet->setPropertyValue("TextChainNextName", - uno::makeAny( maChainNextName ) ); + uno::Any( maChainNextName ) ); } catch(const uno::Exception&) { @@ -2190,7 +2190,7 @@ void SdXMLPageShapeContext::startFastElement (sal_Int32 nElement, uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() ); static const OUStringLiteral aPageNumberStr(u"PageNumber"); if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(aPageNumberStr)) - xPropSet->setPropertyValue(aPageNumberStr, uno::makeAny( mnPageNumber )); + xPropSet->setPropertyValue(aPageNumberStr, uno::Any( mnPageNumber )); } SdXMLShapeContext::startFastElement(nElement, xAttrList); @@ -2238,16 +2238,16 @@ void SdXMLCaptionShapeContext::startFastElement (sal_Int32 nElement, aAny >>= bIsAutoGrowWidth; if ( bIsAutoGrowWidth ) - xProps->setPropertyValue("TextAutoGrowWidth", uno::makeAny( false ) ); + xProps->setPropertyValue("TextAutoGrowWidth", uno::Any( false ) ); } // set pos, size, shear and rotate SetTransformation(); if( xProps.is() ) - xProps->setPropertyValue("CaptionPoint", uno::makeAny( maCaptionPoint ) ); + xProps->setPropertyValue("CaptionPoint", uno::Any( maCaptionPoint ) ); if ( bIsAutoGrowWidth ) - xProps->setPropertyValue("TextAutoGrowWidth", uno::makeAny( true ) ); + xProps->setPropertyValue("TextAutoGrowWidth", uno::Any( true ) ); if(mnRadius) { @@ -2256,7 +2256,7 @@ void SdXMLCaptionShapeContext::startFastElement (sal_Int32 nElement, { try { - xPropSet->setPropertyValue("CornerRadius", uno::makeAny( mnRadius ) ); + xPropSet->setPropertyValue("CornerRadius", uno::Any( mnRadius ) ); } catch(const uno::Exception&) { @@ -2350,7 +2350,7 @@ void SdXMLGraphicObjectShapeContext::startFastElement (sal_Int32 nElement, uno::Reference< beans::XPropertySetInfo > xPropsInfo( xPropset->getPropertySetInfo() ); if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject")) - xPropset->setPropertyValue("IsEmptyPresentationObject", css::uno::makeAny( mbIsPlaceholder ) ); + xPropset->setPropertyValue("IsEmptyPresentationObject", css::uno::Any( mbIsPlaceholder ) ); if( !mbIsPlaceholder ) { @@ -2359,7 +2359,7 @@ void SdXMLGraphicObjectShapeContext::startFastElement (sal_Int32 nElement, uno::Reference<graphic::XGraphic> xGraphic = GetImport().loadGraphicByURL(maURL); if (xGraphic.is()) { - xPropset->setPropertyValue("Graphic", uno::makeAny(xGraphic)); + xPropset->setPropertyValue("Graphic", uno::Any(xGraphic)); } } } @@ -2395,7 +2395,7 @@ void SdXMLGraphicObjectShapeContext::endFastElement(sal_Int32 nElement) uno::Reference<beans::XPropertySet> xProperties(mxShape, uno::UNO_QUERY); if (xProperties.is()) { - xProperties->setPropertyValue("Graphic", uno::makeAny(xGraphic)); + xProperties->setPropertyValue("Graphic", uno::Any(xGraphic)); } } } @@ -2626,13 +2626,13 @@ void SdXMLObjectShapeContext::startFastElement (sal_Int32 /*nElement*/, aPersistName = aPersistName.copy( sURL.getLength() ); xProps->setPropertyValue("PersistName", - uno::makeAny( aPersistName ) ); + uno::Any( aPersistName ) ); } else { // this is OOo link object xProps->setPropertyValue("LinkURL", - uno::makeAny( aPersistName ) ); + uno::Any( aPersistName ) ); } } } @@ -2660,8 +2660,8 @@ void SdXMLObjectShapeContext::endFastElement(sal_Int32 nElement) if( xProps.is() ) { - xProps->setPropertyValue("FillStyle", uno::makeAny(drawing::FillStyle_NONE)); - xProps->setPropertyValue("LineStyle", uno::makeAny(drawing::LineStyle_NONE)); + xProps->setPropertyValue("FillStyle", uno::Any(drawing::FillStyle_NONE)); + xProps->setPropertyValue("LineStyle", uno::Any(drawing::LineStyle_NONE)); } } @@ -2674,7 +2674,7 @@ void SdXMLObjectShapeContext::endFastElement(sal_Int32 nElement) uno::Reference< beans::XPropertySet > xProps(mxShape, uno::UNO_QUERY); if( xProps.is() ) - xProps->setPropertyValue("PersistName", uno::makeAny( aPersistName ) ); + xProps->setPropertyValue("PersistName", uno::Any( aPersistName ) ); } SdXMLShapeContext::endFastElement(nElement); @@ -2718,7 +2718,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLObjectShapeContex uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY); if( xPropSet.is() ) { - xPropSet->setPropertyValue("CLSID", uno::makeAny( maCLSID ) ); + xPropSet->setPropertyValue("CLSID", uno::Any( maCLSID ) ); uno::Reference< lang::XComponent > xComp; xPropSet->getPropertyValue("Model") >>= xComp; @@ -3009,9 +3009,9 @@ void SdXMLPluginShapeContext::endFastElement(sal_Int32 nElement) else { // in case we have a media object - xProps->setPropertyValue( "MediaURL", uno::makeAny(maHref)); + xProps->setPropertyValue( "MediaURL", uno::Any(maHref)); - xProps->setPropertyValue("MediaMimeType", uno::makeAny(maMimeType) ); + xProps->setPropertyValue("MediaMimeType", uno::Any(maMimeType) ); for( const auto& rParam : std::as_const(maParams) ) { @@ -3022,21 +3022,21 @@ void SdXMLPluginShapeContext::endFastElement(sal_Int32 nElement) OUString aValueStr; rParam.Value >>= aValueStr; xProps->setPropertyValue("Loop", - uno::makeAny( aValueStr == "true" ) ); + uno::Any( aValueStr == "true" ) ); } else if( rName == "Mute" ) { OUString aValueStr; rParam.Value >>= aValueStr; xProps->setPropertyValue("Mute", - uno::makeAny( aValueStr == "true" ) ); + uno::Any( aValueStr == "true" ) ); } else if( rName == "VolumeDB" ) { OUString aValueStr; rParam.Value >>= aValueStr; xProps->setPropertyValue("VolumeDB", - uno::makeAny( static_cast< sal_Int16 >( aValueStr.toInt32() ) ) ); + uno::Any( static_cast< sal_Int16 >( aValueStr.toInt32() ) ) ); } else if( rName == "Zoom" ) { @@ -3064,7 +3064,7 @@ void SdXMLPluginShapeContext::endFastElement(sal_Int32 nElement) else eZoomLevel = media::ZoomLevel_NOT_AVAILABLE; - xProps->setPropertyValue("Zoom", uno::makeAny( eZoomLevel ) ); + xProps->setPropertyValue("Zoom", uno::Any( eZoomLevel ) ); } } } diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index e6d41e3cf003..4befbb00815c 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -1084,7 +1084,7 @@ void SdXMLStylesContext::endFastElement(sal_Int32 ) uno::Reference< beans::XPropertySetInfo > xInfoSetInfo( xInfoSet->getPropertySetInfo() ); if( xInfoSetInfo->hasPropertyByName("PageLayouts") ) - xInfoSet->setPropertyValue("PageLayouts", uno::makeAny( getPageLayouts() ) ); + xInfoSet->setPropertyValue("PageLayouts", uno::Any( getPageLayouts() ) ); } } @@ -1347,7 +1347,7 @@ uno::Reference< container::XNameAccess > SdXMLStylesContext::getPageLayouts() co const SvXMLStyleContext* pStyle = GetStyle(a); if (const SdXMLPresentationPageLayoutContext* pContext = dynamic_cast<const SdXMLPresentationPageLayoutContext*>(pStyle)) { - xLayouts->insertByName(pStyle->GetName(), uno::makeAny(static_cast<sal_Int32>(pContext->GetTypeId()))); + xLayouts->insertByName(pStyle->GetName(), uno::Any(static_cast<sal_Int32>(pContext->GetTypeId()))); } } @@ -1507,7 +1507,7 @@ XMLThemeContext::XMLThemeContext(SvXMLImport& rImport, XMLThemeContext::~XMLThemeContext() { - uno::Any aTheme = uno::makeAny(m_aTheme.getAsConstPropertyValueList()); + uno::Any aTheme(m_aTheme.getAsConstPropertyValueList()); m_xMasterPage->setPropertyValue("Theme", aTheme); } |