summaryrefslogtreecommitdiff
path: root/xmloff/source/draw
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r--xmloff/source/draw/XMLImageMapContext.cxx59
-rw-r--r--xmloff/source/draw/XMLShapePropertySetContext.cxx5
-rw-r--r--xmloff/source/draw/animimp.cxx24
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx5
-rw-r--r--xmloff/source/draw/shapeexport.cxx4
-rw-r--r--xmloff/source/draw/shapeimport.cxx11
-rw-r--r--xmloff/source/draw/ximp3dobject.cxx18
-rw-r--r--xmloff/source/draw/ximp3dscene.cxx32
-rw-r--r--xmloff/source/draw/ximppage.cxx29
-rw-r--r--xmloff/source/draw/ximpshap.cxx130
-rw-r--r--xmloff/source/draw/ximpshow.cxx15
11 files changed, 92 insertions, 240 deletions
diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx
index 55f94824b9be..cb19429a244f 100644
--- a/xmloff/source/draw/XMLImageMapContext.cxx
+++ b/xmloff/source/draw/XMLImageMapContext.cxx
@@ -25,7 +25,6 @@
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <com/sun/star/document/XEventsSupplier.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
#include <xmloff/xmltoken.hxx>
@@ -54,7 +53,6 @@ using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::xml::sax::XAttributeList;
using ::com::sun::star::uno::XInterface;
using ::com::sun::star::uno::Any;
-using ::com::sun::star::drawing::PointSequenceSequence;
using ::com::sun::star::document::XEventsSupplier;
@@ -128,21 +126,18 @@ public:
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XIndexContainer> xMap,
+ css::uno::Reference<css::container::XIndexContainer> const & xMap,
const sal_Char* pServiceName);
void StartElement(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) override;
+ const css::uno::Reference<css::xml::sax::XAttributeList >& xAttrList ) override;
void EndElement() override;
SvXMLImportContext *CreateChildContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::xml::sax::XAttributeList> & xAttrList ) override;
+ const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override;
protected:
@@ -151,8 +146,7 @@ protected:
const OUString& rValue);
virtual void Prepare(
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet> & rPropertySet);
+ css::uno::Reference<css::beans::XPropertySet> & rPropertySet);
};
@@ -160,7 +154,7 @@ XMLImageMapObjectContext::XMLImageMapObjectContext(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- Reference<XIndexContainer> xMap,
+ Reference<XIndexContainer> const & xMap,
const sal_Char* pServiceName) :
SvXMLImportContext(rImport, nPrefix, rLocalName),
sBoundary("Boundary"),
@@ -226,9 +220,7 @@ void XMLImageMapObjectContext::EndElement()
Prepare( xMapEntry );
// insert into image map
- Any aAny;
- aAny <<= xMapEntry;
- xImageMap->insertByIndex( xImageMap->getCount(), aAny );
+ xImageMap->insertByIndex( xImageMap->getCount(), Any(xMapEntry) );
}
// else: not valid -> don't create and insert
}
@@ -317,8 +309,7 @@ public:
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XIndexContainer> xMap);
+ css::uno::Reference<css::container::XIndexContainer> const & xMap);
virtual ~XMLImageMapRectangleContext();
@@ -328,8 +319,7 @@ protected:
const OUString& rValue) override;
virtual void Prepare(
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet> & rPropertySet) override;
+ css::uno::Reference<css::beans::XPropertySet> & rPropertySet) override;
};
@@ -337,7 +327,7 @@ XMLImageMapRectangleContext::XMLImageMapRectangleContext(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- Reference<XIndexContainer> xMap) :
+ Reference<XIndexContainer> const & xMap) :
XMLImageMapObjectContext(rImport, nPrefix, rLocalName, xMap,
"com.sun.star.image.ImageMapRectangleObject"),
bXOK(false),
@@ -400,9 +390,7 @@ void XMLImageMapRectangleContext::ProcessAttribute(
void XMLImageMapRectangleContext::Prepare(
Reference<XPropertySet> & rPropertySet)
{
- Any aAny;
- aAny <<= aRectangle;
- rPropertySet->setPropertyValue( sBoundary, aAny );
+ rPropertySet->setPropertyValue( sBoundary, uno::Any(aRectangle) );
// common properties handled by super class
XMLImageMapObjectContext::Prepare(rPropertySet);
@@ -423,8 +411,7 @@ public:
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XIndexContainer> xMap);
+ css::uno::Reference<css::container::XIndexContainer> const & xMap);
virtual ~XMLImageMapPolygonContext();
@@ -434,8 +421,7 @@ protected:
const OUString& rValue) override;
virtual void Prepare(
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet> & rPropertySet) override;
+ css::uno::Reference<css::beans::XPropertySet> & rPropertySet) override;
};
@@ -443,7 +429,7 @@ XMLImageMapPolygonContext::XMLImageMapPolygonContext(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- Reference<XIndexContainer> xMap) :
+ Reference<XIndexContainer> const & xMap) :
XMLImageMapObjectContext(rImport, nPrefix, rLocalName, xMap,
"com.sun.star.image.ImageMapPolygonObject"),
bViewBoxOK(false),
@@ -493,8 +479,7 @@ void XMLImageMapPolygonContext::Prepare(Reference<XPropertySet> & rPropertySet)
uno::Any aAny;
basegfx::tools::B2DPolygonToUnoPointSequence(aPolygon, aPointSequence);
- aAny <<= aPointSequence;
- rPropertySet->setPropertyValue(sPolygon, aAny);
+ rPropertySet->setPropertyValue(sPolygon, Any(aPointSequence));
}
}
@@ -517,8 +502,7 @@ public:
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XIndexContainer> xMap);
+ css::uno::Reference<css::container::XIndexContainer> const & xMap);
virtual ~XMLImageMapCircleContext();
@@ -528,8 +512,7 @@ protected:
const OUString& rValue) override;
virtual void Prepare(
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet> & rPropertySet) override;
+ css::uno::Reference<css::beans::XPropertySet> & rPropertySet) override;
};
@@ -537,7 +520,7 @@ XMLImageMapCircleContext::XMLImageMapCircleContext(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- Reference<XIndexContainer> xMap)
+ Reference<XIndexContainer> const & xMap)
: XMLImageMapObjectContext(rImport, nPrefix, rLocalName, xMap,
"com.sun.star.image.ImageMapCircleObject")
, nRadius(0)
@@ -593,13 +576,9 @@ void XMLImageMapCircleContext::Prepare(
Reference<XPropertySet> & rPropertySet)
{
// center (x,y)
- Any aAny;
- aAny <<= aCenter;
- rPropertySet->setPropertyValue( sCenter, aAny );
-
+ rPropertySet->setPropertyValue( sCenter, uno::Any(aCenter) );
// radius
- aAny <<= nRadius;
- rPropertySet->setPropertyValue( sRadius, aAny );
+ rPropertySet->setPropertyValue( sRadius, uno::Any(nRadius) );
// common properties handled by super class
XMLImageMapObjectContext::Prepare(rPropertySet);
diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx
index 0b48378f1331..477aff269c24 100644
--- a/xmloff/source/draw/XMLShapePropertySetContext.cxx
+++ b/xmloff/source/draw/XMLShapePropertySetContext.cxx
@@ -57,10 +57,7 @@ void XMLShapePropertySetContext::EndElement()
pBulletStyle->FillUnoNumRule(xNumRule);
}
- Any aAny;
- aAny <<= xNumRule;
-
- XMLPropertyState aPropState( mnBulletIndex, aAny );
+ XMLPropertyState aPropState( mnBulletIndex, Any(xNumRule) );
mrProperties.push_back( aPropState );
SvXMLPropertySetContext::EndElement();
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 1aae82c862fd..9e4818f5aa0e 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -550,7 +550,6 @@ void XMLAnimationsEffectContext::EndElement()
try
{
rtl::Reference< XMLShapeImportHelper > xShapeImport( GetImport().GetShapeImport() );
- Any aAny;
if( !maShapeId.isEmpty() )
{
@@ -580,16 +579,13 @@ void XMLAnimationsEffectContext::EndElement()
{
if( meKind == XMLE_DIM )
{
- aAny <<= true;
- xSet->setPropertyValue( mpImpl->msDimPrev, aAny );
+ xSet->setPropertyValue( mpImpl->msDimPrev, Any(true) );
- aAny <<= maDimColor;
- xSet->setPropertyValue( mpImpl->msDimColor, aAny );
+ xSet->setPropertyValue( mpImpl->msDimColor, Any(maDimColor) );
}
else if( meKind == XMLE_PLAY )
{
- aAny <<= true;
- xSet->setPropertyValue( mpImpl->msIsAnimation, aAny );
+ xSet->setPropertyValue( mpImpl->msIsAnimation, Any(true) );
// #i42894# speed is not supported for the old group animation fallback, so no need to set it
// aAny <<= meSpeed;
@@ -599,8 +595,7 @@ void XMLAnimationsEffectContext::EndElement()
{
if( meKind == XMLE_HIDE && !mbTextEffect && meEffect == EK_none )
{
- aAny <<= true;
- xSet->setPropertyValue( mpImpl->msDimHide, aAny );
+ xSet->setPropertyValue( mpImpl->msDimHide, Any(true) );
}
else
{
@@ -622,14 +617,9 @@ void XMLAnimationsEffectContext::EndElement()
{
if( xSet.is() )
{
- aAny <<= maSoundURL;
- xSet->setPropertyValue( mpImpl->msSound, aAny );
-
- aAny <<= mbPlayFull;
- xSet->setPropertyValue( mpImpl->msPlayFull, aAny );
-
- aAny <<= true;
- xSet->setPropertyValue( mpImpl->msSoundOn, aAny );
+ xSet->setPropertyValue( mpImpl->msSound, Any(maSoundURL) );
+ xSet->setPropertyValue( mpImpl->msPlayFull, Any(mbPlayFull) );
+ xSet->setPropertyValue( mpImpl->msSoundOn, Any(true) );
}
else
{
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index a614e6767c6c..319b9b109220 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2156,12 +2156,9 @@ void SdXMLExport::_ExportStyles(bool bUsed)
{
Reference< beans::XPropertySetInfo > xInfoSetInfo( xInfoSet->getPropertySetInfo() );
- Any aAny;
-
if( xInfoSetInfo->hasPropertyByName( msPageLayoutNames ) )
{
- aAny <<= maDrawPagesAutoLayoutNames;
- xInfoSet->setPropertyValue( msPageLayoutNames, aAny );
+ xInfoSet->setPropertyValue( msPageLayoutNames, Any(maDrawPagesAutoLayoutNames) );
}
}
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 9dbba4f3ac8d..2413c5c77a9b 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2314,9 +2314,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
aStreamURL = aStreamURL.concat( aStr );
}
- uno::Any aAny;
- aAny <<= aStreamURL;
- xPropSet->setPropertyValue( "GraphicStreamURL", aAny );
+ xPropSet->setPropertyValue( "GraphicStreamURL", uno::Any(aStreamURL) );
}
mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 2000a4c925dd..f13864986e79 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -796,8 +796,7 @@ void ShapeSortContext::moveShape( sal_Int32 nSourcePos, sal_Int32 nDestPos )
if( xPropSet.is() && xPropSet->getPropertySetInfo()->hasPropertyByName( "ZOrder" ) )
{
- aAny <<= nDestPos;
- xPropSet->setPropertyValue( "ZOrder", aAny );
+ xPropSet->setPropertyValue( "ZOrder", uno::Any(nDestPos) );
for( ZOrderHint& rHint : maZOrderList )
{
@@ -950,8 +949,6 @@ void XMLShapeImportHelper::restoreConnections()
{
if( !mpImpl->maConnections.empty() )
{
- uno::Any aAny;
-
const vector<ConnectionHint>::size_type nCount = mpImpl->maConnections.size();
for( vector<ConnectionHint>::size_type i = 0; i < nCount; i++ )
{
@@ -977,12 +974,10 @@ void XMLShapeImportHelper::restoreConnections()
mrImporter.getInterfaceToIdentifierMapper().getReference( rHint.aDestShapeId ), uno::UNO_QUERY );
if( xShape.is() )
{
- aAny <<= xShape;
- xConnector->setPropertyValue( rHint.bStart ? msStartShape : msEndShape, aAny );
+ xConnector->setPropertyValue( rHint.bStart ? msStartShape : msEndShape, uno::Any(xShape) );
sal_Int32 nGlueId = rHint.nDestGlueId < 4 ? rHint.nDestGlueId : getGluePointId( xShape, rHint.nDestGlueId );
- aAny <<= nGlueId;
- xConnector->setPropertyValue( rHint.bStart ? msStartGluePointIndex : msEndGluePointIndex, aAny );
+ xConnector->setPropertyValue( rHint.bStart ? msStartGluePointIndex : msEndGluePointIndex, uno::Any(nGlueId) );
}
// #86637# restore line deltas
diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx
index 105b29004d96..7c5ff8b82423 100644
--- a/xmloff/source/draw/ximp3dobject.cxx
+++ b/xmloff/source/draw/ximp3dobject.cxx
@@ -88,9 +88,7 @@ void SdXML3DObjectContext::StartElement(const uno::Reference< xml::sax::XAttribu
// set parameters
if(mbSetTransform)
{
- uno::Any aAny;
- aAny <<= mxHomMat;
- xPropSet->setPropertyValue("D3DTransformMatrix", aAny);
+ xPropSet->setPropertyValue("D3DTransformMatrix", uno::Any(mxHomMat));
}
// call parent
@@ -190,11 +188,8 @@ void SdXML3DCubeObjectShapeContext::StartElement(const uno::Reference< xml::sax:
aDirection3D.DirectionY = maMaxEdge.getY();
aDirection3D.DirectionZ = maMaxEdge.getZ();
- uno::Any aAny;
- aAny <<= aPosition3D;
- xPropSet->setPropertyValue("D3DPosition", aAny);
- aAny <<= aDirection3D;
- xPropSet->setPropertyValue("D3DSize", aAny);
+ xPropSet->setPropertyValue("D3DPosition", uno::Any(aPosition3D));
+ xPropSet->setPropertyValue("D3DSize", uno::Any(aDirection3D));
}
}
}
@@ -288,11 +283,8 @@ void SdXML3DSphereObjectShapeContext::StartElement(const uno::Reference< xml::sa
aDirection3D.DirectionY = maSize.getY();
aDirection3D.DirectionZ = maSize.getZ();
- uno::Any aAny;
- aAny <<= aPosition3D;
- xPropSet->setPropertyValue("D3DPosition", aAny);
- aAny <<= aDirection3D;
- xPropSet->setPropertyValue("D3DSize", aAny);
+ xPropSet->setPropertyValue("D3DPosition", uno::Any(aPosition3D));
+ xPropSet->setPropertyValue("D3DSize", uno::Any(aDirection3D));
}
}
}
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index 971fda1607fc..afa7658b6c8f 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -352,33 +352,21 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const com::sun::star::uno
// world transformation
if(mbSetTransform)
{
- aAny <<= mxHomMat;
- xPropSet->setPropertyValue("D3DTransformMatrix", aAny);
+ xPropSet->setPropertyValue("D3DTransformMatrix", uno::Any(mxHomMat));
}
// distance
- aAny <<= mnDistance;
- xPropSet->setPropertyValue("D3DSceneDistance", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneDistance", uno::Any(mnDistance));
// focalLength
- aAny <<= mnFocalLength;
- xPropSet->setPropertyValue("D3DSceneFocalLength", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneFocalLength", uno::Any(mnFocalLength));
// shadowSlant
- aAny <<= (sal_Int16)mnShadowSlant;
- xPropSet->setPropertyValue("D3DSceneShadowSlant", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneShadowSlant", uno::Any((sal_Int16)mnShadowSlant));
// shadeMode
- aAny <<= mxShadeMode;
- xPropSet->setPropertyValue("D3DSceneShadeMode", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneShadeMode", uno::Any(mxShadeMode));
// ambientColor
- aAny <<= maAmbientColor;
- xPropSet->setPropertyValue("D3DSceneAmbientColor", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneAmbientColor", uno::Any(maAmbientColor));
// lightingMode
- aAny <<= mbLightingMode;
- xPropSet->setPropertyValue("D3DSceneTwoSidedLighting", aAny);
+ xPropSet->setPropertyValue("D3DSceneTwoSidedLighting", uno::Any(mbLightingMode));
if( !maList.empty() )
{
@@ -472,13 +460,11 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const com::sun::star::uno
aCamGeo.vup.DirectionX = maVUP.getX();
aCamGeo.vup.DirectionY = maVUP.getY();
aCamGeo.vup.DirectionZ = maVUP.getZ();
- aAny <<= aCamGeo;
- xPropSet->setPropertyValue("D3DCameraGeometry", aAny);
+ xPropSet->setPropertyValue("D3DCameraGeometry", uno::Any(aCamGeo));
// #91047# set drawing::ProjectionMode AFTER camera geometry is set
// projection "D3DScenePerspective" drawing::ProjectionMode
- aAny <<= mxPrjMode;
- xPropSet->setPropertyValue("D3DScenePerspective", aAny);
+ xPropSet->setPropertyValue("D3DScenePerspective", uno::Any(mxPrjMode));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 404fa163c20f..04a479165591 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -500,28 +500,13 @@ void SdXMLGenericPageContext::SetPageMaster( OUString& rsPageMasterName )
Reference <beans::XPropertySet> xPropSet(xMasterPage, uno::UNO_QUERY);
if(xPropSet.is())
{
- uno::Any aAny;
-
- aAny <<= pPageMasterContext->GetBorderBottom();
- xPropSet->setPropertyValue("BorderBottom", aAny);
-
- aAny <<= pPageMasterContext->GetBorderLeft();
- xPropSet->setPropertyValue("BorderLeft", aAny);
-
- aAny <<= pPageMasterContext->GetBorderRight();
- xPropSet->setPropertyValue("BorderRight", aAny);
-
- aAny <<= pPageMasterContext->GetBorderTop();
- xPropSet->setPropertyValue("BorderTop", aAny);
-
- aAny <<= pPageMasterContext->GetWidth();
- xPropSet->setPropertyValue("Width", aAny);
-
- aAny <<= pPageMasterContext->GetHeight();
- xPropSet->setPropertyValue("Height", aAny);
-
- aAny <<= pPageMasterContext->GetOrientation();
- xPropSet->setPropertyValue("Orientation", aAny);
+ xPropSet->setPropertyValue("BorderBottom", Any(pPageMasterContext->GetBorderBottom()));
+ xPropSet->setPropertyValue("BorderLeft", Any(pPageMasterContext->GetBorderLeft()));
+ xPropSet->setPropertyValue("BorderRight", Any(pPageMasterContext->GetBorderRight()));
+ xPropSet->setPropertyValue("BorderTop", Any(pPageMasterContext->GetBorderTop()));
+ xPropSet->setPropertyValue("Width", Any(pPageMasterContext->GetWidth()));
+ xPropSet->setPropertyValue("Height", Any(pPageMasterContext->GetHeight()));
+ xPropSet->setPropertyValue("Orientation", Any(pPageMasterContext->GetOrientation()));
}
}
}
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 5383b321651c..a66f068fe998 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -570,7 +570,6 @@ void SdXMLShapeContext::SetTransformation()
}
// now set transformation for this object
- uno::Any aAny;
drawing::HomogenMatrix3 aMatrix;
aMatrix.Line1.Column1 = maUsedTransformation.get(0, 0);
@@ -585,9 +584,7 @@ void SdXMLShapeContext::SetTransformation()
aMatrix.Line3.Column2 = maUsedTransformation.get(2, 1);
aMatrix.Line3.Column3 = maUsedTransformation.get(2, 2);
- aAny <<= aMatrix;
-
- xPropSet->setPropertyValue("Transformation", aAny);
+ xPropSet->setPropertyValue("Transformation", Any(aMatrix));
}
}
}
@@ -691,9 +688,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
try
{
// set style on object
- uno::Any aAny;
- aAny <<= xStyle;
- xPropSet->setPropertyValue("Style", aAny);
+ xPropSet->setPropertyValue("Style", Any(xStyle));
}
catch(const uno::Exception&)
{
@@ -749,10 +744,7 @@ void SdXMLShapeContext::SetLayer()
uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY);
if(xPropSet.is() )
{
- uno::Any aAny;
- aAny <<= maLayerName;
-
- xPropSet->setPropertyValue("LayerName", aAny);
+ xPropSet->setPropertyValue("LayerName", Any(maLayerName));
return;
}
}
@@ -1163,14 +1155,12 @@ void SdXMLLineShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
drawing::PointSequence* pOuterSequence = aPolyPoly.getArray();
pOuterSequence->realloc(2L);
awt::Point* pInnerSequence = pOuterSequence->getArray();
- uno::Any aAny;
*pInnerSequence = awt::Point( mnX1 - aTopLeft.X, mnY1 - aTopLeft.Y);
pInnerSequence++;
*pInnerSequence = awt::Point( mnX2 - aTopLeft.X, mnY2 - aTopLeft.Y);
- aAny <<= aPolyPoly;
- xPropSet->setPropertyValue("Geometry", aAny);
+ xPropSet->setPropertyValue("Geometry", Any(aPolyPoly));
}
// set sizes for transformation
@@ -1304,15 +1294,9 @@ void SdXMLEllipseShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY );
if( xPropSet.is() )
{
- uno::Any aAny;
- aAny <<= (drawing::CircleKind)meKind;
- xPropSet->setPropertyValue("CircleKind", aAny );
-
- aAny <<= mnStartAngle;
- xPropSet->setPropertyValue("CircleStartAngle", aAny );
-
- aAny <<= mnEndAngle;
- xPropSet->setPropertyValue("CircleEndAngle", aAny );
+ xPropSet->setPropertyValue("CircleKind", Any( (drawing::CircleKind)meKind) );
+ xPropSet->setPropertyValue("CircleStartAngle", Any(mnStartAngle) );
+ xPropSet->setPropertyValue("CircleEndAngle", Any(mnEndAngle) );
}
}
@@ -1411,11 +1395,9 @@ void SdXMLPolygonShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
}
com::sun::star::drawing::PointSequenceSequence aPointSequenceSequence;
- uno::Any aAny;
basegfx::tools::B2DPolyPolygonToUnoPointSequenceSequence(basegfx::B2DPolyPolygon(aPolygon), aPointSequenceSequence);
- aAny <<= aPointSequenceSequence;
- xPropSet->setPropertyValue("Geometry", aAny);
+ xPropSet->setPropertyValue("Geometry", Any(aPointSequenceSequence));
}
}
}
@@ -2041,24 +2023,12 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- uno::Any aAny;
- aAny <<= maStart;
- xProps->setPropertyValue("StartPosition", aAny);
-
- aAny <<= maEnd;
- xProps->setPropertyValue("EndPosition", aAny );
-
- aAny <<= (drawing::ConnectorType)mnType;
- xProps->setPropertyValue("EdgeKind", aAny );
-
- aAny <<= mnDelta1;
- xProps->setPropertyValue("EdgeLine1Delta", aAny );
-
- aAny <<= mnDelta2;
- xProps->setPropertyValue("EdgeLine2Delta", aAny );
-
- aAny <<= mnDelta3;
- xProps->setPropertyValue("EdgeLine3Delta", aAny );
+ xProps->setPropertyValue("StartPosition", Any(maStart));
+ xProps->setPropertyValue("EndPosition", Any(maEnd) );
+ xProps->setPropertyValue("EdgeKind", Any((drawing::ConnectorType)mnType) );
+ xProps->setPropertyValue("EdgeLine1Delta", Any(mnDelta1) );
+ xProps->setPropertyValue("EdgeLine2Delta", Any(mnDelta2) );
+ xProps->setPropertyValue("EdgeLine3Delta", Any(mnDelta3) );
}
SetStyle();
SetLayer();
@@ -2167,12 +2137,8 @@ void SdXMLMeasureShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- uno::Any aAny;
- aAny <<= maStart;
- xProps->setPropertyValue("StartPosition", aAny);
-
- aAny <<= maEnd;
- xProps->setPropertyValue("EndPosition", aAny );
+ xProps->setPropertyValue("StartPosition", Any(maStart));
+ xProps->setPropertyValue("EndPosition", Any(maEnd) );
}
// delete pre created fields
@@ -2607,8 +2573,7 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri
const OUString aCLSID( "12DCAE26-281F-416F-a234-c3086127382e");
- aAny <<= aCLSID;
- xProps->setPropertyValue("CLSID", aAny );
+ xProps->setPropertyValue("CLSID", Any(aCLSID) );
aAny = xProps->getPropertyValue("Model");
uno::Reference< frame::XModel > xChartModel;
@@ -2946,49 +2911,40 @@ void SdXMLAppletShapeContext::EndElement()
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- uno::Any aAny;
-
if ( maSize.Width && maSize.Height )
{
// the visual area for applet must be set on loading
awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height );
- aAny <<= aRect;
- xProps->setPropertyValue("VisibleArea", aAny );
+ xProps->setPropertyValue("VisibleArea", Any(aRect) );
}
if( maParams.getLength() )
{
- aAny <<= maParams;
- xProps->setPropertyValue("AppletCommands", aAny );
+ xProps->setPropertyValue("AppletCommands", Any(maParams) );
}
if( !maHref.isEmpty() )
{
- aAny <<= maHref;
- xProps->setPropertyValue("AppletCodeBase", aAny );
+ xProps->setPropertyValue("AppletCodeBase", Any(maHref) );
}
if( !maAppletName.isEmpty() )
{
- aAny <<= maAppletName;
- xProps->setPropertyValue("AppletName", aAny );
+ xProps->setPropertyValue("AppletName", Any(maAppletName) );
}
if( mbIsScript )
{
- aAny <<= mbIsScript;
- xProps->setPropertyValue("AppletIsScript", aAny );
+ xProps->setPropertyValue("AppletIsScript", Any(mbIsScript) );
}
if( !maAppletCode.isEmpty() )
{
- aAny <<= maAppletCode;
- xProps->setPropertyValue("AppletCode", aAny );
+ xProps->setPropertyValue("AppletCode", Any(maAppletCode) );
}
- aAny <<= OUString( GetImport().GetDocumentBase() );
- xProps->setPropertyValue("AppletDocBase", aAny );
+ xProps->setPropertyValue("AppletDocBase", Any(GetImport().GetDocumentBase()) );
SetThumbnail();
}
@@ -3168,8 +3124,6 @@ void SdXMLPluginShapeContext::EndElement()
if( xProps.is() )
{
- uno::Any aAny;
-
if ( maSize.Width && maSize.Height )
{
const OUString sVisibleArea( "VisibleArea" );
@@ -3178,8 +3132,7 @@ void SdXMLPluginShapeContext::EndElement()
{
// the visual area for a plugin must be set on loading
awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height );
- aAny <<= aRect;
- xProps->setPropertyValue( sVisibleArea, aAny );
+ xProps->setPropertyValue( sVisibleArea, Any(aRect) );
}
}
@@ -3188,20 +3141,17 @@ void SdXMLPluginShapeContext::EndElement()
// in case we have a plugin object
if( maParams.getLength() )
{
- aAny <<= maParams;
- xProps->setPropertyValue("PluginCommands", aAny );
+ xProps->setPropertyValue("PluginCommands", Any(maParams) );
}
if( !maMimeType.isEmpty() )
{
- aAny <<= maMimeType;
- xProps->setPropertyValue("PluginMimeType", aAny );
+ xProps->setPropertyValue("PluginMimeType", Any(maMimeType) );
}
if( !maHref.isEmpty() )
{
- aAny <<= maHref;
- xProps->setPropertyValue("PluginURL", aAny );
+ xProps->setPropertyValue("PluginURL", Any(maHref) );
}
}
else
@@ -3344,18 +3294,14 @@ void SdXMLFloatingFrameShapeContext::StartElement( const ::com::sun::star::uno::
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- uno::Any aAny;
-
if( !maFrameName.isEmpty() )
{
- aAny <<= maFrameName;
- xProps->setPropertyValue("FrameName", aAny );
+ xProps->setPropertyValue("FrameName", Any(maFrameName) );
}
if( !maHref.isEmpty() )
{
- aAny <<= maHref;
- xProps->setPropertyValue("FrameURL", aAny );
+ xProps->setPropertyValue("FrameURL", Any(maHref) );
}
}
@@ -3399,9 +3345,7 @@ void SdXMLFloatingFrameShapeContext::EndElement()
{
// the visual area for a floating frame must be set on loading
awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height );
- uno::Any aAny;
- aAny <<= aRect;
- xProps->setPropertyValue("VisibleArea", aAny );
+ xProps->setPropertyValue("VisibleArea", Any(aRect) );
}
}
@@ -3779,15 +3723,11 @@ void SdXMLCustomShapeContext::StartElement( const uno::Reference< xml::sax::XAtt
{
if ( !maCustomShapeEngine.isEmpty() )
{
- uno::Any aAny;
- aAny <<= maCustomShapeEngine;
- xPropSet->setPropertyValue( EASGet( EAS_CustomShapeEngine ), aAny );
+ xPropSet->setPropertyValue( EASGet( EAS_CustomShapeEngine ), Any(maCustomShapeEngine) );
}
if ( !maCustomShapeData.isEmpty() )
{
- uno::Any aAny;
- aAny <<= maCustomShapeData;
- xPropSet->setPropertyValue( EASGet( EAS_CustomShapeData ), aAny );
+ xPropSet->setPropertyValue( EASGet( EAS_CustomShapeData ), Any(maCustomShapeData) );
}
}
}
@@ -3871,9 +3811,7 @@ void SdXMLCustomShapeContext::EndElement()
uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY );
if( xPropSet.is() )
{
- uno::Any aAny;
- aAny <<= aSeq;
- xPropSet->setPropertyValue( sCustomShapeGeometry, aAny );
+ xPropSet->setPropertyValue( sCustomShapeGeometry, Any(aSeq) );
}
}
catch(const uno::Exception&)
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index 0b5efd5a7b0b..c24228673bb1 100644
--- a/xmloff/source/draw/ximpshow.cxx
+++ b/xmloff/source/draw/ximpshow.cxx
@@ -96,8 +96,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
case XML_NAMESPACE_PRESENTATION:
if( IsXMLToken( aLocalName, XML_START_PAGE ) )
{
- aAny <<= sValue;
- mpImpl->mxPresProps->setPropertyValue("FirstPage", aAny );
+ mpImpl->mxPresProps->setPropertyValue("FirstPage", Any(sValue) );
bAll = false;
}
else if( IsXMLToken( aLocalName, XML_SHOW ) )
@@ -113,8 +112,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
const sal_Int32 nMS = (aDuration.Hours * 60 +
aDuration.Minutes) * 60 + aDuration.Seconds;
- aAny <<= nMS;
- mpImpl->mxPresProps->setPropertyValue("Pause", aAny );
+ mpImpl->mxPresProps->setPropertyValue("Pause", Any(nMS) );
}
else if( IsXMLToken( aLocalName, XML_ANIMATIONS ) )
{
@@ -168,8 +166,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
}
}
}
- aAny <<= bAll;
- mpImpl->mxPresProps->setPropertyValue("IsShowAll", aAny );
+ mpImpl->mxPresProps->setPropertyValue("IsShowAll", Any(bAll) );
}
}
@@ -220,7 +217,6 @@ SvXMLImportContext * SdXMLShowsContext::CreateChildContext( sal_uInt16 p_nPrefix
{
SvXMLTokenEnumerator aPageNames( aPages, ',' );
OUString sPageName;
- Any aAny;
while( aPageNames.getNextToken( sPageName ) )
{
@@ -231,13 +227,12 @@ SvXMLImportContext * SdXMLShowsContext::CreateChildContext( sal_uInt16 p_nPrefix
mpImpl->mxPages->getByName( sPageName ) >>= xPage;
if( xPage.is() )
{
- aAny <<= xPage;
- xShow->insertByIndex( xShow->getCount(), aAny );
+ xShow->insertByIndex( xShow->getCount(), Any(xPage) );
}
}
+ Any aAny;
aAny <<= xShow;
-
if( mpImpl->mxShows->hasByName( aName ) )
{
mpImpl->mxShows->replaceByName( aName, aAny );