summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-03 08:39:03 +0200
committerNoel Grandin <noel@peralex.com>2016-05-04 12:39:40 +0200
commit58a32075ca4f457f570af75aef368dd6c389aca7 (patch)
treee437dcbdeb248b4316cb8a9281d1543419853f6d /xmloff
parent7d47700972d267fe7c5270c5dadd45a523a2baec (diff)
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx8
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx12
-rw-r--r--xmloff/source/chart/XMLChartStyleContext.cxx4
-rw-r--r--xmloff/source/core/unoatrcn.cxx4
-rw-r--r--xmloff/source/core/xmlerror.cxx4
-rw-r--r--xmloff/source/core/xmlexp.cxx15
-rw-r--r--xmloff/source/core/xmlimp.cxx19
-rw-r--r--xmloff/source/draw/XMLImageMapContext.cxx21
-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.cxx22
-rw-r--r--xmloff/source/draw/ximp3dscene.cxx32
-rw-r--r--xmloff/source/draw/ximppage.cxx29
-rw-r--r--xmloff/source/draw/ximpshap.cxx131
-rw-r--r--xmloff/source/draw/ximpshow.cxx15
-rw-r--r--xmloff/source/meta/MetaExportComponent.cxx4
-rw-r--r--xmloff/source/script/XMLEventsImportContext.cxx5
-rw-r--r--xmloff/source/style/XMLFootnoteSeparatorImport.cxx22
-rw-r--r--xmloff/source/style/prstylei.cxx7
-rw-r--r--xmloff/source/style/xmlimppr.cxx8
-rw-r--r--xmloff/source/style/xmlnume.cxx13
-rw-r--r--xmloff/source/style/xmlnumi.cxx15
-rw-r--r--xmloff/source/text/XMLCalculationSettingsContext.cxx4
-rw-r--r--xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx24
-rw-r--r--xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx20
-rw-r--r--xmloff/source/text/XMLIndexBibliographyEntryContext.cxx4
-rw-r--r--xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx8
-rw-r--r--xmloff/source/text/XMLIndexSimpleEntryContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexTOCContext.cxx4
-rw-r--r--xmloff/source/text/XMLIndexTOCSourceContext.cxx5
-rw-r--r--xmloff/source/text/XMLIndexTOCStylesContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexTableSourceContext.cxx8
-rw-r--r--xmloff/source/text/XMLIndexTemplateContext.cxx6
-rw-r--r--xmloff/source/text/XMLIndexUserSourceContext.cxx5
-rw-r--r--xmloff/source/text/XMLLineNumberingImportContext.cxx20
-rw-r--r--xmloff/source/text/XMLPropertyBackpatcher.cxx4
-rw-r--r--xmloff/source/text/XMLSectionFootnoteConfigImport.cxx13
-rw-r--r--xmloff/source/text/XMLSectionImportContext.cxx8
-rw-r--r--xmloff/source/text/XMLSectionSourceImportContext.cxx7
-rw-r--r--xmloff/source/text/XMLTextColumnsContext.cxx19
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx56
-rw-r--r--xmloff/source/text/XMLTextMasterPageContext.cxx6
-rw-r--r--xmloff/source/text/XMLTextShapeImportHelper.cxx10
-rw-r--r--xmloff/source/text/txtfldi.cxx243
-rw-r--r--xmloff/source/text/txtparai.cxx20
-rw-r--r--xmloff/source/text/txtstyli.cxx24
-rw-r--r--xmloff/source/text/txtvfldi.cxx58
51 files changed, 278 insertions, 746 deletions
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index f77ee8d544f1..5cc699f61c38 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -684,9 +684,7 @@ void SchXMLChartContext::EndElement()
{
try
{
- uno::Any aAny;
- aAny <<= maMainTitle;
- xTitleProp->setPropertyValue("String", aAny );
+ xTitleProp->setPropertyValue("String", uno::Any(maMainTitle) );
}
catch(const beans::UnknownPropertyException&)
{
@@ -701,9 +699,7 @@ void SchXMLChartContext::EndElement()
{
try
{
- uno::Any aAny;
- aAny <<= maSubTitle;
- xTitleProp->setPropertyValue("String", aAny );
+ xTitleProp->setPropertyValue("String", uno::Any(maSubTitle) );
}
catch(const beans::UnknownPropertyException&)
{
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 6e59f831f0eb..04b31d872bad 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -204,10 +204,8 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext(
xProp->setPropertyValue("HasZAxis", aFalseBool );
xProp->setPropertyValue("HasZAxisDescription", aFalseBool );
- uno::Any aAny;
chart::ChartDataRowSource eSource = chart::ChartDataRowSource_COLUMNS;
- aAny <<= eSource;
- xProp->setPropertyValue("DataRowSource", aAny );
+ xProp->setPropertyValue("DataRowSource", uno::Any(eSource) );
}
catch( const beans::UnknownPropertyException & )
{
@@ -282,12 +280,8 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
{
try
{
- uno::Any aAny;
- aAny <<= mrColHasLabels;
- xDocProp->setPropertyValue("DataSourceLabelsInFirstColumn", aAny );
-
- aAny <<= mrRowHasLabels;
- xDocProp->setPropertyValue("DataSourceLabelsInFirstRow", aAny );
+ xDocProp->setPropertyValue("DataSourceLabelsInFirstColumn", uno::Any(mrColHasLabels) );
+ xDocProp->setPropertyValue("DataSourceLabelsInFirstRow", uno::Any(mrRowHasLabels) );
}
catch( const beans::UnknownPropertyException & )
{
diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx
index d3421909be04..a3fc7a829948 100644
--- a/xmloff/source/chart/XMLChartStyleContext.cxx
+++ b/xmloff/source/chart/XMLChartStyleContext.cxx
@@ -82,10 +82,8 @@ void lcl_NumberFormatStyleToProperty( const OUString& rStyleName, const OUString
XML_STYLE_FAMILY_DATA_STYLE, rStyleName, true ));
if( pStyle )
{
- uno::Any aNumberFormat;
sal_Int32 nNumberFormat = const_cast<SvXMLNumFormatContext*>(pStyle)->GetKey();
- aNumberFormat <<= nNumberFormat;
- rPropSet->setPropertyValue( rPropertyName, aNumberFormat );
+ rPropSet->setPropertyValue( rPropertyName, uno::Any(nNumberFormat) );
}
}
}
diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx
index eb1fc7caa917..ed811df66157 100644
--- a/xmloff/source/core/unoatrcn.cxx
+++ b/xmloff/source/core/unoatrcn.cxx
@@ -126,9 +126,7 @@ uno::Any SAL_CALL SvUnoAttributeContainer::getByName(const OUString& aName)
aData.Type = "CDATA";
aData.Value = mpContainer->GetAttrValue(nAttr);
- uno::Any aAny;
- aAny <<= aData;
- return aAny;
+ return uno::Any(aData);
}
uno::Sequence< OUString > SAL_CALL SvUnoAttributeContainer::getElementNames() throw( uno::RuntimeException, std::exception )
diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx
index eebd4ba91746..fbdcc941e399 100644
--- a/xmloff/source/core/xmlerror.cxx
+++ b/xmloff/source/core/xmlerror.cxx
@@ -210,10 +210,8 @@ void XMLErrors::ThrowErrorAsSAXException(sal_Int32 nIdMask)
{
// we throw the error
ErrorRecord& rErr = aErrors[0];
- Any aAny;
- aAny <<= rErr.aParams;
throw SAXParseException(
- rErr.sExceptionMessage, nullptr, aAny,
+ rErr.sExceptionMessage, nullptr, Any(rErr.aParams),
rErr.sPublicId, rErr.sSystemId, rErr.nRow, rErr.nColumn );
}
}
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 807e55a4de33..8ed21181dff9 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -555,11 +555,8 @@ SvXMLExport::~SvXMLExport()
{
sal_Int32 nProgressMax(mpProgressBarHelper->GetReference());
sal_Int32 nProgressCurrent(mpProgressBarHelper->GetValue());
- uno::Any aAny;
- aAny <<= nProgressMax;
- mxExportInfo->setPropertyValue(sProgressMax, aAny);
- aAny <<= nProgressCurrent;
- mxExportInfo->setPropertyValue(sProgressCurrent, aAny);
+ mxExportInfo->setPropertyValue(sProgressMax, uno::Any(nProgressMax));
+ mxExportInfo->setPropertyValue(sProgressCurrent, uno::Any(nProgressCurrent));
}
if (xPropertySetInfo->hasPropertyByName(sRepeat))
mxExportInfo->setPropertyValue(sRepeat, css::uno::makeAny(mpProgressBarHelper->GetRepeat()));
@@ -571,9 +568,7 @@ SvXMLExport::~SvXMLExport()
{
uno::Sequence<sal_Int32> aWasUsed;
mpNumExport->GetWasUsed(aWasUsed);
- uno::Any aAny;
- aAny <<= aWasUsed;
- mxExportInfo->setPropertyValue(sWrittenNumberFormats, aAny);
+ mxExportInfo->setPropertyValue(sWrittenNumberFormats, Any(aWasUsed));
}
}
}
@@ -1313,9 +1308,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
::comphelper::GenericPropertySet_CreateInstance(
new ::comphelper::PropertySetInfo( aInfoMap ) ) );
- Any aAny;
- aAny <<= GetXMLToken( eClass );
- xConvPropSet->setPropertyValue( "Class", aAny );
+ xConvPropSet->setPropertyValue( "Class", Any(GetXMLToken( eClass )) );
Reference< XPropertySet > xPropSet =
mxExportInfo.is()
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index f3e897eae52b..3b702cd7afd9 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -574,11 +574,8 @@ void SAL_CALL SvXMLImport::endDocument()
{
sal_Int32 nProgressMax(mpProgressBarHelper->GetReference());
sal_Int32 nProgressCurrent(mpProgressBarHelper->GetValue());
- uno::Any aAny;
- aAny <<= nProgressMax;
- mxImportInfo->setPropertyValue(sProgressMax, aAny);
- aAny <<= nProgressCurrent;
- mxImportInfo->setPropertyValue(sProgressCurrent, aAny);
+ mxImportInfo->setPropertyValue(sProgressMax, uno::Any(nProgressMax));
+ mxImportInfo->setPropertyValue(sProgressCurrent, uno::Any(nProgressCurrent));
}
if (xPropertySetInfo->hasPropertyByName(sRepeat))
mxImportInfo->setPropertyValue(sRepeat, css::uno::makeAny(mpProgressBarHelper->GetRepeat()));
@@ -587,9 +584,7 @@ void SAL_CALL SvXMLImport::endDocument()
OUString sNumberStyles(XML_NUMBERSTYLES);
if (mxNumberStyles.is() && xPropertySetInfo->hasPropertyByName(sNumberStyles))
{
- uno::Any aAny;
- aAny <<= mxNumberStyles;
- mxImportInfo->setPropertyValue(sNumberStyles, aAny);
+ mxImportInfo->setPropertyValue(sNumberStyles, Any(mxNumberStyles));
}
}
}
@@ -1424,9 +1419,7 @@ void SvXMLImport::AddStyleDisplayName( sal_uInt16 nFamily,
{
Reference < XInterface > xIfc(
static_cast< XUnoTunnel *>( mpStyleMap ) );
- Any aAny;
- aAny <<= xIfc;
- mxImportInfo->setPropertyValue( sPrivateData, aAny );
+ mxImportInfo->setPropertyValue( sPrivateData, Any(xIfc) );
}
}
}
@@ -1522,11 +1515,9 @@ void SvXMLImport::AddNumberStyle(sal_Int32 nKey, const OUString& rName)
mxNumberStyles.set( comphelper::NameContainer_createInstance( ::cppu::UnoType<sal_Int32>::get()) );
if (mxNumberStyles.is())
{
- uno::Any aAny;
- aAny <<= nKey;
try
{
- mxNumberStyles->insertByName(rName, aAny);
+ mxNumberStyles->insertByName(rName, Any(nKey));
}
catch ( uno::Exception& )
{
diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx
index 8f361dcd26f2..a502abadaf3d 100644
--- a/xmloff/source/draw/XMLImageMapContext.cxx
+++ b/xmloff/source/draw/XMLImageMapContext.cxx
@@ -220,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
}
@@ -392,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);
@@ -480,11 +476,8 @@ void XMLImageMapPolygonContext::Prepare(Reference<XPropertySet> & rPropertySet)
if(aPolygon.count())
{
css::drawing::PointSequence aPointSequence;
- uno::Any aAny;
-
basegfx::tools::B2DPolygonToUnoPointSequence(aPolygon, aPointSequence);
- aAny <<= aPointSequence;
- rPropertySet->setPropertyValue(sPolygon, aAny);
+ rPropertySet->setPropertyValue(sPolygon, Any(aPointSequence));
}
}
@@ -581,13 +574,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 78505e4b9af3..03781227a748 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 80f18e17095d..ecaef3bda4f4 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 41a01c71da9b..ed70149d0574 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2313,9 +2313,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 73cb3f7521ea..8608197a73ec 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -786,8 +786,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 )
{
@@ -940,8 +939,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++ )
{
@@ -967,12 +964,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 96eb4df63123..557d104bdb31 100644
--- a/xmloff/source/draw/ximp3dobject.cxx
+++ b/xmloff/source/draw/ximp3dobject.cxx
@@ -87,9 +87,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
@@ -188,11 +186,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));
}
}
}
@@ -285,11 +280,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));
}
}
}
@@ -364,9 +356,7 @@ void SdXML3DPolygonBasedShapeContext::StartElement(const uno::Reference< xml::sa
aPolyPolygon3D);
// set polygon data
- uno::Any aAny;
- aAny <<= aPolyPolygon3D;
- xPropSet->setPropertyValue("D3DPolyPolygon3D", aAny);
+ xPropSet->setPropertyValue("D3DPolyPolygon3D", uno::Any(aPolyPolygon3D));
}
else
{
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index 666306d48dc3..7680acf0bfbb 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -352,33 +352,21 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const css::uno::Reference
// 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 css::uno::Reference
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 742b764a2e1c..b5249a88d087 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -507,28 +507,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 f1fd887e64e4..b3109c915c3f 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,8 @@ void SdXMLPolygonShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
}
css::drawing::PointSequenceSequence aPointSequenceSequence;
- uno::Any aAny;
-
basegfx::tools::B2DPolyPolygonToUnoPointSequenceSequence(basegfx::B2DPolyPolygon(aPolygon), aPointSequenceSequence);
- aAny <<= aPointSequenceSequence;
- xPropSet->setPropertyValue("Geometry", aAny);
+ xPropSet->setPropertyValue("Geometry", Any(aPointSequenceSequence));
}
}
}
@@ -2040,24 +2021,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();
@@ -2166,12 +2135,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
@@ -2605,8 +2570,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;
@@ -2942,49 +2906,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();
}
@@ -3163,8 +3118,6 @@ void SdXMLPluginShapeContext::EndElement()
if( xProps.is() )
{
- uno::Any aAny;
-
if ( maSize.Width && maSize.Height )
{
const OUString sVisibleArea( "VisibleArea" );
@@ -3173,8 +3126,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) );
}
}
@@ -3183,20 +3135,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
@@ -3338,18 +3287,14 @@ void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< cs
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) );
}
}
@@ -3393,9 +3338,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) );
}
}
@@ -3772,15 +3715,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) );
}
}
}
@@ -3864,9 +3803,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 );
diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx
index 65161eb13b8e..eef8e3adf1a4 100644
--- a/xmloff/source/meta/MetaExportComponent.cxx
+++ b/xmloff/source/meta/MetaExportComponent.cxx
@@ -90,9 +90,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum )
::comphelper::GenericPropertySet_CreateInstance(
new ::comphelper::PropertySetInfo( aInfoMap ) ) );
- uno::Any aAny;
- aAny <<= GetXMLToken( XML_TEXT );
- xConvPropSet->setPropertyValue("Class", aAny );
+ xConvPropSet->setPropertyValue("Class", uno::Any(GetXMLToken( XML_TEXT )) );
uno::Reference< beans::XPropertySet > xPropSet =
getExportInfo().is()
diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx
index 9e7c3be94114..07ffa2f048b0 100644
--- a/xmloff/source/script/XMLEventsImportContext.cxx
+++ b/xmloff/source/script/XMLEventsImportContext.cxx
@@ -188,12 +188,9 @@ void XMLEventsImportContext::AddEventValues(
// set event (if name is known)
if (xEvents->hasByName(rEventName))
{
- Any aAny;
- aAny <<= rValues;
-
try
{
- xEvents->replaceByName(rEventName, aAny);
+ xEvents->replaceByName(rEventName, Any(rValues));
} catch ( const IllegalArgumentException & rException )
{
Sequence<OUString> aMsgParams { rEventName };
diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
index 83775bdd2976..df2b277821cc 100644
--- a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
+++ b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
@@ -163,43 +163,35 @@ void XMLFootnoteSeparatorImport::StartElement(
}
// OK, now we have all values and can fill the XMLPropertyState vector
- Any aAny;
sal_Int32 nIndex;
- aAny <<= eLineAdjust;
nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_ADJUST);
- XMLPropertyState aLineAdjust( nIndex, aAny);
+ XMLPropertyState aLineAdjust( nIndex, uno::Any(eLineAdjust));
rProperties.push_back(aLineAdjust);
- aAny <<= nLineColor;
nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_COLOR);
- XMLPropertyState aLineColor( nIndex, aAny );
+ XMLPropertyState aLineColor( nIndex, uno::Any(nLineColor) );
rProperties.push_back(aLineColor);
- aAny <<= nLineStyle;
nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_STYLE);
- XMLPropertyState aLineStyle( nIndex, aAny );
+ XMLPropertyState aLineStyle( nIndex, uno::Any(nLineStyle) );
rProperties.push_back(aLineStyle);
- aAny <<= nLineDistance;
nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_DISTANCE);
- XMLPropertyState aLineDistance( nIndex, aAny );
+ XMLPropertyState aLineDistance( nIndex, uno::Any(nLineDistance) );
rProperties.push_back(aLineDistance);
- aAny <<= nLineRelWidth;
nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_WIDTH);
- XMLPropertyState aLineRelWidth( nIndex, aAny);
+ XMLPropertyState aLineRelWidth( nIndex, uno::Any(nLineRelWidth));
rProperties.push_back(aLineRelWidth);
- aAny <<= nLineTextDistance;
nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_DISTANCE);
- XMLPropertyState aLineTextDistance( nIndex, aAny);
+ XMLPropertyState aLineTextDistance( nIndex, uno::Any(nLineTextDistance));
rProperties.push_back(aLineTextDistance);
DBG_ASSERT( rMapper->FindEntryIndex(CTF_PM_FTN_LINE_WEIGHT) == nPropIndex,
"Received wrong property map index!" );
- aAny <<= nLineWeight;
- XMLPropertyState aLineWeight( nPropIndex, aAny );
+ XMLPropertyState aLineWeight( nPropIndex, uno::Any(nLineWeight) );
rProperties.push_back(aLineWeight);
}
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index d97a8bd2815a..5f03fd31d48c 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -363,9 +363,7 @@ void XMLPropStyleContext::CreateAndInsert( bool bOverwrite )
if( !mxStyle.is() )
return;
- Any aAny;
- aAny <<= mxStyle;
- xFamilies->insertByName( rName, aAny );
+ xFamilies->insertByName( rName, Any(mxStyle) );
bNew = true;
}
@@ -501,8 +499,7 @@ void XMLPropStyleContext::Finish( bool bOverwrite )
aAny >>= sCurrFollow;
if( sCurrFollow != sFollow )
{
- aAny <<= sFollow;
- xPropSet->setPropertyValue( msFollowStyle, aAny );
+ xPropSet->setPropertyValue( msFollowStyle, Any(sFollow) );
}
}
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index b841e599876d..ab4bfbe39a2e 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -282,9 +282,7 @@ void SvXMLImportPropertyMapper::importXML(
// #106963#; use userdefined attribute only if it is in the specified property range
if( nIndex != -1 && nIndex >= nStartIdx && nIndex < nEndIdx)
{
- Any aAny;
- aAny <<= xAttrContainer;
- XMLPropertyState aNewProperty( nIndex, aAny );
+ XMLPropertyState aNewProperty( nIndex, Any(xAttrContainer) );
// push it on our stack so we export it later
rProperties.push_back( aNewProperty );
@@ -307,9 +305,7 @@ void SvXMLImportPropertyMapper::importXML(
sName.append( aLocalName );
- Any aAny;
- aAny <<= aData;
- xAttrContainer->insertByName( sName.makeStringAndClear(), aAny );
+ xAttrContainer->insertByName( sName.makeStringAndClear(), Any(aData) );
}
}
}
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index 8b0aa079c32d..ee4cfdcdd78c 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -540,14 +540,12 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
}
else
{
- Any aAny;
OUString sTemp;
const SvXMLUnitConverter& rUnitConv =
GetExport().GetMM100UnitConverter();
XMLFontFamilyNamePropHdl aFamilyNameHdl;
- aAny <<= sBulletFontName;
- if( aFamilyNameHdl.exportXML( sTemp, aAny, rUnitConv ) )
+ if( aFamilyNameHdl.exportXML( sTemp, Any(sBulletFontName), rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_FO,
XML_FONT_FAMILY, sTemp );
@@ -557,21 +555,18 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
sBulletFontStyleName );
XMLFontFamilyPropHdl aFamilyHdl;
- aAny <<= (sal_Int16)eBulletFontFamily;
- if( aFamilyHdl.exportXML( sTemp, aAny, rUnitConv ) )
+ if( aFamilyHdl.exportXML( sTemp, Any((sal_Int16)eBulletFontFamily), rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_FONT_FAMILY_GENERIC,
sTemp );
XMLFontPitchPropHdl aPitchHdl;
- aAny <<= (sal_Int16)eBulletFontPitch;
- if( aPitchHdl.exportXML( sTemp, aAny, rUnitConv ) )
+ if( aPitchHdl.exportXML( sTemp, Any((sal_Int16)eBulletFontPitch), rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_FONT_PITCH, sTemp );
XMLFontEncodingPropHdl aEncHdl;
- aAny <<= (sal_Int16)eBulletFontEncoding;
- if( aEncHdl.exportXML( sTemp, aAny, rUnitConv ) )
+ if( aEncHdl.exportXML( sTemp, Any((sal_Int16)eBulletFontEncoding), rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_FONT_CHARSET, sTemp );
}
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 09280f2291f5..0a8b5b6823c6 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -1098,9 +1098,7 @@ void SvxXMLListStyleContext::FillUnoNumRule(
{
Sequence<beans::PropertyValue> aProps =
pLevelStyle->GetProperties();
- Any aAny;
- aAny <<= aProps;
- rNumRule->replaceByIndex( nLevel, aAny );
+ rNumRule->replaceByIndex( nLevel, Any(aProps) );
}
}
}
@@ -1175,9 +1173,7 @@ void SvxXMLListStyleContext::CreateAndInsertLate( bool bOverwrite )
if( !xStyle.is() )
return;
- Any aAny;
- aAny <<= xStyle;
- rNumStyles->insertByName( rName, aAny );
+ rNumStyles->insertByName( rName, Any(xStyle) );
bNew = true;
}
@@ -1203,8 +1199,7 @@ void SvxXMLListStyleContext::CreateAndInsertLate( bool bOverwrite )
if( bOverwrite || bNew )
{
FillUnoNumRule(xNumRules);
- aAny <<= xNumRules;
- xPropSet->setPropertyValue( sNumberingRules, aAny );
+ xPropSet->setPropertyValue( sNumberingRules, Any(xNumRules) );
}
else
{
@@ -1291,9 +1286,7 @@ void SvxXMLListStyleContext::SetDefaultStyle(
(pProps++)->Value <<= OUString( "Numbering Symbols" );
}
- Any aAny;
- aAny <<= aPropSeq;
- rNumRule->replaceByIndex( nLevel, aAny );
+ rNumRule->replaceByIndex( nLevel, Any(aPropSeq) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/XMLCalculationSettingsContext.cxx b/xmloff/source/text/XMLCalculationSettingsContext.cxx
index 95d5deb0ee89..ad4d8463133c 100644
--- a/xmloff/source/text/XMLCalculationSettingsContext.cxx
+++ b/xmloff/source/text/XMLCalculationSettingsContext.cxx
@@ -76,9 +76,7 @@ void XMLCalculationSettingsContext::EndElement()
{
Reference < XPropertySet > xPropSet ( xTextDoc, UNO_QUERY );
OUString sTwoDigitYear ( "TwoDigitYear" );
- Any aAny;
- aAny <<= nYear;
- xPropSet->setPropertyValue ( sTwoDigitYear, aAny );
+ xPropSet->setPropertyValue ( sTwoDigitYear, Any(nYear) );
}
}
}
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
index a2e16843d0b2..786c5686309a 100644
--- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -385,11 +385,9 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings(
rConfig->setPropertyValue(sPropertyParagraphStyleName, aAny);
}
- aAny <<= sPrefix;
- rConfig->setPropertyValue(sPropertyPrefix, aAny);
+ rConfig->setPropertyValue(sPropertyPrefix, Any(sPrefix));
- aAny <<= sSuffix;
- rConfig->setPropertyValue(sPropertySuffix, aAny);
+ rConfig->setPropertyValue(sPropertySuffix, Any(sSuffix));
sal_Int16 nNumType = NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType, sNumFormat,
@@ -399,24 +397,16 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings(
if( NumberingType::CHAR_SPECIAL == nNumType )
nNumType = NumberingType::ARABIC;
- aAny <<= nNumType;
- rConfig->setPropertyValue(sPropertyNumberingType, aAny);
+ rConfig->setPropertyValue(sPropertyNumberingType, Any(nNumType));
- aAny <<= nOffset;
- rConfig->setPropertyValue(sPropertyStartAt, aAny);
+ rConfig->setPropertyValue(sPropertyStartAt, Any(nOffset));
if (!bIsEndnote)
{
rConfig->setPropertyValue(sPropertyPositionEndOfDoc, Any(bPosition));
-
- aAny <<= nNumbering;
- rConfig->setPropertyValue(sPropertyFootnoteCounting, aAny);
-
- aAny <<= sEndNotice;
- rConfig->setPropertyValue(sPropertyEndNotice, aAny);
-
- aAny <<= sBeginNotice;
- rConfig->setPropertyValue(sPropertyBeginNotice, aAny);
+ rConfig->setPropertyValue(sPropertyFootnoteCounting, Any(nNumbering));
+ rConfig->setPropertyValue(sPropertyEndNotice, Any(sEndNotice));
+ rConfig->setPropertyValue(sPropertyBeginNotice, Any(sBeginNotice));
}
}
diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
index ebf106523ee0..65a5d7afb77a 100644
--- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
@@ -211,8 +211,7 @@ void XMLIndexAlphabeticalSourceContext::EndElement()
if (!sAlgorithm.isEmpty())
{
- aAny <<= sAlgorithm;
- rIndexPropertySet->setPropertyValue(sSortAlgorithm, aAny);
+ rIndexPropertySet->setPropertyValue(sSortAlgorithm, css::uno::Any(sAlgorithm));
}
if ( !maLanguageTagODF.isEmpty() )
diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
index 5ed4f8fc963a..8e961ea92606 100644
--- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
@@ -195,14 +195,11 @@ SvXMLImportContext *XMLIndexBibliographyConfigurationContext::CreateChildContext
if (SvXMLUnitConverter::convertEnum(nKey, sKey,
aBibliographyDataFieldMap))
{
-
- Any aAny;
Sequence<PropertyValue> aKey(2);
PropertyValue aNameValue;
aNameValue.Name = sSortKey;
- aAny <<= (sal_Int16)nKey;
- aNameValue.Value = aAny;
+ aNameValue.Value = Any((sal_Int16)nKey);
aKey[0] = aNameValue;
PropertyValue aSortValue;
@@ -250,14 +247,9 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
Reference<XPropertySet> xPropSet( xIfc, UNO_QUERY );
Any aAny;
- aAny <<= sSuffix;
- xPropSet->setPropertyValue(sBracketAfter, aAny);
-
- aAny <<= sPrefix;
- xPropSet->setPropertyValue(sBracketBefore, aAny);
-
+ xPropSet->setPropertyValue(sBracketAfter, Any(sSuffix));
+ xPropSet->setPropertyValue(sBracketBefore, Any(sPrefix));
xPropSet->setPropertyValue(sIsNumberEntries, Any(bNumberedEntries));
-
xPropSet->setPropertyValue(sIsSortByPosition, Any(bSortByPosition));
if( !maLanguageTagODF.isEmpty() )
@@ -268,8 +260,7 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
if( !sAlgorithm.isEmpty() )
{
- aAny <<= sAlgorithm;
- xPropSet->setPropertyValue(sSortAlgorithm, aAny);
+ xPropSet->setPropertyValue(sSortAlgorithm, Any(sAlgorithm));
}
sal_Int32 nCount = aSortKeys.size();
@@ -278,8 +269,7 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
{
aKeysSeq[i] = aSortKeys[i];
}
- aAny <<= aKeysSeq;
- xPropSet->setPropertyValue(sSortKeys, aAny);
+ xPropSet->setPropertyValue(sSortKeys, Any(aKeysSeq));
}
// else: can't get FieldMaster -> ignore
}
diff --git a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
index 3930021e56a6..b5809421b81e 100644
--- a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
@@ -155,9 +155,7 @@ void XMLIndexBibliographyEntryContext::FillPropertyValues(
// bibliography data field
sal_Int32 nIndex = bCharStyleNameOK ? 2 : 1;
rValues[nIndex].Name = rTemplateContext.sBibliographyDataField;
- Any aAny;
- aAny <<= nBibliographyInfo;
- rValues[nIndex].Value = aAny;
+ rValues[nIndex].Value = css::uno::Any(nBibliographyInfo);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
index 8b1f0c0d0424..c71cd9fedcc9 100644
--- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
@@ -177,17 +177,13 @@ void XMLIndexChapterInfoEntryContext::FillPropertyValues(
{
// chapter info field
rValues[nIndex].Name = rTemplateContext.sChapterFormat;
- Any aAny;
- aAny <<= nChapterInfo;
- rValues[nIndex].Value = aAny;
+ rValues[nIndex].Value = css::uno::Any(nChapterInfo);
nIndex++;
}
if( bOutlineLevelOK )
{
rValues[nIndex].Name = rTemplateContext.sChapterLevel;
- Any aAny;
- aAny <<= nOutlineLevel;
- rValues[nIndex].Value = aAny;
+ rValues[nIndex].Value = css::uno::Any(nOutlineLevel);
}
}
diff --git a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
index 59d1ca1af750..f31e3875e585 100644
--- a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
@@ -108,8 +108,7 @@ void XMLIndexSimpleEntryContext::FillPropertyValues(
// token type
rValues[0].Name = rTemplateContext.sTokenType;
- aAny <<= rEntryType;
- rValues[0].Value = aAny;
+ rValues[0].Value = css::uno::Any(rEntryType);
// char style
if (bCharStyleNameOK)
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index 2e82090ae777..78d682dcf660 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -240,13 +240,11 @@ void XMLIndexTOCContext::StartElement(
pStyle->FillPropertySet( xTOCPropertySet );
}
- Any aAny;
xTOCPropertySet->setPropertyValue( sIsProtected, Any(bProtected) );
if (!sIndexName.isEmpty())
{
- aAny <<= sIndexName;
- xTOCPropertySet->setPropertyValue( sName, aAny );
+ xTOCPropertySet->setPropertyValue( sName, Any(sIndexName) );
}
}
}
diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.cxx b/xmloff/source/text/XMLIndexTOCSourceContext.cxx
index 3cff73576e63..77dc6312a11f 100644
--- a/xmloff/source/text/XMLIndexTOCSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCSourceContext.cxx
@@ -135,14 +135,11 @@ void XMLIndexTOCSourceContext::ProcessAttribute(
void XMLIndexTOCSourceContext::EndElement()
{
- Any aAny;
-
rIndexPropertySet->setPropertyValue(sCreateFromMarks, css::uno::Any(bUseMarks));
rIndexPropertySet->setPropertyValue(sCreateFromOutline, css::uno::Any(bUseOutline));
rIndexPropertySet->setPropertyValue(sCreateFromLevelParagraphStyles, css::uno::Any(bUseParagraphStyles));
- aAny <<= (sal_Int16)nOutlineLevel;
- rIndexPropertySet->setPropertyValue(sLevel, aAny);
+ rIndexPropertySet->setPropertyValue(sLevel, css::uno::Any((sal_Int16)nOutlineLevel));
// process common attributes
XMLIndexSourceBaseContext::EndElement();
diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.cxx b/xmloff/source/text/XMLIndexTOCStylesContext.cxx
index d218d9ad9c93..f3a3bc8cd219 100644
--- a/xmloff/source/text/XMLIndexTOCStylesContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCStylesContext.cxx
@@ -106,8 +106,7 @@ void XMLIndexTOCStylesContext::EndElement()
aAny >>= xIndexReplace;
// set style names
- aAny <<= aStyleNamesSequence;
- xIndexReplace->replaceByIndex(nOutlineLevel, aAny);
+ xIndexReplace->replaceByIndex(nOutlineLevel, Any(aStyleNamesSequence));
}
}
diff --git a/xmloff/source/text/XMLIndexTableSourceContext.cxx b/xmloff/source/text/XMLIndexTableSourceContext.cxx
index e4cdea920775..de9cd17a7f3f 100644
--- a/xmloff/source/text/XMLIndexTableSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexTableSourceContext.cxx
@@ -126,20 +126,16 @@ void XMLIndexTableSourceContext::ProcessAttribute(
void XMLIndexTableSourceContext::EndElement()
{
- Any aAny;
-
rIndexPropertySet->setPropertyValue(sCreateFromLabels, css::uno::Any(bUseCaption));
if (bSequenceOK)
{
- aAny <<= sSequence;
- rIndexPropertySet->setPropertyValue(sLabelCategory, aAny);
+ rIndexPropertySet->setPropertyValue(sLabelCategory, css::uno::Any(sSequence));
}
if (bDisplayFormatOK)
{
- aAny <<= nDisplayFormat;
- rIndexPropertySet->setPropertyValue(sLabelDisplayType, aAny);
+ rIndexPropertySet->setPropertyValue(sLabelDisplayType, css::uno::Any(nDisplayFormat));
}
XMLIndexSourceBaseContext::EndElement();
diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx
index ef970f3fac11..a60109e6bba4 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.cxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.cxx
@@ -187,8 +187,7 @@ void XMLIndexTemplateContext::EndElement()
aAny >>= xIndexReplace;
// ... and insert
- aAny <<= aValueSequence;
- xIndexReplace->replaceByIndex(nOutlineLevel, aAny);
+ xIndexReplace->replaceByIndex(nOutlineLevel, Any(aValueSequence));
if (bStyleNameOK)
{
@@ -208,9 +207,8 @@ void XMLIndexTemplateContext::EndElement()
if( rStyles.is() &&
rStyles->hasByName( sDisplayStyleName ) )
{
- aAny <<= sDisplayStyleName;
rPropertySet->setPropertyValue(
- OUString::createFromAscii(pStyleProperty), aAny);
+ OUString::createFromAscii(pStyleProperty), css::uno::Any(sDisplayStyleName));
}
}
}
diff --git a/xmloff/source/text/XMLIndexUserSourceContext.cxx b/xmloff/source/text/XMLIndexUserSourceContext.cxx
index e1f95d4c1ac0..9120e30000af 100644
--- a/xmloff/source/text/XMLIndexUserSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexUserSourceContext.cxx
@@ -151,8 +151,6 @@ void XMLIndexUserSourceContext::ProcessAttribute(
void XMLIndexUserSourceContext::EndElement()
{
- Any aAny;
-
rIndexPropertySet->setPropertyValue(sCreateFromEmbeddedObjects, css::uno::Any(bUseObjects));
rIndexPropertySet->setPropertyValue(sCreateFromGraphicObjects, css::uno::Any(bUseGraphic));
rIndexPropertySet->setPropertyValue(sUseLevelFromSource, css::uno::Any(bUseLevelFromSource));
@@ -163,8 +161,7 @@ void XMLIndexUserSourceContext::EndElement()
if( !sIndexName.isEmpty() )
{
- aAny <<= sIndexName;
- rIndexPropertySet->setPropertyValue(sUserIndexName, aAny);
+ rIndexPropertySet->setPropertyValue(sUserIndexName, css::uno::Any(sIndexName));
}
XMLIndexSourceBaseContext::EndElement();
diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx b/xmloff/source/text/XMLLineNumberingImportContext.cxx
index 3af8f5b472ba..d182f74b76d2 100644
--- a/xmloff/source/text/XMLLineNumberingImportContext.cxx
+++ b/xmloff/source/text/XMLLineNumberingImportContext.cxx
@@ -233,25 +233,18 @@ void XMLLineNumberingImportContext::CreateAndInsert(bool)
xLineNumbering->setPropertyValue(sCharStyleName, aAny);
}
- aAny <<= sSeparator;
- xLineNumbering->setPropertyValue(sSeparatorText, aAny);
-
- aAny <<= nOffset;
- xLineNumbering->setPropertyValue(sDistance, aAny);
-
- aAny <<= nNumberPosition;
- xLineNumbering->setPropertyValue(sNumberPosition, aAny);
+ xLineNumbering->setPropertyValue(sSeparatorText, Any(sSeparator));
+ xLineNumbering->setPropertyValue(sDistance, Any(nOffset));
+ xLineNumbering->setPropertyValue(sNumberPosition, Any(nNumberPosition));
if (nIncrement >= 0)
{
- aAny <<= nIncrement;
- xLineNumbering->setPropertyValue(sInterval, aAny);
+ xLineNumbering->setPropertyValue(sInterval, Any(nIncrement));
}
if (nSeparatorIncrement >= 0)
{
- aAny <<= nSeparatorIncrement;
- xLineNumbering->setPropertyValue(sSeparatorInterval, aAny);
+ xLineNumbering->setPropertyValue(sSeparatorInterval, Any(nSeparatorIncrement));
}
xLineNumbering->setPropertyValue(sIsOn, Any(bNumberLines));
@@ -263,8 +256,7 @@ void XMLLineNumberingImportContext::CreateAndInsert(bool)
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType,
sNumFormat,
sNumLetterSync );
- aAny <<= nNumType;
- xLineNumbering->setPropertyValue(sNumberingType, aAny);
+ xLineNumbering->setPropertyValue(sNumberingType, Any(nNumType));
}
}
}
diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx
index 5f3bc8c0c062..49f660b572b7 100644
--- a/xmloff/source/text/XMLPropertyBackpatcher.cxx
+++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx
@@ -117,9 +117,7 @@ void XMLPropertyBackpatcher<A>::SetProperty(
if (aIDMap.count(sName))
{
// we know this ID -> set property
- Any aAny;
- aAny <<= aIDMap[sName];
- xPropSet->setPropertyValue(sPropertyName, aAny);
+ xPropSet->setPropertyValue(sPropertyName, css::uno::Any(aIDMap[sName]));
}
else
{
diff --git a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
index ad2ff935f30b..78f061cad181 100644
--- a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
+++ b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
@@ -128,7 +128,6 @@ void XMLSectionFootnoteConfigImport::StartElement(
}
// OK, now we have all values and can fill the XMLPropertyState vector
- Any aAny;
sal_Int32 nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_OWN : CTF_SECTION_FOOTNOTE_NUM_OWN );
@@ -140,33 +139,29 @@ void XMLSectionFootnoteConfigImport::StartElement(
XMLPropertyState aNumRestart( nIndex, css::uno::Any(bNumRestart) );
rProperties.push_back( aNumRestart );
- aAny <<= nNumRestartAt;
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_RESTART_AT :
CTF_SECTION_FOOTNOTE_NUM_RESTART_AT );
- XMLPropertyState aNumRestartAtState( nIndex, aAny );
+ XMLPropertyState aNumRestartAtState( nIndex, css::uno::Any(nNumRestartAt) );
rProperties.push_back( aNumRestartAtState );
sal_Int16 nNumType = NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType,
sNumFormat,
sNumLetterSync );
- aAny <<= nNumType;
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_TYPE : CTF_SECTION_FOOTNOTE_NUM_TYPE );
- XMLPropertyState aNumFormatState( nIndex, aAny );
+ XMLPropertyState aNumFormatState( nIndex, css::uno::Any(nNumType) );
rProperties.push_back( aNumFormatState );
- aAny <<= sNumPrefix;
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_PREFIX : CTF_SECTION_FOOTNOTE_NUM_PREFIX );
- XMLPropertyState aPrefixState( nIndex, aAny );
+ XMLPropertyState aPrefixState( nIndex, css::uno::Any(sNumPrefix) );
rProperties.push_back( aPrefixState );
- aAny <<= sNumSuffix;
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_SUFFIX : CTF_SECTION_FOOTNOTE_NUM_SUFFIX );
- XMLPropertyState aSuffixState( nIndex, aAny );
+ XMLPropertyState aSuffixState( nIndex, css::uno::Any(sNumSuffix) );
rProperties.push_back( aSuffixState );
nIndex = rMapper->FindEntryIndex( bEndnote ?
diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx
index d89abf0240a4..43f6d247ba0c 100644
--- a/xmloff/source/text/XMLSectionImportContext.cxx
+++ b/xmloff/source/text/XMLSectionImportContext.cxx
@@ -167,7 +167,6 @@ void XMLSectionImportContext::StartElement(
// IsVisible and condition (not for index headers)
if (! bIsIndexHeader)
{
- Any aAny;
xPropSet->setPropertyValue( sIsVisible, Any(bIsVisible) );
// #97450# hidden sections must be hidden on reload
@@ -180,8 +179,7 @@ void XMLSectionImportContext::StartElement(
if (bCondOK)
{
- aAny <<= sCond;
- xPropSet->setPropertyValue( sCondition, aAny );
+ xPropSet->setPropertyValue( sCondition, Any(sCond) );
}
}
@@ -189,9 +187,7 @@ void XMLSectionImportContext::StartElement(
if ( bSequenceOK &&
IsXMLToken(GetLocalName(), XML_SECTION) )
{
- Any aAny;
- aAny <<= aSequence;
- xPropSet->setPropertyValue(sProtectionKey, aAny);
+ xPropSet->setPropertyValue(sProtectionKey, Any(aSequence));
}
// protection
diff --git a/xmloff/source/text/XMLSectionSourceImportContext.cxx b/xmloff/source/text/XMLSectionSourceImportContext.cxx
index 91ab4bf94448..78d4847a3dbb 100644
--- a/xmloff/source/text/XMLSectionSourceImportContext.cxx
+++ b/xmloff/source/text/XMLSectionSourceImportContext.cxx
@@ -110,21 +110,18 @@ void XMLSectionSourceImportContext::StartElement(
const OUString sFileLink("FileLink");
const OUString sLinkRegion("LinkRegion");
- Any aAny;
if (!sURL.isEmpty() || !sFilterName.isEmpty())
{
SectionFileLink aFileLink;
aFileLink.FileURL = GetImport().GetAbsoluteReference( sURL );
aFileLink.FilterName = sFilterName;
- aAny <<= aFileLink;
- rSectionPropertySet->setPropertyValue(sFileLink, aAny);
+ rSectionPropertySet->setPropertyValue(sFileLink, Any(aFileLink));
}
if (!sSectionName.isEmpty())
{
- aAny <<= sSectionName;
- rSectionPropertySet->setPropertyValue(sLinkRegion, aAny);
+ rSectionPropertySet->setPropertyValue(sLinkRegion, Any(sSectionName));
}
}
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index e25e6a465de8..08e8d05270c0 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -442,7 +442,6 @@ void XMLTextColumnsContext::EndElement( )
Reference < XPropertySet > xPropSet( xColumns, UNO_QUERY );
if( xPropSet.is() )
{
- Any aAny;
bool bOn = pColumnSep != nullptr;
xPropSet->setPropertyValue( sSeparatorLineIsOn, Any(bOn) );
@@ -451,33 +450,27 @@ void XMLTextColumnsContext::EndElement( )
{
if( pColumnSep->GetWidth() )
{
- aAny <<= pColumnSep->GetWidth();
- xPropSet->setPropertyValue( sSeparatorLineWidth, aAny );
+ xPropSet->setPropertyValue( sSeparatorLineWidth, Any(pColumnSep->GetWidth()) );
}
if( pColumnSep->GetHeight() )
{
- aAny <<= pColumnSep->GetHeight();
xPropSet->setPropertyValue( sSeparatorLineRelativeHeight,
- aAny );
+ Any(pColumnSep->GetHeight()) );
}
if ( pColumnSep->GetStyle() )
{
- aAny <<= pColumnSep->GetStyle();
- xPropSet->setPropertyValue( sSeparatorLineStyle, aAny );
+ xPropSet->setPropertyValue( sSeparatorLineStyle, Any(pColumnSep->GetStyle()) );
}
- aAny <<= pColumnSep->GetColor();
- xPropSet->setPropertyValue( sSeparatorLineColor, aAny );
+ xPropSet->setPropertyValue( sSeparatorLineColor, Any(pColumnSep->GetColor()) );
- aAny <<= pColumnSep->GetVertAlign();
- xPropSet->setPropertyValue( sSeparatorLineVerticalAlignment, aAny );
+ xPropSet->setPropertyValue( sSeparatorLineVerticalAlignment, Any(pColumnSep->GetVertAlign()) );
}
// handle 'automatic columns': column distance
if( bAutomatic )
{
- aAny <<= nAutomaticDistance;
- xPropSet->setPropertyValue( sAutomaticDistance, aAny );
+ xPropSet->setPropertyValue( sAutomaticDistance, Any(nAutomaticDistance) );
}
}
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 4001d26243c2..8e46ae6df704 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -282,7 +282,6 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl(
{
const SdXMLImExViewBox aViewBox( sViewBox, GetImport().GetMM100UnitConverter());
basegfx::B2DPolyPolygon aPolyPolygon;
- Any aAny;
if( bPath )
{
@@ -317,8 +316,7 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl(
css::drawing::PointSequenceSequence aPointSequenceSequence;
basegfx::tools::B2DPolyPolygonToUnoPointSequenceSequence(aPolyPolygon, aPointSequenceSequence);
- aAny <<= aPointSequenceSequence;
- xPropSet->setPropertyValue( sContourPolyPolygon, aAny );
+ xPropSet->setPropertyValue( sContourPolyPolygon, Any(aPointSequenceSequence) );
}
const OUString sIsPixelContour("IsPixelContour");
@@ -614,16 +612,14 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
if( rStyles.is() &&
rStyles->hasByName( sDisplayStyleName ) )
{
- aAny <<= sDisplayStyleName;
- xPropSet->setPropertyValue( sFrameStyleName, aAny );
+ xPropSet->setPropertyValue( sFrameStyleName, Any(sDisplayStyleName) );
}
}
// anchor type (must be set before any other properties, because
// otherwise some orientations cannot be set or will be changed
// afterwards)
- aAny <<= eAnchorType;
- xPropSet->setPropertyValue( sAnchorType, aAny );
+ xPropSet->setPropertyValue( sAnchorType, Any(eAnchorType) );
// hard properties
if( pStyle )
@@ -635,8 +631,7 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
aAny >>= nHoriOrient;
if( HoriOrientation::NONE == nHoriOrient )
{
- aAny <<= nX;
- xPropSet->setPropertyValue( sHoriOrientPosition, aAny );
+ xPropSet->setPropertyValue( sHoriOrientPosition, Any(nX) );
}
sal_Int16 nVertOrient = VertOrientation::NONE;
@@ -644,20 +639,17 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
aAny >>= nVertOrient;
if( VertOrientation::NONE == nVertOrient )
{
- aAny <<= nY;
- xPropSet->setPropertyValue( sVertOrientPosition, aAny );
+ xPropSet->setPropertyValue( sVertOrientPosition, Any(nY) );
}
// width
if( nWidth > 0 )
{
- aAny <<= nWidth;
- xPropSet->setPropertyValue( sWidth, aAny );
+ xPropSet->setPropertyValue( sWidth, Any(nWidth) );
}
if( nRelWidth > 0 || nWidth > 0 )
{
- aAny <<= nRelWidth;
- xPropSet->setPropertyValue( sRelativeWidth, aAny );
+ xPropSet->setPropertyValue( sRelativeWidth, Any(nRelWidth) );
}
if( bSyncWidth || nWidth > 0 )
{
@@ -669,19 +661,16 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
sal_Int16 nSizeType =
(bMinWidth && XML_TEXT_FRAME_TEXTBOX == nType) ? SizeType::MIN
: SizeType::FIX;
- aAny <<= nSizeType;
- xPropSet->setPropertyValue( sWidthType, aAny );
+ xPropSet->setPropertyValue( sWidthType, Any(nSizeType) );
}
if( nHeight > 0 )
{
- aAny <<= nHeight;
- xPropSet->setPropertyValue( sHeight, aAny );
+ xPropSet->setPropertyValue( sHeight, Any(nHeight) );
}
if( nRelHeight > 0 || nHeight > 0 )
{
- aAny <<= nRelHeight;
- xPropSet->setPropertyValue( sRelativeHeight, aAny );
+ xPropSet->setPropertyValue( sRelativeHeight, Any(nRelHeight) );
}
if( bSyncHeight || nHeight > 0 )
{
@@ -693,8 +682,7 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
sal_Int16 nSizeType =
(bMinHeight && XML_TEXT_FRAME_TEXTBOX == nType) ? SizeType::MIN
: SizeType::FIX;
- aAny <<= nSizeType;
- xPropSet->setPropertyValue( sSizeType, aAny );
+ xPropSet->setPropertyValue( sSizeType, Any(nSizeType) );
}
if( XML_TEXT_FRAME_GRAPHIC == nType )
@@ -717,24 +705,20 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
sHRef = GetImport().ResolveGraphicObjectURLFromBase64( xBase64Stream );
xBase64Stream = nullptr;
}
- aAny <<= sHRef;
- xPropSet->setPropertyValue( sGraphicURL, aAny );
+ xPropSet->setPropertyValue( sGraphicURL, Any(sHRef) );
// filter name
- aAny <<=sFilterName;
- xPropSet->setPropertyValue( sGraphicFilter, aAny );
+ xPropSet->setPropertyValue( sGraphicFilter, Any(sFilterName) );
// rotation
- aAny <<= nRotation;
- xPropSet->setPropertyValue( sGraphicRotation, aAny );
+ xPropSet->setPropertyValue( sGraphicRotation, Any(nRotation) );
}
// page number (must be set after the frame is inserted, because it
// will be overwritten then inserting the frame.
if( TextContentAnchorType_AT_PAGE == eAnchorType && nPage > 0 )
{
- aAny <<= nPage;
- xPropSet->setPropertyValue( sAnchorPageNo, aAny );
+ xPropSet->setPropertyValue( sAnchorPageNo, Any(nPage) );
}
if( XML_TEXT_FRAME_OBJECT != nType &&
@@ -1271,20 +1255,16 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef,
!xPropSetInfo->hasPropertyByName(s_HyperLinkURL))
return;
- Any aAny;
- aAny <<= rHRef;
- xPropSet->setPropertyValue( s_HyperLinkURL, aAny );
+ xPropSet->setPropertyValue( s_HyperLinkURL, Any(rHRef) );
if (xPropSetInfo->hasPropertyByName(s_HyperLinkName))
{
- aAny <<= rName;
- xPropSet->setPropertyValue(s_HyperLinkName, aAny);
+ xPropSet->setPropertyValue(s_HyperLinkName, Any(rName));
}
if (xPropSetInfo->hasPropertyByName(s_HyperLinkTarget))
{
- aAny <<= rTargetFrameName;
- xPropSet->setPropertyValue( s_HyperLinkTarget, aAny );
+ xPropSet->setPropertyValue( s_HyperLinkTarget, Any(rTargetFrameName) );
}
if (xPropSetInfo->hasPropertyByName(s_ServerMap))
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index 0c06fe8777b2..155d29697ab8 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -137,8 +137,7 @@ XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
if( !xStyle.is() )
return;
- aAny <<= xStyle;
- xPageStyles->insertByName( sDisplayName, aAny );
+ xPageStyles->insertByName( sDisplayName, Any(xStyle) );
bNew = true;
}
@@ -283,8 +282,7 @@ void XMLTextMasterPageContext::Finish( bool bOverwrite )
aAny >>= sCurrFollow;
if( sCurrFollow != sDisplayFollow )
{
- aAny <<= sDisplayFollow;
- xPropSet->setPropertyValue( sFollowStyle, aAny );
+ xPropSet->setPropertyValue( sFollowStyle, Any(sDisplayFollow) );
}
}
diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx
index 60aae4701189..be9f7f05651e 100644
--- a/xmloff/source/text/XMLTextShapeImportHelper.cxx
+++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx
@@ -120,11 +120,9 @@ void XMLTextShapeImportHelper::addShape(
}
Reference < XPropertySet > xPropSet( rShape, UNO_QUERY );
- Any aAny;
// anchor type
- aAny <<= eAnchorType;
- xPropSet->setPropertyValue( sAnchorType, aAny );
+ xPropSet->setPropertyValue( sAnchorType, Any(eAnchorType) );
Reference < XTextContent > xTxtCntnt( rShape, UNO_QUERY );
xTxtImport->InsertTextContent( xTxtCntnt );
@@ -137,13 +135,11 @@ void XMLTextShapeImportHelper::addShape(
// only set positive page numbers
if ( nPage > 0 )
{
- aAny <<= nPage;
- xPropSet->setPropertyValue( sAnchorPageNo, aAny );
+ xPropSet->setPropertyValue( sAnchorPageNo, Any(nPage) );
}
break;
case TextContentAnchorType_AS_CHARACTER:
- aAny <<= nY;
- xPropSet->setPropertyValue( sVertOrientPosition, aAny );
+ xPropSet->setPropertyValue( sVertOrientPosition, Any(nY) );
break;
default:
break;
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 50b7dca74ebe..438c9783fe90 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -707,9 +707,7 @@ void XMLSenderFieldImportContext::PrepareField(
const Reference<XPropertySet> & rPropSet)
{
// set members
- Any aAny;
- aAny <<= nSubType;
- rPropSet->setPropertyValue(sPropertyFieldSubType, aAny);
+ rPropSet->setPropertyValue(sPropertyFieldSubType, Any(nSubType));
// set fixed
rPropSet->setPropertyValue(sPropertyFixed, Any(bFixed));
@@ -725,8 +723,7 @@ void XMLSenderFieldImportContext::PrepareField(
}
else
{
- aAny <<= GetContent();
- rPropSet->setPropertyValue(sPropertyContent, aAny);
+ rPropSet->setPropertyValue(sPropertyContent, Any(GetContent()));
}
}
}
@@ -839,8 +836,7 @@ void XMLPageContinuationImportContext::PrepareField(
{
Any aAny;
- aAny <<= eSelectPage;
- xPropertySet->setPropertyValue(sPropertySubType, aAny);
+ xPropertySet->setPropertyValue(sPropertySubType, Any(eSelectPage));
aAny <<= (sStringOK ? sString : GetContent());
xPropertySet->setPropertyValue(sPropertyUserText, aAny);
@@ -906,8 +902,6 @@ void XMLPageNumberImportContext::ProcessAttribute(
void XMLPageNumberImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// all properties are optional
Reference<XPropertySetInfo> xPropertySetInfo(
xPropertySet->getPropertySetInfo());
@@ -925,8 +919,7 @@ void XMLPageNumberImportContext::PrepareField(
else
nNumType = style::NumberingType::PAGE_DESCRIPTOR;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
}
if (xPropertySetInfo->hasPropertyByName(sPropertyOffset))
@@ -945,14 +938,12 @@ void XMLPageNumberImportContext::PrepareField(
default:
SAL_WARN("xmloff.text", "unknown page number type");
}
- aAny <<= nPageAdjust;
- xPropertySet->setPropertyValue(sPropertyOffset, aAny);
+ xPropertySet->setPropertyValue(sPropertyOffset, Any(nPageAdjust));
}
if (xPropertySetInfo->hasPropertyByName(sPropertySubType))
{
- aAny <<= eSelectPage;
- xPropertySet->setPropertyValue(sPropertySubType, aAny);
+ xPropertySet->setPropertyValue(sPropertySubType, Any(eSelectPage));
}
}
@@ -1017,8 +1008,7 @@ void XMLPlaceholderFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet) {
Any aAny;
- aAny <<= sDescription;
- xPropertySet->setPropertyValue(sPropertyHint, aAny);
+ xPropertySet->setPropertyValue(sPropertyHint, Any(sDescription));
// remove <...> around content (if present)
OUString aContent = GetContent();
@@ -1036,8 +1026,7 @@ void XMLPlaceholderFieldImportContext::PrepareField(
aAny <<= aContent.copy(nStart, nLength);
xPropertySet->setPropertyValue(sPropertyPlaceholder, aAny);
- aAny <<= nPlaceholderType;
- xPropertySet->setPropertyValue(sPropertyPlaceholderType, aAny);
+ xPropertySet->setPropertyValue(sPropertyPlaceholderType, Any(nPlaceholderType));
}
@@ -1117,8 +1106,6 @@ void XMLTimeFieldImportContext::ProcessAttribute(
void XMLTimeFieldImportContext::PrepareField(
const Reference<XPropertySet> & rPropertySet)
{
- Any aAny;
-
// all properties are optional (except IsDate)
Reference<XPropertySetInfo> xPropertySetInfo(
rPropertySet->getPropertySetInfo());
@@ -1132,8 +1119,7 @@ void XMLTimeFieldImportContext::PrepareField(
if (xPropertySetInfo->hasPropertyByName(sPropertyAdjust))
{
- aAny <<= nAdjust;
- rPropertySet->setPropertyValue(sPropertyAdjust, aAny);
+ rPropertySet->setPropertyValue(sPropertyAdjust, Any(nAdjust));
}
// set value
@@ -1152,13 +1138,11 @@ void XMLTimeFieldImportContext::PrepareField(
{
if (xPropertySetInfo->hasPropertyByName(sPropertyDateTimeValue))
{
- aAny <<= aDateTimeValue;
- rPropertySet->setPropertyValue(sPropertyDateTimeValue,aAny);
+ rPropertySet->setPropertyValue(sPropertyDateTimeValue, Any(aDateTimeValue));
}
else if (xPropertySetInfo->hasPropertyByName(sPropertyDateTime))
{
- aAny <<= aDateTimeValue;
- rPropertySet->setPropertyValue(sPropertyDateTime, aAny);
+ rPropertySet->setPropertyValue(sPropertyDateTime, Any(aDateTimeValue));
}
}
}
@@ -1167,8 +1151,7 @@ void XMLTimeFieldImportContext::PrepareField(
if (bFormatOK &&
xPropertySetInfo->hasPropertyByName(sPropertyNumberFormat))
{
- aAny <<= nFormatKey;
- rPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ rPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormatKey));
if( xPropertySetInfo->hasPropertyByName( sPropertyIsFixedLanguage ) )
{
@@ -1331,28 +1314,22 @@ SvXMLImportContext* XMLDatabaseFieldImportContext::CreateChildContext(
void XMLDatabaseFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sTableName;
- xPropertySet->setPropertyValue(sPropertyTableName, aAny);
+ xPropertySet->setPropertyValue(sPropertyTableName, Any(sTableName));
if( bDatabaseNameOK )
{
- aAny <<= sDatabaseName;
- xPropertySet->setPropertyValue(sPropertyDataBaseName, aAny);
+ xPropertySet->setPropertyValue(sPropertyDataBaseName, Any(sDatabaseName));
}
else if( bDatabaseURLOK )
{
- aAny <<= sDatabaseURL;
- xPropertySet->setPropertyValue(sPropertyDataBaseURL, aAny);
+ xPropertySet->setPropertyValue(sPropertyDataBaseURL, Any(sDatabaseURL));
}
// #99980# load/save command type for all fields; also load
// old documents without command type
if( bCommandTypeOK )
{
- aAny <<= nCommandType;
- xPropertySet->setPropertyValue( sPropertyDataCommandType, aAny );
+ xPropertySet->setPropertyValue( sPropertyDataCommandType, Any(nCommandType) );
}
if( bUseDisplay && bDisplayOK )
@@ -1484,10 +1461,7 @@ void XMLDatabaseSelectImportContext::ProcessAttribute(
void XMLDatabaseSelectImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nNumber;
- xPropertySet->setPropertyValue(sPropertySetNumber, aAny);
+ xPropertySet->setPropertyValue(sPropertySetNumber, Any(nNumber));
XMLDatabaseNextImportContext::PrepareField(xPropertySet);
}
@@ -1545,19 +1519,15 @@ void XMLDatabaseNumberImportContext::ProcessAttribute(
void XMLDatabaseNumberImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
sal_Int16 nNumType = style::NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType,
sNumberFormat,
sNumberSync );
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
if (bValueOK)
{
- aAny <<= nValue;
- xPropertySet->setPropertyValue(sPropertySetNumber, aAny);
+ xPropertySet->setPropertyValue(sPropertySetNumber, Any(nValue));
}
XMLDatabaseFieldImportContext::PrepareField(xPropertySet);
@@ -1736,9 +1706,7 @@ void XMLRevisionDocInfoImportContext::PrepareField(
sal_Int32 nTmp;
if (::sax::Converter::convertNumber(nTmp, GetContent()))
{
- Any aAny;
- aAny <<= nTmp;
- rPropertySet->setPropertyValue(sPropertyRevision, aAny);
+ rPropertySet->setPropertyValue(sPropertyRevision, Any(nTmp));
}
}
}
@@ -1825,8 +1793,6 @@ void XMLDateTimeDocInfoImportContext::PrepareField(
// process fixed and presentation
XMLSimpleDocInfoImportContext::PrepareField(xPropertySet);
- Any aAny;
-
if (bHasDateTime)
{
xPropertySet->setPropertyValue(sPropertyIsDate, Any(bIsDate));
@@ -1834,8 +1800,7 @@ void XMLDateTimeDocInfoImportContext::PrepareField(
if (bFormatOK)
{
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormat));
if( xPropertySet->getPropertySetInfo()->
hasPropertyByName( sPropertyIsFixedLanguage ) )
@@ -1906,19 +1871,16 @@ void XMLUserDocInfoImportContext::ProcessAttribute(
void XMLUserDocInfoImportContext::PrepareField(
const css::uno::Reference<css::beans::XPropertySet> & xPropertySet)
{
- uno::Any aAny;
if ( !aName.isEmpty() )
{
- aAny <<= aName;
- xPropertySet->setPropertyValue(sPropertyName, aAny);
+ xPropertySet->setPropertyValue(sPropertyName, Any(aName));
}
Reference<XPropertySetInfo> xPropertySetInfo(
xPropertySet->getPropertySetInfo());
if (bFormatOK &&
xPropertySetInfo->hasPropertyByName(sPropertyNumberFormat))
{
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormat));
if( xPropertySetInfo->hasPropertyByName( sPropertyIsFixedLanguage ) )
{
@@ -1977,10 +1939,7 @@ void XMLHiddenParagraphImportContext::ProcessAttribute(
void XMLHiddenParagraphImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
- aAny <<= sCondition;
- xPropertySet->setPropertyValue(sPropertyCondition, aAny);
-
+ xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
xPropertySet->setPropertyValue(sPropertyIsHidden, Any(bIsHidden));
}
@@ -2050,21 +2009,11 @@ void XMLConditionalTextImportContext::ProcessAttribute(
void XMLConditionalTextImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sCondition;
- xPropertySet->setPropertyValue(sPropertyCondition, aAny);
-
- aAny <<= sFalseContent;
- xPropertySet->setPropertyValue(sPropertyFalseContent, aAny);
-
- aAny <<= sTrueContent;
- xPropertySet->setPropertyValue(sPropertyTrueContent, aAny);
-
+ xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
+ xPropertySet->setPropertyValue(sPropertyFalseContent, Any(sFalseContent));
+ xPropertySet->setPropertyValue(sPropertyTrueContent, Any(sTrueContent));
xPropertySet->setPropertyValue(sPropertyIsConditionTrue, Any(bCurrentValue));
-
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, Any(GetContent()));
}
@@ -2126,14 +2075,8 @@ void XMLHiddenTextImportContext::ProcessAttribute(
void XMLHiddenTextImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sCondition;
- xPropertySet->setPropertyValue(sPropertyCondition, aAny);
-
- aAny <<= sString;
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
-
+ xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
+ xPropertySet->setPropertyValue(sPropertyContent, Any(sString));
xPropertySet->setPropertyValue(sPropertyIsHidden, Any(bIsHidden));
}
@@ -2199,28 +2142,23 @@ void XMLFileNameImportContext::ProcessAttribute(
void XMLFileNameImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// properties are optional
Reference<XPropertySetInfo> xPropertySetInfo(
xPropertySet->getPropertySetInfo());
if (xPropertySetInfo->hasPropertyByName(sPropertyFixed))
{
- aAny <<= bFixed;
- xPropertySet->setPropertyValue(sPropertyFixed, aAny);
+ xPropertySet->setPropertyValue(sPropertyFixed, Any(bFixed));
}
if (xPropertySetInfo->hasPropertyByName(sPropertyFileFormat))
{
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyFileFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyFileFormat, Any(nFormat));
}
if (xPropertySetInfo->hasPropertyByName(sPropertyCurrentPresentation))
{
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, Any(GetContent()));
}
}
@@ -2276,10 +2214,7 @@ void XMLTemplateNameImportContext::ProcessAttribute(
void XMLTemplateNameImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyFileFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyFileFormat, Any(nFormat));
}
@@ -2349,13 +2284,8 @@ void XMLChapterImportContext::ProcessAttribute(
void XMLChapterImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyChapterFormat, aAny);
-
- aAny <<= nLevel;
- xPropertySet->setPropertyValue(sPropertyLevel, aAny);
+ xPropertySet->setPropertyValue(sPropertyChapterFormat, Any(nFormat));
+ xPropertySet->setPropertyValue(sPropertyLevel, Any(nLevel));
}
@@ -2395,8 +2325,6 @@ void XMLCountFieldImportContext::ProcessAttribute(
void XMLCountFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// properties optional
// (only page count, but do for all to save common implementation)
@@ -2413,8 +2341,7 @@ void XMLCountFieldImportContext::PrepareField(
}
else
nNumType = style::NumberingType::PAGE_DESCRIPTOR;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
}
}
@@ -2492,8 +2419,6 @@ void XMLPageVarGetFieldImportContext::ProcessAttribute(
void XMLPageVarGetFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
sal_Int16 nNumType;
if( bNumberFormatOK )
{
@@ -2504,12 +2429,10 @@ void XMLPageVarGetFieldImportContext::PrepareField(
}
else
nNumType = style::NumberingType::PAGE_DESCRIPTOR;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
// display old content (#96657#)
- aAny <<= GetContent();
- xPropertySet->setPropertyValue( sAPI_current_presentation, aAny );
+ xPropertySet->setPropertyValue( sAPI_current_presentation, Any(GetContent()) );
}
@@ -2561,12 +2484,8 @@ void XMLPageVarSetFieldImportContext::ProcessAttribute(
void XMLPageVarSetFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
xPropertySet->setPropertyValue(sPropertyOn, Any(bActive));
-
- aAny <<= nAdjust;
- xPropertySet->setPropertyValue(sPropertyOffset, aAny);
+ xPropertySet->setPropertyValue(sPropertyOffset, Any(nAdjust));
}
@@ -2695,14 +2614,9 @@ void XMLMacroFieldImportContext::PrepareField(
sMacroName = sMacro;
}
- aAny <<= sScriptURL;
- xPropertySet->setPropertyValue(sPropertyScriptURL, aAny);
-
- aAny <<= sMacroName;
- xPropertySet->setPropertyValue(sPropertyMacroName, aAny);
-
- aAny <<= sLibraryName;
- xPropertySet->setPropertyValue(sPropertyMacroLibrary, aAny);
+ xPropertySet->setPropertyValue(sPropertyScriptURL, Any(sScriptURL));
+ xPropertySet->setPropertyValue(sPropertyMacroName, Any(sMacroName));
+ xPropertySet->setPropertyValue(sPropertyMacroLibrary, Any(sLibraryName));
}
@@ -2812,20 +2726,15 @@ void XMLReferenceFieldImportContext::ProcessAttribute(
void XMLReferenceFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nType;
- xPropertySet->setPropertyValue(sPropertyReferenceFieldPart, aAny);
+ xPropertySet->setPropertyValue(sPropertyReferenceFieldPart, Any(nType));
- aAny <<= nSource;
- xPropertySet->setPropertyValue(sPropertyReferenceFieldSource, aAny);
+ xPropertySet->setPropertyValue(sPropertyReferenceFieldSource, Any(nSource));
switch (nElementToken)
{
case XML_TOK_TEXT_REFERENCE_REF:
case XML_TOK_TEXT_BOOKMARK_REF:
- aAny <<= sName;
- xPropertySet->setPropertyValue(sPropertySourceName, aAny);
+ xPropertySet->setPropertyValue(sPropertySourceName, Any(sName));
break;
case XML_TOK_TEXT_NOTE_REF:
@@ -2837,8 +2746,7 @@ void XMLReferenceFieldImportContext::PrepareField(
break;
}
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, Any(GetContent()));
}
@@ -2994,20 +2902,14 @@ void XMLDdeFieldDeclImportContext::StartElement(
xPropSet->getPropertySetInfo()->hasPropertyByName(
sPropertyDDECommandType))
{
- Any aAny;
-
- aAny <<= sName;
- xPropSet->setPropertyValue(sPropertyName, aAny);
+ xPropSet->setPropertyValue(sPropertyName, Any(sName));
- aAny <<= sCommandApplication;
- xPropSet->setPropertyValue(sPropertyDDECommandType, aAny);
+ xPropSet->setPropertyValue(sPropertyDDECommandType, Any(sCommandApplication));
- aAny <<= sCommandTopic;
- xPropSet->setPropertyValue(sPropertyDDECommandFile, aAny);
+ xPropSet->setPropertyValue(sPropertyDDECommandFile, Any(sCommandTopic));
- aAny <<= sCommandItem;
xPropSet->setPropertyValue(sPropertyDDECommandElement,
- aAny);
+ Any(sCommandItem));
xPropSet->setPropertyValue(sPropertyIsAutomaticUpdate,
Any(bUpdate));
@@ -3202,19 +3104,14 @@ void XMLUrlFieldImportContext::ProcessAttribute(
void XMLUrlFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sURL;
- xPropertySet->setPropertyValue(sPropertyURL, aAny);
+ xPropertySet->setPropertyValue(sPropertyURL, Any(sURL));
if (bFrameOK)
{
- aAny <<= sFrame;
- xPropertySet->setPropertyValue(sPropertyTargetFrame, aAny);
+ xPropertySet->setPropertyValue(sPropertyTargetFrame, Any(sFrame));
}
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyRepresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyRepresentation, Any(GetContent()));
}
@@ -3330,9 +3227,7 @@ void XMLBibliographyFieldImportContext::PrepareField(
}
// set sequence
- Any aAny;
- aAny <<= aValueSequence;
- xPropertySet->setPropertyValue(sPropertyFields, aAny);
+ xPropertySet->setPropertyValue(sPropertyFields, Any(aValueSequence));
}
const sal_Char* XMLBibliographyFieldImportContext::MapBibliographyFieldName(
@@ -3745,21 +3640,17 @@ void XMLScriptImportContext::ProcessAttribute(
void XMLScriptImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// if href attribute was present, we use it. Else we use element content
if (! bContentOK)
{
sContent = GetContent();
}
- aAny <<= sContent;
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(sContent));
// URL or script text? We use URL if we have an href-attribute
xPropertySet->setPropertyValue(sPropertyURLContent, Any(bContentOK));
- aAny <<= sScriptType;
- xPropertySet->setPropertyValue(sPropertyScriptType, aAny);
+ xPropertySet->setPropertyValue(sPropertyScriptType, Any(sScriptType));
}
@@ -3803,9 +3694,7 @@ void XMLMeasureFieldImportContext::ProcessAttribute(
void XMLMeasureFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
- aAny <<= mnKind;
- xPropertySet->setPropertyValue("Kind", aAny);
+ xPropertySet->setPropertyValue("Kind", Any(mnKind));
}
@@ -3918,34 +3807,28 @@ void XMLDropDownFieldImportContext::PrepareField(
pSequence[n] = aLabels[n];
// now set values:
- Any aAny;
- aAny <<= aSequence;
- xPropertySet->setPropertyValue( sPropertyItems, aAny );
+ xPropertySet->setPropertyValue( sPropertyItems, Any(aSequence) );
if( nSelected >= 0 && nSelected < nLength )
{
- aAny <<= pSequence[nSelected];
- xPropertySet->setPropertyValue( sPropertySelectedItem, aAny );
+ xPropertySet->setPropertyValue( sPropertySelectedItem, Any(pSequence[nSelected]) );
}
// set name
if( bNameOK )
{
- aAny <<= sName;
- xPropertySet->setPropertyValue( sPropertyName, aAny );
+ xPropertySet->setPropertyValue( sPropertyName, Any(sName) );
}
// set help
if( bHelpOK )
{
- aAny <<= sHelp;
- xPropertySet->setPropertyValue( sPropertyHelp, aAny );
+ xPropertySet->setPropertyValue( sPropertyHelp, Any(sHelp) );
}
// set hint
if( bHintOK )
{
- aAny <<= sHint;
- xPropertySet->setPropertyValue( sPropertyToolTip, aAny );
+ xPropertySet->setPropertyValue( sPropertyToolTip, Any(sHint) );
}
}
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 06c3c5301315..5570bf36fc9a 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -975,17 +975,13 @@ void XMLMetaFieldImportContext::InsertMeta(
if (-1 != nKey)
{
- static OUString sPropertyIsFixedLanguage(
- OUString("IsFixedLanguage") );
- Any any;
- any <<= nKey;
- xPropertySet->setPropertyValue("NumberFormat", any);
+ OUString sPropertyIsFixedLanguage("IsFixedLanguage");
+ xPropertySet->setPropertyValue("NumberFormat", Any(nKey));
if ( xPropertySet->getPropertySetInfo()->
hasPropertyByName( sPropertyIsFixedLanguage ) )
{
- any <<= static_cast<bool>(!isDefaultLanguage);
xPropertySet->setPropertyValue( sPropertyIsFixedLanguage,
- any );
+ Any(!isDefaultLanguage) );
}
}
}
@@ -2166,10 +2162,7 @@ XMLParaContext::~XMLParaContext()
{
// set anchor position for at-character anchored objects
Reference<XTextRange> xRange(xAttrCursor, UNO_QUERY);
- Any aPos;
- aPos <<= xRange;
- OUString sTextRange( "TextRange" );
- xPropSet->setPropertyValue(sTextRange, aPos);
+ xPropSet->setPropertyValue("TextRange", Any(xRange));
}
}
}
@@ -2198,10 +2191,7 @@ XMLParaContext::~XMLParaContext()
{
// set anchor position for at-character anchored objects
Reference<XTextRange> xRange(xAttrCursor, UNO_QUERY);
- Any aPos;
- aPos <<= xRange;
- OUString sTextRange( "TextRange" );
- xPropSet->setPropertyValue(sTextRange, aPos);
+ xPropSet->setPropertyValue("TextRange", Any(xRange));
}
}
}
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index a9332109d2eb..eb748ea87696 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -224,9 +224,7 @@ void XMLTextStyleContext::CreateAndInsert( bool bOverwrite )
xPropSetInfo->hasPropertyByName( sCategory ) &&
SvXMLUnitConverter::convertEnum( nCategory, sCategoryVal, aCategoryMap ) )
{
- Any aAny;
- aAny <<= (sal_Int16)nCategory;
- xPropSet->setPropertyValue( sCategory, aAny );
+ xPropSet->setPropertyValue( sCategory, Any((sal_Int16)nCategory) );
}
// tell the style about it's events (if applicable)
@@ -283,11 +281,9 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
if( xPropSetInfo->hasPropertyByName( sOutlineLevel ))
{
- Any aAny;
if( nOutlineLevel >= 0 )
{
- aAny <<= nOutlineLevel;
- xPropSet->setPropertyValue( sOutlineLevel, aAny );
+ xPropSet->setPropertyValue( sOutlineLevel, Any(nOutlineLevel) );
}
}
@@ -325,9 +321,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
{
if ( sListStyleName.isEmpty() )
{
- Any aAny;
- aAny <<= sListStyleName /* empty string */;
- xPropSet->setPropertyValue( sNumberingStyleName, aAny );
+ xPropSet->setPropertyValue( sNumberingStyleName, Any(sListStyleName) ); /* empty string */;
}
else
{
@@ -343,9 +337,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
if ( rNumStyles.is() &&
rNumStyles->hasByName( sDisplayListStyleName ) )
{
- Any aAny;
- aAny <<= sDisplayListStyleName;
- xPropSet->setPropertyValue( sNumberingStyleName, aAny );
+ xPropSet->setPropertyValue( sNumberingStyleName, Any(sDisplayListStyleName) );
}
}
}
@@ -364,9 +356,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
rTextStyles->hasByName( sDisplayDropCapTextStyleName ) &&
xPropSetInfo->hasPropertyByName( sDropCapCharStyleName ) )
{
- Any aAny;
- aAny <<= sDisplayDropCapTextStyleName;
- xPropSet->setPropertyValue( sDropCapCharStyleName, aAny );
+ xPropSet->setPropertyValue( sDropCapCharStyleName, Any(sDisplayDropCapTextStyleName) );
}
}
@@ -383,9 +373,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
rPageStyles->hasByName( sDisplayName )) ) &&
xPropSetInfo->hasPropertyByName( sPageDescName ) )
{
- Any aAny;
- aAny <<= sDisplayName;
- xPropSet->setPropertyValue( sPageDescName, aAny );
+ xPropSet->setPropertyValue( sPageDescName, Any(sDisplayName) );
}
}
}
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 01016aa50864..5aadbb57ad44 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -212,31 +212,23 @@ void XMLVarFieldImportContext::PrepareField(
if (bFormulaOK)
{
- Any aAny;
- aAny <<= sFormula;
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(sFormula));
}
}
if (bSetDescription && bDescriptionOK)
{
- Any aAny;
- aAny <<= sDescription;
- xPropertySet->setPropertyValue(sPropertyHint, aAny);
+ xPropertySet->setPropertyValue(sPropertyHint, Any(sDescription));
}
if (bSetHelp && bHelpOK)
{
- Any aAny;
- aAny <<= sHelp;
- xPropertySet->setPropertyValue(sPropertyHelp, aAny);
+ xPropertySet->setPropertyValue(sPropertyHelp, Any(sHelp));
}
if (bSetHint && bHintOK)
{
- Any aAny;
- aAny <<= sHint;
- xPropertySet->setPropertyValue(sPropertyTooltip, aAny);
+ xPropertySet->setPropertyValue(sPropertyTooltip, Any(sHint));
}
if (bSetVisible && bDisplayOK)
@@ -413,13 +405,12 @@ void XMLSequenceFieldImportContext::PrepareField(
// set format
sal_Int16 nNumType = NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType, sNumFormat, sNumFormatSync );
- Any aAny;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nNumType));
// handle reference name
if (bRefNameOK)
{
+ Any aAny;
aAny = xPropertySet->getPropertyValue(sPropertySequenceValue);
sal_Int16 nValue = 0;
aAny >>= nValue;
@@ -535,9 +526,7 @@ XMLUserFieldInputImportContext::XMLUserFieldInputImportContext(
void XMLUserFieldInputImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
- aAny <<= GetName();
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(GetName()));
// delegate to super class
XMLVarFieldImportContext::PrepareField(xPropertySet);
@@ -565,9 +554,7 @@ void XMLVariableGetFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
// set name
- Any aAny;
- aAny <<= GetName();
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(GetName()));
// the remainder is handled by super class
XMLVarFieldImportContext::PrepareField(xPropertySet);
@@ -598,9 +585,7 @@ void XMLExpressionFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
sal_Int16 nSubType = SetVariableType::FORMULA;
- Any aAny;
- aAny <<= nSubType;
- xPropertySet->setPropertyValue(sPropertySubType, aAny);
+ xPropertySet->setPropertyValue(sPropertySubType, Any(nSubType));
// delegate to super class
XMLVarFieldImportContext::PrepareField(xPropertySet);
@@ -631,9 +616,7 @@ void XMLTextInputFieldImportContext::PrepareField(
{
XMLVarFieldImportContext::PrepareField(xPropertySet);
- Any aAny;
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(GetContent()));
}
@@ -837,15 +820,13 @@ XMLVariableDeclImportContext::XMLVariableDeclImportContext(
switch (eVarType)
{
case VarTypeSequence:
- aAny <<= nNumLevel;
- xFieldMaster->setPropertyValue(sPropertyNumberingLevel, aAny);
+ xFieldMaster->setPropertyValue(sPropertyNumberingLevel, Any(nNumLevel));
if (nNumLevel >= 0)
{
OUString sStr(&cSeparationChar, 1);
- aAny <<= sStr;
xFieldMaster->setPropertyValue(
- sPropertyNumberingSeparator, aAny);
+ sPropertyNumberingSeparator, Any(sStr));
}
break;
case VarTypeSimple:
@@ -982,13 +963,11 @@ bool XMLVariableDeclImportContext::FindFieldMaster(
xMaster = xTmp;
// set name
- Any aAny;
- aAny <<= sName;
- xMaster->setPropertyValue(sAPI_name, aAny);
+ xMaster->setPropertyValue(sAPI_name, Any(sName));
if (eVarType != VarTypeUserField) {
// set subtype for setexp field
-
+ Any aAny;
aAny <<= ((eVarType == VarTypeSimple) ?
SetVariableType::VAR :
SetVariableType::SEQUENCE);
@@ -1078,8 +1057,7 @@ void XMLDatabaseDisplayImportContext::EndElement()
sAPI_fieldmaster_database))
{
Any aAny;
- aAny <<= sColumnName;
- xMaster->setPropertyValue(sPropertyColumnName, aAny);
+ xMaster->setPropertyValue(sPropertyColumnName, Any(sColumnName));
// fieldmaster takes database, table and column name
XMLDatabaseFieldImportContext::PrepareField(xMaster);
@@ -1345,8 +1323,7 @@ void XMLValueImportHelper::PrepareField(
// format/style
if (bSetStyle && bFormatOK)
{
- aAny <<= nFormatKey;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormatKey));
if( xPropertySet->getPropertySetInfo()->
hasPropertyByName( sPropertyIsFixedLanguage ) )
@@ -1366,8 +1343,7 @@ void XMLValueImportHelper::PrepareField(
}
else
{
- aAny <<= fValue;
- xPropertySet->setPropertyValue(sPropertyValue, aAny);
+ xPropertySet->setPropertyValue(sPropertyValue, Any(fValue));
}
}
}