summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-03 08:39:03 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:26:04 -0400
commita0e8e05008e143ee5e3bbc281d1c253c7e5ed136 (patch)
treeeaf5f70a067fd48704addd9f2b582624a2fb44ae
parent9c7cae1561cfe16226b1f16dce59f08a38da3ce0 (diff)
use Any constructor instead of temporaries
(cherry picked from commit 58a32075ca4f457f570af75aef368dd6c389aca7) Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
-rw-r--r--basctl/source/basicide/baside3.cxx4
-rw-r--r--basctl/source/basicide/localizationmgr.cxx37
-rw-r--r--basctl/source/dlged/dlged.cxx12
-rw-r--r--basctl/source/dlged/dlgedfac.cxx8
-rw-r--r--basctl/source/dlged/dlgedobj.cxx73
-rw-r--r--basic/source/classes/sbunoobj.cxx18
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx8
-rw-r--r--chart2/source/view/main/DummyXShape.cxx4
-rw-r--r--chart2/workbench/addin/sampleaddin.cxx4
-rw-r--r--comphelper/source/container/IndexedPropertyValuesContainer.cxx4
-rw-r--r--cui/source/options/optasian.cxx4
-rw-r--r--dbaccess/source/filter/xml/xmlStyleImport.cxx4
-rw-r--r--editeng/source/misc/svxacorr.cxx12
-rw-r--r--embedserv/source/embed/docholder.cxx29
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx86
-rw-r--r--filter/source/msfilter/msdffimp.cxx13
-rw-r--r--forms/source/xforms/convert.cxx2
-rw-r--r--fpicker/source/win32/misc/WinImplHelper.cxx21
-rw-r--r--linguistic/source/convdiclist.cxx4
-rw-r--r--package/source/zippackage/ZipPackage.cxx26
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx22
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx4
-rw-r--r--sc/source/core/data/dpobject.cxx12
-rw-r--r--sc/source/core/data/dpsave.cxx22
-rw-r--r--sc/source/filter/excel/xiescher.cxx11
-rw-r--r--sc/source/ui/Accessibility/AccessibleCellBase.cxx10
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx12
-rw-r--r--sc/source/ui/app/scmod.cxx4
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx10
-rw-r--r--sc/source/ui/docshell/docsh8.cxx38
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx13
-rw-r--r--sc/source/ui/unoobj/condformatuno.cxx4
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx20
-rw-r--r--sc/source/ui/view/tabvwshg.cxx16
-rw-r--r--sc/source/ui/view/viewdata.cxx4
-rw-r--r--sc/workben/result.cxx4
-rw-r--r--sd/source/core/EffectMigration.cxx20
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx2
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx4
-rw-r--r--sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx6
-rw-r--r--sd/source/ui/framework/factories/ViewShellWrapper.cxx5
-rw-r--r--sdext/source/presenter/PresenterScreen.cxx4
-rw-r--r--sfx2/source/appl/fileobj.cxx4
-rw-r--r--sfx2/source/appl/newhelp.cxx8
-rw-r--r--sfx2/source/appl/opengrf.cxx3
-rw-r--r--sfx2/source/doc/docfile.cxx4
-rw-r--r--sfx2/source/doc/objstor.cxx8
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx7
-rw-r--r--sfx2/source/view/viewfrm2.cxx3
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx10
-rw-r--r--sot/source/sdstor/ucbstorage.cxx16
-rw-r--r--starmath/source/mathmlexport.cxx14
-rw-r--r--svtools/source/misc/embedtransfer.cxx4
-rw-r--r--svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx4
-rw-r--r--svx/source/form/datanavi.cxx4
-rw-r--r--svx/source/form/fmshimp.cxx8
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx4
-rw-r--r--svx/source/unodraw/XPropertyTable.cxx26
-rw-r--r--svx/source/unodraw/gluepts.cxx8
-rw-r--r--svx/source/unodraw/unoshap3.cxx4
-rw-r--r--svx/source/xml/xmlgrhlp.cxx7
-rw-r--r--sw/source/core/access/acccell.cxx12
-rw-r--r--sw/source/core/access/accnotextframe.cxx8
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx12
-rw-r--r--sw/source/core/unocore/swunohelper.cxx4
-rw-r--r--sw/source/filter/html/htmlform.cxx16
-rw-r--r--sw/source/filter/xml/wrtxml.cxx10
-rw-r--r--sw/source/filter/xml/xmlimp.cxx4
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx4
-rw-r--r--sw/source/filter/xml/xmltexte.cxx21
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx9
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx19
-rw-r--r--toolkit/source/controls/roadmapcontrol.cxx11
-rw-r--r--toolkit/source/controls/tkscrollbar.cxx14
-rw-r--r--toolkit/source/controls/unocontrols.cxx287
-rw-r--r--ucb/source/core/FileAccess.cxx8
-rw-r--r--ucb/source/ucp/file/filglob.cxx22
-rw-r--r--ucb/source/ucp/file/filrset.cxx8
-rw-r--r--ucb/source/ucp/file/prov.cxx12
-rw-r--r--ucb/source/ucp/file/shell.cxx14
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx14
-rw-r--r--ucb/source/ucp/ftp/ftpintreq.cxx4
-rw-r--r--ucb/source/ucp/ftp/ftpresultsetbase.cxx8
-rw-r--r--vbahelper/source/vbahelper/vbapagesetupbase.cxx25
-rw-r--r--vcl/source/filter/FilterConfigItem.cxx18
-rw-r--r--vcl/unx/gtk/a11y/atkvalue.cxx4
-rw-r--r--writerfilter/source/dmapper/FormControlHelper.cxx25
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx3
-rw-r--r--xmlhelp/source/cxxhelp/provider/content.cxx4
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetbase.cxx8
-rw-r--r--xmlhelp/source/treeview/tvfactory.cxx4
-rw-r--r--xmlhelp/source/treeview/tvread.cxx4
-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.cxx59
-rw-r--r--xmloff/source/draw/XMLShapePropertySetContext.cxx5
-rw-r--r--xmloff/source/draw/animimp.cxx24
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx5
-rw-r--r--xmloff/source/draw/shapeexport.cxx4
-rw-r--r--xmloff/source/draw/shapeimport.cxx11
-rw-r--r--xmloff/source/draw/ximp3dobject.cxx18
-rw-r--r--xmloff/source/draw/ximp3dscene.cxx32
-rw-r--r--xmloff/source/draw/ximppage.cxx29
-rw-r--r--xmloff/source/draw/ximpshap.cxx130
-rw-r--r--xmloff/source/draw/ximpshow.cxx15
-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.cxx12
-rw-r--r--xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx34
-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.cxx3
-rw-r--r--xmloff/source/text/XMLIndexTOCSourceContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexTOCStylesContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexTableSourceContext.cxx6
-rw-r--r--xmloff/source/text/XMLIndexTemplateContext.cxx6
-rw-r--r--xmloff/source/text/XMLIndexUserSourceContext.cxx3
-rw-r--r--xmloff/source/text/XMLLineNumberingImportContext.cxx20
-rw-r--r--xmloff/source/text/XMLPropertyBackpatcher.cxx4
-rw-r--r--xmloff/source/text/XMLSectionFootnoteConfigImport.cxx22
-rw-r--r--xmloff/source/text/XMLSectionImportContext.cxx7
-rw-r--r--xmloff/source/text/XMLSectionSourceImportContext.cxx7
-rw-r--r--xmloff/source/text/XMLTextColumnsContext.cxx18
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx73
-rw-r--r--xmloff/source/text/XMLTextMasterPageContext.cxx6
-rw-r--r--xmloff/source/text/XMLTextShapeImportHelper.cxx10
-rw-r--r--xmloff/source/text/txtfldi.cxx300
-rw-r--r--xmloff/source/text/txtparai.cxx20
-rw-r--r--xmloff/source/text/txtstyli.cxx24
-rw-r--r--xmloff/source/text/txtvfldi.cxx58
143 files changed, 700 insertions, 1815 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 915c19d5b410..88c27877b00d 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -1172,9 +1172,7 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
{
try
{
- Any aXmlDialogNameAny;
- aXmlDialogNameAny <<= OUString( aNewDlgName );
- xDialogModelPropSet->setPropertyValue( DLGED_PROP_NAME, aXmlDialogNameAny );
+ xDialogModelPropSet->setPropertyValue( DLGED_PROP_NAME, Any(aNewDlgName) );
bRenamed = true;
}
catch(const beans::UnknownPropertyException& )
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index b109e68b4724..a6adbf8f5a04 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -247,12 +247,10 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
xStringResourceManager->setStringForLocale( aPureIdStr, aPropStr, rLocale );
}
- OUString aPropIdStr = aEsc;
- aPropIdStr += aPureIdStr;
+ OUString aPropIdStr = aEsc + aPureIdStr;
// TODO?: Change here and in toolkit
(void)aSemi;
- aPropAny <<= aPropIdStr;
- xPropertySet->setPropertyValue( aPropName, aPropAny );
+ xPropertySet->setPropertyValue( aPropName, Any(aPropIdStr) );
}
// Replace id by string from StringResource
else if( eMode == RESET_IDS )
@@ -268,8 +266,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
catch(const MissingResourceException&)
{
}
- aPropAny <<= aNewPropStr;
- xPropertySet->setPropertyValue( aPropName, aPropAny );
+ xPropertySet->setPropertyValue( aPropName, Any(aNewPropStr) );
}
}
// Remove Id for all locales
@@ -319,12 +316,10 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{}
}
- OUString aPropIdStr = aEsc;
- aPropIdStr += aPureIdStr;
+ OUString aPropIdStr = aEsc + aPureIdStr;
// TODO?: Change here and in toolkit
(void)aSemi;
- aPropAny <<= aPropIdStr;
- xPropertySet->setPropertyValue( aPropName, aPropAny );
+ xPropertySet->setPropertyValue( aPropName, Any(aPropIdStr) );
}
// Replace string by string from source StringResourceResolver
else if( eMode == MOVE_RESOURCES && xSourceStringResolver.is() )
@@ -356,12 +351,10 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
xStringResourceManager->setStringForLocale( aPureIdStr, aResStr, rLocale );
}
- OUString aPropIdStr = aEsc;
- aPropIdStr += aPureIdStr;
+ OUString aPropIdStr = aEsc + aPureIdStr;
// TODO?: Change here and in toolkit
(void)aSemi;
- aPropAny <<= aPropIdStr;
- xPropertySet->setPropertyValue( aPropName, aPropAny );
+ xPropertySet->setPropertyValue( aPropName, Any(aPropIdStr) );
}
// Copy string from source to target resource
else if( eMode == COPY_RESOURCES && xSourceStringResolver.is() )
@@ -444,8 +437,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
aPropIdStr += aPureIdStr;
pIdStrings[i] = aPropIdStr;
}
- aPropAny <<= aIdStrings;
- xPropertySet->setPropertyValue( aPropName, aPropAny );
+ xPropertySet->setPropertyValue( aPropName, Any(aIdStrings) );
}
// Replace id by string from StringResource
else if( eMode == RESET_IDS )
@@ -472,8 +464,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
}
pNewPropStrings[i] = aNewPropStr;
}
- aPropAny <<= aNewPropStrings;
- xPropertySet->setPropertyValue( aPropName, aPropAny );
+ xPropertySet->setPropertyValue( aPropName, Any(aNewPropStrings) );
}
// Remove Id for all locales
else if( eMode == REMOVE_IDS_FROM_RESOURCE )
@@ -548,8 +539,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
aPropIdStr += aPureIdStr;
pIdStrings[i] = aPropIdStr;
}
- aPropAny <<= aIdStrings;
- xPropertySet->setPropertyValue( aPropName, aPropAny );
+ xPropertySet->setPropertyValue( aPropName, Any(aIdStrings) );
}
// Replace string by string from source StringResourceResolver
else if( eMode == MOVE_RESOURCES && xSourceStringResolver.is() )
@@ -599,8 +589,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
aPropIdStr += aPureIdStr;
pIdStrings[i] = aPropIdStr;
}
- aPropAny <<= aIdStrings;
- xPropertySet->setPropertyValue( aPropName, aPropAny );
+ xPropertySet->setPropertyValue( aPropName, Any(aIdStrings) );
}
// Copy string from source to target resource
else if( eMode == COPY_RESOURCES && xSourceStringResolver.is() )
@@ -924,9 +913,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument
}
Reference< beans::XPropertySet > xDlgPSet( xDialogModel, UNO_QUERY );
- Any aStringResourceManagerAny;
- aStringResourceManagerAny <<= xStringResourceManager;
- xDlgPSet->setPropertyValue( aResourceResolverPropName, aStringResourceManagerAny );
+ xDlgPSet->setPropertyValue( aResourceResolverPropName, Any(xStringResourceManager) );
}
}
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 2cf25fa54d73..a5327ae2298b 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -794,9 +794,7 @@ void DlgEditor::Copy()
memcpy( pCombinedData + 4, DialogModelBytes.getConstArray(), nDialogDataLen );
memcpy( pCombinedData + nResOffset, aResData.getConstArray(), nResDataLen );
- Any aCombinedDataAny;
- aCombinedDataAny <<= aCombinedData;
- aSeqData[1] = aCombinedDataAny;
+ aSeqData[1] = Any(aCombinedData);
pTrans = new DlgEdTransferableImpl( m_ClipboardDataFlavorsResource, aSeqData );
}
@@ -935,16 +933,12 @@ void DlgEditor::Paste()
// set new name
OUString aOUniqueName( pCtrlObj->GetUniqueName() );
Reference< beans::XPropertySet > xPSet( xCtrlModel , UNO_QUERY );
- Any aUniqueName;
- aUniqueName <<= aOUniqueName;
- xPSet->setPropertyValue( DLGED_PROP_NAME, aUniqueName );
+ xPSet->setPropertyValue( DLGED_PROP_NAME, Any(aOUniqueName) );
// set tabindex
Reference< container::XNameAccess > xNA( m_xUnoControlDialogModel , UNO_QUERY );
Sequence< OUString > aNames_ = xNA->getElementNames();
- Any aTabIndex;
- aTabIndex <<= (sal_Int16) aNames_.getLength();
- xPSet->setPropertyValue( DLGED_PROP_TABINDEX, aTabIndex );
+ xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any((sal_Int16) aNames_.getLength()) );
if( bLocalized )
{
diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx
index 83d3d48da8b2..023989ce4679 100644
--- a/basctl/source/dlged/dlgedfac.cxx
+++ b/basctl/source/dlged/dlgedfac.cxx
@@ -167,9 +167,7 @@ IMPL_LINK_TYPED( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory, void )
uno::Reference< beans::XPropertySet > xPSet(pNew->GetUnoControlModel(), uno::UNO_QUERY);
if (xPSet.is())
{
- uno::Any aValue;
- aValue <<= (sal_Int32) css::awt::ScrollBarOrientation::VERTICAL;
- xPSet->setPropertyValue( DLGED_PROP_ORIENTATION, aValue );
+ xPSet->setPropertyValue( DLGED_PROP_ORIENTATION, uno::Any((sal_Int32) css::awt::ScrollBarOrientation::VERTICAL) );
}
}
catch(...)
@@ -189,9 +187,7 @@ IMPL_LINK_TYPED( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory, void )
uno::Reference< beans::XPropertySet > xPSet(pNew->GetUnoControlModel(), uno::UNO_QUERY);
if (xPSet.is())
{
- uno::Any aValue;
- aValue <<= (sal_Int32) 1;
- xPSet->setPropertyValue( DLGED_PROP_ORIENTATION, aValue );
+ xPSet->setPropertyValue( DLGED_PROP_ORIENTATION, uno::Any((sal_Int32) 1) );
}
}
catch(...)
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 86786e8f7dc6..dd946113d0fc 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -369,15 +369,10 @@ void DlgEdObj::SetPropsFromRect()
Reference< beans::XPropertySet > xPSet( GetUnoControlModel(), UNO_QUERY );
if ( xPSet.is() )
{
- Any aValue;
- aValue <<= nXOut;
- xPSet->setPropertyValue( DLGED_PROP_POSITIONX, aValue );
- aValue <<= nYOut;
- xPSet->setPropertyValue( DLGED_PROP_POSITIONY, aValue );
- aValue <<= nWidthOut;
- xPSet->setPropertyValue( DLGED_PROP_WIDTH, aValue );
- aValue <<= nHeightOut;
- xPSet->setPropertyValue( DLGED_PROP_HEIGHT, aValue );
+ xPSet->setPropertyValue( DLGED_PROP_POSITIONX, Any(nXOut) );
+ xPSet->setPropertyValue( DLGED_PROP_POSITIONY, Any(nYOut) );
+ xPSet->setPropertyValue( DLGED_PROP_WIDTH, Any(nWidthOut) );
+ xPSet->setPropertyValue( DLGED_PROP_HEIGHT, Any(nHeightOut) );
}
}
}
@@ -439,10 +434,8 @@ void DlgEdObj::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
if ( nNewValue != nValue )
{
- Any aNewValue;
- aNewValue <<= nNewValue;
EndListening( false );
- xPSet->setPropertyValue( evt.PropertyName, aNewValue );
+ xPSet->setPropertyValue( evt.PropertyName, Any(nNewValue) );
StartListening();
}
}
@@ -489,9 +482,7 @@ void SAL_CALL DlgEdObj::NameChange( const css::beans::PropertyChangeEvent& evt
// set old name property
EndListening(false);
Reference< beans::XPropertySet > xPSet(GetUnoControlModel(), UNO_QUERY);
- Any aName;
- aName <<= aOldName;
- xPSet->setPropertyValue( DLGED_PROP_NAME, aName );
+ xPSet->setPropertyValue( DLGED_PROP_NAME, Any(aOldName) );
StartListening();
}
}
@@ -610,9 +601,7 @@ void DlgEdObj::TabIndexChange( const beans::PropertyChangeEvent& evt ) throw (Ru
aCtrl >>= xPSet;
if ( xPSet.is() )
{
- Any aTabIndex;
- aTabIndex <<= (sal_Int16) i;
- xPSet->setPropertyValue( DLGED_PROP_TABINDEX, aTabIndex );
+ xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any((sal_Int16) i) );
}
}
@@ -885,15 +874,11 @@ void DlgEdObj::clonedFrom(const DlgEdObj* _pSource)
{
// set tabindex
Sequence< OUString > aNames = xCont->getElementNames();
- Any aTabIndex;
- aTabIndex <<= (sal_Int16) aNames.getLength();
- xPSet->setPropertyValue( DLGED_PROP_TABINDEX, aTabIndex );
+ xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any((sal_Int16) aNames.getLength()) );
// insert control model in dialog model
Reference< awt::XControlModel > xCtrl( xPSet , UNO_QUERY );
- Any aCtrl;
- aCtrl <<= xCtrl;
- xCont->insertByName( aOUniqueName , aCtrl );
+ xCont->insertByName( aOUniqueName, Any(xCtrl) );
pDlgEdForm->UpdateTabOrderAndGroups();
}
@@ -984,9 +969,7 @@ void DlgEdObj::SetDefaults()
OUString aOUniqueName( GetUniqueName() );
// set name property
- Any aUniqueName;
- aUniqueName <<= aOUniqueName;
- xPSet->setPropertyValue( DLGED_PROP_NAME, aUniqueName );
+ xPSet->setPropertyValue( DLGED_PROP_NAME, Any(aOUniqueName) );
// set labels
if ( supportsService( "com.sun.star.awt.UnoControlButtonModel" ) ||
@@ -995,7 +978,7 @@ void DlgEdObj::SetDefaults()
supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" ) ||
supportsService( "com.sun.star.awt.UnoControlFixedTextModel" ) )
{
- xPSet->setPropertyValue( DLGED_PROP_LABEL, aUniqueName );
+ xPSet->setPropertyValue( DLGED_PROP_LABEL, Any(aOUniqueName) );
}
// set number formats supplier for formatted field
@@ -1004,9 +987,7 @@ void DlgEdObj::SetDefaults()
Reference< util::XNumberFormatsSupplier > xSupplier = GetDlgEdForm()->GetDlgEditor().GetNumberFormatsSupplier();
if ( xSupplier.is() )
{
- Any aSupplier;
- aSupplier <<= xSupplier;
- xPSet->setPropertyValue( DLGED_PROP_FORMATSSUPPLIER, aSupplier );
+ xPSet->setPropertyValue( DLGED_PROP_FORMATSSUPPLIER, Any(xSupplier) );
}
}
@@ -1267,15 +1248,10 @@ void DlgEdForm::SetPropsFromRect()
Reference< beans::XPropertySet > xPSet( GetUnoControlModel(), UNO_QUERY );
if ( xPSet.is() )
{
- Any aValue;
- aValue <<= nXOut;
- xPSet->setPropertyValue( DLGED_PROP_POSITIONX, aValue );
- aValue <<= nYOut;
- xPSet->setPropertyValue( DLGED_PROP_POSITIONY, aValue );
- aValue <<= nWidthOut;
- xPSet->setPropertyValue( DLGED_PROP_WIDTH, aValue );
- aValue <<= nHeightOut;
- xPSet->setPropertyValue( DLGED_PROP_HEIGHT, aValue );
+ xPSet->setPropertyValue( DLGED_PROP_POSITIONX, Any(nXOut) );
+ xPSet->setPropertyValue( DLGED_PROP_POSITIONY, Any(nYOut) );
+ xPSet->setPropertyValue( DLGED_PROP_WIDTH, Any(nWidthOut) );
+ xPSet->setPropertyValue( DLGED_PROP_HEIGHT, Any(nHeightOut) );
}
}
}
@@ -1333,10 +1309,8 @@ void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
if ( nNewValue != nValue )
{
- Any aNewValue;
- aNewValue <<= nNewValue;
EndListening( false );
- xPSetForm->setPropertyValue( evt.PropertyName, aNewValue );
+ xPSetForm->setPropertyValue( evt.PropertyName, Any(nNewValue) );
StartListening();
}
}
@@ -1375,10 +1349,8 @@ void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
}
if ( nNewX != nX )
{
- Any aValue;
- aValue <<= nNewX;
EndListening( false );
- xPSet->setPropertyValue( DLGED_PROP_POSITIONX, aValue );
+ xPSet->setPropertyValue( DLGED_PROP_POSITIONX, Any(nNewX) );
StartListening();
}
@@ -1391,10 +1363,8 @@ void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
}
if ( nNewY != nY )
{
- Any aValue;
- aValue <<= nNewY;
EndListening( false );
- xPSet->setPropertyValue( DLGED_PROP_POSITIONY, aValue );
+ xPSet->setPropertyValue( DLGED_PROP_POSITIONY, Any(nNewY) );
StartListening();
}
}
@@ -1467,9 +1437,8 @@ void DlgEdForm::UpdateTabIndices()
aCtrl >>= xPSet;
if ( xPSet.is() )
{
- Any aTabIndex;
- aTabIndex <<= (sal_Int16) nNewTabIndex++;
- xPSet->setPropertyValue( DLGED_PROP_TABINDEX, aTabIndex );
+ xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any((sal_Int16) nNewTabIndex) );
+ nNewTabIndex++;
}
}
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index d653720269e6..5ab19959df38 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -262,9 +262,7 @@ SbUnoObject* createOLEObject_Impl( const OUString& aType )
Reference< XInterface > xOLEObject = xOLEFactory->createInstance( aOLEType );
if( xOLEObject.is() )
{
- Any aAny;
- aAny <<= xOLEObject;
- pUnoObj = new SbUnoObject( aType, aAny );
+ pUnoObj = new SbUnoObject( aType, Any(xOLEObject) );
OUString sDfltPropName;
if ( SbUnoObject::getDefaultPropName( pUnoObj, sDfltPropName ) )
@@ -2994,11 +2992,8 @@ void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
SbxVariableRef refVar = rPar.Get(0);
if( xInterface.is() )
{
- Any aAny;
- aAny <<= xInterface;
-
// Create a SbUnoObject out of it and return it
- SbUnoObjectRef xUnoObj = new SbUnoObject( aServiceName, aAny );
+ SbUnoObjectRef xUnoObj = new SbUnoObject( aServiceName, Any(xInterface) );
if( xUnoObj->getUnoAny().getValueType().getTypeClass() != TypeClass_VOID )
{
// return the object
@@ -3049,11 +3044,8 @@ void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& rPar,
SbxVariableRef refVar = rPar.Get(0);
if( xInterface.is() )
{
- Any aAny;
- aAny <<= xInterface;
-
// Create a SbUnoObject out of it and return it
- SbUnoObjectRef xUnoObj = new SbUnoObject( aServiceName, aAny );
+ SbUnoObjectRef xUnoObj = new SbUnoObject( aServiceName, Any(xInterface) );
if( xUnoObj->getUnoAny().getValueType().getTypeClass() != TypeClass_VOID )
{
// return the object
@@ -3079,11 +3071,9 @@ void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, bool
// get the global service manager
Reference< XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory() );
- Any aAny;
- aAny <<= xFactory;
// Create a SbUnoObject out of it and return it
- SbUnoObjectRef xUnoObj = new SbUnoObject( OUString( "ProcessServiceManager" ), aAny );
+ SbUnoObjectRef xUnoObj = new SbUnoObject( OUString( "ProcessServiceManager" ), Any(xFactory) );
refVar->PutObject( static_cast<SbUnoObject*>(xUnoObj) );
}
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 2ae296f4c5ce..8b81b5127e8c 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1398,9 +1398,7 @@ Any WrappedStackingProperty::getPropertyValue( const Reference< beans::XProperty
if( detectInnerValue( eInnerStackMode ) )
{
bool bValue = (eInnerStackMode == m_eStackMode);
- Any aAny;
- aAny <<= bValue;
- return aAny;
+ return Any(bValue);
}
return m_aOuterValue;
}
@@ -2013,9 +2011,7 @@ Any WrappedIncludeHiddenCellsProperty::getPropertyValue( const Reference< beans:
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
bool bValue = ChartModelHelper::isIncludeHiddenCells( m_spChart2ModelContact->getChartModel() );
- uno::Any aAny;
- aAny <<= bValue;
- return aAny;
+ return uno::Any(bValue);
}
// ____ XDiagramProvider ____
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index a6f9ed12c00d..6d9abc50f937 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -939,9 +939,7 @@ void SAL_CALL DummyText::setPosition(const awt::Point& rPosition )
void DummyText::setTransformatAsProperty(const drawing::HomogenMatrix3& rMatrix)
{
- uno::Any aNewTrans;
- aNewTrans <<= rMatrix;
- setPropertyValue("Transformation", aNewTrans);
+ setPropertyValue("Transformation", uno::Any(rMatrix));
}
DummyGroup3D::DummyGroup3D(const OUString& rName)
diff --git a/chart2/workbench/addin/sampleaddin.cxx b/chart2/workbench/addin/sampleaddin.cxx
index 6bfb8b019c80..a3413535c181 100644
--- a/chart2/workbench/addin/sampleaddin.cxx
+++ b/chart2/workbench/addin/sampleaddin.cxx
@@ -350,9 +350,7 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException )
uno::Reference< beans::XPropertySet > xShapeProp( mxMyRedLine, uno::UNO_QUERY );
if( xShapeProp.is())
{
- uno::Any aAny;
- aAny <<= aPtSeq;
- xShapeProp->setPropertyValue( "PolyPolygon" , aAny );
+ xShapeProp->setPropertyValue( "PolyPolygon" , Any(aPtSeq) );
}
}
if( mxMyText.is())
diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
index 2ab5572332cf..0d42b5d09206 100644
--- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
@@ -196,9 +196,7 @@ css::uno::Any SAL_CALL IndexedPropertyValuesContainer::getByIndex( sal_Int32 nIn
if (!((nIndex < nSize) && (nIndex >= 0)))
throw lang::IndexOutOfBoundsException();
- uno::Any aAny;
- aAny <<= maProperties[nIndex];
- return aAny;
+ return uno::Any( maProperties[nIndex] );
}
// XElementAccess
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 5acd04abc3a8..59e28fb8cf35 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -203,9 +203,7 @@ bool SvxAsianLayoutPage::FillItemSet( SfxItemSet* )
OUString sCompress(cCharacterCompressionType);
if(pImpl->xPrSetInfo.is() && pImpl->xPrSetInfo->hasPropertyByName(sCompress))
{
- Any aVal;
- aVal <<= nSet;
- pImpl->xPrSet->setPropertyValue(sCompress, aVal);
+ pImpl->xPrSet->setPropertyValue(sCompress, Any(nSet));
}
}
pImpl->aConfig.Commit();
diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx
index a17ddf870019..e45b3d788cbe 100644
--- a/dbaccess/source/filter/xml/xmlStyleImport.cxx
+++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx
@@ -72,9 +72,7 @@ void OTableStyleContext::FillPropertySet(
{
if ( !sPageStyle.isEmpty() )
{
- uno::Any aAny;
- aAny <<= sPageStyle;
- AddProperty(CTF_DB_MASTERPAGENAME, aAny);
+ AddProperty(CTF_DB_MASTERPAGENAME, Any(sPageStyle));
}
}
else if ( GetFamily() == XML_STYLE_FAMILY_TABLE_COLUMN )
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 078833856486..2ee3fc4a06e6 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2045,9 +2045,7 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
xStrm->SetSize( 0 );
xStrm->SetBufferSize( 8192 );
OUString aMime( "text/xml" );
- uno::Any aAny;
- aAny <<= aMime;
- xStrm->SetProperty( "MediaType", aAny );
+ xStrm->SetProperty( "MediaType", Any(aMime) );
uno::Reference< uno::XComponentContext > xContext =
@@ -2340,14 +2338,12 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
sal_Int32 nSlashPos = sMain.lastIndexOf(cSlash);
sMain = sMain.copy(0, nSlashPos);
::ucbhelper::Content aNewContent( sMain, uno::Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
- Any aAny;
TransferInfo aInfo;
aInfo.NameClash = NameClash::OVERWRITE;
aInfo.NewTitle = aDest.GetName();
aInfo.SourceURL = aSource.GetMainURL( INetURLObject::DECODE_TO_IURI );
aInfo.MoveData = false;
- aAny <<= aInfo;
- aNewContent.executeCommand( "transfer", aAny);
+ aNewContent.executeCommand( "transfer", Any(aInfo));
}
catch (...)
{
@@ -2417,9 +2413,7 @@ bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SotStorage& rStg )
refList->SetBufferSize( 8192 );
OUString aPropName( "MediaType" );
OUString aMime( "text/xml" );
- uno::Any aAny;
- aAny <<= aMime;
- refList->SetProperty( aPropName, aAny );
+ refList->SetProperty( aPropName, Any(aMime) );
uno::Reference< uno::XComponentContext > xContext =
comphelper::getProcessComponentContext();
diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx
index 852f00e8e2b5..c1e198d3c21a 100644
--- a/embedserv/source/embed/docholder.cxx
+++ b/embedserv/source/embed/docholder.cxx
@@ -114,56 +114,48 @@ void DocumentHolder::LoadDocInFrame( sal_Bool bPluginMode )
uno::Reference< task::XInteractionHandler2 > xHandler(
task::InteractionHandler::createWithParent(comphelper::getComponentContext(m_xFactory), 0) );
- uno::Any aAny;
sal_Int32 nLen = 3;
uno::Sequence<beans::PropertyValue> aSeq( nLen );
- aAny <<= uno::Reference<uno::XInterface>(
- m_xDocument, uno::UNO_QUERY);
aSeq[0] = beans::PropertyValue(
OUString("Model"),
-1,
- aAny,
+ uno::Any(uno::Reference<uno::XInterface>(m_xDocument, uno::UNO_QUERY)),
beans::PropertyState_DIRECT_VALUE);
- aAny <<= sal_False;
aSeq[1] = beans::PropertyValue(
OUString("ReadOnly"),
-1,
- aAny,
+ uno::Any(false),
beans::PropertyState_DIRECT_VALUE);
- aAny <<= (sal_Bool) sal_True;
aSeq[2] = beans::PropertyValue(
OUString("NoAutoSave"),
-1,
- aAny,
+ uno::Any(true),
beans::PropertyState_DIRECT_VALUE);
if ( bPluginMode )
{
aSeq.realloc( ++nLen );
- aAny <<= (sal_Int16) 3;
aSeq[nLen-1] = beans::PropertyValue(
OUString("PluginMode"),
-1,
- aAny,
+ uno::Any((sal_Int16) 3),
beans::PropertyState_DIRECT_VALUE);
}
aSeq.realloc( nLen+=2 );
- aAny <<= xHandler;
aSeq[nLen-2] = beans::PropertyValue(
OUString("InteractionHandler"),
-1,
- aAny,
+ uno::Any(xHandler),
beans::PropertyState_DIRECT_VALUE);
- aAny <<= m_nMacroExecMode;
aSeq[nLen-1] = beans::PropertyValue(
OUString("MacroExecutionMode"),
-1,
- aAny,
+ uno::Any(m_nMacroExecMode),
beans::PropertyState_DIRECT_VALUE);
xComponentLoader->loadComponentFromURL(
@@ -291,10 +283,9 @@ HRESULT DocumentHolder::InPlaceActivate(
hWndxWinParent = hWndSite;
}
- aAny <<= sal_Int32(hWndxWinParent);
xWin.set(
xToolkit->createSystemChild(
- aAny,
+ uno::Any(sal_Int32(hWndxWinParent)),
aProcessIdent,
lang::SystemDependent::SYSTEM_WIN32),
uno::UNO_QUERY);
@@ -1231,11 +1222,9 @@ css::uno::Reference< css::awt::XWindow> SAL_CALL DocumentHolder::getContainerWin
uno::Sequence<sal_Int8> aProcessIdent(16);
rtl_getGlobalProcessId((sal_uInt8*)aProcessIdent.getArray());
- uno::Any aAny;
- aAny <<= sal_Int32(hWnd);
xWin.set(
xToolkit->createSystemChild(
- aAny,
+ uno::Any(sal_Int32(hWnd)),
aProcessIdent,
lang::SystemDependent::SYSTEM_WIN32),
uno::UNO_QUERY);
@@ -1253,7 +1242,7 @@ css::uno::Reference< css::awt::XWindow> SAL_CALL DocumentHolder::getContainerWin
uno::Reference<awt::XSystemDependentWindowPeer> xSysWin(
xWin,uno::UNO_QUERY);
if(xSysWin.is()) {
- aAny = xSysWin->getWindowHandle(
+ uno::Any aAny = xSysWin->getWindowHandle(
aProcessIdent,lang::SystemDependent::SYSTEM_WIN32);
sal_Int64 tmp;
if( aAny >>= tmp )
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index 3a8eba18408b..69fd8539ed4f 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -106,19 +106,14 @@ bool CGMImpressOutAct::ImplCreateShape( const OUString& rType )
void CGMImpressOutAct::ImplSetOrientation( FloatPoint& rRefPoint, double& rOrientation )
{
- uno::Any aAny;
- aAny <<= (sal_Int32)rRefPoint.X;
- maXPropSet->setPropertyValue( "RotationPointX", aAny );
- aAny <<= (sal_Int32)rRefPoint.Y;
- maXPropSet->setPropertyValue( "RotationPointY", aAny );
- aAny <<= (sal_Int32)( rOrientation * 100.0 );
- maXPropSet->setPropertyValue( "RotateAngle", aAny );
+ maXPropSet->setPropertyValue( "RotationPointX", uno::Any((sal_Int32)rRefPoint.X) );
+ maXPropSet->setPropertyValue( "RotationPointY", uno::Any((sal_Int32)rRefPoint.Y) );
+ maXPropSet->setPropertyValue( "RotateAngle", uno::Any((sal_Int32)( rOrientation * 100.0 )) );
}
void CGMImpressOutAct::ImplSetLineBundle()
{
- uno::Any aAny;
drawing::LineStyle eLS;
sal_uInt32 nLineColor;
@@ -138,11 +133,9 @@ void CGMImpressOutAct::ImplSetLineBundle()
else
fLineWidth = mpCGM->pElement->aLineBundle.nLineWidth;
- aAny <<= (sal_Int32)nLineColor;
- maXPropSet->setPropertyValue( "LineColor", aAny );
+ maXPropSet->setPropertyValue( "LineColor", uno::Any((sal_Int32)nLineColor) );
- aAny <<= (sal_Int32)fLineWidth;
- maXPropSet->setPropertyValue( "LineWidth", aAny );
+ maXPropSet->setPropertyValue( "LineWidth", uno::Any((sal_Int32)fLineWidth) );
switch( eLineType )
{
@@ -162,20 +155,16 @@ void CGMImpressOutAct::ImplSetLineBundle()
eLS = drawing::LineStyle_SOLID;
break;
}
- aAny <<= eLS;
- maXPropSet->setPropertyValue( "LineStyle", aAny );
+ maXPropSet->setPropertyValue( "LineStyle", uno::Any(eLS) );
if ( eLS == drawing::LineStyle_DASH )
{
drawing::LineDash aLineDash( drawing::DashStyle_RECTRELATIVE, 1, 50, 3, 33, 100 );
- aAny <<= aLineDash;
- maXPropSet->setPropertyValue( "LineDash", aAny );
+ maXPropSet->setPropertyValue( "LineDash", uno::Any(aLineDash) );
}
}
void CGMImpressOutAct::ImplSetFillBundle()
{
-
- uno::Any aAny;
drawing::LineStyle eLS;
drawing::FillStyle eFS;
@@ -218,8 +207,7 @@ void CGMImpressOutAct::ImplSetFillBundle()
else
nHatchIndex = (sal_uInt32)mpCGM->pElement->aFillBundle.nFillHatchIndex;
- aAny <<= (sal_Int32)nFillColor;
- maXPropSet->setPropertyValue( "FillColor", aAny );
+ maXPropSet->setPropertyValue( "FillColor", uno::Any((sal_Int32)nFillColor) );
switch ( eFillStyle )
{
@@ -266,28 +254,22 @@ void CGMImpressOutAct::ImplSetFillBundle()
if ( eFS == drawing::FillStyle_GRADIENT )
{
- aAny <<= *mpGradient;
- maXPropSet->setPropertyValue( "FillGradient", aAny );
+ maXPropSet->setPropertyValue( "FillGradient", uno::Any(*mpGradient) );
}
- aAny <<= eFS;
- maXPropSet->setPropertyValue( "FillStyle", aAny );
+ maXPropSet->setPropertyValue( "FillStyle", uno::Any(eFS) );
eLS = drawing::LineStyle_NONE;
if ( eFillStyle == FIS_HOLLOW )
{
eLS = drawing::LineStyle_SOLID;
- aAny <<= (sal_Int32)nFillColor;
- maXPropSet->setPropertyValue( "LineColor", aAny );
- aAny <<= (sal_Int32)0;
- maXPropSet->setPropertyValue( "LineWidth", aAny );
+ maXPropSet->setPropertyValue( "LineColor", uno::Any((sal_Int32)nFillColor) );
+ maXPropSet->setPropertyValue( "LineWidth", uno::Any((sal_Int32)0) );
}
else if ( eEdgeType != ET_NONE )
{
- aAny <<= (sal_Int32)nEdgeColor;
- maXPropSet->setPropertyValue( "LineColor", aAny );
+ maXPropSet->setPropertyValue( "LineColor", uno::Any((sal_Int32)nEdgeColor) );
- aAny <<= (sal_Int32)fEdgeWidth;
- maXPropSet->setPropertyValue( "LineWidth", aAny );
+ maXPropSet->setPropertyValue( "LineWidth", uno::Any((sal_Int32)fEdgeWidth) );
switch( eEdgeType )
{
@@ -306,8 +288,7 @@ void CGMImpressOutAct::ImplSetFillBundle()
}
}
- aAny <<= eLS;
- maXPropSet->setPropertyValue( "LineStyle", aAny );
+ maXPropSet->setPropertyValue( "LineStyle", uno::Any(eLS) );
if ( eFS == drawing::FillStyle_HATCH )
{
@@ -332,14 +313,12 @@ void CGMImpressOutAct::ImplSetFillBundle()
aHatch.Distance = 10 * ( nHatchIndex & 0x1f ) | 100;
aHatch.Angle = 15 * ( ( nHatchIndex & 0x1f ) - 5 );
}
- aAny <<= aHatch;
- maXPropSet->setPropertyValue( "FillHatch", aAny );
+ maXPropSet->setPropertyValue( "FillHatch", uno::Any(aHatch) );
}
}
void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XPropertySet > & rProperty )
{
- uno::Any aAny;
sal_uInt32 nTextFontIndex;
sal_uInt32 nTextColor;
@@ -352,8 +331,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty
else
nTextColor = mpCGM->pElement->aTextBundle.GetColor();
- aAny <<= (sal_Int32)nTextColor;
- rProperty->setPropertyValue( "CharColor", aAny );
+ rProperty->setPropertyValue( "CharColor", uno::Any((sal_Int32)nTextColor) );
sal_uInt32 nFontType = 0;
awt::FontDescriptor aFontDescriptor;
@@ -375,8 +353,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty
{
aFontDescriptor.Underline = awt::FontUnderline::SINGLE;
}
- aAny <<= aFontDescriptor;
- rProperty->setPropertyValue( "FontDescriptor", aAny );
+ rProperty->setPropertyValue( "FontDescriptor", uno::Any(aFontDescriptor) );
}
void CGMImpressOutAct::InsertPage()
@@ -516,16 +493,13 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize
if ( (long)fStartAngle == (long)fEndAngle )
{
eCircleKind = drawing::CircleKind_FULL;
- aAny.setValue( &eCircleKind, ::cppu::UnoType<drawing::CircleKind>::get() );
+ maXPropSet->setPropertyValue( "CircleKind", uno::Any(eCircleKind) );
}
else
{
- aAny.setValue( &eCircleKind, ::cppu::UnoType<drawing::CircleKind>::get() );
- maXPropSet->setPropertyValue( "CircleKind", aAny );
- aAny <<= (sal_Int32)( (long)( fStartAngle * 100 ) );
- maXPropSet->setPropertyValue( "CircleStartAngle", aAny );
- aAny <<= (sal_Int32)( (long)( fEndAngle * 100 ) );
- maXPropSet->setPropertyValue( "CircleEndAngle", aAny );
+ maXPropSet->setPropertyValue( "CircleKind", uno::Any(eCircleKind) );
+ maXPropSet->setPropertyValue( "CircleStartAngle", uno::Any((sal_Int32)( fStartAngle * 100 )) );
+ maXPropSet->setPropertyValue( "CircleEndAngle", uno::Any((sal_Int32)( fEndAngle * 100 )) );
}
maXShape->setPosition( awt::Point( (long)( rCenter.X - rSize.X ), (long)( rCenter.Y - rSize.Y ) ) );
if ( rOrientation != 0 )
@@ -581,9 +555,7 @@ void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc )
}
uno::Reference< awt::XBitmap > xBitmap( VCLUnoHelper::CreateBitmap( BitmapEx( *( pBmpDesc->mpBitmap ) ) ) );
- uno::Any aAny;
- aAny <<= xBitmap;
- maXPropSet->setPropertyValue( "GraphicObjectFillBitmap", aAny );
+ maXPropSet->setPropertyValue( "GraphicObjectFillBitmap", uno::Any(xBitmap) );
}
}
@@ -779,12 +751,9 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha
if ( nOrientation )
{
- aAny <<= (sal_Int32)( aTextPos.X );
- maXPropSet->setPropertyValue( "RotationPointX", aAny );
- aAny <<= (sal_Int32)( aTextPos.Y + nHeight );
- maXPropSet->setPropertyValue( "RotationPointY", aAny );
- aAny <<= (sal_Int32)( (sal_Int32)( nOrientation * 100 ) );
- maXPropSet->setPropertyValue( "RotateAngle", aAny );
+ maXPropSet->setPropertyValue( "RotationPointX", uno::Any((sal_Int32)( aTextPos.X )) );
+ maXPropSet->setPropertyValue( "RotationPointY", uno::Any((sal_Int32)( aTextPos.Y + nHeight )) );
+ maXPropSet->setPropertyValue( "RotateAngle", uno::Any((sal_Int32)( nOrientation * 100 )) );
}
if ( nWidth == -1 )
{
@@ -807,8 +776,7 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha
eTextAdjust = drawing::TextAdjust_CENTER;
break;
}
- aAny <<= eTextAdjust;
- maXPropSet->setPropertyValue( "TextHorizontalAdjust", aAny );
+ maXPropSet->setPropertyValue( "TextHorizontalAdjust", uno::Any(eTextAdjust) );
}
if ( nHeight == -1 )
{
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index aadcd588eb1b..790feaa96be0 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -452,7 +452,6 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
}
if ( pO )
{
- Any aAny;
SdrGluePoint aGluePoint;
Reference< XShape > aXShape( pO->getUnoShape(), UNO_QUERY );
Reference< XShape > aXConnector( pPtr->pCObj->getUnoShape(), UNO_QUERY );
@@ -749,20 +748,16 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
if ( nN )
{
OUString aPropName( "EndShape" );
- aAny <<= aXShape;
- SetPropValue( aAny, xPropSet, aPropName, true );
+ SetPropValue( Any(aXShape), xPropSet, aPropName, true );
aPropName = "EndGluePointIndex";
- aAny <<= nId;
- SetPropValue( aAny, xPropSet, aPropName, true );
+ SetPropValue( Any(nId), xPropSet, aPropName, true );
}
else
{
OUString aPropName( "StartShape" );
- aAny <<= aXShape;
- SetPropValue( aAny, xPropSet, aPropName, true );
+ SetPropValue( Any(aXShape), xPropSet, aPropName, true );
aPropName = "StartGluePointIndex";
- aAny <<= nId;
- SetPropValue( aAny, xPropSet, aPropName, true );
+ SetPropValue( Any(nId), xPropSet, aPropName, true );
}
// Not sure what this is good for, repaint or broadcast of object change.
diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx
index da5eb7fa1e78..7acec4786005 100644
--- a/forms/source/xforms/convert.cxx
+++ b/forms/source/xforms/convert.cxx
@@ -59,7 +59,7 @@ namespace
Any lcl_toAny_OUString( const OUString& rStr )
- { Any aAny; aAny <<= rStr; return aAny; }
+ { return Any(rStr); }
OUString lcl_toXSD_bool( const Any& rAny )
diff --git a/fpicker/source/win32/misc/WinImplHelper.cxx b/fpicker/source/win32/misc/WinImplHelper.cxx
index 84c51419d919..d4156bca3888 100644
--- a/fpicker/source/win32/misc/WinImplHelper.cxx
+++ b/fpicker/source/win32/misc/WinImplHelper.cxx
@@ -264,10 +264,7 @@ Any SAL_CALL ListboxGetItems( HWND hwnd )
}
}
- Any aAny;
- aAny <<= aItemList;
-
- return aAny;
+ return Any(aItemList);
}
@@ -277,10 +274,7 @@ Any SAL_CALL ListboxGetSelectedItem( HWND hwnd )
LRESULT idxItem = SendMessageW( hwnd, CB_GETCURSEL, 0, 0 );
- Any aAny;
- aAny <<= ListboxGetString( hwnd, idxItem );
-
- return aAny;
+ return Any( ListboxGetString( hwnd, idxItem ) );
}
@@ -290,10 +284,7 @@ Any SAL_CALL ListboxGetSelectedItemIndex( HWND hwnd )
LRESULT idxItem = SendMessageW( hwnd, CB_GETCURSEL, 0, 0 );
- Any aAny;
- aAny <<= static_cast< sal_Int32 >( idxItem );
-
- return aAny;
+ return Any( static_cast< sal_Int32 >( idxItem ) );
}
@@ -302,10 +293,8 @@ Any SAL_CALL CheckboxGetState( HWND hwnd )
OSL_ASSERT( IsWindow( hwnd ) );
LRESULT lChkState = SendMessageW( hwnd, BM_GETCHECK, 0, 0 );
- sal_Bool bChkState = (lChkState == BST_CHECKED) ? sal_True : sal_False;
- Any aAny;
- aAny.setValue( &bChkState, cppu::UnoType<sal_Bool>::get());
- return aAny;
+ bool bChkState = (lChkState == BST_CHECKED);
+ return Any(bChkState);
}
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index 8b028a3c1ea3..1cc2463fc330 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -343,9 +343,7 @@ void ConvDicNameContainer::AddConvDics(
if (xDic.is())
{
- uno::Any aAny;
- aAny <<= xDic;
- insertByName( xDic->getName(), aAny );
+ insertByName( xDic->getName(), Any(xDic) );
}
}
}
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 9cbffbd1fdfd..b87b7a4e00eb 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -1518,10 +1518,8 @@ void SAL_CALL ZipPackage::commitChanges()
aInfo.NewTitle = rtl::Uri::decode ( m_aURL.copy ( 1 + m_aURL.lastIndexOf ( static_cast < sal_Unicode > ( '/' ) ) ),
rtl_UriDecodeWithCharset,
RTL_TEXTENCODING_UTF8 );
- aAny <<= aInfo;
-
// if the file is still not corrupted, it can become after the next step
- aContent.executeCommand ("transfer", aAny );
+ aContent.executeCommand ("transfer", Any(aInfo) );
}
catch ( const css::uno::Exception& r )
{
@@ -1782,11 +1780,9 @@ Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName )
// if ( m_nFormat != embed::StorageFormats::PACKAGE )
// throw UnknownPropertyException(THROW_WHERE );
- Any aAny;
if ( PropertyName == ENCRYPTION_KEY_PROPERTY )
{
- aAny <<= m_aEncryptionKey;
- return aAny;
+ return Any(m_aEncryptionKey);
}
else if ( PropertyName == ENCRYPTION_ALGORITHMS_PROPERTY )
{
@@ -1794,33 +1790,27 @@ Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName )
aAlgorithms["StartKeyGenerationAlgorithm"] <<= m_nStartKeyGenerationID;
aAlgorithms["EncryptionAlgorithm"] <<= m_nCommonEncryptionID;
aAlgorithms["ChecksumAlgorithm"] <<= m_nChecksumDigestID;
- aAny <<= aAlgorithms.getAsConstNamedValueList();
- return aAny;
+ return Any(aAlgorithms.getAsConstNamedValueList());
}
if ( PropertyName == STORAGE_ENCRYPTION_KEYS_PROPERTY )
{
- aAny <<= m_aStorageEncryptionKeys;
- return aAny;
+ return Any(m_aStorageEncryptionKeys);
}
else if ( PropertyName == HAS_ENCRYPTED_ENTRIES_PROPERTY )
{
- aAny <<= m_bHasEncryptedEntries;
- return aAny;
+ return Any(m_bHasEncryptedEntries);
}
else if ( PropertyName == HAS_NONENCRYPTED_ENTRIES_PROPERTY )
{
- aAny <<= m_bHasNonEncryptedEntries;
- return aAny;
+ return Any(m_bHasNonEncryptedEntries);
}
else if ( PropertyName == IS_INCONSISTENT_PROPERTY )
{
- aAny <<= m_bInconsistent;
- return aAny;
+ return Any(m_bInconsistent);
}
else if ( PropertyName == MEDIATYPE_FALLBACK_USED_PROPERTY )
{
- aAny <<= m_bMediaTypeFallbackUsed;
- return aAny;
+ return Any(m_bMediaTypeFallbackUsed);
}
throw UnknownPropertyException(THROW_WHERE );
}
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 3e84d1ef127e..08898c29430a 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -1350,41 +1350,33 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
Any SAL_CALL ZipPackageStream::getPropertyValue( const OUString& PropertyName )
throw( beans::UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception )
{
- Any aAny;
if ( PropertyName == "MediaType" )
{
- aAny <<= msMediaType;
- return aAny;
+ return Any(msMediaType);
}
else if ( PropertyName == "Size" )
{
- aAny <<= aEntry.nSize;
- return aAny;
+ return Any(aEntry.nSize);
}
else if ( PropertyName == "Encrypted" )
{
- aAny <<= ((m_nStreamMode == PACKAGE_STREAM_RAW) || m_bToBeEncrypted);
- return aAny;
+ return Any((m_nStreamMode == PACKAGE_STREAM_RAW) || m_bToBeEncrypted);
}
else if ( PropertyName == "WasEncrypted" )
{
- aAny <<= m_bIsEncrypted;
- return aAny;
+ return Any(m_bIsEncrypted);
}
else if ( PropertyName == "Compressed" )
{
- aAny <<= m_bToBeCompressed;
- return aAny;
+ return Any(m_bToBeCompressed);
}
else if ( PropertyName == ENCRYPTION_KEY_PROPERTY )
{
- aAny <<= m_aEncryptionKey;
- return aAny;
+ return Any(m_aEncryptionKey);
}
else if ( PropertyName == STORAGE_ENCRYPTION_KEYS_PROPERTY )
{
- aAny <<= m_aStorageEncryptionKeys;
- return aAny;
+ return Any(m_aStorageEncryptionKeys);
}
else
throw beans::UnknownPropertyException(THROW_WHERE );
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index c5d3f9cea857..9dfc1404fc49 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1549,9 +1549,7 @@ bool OReportDefinition::WriteThroughComponent(
OUString aPropName("MediaType");
OUString aMime("text/xml");
- uno::Any aAny;
- aAny <<= aMime;
- xStreamProp->setPropertyValue( aPropName, aAny );
+ xStreamProp->setPropertyValue( aPropName, uno::Any(aMime) );
// encrypt all streams
xStreamProp->setPropertyValue( "UseCommonStoragePasswordEncryption",
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 422a189ae1f3..6c098d920b3f 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -3172,15 +3172,9 @@ uno::Reference<sdbc::XRowSet> ScDPCollection::DBCaches::createRowSet(
// set source parameters
- uno::Any aAny;
- aAny <<= rDBName;
- xRowProp->setPropertyValue( SC_DBPROP_DATASOURCENAME, aAny );
-
- aAny <<= rCommand;
- xRowProp->setPropertyValue( SC_DBPROP_COMMAND, aAny );
-
- aAny <<= nSdbType;
- xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_DATASOURCENAME, Any(rDBName) );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMAND, Any(rCommand) );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, Any(nSdbType) );
uno::Reference<sdb::XCompletedExecution> xExecute( xRowSet, uno::UNO_QUERY );
if ( xExecute.is() )
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 58c12f179a17..7043f699dc9c 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -564,26 +564,22 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
if ( xDimProp.is() )
{
// exceptions are caught at ScDPSaveData::WriteToSource
- uno::Any aAny;
sheet::DataPilotFieldOrientation eOrient = (sheet::DataPilotFieldOrientation)nOrientation;
- aAny <<= eOrient;
- xDimProp->setPropertyValue( SC_UNO_DP_ORIENTATION, aAny );
+ xDimProp->setPropertyValue( SC_UNO_DP_ORIENTATION, uno::Any(eOrient) );
sheet::GeneralFunction eFunc = (sheet::GeneralFunction)nFunction;
- aAny <<= eFunc;
- xDimProp->setPropertyValue( SC_UNO_DP_FUNCTION, aAny );
+ xDimProp->setPropertyValue( SC_UNO_DP_FUNCTION, uno::Any(eFunc) );
if ( nUsedHierarchy >= 0 )
{
- aAny <<= (sal_Int32)nUsedHierarchy;
- xDimProp->setPropertyValue( SC_UNO_DP_USEDHIERARCHY, aAny );
+ xDimProp->setPropertyValue( SC_UNO_DP_USEDHIERARCHY, uno::Any((sal_Int32)nUsedHierarchy) );
}
if ( pReferenceValue )
{
- aAny <<= *pReferenceValue;
- xDimProp->setPropertyValue( SC_UNO_DP_REFVALUE, aAny );
+ ;
+ xDimProp->setPropertyValue( SC_UNO_DP_REFVALUE, uno::Any(*pReferenceValue) );
}
if (mpLayoutName)
@@ -633,7 +629,6 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
OSL_ENSURE( xLevProp.is(), "no properties at level" );
if ( xLevProp.is() )
{
- uno::Any aAny;
if ( !bSubTotalDefault )
{
if ( !pSubTotalFuncs )
@@ -643,8 +638,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
sheet::GeneralFunction* pArray = aSeq.getArray();
for (long i=0; i<nSubTotalCount; i++)
pArray[i] = (sheet::GeneralFunction)pSubTotalFuncs[i];
- aAny <<= aSeq;
- xLevProp->setPropertyValue( SC_UNO_DP_SUBTOTAL, aAny );
+ xLevProp->setPropertyValue( SC_UNO_DP_SUBTOTAL, uno::Any(aSeq) );
}
if ( nShowEmptyMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xLevProp,
@@ -1150,9 +1144,7 @@ static void lcl_ResetOrient( const uno::Reference<sheet::XDimensionsSupplier>& x
uno::Reference<beans::XPropertySet> xDimProp( xIntDim, uno::UNO_QUERY );
if (xDimProp.is())
{
- uno::Any aAny;
- aAny <<= eOrient;
- xDimProp->setPropertyValue( SC_UNO_DP_ORIENTATION, aAny );
+ xDimProp->setPropertyValue( SC_UNO_DP_ORIENTATION, uno::Any(eOrient) );
}
}
}
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index d5922131e1c1..a1eb0433d214 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -463,11 +463,9 @@ SdrObjectPtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, c
{
//Need summary type for export. Detail type(checkbox, button ...) has been contained by mnObjType
const sal_Int16 nTBXControlType = eCreateFromMSTBXControl ;
- Any aAny;
- aAny <<= nTBXControlType;
try
{
- xPropSet->setPropertyValue(sPropertyName, aAny);
+ xPropSet->setPropertyValue(sPropertyName, Any(nTBXControlType));
}
catch(const Exception&)
{
@@ -482,14 +480,11 @@ SdrObjectPtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, c
if( pObj != nullptr && pObj->IsOcxControl() )
{
const sal_Int16 nOCXControlType = eCreateFromMSOCXControl;
- Any aAny;
try
{
- aAny <<= nOCXControlType;
- xPropSet->setPropertyValue(sPropertyName, aAny);
+ xPropSet->setPropertyValue(sPropertyName, Any(nOCXControlType));
//Detail type(checkbox, button ...)
- aAny<<= mnObjId;
- xPropSet->setPropertyValue(sObjIdPropertyName, aAny);
+ xPropSet->setPropertyValue(sObjIdPropertyName, makeAny<sal_uInt16>(mnObjId));
}
catch(const Exception&)
{
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index 65e9a547e366..749400d6f6d2 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -267,20 +267,14 @@ uno::Any SAL_CALL
ScAccessibleCellBase::getMaximumValue( )
throw (uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= DBL_MAX;
-
- return aAny;
+ return uno::Any(DBL_MAX);
}
uno::Any SAL_CALL
ScAccessibleCellBase::getMinimumValue( )
throw (uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= -DBL_MAX;
-
- return aAny;
+ return uno::Any(-DBL_MAX);
}
//===== XServiceInfo ====================================================
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 34c1ca250dd6..a1112b5dbeef 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -173,9 +173,7 @@ uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getCurrentValue() throw (uno::R
else
fValue = maCellPos.Row();
- uno::Any aAny;
- aAny <<= fValue;
- return aAny;
+ return uno::Any(fValue);
}
sal_Bool SAL_CALL ScAccessiblePreviewHeaderCell::setCurrentValue( const uno::Any& /* aNumber */ )
@@ -195,17 +193,13 @@ uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getMaximumValue() throw (uno::R
fValue = MAXCOL;
else
fValue = MAXROW;
- uno::Any aAny;
- aAny <<= fValue;
- return aAny;
+ return uno::Any(fValue);
}
uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getMinimumValue() throw (uno::RuntimeException, std::exception)
{
double fValue(0.0);
- uno::Any aAny;
- aAny <<= fValue;
- return aAny;
+ return uno::Any(fValue);
}
//===== XAccessibleComponent ============================================
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 0b39678594ff..5fc52586fbf5 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2265,9 +2265,7 @@ void ScModule::SetAutoSpellProperty( bool bSet )
// loading the linguistic component
SvtLinguConfig aConfig;
- uno::Any aAny;
- aAny <<= bSet;
- aConfig.SetProperty( OUString( LINGUPROP_AUTOSPELL ), aAny );
+ aConfig.SetProperty( OUString( LINGUPROP_AUTOSPELL ), uno::Any(bSet) );
}
bool ScModule::HasThesaurusLanguage( sal_uInt16 nLang )
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 1f258da9a526..ec1dd90c7ea8 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -213,16 +213,12 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
sal_Int32 nType = rParam.bSql ? sdb::CommandType::COMMAND :
( (rParam.nType == ScDbQuery) ? sdb::CommandType::QUERY :
sdb::CommandType::TABLE );
- uno::Any aAny;
- aAny <<= rParam.aDBName;
- xRowProp->setPropertyValue( SC_DBPROP_DATASOURCENAME, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_DATASOURCENAME, uno::Any(rParam.aDBName) );
- aAny <<= rParam.aStatement;
- xRowProp->setPropertyValue( SC_DBPROP_COMMAND, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMAND, uno::Any(rParam.aStatement) );
- aAny <<= nType;
- xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, uno::Any(nType) );
uno::Reference<sdb::XCompletedExecution> xExecute( xRowSet, uno::UNO_QUERY );
if ( xExecute.is() )
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 35cd59f0306e..f57582a5f510 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -326,19 +326,14 @@ sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncodi
if (!xRowProp.is()) return SCERR_IMPORT_CONNECT;
sal_Int32 nType = sdb::CommandType::TABLE;
- uno::Any aAny;
- aAny <<= xConnection;
- xRowProp->setPropertyValue( SC_DBPROP_ACTIVECONNECTION, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_ACTIVECONNECTION, uno::Any(xConnection) );
- aAny <<= nType;
- xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, uno::Any(nType) );
- aAny <<= OUString( aTabName );
- xRowProp->setPropertyValue( SC_DBPROP_COMMAND, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMAND, uno::Any(aTabName) );
- aAny <<= false;
- xRowProp->setPropertyValue( SC_DBPROP_PROPCHANGE_NOTIFY, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_PROPCHANGE_NOTIFY, uno::Any(false) );
xRowSet->execute();
@@ -795,7 +790,6 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
KillFile( aDeleteObj );
sal_uLong nErr = eERR_OK;
- uno::Any aAny;
SCCOL nFirstCol, nLastCol;
SCROW nFirstRow, nLastRow;
@@ -870,8 +864,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
OSL_ENSURE( xTableDesc.is(), "can't get table descriptor" );
if (!xTableDesc.is()) return SCERR_EXPORT_CONNECT;
- aAny <<= OUString( aTabName );
- xTableDesc->setPropertyValue( SC_DBPROP_NAME, aAny );
+ xTableDesc->setPropertyValue( SC_DBPROP_NAME, uno::Any(aTabName) );
// create columns
@@ -903,17 +896,13 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
OSL_ENSURE( xColumnDesc.is(), "can't get column descriptor" );
if (!xColumnDesc.is()) return SCERR_EXPORT_CONNECT;
- aAny <<= pColNames[nCol];
- xColumnDesc->setPropertyValue( SC_DBPROP_NAME, aAny );
+ xColumnDesc->setPropertyValue( SC_DBPROP_NAME, uno::Any(pColNames[nCol]) );
- aAny <<= pColTypes[nCol];
- xColumnDesc->setPropertyValue( SC_DBPROP_TYPE, aAny );
+ xColumnDesc->setPropertyValue( SC_DBPROP_TYPE, uno::Any(pColTypes[nCol]) );
- aAny <<= pColLengths[nCol];
- xColumnDesc->setPropertyValue( SC_DBPROP_PRECISION, aAny );
+ xColumnDesc->setPropertyValue( SC_DBPROP_PRECISION, uno::Any(pColLengths[nCol]) );
- aAny <<= pColScales[nCol];
- xColumnDesc->setPropertyValue( SC_DBPROP_SCALE, aAny );
+ xColumnDesc->setPropertyValue( SC_DBPROP_SCALE, uno::Any(pColScales[nCol]) );
xColumnsAppend->appendByDescriptor( xColumnDesc );
}
@@ -929,14 +918,11 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
OSL_ENSURE( xRowProp.is(), "can't get RowSet" );
if (!xRowProp.is()) return SCERR_EXPORT_CONNECT;
- aAny <<= xConnection;
- xRowProp->setPropertyValue( SC_DBPROP_ACTIVECONNECTION, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_ACTIVECONNECTION, uno::Any(xConnection) );
- aAny <<= (sal_Int32) sdb::CommandType::TABLE;
- xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, uno::Any((sal_Int32) sdb::CommandType::TABLE) );
- aAny <<= OUString( aTabName );
- xRowProp->setPropertyValue( SC_DBPROP_COMMAND, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMAND, uno::Any(aTabName) );
xRowSet->execute();
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index bdef1063be5f..09aa59f496af 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -189,28 +189,23 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
OUString sPropTargetFrame( "TargetFrame" );
OUString sPropLabel( "Label" );
- uno::Any aAny;
if ( xInfo->hasPropertyByName( sPropLabel ) )
{
- aAny <<= OUString(rName);
- xPropSet->setPropertyValue( sPropLabel, aAny );
+ xPropSet->setPropertyValue( sPropLabel, uno::Any(rName) );
}
OUString aTmp = INetURLObject::GetAbsURL( pViewData->GetDocShell()->GetMedium()->GetBaseURL(), rURL );
- aAny <<= aTmp;
- xPropSet->setPropertyValue( sPropTargetURL, aAny );
+ xPropSet->setPropertyValue( sPropTargetURL, uno::Any(aTmp) );
if( !rTarget.isEmpty() && xInfo->hasPropertyByName( sPropTargetFrame ) )
{
- aAny <<= OUString(rTarget);
- xPropSet->setPropertyValue( sPropTargetFrame, aAny );
+ xPropSet->setPropertyValue( sPropTargetFrame, uno::Any(rTarget) );
}
if ( xInfo->hasPropertyByName( sPropButtonType ) )
{
form::FormButtonType eButtonType = form::FormButtonType_URL;
- aAny <<= eButtonType;
- xPropSet->setPropertyValue( sPropButtonType, aAny );
+ xPropSet->setPropertyValue( sPropButtonType, uno::Any(eButtonType) );
}
//! Undo ???
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx
index ae121a45aed0..5fce4c2f2489 100644
--- a/sc/source/ui/unoobj/condformatuno.cxx
+++ b/sc/source/ui/unoobj/condformatuno.cxx
@@ -551,9 +551,7 @@ uno::Any ScCondFormatObj::getByIndex(sal_Int32 nIndex)
const ScFormatEntry* pEntry = getCoreObject()->GetEntry(nIndex);
uno::Reference<beans::XPropertySet> xCondEntry =
createConditionEntry(pEntry, this);
- uno::Any aAny;
- aAny <<= xCondEntry;
- return aAny;
+ return uno::Any(xCondEntry);
}
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCondFormatObj::getPropertySetInfo()
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index 2caf872d8d5b..d93b4dcd2130 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -1205,9 +1205,7 @@ void ScDDELinkObj::setResults( const uno::Sequence< uno::Sequence< uno::Any > >&
size_t nPos = 0;
if ( rDoc.FindDdeLink( aAppl, aTopic, aItem, SC_DDE_IGNOREMODE, nPos ) )
{
- uno::Any aAny;
- aAny <<= aResults;
- ScMatrixRef xMatrix = ScSequenceToMatrix::CreateMixedMatrix( aAny );
+ ScMatrixRef xMatrix = ScSequenceToMatrix::CreateMixedMatrix( Any(aResults) );
bSuccess = rDoc.SetDdeLinkResultMatrix( nPos, xMatrix );
}
}
@@ -1574,9 +1572,7 @@ Any SAL_CALL ScExternalDocLinkObj::getByName(const OUString &aName)
Reference< sheet::XExternalSheetCache > aSheetCache(new ScExternalSheetCacheObj(mpDocShell, pTable, nIndex));
- Any aAny;
- aAny <<= aSheetCache;
- return aAny;
+ return Any(aSheetCache);
}
Sequence< OUString > SAL_CALL ScExternalDocLinkObj::getElementNames()
@@ -1636,9 +1632,7 @@ Any SAL_CALL ScExternalDocLinkObj::getByIndex(sal_Int32 nApiIndex)
Reference< sheet::XExternalSheetCache > aSheetCache(new ScExternalSheetCacheObj(mpDocShell, pTable, nIndex));
- Any aAny;
- aAny <<= aSheetCache;
- return aAny;
+ return Any(aSheetCache);
}
Reference< container::XEnumeration > SAL_CALL ScExternalDocLinkObj::createEnumeration()
@@ -1705,9 +1699,7 @@ Any SAL_CALL ScExternalDocLinksObj::getByName(const OUString &aName)
sal_uInt16 nFileId = mpRefMgr->getExternalFileId(aDocUrl);
Reference< sheet::XExternalDocLink > aDocLink(new ScExternalDocLinkObj(mpDocShell, mpRefMgr, nFileId));
- Any aAny;
- aAny <<= aDocLink;
- return aAny;
+ return Any(aDocLink);
}
Sequence< OUString > SAL_CALL ScExternalDocLinksObj::getElementNames()
@@ -1752,9 +1744,7 @@ Any SAL_CALL ScExternalDocLinksObj::getByIndex(sal_Int32 nIndex)
throw lang::IndexOutOfBoundsException();
Reference< sheet::XExternalDocLink > aDocLink(new ScExternalDocLinkObj(mpDocShell, mpRefMgr, nFileId));
- Any aAny;
- aAny <<= aDocLink;
- return aAny;
+ return Any(aDocLink);
}
Reference< container::XEnumeration > SAL_CALL ScExternalDocLinksObj::createEnumeration()
diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx
index 54b7ba43a6d2..73cbb2ca2073 100644
--- a/sc/source/ui/view/tabvwshg.cxx
+++ b/sc/source/ui/view/tabvwshg.cxx
@@ -71,29 +71,23 @@ void ScTabViewShell::InsertURLButton( const OUString& rName, const OUString& rUR
return;
uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY );
- uno::Any aAny;
- aAny <<= OUString(rName);
- xPropSet->setPropertyValue("Label", aAny );
+ xPropSet->setPropertyValue("Label", uno::Any(rName) );
OUString aTmp = INetURLObject::GetAbsURL( pDoc->GetDocumentShell()->GetMedium()->GetBaseURL(), rURL );
- aAny <<= aTmp;
- xPropSet->setPropertyValue("TargetURL", aAny );
+ xPropSet->setPropertyValue("TargetURL", uno::Any(aTmp) );
if( !rTarget.isEmpty() )
{
- aAny <<= rTarget;
- xPropSet->setPropertyValue("TargetFrame", aAny );
+ xPropSet->setPropertyValue("TargetFrame", uno::Any(rTarget) );
}
form::FormButtonType eButtonType = form::FormButtonType_URL;
- aAny <<= eButtonType;
- xPropSet->setPropertyValue("ButtonType", aAny );
+ xPropSet->setPropertyValue("ButtonType", uno::Any(eButtonType) );
if ( ::avmedia::MediaWindow::isMediaURL( rURL, ""/*TODO?*/ ) )
{
- aAny <<= true;
- xPropSet->setPropertyValue("DispatchURLInternal", aAny );
+ xPropSet->setPropertyValue("DispatchURLInternal", uno::Any(true) );
}
Point aPos;
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 98f50c82c246..537f58a17754 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2661,11 +2661,9 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe
maTabData[nTab]->WriteUserDataSequence(aTableViewSettings, *this, nTab);
OUString sTabName;
GetDocument()->GetName( nTab, sTabName );
- uno::Any aAny;
- aAny <<= aTableViewSettings;
try
{
- xNameContainer->insertByName(sTabName, aAny);
+ xNameContainer->insertByName(sTabName, uno::Any(aTableViewSettings));
}
//#101739#; two tables with the same name are possible
catch ( container::ElementExistException& )
diff --git a/sc/workben/result.cxx b/sc/workben/result.cxx
index 0548630af8e5..3fd9f5538e6b 100644
--- a/sc/workben/result.cxx
+++ b/sc/workben/result.cxx
@@ -37,13 +37,11 @@ void ScAddInResult::NewValue()
{
++nTickCount;
- uno::Any aAny;
String aRet = aArg;
aRet += nTickCount;
OUString aUStr = StringToOUString( aRet, CHARSET_SYSTEM );
- aAny <<= aUStr;
- sheet::ResultEvent aEvent( (cppu::OWeakObject*)this, aAny );
+ sheet::ResultEvent aEvent( (cppu::OWeakObject*)this, Any(aUStr) );
for (size_t n = 0; n < m_Listeners.size(); ++n)
m_Listeners[n]->modified( aEvent );
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index 7b1ab2efce31..83ca865b6f80 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -1304,14 +1304,12 @@ void EffectMigration::SetAnimationPath( SvxShape* pShape, SdrPathObj* pPathObj )
void createVisibilityOnOffNode(Reference< XTimeContainer >& rxParentContainer, SdrObject& rCandidate, bool bVisible, bool bOnClick, double fDuration)
{
Reference< XMultiServiceFactory > xMsf(::comphelper::getProcessServiceFactory());
- Any aAny;
// create par container node
Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY_THROW);
// set begin
- aAny <<= (double)(0.0);
- xOuterSeqTimeContainer->setBegin(aAny);
+ xOuterSeqTimeContainer->setBegin(Any((double)0.0));
// set fill
xOuterSeqTimeContainer->setFill(AnimationFill::HOLD);
@@ -1329,12 +1327,10 @@ void createVisibilityOnOffNode(Reference< XTimeContainer >& rxParentContainer, S
Reference< XAnimationNode > xAnimateSetForLast(xMsf->createInstance("com.sun.star.animations.AnimateSet"), UNO_QUERY_THROW);
// set begin
- aAny <<= (double)(0.0);
- xAnimateSetForLast->setBegin(aAny);
+ xAnimateSetForLast->setBegin(Any((double)0.0));
// set duration
- aAny <<= fDuration;
- xAnimateSetForLast->setDuration(aAny);
+ xAnimateSetForLast->setDuration(Any(fDuration));
// set fill
xAnimateSetForLast->setFill(AnimationFill::HOLD);
@@ -1342,15 +1338,13 @@ void createVisibilityOnOffNode(Reference< XTimeContainer >& rxParentContainer, S
// set target
Reference< XAnimate > xAnimate(xAnimateSetForLast, UNO_QUERY);
Reference< XShape > xTargetShape(rCandidate.getUnoShape(), UNO_QUERY);
- aAny <<= xTargetShape;
- xAnimate->setTarget(aAny);
+ xAnimate->setTarget(Any(xTargetShape));
// set AttributeName
xAnimate->setAttributeName("Visibility");
// set attribute value
- aAny <<= bVisible;
- xAnimate->setTo(aAny);
+ xAnimate->setTo(Any(bVisible));
// ad set node to par node
Reference< XTimeContainer > xParentContainer(xOuterSeqTimeContainer, UNO_QUERY_THROW);
@@ -1391,11 +1385,9 @@ void EffectMigration::CreateAnimatedGroup(SdrObjGroup& rGroupObj, SdPage& rPage)
// create main node
Reference< XMultiServiceFactory > xMsf(::comphelper::getProcessServiceFactory());
Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY_THROW);
- Any aAny;
// set begin
- aAny <<= (double)(0.0);
- xOuterSeqTimeContainer->setBegin(aAny);
+ xOuterSeqTimeContainer->setBegin(Any((double)(0.0)));
// prepare parent container
Reference< XTimeContainer > xParentContainer(xOuterSeqTimeContainer, UNO_QUERY_THROW);
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index 3ca397048a8e..6b321991b858 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -1162,9 +1162,7 @@ bool AnimationExporter::exportAnimProperty( SvStream& rStrm, const sal_uInt16 nP
{
if ( eTranslateMode & TRANSLATE_NUMBER_TO_STRING )
{
- Any aAny;
OUString aNumber( OUString::number( fVal ) );
- aAny <<= aNumber;
exportAnimPropertyString( rStrm, nPropertyId, aNumber, eTranslateMode );
}
else
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 8848b8f1e9cd..e147a75bd1c4 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -977,9 +977,7 @@ bool SdXMLFilter::Export()
if( !xDocOut.is() || !xProps.is() )
return false;
- uno::Any aAny;
- aAny <<= OUString( "text/xml");
- xProps->setPropertyValue( "MediaType" , aAny);
+ xProps->setPropertyValue( "MediaType", Any(OUString( "text/xml")));
// encrypt all streams
xProps->setPropertyValue( "UseCommonStoragePasswordEncryption",
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 28c606216431..363fd897dbfd 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -730,8 +730,7 @@ void
if( xShapes->getCount() )
{
- aAny <<= xShapes;
- xSel->select( aAny );
+ xSel->select( Any(xShapes) );
}
}
}
@@ -776,8 +775,7 @@ void
else if( bFound && !bSelect )
xShapes->remove( xShape );
- aAny <<= xShapes;
- xSel->select( aAny );
+ xSel->select( Any(xShapes) );
}
}
}
diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
index 079f4bbf3e7a..3e6ea09e3f3d 100644
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -95,11 +95,8 @@ uno::Any SAL_CALL ViewShellWrapper::queryInterface( const uno::Type & rType ) th
if( mpSlideSorterViewShell &&
rType == cppu::UnoType<view::XSelectionSupplier>::get() )
{
- uno::Any aAny;
uno::Reference<view::XSelectionSupplier> xSupplier( this );
- aAny <<= xSupplier;
-
- return aAny;
+ return Any(xSupplier);
}
else
return ViewShellWrapperInterfaceBase::queryInterface( rType );
diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx
index 288cfa4e0a8e..e607a7a4059b 100644
--- a/sdext/source/presenter/PresenterScreen.cxx
+++ b/sdext/source/presenter/PresenterScreen.cxx
@@ -441,9 +441,7 @@ void PresenterScreen::SwitchMonitors()
// Set the new presentation display
Reference<beans::XPropertySet> xProperties (xPresentation, UNO_QUERY_THROW);
- uno::Any aDisplay;
- aDisplay <<= nNewScreen;
- xProperties->setPropertyValue("Display", aDisplay);
+ xProperties->setPropertyValue("Display", Any(nNewScreen));
} catch (const uno::Exception &) {
}
}
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 4b2a4960a63b..4e9b9011682c 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -575,10 +575,8 @@ void SvFileObject::SendStateChg_Impl( sfx2::LinkManager::LinkState nState )
{
if( !bStateChangeCalled && HasDataLinks() )
{
- css::uno::Any aAny;
- aAny <<= OUString::number( nState );
DataChanged( SotExchange::GetFormatName(
- sfx2::LinkManager::RegisterStatusInfoId()), aAny );
+ sfx2::LinkManager::RegisterStatusInfoId()), css::uno::Any(OUString::number( nState )) );
bStateChangeCalled = true;
}
}
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index aa96d2cc7e33..1efc00beaf59 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2190,9 +2190,7 @@ IMPL_LINK_NOARG_TYPED(SfxHelpTextWindow_Impl, SelectHdl, Idle *, void)
Reference < XSelectionSupplier > xSelectionSup( xController, UNO_QUERY );
if ( xSelectionSup.is() )
{
- Any aAny;
- aAny <<= xSelection;
- xSelectionSup->select( aAny );
+ xSelectionSup->select( Any(xSelection) );
}
}
}
@@ -2257,9 +2255,7 @@ void SfxHelpTextWindow_Impl::FindHdl(sfx2::SearchDialog* pDlg)
Reference < XSelectionSupplier > xSelectionSup( xController, UNO_QUERY );
if ( xSelectionSup.is() )
{
- Any aAny;
- aAny <<= xSelection;
- xSelectionSup->select( aAny );
+ xSelectionSup->select( Any(xSelection) );
}
}
else if ( pDlg->IsWrapAround() && !bWrapAround )
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index a98514c1dce3..2668096f3750 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -212,8 +212,7 @@ void SvxOpenGraphicDialog::AsLink(bool bState)
{
try
{
- Any aAny; aAny <<= bState;
- mpImpl->xCtrlAcc->setValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, aAny );
+ mpImpl->xCtrlAcc->setValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, Any(bState) );
}
catch(const IllegalArgumentException&)
{
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 5f1f33dd2f79..f827dd56876a 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1933,11 +1933,9 @@ void SfxMedium::Transfer_Impl()
// set segment size property; package will automatically be divided in pieces fitting
// into this size
- css::uno::Any aAny;
- aAny <<= pSegmentSize->GetValue();
uno::Reference < beans::XPropertySet > xSet( pImp->xStorage, uno::UNO_QUERY );
- xSet->setPropertyValue("SegmentSize", aAny );
+ xSet->setPropertyValue("SegmentSize", Any(pSegmentSize->GetValue()) );
// copy the temporary storage into the disk spanned package
GetStorage()->copyToStorage( xStor );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index a83535738f4e..d58ed2e6b396 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1711,7 +1711,6 @@ bool SfxObjectShell::SaveTo_Impl
OUString aAuthor( "Author" );
OUString aKeywords( "Keywords" );
OUString aSubject( "Subject" );
- Any aAny;
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
GetModel(), uno::UNO_QUERY_THROW);
@@ -1720,19 +1719,18 @@ bool SfxObjectShell::SaveTo_Impl
if ( xProps->hasPropertyByName( aAuthor ) )
{
- aAny <<= xDocProps->getAuthor();
- aContent.setPropertyValue( aAuthor, aAny );
+ aContent.setPropertyValue( aAuthor, Any(xDocProps->getAuthor()) );
}
if ( xProps->hasPropertyByName( aKeywords ) )
{
+ Any aAny;
aAny <<= ::comphelper::string::convertCommaSeparated(
xDocProps->getKeywords());
aContent.setPropertyValue( aKeywords, aAny );
}
if ( xProps->hasPropertyByName( aSubject ) )
{
- aAny <<= xDocProps->getSubject();
- aContent.setPropertyValue( aSubject, aAny );
+ aContent.setPropertyValue( aSubject, Any(xDocProps->getSubject()) );
}
}
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 8b135cf225f3..263a9d4a8026 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3232,14 +3232,12 @@ Reference < container::XIndexAccess > SAL_CALL SfxBaseModel::getViewData() throw
Reference < container::XIndexContainer > xCont( m_pData->m_contViewData, UNO_QUERY );
sal_Int32 nCount = 0;
Sequence < beans::PropertyValue > aSeq;
- Any aAny;
for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( m_pData->m_pObjectShell ); pFrame;
pFrame = SfxViewFrame::GetNext( *pFrame, m_pData->m_pObjectShell ) )
{
bool bIsActive = ( pFrame == pActFrame );
pFrame->GetViewShell()->WriteUserDataSequence( aSeq );
- aAny <<= aSeq;
- xCont->insertByIndex( bIsActive ? 0 : nCount, aAny );
+ xCont->insertByIndex( bIsActive ? 0 : nCount, Any(aSeq) );
nCount++;
}
}
@@ -3551,8 +3549,7 @@ Reference< ui::XUIConfigurationManager2 > SfxBaseModel::getUIConfigurationManage
Any a = xPropSet->getPropertyValue( aMediaTypeProp );
if ( !( a >>= aMediaType ) || aMediaType.isEmpty())
{
- a <<= aUIConfigMediaType;
- xPropSet->setPropertyValue( aMediaTypeProp, a );
+ xPropSet->setPropertyValue( aMediaTypeProp, Any(aUIConfigMediaType) );
}
}
else
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index c37293e62c50..b3d4963fe46d 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -320,8 +320,7 @@ void SfxViewFrame::GetState_Impl( SfxItemSet &rSet )
case SID_OBJECT:
if ( GetViewShell() && GetViewShell()->GetVerbs().getLength() && !GetObjectShell()->IsInPlaceActive() )
{
- uno::Any aAny;
- aAny <<= GetViewShell()->GetVerbs();
+ uno::Any aAny(GetViewShell()->GetVerbs());
rSet.Put( SfxUnoAnyItem( sal_uInt16( SID_OBJECT ), aAny ) );
}
else
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index e837fd17f36d..22b310d46008 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1494,24 +1494,20 @@ void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMult
aXPropSet->setPropertyValue("PolyPolygon", aParam );
//LineStyle : SOLID by default
- uno::Any aAny;
drawing::LineStyle eLS;
eLS = drawing::LineStyle_SOLID;
- aAny <<= eLS;
- aXPropSet->setPropertyValue("LineStyle", aAny );
+ aXPropSet->setPropertyValue("LineStyle", uno::Any(eLS) );
//LineColor
sal_uInt32 nLineColor;
nLineColor = pPolyPoly->getRGBALineColor();
//Transform polygon color from RRGGBBAA to AARRGGBB
- aAny <<= RGBAColor2UnoColor(nLineColor);
- aXPropSet->setPropertyValue("LineColor", aAny );
+ aXPropSet->setPropertyValue("LineColor", uno::Any(RGBAColor2UnoColor(nLineColor)) );
//LineWidth
double fLineWidth;
fLineWidth = pPolyPoly->getStrokeWidth();
- aAny <<= (sal_Int32)fLineWidth;
- aXPropSet->setPropertyValue("LineWidth", aAny );
+ aXPropSet->setPropertyValue("LineWidth", uno::Any((sal_Int32)fLineWidth) );
// make polygons special
xLayerManager->attachShapeToLayer(rPolyShape, xDrawnInSlideshow);
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 154aff5f66b4..b98caea63b2f 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -677,9 +677,7 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const OUString& rName, StreamMode
{
sal_uInt8* pBuffer = aBuffer;
css::uno::Sequence < sal_Int8 > aSequ( reinterpret_cast<sal_Int8*>(pBuffer), RTL_DIGEST_LENGTH_SHA1 );
- css::uno::Any aAny;
- aAny <<= aSequ;
- m_pContent->setPropertyValue("EncryptionKey", aAny );
+ m_pContent->setPropertyValue("EncryptionKey", Any(aSequ) );
}
}
}
@@ -1108,12 +1106,10 @@ sal_Int16 UCBStorageStream_Impl::Commit()
// create wrapper to stream that is only used while reading inside package component
Reference < XInputStream > xStream = new FileStreamWrapper_Impl( m_aTempURL );
- Any aAny;
InsertCommandArgument aArg;
aArg.Data = xStream;
aArg.ReplaceExisting = true;
- aAny <<= aArg;
- m_pContent->executeCommand( "insert", aAny );
+ m_pContent->executeCommand( "insert", Any(aArg) );
// wrapper now controls lifetime of temporary file
m_aTempURL.clear();
@@ -2169,18 +2165,14 @@ sal_Int16 UCBStorage_Impl::Commit()
{
// name ( title ) of the element was changed
nLocalRet = COMMIT_RESULT_SUCCESS;
- Any aAny;
- aAny <<= pElement->m_aName;
- pContent->setPropertyValue("Title", aAny );
+ pContent->setPropertyValue("Title", Any(pElement->m_aName) );
}
if (pContent && pElement->IsLoaded() && pElement->GetContentType() != pElement->GetOriginalContentType())
{
// mediatype of the element was changed
nLocalRet = COMMIT_RESULT_SUCCESS;
- Any aAny;
- aAny <<= pElement->GetContentType();
- pContent->setPropertyValue("MediaType", aAny );
+ pContent->setPropertyValue("MediaType", Any(pElement->GetContentType()) );
}
if ( nLocalRet != COMMIT_RESULT_NOTHING_TO_DO )
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 83f6b2996c5b..63a031e2e1c2 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -162,10 +162,8 @@ bool SmXMLExportWrapper::Export(SfxMedium &rMedium)
SvtSaveOptions aSaveOpt;
OUString sUsePrettyPrinting("UsePrettyPrinting");
- sal_Bool bUsePrettyPrinting( bFlat || aSaveOpt.IsPrettyPrinting() );
- Any aAny;
- aAny.setValue( &bUsePrettyPrinting, cppu::UnoType<bool>::get() );
- xInfoSet->setPropertyValue( sUsePrettyPrinting, aAny );
+ bool bUsePrettyPrinting( bFlat || aSaveOpt.IsPrettyPrinting() );
+ xInfoSet->setPropertyValue( sUsePrettyPrinting, Any(bUsePrettyPrinting) );
// Set base URI
OUString sPropName( "BaseURI" );
@@ -330,17 +328,13 @@ bool SmXMLExportWrapper::WriteThroughComponent(
OUString aPropName( "MediaType" );
OUString aMime( "text/xml" );
- uno::Any aAny;
- aAny <<= aMime;
uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY );
- xSet->setPropertyValue( aPropName, aAny );
+ xSet->setPropertyValue( aPropName, Any(aMime) );
// all streams must be encrypted in encrypted document
OUString aTmpPropName( "UseCommonStoragePasswordEncryption" );
- sal_Bool bTrue = sal_True;
- aAny.setValue( &bTrue, cppu::UnoType<bool>::get() );
- xSet->setPropertyValue( aTmpPropName, aAny );
+ xSet->setPropertyValue( aTmpPropName, Any(true) );
// set Base URL
if ( rPropSet.is() )
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx
index 666e43a878fc..2be8ce8779fb 100644
--- a/svtools/source/misc/embedtransfer.cxx
+++ b/svtools/source/misc/embedtransfer.cxx
@@ -131,7 +131,6 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo
xStg->openStorageElement( aName, embed::ElementModes::READ )->copyToStorage( xStor );
}
- css::uno::Any aAny;
const sal_uInt32 nLen = pStream->Seek( STREAM_SEEK_TO_END );
css::uno::Sequence< sal_Int8 > aSeq( nLen );
@@ -142,8 +141,7 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo
if( ( bRet = ( aSeq.getLength() > 0 ) ) )
{
- aAny <<= aSeq;
- SetAny( aAny, rFlavor );
+ SetAny( uno::Any(aSeq), rFlavor );
}
}
else
diff --git a/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx b/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
index 72bc10adc988..aafb7df1bb73 100644
--- a/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
+++ b/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
@@ -58,11 +58,9 @@ void VCLXAccessibleSvxFindReplaceDialog::FillAccessibleRelationSet( utl::Accessi
{
return;
}
- Any aAny;
- aAny <<= ( pSrchDlg->GetSrchFlag() );
const sal_Int32 FORFINDREPLACEFLOWTO = 2;
- uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->getAccFlowTo( aAny, FORFINDREPLACEFLOWTO );
+ uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->getAccFlowTo( Any(pSrchDlg->GetSrchFlag()), FORFINDREPLACEFLOWTO );
sal_Int32 nLen = aAnySeq.getLength();
if ( nLen )
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 53b5f50de11c..3c17643a3121 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -1427,9 +1427,7 @@ namespace svxform
{
SvtViewOptions aViewOpt( E_TABDIALOG, CFGNAME_DATANAVIGATOR );
aViewOpt.SetPageID( static_cast< sal_Int32 >( m_pTabCtrl->GetCurPageId() ) );
- Any aAny;
- aAny <<= m_bShowDetails;
- aViewOpt.SetUserItem(CFGNAME_SHOWDETAILS,aAny);
+ aViewOpt.SetUserItem(CFGNAME_SHOWDETAILS, Any(m_bShowDetails));
m_pInstPage.disposeAndClear();
m_pSubmissionPage.disposeAndClear();
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 164234a7adb4..8ecadc94fe12 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1644,9 +1644,7 @@ void FmXFormShell::SetY2KState(sal_uInt16 n)
{
try
{
- Any aVal;
- aVal <<= n;
- xSet->setPropertyValue("TwoDigitDateStart", aVal);
+ xSet->setPropertyValue("TwoDigitDateStart", makeAny<sal_uInt16>(n));
}
catch(Exception&)
{
@@ -1685,9 +1683,7 @@ void FmXFormShell::SetY2KState(sal_uInt16 n)
{
try
{
- Any aVal;
- aVal <<= n;
- xSet->setPropertyValue("TwoDigitDateStart", aVal);
+ xSet->setPropertyValue("TwoDigitDateStart", makeAny<sal_uInt16>(n));
}
catch(Exception&)
{
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index d7b5c1141040..260be8c02b49 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -806,9 +806,7 @@ short ChineseDictionaryDialog::Execute()
{
//save settings to configuration
SvtLinguConfig aLngCfg;
- Any aAny;
- aAny <<= m_pCB_Reverse->IsChecked();
- aLngCfg.SetProperty( OUString( UPN_IS_REVERSE_MAPPING ), aAny );
+ aLngCfg.SetProperty( OUString( UPN_IS_REVERSE_MAPPING ), uno::Any(m_pCB_Reverse->IsChecked()) );
m_pCT_DictionaryToSimplified->save();
m_pCT_DictionaryToTraditional->save();
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index 6ff4621b2635..c86da59d3776 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -267,9 +267,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoXColorTable_createInstance( XPr
// SvxUnoXPropertyTable
uno::Any SvxUnoXColorTable::getAny( const XPropertyEntry* pEntry ) const throw()
{
- uno::Any aAny;
- aAny <<= (sal_Int32)static_cast<const XColorEntry*>(pEntry)->GetColor().GetColor();
- return aAny;
+ return uno::Any( (sal_Int32)static_cast<const XColorEntry*>(pEntry)->GetColor().GetColor() );
}
XPropertyEntry* SvxUnoXColorTable::getEntry( const OUString& rName, const uno::Any& rAny ) const throw()
@@ -328,18 +326,14 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoXLineEndTable_createInstance( X
// SvxUnoXPropertyTable
uno::Any SvxUnoXLineEndTable::getAny( const XPropertyEntry* pEntry ) const throw()
{
-
- uno::Any aAny;
drawing::PolyPolygonBezierCoords aBezier;
basegfx::unotools::b2DPolyPolygonToPolyPolygonBezier( static_cast<const XLineEndEntry*>(pEntry)->GetLineEnd(),
aBezier );
- aAny <<= aBezier;
- return aAny;
+ return uno::Any(aBezier);
}
XPropertyEntry* SvxUnoXLineEndTable::getEntry( const OUString& rName, const uno::Any& rAny ) const throw(lang::IllegalArgumentException)
{
-
if( !rAny.getValue() || rAny.getValueType() != cppu::UnoType<drawing::PolyPolygonBezierCoords>::get())
return nullptr;
@@ -411,9 +405,7 @@ uno::Any SvxUnoXDashTable::getAny( const XPropertyEntry* pEntry ) const throw()
aLineDash.DashLen = rXD.GetDashLen();
aLineDash.Distance = rXD.GetDistance();
- uno::Any aAny;
- aAny <<= aLineDash;
- return aAny;
+ return uno::Any(aLineDash);
}
XPropertyEntry* SvxUnoXDashTable::getEntry( const OUString& rName, const uno::Any& rAny ) const throw()
@@ -489,9 +481,7 @@ uno::Any SvxUnoXHatchTable::getAny( const XPropertyEntry* pEntry ) const throw()
aUnoHatch.Distance = aHatch.GetDistance();
aUnoHatch.Angle = aHatch.GetAngle();
- uno::Any aAny;
- aAny <<= aUnoHatch;
- return aAny;
+ return uno::Any(aUnoHatch);
}
XPropertyEntry* SvxUnoXHatchTable::getEntry( const OUString& rName, const uno::Any& rAny ) const throw()
@@ -569,9 +559,7 @@ uno::Any SvxUnoXGradientTable::getAny( const XPropertyEntry* pEntry ) const thro
aGradient.EndIntensity = aXGradient.GetEndIntens();
aGradient.StepCount = aXGradient.GetSteps();
- uno::Any aAny;
- aAny <<= aGradient;
- return aAny;
+ return uno::Any(aGradient);
}
XPropertyEntry* SvxUnoXGradientTable::getEntry( const OUString& rName, const uno::Any& rAny ) const throw()
@@ -646,9 +634,7 @@ uno::Any SvxUnoXBitmapTable::getAny( const XPropertyEntry* pEntry ) const throw(
const GraphicObject& rGraphicObject(static_cast<const XBitmapEntry*>(pEntry)->GetGraphicObject());
aURL += OStringToOUString(rGraphicObject.GetUniqueID(), RTL_TEXTENCODING_ASCII_US);
- uno::Any aAny;
- aAny <<= aURL;
- return aAny;
+ return uno::Any(aURL);
}
XPropertyEntry* SvxUnoXBitmapTable::getEntry( const OUString& rName, const uno::Any& rAny ) const throw(uno::RuntimeException)
diff --git a/svx/source/unodraw/gluepts.cxx b/svx/source/unodraw/gluepts.cxx
index 30e08df4d008..47a96a7ec205 100644
--- a/svx/source/unodraw/gluepts.cxx
+++ b/svx/source/unodraw/gluepts.cxx
@@ -481,9 +481,7 @@ uno::Any SAL_CALL SvxUnoGluePointAccess::getByIndex( sal_Int32 Index )
SdrGluePoint aTempPoint = mpObject->GetVertexGluePoint( (sal_uInt16)Index );
aGluePoint.IsUserDefined = sal_False;
convert( aTempPoint, aGluePoint );
- uno::Any aAny;
- aAny <<= aGluePoint;
- return aAny;
+ return uno::Any(aGluePoint);
}
else
{
@@ -494,9 +492,7 @@ uno::Any SAL_CALL SvxUnoGluePointAccess::getByIndex( sal_Int32 Index )
const SdrGluePoint& rTempPoint = (*pList)[(sal_uInt16)Index];
aGluePoint.IsUserDefined = sal_True;
convert( rTempPoint, aGluePoint );
- uno::Any aAny;
- aAny <<= aGluePoint;
- return aAny;
+ return uno::Any(aGluePoint);
}
}
}
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
index 9f5128f7789c..b0cde191e6ec 100644
--- a/svx/source/unodraw/unoshap3.cxx
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -218,9 +218,7 @@ uno::Any SAL_CALL Svx3DSceneObject::getByIndex( sal_Int32 Index )
throw lang::IndexOutOfBoundsException();
Reference< drawing::XShape > xShape( pDestObj->getUnoShape(), uno::UNO_QUERY );
- uno::Any aAny;
- aAny <<= xShape;
- return aAny;
+ return uno::Any(xShape);
}
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 9c70a6556b21..d2f6a20cb0fa 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -524,14 +524,12 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName,
Graphic aGraphic( (Graphic&) aGrfObject.GetGraphic() );
const GfxLink aGfxLink( aGraphic.GetLink() );
const OUString aMimeType( ImplGetGraphicMimeType( rPictureStreamName ) );
- uno::Any aAny;
uno::Reference < beans::XPropertySet > xProps( aStream.xStream, uno::UNO_QUERY );
// set stream properties (MediaType/Compression)
if( !aMimeType.isEmpty() )
{
- aAny <<= aMimeType;
- xProps->setPropertyValue( "MediaType", aAny );
+ xProps->setPropertyValue( "MediaType", Any(aMimeType) );
}
// picture formats that actuall _do_ benefit from zip
@@ -561,8 +559,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName,
}
}
- aAny <<= bCompressed;
- xProps->setPropertyValue( "Compressed", aAny );
+ xProps->setPropertyValue( "Compressed", Any(bCompressed) );
std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( aStream.xStream ));
if( bUseGfxLink && aGfxLink.GetDataSize() && aGfxLink.GetData() )
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index 64315c280bbc..ebe84f58255e 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -353,9 +353,7 @@ uno::Any SwAccessibleCell::getCurrentValue( )
SolarMutexGuard aGuard;
CHECK_FOR_DEFUNC( XAccessibleValue );
- uno::Any aAny;
- aAny <<= GetTableBoxFormat()->GetTableBoxValue().GetValue();
- return aAny;
+ return uno::Any( GetTableBoxFormat()->GetTableBoxValue().GetValue() );
}
sal_Bool SwAccessibleCell::setCurrentValue( const uno::Any& aNumber )
@@ -377,17 +375,13 @@ sal_Bool SwAccessibleCell::setCurrentValue( const uno::Any& aNumber )
uno::Any SwAccessibleCell::getMaximumValue( )
throw( uno::RuntimeException, std::exception )
{
- uno::Any aAny;
- aAny <<= DBL_MAX;
- return aAny;
+ return uno::Any(DBL_MAX);
}
uno::Any SwAccessibleCell::getMinimumValue( )
throw( uno::RuntimeException, std::exception )
{
- uno::Any aAny;
- aAny <<= -DBL_MAX;
- return aAny;
+ return uno::Any(-DBL_MAX);
}
static OUString ReplaceOneChar(const OUString& oldOUString, const OUString& replacedChar, const OUString& replaceStr)
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index 9b7a1bfdd7ee..c9d4ab844835 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -209,16 +209,12 @@ uno::Any SAL_CALL SwAccessibleNoTextFrame::queryInterface( const uno::Type& aTyp
::cppu::UnoType<XAccessibleImage>::get() )
{
uno::Reference<XAccessibleImage> xImage = this;
- uno::Any aAny;
- aAny <<= xImage;
- return aAny;
+ return uno::Any(xImage);
}
else if ( aType == cppu::UnoType<XAccessibleHypertext>::get())
{
uno::Reference<XAccessibleHypertext> aAccHypertext = this;
- uno::Any aAny;
- aAny <<= aAccHypertext;
- return aAny;
+ return uno::Any( aAccHypertext );
}
else
return SwAccessibleContext::queryInterface( aType );
diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index 889be6a14534..6e361ac6bdf1 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -366,9 +366,7 @@ sal_uLong SwXMLTextBlocks::PutBlockText( const OUString& rShort, const OUString&
uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY );
OUString aMime ( "text/xml" );
- Any aAny;
- aAny <<= aMime;
- xSet->setPropertyValue("MediaType", aAny );
+ xSet->setPropertyValue("MediaType", Any(aMime) );
uno::Reference < io::XOutputStream > xOut = xDocStream->getOutputStream();
uno::Reference<io::XActiveDataSource> xSrc(xWriter, uno::UNO_QUERY);
xSrc->setOutputStream(xOut);
@@ -488,9 +486,7 @@ void SwXMLTextBlocks::WriteInfo()
uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY );
OUString aMime ( "text/xml" );
- Any aAny;
- aAny <<= aMime;
- xSet->setPropertyValue("MediaType", aAny );
+ xSet->setPropertyValue("MediaType", Any(aMime) );
uno::Reference < io::XOutputStream > xOut = xDocStream->getOutputStream();
uno::Reference<io::XActiveDataSource> xSrc(xWriter, uno::UNO_QUERY);
xSrc->setOutputStream(xOut);
@@ -557,9 +553,7 @@ sal_uLong SwXMLTextBlocks::SetMacroTable(
uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY );
OUString aMime( "text/xml" );
- Any aAny;
- aAny <<= aMime;
- xSet->setPropertyValue("MediaType", aAny );
+ xSet->setPropertyValue("MediaType", Any(aMime) );
uno::Reference < io::XOutputStream > xOutputStream = xDocStream->getOutputStream();
// get XML writer
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index 1a7e50bcdd09..8dd8028d4a24 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -96,14 +96,12 @@ bool UCB_CopyFile( const OUString& rURL, const OUString& rNewURL, bool bCopyIsMo
css::uno::Reference< css::ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
- css::uno::Any aAny;
css::ucb::TransferInfo aInfo;
aInfo.NameClash = css::ucb::NameClash::ERROR;
aInfo.NewTitle = sName;
aInfo.SourceURL = rURL;
aInfo.MoveData = bCopyIsMove;
- aAny <<= aInfo;
- aTempContent.executeCommand( "transfer", aAny );
+ aTempContent.executeCommand( "transfer", uno::Any(aInfo) );
}
catch( css::uno::Exception& )
{
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 04d0c4a56b3b..835c88bacdc3 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -2405,16 +2405,11 @@ void SwHTMLParser::EndSelect()
pValues[i] = sText;
}
- Any aAny( &aList, cppu::UnoType<uno::Sequence<OUString>>::get() );
+ rPropSet->setPropertyValue("StringItemList", Any(aList) );
- rPropSet->setPropertyValue("StringItemList", aAny );
+ rPropSet->setPropertyValue("ListSourceType", Any(ListSourceType_VALUELIST) );
- aAny <<= ListSourceType_VALUELIST;
- rPropSet->setPropertyValue("ListSourceType", aAny );
-
- aAny.setValue( &aValueList, cppu::UnoType<uno::Sequence<OUString>>::get() );
-
- rPropSet->setPropertyValue("ListSource", aAny );
+ rPropSet->setPropertyValue("ListSource", Any(aValueList) );
size_t nSelCnt = m_pFormImpl->GetSelectedList().size();
if( !nSelCnt && 1 == m_nSelectEntryCnt && nEntryCnt )
@@ -2430,10 +2425,7 @@ void SwHTMLParser::EndSelect()
{
pSels[i] = (sal_Int16)m_pFormImpl->GetSelectedList()[i];
}
- aAny.setValue( &aSelList,
- cppu::UnoType<uno::Sequence<sal_Int16>>::get() );
-
- rPropSet->setPropertyValue("DefaultSelection", aAny );
+ rPropSet->setPropertyValue("DefaultSelection", Any(aSelList) );
m_pFormImpl->EraseStringList();
m_pFormImpl->EraseValueList();
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 0f5392f39b0c..f53e50ef5ab5 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -170,11 +170,9 @@ sal_uInt32 SwXMLWriter::_Write( const uno::Reference < task::XStatusIndicator >&
xStatusIndicator->start(SW_RESSTR( STR_STATSTR_SWGWRITE),
nProgressRange);
}
- aAny <<= nProgressRange;
- xInfoSet->setPropertyValue("ProgressRange", aAny);
+ xInfoSet->setPropertyValue("ProgressRange", Any(nProgressRange));
- aAny <<= static_cast < sal_Int32 >( -1 );
- xInfoSet->setPropertyValue("ProgressMax", aAny);
+ xInfoSet->setPropertyValue("ProgressMax", Any(static_cast < sal_Int32 >( -1 )));
}
SvtSaveOptions aSaveOpt;
@@ -486,9 +484,7 @@ bool SwXMLWriter::WriteThroughComponent(
if( !xSet.is() )
return false;
- uno::Any aAny;
- aAny <<= OUString("text/xml");
- xSet->setPropertyValue("MediaType", aAny );
+ xSet->setPropertyValue("MediaType", Any(OUString("text/xml")) );
// even plain stream should be encrypted in encrypted documents
xSet->setPropertyValue( "UseCommonStoragePasswordEncryption", makeAny(true) );
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 127726796d06..6afa81c25f48 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1285,10 +1285,8 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
if( ! bPrinterIndependentLayout )
{
- Any aAny;
sal_Int16 nTmp = document::PrinterIndependentLayout::DISABLED;
- aAny <<= nTmp;
- xProps->setPropertyValue( "PrinterIndependentLayout", aAny );
+ xProps->setPropertyValue( "PrinterIndependentLayout", Any(nTmp) );
}
if( ! bAddExternalLeading )
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 0e28509b7edd..afc8004e0035 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -661,9 +661,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
case MID_GRAPHIC_LINK:
{
SvxGraphicPosition eOldGraphicPos = rBrush.GetGraphicPos();
- uno::Any aAny;
- aAny <<= rValue;
- rBrush.PutValue( aAny, MID_GRAPHIC_URL );
+ rBrush.PutValue( Any(rValue), MID_GRAPHIC_URL );
if( GPOS_NONE == eOldGraphicPos &&
GPOS_NONE != rBrush.GetGraphicPos() )
rBrush.SetGraphicPos( GPOS_TILED );
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index fdfabd949982..4dc0d55a5083 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -228,21 +228,16 @@ static void lcl_addOutplaceProperties(
if( aSize.Width() && aSize.Height() )
{
- Any aAny;
- aAny <<= 0L;
- *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_LEFT ), aAny );
+ *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_LEFT ), Any(0L) );
pStates++;
- aAny <<= 0L;
- *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_TOP ), aAny );
+ *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_TOP ), Any(0L) );
pStates++;
- aAny <<= (sal_Int32)aSize.Width();
- *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_WIDTH ), aAny );
+ *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_WIDTH ), Any((sal_Int32)aSize.Width()) );
pStates++;
- aAny <<= (sal_Int32)aSize.Height();
- *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_HEIGHT ), aAny );
+ *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_HEIGHT ), Any((sal_Int32)aSize.Height()) );
}
}
}
@@ -303,16 +298,12 @@ static void lcl_addFrameProperties(
}
if( SIZE_NOT_SET != nWidth )
{
- Any aAny2;
- aAny <<= nWidth;
- *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_FRAME_MARGIN_HORI ), aAny2 );
+ *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_FRAME_MARGIN_HORI ), Any(nWidth) );
pStates++;
}
if( SIZE_NOT_SET != nHeight )
{
- Any aAny2;
- aAny <<= nHeight;
- *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_FRAME_MARGIN_VERT ), aAny2 );
+ *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_FRAME_MARGIN_VERT ), Any(nHeight) );
}
}
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index b4d4cb537b1e..b58e48fc563a 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -386,12 +386,10 @@ IMPL_LINK_TYPED(SwAddressListDialog, CreateHdl_Impl, Button*, pButton, void)
aTempURL.removeSegment();
aTempURL.removeFinalSlash();
const OUString sDBURL("sdbc:flat:" + aTempURL.GetMainURL(INetURLObject::NO_DECODE));
- Any aAny(&sDBURL, cppu::UnoType<decltype(sDBURL)>::get());
- xDataProperties->setPropertyValue("URL", aAny);
+ xDataProperties->setPropertyValue("URL", Any(sDBURL));
//set the filter to the file name without extension
uno::Sequence<OUString> aFilters { sNewName };
- aAny <<= aFilters;
- xDataProperties->setPropertyValue("TableFilter", aAny);
+ xDataProperties->setPropertyValue("TableFilter", Any(aFilters));
uno::Sequence<PropertyValue> aInfo(4);
PropertyValue* pInfo = aInfo.getArray();
@@ -403,8 +401,7 @@ IMPL_LINK_TYPED(SwAddressListDialog, CreateHdl_Impl, Button*, pButton, void)
pInfo[2].Value <<= aURL.getExtension();//"csv";
pInfo[3].Name = "CharSet";
pInfo[3].Value <<= OUString("UTF-8");
- aAny <<= aInfo;
- xDataProperties->setPropertyValue("Info", aAny);
+ xDataProperties->setPropertyValue("Info", Any(aInfo));
uno::Reference<sdb::XDocumentDataSource> xDS(xNewInstance, UNO_QUERY_THROW);
uno::Reference<frame::XStorable> xStore(xDS->getDatabaseDocument(), UNO_QUERY_THROW);
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index ddd9e0e999f1..653dcd09cb88 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -594,9 +594,7 @@ void SAL_CALL UnoDialogControl::setHelpId( const OUString& i_id ) throw (Runtime
void UnoDialogControl::setTitle( const OUString& Title ) throw(RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- Any aAny;
- aAny <<= Title;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TITLE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TITLE ), uno::Any(Title), true );
}
OUString UnoDialogControl::getTitle() throw(RuntimeException, std::exception)
@@ -931,9 +929,7 @@ uno::Any UnoMultiPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString( "com.sun.star.awt.UnoControlMultiPage" );
- return aAny;
+ return uno::Any( OUString( "com.sun.star.awt.UnoControlMultiPage" ) );
}
return ControlModelContainerBase::ImplGetDefaultValue( nPropId );
}
@@ -1051,9 +1047,7 @@ uno::Any UnoPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString( "com.sun.star.awt.UnoControlPage" );
- return aAny;
+ return uno::Any( OUString( "com.sun.star.awt.UnoControlPage" ) );
}
return ControlModelContainerBase::ImplGetDefaultValue( nPropId );
}
@@ -1214,20 +1208,17 @@ OUString UnoFrameModel::getServiceName() throw(css::uno::RuntimeException, std::
uno::Any UnoFrameModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
- uno::Any aAny;
switch ( nPropId )
{
case BASEPROPERTY_DEFAULTCONTROL:
{
- aAny <<= OUString( "com.sun.star.awt.UnoControlFrame" );
- return aAny;
+ return uno::Any( OUString( "com.sun.star.awt.UnoControlFrame" ) );
}
case BASEPROPERTY_SCROLLWIDTH:
case BASEPROPERTY_SCROLLHEIGHT:
case BASEPROPERTY_SCROLLTOP:
case BASEPROPERTY_SCROLLLEFT:
- aAny <<= sal_Int32(0);
- return aAny;
+ return uno::Any( sal_Int32(0) );
case BASEPROPERTY_USERFORMCONTAINEES:
{
uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >();
diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx
index aaf8ee27effc..b9285406f634 100644
--- a/toolkit/source/controls/roadmapcontrol.cxx
+++ b/toolkit/source/controls/roadmapcontrol.cxx
@@ -207,7 +207,6 @@ static void lcl_throwIndexOutOfBoundsException( )
void UnoControlRoadmapModel::SetRMItemDefaultProperties( const sal_Int32 , Reference< XInterface > xRoadmapItem)
{
- Any aAny;
Reference< XPropertySet > xPropertySet( xRoadmapItem, UNO_QUERY );
Reference< XPropertySet > xProps( xRoadmapItem, UNO_QUERY );
if ( xProps.is() )
@@ -217,8 +216,7 @@ static void lcl_throwIndexOutOfBoundsException( )
aValue >>= LocID;
if (LocID < 0) // index may not be smaller than zero
{
- aAny <<= GetUniqueID();
- xPropertySet->setPropertyValue("ID", aAny );
+ xPropertySet->setPropertyValue("ID", Any(GetUniqueID()) );
}
}
}
@@ -290,8 +288,7 @@ static void lcl_throwIndexOutOfBoundsException( )
sal_Int16 n_CurrentItemID = GetCurrentItemID( xPropertySet );
if ( Index <= n_CurrentItemID )
{
- Any aAny;
- aAny <<= ( sal_Int16 ) ( n_CurrentItemID + 1 );
+ Any aAny(( sal_Int16 ) ( n_CurrentItemID + 1 ) );
xPropertySet->setPropertyValue( GetPropertyName( BASEPROPERTY_CURRENTITEMID ), aAny );
}
}
@@ -455,11 +452,9 @@ void UnoRoadmapControl::elementReplaced( const ContainerEvent& rEvent )throw(Run
void SAL_CALL UnoRoadmapControl::itemStateChanged( const ItemEvent& rEvent ) throw (RuntimeException, std::exception)
{
sal_Int16 CurItemIndex = sal::static_int_cast< sal_Int16 >(rEvent.ItemId);
- Any aAny;
- aAny <<= CurItemIndex;
Reference< XControlModel > xModel( getModel( ), UNO_QUERY );
Reference< XPropertySet > xPropertySet( xModel, UNO_QUERY );
- xPropertySet->setPropertyValue( GetPropertyName( BASEPROPERTY_CURRENTITEMID ), aAny );
+ xPropertySet->setPropertyValue( GetPropertyName( BASEPROPERTY_CURRENTITEMID ), Any(CurItemIndex) );
if ( maItemListeners.getLength() )
maItemListeners.itemStateChanged( rEvent );
}
diff --git a/toolkit/source/controls/tkscrollbar.cxx b/toolkit/source/controls/tkscrollbar.cxx
index 46b2f0ada958..3c42011c0b08 100644
--- a/toolkit/source/controls/tkscrollbar.cxx
+++ b/toolkit/source/controls/tkscrollbar.cxx
@@ -158,9 +158,7 @@ namespace toolkit
if ( xScrollBar.is() )
{
- uno::Any aAny;
- aAny <<= xScrollBar->getValue();
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SCROLLVALUE ), aAny, false );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SCROLLVALUE ), uno::Any(xScrollBar->getValue()), false );
}
}
break;
@@ -193,13 +191,9 @@ namespace toolkit
void UnoScrollBarControl::setValues( sal_Int32 nValue, sal_Int32 nVisible, sal_Int32 nMax ) throw(css::uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= nValue;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SCROLLVALUE ), aAny, true );
- aAny <<= nVisible;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VISIBLESIZE ), aAny, true );
- aAny <<= nMax;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SCROLLVALUE_MAX ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SCROLLVALUE ), uno::Any(nValue), true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VISIBLESIZE ), uno::Any(nVisible), true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SCROLLVALUE_MAX ), uno::Any(nMax), true );
}
sal_Int32 UnoScrollBarControl::getValue() throw(css::uno::RuntimeException, std::exception)
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 366b9e4d51db..a3d004ec8b1c 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -297,9 +297,7 @@ void UnoEditControl::textChanged(const awt::TextEvent& e) throw(uno::RuntimeExce
if ( mbHasTextProperty )
{
- uno::Any aAny;
- aAny <<= xText->getText();
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TEXT ), aAny, false );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TEXT ), uno::Any(xText->getText()), false );
}
else
{
@@ -324,9 +322,7 @@ void UnoEditControl::setText( const OUString& aText ) throw(uno::RuntimeExceptio
{
if ( mbHasTextProperty )
{
- uno::Any aAny;
- aAny <<= aText;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TEXT ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TEXT ), uno::Any(aText), true );
}
else
{
@@ -431,9 +427,7 @@ sal_Bool UnoEditControl::isEditable() throw(uno::RuntimeException, std::exceptio
void UnoEditControl::setEditable( sal_Bool bEditable ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= !bEditable;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_READONLY ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_READONLY ), uno::Any(!bEditable), true );
}
sal_Int16 UnoEditControl::getMaxTextLen() throw(uno::RuntimeException, std::exception)
@@ -450,9 +444,7 @@ void UnoEditControl::setMaxTextLen( sal_Int16 nLen ) throw(uno::RuntimeException
{
if ( ImplHasProperty( BASEPROPERTY_MAXTEXTLEN) )
{
- uno::Any aAny;
- aAny <<= (sal_Int16)nLen;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MAXTEXTLEN ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MAXTEXTLEN ), uno::Any((sal_Int16)nLen), true );
}
else
{
@@ -546,9 +538,7 @@ uno::Any UnoControlFileControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) c
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlFileControl );
- return aAny;
+ return uno::Any( OUString::createFromAscii( szServiceName_UnoControlFileControl ) );
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
@@ -883,9 +873,7 @@ void SAL_CALL UnoButtonControl::disposing( const lang::EventObject& Source ) thr
void SAL_CALL UnoButtonControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw (uno::RuntimeException, std::exception)
{
// forward to model
- uno::Any aAny;
- aAny <<= (sal_Int16)rEvent.Selected;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ), aAny, false );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ), uno::Any((sal_Int16)rEvent.Selected), false );
// multiplex
ItemEvent aEvent( rEvent );
@@ -895,9 +883,7 @@ void SAL_CALL UnoButtonControl::itemStateChanged( const awt::ItemEvent& rEvent )
void UnoButtonControl::setLabel( const OUString& rLabel ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= rLabel;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LABEL ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LABEL ), uno::Any(rLabel), true );
}
void UnoButtonControl::setActionCommand( const OUString& rCommand ) throw(uno::RuntimeException, std::exception)
@@ -1283,9 +1269,7 @@ void UnoRadioButtonControl::removeActionListener(const uno::Reference< awt::XAct
void UnoRadioButtonControl::setLabel( const OUString& rLabel ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= rLabel;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LABEL ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LABEL ), uno::Any(rLabel), true );
}
void UnoRadioButtonControl::setActionCommand( const OUString& rCommand ) throw(uno::RuntimeException, std::exception)
@@ -1301,9 +1285,7 @@ void UnoRadioButtonControl::setActionCommand( const OUString& rCommand ) throw(u
void UnoRadioButtonControl::setState( sal_Bool bOn ) throw(uno::RuntimeException, std::exception)
{
sal_Int16 nState = bOn ? 1 : 0;
- uno::Any aAny;
- aAny <<= nState;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ), uno::Any(nState), true );
}
sal_Bool UnoRadioButtonControl::getState() throw(uno::RuntimeException, std::exception)
@@ -1316,9 +1298,7 @@ sal_Bool UnoRadioButtonControl::getState() throw(uno::RuntimeException, std::exc
void UnoRadioButtonControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= (sal_Int16)rEvent.Selected;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ), aAny, false );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ), uno::Any((sal_Int16)rEvent.Selected), false );
// compatibility:
// in OOo 1.0.x, when the user clicked a radio button in a group of buttons, this resulted
@@ -1541,16 +1521,12 @@ void UnoCheckBoxControl::setActionCommand( const OUString& rCommand ) throw(uno:
void UnoCheckBoxControl::setLabel( const OUString& rLabel ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= rLabel;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LABEL ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LABEL ), uno::Any(rLabel), true );
}
void UnoCheckBoxControl::setState( short n ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= (sal_Int16)n;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ), uno::Any((sal_Int16) n), true );
}
short UnoCheckBoxControl::getState() throw(uno::RuntimeException, std::exception)
@@ -1563,16 +1539,12 @@ short UnoCheckBoxControl::getState() throw(uno::RuntimeException, std::exception
void UnoCheckBoxControl::enableTriState( sal_Bool b ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= b;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TRISTATE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TRISTATE ), uno::Any(b), true );
}
void UnoCheckBoxControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= (sal_Int16)rEvent.Selected;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ), aAny, false );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ), uno::Any((sal_Int16) rEvent.Selected), false );
if ( maItemListeners.getLength() )
maItemListeners.itemStateChanged( rEvent );
@@ -1635,21 +1607,15 @@ uno::Any UnoControlFixedHyperlinkModel::ImplGetDefaultValue( sal_uInt16 nPropId
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString( "com.sun.star.awt.UnoControlFixedHyperlink" );
- return aAny;
+ return uno::Any( OUString( "com.sun.star.awt.UnoControlFixedHyperlink" ) );
}
else if ( nPropId == BASEPROPERTY_BORDER )
{
- uno::Any aAny;
- aAny <<= (sal_Int16)0;
- return aAny;
+ return uno::Any((sal_Int16) 0);
}
else if ( nPropId == BASEPROPERTY_URL )
{
- uno::Any aAny;
- aAny <<= OUString();
- return aAny;
+ return uno::Any( OUString() );
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
@@ -1720,9 +1686,7 @@ sal_Bool UnoFixedHyperlinkControl::isTransparent() throw(uno::RuntimeException,
void UnoFixedHyperlinkControl::setText( const OUString& Text ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Text;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LABEL ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LABEL ), uno::Any(Text), true );
}
OUString UnoFixedHyperlinkControl::getText() throw(uno::RuntimeException, std::exception)
@@ -1732,9 +1696,7 @@ OUString UnoFixedHyperlinkControl::getText() throw(uno::RuntimeException, std::e
void UnoFixedHyperlinkControl::setURL( const OUString& URL ) throw(css::uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= URL;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_URL ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_URL ), uno::Any(URL), true );
}
OUString UnoFixedHyperlinkControl::getURL( ) throw(css::uno::RuntimeException, std::exception)
@@ -1744,9 +1706,7 @@ OUString UnoFixedHyperlinkControl::getURL( ) throw(css::uno::RuntimeException,
void UnoFixedHyperlinkControl::setAlignment( short nAlign ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= (sal_Int16)nAlign;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_ALIGN ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_ALIGN ), uno::Any((sal_Int16) nAlign), true );
}
short UnoFixedHyperlinkControl::getAlignment() throw(uno::RuntimeException, std::exception)
@@ -1838,15 +1798,11 @@ uno::Any UnoControlFixedTextModel::ImplGetDefaultValue( sal_uInt16 nPropId ) con
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlFixedText );
- return aAny;
+ return uno::Any( OUString::createFromAscii( szServiceName_UnoControlFixedText ) );
}
else if ( nPropId == BASEPROPERTY_BORDER )
{
- uno::Any aAny;
- aAny <<= (sal_Int16)0;
- return aAny;
+ return uno::Any((sal_Int16)0);
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
@@ -1933,9 +1889,7 @@ sal_Bool UnoFixedTextControl::isTransparent() throw(uno::RuntimeException, std::
void UnoFixedTextControl::setText( const OUString& Text ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Text;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LABEL ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LABEL ), uno::Any(Text), true );
}
OUString UnoFixedTextControl::getText() throw(uno::RuntimeException, std::exception)
@@ -1945,9 +1899,7 @@ OUString UnoFixedTextControl::getText() throw(uno::RuntimeException, std::except
void UnoFixedTextControl::setAlignment( short nAlign ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= (sal_Int16)nAlign;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_ALIGN ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_ALIGN ), uno::Any((sal_Int16) nAlign), true );
}
short UnoFixedTextControl::getAlignment() throw(uno::RuntimeException, std::exception)
@@ -2027,9 +1979,7 @@ uno::Any UnoControlGroupBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) cons
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlGroupBox );
- return aAny;
+ return uno::Any(OUString::createFromAscii( szServiceName_UnoControlGroupBox ) );
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
@@ -2274,9 +2224,7 @@ uno::Any UnoControlListBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlListBox );
- return aAny;
+ return uno::Any( OUString::createFromAscii( szServiceName_UnoControlListBox ) );
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
@@ -2322,9 +2270,7 @@ void SAL_CALL UnoControlListBoxModel::setFastPropertyValue_NoBroadcast( sal_Int3
{
// reset selection
uno::Sequence<sal_Int16> aSeq;
- uno::Any aAny;
- aAny <<= aSeq;
- setDependentFastPropertyValue( BASEPROPERTY_SELECTEDITEMS, aAny );
+ setDependentFastPropertyValue( BASEPROPERTY_SELECTEDITEMS, uno::Any(aSeq) );
if ( !m_xData->m_bSettingLegacyProperty )
{
@@ -2734,9 +2680,7 @@ void UnoListBoxControl::ImplUpdateSelectedItemsProperty()
DBG_ASSERT( xListBox.is(), "XListBox?" );
uno::Sequence<sal_Int16> aSeq = xListBox->getSelectedItemsPos();
- uno::Any aAny;
- aAny <<= aSeq;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SELECTEDITEMS ), aAny, false );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_SELECTEDITEMS ), uno::Any(aSeq), false );
}
}
@@ -2844,9 +2788,7 @@ void UnoListBoxControl::addItems( const uno::Sequence< OUString>& aItems, sal_In
for ( n = nPos; n < nOldLen; n++ )
pNewData[nNewItems+n] = pOldData[n];
- uno::Any aAny;
- aAny <<= aNewSeq;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRINGITEMLIST ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRINGITEMLIST ), uno::Any(aNewSeq), true );
}
void UnoListBoxControl::removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(uno::RuntimeException, std::exception)
@@ -2875,9 +2817,7 @@ void UnoListBoxControl::removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(un
for ( n = nPos; n < (nOldLen-nCount); n++ )
pNewData[n] = pOldData[n+nCount];
- uno::Any aAny;
- aAny <<= aNewSeq;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRINGITEMLIST ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRINGITEMLIST ), uno::Any(aNewSeq), true );
}
}
@@ -2993,9 +2933,7 @@ void UnoListBoxControl::makeVisible( sal_Int16 nEntry ) throw(uno::RuntimeExcept
void UnoListBoxControl::setDropDownLineCount( sal_Int16 nLines ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= (sal_Int16)nLines;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LINECOUNT ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LINECOUNT ), uno::Any((sal_Int16) nLines), true );
}
sal_Int16 UnoListBoxControl::getDropDownLineCount() throw(uno::RuntimeException, std::exception)
@@ -3010,9 +2948,7 @@ sal_Bool UnoListBoxControl::isMutipleMode() throw(uno::RuntimeException, std::ex
void UnoListBoxControl::setMultipleMode( sal_Bool bMulti ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= bMulti;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MULTISELECTION ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_MULTISELECTION ), uno::Any(bMulti), true );
}
void UnoListBoxControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw(uno::RuntimeException, std::exception)
@@ -3213,9 +3149,7 @@ uno::Any UnoControlComboBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) cons
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlComboBox );
- return aAny;
+ return uno::Any( OUString::createFromAscii( szServiceName_UnoControlComboBox ) );
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
@@ -3479,9 +3413,7 @@ void UnoComboBoxControl::addItems( const uno::Sequence< OUString>& aItems, sal_I
for ( n = nPos; n < nOldLen; n++ )
pNewData[nNewItems+n] = pOldData[n];
- uno::Any aAny;
- aAny <<= aNewSeq;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRINGITEMLIST ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRINGITEMLIST ), Any(aNewSeq), true );
}
void UnoComboBoxControl::removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(uno::RuntimeException, std::exception)
@@ -3510,9 +3442,7 @@ void UnoComboBoxControl::removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(u
for ( n = nPos; n < (nOldLen-nCount); n++ )
pNewData[n] = pOldData[n+nCount];
- uno::Any aAny;
- aAny <<= aNewSeq;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRINGITEMLIST ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRINGITEMLIST ), uno::Any(aNewSeq), true );
}
}
@@ -3545,9 +3475,7 @@ uno::Sequence< OUString> UnoComboBoxControl::getItems() throw(uno::RuntimeExcept
void UnoComboBoxControl::setDropDownLineCount( sal_Int16 nLines ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= nLines;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LINECOUNT ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LINECOUNT ), uno::Any(nLines), true );
}
sal_Int16 UnoComboBoxControl::getDropDownLineCount() throw(uno::RuntimeException, std::exception)
@@ -3673,9 +3601,7 @@ uno::Any UnoControlDateFieldModel::ImplGetDefaultValue( sal_uInt16 nPropId ) con
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlDateField );
- return aAny;
+ return uno::Any( OUString::createFromAscii( szServiceName_UnoControlDateField ) );
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
@@ -3809,9 +3735,7 @@ void UnoDateFieldControl::textChanged( const awt::TextEvent& e ) throw(uno::Runt
void UnoDateFieldControl::setDate( const util::Date& Date ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Date;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DATE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DATE ), uno::Any(Date), true );
}
util::Date UnoDateFieldControl::getDate() throw(uno::RuntimeException, std::exception)
@@ -3821,9 +3745,7 @@ util::Date UnoDateFieldControl::getDate() throw(uno::RuntimeException, std::exce
void UnoDateFieldControl::setMin( const util::Date& Date ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Date;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DATEMIN ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DATEMIN ), uno::Any(Date), true );
}
util::Date UnoDateFieldControl::getMin() throw(uno::RuntimeException, std::exception)
@@ -3833,9 +3755,7 @@ util::Date UnoDateFieldControl::getMin() throw(uno::RuntimeException, std::excep
void UnoDateFieldControl::setMax( const util::Date& Date ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Date;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DATEMAX ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DATEMAX ), uno::Any(Date), true );
}
util::Date UnoDateFieldControl::getMax() throw(uno::RuntimeException, std::exception)
@@ -3910,9 +3830,7 @@ sal_Bool UnoDateFieldControl::isEmpty() throw(uno::RuntimeException, std::except
void UnoDateFieldControl::setStrictFormat( sal_Bool bStrict ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= bStrict;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRICTFORMAT ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRICTFORMAT ), uno::Any(bStrict), true );
}
sal_Bool UnoDateFieldControl::isStrictFormat() throw(uno::RuntimeException, std::exception)
@@ -3962,9 +3880,7 @@ uno::Any UnoControlTimeFieldModel::ImplGetDefaultValue( sal_uInt16 nPropId ) con
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlTimeField );
- return aAny;
+ return uno::Any( OUString::createFromAscii( szServiceName_UnoControlTimeField ) );
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
@@ -4072,9 +3988,7 @@ void UnoTimeFieldControl::textChanged( const awt::TextEvent& e ) throw(uno::Runt
void UnoTimeFieldControl::setTime( const util::Time& Time ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Time;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TIME ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TIME ), Any(Time), true );
}
util::Time UnoTimeFieldControl::getTime() throw(uno::RuntimeException, std::exception)
@@ -4084,9 +3998,7 @@ util::Time UnoTimeFieldControl::getTime() throw(uno::RuntimeException, std::exce
void UnoTimeFieldControl::setMin( const util::Time& Time ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Time;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TIMEMIN ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TIMEMIN ), uno::Any(Time), true );
}
util::Time UnoTimeFieldControl::getMin() throw(uno::RuntimeException, std::exception)
@@ -4096,9 +4008,7 @@ util::Time UnoTimeFieldControl::getMin() throw(uno::RuntimeException, std::excep
void UnoTimeFieldControl::setMax( const util::Time& Time ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Time;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TIMEMAX ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_TIMEMAX ), uno::Any(Time), true );
}
util::Time UnoTimeFieldControl::getMax() throw(uno::RuntimeException, std::exception)
@@ -4158,9 +4068,7 @@ sal_Bool UnoTimeFieldControl::isEmpty() throw(uno::RuntimeException, std::except
void UnoTimeFieldControl::setStrictFormat( sal_Bool bStrict ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= bStrict;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRICTFORMAT ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRICTFORMAT ), uno::Any(bStrict), true );
}
sal_Bool UnoTimeFieldControl::isStrictFormat() throw(uno::RuntimeException, std::exception)
@@ -4210,9 +4118,7 @@ uno::Any UnoControlNumericFieldModel::ImplGetDefaultValue( sal_uInt16 nPropId )
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlNumericField );
- return aAny;
+ return uno::Any( OUString::createFromAscii( szServiceName_UnoControlNumericField ) );
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
@@ -4303,9 +4209,7 @@ void UnoNumericFieldControl::createPeer( const uno::Reference< awt::XToolkit > &
void UnoNumericFieldControl::textChanged( const awt::TextEvent& e ) throw(uno::RuntimeException, std::exception)
{
uno::Reference < awt::XNumericField > xField( getPeer(), uno::UNO_QUERY );
- uno::Any aAny;
- aAny <<= xField->getValue();
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUE_DOUBLE ), aAny, false );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUE_DOUBLE ), uno::Any(xField->getValue()), false );
if ( GetTextListeners().getLength() )
GetTextListeners().textChanged( e );
@@ -4313,9 +4217,7 @@ void UnoNumericFieldControl::textChanged( const awt::TextEvent& e ) throw(uno::R
void UnoNumericFieldControl::setValue( double Value ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Value;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUE_DOUBLE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUE_DOUBLE ), uno::Any(Value), true );
}
double UnoNumericFieldControl::getValue() throw(uno::RuntimeException, std::exception)
@@ -4325,9 +4227,7 @@ double UnoNumericFieldControl::getValue() throw(uno::RuntimeException, std::exce
void UnoNumericFieldControl::setMin( double Value ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Value;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUEMIN_DOUBLE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUEMIN_DOUBLE ), uno::Any(Value), true );
}
double UnoNumericFieldControl::getMin() throw(uno::RuntimeException, std::exception)
@@ -4337,9 +4237,7 @@ double UnoNumericFieldControl::getMin() throw(uno::RuntimeException, std::except
void UnoNumericFieldControl::setMax( double Value ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Value;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUEMAX_DOUBLE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUEMAX_DOUBLE ), uno::Any(Value), true );
}
double UnoNumericFieldControl::getMax() throw(uno::RuntimeException, std::exception)
@@ -4379,9 +4277,7 @@ double UnoNumericFieldControl::getLast() throw(uno::RuntimeException, std::excep
void UnoNumericFieldControl::setStrictFormat( sal_Bool bStrict ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= bStrict;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRICTFORMAT ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRICTFORMAT ), uno::Any(bStrict), true );
}
sal_Bool UnoNumericFieldControl::isStrictFormat() throw(uno::RuntimeException, std::exception)
@@ -4407,9 +4303,7 @@ css::uno::Sequence<OUString> UnoNumericFieldControl::getSupportedServiceNames()
void UnoNumericFieldControl::setSpinSize( double Digits ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Digits;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUESTEP_DOUBLE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUESTEP_DOUBLE ), uno::Any(Digits), true );
}
double UnoNumericFieldControl::getSpinSize() throw(uno::RuntimeException, std::exception)
@@ -4419,9 +4313,7 @@ double UnoNumericFieldControl::getSpinSize() throw(uno::RuntimeException, std::e
void UnoNumericFieldControl::setDecimalDigits( sal_Int16 Digits ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Digits;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DECIMALACCURACY ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DECIMALACCURACY ), uno::Any(Digits), true );
}
sal_Int16 UnoNumericFieldControl::getDecimalDigits() throw(uno::RuntimeException, std::exception)
@@ -4455,15 +4347,11 @@ uno::Any UnoControlCurrencyFieldModel::ImplGetDefaultValue( sal_uInt16 nPropId )
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlCurrencyField );
- return aAny;
+ return uno::Any( OUString::createFromAscii( szServiceName_UnoControlCurrencyField ) );
}
if ( nPropId == BASEPROPERTY_CURSYM_POSITION )
{
- uno::Any aAny;
- aAny <<= false;
- return aAny;
+ return uno::Any(false);
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
@@ -4553,9 +4441,7 @@ void UnoCurrencyFieldControl::createPeer( const uno::Reference< awt::XToolkit >
void UnoCurrencyFieldControl::textChanged( const awt::TextEvent& e ) throw(uno::RuntimeException, std::exception)
{
uno::Reference < awt::XCurrencyField > xField( getPeer(), uno::UNO_QUERY );
- uno::Any aAny;
- aAny <<= xField->getValue();
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUE_DOUBLE ), aAny, false );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUE_DOUBLE ), uno::Any(xField->getValue()), false );
if ( GetTextListeners().getLength() )
GetTextListeners().textChanged( e );
@@ -4563,9 +4449,7 @@ void UnoCurrencyFieldControl::textChanged( const awt::TextEvent& e ) throw(uno::
void UnoCurrencyFieldControl::setValue( double Value ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Value;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUE_DOUBLE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUE_DOUBLE ), Any(Value), true );
}
double UnoCurrencyFieldControl::getValue() throw(uno::RuntimeException, std::exception)
@@ -4575,9 +4459,7 @@ double UnoCurrencyFieldControl::getValue() throw(uno::RuntimeException, std::exc
void UnoCurrencyFieldControl::setMin( double Value ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Value;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUEMIN_DOUBLE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUEMIN_DOUBLE ), uno::Any(Value), true );
}
double UnoCurrencyFieldControl::getMin() throw(uno::RuntimeException, std::exception)
@@ -4587,9 +4469,7 @@ double UnoCurrencyFieldControl::getMin() throw(uno::RuntimeException, std::excep
void UnoCurrencyFieldControl::setMax( double Value ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Value;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUEMAX_DOUBLE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUEMAX_DOUBLE ), uno::Any(Value), true );
}
double UnoCurrencyFieldControl::getMax() throw(uno::RuntimeException, std::exception)
@@ -4629,9 +4509,7 @@ double UnoCurrencyFieldControl::getLast() throw(uno::RuntimeException, std::exce
void UnoCurrencyFieldControl::setStrictFormat( sal_Bool bStrict ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= bStrict;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRICTFORMAT ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRICTFORMAT ), uno::Any(bStrict), true );
}
sal_Bool UnoCurrencyFieldControl::isStrictFormat() throw(uno::RuntimeException, std::exception)
@@ -4658,9 +4536,7 @@ UnoCurrencyFieldControl::getSupportedServiceNames()
void UnoCurrencyFieldControl::setSpinSize( double Digits ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Digits;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUESTEP_DOUBLE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_VALUESTEP_DOUBLE ), uno::Any(Digits), true );
}
double UnoCurrencyFieldControl::getSpinSize() throw(uno::RuntimeException, std::exception)
@@ -4670,9 +4546,7 @@ double UnoCurrencyFieldControl::getSpinSize() throw(uno::RuntimeException, std::
void UnoCurrencyFieldControl::setDecimalDigits( sal_Int16 Digits ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= Digits;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DECIMALACCURACY ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_DECIMALACCURACY ), uno::Any(Digits), true );
}
sal_Int16 UnoCurrencyFieldControl::getDecimalDigits() throw(uno::RuntimeException, std::exception)
@@ -4706,9 +4580,7 @@ uno::Any UnoControlPatternFieldModel::ImplGetDefaultValue( sal_uInt16 nPropId )
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlPatternField );
- return aAny;
+ return uno::Any( OUString::createFromAscii( szServiceName_UnoControlPatternField ) );
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
@@ -4820,11 +4692,8 @@ OUString UnoPatternFieldControl::getString() throw(uno::RuntimeException, std::e
void UnoPatternFieldControl::setMasks( const OUString& EditMask, const OUString& LiteralMask ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= EditMask;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_EDITMASK ), aAny, true );
- aAny <<= LiteralMask;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LITERALMASK ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_EDITMASK ), uno::Any(EditMask), true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LITERALMASK ), uno::Any(LiteralMask), true );
}
void UnoPatternFieldControl::getMasks( OUString& EditMask, OUString& LiteralMask ) throw(uno::RuntimeException, std::exception)
@@ -4835,9 +4704,7 @@ void UnoPatternFieldControl::getMasks( OUString& EditMask, OUString& LiteralMask
void UnoPatternFieldControl::setStrictFormat( sal_Bool bStrict ) throw(uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= bStrict;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRICTFORMAT ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STRICTFORMAT ), uno::Any(bStrict), true );
}
sal_Bool UnoPatternFieldControl::isStrictFormat() throw(uno::RuntimeException, std::exception)
@@ -4899,9 +4766,7 @@ uno::Any UnoControlProgressBarModel::ImplGetDefaultValue( sal_uInt16 nPropId ) c
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlProgressBar );
- return aAny;
+ return uno::Any( OUString::createFromAscii( szServiceName_UnoControlProgressBar ) );
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
@@ -4980,23 +4845,17 @@ IMPL_XTYPEPROVIDER_END
// css::awt::XProgressBar
void UnoProgressBarControl::setForegroundColor( sal_Int32 nColor ) throw(css::uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= nColor;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_FILLCOLOR ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_FILLCOLOR ), uno::Any(nColor), true );
}
void UnoProgressBarControl::setBackgroundColor( sal_Int32 nColor ) throw(css::uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= nColor;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_BACKGROUNDCOLOR ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_BACKGROUNDCOLOR ), uno::Any(nColor), true );
}
void UnoProgressBarControl::setValue( sal_Int32 nValue ) throw(css::uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= nValue;
- ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_PROGRESSVALUE ), aAny, true );
+ ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_PROGRESSVALUE ), uno::Any(nValue), true );
}
void UnoProgressBarControl::setRange( sal_Int32 nMin, sal_Int32 nMax ) throw(css::uno::RuntimeException, std::exception )
@@ -5077,9 +4936,7 @@ uno::Any UnoControlFixedLineModel::ImplGetDefaultValue( sal_uInt16 nPropId ) con
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
{
- uno::Any aAny;
- aAny <<= OUString::createFromAscii( szServiceName_UnoControlFixedLine );
- return aAny;
+ return uno::Any( OUString::createFromAscii( szServiceName_UnoControlFixedLine ) );
}
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx
index f386d14e69ca..f6961b1b2e87 100644
--- a/ucb/source/core/FileAccess.cxx
+++ b/ucb/source/core/FileAccess.cxx
@@ -347,9 +347,7 @@ void OFileAccess::setReadOnly( const OUString& FileURL, sal_Bool bReadOnly )
{
INetURLObject aURLObj( FileURL, INetProtocol::File );
ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
- Any aAny;
- aAny <<= bReadOnly;
- aCnt.setPropertyValue("IsReadOnly", aAny );
+ aCnt.setPropertyValue("IsReadOnly", Any(bReadOnly) );
}
void OFileAccess::createFolder( const OUString& NewFolderURL )
@@ -759,9 +757,7 @@ void OFileAccess::setHidden( const OUString& FileURL, sal_Bool bHidden )
{
INetURLObject aURLObj( FileURL, INetProtocol::File );
ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() );
- Any aAny;
- aAny <<= bHidden;
- aCnt.setPropertyValue("IsHidden", aAny );
+ aCnt.setPropertyValue("IsHidden", Any(bHidden) );
}
}; // namespace end
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx
index 1f34f8fdea68..6b88bb57dc8f 100644
--- a/ucb/source/ucp/file/filglob.cxx
+++ b/ucb/source/ucp/file/filglob.cxx
@@ -263,16 +263,13 @@ namespace fileaccess {
{
IllegalArgumentException excep;
excep.ArgumentPosition = 0;
- aAny <<= excep;
- cancelCommandExecution(
- aAny,xEnv);
+ cancelCommandExecution(Any(excep), xEnv);
}
else if( errorCode == TASKHANDLING_UNSUPPORTED_OPEN_MODE )
{
UnsupportedOpenModeException excep;
excep.Mode = sal::static_int_cast< sal_Int16 >(minorCode);
- aAny <<= excep;
- cancelCommandExecution( aAny,xEnv );
+ cancelCommandExecution( Any(excep),xEnv );
}
else if(errorCode == TASKHANDLING_DELETED_STATE_IN_OPEN_COMMAND ||
errorCode == TASKHANDLING_INSERTED_STATE_IN_OPEN_COMMAND ||
@@ -554,8 +551,7 @@ namespace fileaccess {
excep.Classification = InteractionClassification_ERROR;
excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
excep.Message = "file exists and overwrite forbidden";
- aAny <<= excep;
- cancelCommandExecution( aAny,xEnv );
+ cancelCommandExecution( Any(excep), xEnv );
}
else if( errorCode == TASKHANDLING_INVALID_NAME_MKDIR )
{
@@ -579,8 +575,7 @@ namespace fileaccess {
if(isHandled)
throw excep;
else {
- aAny <<= excep;
- cancelCommandExecution( aAny,xEnv );
+ cancelCommandExecution( Any(excep), xEnv );
}
// ioErrorCode = IOErrorCode_INVALID_CHARACTER;
// cancelCommandExecution(
@@ -600,8 +595,7 @@ namespace fileaccess {
if(isHandled)
throw excep;
else {
- aAny <<= excep;
- cancelCommandExecution( aAny,xEnv );
+ cancelCommandExecution( Any(excep), xEnv );
}
// ioErrorCode = IOErrorCode_ALREADY_EXISTING;
// cancelCommandExecution(
@@ -853,9 +847,8 @@ namespace fileaccess {
excep.Classification = InteractionClassification_ERROR;
excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
excep.Message = "name clash during copy or move";
- aAny <<= excep;
- cancelCommandExecution(aAny,xEnv);
+ cancelCommandExecution(Any(excep), xEnv);
}
else if( errorCode == TASKHANDLING_NAMECLASHSUPPORT_FOR_MOVE ||
errorCode == TASKHANDLING_NAMECLASHSUPPORT_FOR_COPY )
@@ -865,8 +858,7 @@ namespace fileaccess {
excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
excep.Message = "name clash value not supported during copy or move";
- aAny <<= excep;
- cancelCommandExecution(aAny,xEnv);
+ cancelCommandExecution(Any(excep), xEnv);
}
else
{
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index 8dfd07273e8a..20222bbadf71 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -752,16 +752,12 @@ uno::Any SAL_CALL XResultSet_impl::getPropertyValue(
{
if( PropertyName == "IsRowCountFinal" )
{
- uno::Any aAny;
- aAny <<= m_bRowCountFinal;
- return aAny;
+ return uno::Any(m_bRowCountFinal);
}
else if ( PropertyName == "RowCount" )
{
- uno::Any aAny;
sal_Int32 count = sal::static_int_cast<sal_Int32>(m_aItems.size());
- aAny <<= count;
- return aAny;
+ return uno::Any(count);
}
else
throw beans::UnknownPropertyException( THROW_WHERE );
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx
index 5eb00115f356..09d2184b9c1c 100644
--- a/ucb/source/ucp/file/prov.cxx
+++ b/ucb/source/ucp/file/prov.cxx
@@ -456,21 +456,15 @@ FileProvider::getPropertyValue(
initProperties();
if( aPropertyName == "FileSystemNotation" )
{
- Any aAny;
- aAny <<= m_FileSystemNotation;
- return aAny;
+ return Any(m_FileSystemNotation);
}
else if( aPropertyName == "HomeDirectory" )
{
- Any aAny;
- aAny <<= m_HomeDirectory;
- return aAny;
+ return Any(m_HomeDirectory);
}
else if( aPropertyName == "HostName" )
{
- Any aAny;
- aAny <<= m_HostName;
- return aAny;
+ return Any(m_HostName);
}
else
throw UnknownPropertyException( THROW_WHERE );
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index 46152804180b..f422ca33a02a 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -294,13 +294,11 @@ shell::shell( const uno::Reference< uno::XComponentContext >& rxContext,
// ContentType
- uno::Any aAny;
- aAny <<= OUString();
m_aDefaultProperties.insert( MyProperty( false,
ContentType,
-1 ,
cppu::UnoType<OUString>::get(),
- aAny,
+ uno::Any(OUString()),
beans::PropertyState_DEFAULT_VALUE,
beans::PropertyAttribute::MAYBEVOID
| beans::PropertyAttribute::BOUND
@@ -2203,7 +2201,6 @@ void SAL_CALL
shell::commit( const shell::ContentMap::iterator& it,
const osl::FileStatus& aFileStatus )
{
- uno::Any aAny;
shell::PropertySet::iterator it1;
if( it->second.properties == nullptr )
@@ -2219,8 +2216,7 @@ shell::commit( const shell::ContentMap::iterator& it,
{
if( aFileStatus.isValid( osl_FileStatus_Mask_FileName ) )
{
- aAny <<= aFileStatus.getFileName();
- it1->setValue( aAny );
+ it1->setValue( uno::Any(aFileStatus.getFileName()) );
}
}
@@ -2229,8 +2225,7 @@ shell::commit( const shell::ContentMap::iterator& it,
{
if( aFileStatus.isValid( osl_FileStatus_Mask_FileURL ) )
{
- aAny <<= aFileStatus.getFileURL();
- it1->setValue( aAny );
+ it1->setValue( uno::Any(aFileStatus.getFileURL()) );
}
}
@@ -2327,8 +2322,7 @@ shell::commit( const shell::ContentMap::iterator& it,
}
else
{
- bool dummy = false;
- aAny <<= dummy;
+ uno::Any aAny(false);
it1 = properties.find( MyProperty( IsRemote ) );
if( it1 != properties.end() )
it1->setValue( aAny );
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 1eb43c28b1e9..95021354a093 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -742,8 +742,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand,
MissingPropertiesException excep;
excep.Properties.realloc(1);
excep.Properties[0] = "Title";
- Any aAny; aAny <<= excep;
- ucbhelper::cancelCommandExecution(aAny,Env);
+ ucbhelper::cancelCommandExecution(Any(excep), Env);
}
if(m_bInserted &&
@@ -751,8 +750,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand,
!aInsertCommand.Data.is())
{
MissingInputStreamException excep;
- Any aAny; aAny <<= excep;
- ucbhelper::cancelCommandExecution(aAny,Env);
+ ucbhelper::cancelCommandExecution(Any(excep), Env);
}
bool bReplace(aInsertCommand.ReplaceExisting);
@@ -770,9 +768,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand,
// Deprecated, not used anymore:
NameClashException excep;
excep.Name = m_aFTPURL.child();
- Any aAny;
- aAny <<= excep;
- ucbhelper::cancelCommandExecution(aAny,Env);
+ ucbhelper::cancelCommandExecution(Any(excep), Env);
} else if(e.code() == FOLDER_MIGHT_EXIST_DURING_INSERT ||
e.code() == FILE_MIGHT_EXIST_DURING_INSERT) {
// Interact
@@ -784,9 +780,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand,
excep.NameClash = 0; //NameClash::ERROR;
if(!xInt.is()) {
- Any aAny;
- aAny <<= excep;
- ucbhelper::cancelCommandExecution(aAny,Env);
+ ucbhelper::cancelCommandExecution(Any(excep), Env);
}
XInteractionRequestImpl request;
diff --git a/ucb/source/ucp/ftp/ftpintreq.cxx b/ucb/source/ucp/ftp/ftpintreq.cxx
index 2819fc6b0eba..f8f30fe9ebc1 100644
--- a/ucb/source/ucp/ftp/ftpintreq.cxx
+++ b/ucb/source/ucp/ftp/ftpintreq.cxx
@@ -70,11 +70,9 @@ XInteractionRequestImpl::XInteractionRequestImpl()
uno::Sequence<uno::Reference<task::XInteractionContinuation>> continuations{
Reference<XInteractionContinuation>(p1),
Reference<XInteractionContinuation>(p2) };
- Any aAny;
UnsupportedNameClashException excep;
excep.NameClash = NameClash::ERROR;
- aAny <<= excep;
- m_xRequest.set(new ::comphelper::OInteractionRequest(aAny, continuations));
+ m_xRequest.set(new ::comphelper::OInteractionRequest(Any(excep), continuations));
}
bool XInteractionRequestImpl::approved() const
diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.cxx b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
index 207912cddaf1..66990249399f 100644
--- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx
+++ b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
@@ -531,16 +531,12 @@ uno::Any SAL_CALL ResultSetBase::getPropertyValue(
{
if( PropertyName == "IsRowCountFinal" )
{
- uno::Any aAny;
- aAny <<= m_bRowCountFinal;
- return aAny;
+ return uno::Any(m_bRowCountFinal);
}
else if ( PropertyName == "RowCount" )
{
- uno::Any aAny;
sal_Int32 count = m_aItems.size();
- aAny <<= count;
- return aAny;
+ return uno::Any(count);
}
else
throw beans::UnknownPropertyException();
diff --git a/vbahelper/source/vbahelper/vbapagesetupbase.cxx b/vbahelper/source/vbahelper/vbapagesetupbase.cxx
index 1c203cfcb18a..85ce43bbcfb0 100644
--- a/vbahelper/source/vbahelper/vbapagesetupbase.cxx
+++ b/vbahelper/source/vbahelper/vbapagesetupbase.cxx
@@ -77,8 +77,7 @@ void SAL_CALL VbaPageSetupBase::setTopMargin( double margin ) throw (css::uno::R
topMargin -= headerHeight;
}
- aValue <<= topMargin;
- mxPageProps->setPropertyValue( "TopMargin" , aValue );
+ mxPageProps->setPropertyValue( "TopMargin" , uno::Any(topMargin) );
}
catch( uno::Exception& )
{
@@ -133,8 +132,7 @@ void SAL_CALL VbaPageSetupBase::setBottomMargin( double margin ) throw (css::uno
bottomMargin -= footerHeight;
}
- aValue <<= bottomMargin;
- mxPageProps->setPropertyValue( "BottomMargin" , aValue );
+ mxPageProps->setPropertyValue( "BottomMargin", uno::Any(bottomMargin) );
}
catch( uno::Exception& )
{
@@ -161,9 +159,7 @@ void SAL_CALL VbaPageSetupBase::setRightMargin( double margin ) throw (css::uno:
sal_Int32 rightMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
try
{
- uno::Any aValue;
- aValue <<= rightMargin;
- mxPageProps->setPropertyValue( "RightMargin" , aValue );
+ mxPageProps->setPropertyValue( "RightMargin", uno::Any(rightMargin) );
}
catch( uno::Exception& )
{
@@ -191,9 +187,7 @@ void SAL_CALL VbaPageSetupBase::setLeftMargin( double margin ) throw (css::uno::
sal_Int32 leftMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
try
{
- uno::Any aValue;
- aValue <<= leftMargin;
- mxPageProps->setPropertyValue( "LeftMargin" , aValue );
+ mxPageProps->setPropertyValue( "LeftMargin", uno::Any(leftMargin) );
}
catch( uno::Exception& )
{
@@ -220,9 +214,7 @@ void SAL_CALL VbaPageSetupBase::setHeaderMargin( double margin ) throw (css::uno
sal_Int32 headerMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
try
{
- uno::Any aValue;
- aValue <<= headerMargin;
- mxPageProps->setPropertyValue( "TopMargin" , aValue );
+ mxPageProps->setPropertyValue( "TopMargin", uno::Any(headerMargin) );
}
catch( uno::Exception& )
{
@@ -249,9 +241,7 @@ void SAL_CALL VbaPageSetupBase::setFooterMargin( double margin ) throw (css::uno
sal_Int32 footerMargin = Millimeter::getInHundredthsOfOneMillimeter( margin );
try
{
- uno::Any aValue;
- aValue <<= footerMargin;
- mxPageProps->setPropertyValue( "BottomMargin" , aValue );
+ mxPageProps->setPropertyValue( "BottomMargin", uno::Any(footerMargin) );
}
catch( uno::Exception& )
{
@@ -301,10 +291,9 @@ void SAL_CALL VbaPageSetupBase::setOrientation( sal_Int32 orientation ) throw (c
if( switchOrientation )
{
- aValue <<= !isLandscape;
uno::Any aHeight = mxPageProps->getPropertyValue( "Height" );
uno::Any aWidth = mxPageProps->getPropertyValue( "Width" );
- mxPageProps->setPropertyValue( "IsLandscape" , aValue );
+ mxPageProps->setPropertyValue( "IsLandscape", uno::Any(!isLandscape) );
mxPageProps->setPropertyValue( "Width" , aHeight );
mxPageProps->setPropertyValue( "Height" , aWidth );
}
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index 4a7302f3998b..0d1f6b87e1ce 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -54,13 +54,10 @@ static bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv, co
if ( rTree.endsWith("/") )
--nTokenCount;
- Any aAny;
- aAny <<= rTree.getToken(i++, '/');
-
// creation arguments: nodepath
PropertyValue aPathArgument;
aPathArgument.Name = "nodepath";
- aPathArgument.Value = aAny;
+ aPathArgument.Value = Any(rTree.getToken(i++, '/'));
Sequence< Any > aArguments( 1 );
aArguments[ 0 ] <<= aPathArgument;
@@ -113,19 +110,16 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree )
OUString sTree = "/org.openoffice." + rSubTree;
if ( ImpIsTreeAvailable(xCfgProv, sTree) )
{
- Any aAny;
// creation arguments: nodepath
PropertyValue aPathArgument;
- aAny <<= sTree;
aPathArgument.Name = "nodepath";
- aPathArgument.Value = aAny;
+ aPathArgument.Value = Any(sTree);
// creation arguments: commit mode
PropertyValue aModeArgument;
bool bAsynchron = true;
- aAny <<= bAsynchron;
aModeArgument.Name = "lazywrite";
- aModeArgument.Value = aAny;
+ aModeArgument.Value = Any(bAsynchron);
Sequence< Any > aArguments( 2 );
aArguments[ 0 ] <<= aPathArgument;
@@ -355,10 +349,9 @@ void FilterConfigItem::WriteBool( const OUString& rKey, bool bNewValue )
{
if ( bOldValue != bNewValue )
{
- aAny <<= bNewValue;
try
{
- xPropSet->setPropertyValue( rKey, aAny );
+ xPropSet->setPropertyValue( rKey, Any(bNewValue) );
bModified = true;
}
catch ( css::uno::Exception& )
@@ -389,10 +382,9 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue )
{
if ( nOldValue != nNewValue )
{
- aAny <<= nNewValue;
try
{
- xPropSet->setPropertyValue( rKey, aAny );
+ xPropSet->setPropertyValue( rKey, Any(nNewValue) );
bModified = true;
}
catch ( css::uno::Exception& )
diff --git a/vcl/unx/gtk/a11y/atkvalue.cxx b/vcl/unx/gtk/a11y/atkvalue.cxx
index 5e4b943886a3..3e6d0c15aec1 100644
--- a/vcl/unx/gtk/a11y/atkvalue.cxx
+++ b/vcl/unx/gtk/a11y/atkvalue.cxx
@@ -111,9 +111,7 @@ value_wrapper_set_current_value( AtkValue *value,
{
// FIXME - this needs expanding
double aDouble = g_value_get_double( gval );
- uno::Any aAny;
- aAny <<= aDouble;
- return pValue->setCurrentValue( aAny );
+ return pValue->setCurrentValue( uno::Any(aDouble) );
}
}
catch(const uno::Exception&) {
diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx
index abcdc9f680c0..2bb3896be77b 100644
--- a/writerfilter/source/dmapper/FormControlHelper.cxx
+++ b/writerfilter/source/dmapper/FormControlHelper.cxx
@@ -183,25 +183,19 @@ bool FormControlHelper::createCheckbox(uno::Reference<text::XTextRange> const& x
m_pImpl->aSize.Width = nCheckBoxHeight;
m_pImpl->aSize.Height = m_pImpl->aSize.Width;
- uno::Any aAny;
if (!m_pFFData->getStatusText().isEmpty())
{
- aAny <<= m_pFFData->getStatusText();
-
- xPropSet->setPropertyValue("HelpText", aAny);
+ xPropSet->setPropertyValue("HelpText", uno::Any(m_pFFData->getStatusText()));
}
- aAny <<= m_pFFData->getCheckboxChecked();
- xPropSet->setPropertyValue("DefaultState", aAny);
+ xPropSet->setPropertyValue("DefaultState", uno::Any(m_pFFData->getCheckboxChecked()));
if (!m_pFFData->getHelpText().isEmpty())
{
- aAny <<= m_pFFData->getHelpText();
- xPropSet->setPropertyValue("HelpF1Text", aAny);
+ xPropSet->setPropertyValue("HelpF1Text", uno::Any(m_pFFData->getHelpText()));
}
- aAny <<= rControlName;
- xPropSet->setPropertyValue("Name", aAny);
+ xPropSet->setPropertyValue("Name", uno::Any(rControlName));
return true;
}
@@ -323,17 +317,12 @@ bool FormControlHelper::insertControl(uno::Reference<text::XTextRange> const& xT
uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
sal_uInt16 nTmp = text::TextContentAnchorType_AS_CHARACTER;
- aAny <<= nTmp;
-
- xShapeProps->setPropertyValue("AnchorType", aAny);
+ xShapeProps->setPropertyValue("AnchorType", uno::makeAny<sal_uInt16>(nTmp));
nTmp = text::VertOrientation::CENTER;
- aAny <<= nTmp;
- xShapeProps->setPropertyValue("VertOrient", aAny);
-
- aAny <<= xTextRange;
+ xShapeProps->setPropertyValue("VertOrient", uno::makeAny<sal_uInt16>(nTmp));
- xShapeProps->setPropertyValue("TextRange", aAny);
+ xShapeProps->setPropertyValue("TextRange", uno::Any(xTextRange));
uno::Reference<drawing::XControlShape> xControlShape(xShape, uno::UNO_QUERY);
uno::Reference<awt::XControlModel> xControlModel(m_pImpl->rFormComponent, uno::UNO_QUERY);
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 32846edd7c4b..29a212b48688 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -404,8 +404,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
else if (i->first == "fillOpacity" && xPropertySet.is())
{
int opacity = 100 - (i->second.toInt32())*100/65536;
- aAny <<= uno::makeAny(sal_uInt32(opacity));
- xPropertySet->setPropertyValue("FillTransparence", aAny);
+ xPropertySet->setPropertyValue("FillTransparence", uno::Any(sal_uInt32(opacity)));
}
else if (i->first == "lineWidth")
aLineWidth <<= i->second.toInt32()/360;
diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx
index a1411b11752a..5efc82bccf45 100644
--- a/xmlhelp/source/cxxhelp/provider/content.cxx
+++ b/xmlhelp/source/cxxhelp/provider/content.cxx
@@ -473,9 +473,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
uno::Sequence< OUString > seq( 2 );
seq[0] = "Heading";
seq[1] = "FullText";
- uno::Any aAny;
- aAny <<= seq;
- xRow->appendObject( rProp,aAny );
+ xRow->appendObject( rProp, uno::Any(seq) );
}
else if ( rProp.Name == "Order" )
{
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
index 5786b20b9c07..e7d5477e321a 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
@@ -524,16 +524,12 @@ uno::Any SAL_CALL ResultSetBase::getPropertyValue(
{
if( PropertyName == "IsRowCountFinal" )
{
- uno::Any aAny;
- aAny <<= m_bRowCountFinal;
- return aAny;
+ return uno::Any(m_bRowCountFinal);
}
else if ( PropertyName == "RowCount" )
{
- uno::Any aAny;
sal_Int32 count = m_aItems.size();
- aAny <<= count;
- return aAny;
+ return uno::Any(count);
}
else
throw beans::UnknownPropertyException();
diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx
index 56c789284172..f054d4f0e2c7 100644
--- a/xmlhelp/source/treeview/tvfactory.cxx
+++ b/xmlhelp/source/treeview/tvfactory.cxx
@@ -71,13 +71,11 @@ TVFactory::createInstance(
throw( Exception,
RuntimeException, std::exception )
{
- Any aAny;
- aAny <<= OUString();
Sequence< Any > seq( 1 );
seq[0] <<= PropertyValue(
OUString( "nodepath" ),
-1,
- aAny,
+ Any( OUString() ),
PropertyState_DIRECT_VALUE );
return createInstanceWithArguments( aServiceSpecifier,
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index beab51903bd0..da3360a58860 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -536,10 +536,8 @@ TVChildTarget::getByName( const OUString& aName )
if( idx < 0 || Elements.size() <= sal_uInt32( idx ) )
throw NoSuchElementException();
- Any aAny;
cppu::OWeakObject* p = Elements[idx].get();
- aAny <<= Reference< XInterface >( p );
- return aAny;
+ return Any( Reference< XInterface >( p ) );
}
Sequence< OUString > SAL_CALL
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index fa953f59dbc8..bd842f97f946 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -687,9 +687,7 @@ void SchXMLChartContext::EndElement()
{
try
{
- uno::Any aAny;
- aAny <<= maMainTitle;
- xTitleProp->setPropertyValue("String", aAny );
+ xTitleProp->setPropertyValue("String", uno::Any(maMainTitle) );
}
catch(const beans::UnknownPropertyException&)
{
@@ -704,9 +702,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 a21f7a5f8c06..1a7e387f2c36 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 b196291cc725..9faa6e00d019 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 4eb3bbffd12b..1bf31e70dbbc 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -559,11 +559,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()));
@@ -575,9 +572,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));
}
}
}
@@ -1363,9 +1358,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 2b8c995589cf..ce1bd27c3407 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -577,11 +577,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()));
@@ -590,9 +587,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));
}
}
}
@@ -1427,9 +1422,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) );
}
}
}
@@ -1525,11 +1518,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 55f94824b9be..cb19429a244f 100644
--- a/xmloff/source/draw/XMLImageMapContext.cxx
+++ b/xmloff/source/draw/XMLImageMapContext.cxx
@@ -25,7 +25,6 @@
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <com/sun/star/document/XEventsSupplier.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
#include <xmloff/xmltoken.hxx>
@@ -54,7 +53,6 @@ using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::xml::sax::XAttributeList;
using ::com::sun::star::uno::XInterface;
using ::com::sun::star::uno::Any;
-using ::com::sun::star::drawing::PointSequenceSequence;
using ::com::sun::star::document::XEventsSupplier;
@@ -128,21 +126,18 @@ public:
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XIndexContainer> xMap,
+ css::uno::Reference<css::container::XIndexContainer> const & xMap,
const sal_Char* pServiceName);
void StartElement(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) override;
+ const css::uno::Reference<css::xml::sax::XAttributeList >& xAttrList ) override;
void EndElement() override;
SvXMLImportContext *CreateChildContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::xml::sax::XAttributeList> & xAttrList ) override;
+ const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override;
protected:
@@ -151,8 +146,7 @@ protected:
const OUString& rValue);
virtual void Prepare(
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet> & rPropertySet);
+ css::uno::Reference<css::beans::XPropertySet> & rPropertySet);
};
@@ -160,7 +154,7 @@ XMLImageMapObjectContext::XMLImageMapObjectContext(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- Reference<XIndexContainer> xMap,
+ Reference<XIndexContainer> const & xMap,
const sal_Char* pServiceName) :
SvXMLImportContext(rImport, nPrefix, rLocalName),
sBoundary("Boundary"),
@@ -226,9 +220,7 @@ void XMLImageMapObjectContext::EndElement()
Prepare( xMapEntry );
// insert into image map
- Any aAny;
- aAny <<= xMapEntry;
- xImageMap->insertByIndex( xImageMap->getCount(), aAny );
+ xImageMap->insertByIndex( xImageMap->getCount(), Any(xMapEntry) );
}
// else: not valid -> don't create and insert
}
@@ -317,8 +309,7 @@ public:
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XIndexContainer> xMap);
+ css::uno::Reference<css::container::XIndexContainer> const & xMap);
virtual ~XMLImageMapRectangleContext();
@@ -328,8 +319,7 @@ protected:
const OUString& rValue) override;
virtual void Prepare(
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet> & rPropertySet) override;
+ css::uno::Reference<css::beans::XPropertySet> & rPropertySet) override;
};
@@ -337,7 +327,7 @@ XMLImageMapRectangleContext::XMLImageMapRectangleContext(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- Reference<XIndexContainer> xMap) :
+ Reference<XIndexContainer> const & xMap) :
XMLImageMapObjectContext(rImport, nPrefix, rLocalName, xMap,
"com.sun.star.image.ImageMapRectangleObject"),
bXOK(false),
@@ -400,9 +390,7 @@ void XMLImageMapRectangleContext::ProcessAttribute(
void XMLImageMapRectangleContext::Prepare(
Reference<XPropertySet> & rPropertySet)
{
- Any aAny;
- aAny <<= aRectangle;
- rPropertySet->setPropertyValue( sBoundary, aAny );
+ rPropertySet->setPropertyValue( sBoundary, uno::Any(aRectangle) );
// common properties handled by super class
XMLImageMapObjectContext::Prepare(rPropertySet);
@@ -423,8 +411,7 @@ public:
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XIndexContainer> xMap);
+ css::uno::Reference<css::container::XIndexContainer> const & xMap);
virtual ~XMLImageMapPolygonContext();
@@ -434,8 +421,7 @@ protected:
const OUString& rValue) override;
virtual void Prepare(
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet> & rPropertySet) override;
+ css::uno::Reference<css::beans::XPropertySet> & rPropertySet) override;
};
@@ -443,7 +429,7 @@ XMLImageMapPolygonContext::XMLImageMapPolygonContext(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- Reference<XIndexContainer> xMap) :
+ Reference<XIndexContainer> const & xMap) :
XMLImageMapObjectContext(rImport, nPrefix, rLocalName, xMap,
"com.sun.star.image.ImageMapPolygonObject"),
bViewBoxOK(false),
@@ -493,8 +479,7 @@ void XMLImageMapPolygonContext::Prepare(Reference<XPropertySet> & rPropertySet)
uno::Any aAny;
basegfx::tools::B2DPolygonToUnoPointSequence(aPolygon, aPointSequence);
- aAny <<= aPointSequence;
- rPropertySet->setPropertyValue(sPolygon, aAny);
+ rPropertySet->setPropertyValue(sPolygon, Any(aPointSequence));
}
}
@@ -517,8 +502,7 @@ public:
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- ::com::sun::star::uno::Reference<
- ::com::sun::star::container::XIndexContainer> xMap);
+ css::uno::Reference<css::container::XIndexContainer> const & xMap);
virtual ~XMLImageMapCircleContext();
@@ -528,8 +512,7 @@ protected:
const OUString& rValue) override;
virtual void Prepare(
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet> & rPropertySet) override;
+ css::uno::Reference<css::beans::XPropertySet> & rPropertySet) override;
};
@@ -537,7 +520,7 @@ XMLImageMapCircleContext::XMLImageMapCircleContext(
SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- Reference<XIndexContainer> xMap)
+ Reference<XIndexContainer> const & xMap)
: XMLImageMapObjectContext(rImport, nPrefix, rLocalName, xMap,
"com.sun.star.image.ImageMapCircleObject")
, nRadius(0)
@@ -593,13 +576,9 @@ void XMLImageMapCircleContext::Prepare(
Reference<XPropertySet> & rPropertySet)
{
// center (x,y)
- Any aAny;
- aAny <<= aCenter;
- rPropertySet->setPropertyValue( sCenter, aAny );
-
+ rPropertySet->setPropertyValue( sCenter, uno::Any(aCenter) );
// radius
- aAny <<= nRadius;
- rPropertySet->setPropertyValue( sRadius, aAny );
+ rPropertySet->setPropertyValue( sRadius, uno::Any(nRadius) );
// common properties handled by super class
XMLImageMapObjectContext::Prepare(rPropertySet);
diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx
index 0b48378f1331..477aff269c24 100644
--- a/xmloff/source/draw/XMLShapePropertySetContext.cxx
+++ b/xmloff/source/draw/XMLShapePropertySetContext.cxx
@@ -57,10 +57,7 @@ void XMLShapePropertySetContext::EndElement()
pBulletStyle->FillUnoNumRule(xNumRule);
}
- Any aAny;
- aAny <<= xNumRule;
-
- XMLPropertyState aPropState( mnBulletIndex, aAny );
+ XMLPropertyState aPropState( mnBulletIndex, Any(xNumRule) );
mrProperties.push_back( aPropState );
SvXMLPropertySetContext::EndElement();
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 1aae82c862fd..9e4818f5aa0e 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -550,7 +550,6 @@ void XMLAnimationsEffectContext::EndElement()
try
{
rtl::Reference< XMLShapeImportHelper > xShapeImport( GetImport().GetShapeImport() );
- Any aAny;
if( !maShapeId.isEmpty() )
{
@@ -580,16 +579,13 @@ void XMLAnimationsEffectContext::EndElement()
{
if( meKind == XMLE_DIM )
{
- aAny <<= true;
- xSet->setPropertyValue( mpImpl->msDimPrev, aAny );
+ xSet->setPropertyValue( mpImpl->msDimPrev, Any(true) );
- aAny <<= maDimColor;
- xSet->setPropertyValue( mpImpl->msDimColor, aAny );
+ xSet->setPropertyValue( mpImpl->msDimColor, Any(maDimColor) );
}
else if( meKind == XMLE_PLAY )
{
- aAny <<= true;
- xSet->setPropertyValue( mpImpl->msIsAnimation, aAny );
+ xSet->setPropertyValue( mpImpl->msIsAnimation, Any(true) );
// #i42894# speed is not supported for the old group animation fallback, so no need to set it
// aAny <<= meSpeed;
@@ -599,8 +595,7 @@ void XMLAnimationsEffectContext::EndElement()
{
if( meKind == XMLE_HIDE && !mbTextEffect && meEffect == EK_none )
{
- aAny <<= true;
- xSet->setPropertyValue( mpImpl->msDimHide, aAny );
+ xSet->setPropertyValue( mpImpl->msDimHide, Any(true) );
}
else
{
@@ -622,14 +617,9 @@ void XMLAnimationsEffectContext::EndElement()
{
if( xSet.is() )
{
- aAny <<= maSoundURL;
- xSet->setPropertyValue( mpImpl->msSound, aAny );
-
- aAny <<= mbPlayFull;
- xSet->setPropertyValue( mpImpl->msPlayFull, aAny );
-
- aAny <<= true;
- xSet->setPropertyValue( mpImpl->msSoundOn, aAny );
+ xSet->setPropertyValue( mpImpl->msSound, Any(maSoundURL) );
+ xSet->setPropertyValue( mpImpl->msPlayFull, Any(mbPlayFull) );
+ xSet->setPropertyValue( mpImpl->msSoundOn, Any(true) );
}
else
{
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index a614e6767c6c..319b9b109220 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2156,12 +2156,9 @@ void SdXMLExport::_ExportStyles(bool bUsed)
{
Reference< beans::XPropertySetInfo > xInfoSetInfo( xInfoSet->getPropertySetInfo() );
- Any aAny;
-
if( xInfoSetInfo->hasPropertyByName( msPageLayoutNames ) )
{
- aAny <<= maDrawPagesAutoLayoutNames;
- xInfoSet->setPropertyValue( msPageLayoutNames, aAny );
+ xInfoSet->setPropertyValue( msPageLayoutNames, Any(maDrawPagesAutoLayoutNames) );
}
}
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 9dbba4f3ac8d..2413c5c77a9b 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2314,9 +2314,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
aStreamURL = aStreamURL.concat( aStr );
}
- uno::Any aAny;
- aAny <<= aStreamURL;
- xPropSet->setPropertyValue( "GraphicStreamURL", aAny );
+ xPropSet->setPropertyValue( "GraphicStreamURL", uno::Any(aStreamURL) );
}
mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 2000a4c925dd..f13864986e79 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -796,8 +796,7 @@ void ShapeSortContext::moveShape( sal_Int32 nSourcePos, sal_Int32 nDestPos )
if( xPropSet.is() && xPropSet->getPropertySetInfo()->hasPropertyByName( "ZOrder" ) )
{
- aAny <<= nDestPos;
- xPropSet->setPropertyValue( "ZOrder", aAny );
+ xPropSet->setPropertyValue( "ZOrder", uno::Any(nDestPos) );
for( ZOrderHint& rHint : maZOrderList )
{
@@ -950,8 +949,6 @@ void XMLShapeImportHelper::restoreConnections()
{
if( !mpImpl->maConnections.empty() )
{
- uno::Any aAny;
-
const vector<ConnectionHint>::size_type nCount = mpImpl->maConnections.size();
for( vector<ConnectionHint>::size_type i = 0; i < nCount; i++ )
{
@@ -977,12 +974,10 @@ void XMLShapeImportHelper::restoreConnections()
mrImporter.getInterfaceToIdentifierMapper().getReference( rHint.aDestShapeId ), uno::UNO_QUERY );
if( xShape.is() )
{
- aAny <<= xShape;
- xConnector->setPropertyValue( rHint.bStart ? msStartShape : msEndShape, aAny );
+ xConnector->setPropertyValue( rHint.bStart ? msStartShape : msEndShape, uno::Any(xShape) );
sal_Int32 nGlueId = rHint.nDestGlueId < 4 ? rHint.nDestGlueId : getGluePointId( xShape, rHint.nDestGlueId );
- aAny <<= nGlueId;
- xConnector->setPropertyValue( rHint.bStart ? msStartGluePointIndex : msEndGluePointIndex, aAny );
+ xConnector->setPropertyValue( rHint.bStart ? msStartGluePointIndex : msEndGluePointIndex, uno::Any(nGlueId) );
}
// #86637# restore line deltas
diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx
index 105b29004d96..7c5ff8b82423 100644
--- a/xmloff/source/draw/ximp3dobject.cxx
+++ b/xmloff/source/draw/ximp3dobject.cxx
@@ -88,9 +88,7 @@ void SdXML3DObjectContext::StartElement(const uno::Reference< xml::sax::XAttribu
// set parameters
if(mbSetTransform)
{
- uno::Any aAny;
- aAny <<= mxHomMat;
- xPropSet->setPropertyValue("D3DTransformMatrix", aAny);
+ xPropSet->setPropertyValue("D3DTransformMatrix", uno::Any(mxHomMat));
}
// call parent
@@ -190,11 +188,8 @@ void SdXML3DCubeObjectShapeContext::StartElement(const uno::Reference< xml::sax:
aDirection3D.DirectionY = maMaxEdge.getY();
aDirection3D.DirectionZ = maMaxEdge.getZ();
- uno::Any aAny;
- aAny <<= aPosition3D;
- xPropSet->setPropertyValue("D3DPosition", aAny);
- aAny <<= aDirection3D;
- xPropSet->setPropertyValue("D3DSize", aAny);
+ xPropSet->setPropertyValue("D3DPosition", uno::Any(aPosition3D));
+ xPropSet->setPropertyValue("D3DSize", uno::Any(aDirection3D));
}
}
}
@@ -288,11 +283,8 @@ void SdXML3DSphereObjectShapeContext::StartElement(const uno::Reference< xml::sa
aDirection3D.DirectionY = maSize.getY();
aDirection3D.DirectionZ = maSize.getZ();
- uno::Any aAny;
- aAny <<= aPosition3D;
- xPropSet->setPropertyValue("D3DPosition", aAny);
- aAny <<= aDirection3D;
- xPropSet->setPropertyValue("D3DSize", aAny);
+ xPropSet->setPropertyValue("D3DPosition", uno::Any(aPosition3D));
+ xPropSet->setPropertyValue("D3DSize", uno::Any(aDirection3D));
}
}
}
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index 971fda1607fc..afa7658b6c8f 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -352,33 +352,21 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const com::sun::star::uno
// world transformation
if(mbSetTransform)
{
- aAny <<= mxHomMat;
- xPropSet->setPropertyValue("D3DTransformMatrix", aAny);
+ xPropSet->setPropertyValue("D3DTransformMatrix", uno::Any(mxHomMat));
}
// distance
- aAny <<= mnDistance;
- xPropSet->setPropertyValue("D3DSceneDistance", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneDistance", uno::Any(mnDistance));
// focalLength
- aAny <<= mnFocalLength;
- xPropSet->setPropertyValue("D3DSceneFocalLength", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneFocalLength", uno::Any(mnFocalLength));
// shadowSlant
- aAny <<= (sal_Int16)mnShadowSlant;
- xPropSet->setPropertyValue("D3DSceneShadowSlant", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneShadowSlant", uno::Any((sal_Int16)mnShadowSlant));
// shadeMode
- aAny <<= mxShadeMode;
- xPropSet->setPropertyValue("D3DSceneShadeMode", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneShadeMode", uno::Any(mxShadeMode));
// ambientColor
- aAny <<= maAmbientColor;
- xPropSet->setPropertyValue("D3DSceneAmbientColor", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneAmbientColor", uno::Any(maAmbientColor));
// lightingMode
- aAny <<= mbLightingMode;
- xPropSet->setPropertyValue("D3DSceneTwoSidedLighting", aAny);
+ xPropSet->setPropertyValue("D3DSceneTwoSidedLighting", uno::Any(mbLightingMode));
if( !maList.empty() )
{
@@ -472,13 +460,11 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const com::sun::star::uno
aCamGeo.vup.DirectionX = maVUP.getX();
aCamGeo.vup.DirectionY = maVUP.getY();
aCamGeo.vup.DirectionZ = maVUP.getZ();
- aAny <<= aCamGeo;
- xPropSet->setPropertyValue("D3DCameraGeometry", aAny);
+ xPropSet->setPropertyValue("D3DCameraGeometry", uno::Any(aCamGeo));
// #91047# set drawing::ProjectionMode AFTER camera geometry is set
// projection "D3DScenePerspective" drawing::ProjectionMode
- aAny <<= mxPrjMode;
- xPropSet->setPropertyValue("D3DScenePerspective", aAny);
+ xPropSet->setPropertyValue("D3DScenePerspective", uno::Any(mxPrjMode));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 404fa163c20f..04a479165591 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -500,28 +500,13 @@ void SdXMLGenericPageContext::SetPageMaster( OUString& rsPageMasterName )
Reference <beans::XPropertySet> xPropSet(xMasterPage, uno::UNO_QUERY);
if(xPropSet.is())
{
- uno::Any aAny;
-
- aAny <<= pPageMasterContext->GetBorderBottom();
- xPropSet->setPropertyValue("BorderBottom", aAny);
-
- aAny <<= pPageMasterContext->GetBorderLeft();
- xPropSet->setPropertyValue("BorderLeft", aAny);
-
- aAny <<= pPageMasterContext->GetBorderRight();
- xPropSet->setPropertyValue("BorderRight", aAny);
-
- aAny <<= pPageMasterContext->GetBorderTop();
- xPropSet->setPropertyValue("BorderTop", aAny);
-
- aAny <<= pPageMasterContext->GetWidth();
- xPropSet->setPropertyValue("Width", aAny);
-
- aAny <<= pPageMasterContext->GetHeight();
- xPropSet->setPropertyValue("Height", aAny);
-
- aAny <<= pPageMasterContext->GetOrientation();
- xPropSet->setPropertyValue("Orientation", aAny);
+ xPropSet->setPropertyValue("BorderBottom", Any(pPageMasterContext->GetBorderBottom()));
+ xPropSet->setPropertyValue("BorderLeft", Any(pPageMasterContext->GetBorderLeft()));
+ xPropSet->setPropertyValue("BorderRight", Any(pPageMasterContext->GetBorderRight()));
+ xPropSet->setPropertyValue("BorderTop", Any(pPageMasterContext->GetBorderTop()));
+ xPropSet->setPropertyValue("Width", Any(pPageMasterContext->GetWidth()));
+ xPropSet->setPropertyValue("Height", Any(pPageMasterContext->GetHeight()));
+ xPropSet->setPropertyValue("Orientation", Any(pPageMasterContext->GetOrientation()));
}
}
}
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 5383b321651c..a66f068fe998 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -570,7 +570,6 @@ void SdXMLShapeContext::SetTransformation()
}
// now set transformation for this object
- uno::Any aAny;
drawing::HomogenMatrix3 aMatrix;
aMatrix.Line1.Column1 = maUsedTransformation.get(0, 0);
@@ -585,9 +584,7 @@ void SdXMLShapeContext::SetTransformation()
aMatrix.Line3.Column2 = maUsedTransformation.get(2, 1);
aMatrix.Line3.Column3 = maUsedTransformation.get(2, 2);
- aAny <<= aMatrix;
-
- xPropSet->setPropertyValue("Transformation", aAny);
+ xPropSet->setPropertyValue("Transformation", Any(aMatrix));
}
}
}
@@ -691,9 +688,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
try
{
// set style on object
- uno::Any aAny;
- aAny <<= xStyle;
- xPropSet->setPropertyValue("Style", aAny);
+ xPropSet->setPropertyValue("Style", Any(xStyle));
}
catch(const uno::Exception&)
{
@@ -749,10 +744,7 @@ void SdXMLShapeContext::SetLayer()
uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY);
if(xPropSet.is() )
{
- uno::Any aAny;
- aAny <<= maLayerName;
-
- xPropSet->setPropertyValue("LayerName", aAny);
+ xPropSet->setPropertyValue("LayerName", Any(maLayerName));
return;
}
}
@@ -1163,14 +1155,12 @@ void SdXMLLineShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
drawing::PointSequence* pOuterSequence = aPolyPoly.getArray();
pOuterSequence->realloc(2L);
awt::Point* pInnerSequence = pOuterSequence->getArray();
- uno::Any aAny;
*pInnerSequence = awt::Point( mnX1 - aTopLeft.X, mnY1 - aTopLeft.Y);
pInnerSequence++;
*pInnerSequence = awt::Point( mnX2 - aTopLeft.X, mnY2 - aTopLeft.Y);
- aAny <<= aPolyPoly;
- xPropSet->setPropertyValue("Geometry", aAny);
+ xPropSet->setPropertyValue("Geometry", Any(aPolyPoly));
}
// set sizes for transformation
@@ -1304,15 +1294,9 @@ void SdXMLEllipseShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY );
if( xPropSet.is() )
{
- uno::Any aAny;
- aAny <<= (drawing::CircleKind)meKind;
- xPropSet->setPropertyValue("CircleKind", aAny );
-
- aAny <<= mnStartAngle;
- xPropSet->setPropertyValue("CircleStartAngle", aAny );
-
- aAny <<= mnEndAngle;
- xPropSet->setPropertyValue("CircleEndAngle", aAny );
+ xPropSet->setPropertyValue("CircleKind", Any( (drawing::CircleKind)meKind) );
+ xPropSet->setPropertyValue("CircleStartAngle", Any(mnStartAngle) );
+ xPropSet->setPropertyValue("CircleEndAngle", Any(mnEndAngle) );
}
}
@@ -1411,11 +1395,9 @@ void SdXMLPolygonShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
}
com::sun::star::drawing::PointSequenceSequence aPointSequenceSequence;
- uno::Any aAny;
basegfx::tools::B2DPolyPolygonToUnoPointSequenceSequence(basegfx::B2DPolyPolygon(aPolygon), aPointSequenceSequence);
- aAny <<= aPointSequenceSequence;
- xPropSet->setPropertyValue("Geometry", aAny);
+ xPropSet->setPropertyValue("Geometry", Any(aPointSequenceSequence));
}
}
}
@@ -2041,24 +2023,12 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- uno::Any aAny;
- aAny <<= maStart;
- xProps->setPropertyValue("StartPosition", aAny);
-
- aAny <<= maEnd;
- xProps->setPropertyValue("EndPosition", aAny );
-
- aAny <<= (drawing::ConnectorType)mnType;
- xProps->setPropertyValue("EdgeKind", aAny );
-
- aAny <<= mnDelta1;
- xProps->setPropertyValue("EdgeLine1Delta", aAny );
-
- aAny <<= mnDelta2;
- xProps->setPropertyValue("EdgeLine2Delta", aAny );
-
- aAny <<= mnDelta3;
- xProps->setPropertyValue("EdgeLine3Delta", aAny );
+ xProps->setPropertyValue("StartPosition", Any(maStart));
+ xProps->setPropertyValue("EndPosition", Any(maEnd) );
+ xProps->setPropertyValue("EdgeKind", Any((drawing::ConnectorType)mnType) );
+ xProps->setPropertyValue("EdgeLine1Delta", Any(mnDelta1) );
+ xProps->setPropertyValue("EdgeLine2Delta", Any(mnDelta2) );
+ xProps->setPropertyValue("EdgeLine3Delta", Any(mnDelta3) );
}
SetStyle();
SetLayer();
@@ -2167,12 +2137,8 @@ void SdXMLMeasureShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- uno::Any aAny;
- aAny <<= maStart;
- xProps->setPropertyValue("StartPosition", aAny);
-
- aAny <<= maEnd;
- xProps->setPropertyValue("EndPosition", aAny );
+ xProps->setPropertyValue("StartPosition", Any(maStart));
+ xProps->setPropertyValue("EndPosition", Any(maEnd) );
}
// delete pre created fields
@@ -2607,8 +2573,7 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri
const OUString aCLSID( "12DCAE26-281F-416F-a234-c3086127382e");
- aAny <<= aCLSID;
- xProps->setPropertyValue("CLSID", aAny );
+ xProps->setPropertyValue("CLSID", Any(aCLSID) );
aAny = xProps->getPropertyValue("Model");
uno::Reference< frame::XModel > xChartModel;
@@ -2946,49 +2911,40 @@ void SdXMLAppletShapeContext::EndElement()
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- uno::Any aAny;
-
if ( maSize.Width && maSize.Height )
{
// the visual area for applet must be set on loading
awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height );
- aAny <<= aRect;
- xProps->setPropertyValue("VisibleArea", aAny );
+ xProps->setPropertyValue("VisibleArea", Any(aRect) );
}
if( maParams.getLength() )
{
- aAny <<= maParams;
- xProps->setPropertyValue("AppletCommands", aAny );
+ xProps->setPropertyValue("AppletCommands", Any(maParams) );
}
if( !maHref.isEmpty() )
{
- aAny <<= maHref;
- xProps->setPropertyValue("AppletCodeBase", aAny );
+ xProps->setPropertyValue("AppletCodeBase", Any(maHref) );
}
if( !maAppletName.isEmpty() )
{
- aAny <<= maAppletName;
- xProps->setPropertyValue("AppletName", aAny );
+ xProps->setPropertyValue("AppletName", Any(maAppletName) );
}
if( mbIsScript )
{
- aAny <<= mbIsScript;
- xProps->setPropertyValue("AppletIsScript", aAny );
+ xProps->setPropertyValue("AppletIsScript", Any(mbIsScript) );
}
if( !maAppletCode.isEmpty() )
{
- aAny <<= maAppletCode;
- xProps->setPropertyValue("AppletCode", aAny );
+ xProps->setPropertyValue("AppletCode", Any(maAppletCode) );
}
- aAny <<= OUString( GetImport().GetDocumentBase() );
- xProps->setPropertyValue("AppletDocBase", aAny );
+ xProps->setPropertyValue("AppletDocBase", Any(GetImport().GetDocumentBase()) );
SetThumbnail();
}
@@ -3168,8 +3124,6 @@ void SdXMLPluginShapeContext::EndElement()
if( xProps.is() )
{
- uno::Any aAny;
-
if ( maSize.Width && maSize.Height )
{
const OUString sVisibleArea( "VisibleArea" );
@@ -3178,8 +3132,7 @@ void SdXMLPluginShapeContext::EndElement()
{
// the visual area for a plugin must be set on loading
awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height );
- aAny <<= aRect;
- xProps->setPropertyValue( sVisibleArea, aAny );
+ xProps->setPropertyValue( sVisibleArea, Any(aRect) );
}
}
@@ -3188,20 +3141,17 @@ void SdXMLPluginShapeContext::EndElement()
// in case we have a plugin object
if( maParams.getLength() )
{
- aAny <<= maParams;
- xProps->setPropertyValue("PluginCommands", aAny );
+ xProps->setPropertyValue("PluginCommands", Any(maParams) );
}
if( !maMimeType.isEmpty() )
{
- aAny <<= maMimeType;
- xProps->setPropertyValue("PluginMimeType", aAny );
+ xProps->setPropertyValue("PluginMimeType", Any(maMimeType) );
}
if( !maHref.isEmpty() )
{
- aAny <<= maHref;
- xProps->setPropertyValue("PluginURL", aAny );
+ xProps->setPropertyValue("PluginURL", Any(maHref) );
}
}
else
@@ -3344,18 +3294,14 @@ void SdXMLFloatingFrameShapeContext::StartElement( const ::com::sun::star::uno::
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- uno::Any aAny;
-
if( !maFrameName.isEmpty() )
{
- aAny <<= maFrameName;
- xProps->setPropertyValue("FrameName", aAny );
+ xProps->setPropertyValue("FrameName", Any(maFrameName) );
}
if( !maHref.isEmpty() )
{
- aAny <<= maHref;
- xProps->setPropertyValue("FrameURL", aAny );
+ xProps->setPropertyValue("FrameURL", Any(maHref) );
}
}
@@ -3399,9 +3345,7 @@ void SdXMLFloatingFrameShapeContext::EndElement()
{
// the visual area for a floating frame must be set on loading
awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height );
- uno::Any aAny;
- aAny <<= aRect;
- xProps->setPropertyValue("VisibleArea", aAny );
+ xProps->setPropertyValue("VisibleArea", Any(aRect) );
}
}
@@ -3779,15 +3723,11 @@ void SdXMLCustomShapeContext::StartElement( const uno::Reference< xml::sax::XAtt
{
if ( !maCustomShapeEngine.isEmpty() )
{
- uno::Any aAny;
- aAny <<= maCustomShapeEngine;
- xPropSet->setPropertyValue( EASGet( EAS_CustomShapeEngine ), aAny );
+ xPropSet->setPropertyValue( EASGet( EAS_CustomShapeEngine ), Any(maCustomShapeEngine) );
}
if ( !maCustomShapeData.isEmpty() )
{
- uno::Any aAny;
- aAny <<= maCustomShapeData;
- xPropSet->setPropertyValue( EASGet( EAS_CustomShapeData ), aAny );
+ xPropSet->setPropertyValue( EASGet( EAS_CustomShapeData ), Any(maCustomShapeData) );
}
}
}
@@ -3871,9 +3811,7 @@ void SdXMLCustomShapeContext::EndElement()
uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY );
if( xPropSet.is() )
{
- uno::Any aAny;
- aAny <<= aSeq;
- xPropSet->setPropertyValue( sCustomShapeGeometry, aAny );
+ xPropSet->setPropertyValue( sCustomShapeGeometry, Any(aSeq) );
}
}
catch(const uno::Exception&)
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index 0b5efd5a7b0b..c24228673bb1 100644
--- a/xmloff/source/draw/ximpshow.cxx
+++ b/xmloff/source/draw/ximpshow.cxx
@@ -96,8 +96,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
case XML_NAMESPACE_PRESENTATION:
if( IsXMLToken( aLocalName, XML_START_PAGE ) )
{
- aAny <<= sValue;
- mpImpl->mxPresProps->setPropertyValue("FirstPage", aAny );
+ mpImpl->mxPresProps->setPropertyValue("FirstPage", Any(sValue) );
bAll = false;
}
else if( IsXMLToken( aLocalName, XML_SHOW ) )
@@ -113,8 +112,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
const sal_Int32 nMS = (aDuration.Hours * 60 +
aDuration.Minutes) * 60 + aDuration.Seconds;
- aAny <<= nMS;
- mpImpl->mxPresProps->setPropertyValue("Pause", aAny );
+ mpImpl->mxPresProps->setPropertyValue("Pause", Any(nMS) );
}
else if( IsXMLToken( aLocalName, XML_ANIMATIONS ) )
{
@@ -168,8 +166,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
}
}
}
- aAny <<= bAll;
- mpImpl->mxPresProps->setPropertyValue("IsShowAll", aAny );
+ mpImpl->mxPresProps->setPropertyValue("IsShowAll", Any(bAll) );
}
}
@@ -220,7 +217,6 @@ SvXMLImportContext * SdXMLShowsContext::CreateChildContext( sal_uInt16 p_nPrefix
{
SvXMLTokenEnumerator aPageNames( aPages, ',' );
OUString sPageName;
- Any aAny;
while( aPageNames.getNextToken( sPageName ) )
{
@@ -231,13 +227,12 @@ SvXMLImportContext * SdXMLShowsContext::CreateChildContext( sal_uInt16 p_nPrefix
mpImpl->mxPages->getByName( sPageName ) >>= xPage;
if( xPage.is() )
{
- aAny <<= xPage;
- xShow->insertByIndex( xShow->getCount(), aAny );
+ xShow->insertByIndex( xShow->getCount(), Any(xPage) );
}
}
+ Any aAny;
aAny <<= xShow;
-
if( mpImpl->mxShows->hasByName( aName ) )
{
mpImpl->mxShows->replaceByName( aName, aAny );
diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx
index 7b6481109f20..15f939947c53 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 c0fc8209ab85..27547f5bed0b 100644
--- a/xmloff/source/script/XMLEventsImportContext.cxx
+++ b/xmloff/source/script/XMLEventsImportContext.cxx
@@ -191,12 +191,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 44229af18de7..f7e4fd2b5eff 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -355,9 +355,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;
}
@@ -493,8 +491,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 e4e888020cf7..a34dea760cf9 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 067f07b83759..6b185562be37 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 4239164ac0bd..646683b5120e 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) );
}
}
}
@@ -1178,9 +1176,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;
}
@@ -1206,8 +1202,7 @@ void SvxXMLListStyleContext::CreateAndInsertLate( bool bOverwrite )
if( bOverwrite || bNew )
{
FillUnoNumRule(xNumRules);
- aAny <<= xNumRules;
- xPropSet->setPropertyValue( sNumberingRules, aAny );
+ xPropSet->setPropertyValue( sNumberingRules, Any(xNumRules) );
}
else
{
@@ -1294,9 +1289,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 c4fcd7f46840..ecb684dbfbb4 100644
--- a/xmloff/source/text/XMLCalculationSettingsContext.cxx
+++ b/xmloff/source/text/XMLCalculationSettingsContext.cxx
@@ -77,9 +77,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 b2edb7c5175d..19b91e3ab4f2 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,11 +397,9 @@ 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)
{
diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
index 3e4344cc6765..3d94e6bf1e3c 100644
--- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
@@ -226,8 +226,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 19e15810f37c..23fb8da97c80 100644
--- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
@@ -157,13 +157,12 @@ SvXMLImportContext *XMLIndexBibliographyConfigurationContext::CreateChildContext
const OUString& rLocalName,
const Reference<XAttributeList> & xAttrList )
{
- OUString sKey;
- sal_Bool bSort(sal_True);
-
// process children here and use default context!
if ( ( nPrefix == XML_NAMESPACE_TEXT ) &&
IsXMLToken( rLocalName, XML_SORT_KEY ) )
{
+ OUString sKey;
+ bool bSort(true);
sal_Int16 nLength = xAttrList->getLength();
for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
{
@@ -195,20 +194,16 @@ 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;
aSortValue.Name = sIsSortAscending;
- aAny.setValue(&bSort, cppu::UnoType<bool>::get());
- aSortValue.Value = aAny;
+ aSortValue.Value = Any(bSort);
aKey[1] = aSortValue;
aSortKeys.push_back(aKey);
@@ -251,17 +246,10 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
Reference<XPropertySet> xPropSet( xIfc, UNO_QUERY );
Any aAny;
- aAny <<= sSuffix;
- xPropSet->setPropertyValue(sBracketAfter, aAny);
-
- aAny <<= sPrefix;
- xPropSet->setPropertyValue(sBracketBefore, aAny);
-
- aAny.setValue(&bNumberedEntries, cppu::UnoType<bool>::get());
- xPropSet->setPropertyValue(sIsNumberEntries, aAny);
-
- aAny.setValue(&bSortByPosition, cppu::UnoType<bool>::get());
- xPropSet->setPropertyValue(sIsSortByPosition, aAny);
+ xPropSet->setPropertyValue(sBracketAfter, Any(sSuffix));
+ xPropSet->setPropertyValue(sBracketBefore, Any(sPrefix));
+ xPropSet->setPropertyValue(sIsNumberEntries, Any(bNumberedEntries));
+ xPropSet->setPropertyValue(sIsSortByPosition, Any(bSortByPosition));
if( !maLanguageTagODF.isEmpty() )
{
@@ -271,8 +259,7 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
if( !sAlgorithm.isEmpty() )
{
- aAny <<= sAlgorithm;
- xPropSet->setPropertyValue(sSortAlgorithm, aAny);
+ xPropSet->setPropertyValue(sSortAlgorithm, Any(sAlgorithm));
}
sal_Int32 nCount = aSortKeys.size();
@@ -281,8 +268,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 f775857c77fe..73f78e49a35e 100644
--- a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
@@ -157,9 +157,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 a61ffaad93a7..d360c889071c 100644
--- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
@@ -179,17 +179,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 3267404f54ba..99d030789311 100644
--- a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
@@ -110,8 +110,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 9ed5e223c363..fd9876368dfa 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -246,8 +246,7 @@ void XMLIndexTOCContext::StartElement(
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 59f8497f40b5..32b18e4a75da 100644
--- a/xmloff/source/text/XMLIndexTOCSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCSourceContext.cxx
@@ -146,8 +146,7 @@ void XMLIndexTOCSourceContext::EndElement()
aAny.setValue(&bUseParagraphStyles, cppu::UnoType<bool>::get());
rIndexPropertySet->setPropertyValue(sCreateFromLevelParagraphStyles, aAny);
- 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 871a75589604..724b95d40e55 100644
--- a/xmloff/source/text/XMLIndexTableSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexTableSourceContext.cxx
@@ -133,14 +133,12 @@ void XMLIndexTableSourceContext::EndElement()
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 cb5842b34738..1ee033a9c2b4 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.cxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.cxx
@@ -188,8 +188,7 @@ void XMLIndexTemplateContext::EndElement()
aAny >>= xIndexReplace;
// ... and insert
- aAny <<= aValueSequence;
- xIndexReplace->replaceByIndex(nOutlineLevel, aAny);
+ xIndexReplace->replaceByIndex(nOutlineLevel, Any(aValueSequence));
if (bStyleNameOK)
{
@@ -209,9 +208,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 a4a2d5cedac1..b853d4bbcbdb 100644
--- a/xmloff/source/text/XMLIndexUserSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexUserSourceContext.cxx
@@ -176,8 +176,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 d04edaa32e6a..71bc60a5d7bd 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));
}
aAny.setValue(&bNumberLines, cppu::UnoType<bool>::get());
@@ -270,8 +263,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 330f777613c5..d08480bb52d2 100644
--- a/xmloff/source/text/XMLPropertyBackpatcher.cxx
+++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx
@@ -118,9 +118,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 8f3571220797..4e9973d055dd 100644
--- a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
+++ b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
@@ -128,53 +128,45 @@ void XMLSectionFootnoteConfigImport::StartElement(
}
// OK, now we have all values and can fill the XMLPropertyState vector
- Any aAny;
- aAny.setValue( &bNumOwn, cppu::UnoType<bool>::get() );
sal_Int32 nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_OWN : CTF_SECTION_FOOTNOTE_NUM_OWN );
- XMLPropertyState aNumOwn( nIndex, aAny );
+ XMLPropertyState aNumOwn( nIndex, css::uno::Any(bNumOwn) );
rProperties.push_back( aNumOwn );
- aAny.setValue( &bNumRestart, cppu::UnoType<bool>::get() );
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_RESTART : CTF_SECTION_FOOTNOTE_NUM_RESTART );
- XMLPropertyState aNumRestart( nIndex, aAny );
+ 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 );
- aAny.setValue( &bEnd, cppu::UnoType<bool>::get() );
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_END : CTF_SECTION_FOOTNOTE_END );
- XMLPropertyState aEndState( nIndex, aAny );
+ XMLPropertyState aEndState( nIndex, css::uno::Any(bEnd) );
rProperties.push_back( aEndState );
}
diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx
index 7e9bbda0250e..ef567ed29ef6 100644
--- a/xmloff/source/text/XMLSectionImportContext.cxx
+++ b/xmloff/source/text/XMLSectionImportContext.cxx
@@ -183,8 +183,7 @@ void XMLSectionImportContext::StartElement(
if (bCondOK)
{
- aAny <<= sCond;
- xPropSet->setPropertyValue( sCondition, aAny );
+ xPropSet->setPropertyValue( sCondition, Any(sCond) );
}
}
@@ -192,9 +191,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 b99a4506e6e2..cdc18f4021ae 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -452,33 +452,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 20768ff1fd55..82191a9ad3f7 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -285,7 +285,6 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl(
{
const SdXMLImExViewBox aViewBox( sViewBox, GetImport().GetMM100UnitConverter());
basegfx::B2DPolyPolygon aPolyPolygon;
- Any aAny;
if( bPath )
{
@@ -320,24 +319,21 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl(
com::sun::star::drawing::PointSequenceSequence aPointSequenceSequence;
basegfx::tools::B2DPolyPolygonToUnoPointSequenceSequence(aPolyPolygon, aPointSequenceSequence);
- aAny <<= aPointSequenceSequence;
- xPropSet->setPropertyValue( sContourPolyPolygon, aAny );
+ xPropSet->setPropertyValue( sContourPolyPolygon, Any(aPointSequenceSequence) );
}
const OUString sIsPixelContour("IsPixelContour");
if( xPropSetInfo->hasPropertyByName( sIsPixelContour ) )
{
- aAny.setValue( &bPixelWidth, cppu::UnoType<bool>::get() );
- xPropSet->setPropertyValue( sIsPixelContour, aAny );
+ xPropSet->setPropertyValue( sIsPixelContour, Any(bPixelWidth) );
}
const OUString sIsAutomaticContour("IsAutomaticContour");
if( xPropSetInfo->hasPropertyByName( sIsAutomaticContour ) )
{
- aAny.setValue( &bAuto, cppu::UnoType<bool>::get() );
- xPropSet->setPropertyValue( sIsAutomaticContour, aAny );
+ xPropSet->setPropertyValue( sIsAutomaticContour, Any(bAuto) );
}
}
}
@@ -626,16 +622,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 )
@@ -647,8 +641,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;
@@ -656,26 +649,21 @@ 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 )
{
- sal_Bool bTmp = bSyncWidth;
- aAny.setValue( &bTmp, cppu::UnoType<bool>::get() );
- xPropSet->setPropertyValue( sIsSyncWidthToHeight, aAny );
+ xPropSet->setPropertyValue( sIsSyncWidthToHeight, Any(bSyncWidth) );
}
if( xPropSetInfo->hasPropertyByName( sWidthType ) &&
(bMinWidth || nWidth > 0 || nRelWidth > 0 ) )
@@ -683,25 +671,20 @@ 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 )
{
- sal_Bool bTmp = bSyncHeight;
- aAny.setValue( &bTmp, cppu::UnoType<bool>::get() );
- xPropSet->setPropertyValue( sIsSyncHeightToWidth, aAny );
+ xPropSet->setPropertyValue( sIsSyncHeightToWidth, Any(bSyncHeight) );
}
if( xPropSetInfo->hasPropertyByName( sSizeType ) &&
(bMinHeight || nHeight > 0 || nRelHeight > 0 ) )
@@ -709,8 +692,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 )
@@ -733,24 +715,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 &&
@@ -1287,26 +1265,21 @@ 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))
{
- aAny.setValue( &bMap, cppu::UnoType<bool>::get() );
- xPropSet->setPropertyValue(s_ServerMap, aAny);
+ xPropSet->setPropertyValue(s_ServerMap, Any(bMap));
}
}
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index 267bf0eed1c4..40416adf2c43 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 7836ce61f63d..80d22879f773 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -707,13 +707,10 @@ void XMLSenderFieldImportContext::PrepareField(
const Reference<XPropertySet> & rPropSet)
{
// set members
- Any aAny;
- aAny <<= nSubType;
- rPropSet->setPropertyValue(sPropertyFieldSubType, aAny);
+ rPropSet->setPropertyValue(sPropertyFieldSubType, Any(nSubType));
// set fixed
- aAny.setValue( &bFixed, cppu::UnoType<bool>::get() );
- rPropSet->setPropertyValue(sPropertyFixed, aAny);
+ rPropSet->setPropertyValue(sPropertyFixed, Any(bFixed));
// set content if fixed
if (bFixed)
@@ -726,8 +723,7 @@ void XMLSenderFieldImportContext::PrepareField(
}
else
{
- aAny <<= GetContent();
- rPropSet->setPropertyValue(sPropertyContent, aAny);
+ rPropSet->setPropertyValue(sPropertyContent, Any(GetContent()));
}
}
}
@@ -766,11 +762,9 @@ void XMLAuthorFieldImportContext::PrepareField(
{
// set members
Any aAny;
- aAny.setValue( &bAuthorFullName, cppu::UnoType<bool>::get() );
- rPropSet->setPropertyValue(sPropertyAuthorFullName, aAny);
+ rPropSet->setPropertyValue(sPropertyAuthorFullName, Any(bAuthorFullName));
- aAny.setValue( &bFixed, cppu::UnoType<bool>::get() );
- rPropSet->setPropertyValue(sPropertyFixed, aAny);
+ rPropSet->setPropertyValue(sPropertyFixed, Any(bFixed));
// set content if fixed
if (bFixed)
@@ -842,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);
@@ -909,8 +902,6 @@ void XMLPageNumberImportContext::ProcessAttribute(
void XMLPageNumberImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// all properties are optional
Reference<XPropertySetInfo> xPropertySetInfo(
xPropertySet->getPropertySetInfo());
@@ -928,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))
@@ -948,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));
}
}
@@ -1020,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();
@@ -1039,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));
}
@@ -1120,25 +1106,20 @@ void XMLTimeFieldImportContext::ProcessAttribute(
void XMLTimeFieldImportContext::PrepareField(
const Reference<XPropertySet> & rPropertySet)
{
- Any aAny;
-
// all properties are optional (except IsDate)
Reference<XPropertySetInfo> xPropertySetInfo(
rPropertySet->getPropertySetInfo());
if (xPropertySetInfo->hasPropertyByName(sPropertyFixed))
{
- aAny.setValue( &bFixed, cppu::UnoType<bool>::get() );
- rPropertySet->setPropertyValue(sPropertyFixed, aAny);
+ rPropertySet->setPropertyValue(sPropertyFixed, Any(bFixed));
}
- aAny.setValue( &bIsDate, cppu::UnoType<bool>::get() );
- rPropertySet->setPropertyValue(sPropertyIsDate, aAny);
+ rPropertySet->setPropertyValue(sPropertyIsDate, Any(bIsDate));
if (xPropertySetInfo->hasPropertyByName(sPropertyAdjust))
{
- aAny <<= nAdjust;
- rPropertySet->setPropertyValue(sPropertyAdjust, aAny);
+ rPropertySet->setPropertyValue(sPropertyAdjust, Any(nAdjust));
}
// set value
@@ -1157,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));
}
}
}
@@ -1172,14 +1151,12 @@ void XMLTimeFieldImportContext::PrepareField(
if (bFormatOK &&
xPropertySetInfo->hasPropertyByName(sPropertyNumberFormat))
{
- aAny <<= nFormatKey;
- rPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ rPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormatKey));
if( xPropertySetInfo->hasPropertyByName( sPropertyIsFixedLanguage ) )
{
- sal_Bool bIsFixedLanguage = ! bIsDefaultLanguage;
- aAny.setValue( &bIsFixedLanguage, cppu::UnoType<bool>::get() );
- rPropertySet->setPropertyValue( sPropertyIsFixedLanguage, aAny );
+ bool bIsFixedLanguage = ! bIsDefaultLanguage;
+ rPropertySet->setPropertyValue( sPropertyIsFixedLanguage, Any(bIsFixedLanguage) );
}
}
}
@@ -1337,34 +1314,27 @@ 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 )
{
- aAny.setValue( &bDisplay, cppu::UnoType<bool>::get() );
- xPropertySet->setPropertyValue( sPropertyIsVisible, aAny );
+ xPropertySet->setPropertyValue( sPropertyIsVisible, Any(bDisplay) );
}
}
@@ -1491,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);
}
@@ -1552,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);
@@ -1612,8 +1575,7 @@ void XMLSimpleDocInfoImportContext::PrepareField(
if (xPropertySetInfo->hasPropertyByName(sPropertyFixed))
{
Any aAny;
- aAny.setValue(&bFixed, cppu::UnoType<bool>::get() );
- rPropertySet->setPropertyValue(sPropertyFixed, aAny);
+ rPropertySet->setPropertyValue(sPropertyFixed, Any(bFixed));
// set Content and CurrentPresentation (if fixed)
if (bFixed)
@@ -1744,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));
}
}
}
@@ -1833,25 +1793,20 @@ void XMLDateTimeDocInfoImportContext::PrepareField(
// process fixed and presentation
XMLSimpleDocInfoImportContext::PrepareField(xPropertySet);
- Any aAny;
-
if (bHasDateTime)
{
- aAny.setValue( &bIsDate, cppu::UnoType<bool>::get());
- xPropertySet->setPropertyValue(sPropertyIsDate, aAny);
+ xPropertySet->setPropertyValue(sPropertyIsDate, Any(bIsDate));
}
if (bFormatOK)
{
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormat));
if( xPropertySet->getPropertySetInfo()->
hasPropertyByName( sPropertyIsFixedLanguage ) )
{
- sal_Bool bIsFixedLanguage = ! bIsDefaultLanguage;
- aAny.setValue( &bIsFixedLanguage, cppu::UnoType<bool>::get() );
- xPropertySet->setPropertyValue( sPropertyIsFixedLanguage, aAny );
+ bool bIsFixedLanguage = ! bIsDefaultLanguage;
+ xPropertySet->setPropertyValue( sPropertyIsFixedLanguage, Any(bIsFixedLanguage) );
}
}
@@ -1917,25 +1872,21 @@ void XMLUserDocInfoImportContext::PrepareField(
const ::com::sun::star::uno::Reference<
::com::sun::star::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 ) )
{
- sal_Bool bIsFixedLanguage = ! bIsDefaultLanguage;
- aAny.setValue( &bIsFixedLanguage, cppu::UnoType<bool>::get() );
- xPropertySet->setPropertyValue( sPropertyIsFixedLanguage, aAny );
+ bool bIsFixedLanguage = ! bIsDefaultLanguage;
+ xPropertySet->setPropertyValue( sPropertyIsFixedLanguage, Any(bIsFixedLanguage) );
}
}
@@ -1989,12 +1940,8 @@ void XMLHiddenParagraphImportContext::ProcessAttribute(
void XMLHiddenParagraphImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
- aAny <<= sCondition;
- xPropertySet->setPropertyValue(sPropertyCondition, aAny);
-
- aAny.setValue( &bIsHidden, cppu::UnoType<bool>::get() );
- xPropertySet->setPropertyValue(sPropertyIsHidden, aAny);
+ xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
+ xPropertySet->setPropertyValue(sPropertyIsHidden, Any(bIsHidden));
}
@@ -2063,22 +2010,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);
-
- aAny.setValue( &bCurrentValue, cppu::UnoType<bool>::get() );
- xPropertySet->setPropertyValue(sPropertyIsConditionTrue, aAny);
-
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
+ xPropertySet->setPropertyValue(sPropertyFalseContent, Any(sFalseContent));
+ xPropertySet->setPropertyValue(sPropertyTrueContent, Any(sTrueContent));
+ xPropertySet->setPropertyValue(sPropertyIsConditionTrue, Any(bCurrentValue));
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, Any(GetContent()));
}
@@ -2140,16 +2076,9 @@ void XMLHiddenTextImportContext::ProcessAttribute(
void XMLHiddenTextImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sCondition;
- xPropertySet->setPropertyValue(sPropertyCondition, aAny);
-
- aAny <<= sString;
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
-
- aAny.setValue( &bIsHidden, cppu::UnoType<bool>::get() );
- xPropertySet->setPropertyValue(sPropertyIsHidden, aAny);
+ xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
+ xPropertySet->setPropertyValue(sPropertyContent, Any(sString));
+ xPropertySet->setPropertyValue(sPropertyIsHidden, Any(bIsHidden));
}
@@ -2214,28 +2143,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()));
}
}
@@ -2291,10 +2215,7 @@ void XMLTemplateNameImportContext::ProcessAttribute(
void XMLTemplateNameImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyFileFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyFileFormat, Any(nFormat));
}
@@ -2364,13 +2285,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));
}
@@ -2410,8 +2326,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)
@@ -2428,8 +2342,7 @@ void XMLCountFieldImportContext::PrepareField(
}
else
nNumType = style::NumberingType::PAGE_DESCRIPTOR;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
}
}
@@ -2507,8 +2420,6 @@ void XMLPageVarGetFieldImportContext::ProcessAttribute(
void XMLPageVarGetFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
sal_Int16 nNumType;
if( bNumberFormatOK )
{
@@ -2519,12 +2430,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()) );
}
@@ -2576,13 +2485,8 @@ void XMLPageVarSetFieldImportContext::ProcessAttribute(
void XMLPageVarSetFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny.setValue(&bActive, cppu::UnoType<bool>::get());
- xPropertySet->setPropertyValue(sPropertyOn, aAny);
-
- aAny <<= nAdjust;
- xPropertySet->setPropertyValue(sPropertyOffset, aAny);
+ xPropertySet->setPropertyValue(sPropertyOn, Any(bActive));
+ xPropertySet->setPropertyValue(sPropertyOffset, Any(nAdjust));
}
@@ -2711,14 +2615,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));
}
@@ -2828,20 +2727,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:
@@ -2853,8 +2747,7 @@ void XMLReferenceFieldImportContext::PrepareField(
break;
}
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, Any(GetContent()));
}
@@ -3010,24 +2903,17 @@ 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));
- aAny.setValue(&bUpdate, cppu::UnoType<bool>::get());
xPropSet->setPropertyValue(sPropertyIsAutomaticUpdate,
- aAny);
+ Any(bUpdate));
}
// else: ignore (can't get XPropertySet, or DDE
// properties are not supported)
@@ -3220,19 +3106,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()));
}
@@ -3348,9 +3229,7 @@ void XMLBibliographyFieldImportContext::PrepareField(
}
// set sequence
- Any aAny;
- aAny <<= aValueSequence;
- xPropertySet->setPropertyValue(sPropertyFields, aAny);
+ xPropertySet->setPropertyValue(sPropertyFields, Any(aValueSequence));
}
const sal_Char* XMLBibliographyFieldImportContext::MapBibliographyFieldName(
@@ -3763,22 +3642,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
- aAny.setValue(&bContentOK, cppu::UnoType<bool>::get());
- xPropertySet->setPropertyValue(sPropertyURLContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyURLContent, Any(bContentOK));
- aAny <<= sScriptType;
- xPropertySet->setPropertyValue(sPropertyScriptType, aAny);
+ xPropertySet->setPropertyValue(sPropertyScriptType, Any(sScriptType));
}
@@ -3822,9 +3696,7 @@ void XMLMeasureFieldImportContext::ProcessAttribute(
void XMLMeasureFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
- aAny <<= mnKind;
- xPropertySet->setPropertyValue("Kind", aAny);
+ xPropertySet->setPropertyValue("Kind", Any(mnKind));
}
@@ -3937,34 +3809,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 f2ac9f27bb14..65cf9d5c6c65 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 17a4b0ce5e14..bfbf9f9d5694 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -227,9 +227,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)
@@ -286,11 +284,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) );
}
}
@@ -328,9 +324,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
{
@@ -346,9 +340,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) );
}
}
}
@@ -367,9 +359,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) );
}
}
@@ -386,9 +376,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 80f565db7b04..f46bb42be976 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)
@@ -417,13 +409,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;
@@ -541,9 +532,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);
@@ -571,9 +560,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);
@@ -604,9 +591,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);
@@ -637,9 +622,7 @@ void XMLTextInputFieldImportContext::PrepareField(
{
XMLVarFieldImportContext::PrepareField(xPropertySet);
- Any aAny;
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(GetContent()));
}
@@ -844,15 +827,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:
@@ -990,13 +971,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);
@@ -1086,8 +1065,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);
@@ -1355,8 +1333,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 ) )
@@ -1377,8 +1354,7 @@ void XMLValueImportHelper::PrepareField(
}
else
{
- aAny <<= fValue;
- xPropertySet->setPropertyValue(sPropertyValue, aAny);
+ xPropertySet->setPropertyValue(sPropertyValue, Any(fValue));
}
}
}