summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-03 08:39:03 +0200
committerNoel Grandin <noel@peralex.com>2016-05-04 12:39:40 +0200
commit58a32075ca4f457f570af75aef368dd6c389aca7 (patch)
treee437dcbdeb248b4316cb8a9281d1543419853f6d
parent7d47700972d267fe7c5270c5dadd45a523a2baec (diff)
use Any constructor instead of temporaries
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/propacc.cxx4
-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--comphelper/source/container/embeddedobjectcontainer.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.cxx89
-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.cxx8
-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.cxx4
-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.cxx21
-rw-r--r--xmloff/source/draw/XMLShapePropertySetContext.cxx5
-rw-r--r--xmloff/source/draw/animimp.cxx24
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx5
-rw-r--r--xmloff/source/draw/shapeexport.cxx4
-rw-r--r--xmloff/source/draw/shapeimport.cxx11
-rw-r--r--xmloff/source/draw/ximp3dobject.cxx22
-rw-r--r--xmloff/source/draw/ximp3dscene.cxx32
-rw-r--r--xmloff/source/draw/ximppage.cxx29
-rw-r--r--xmloff/source/draw/ximpshap.cxx131
-rw-r--r--xmloff/source/draw/ximpshow.cxx15
-rw-r--r--xmloff/source/meta/MetaExportComponent.cxx4
-rw-r--r--xmloff/source/script/XMLEventsImportContext.cxx5
-rw-r--r--xmloff/source/style/XMLFootnoteSeparatorImport.cxx22
-rw-r--r--xmloff/source/style/prstylei.cxx7
-rw-r--r--xmloff/source/style/xmlimppr.cxx8
-rw-r--r--xmloff/source/style/xmlnume.cxx13
-rw-r--r--xmloff/source/style/xmlnumi.cxx15
-rw-r--r--xmloff/source/text/XMLCalculationSettingsContext.cxx4
-rw-r--r--xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx24
-rw-r--r--xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx20
-rw-r--r--xmloff/source/text/XMLIndexBibliographyEntryContext.cxx4
-rw-r--r--xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx8
-rw-r--r--xmloff/source/text/XMLIndexSimpleEntryContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexTOCContext.cxx4
-rw-r--r--xmloff/source/text/XMLIndexTOCSourceContext.cxx5
-rw-r--r--xmloff/source/text/XMLIndexTOCStylesContext.cxx3
-rw-r--r--xmloff/source/text/XMLIndexTableSourceContext.cxx8
-rw-r--r--xmloff/source/text/XMLIndexTemplateContext.cxx6
-rw-r--r--xmloff/source/text/XMLIndexUserSourceContext.cxx5
-rw-r--r--xmloff/source/text/XMLLineNumberingImportContext.cxx20
-rw-r--r--xmloff/source/text/XMLPropertyBackpatcher.cxx4
-rw-r--r--xmloff/source/text/XMLSectionFootnoteConfigImport.cxx13
-rw-r--r--xmloff/source/text/XMLSectionImportContext.cxx8
-rw-r--r--xmloff/source/text/XMLSectionSourceImportContext.cxx7
-rw-r--r--xmloff/source/text/XMLTextColumnsContext.cxx19
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx56
-rw-r--r--xmloff/source/text/XMLTextMasterPageContext.cxx6
-rw-r--r--xmloff/source/text/XMLTextShapeImportHelper.cxx10
-rw-r--r--xmloff/source/text/txtfldi.cxx243
-rw-r--r--xmloff/source/text/txtparai.cxx20
-rw-r--r--xmloff/source/text/txtstyli.cxx24
-rw-r--r--xmloff/source/text/txtvfldi.cxx58
145 files changed, 658 insertions, 1753 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index d09ec3029adc..5fe34036f3be 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -1167,9 +1167,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 0fb42445c113..19604dc27ea6 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
@@ -318,12 +315,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() )
@@ -354,12 +349,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() )
@@ -441,8 +434,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 )
@@ -469,8 +461,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 )
@@ -545,8 +536,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() )
@@ -596,8 +586,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() )
@@ -921,9 +910,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 af966403ff6b..a5f254257514 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 );
}
@@ -936,16 +934,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 7ddd166b9f50..c5aefca066d5 100644
--- a/basctl/source/dlged/dlgedfac.cxx
+++ b/basctl/source/dlged/dlgedfac.cxx
@@ -166,9 +166,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(...)
@@ -188,9 +186,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 ae73dbabeb67..33c7f8e2549d 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/propacc.cxx b/basic/source/classes/propacc.cxx
index 856b42d2c8eb..2da061bd2d05 100644
--- a/basic/source/classes/propacc.cxx
+++ b/basic/source/classes/propacc.cxx
@@ -207,9 +207,7 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, bool bWrite
xPropAcc->setPropertyValues( *pArg );
// Build a SbUnoObject and return it
- Any aAny;
- aAny <<= xInterface;
- auto xUnoObj = tools::make_ref<SbUnoObject>( "stardiv.uno.beans.PropertySet", aAny );
+ auto xUnoObj = tools::make_ref<SbUnoObject>( "stardiv.uno.beans.PropertySet", Any(xInterface) );
if( xUnoObj->getUnoAny().getValueType().getTypeClass() != TypeClass_VOID )
{
// Return object
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index d0bd0477659e..05f9aba3f4e9 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 ) )
@@ -2991,11 +2989,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
@@ -3046,11 +3041,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
@@ -3076,11 +3068,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 9ffd2e862b08..7bee58d7cb0c 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1396,9 +1396,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;
}
@@ -2011,9 +2009,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 3b37fe40d000..f3cc72c2a91f 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -923,9 +923,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 b478193b583f..d2cce93008f9 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 914629a6271f..824756e7ec36 100644
--- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
@@ -189,9 +189,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/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 1204d3c9c8df..169f37516bcb 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -1198,9 +1198,7 @@ bool EmbeddedObjectContainer::InsertGraphicStream( const css::uno::Reference < c
xPropSet->setPropertyValue("UseCommonStoragePasswordEncryption",
uno::makeAny( true ) );
- uno::Any aAny;
- aAny <<= rMediaType;
- xPropSet->setPropertyValue("MediaType", aAny );
+ xPropSet->setPropertyValue("MediaType", uno::Any(rMediaType) );
xPropSet->setPropertyValue("Compressed",
uno::makeAny( true ) );
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index ed37f51f38a1..2b0b33e2847b 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -201,9 +201,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 6a3f59fc22ee..f1b85212c79e 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 2a261aebd244..de4254289544 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2049,9 +2049,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 =
@@ -2344,14 +2342,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 (...)
{
@@ -2421,9 +2417,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 97f3ffabfc26..556853566a01 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);
@@ -1230,11 +1221,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);
@@ -1252,7 +1241,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 1a2dd6f36d81..124bba8883ee 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 )
{
@@ -806,13 +775,11 @@ 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 )
{
- aAny <<= true;
- maXPropSet->setPropertyValue( "TextAutoGrowHeight", aAny );
+ maXPropSet->setPropertyValue( "TextAutoGrowHeight", uno::Any(true) );
}
uno::Reference< text::XText > xText;
uno::Any aFirstQuery( maXShape->queryInterface( cppu::UnoType<text::XText>::get()));
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 36192106d979..77c2ecfc258b 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -455,7 +455,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 );
@@ -752,20 +751,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 8394c59d0589..88b10d064234 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -328,9 +328,7 @@ void ConvDicNameContainer::AddConvDics(
if (xDic.is())
{
- uno::Any aAny;
- aAny <<= xDic;
- insertByName( xDic->getName(), aAny );
+ insertByName( xDic->getName(), Any(xDic) );
}
}
}
@@ -455,9 +453,7 @@ uno::Reference< XConversionDictionary > SAL_CALL ConvDicList::addNewDictionary(
else
{
xRes->setActive( true );
- uno::Any aAny;
- aAny <<= xRes;
- GetNameContainer().insertByName( rName, aAny );
+ GetNameContainer().insertByName( rName, Any(xRes) );
}
return xRes;
}
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 84cf1f757246..0f58bc48602a 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 8ecb31fbc551..79c42b11be43 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -1339,41 +1339,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 006265f6f1da..8626105cbba9 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 0b0171bc1df9..23bfd0e767f4 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -3159,15 +3159,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 15920edf3554..1e356e950a81 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -562,26 +562,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)
@@ -631,7 +627,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 )
@@ -641,8 +636,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,
@@ -1148,9 +1142,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 2c1809983825..726ef0d17b3e 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -461,11 +461,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&)
{
@@ -480,14 +478,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 7637027c2a7c..526c80ab00bb 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -269,20 +269,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 5a40bcf2a6ee..816a78dc4b72 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 756d028efac6..5da434129969 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2243,9 +2243,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 45a68e64e851..8cba5795a60f 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -210,16 +210,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 c160b8a9c4fa..86fe2a950693 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -325,19 +325,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();
@@ -794,7 +789,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;
@@ -869,8 +863,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
@@ -902,17 +895,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 );
}
@@ -928,14 +917,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 6f58a8580e60..28a9084a66c2 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 301f36b8e379..abe81aa75f36 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -1203,9 +1203,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 );
}
}
@@ -1572,9 +1570,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()
@@ -1634,9 +1630,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()
@@ -1703,9 +1697,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()
@@ -1750,9 +1742,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 4bfa4e76b620..5c3e55214791 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2651,11 +2651,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 45dff69dc894..4c18cc23171e 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -1155,9 +1155,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 7483757f8130..89aa12f6b0b2 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -975,9 +975,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 0af20497d857..1731248eef7e 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 3004c917f451..1c4be5b1eb60 100644
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -92,11 +92,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 0a66ff27ea30..098bcd58d14f 100644
--- a/sdext/source/presenter/PresenterScreen.cxx
+++ b/sdext/source/presenter/PresenterScreen.cxx
@@ -440,9 +440,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 685824919102..051ca2258063 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2182,9 +2182,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) );
}
}
}
@@ -2249,9 +2247,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 28e12befcd2b..e3663e41facb 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1936,11 +1936,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 f8c9d4b43ec0..ab7319a7b7d7 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1710,7 +1710,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);
@@ -1719,19 +1718,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 56467835cab7..6be889c2b9dd 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3205,14 +3205,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++;
}
}
@@ -3524,8 +3522,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 81ada85c2420..27292d8cfbd6 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -321,8 +321,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 f826b4458f7a..1e8d9e667f9e 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 264eafb26eb8..8aa42b0219db 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) );
}
}
}
@@ -1098,12 +1096,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();
@@ -2156,18 +2152,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 aea07edde6e1..b14dd1fa6939 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -327,11 +327,9 @@ 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" );
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 eab715d0fbd1..5f5c94335c63 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 8cf9565d4be4..192d71721783 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1638,9 +1638,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&)
{
@@ -1679,9 +1677,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 6caf85a5c0e9..2f5ce4752af2 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -799,9 +799,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 1d2b7df82c7d..dc036a1546c5 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 9a812cd9ca23..bb0e3a54b726 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 = 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 = 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 6bd9c7f235d5..a969b65cb24b 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 0deeae571dc2..8a8720620360 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 bf2a6fd3a2ab..d448a7f281b7 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 1fd4bc7be5f8..3fba776b7202 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 1d76da96cc27..b2f50acf46fb 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -361,9 +361,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);
@@ -483,9 +481,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);
@@ -548,9 +544,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 f66a46901f09..13fb7a76cd94 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -2404,16 +2404,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 )
@@ -2429,10 +2424,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 6967c98860a6..2fbdd81aabdc 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 12c1e246b4d5..e749b3a3d2c2 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1283,10 +1283,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 ea475c3e1d87..ed7fb7c295a5 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -663,9 +663,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 2ce19b9a639f..5dcfedb3a21c 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -224,21 +224,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()) );
}
}
}
@@ -299,16 +294,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 ad7797d877af..bef855f4010e 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 0f60e55ce8e7..28ff16a5d01d 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -593,9 +593,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)
@@ -930,9 +928,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 );
}
@@ -1050,9 +1046,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 );
}
@@ -1213,20 +1207,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 6febbff43d34..1c742f07efb2 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 , const 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 2cdc0fe3fd25..2264fba931d0 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 a330c2f5632a..e88ef9d403ac 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 5b1613d9df5f..7bf7aca1a7d0 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 acace4e175c5..cc0414a867b2 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -751,16 +751,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 d0181b57239d..313bdcccafc9 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 6dd405ad5d63..8e18a0715842 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 3fd5c366893a..42b40b09a56a 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -735,8 +735,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 &&
@@ -744,8 +743,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);
@@ -763,9 +761,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
@@ -777,9 +773,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 35a51c18f2f9..380b7df711b1 100644
--- a/ucb/source/ucp/ftp/ftpintreq.cxx
+++ b/ucb/source/ucp/ftp/ftpintreq.cxx
@@ -70,11 +70,9 @@ XInteractionRequestImpl::XInteractionRequestImpl()
std::vector<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 baa69a2c0f8e..2940e6ffe412 100644
--- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx
+++ b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
@@ -529,16 +529,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 1d16c9e817b8..7babb6bf7d29 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 58c67b12d9c9..9eabcea5ed0c 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;
}
@@ -317,17 +311,12 @@ void 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 626d2a4c3f5f..e69ec23af97a 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 0826f439ab9c..9cf2280270f1 100644
--- a/xmlhelp/source/cxxhelp/provider/content.cxx
+++ b/xmlhelp/source/cxxhelp/provider/content.cxx
@@ -459,9 +459,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 3ac086f461a6..c6d2ec669391 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
@@ -522,16 +522,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 53b56c71d358..f9074fe91ed4 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -534,10 +534,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 f77ee8d544f1..5cc699f61c38 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -684,9 +684,7 @@ void SchXMLChartContext::EndElement()
{
try
{
- uno::Any aAny;
- aAny <<= maMainTitle;
- xTitleProp->setPropertyValue("String", aAny );
+ xTitleProp->setPropertyValue("String", uno::Any(maMainTitle) );
}
catch(const beans::UnknownPropertyException&)
{
@@ -701,9 +699,7 @@ void SchXMLChartContext::EndElement()
{
try
{
- uno::Any aAny;
- aAny <<= maSubTitle;
- xTitleProp->setPropertyValue("String", aAny );
+ xTitleProp->setPropertyValue("String", uno::Any(maSubTitle) );
}
catch(const beans::UnknownPropertyException&)
{
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 6e59f831f0eb..04b31d872bad 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -204,10 +204,8 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext(
xProp->setPropertyValue("HasZAxis", aFalseBool );
xProp->setPropertyValue("HasZAxisDescription", aFalseBool );
- uno::Any aAny;
chart::ChartDataRowSource eSource = chart::ChartDataRowSource_COLUMNS;
- aAny <<= eSource;
- xProp->setPropertyValue("DataRowSource", aAny );
+ xProp->setPropertyValue("DataRowSource", uno::Any(eSource) );
}
catch( const beans::UnknownPropertyException & )
{
@@ -282,12 +280,8 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
{
try
{
- uno::Any aAny;
- aAny <<= mrColHasLabels;
- xDocProp->setPropertyValue("DataSourceLabelsInFirstColumn", aAny );
-
- aAny <<= mrRowHasLabels;
- xDocProp->setPropertyValue("DataSourceLabelsInFirstRow", aAny );
+ xDocProp->setPropertyValue("DataSourceLabelsInFirstColumn", uno::Any(mrColHasLabels) );
+ xDocProp->setPropertyValue("DataSourceLabelsInFirstRow", uno::Any(mrRowHasLabels) );
}
catch( const beans::UnknownPropertyException & )
{
diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx
index d3421909be04..a3fc7a829948 100644
--- a/xmloff/source/chart/XMLChartStyleContext.cxx
+++ b/xmloff/source/chart/XMLChartStyleContext.cxx
@@ -82,10 +82,8 @@ void lcl_NumberFormatStyleToProperty( const OUString& rStyleName, const OUString
XML_STYLE_FAMILY_DATA_STYLE, rStyleName, true ));
if( pStyle )
{
- uno::Any aNumberFormat;
sal_Int32 nNumberFormat = const_cast<SvXMLNumFormatContext*>(pStyle)->GetKey();
- aNumberFormat <<= nNumberFormat;
- rPropSet->setPropertyValue( rPropertyName, aNumberFormat );
+ rPropSet->setPropertyValue( rPropertyName, uno::Any(nNumberFormat) );
}
}
}
diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx
index eb1fc7caa917..ed811df66157 100644
--- a/xmloff/source/core/unoatrcn.cxx
+++ b/xmloff/source/core/unoatrcn.cxx
@@ -126,9 +126,7 @@ uno::Any SAL_CALL SvUnoAttributeContainer::getByName(const OUString& aName)
aData.Type = "CDATA";
aData.Value = mpContainer->GetAttrValue(nAttr);
- uno::Any aAny;
- aAny <<= aData;
- return aAny;
+ return uno::Any(aData);
}
uno::Sequence< OUString > SAL_CALL SvUnoAttributeContainer::getElementNames() throw( uno::RuntimeException, std::exception )
diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx
index eebd4ba91746..fbdcc941e399 100644
--- a/xmloff/source/core/xmlerror.cxx
+++ b/xmloff/source/core/xmlerror.cxx
@@ -210,10 +210,8 @@ void XMLErrors::ThrowErrorAsSAXException(sal_Int32 nIdMask)
{
// we throw the error
ErrorRecord& rErr = aErrors[0];
- Any aAny;
- aAny <<= rErr.aParams;
throw SAXParseException(
- rErr.sExceptionMessage, nullptr, aAny,
+ rErr.sExceptionMessage, nullptr, Any(rErr.aParams),
rErr.sPublicId, rErr.sSystemId, rErr.nRow, rErr.nColumn );
}
}
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 807e55a4de33..8ed21181dff9 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -555,11 +555,8 @@ SvXMLExport::~SvXMLExport()
{
sal_Int32 nProgressMax(mpProgressBarHelper->GetReference());
sal_Int32 nProgressCurrent(mpProgressBarHelper->GetValue());
- uno::Any aAny;
- aAny <<= nProgressMax;
- mxExportInfo->setPropertyValue(sProgressMax, aAny);
- aAny <<= nProgressCurrent;
- mxExportInfo->setPropertyValue(sProgressCurrent, aAny);
+ mxExportInfo->setPropertyValue(sProgressMax, uno::Any(nProgressMax));
+ mxExportInfo->setPropertyValue(sProgressCurrent, uno::Any(nProgressCurrent));
}
if (xPropertySetInfo->hasPropertyByName(sRepeat))
mxExportInfo->setPropertyValue(sRepeat, css::uno::makeAny(mpProgressBarHelper->GetRepeat()));
@@ -571,9 +568,7 @@ SvXMLExport::~SvXMLExport()
{
uno::Sequence<sal_Int32> aWasUsed;
mpNumExport->GetWasUsed(aWasUsed);
- uno::Any aAny;
- aAny <<= aWasUsed;
- mxExportInfo->setPropertyValue(sWrittenNumberFormats, aAny);
+ mxExportInfo->setPropertyValue(sWrittenNumberFormats, Any(aWasUsed));
}
}
}
@@ -1313,9 +1308,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
::comphelper::GenericPropertySet_CreateInstance(
new ::comphelper::PropertySetInfo( aInfoMap ) ) );
- Any aAny;
- aAny <<= GetXMLToken( eClass );
- xConvPropSet->setPropertyValue( "Class", aAny );
+ xConvPropSet->setPropertyValue( "Class", Any(GetXMLToken( eClass )) );
Reference< XPropertySet > xPropSet =
mxExportInfo.is()
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index f3e897eae52b..3b702cd7afd9 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -574,11 +574,8 @@ void SAL_CALL SvXMLImport::endDocument()
{
sal_Int32 nProgressMax(mpProgressBarHelper->GetReference());
sal_Int32 nProgressCurrent(mpProgressBarHelper->GetValue());
- uno::Any aAny;
- aAny <<= nProgressMax;
- mxImportInfo->setPropertyValue(sProgressMax, aAny);
- aAny <<= nProgressCurrent;
- mxImportInfo->setPropertyValue(sProgressCurrent, aAny);
+ mxImportInfo->setPropertyValue(sProgressMax, uno::Any(nProgressMax));
+ mxImportInfo->setPropertyValue(sProgressCurrent, uno::Any(nProgressCurrent));
}
if (xPropertySetInfo->hasPropertyByName(sRepeat))
mxImportInfo->setPropertyValue(sRepeat, css::uno::makeAny(mpProgressBarHelper->GetRepeat()));
@@ -587,9 +584,7 @@ void SAL_CALL SvXMLImport::endDocument()
OUString sNumberStyles(XML_NUMBERSTYLES);
if (mxNumberStyles.is() && xPropertySetInfo->hasPropertyByName(sNumberStyles))
{
- uno::Any aAny;
- aAny <<= mxNumberStyles;
- mxImportInfo->setPropertyValue(sNumberStyles, aAny);
+ mxImportInfo->setPropertyValue(sNumberStyles, Any(mxNumberStyles));
}
}
}
@@ -1424,9 +1419,7 @@ void SvXMLImport::AddStyleDisplayName( sal_uInt16 nFamily,
{
Reference < XInterface > xIfc(
static_cast< XUnoTunnel *>( mpStyleMap ) );
- Any aAny;
- aAny <<= xIfc;
- mxImportInfo->setPropertyValue( sPrivateData, aAny );
+ mxImportInfo->setPropertyValue( sPrivateData, Any(xIfc) );
}
}
}
@@ -1522,11 +1515,9 @@ void SvXMLImport::AddNumberStyle(sal_Int32 nKey, const OUString& rName)
mxNumberStyles.set( comphelper::NameContainer_createInstance( ::cppu::UnoType<sal_Int32>::get()) );
if (mxNumberStyles.is())
{
- uno::Any aAny;
- aAny <<= nKey;
try
{
- mxNumberStyles->insertByName(rName, aAny);
+ mxNumberStyles->insertByName(rName, Any(nKey));
}
catch ( uno::Exception& )
{
diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx
index 8f361dcd26f2..a502abadaf3d 100644
--- a/xmloff/source/draw/XMLImageMapContext.cxx
+++ b/xmloff/source/draw/XMLImageMapContext.cxx
@@ -220,9 +220,7 @@ void XMLImageMapObjectContext::EndElement()
Prepare( xMapEntry );
// insert into image map
- Any aAny;
- aAny <<= xMapEntry;
- xImageMap->insertByIndex( xImageMap->getCount(), aAny );
+ xImageMap->insertByIndex( xImageMap->getCount(), Any(xMapEntry) );
}
// else: not valid -> don't create and insert
}
@@ -392,9 +390,7 @@ void XMLImageMapRectangleContext::ProcessAttribute(
void XMLImageMapRectangleContext::Prepare(
Reference<XPropertySet> & rPropertySet)
{
- Any aAny;
- aAny <<= aRectangle;
- rPropertySet->setPropertyValue( sBoundary, aAny );
+ rPropertySet->setPropertyValue( sBoundary, uno::Any(aRectangle) );
// common properties handled by super class
XMLImageMapObjectContext::Prepare(rPropertySet);
@@ -480,11 +476,8 @@ void XMLImageMapPolygonContext::Prepare(Reference<XPropertySet> & rPropertySet)
if(aPolygon.count())
{
css::drawing::PointSequence aPointSequence;
- uno::Any aAny;
-
basegfx::tools::B2DPolygonToUnoPointSequence(aPolygon, aPointSequence);
- aAny <<= aPointSequence;
- rPropertySet->setPropertyValue(sPolygon, aAny);
+ rPropertySet->setPropertyValue(sPolygon, Any(aPointSequence));
}
}
@@ -581,13 +574,9 @@ void XMLImageMapCircleContext::Prepare(
Reference<XPropertySet> & rPropertySet)
{
// center (x,y)
- Any aAny;
- aAny <<= aCenter;
- rPropertySet->setPropertyValue( sCenter, aAny );
-
+ rPropertySet->setPropertyValue( sCenter, uno::Any(aCenter) );
// radius
- aAny <<= nRadius;
- rPropertySet->setPropertyValue( sRadius, aAny );
+ rPropertySet->setPropertyValue( sRadius, uno::Any(nRadius) );
// common properties handled by super class
XMLImageMapObjectContext::Prepare(rPropertySet);
diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx
index 0b48378f1331..477aff269c24 100644
--- a/xmloff/source/draw/XMLShapePropertySetContext.cxx
+++ b/xmloff/source/draw/XMLShapePropertySetContext.cxx
@@ -57,10 +57,7 @@ void XMLShapePropertySetContext::EndElement()
pBulletStyle->FillUnoNumRule(xNumRule);
}
- Any aAny;
- aAny <<= xNumRule;
-
- XMLPropertyState aPropState( mnBulletIndex, aAny );
+ XMLPropertyState aPropState( mnBulletIndex, Any(xNumRule) );
mrProperties.push_back( aPropState );
SvXMLPropertySetContext::EndElement();
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 78505e4b9af3..03781227a748 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -550,7 +550,6 @@ void XMLAnimationsEffectContext::EndElement()
try
{
rtl::Reference< XMLShapeImportHelper > xShapeImport( GetImport().GetShapeImport() );
- Any aAny;
if( !maShapeId.isEmpty() )
{
@@ -580,16 +579,13 @@ void XMLAnimationsEffectContext::EndElement()
{
if( meKind == XMLE_DIM )
{
- aAny <<= true;
- xSet->setPropertyValue( mpImpl->msDimPrev, aAny );
+ xSet->setPropertyValue( mpImpl->msDimPrev, Any(true) );
- aAny <<= maDimColor;
- xSet->setPropertyValue( mpImpl->msDimColor, aAny );
+ xSet->setPropertyValue( mpImpl->msDimColor, Any(maDimColor) );
}
else if( meKind == XMLE_PLAY )
{
- aAny <<= true;
- xSet->setPropertyValue( mpImpl->msIsAnimation, aAny );
+ xSet->setPropertyValue( mpImpl->msIsAnimation, Any(true) );
// #i42894# speed is not supported for the old group animation fallback, so no need to set it
// aAny <<= meSpeed;
@@ -599,8 +595,7 @@ void XMLAnimationsEffectContext::EndElement()
{
if( meKind == XMLE_HIDE && !mbTextEffect && meEffect == EK_none )
{
- aAny <<= true;
- xSet->setPropertyValue( mpImpl->msDimHide, aAny );
+ xSet->setPropertyValue( mpImpl->msDimHide, Any(true) );
}
else
{
@@ -622,14 +617,9 @@ void XMLAnimationsEffectContext::EndElement()
{
if( xSet.is() )
{
- aAny <<= maSoundURL;
- xSet->setPropertyValue( mpImpl->msSound, aAny );
-
- aAny <<= mbPlayFull;
- xSet->setPropertyValue( mpImpl->msPlayFull, aAny );
-
- aAny <<= true;
- xSet->setPropertyValue( mpImpl->msSoundOn, aAny );
+ xSet->setPropertyValue( mpImpl->msSound, Any(maSoundURL) );
+ xSet->setPropertyValue( mpImpl->msPlayFull, Any(mbPlayFull) );
+ xSet->setPropertyValue( mpImpl->msSoundOn, Any(true) );
}
else
{
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 80f18e17095d..ecaef3bda4f4 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2156,12 +2156,9 @@ void SdXMLExport::ExportStyles_(bool bUsed)
{
Reference< beans::XPropertySetInfo > xInfoSetInfo( xInfoSet->getPropertySetInfo() );
- Any aAny;
-
if( xInfoSetInfo->hasPropertyByName( msPageLayoutNames ) )
{
- aAny <<= maDrawPagesAutoLayoutNames;
- xInfoSet->setPropertyValue( msPageLayoutNames, aAny );
+ xInfoSet->setPropertyValue( msPageLayoutNames, Any(maDrawPagesAutoLayoutNames) );
}
}
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 41a01c71da9b..ed70149d0574 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2313,9 +2313,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
aStreamURL = aStreamURL.concat( aStr );
}
- uno::Any aAny;
- aAny <<= aStreamURL;
- xPropSet->setPropertyValue( "GraphicStreamURL", aAny );
+ xPropSet->setPropertyValue( "GraphicStreamURL", uno::Any(aStreamURL) );
}
mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 73cb3f7521ea..8608197a73ec 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -786,8 +786,7 @@ void ShapeSortContext::moveShape( sal_Int32 nSourcePos, sal_Int32 nDestPos )
if( xPropSet.is() && xPropSet->getPropertySetInfo()->hasPropertyByName( "ZOrder" ) )
{
- aAny <<= nDestPos;
- xPropSet->setPropertyValue( "ZOrder", aAny );
+ xPropSet->setPropertyValue( "ZOrder", uno::Any(nDestPos) );
for( ZOrderHint& rHint : maZOrderList )
{
@@ -940,8 +939,6 @@ void XMLShapeImportHelper::restoreConnections()
{
if( !mpImpl->maConnections.empty() )
{
- uno::Any aAny;
-
const vector<ConnectionHint>::size_type nCount = mpImpl->maConnections.size();
for( vector<ConnectionHint>::size_type i = 0; i < nCount; i++ )
{
@@ -967,12 +964,10 @@ void XMLShapeImportHelper::restoreConnections()
mrImporter.getInterfaceToIdentifierMapper().getReference( rHint.aDestShapeId ), uno::UNO_QUERY );
if( xShape.is() )
{
- aAny <<= xShape;
- xConnector->setPropertyValue( rHint.bStart ? msStartShape : msEndShape, aAny );
+ xConnector->setPropertyValue( rHint.bStart ? msStartShape : msEndShape, uno::Any(xShape) );
sal_Int32 nGlueId = rHint.nDestGlueId < 4 ? rHint.nDestGlueId : getGluePointId( xShape, rHint.nDestGlueId );
- aAny <<= nGlueId;
- xConnector->setPropertyValue( rHint.bStart ? msStartGluePointIndex : msEndGluePointIndex, aAny );
+ xConnector->setPropertyValue( rHint.bStart ? msStartGluePointIndex : msEndGluePointIndex, uno::Any(nGlueId) );
}
// #86637# restore line deltas
diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx
index 96eb4df63123..557d104bdb31 100644
--- a/xmloff/source/draw/ximp3dobject.cxx
+++ b/xmloff/source/draw/ximp3dobject.cxx
@@ -87,9 +87,7 @@ void SdXML3DObjectContext::StartElement(const uno::Reference< xml::sax::XAttribu
// set parameters
if(mbSetTransform)
{
- uno::Any aAny;
- aAny <<= mxHomMat;
- xPropSet->setPropertyValue("D3DTransformMatrix", aAny);
+ xPropSet->setPropertyValue("D3DTransformMatrix", uno::Any(mxHomMat));
}
// call parent
@@ -188,11 +186,8 @@ void SdXML3DCubeObjectShapeContext::StartElement(const uno::Reference< xml::sax:
aDirection3D.DirectionY = maMaxEdge.getY();
aDirection3D.DirectionZ = maMaxEdge.getZ();
- uno::Any aAny;
- aAny <<= aPosition3D;
- xPropSet->setPropertyValue("D3DPosition", aAny);
- aAny <<= aDirection3D;
- xPropSet->setPropertyValue("D3DSize", aAny);
+ xPropSet->setPropertyValue("D3DPosition", uno::Any(aPosition3D));
+ xPropSet->setPropertyValue("D3DSize", uno::Any(aDirection3D));
}
}
}
@@ -285,11 +280,8 @@ void SdXML3DSphereObjectShapeContext::StartElement(const uno::Reference< xml::sa
aDirection3D.DirectionY = maSize.getY();
aDirection3D.DirectionZ = maSize.getZ();
- uno::Any aAny;
- aAny <<= aPosition3D;
- xPropSet->setPropertyValue("D3DPosition", aAny);
- aAny <<= aDirection3D;
- xPropSet->setPropertyValue("D3DSize", aAny);
+ xPropSet->setPropertyValue("D3DPosition", uno::Any(aPosition3D));
+ xPropSet->setPropertyValue("D3DSize", uno::Any(aDirection3D));
}
}
}
@@ -364,9 +356,7 @@ void SdXML3DPolygonBasedShapeContext::StartElement(const uno::Reference< xml::sa
aPolyPolygon3D);
// set polygon data
- uno::Any aAny;
- aAny <<= aPolyPolygon3D;
- xPropSet->setPropertyValue("D3DPolyPolygon3D", aAny);
+ xPropSet->setPropertyValue("D3DPolyPolygon3D", uno::Any(aPolyPolygon3D));
}
else
{
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index 666306d48dc3..7680acf0bfbb 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -352,33 +352,21 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const css::uno::Reference
// world transformation
if(mbSetTransform)
{
- aAny <<= mxHomMat;
- xPropSet->setPropertyValue("D3DTransformMatrix", aAny);
+ xPropSet->setPropertyValue("D3DTransformMatrix", uno::Any(mxHomMat));
}
// distance
- aAny <<= mnDistance;
- xPropSet->setPropertyValue("D3DSceneDistance", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneDistance", uno::Any(mnDistance));
// focalLength
- aAny <<= mnFocalLength;
- xPropSet->setPropertyValue("D3DSceneFocalLength", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneFocalLength", uno::Any(mnFocalLength));
// shadowSlant
- aAny <<= (sal_Int16)mnShadowSlant;
- xPropSet->setPropertyValue("D3DSceneShadowSlant", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneShadowSlant", uno::Any((sal_Int16)mnShadowSlant));
// shadeMode
- aAny <<= mxShadeMode;
- xPropSet->setPropertyValue("D3DSceneShadeMode", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneShadeMode", uno::Any(mxShadeMode));
// ambientColor
- aAny <<= maAmbientColor;
- xPropSet->setPropertyValue("D3DSceneAmbientColor", aAny);
-
+ xPropSet->setPropertyValue("D3DSceneAmbientColor", uno::Any(maAmbientColor));
// lightingMode
- aAny <<= mbLightingMode;
- xPropSet->setPropertyValue("D3DSceneTwoSidedLighting", aAny);
+ xPropSet->setPropertyValue("D3DSceneTwoSidedLighting", uno::Any(mbLightingMode));
if( !maList.empty() )
{
@@ -472,13 +460,11 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const css::uno::Reference
aCamGeo.vup.DirectionX = maVUP.getX();
aCamGeo.vup.DirectionY = maVUP.getY();
aCamGeo.vup.DirectionZ = maVUP.getZ();
- aAny <<= aCamGeo;
- xPropSet->setPropertyValue("D3DCameraGeometry", aAny);
+ xPropSet->setPropertyValue("D3DCameraGeometry", uno::Any(aCamGeo));
// #91047# set drawing::ProjectionMode AFTER camera geometry is set
// projection "D3DScenePerspective" drawing::ProjectionMode
- aAny <<= mxPrjMode;
- xPropSet->setPropertyValue("D3DScenePerspective", aAny);
+ xPropSet->setPropertyValue("D3DScenePerspective", uno::Any(mxPrjMode));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 742b764a2e1c..b5249a88d087 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -507,28 +507,13 @@ void SdXMLGenericPageContext::SetPageMaster( OUString& rsPageMasterName )
Reference <beans::XPropertySet> xPropSet(xMasterPage, uno::UNO_QUERY);
if(xPropSet.is())
{
- uno::Any aAny;
-
- aAny <<= pPageMasterContext->GetBorderBottom();
- xPropSet->setPropertyValue("BorderBottom", aAny);
-
- aAny <<= pPageMasterContext->GetBorderLeft();
- xPropSet->setPropertyValue("BorderLeft", aAny);
-
- aAny <<= pPageMasterContext->GetBorderRight();
- xPropSet->setPropertyValue("BorderRight", aAny);
-
- aAny <<= pPageMasterContext->GetBorderTop();
- xPropSet->setPropertyValue("BorderTop", aAny);
-
- aAny <<= pPageMasterContext->GetWidth();
- xPropSet->setPropertyValue("Width", aAny);
-
- aAny <<= pPageMasterContext->GetHeight();
- xPropSet->setPropertyValue("Height", aAny);
-
- aAny <<= pPageMasterContext->GetOrientation();
- xPropSet->setPropertyValue("Orientation", aAny);
+ xPropSet->setPropertyValue("BorderBottom", Any(pPageMasterContext->GetBorderBottom()));
+ xPropSet->setPropertyValue("BorderLeft", Any(pPageMasterContext->GetBorderLeft()));
+ xPropSet->setPropertyValue("BorderRight", Any(pPageMasterContext->GetBorderRight()));
+ xPropSet->setPropertyValue("BorderTop", Any(pPageMasterContext->GetBorderTop()));
+ xPropSet->setPropertyValue("Width", Any(pPageMasterContext->GetWidth()));
+ xPropSet->setPropertyValue("Height", Any(pPageMasterContext->GetHeight()));
+ xPropSet->setPropertyValue("Orientation", Any(pPageMasterContext->GetOrientation()));
}
}
}
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index f1fd887e64e4..b3109c915c3f 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -570,7 +570,6 @@ void SdXMLShapeContext::SetTransformation()
}
// now set transformation for this object
- uno::Any aAny;
drawing::HomogenMatrix3 aMatrix;
aMatrix.Line1.Column1 = maUsedTransformation.get(0, 0);
@@ -585,9 +584,7 @@ void SdXMLShapeContext::SetTransformation()
aMatrix.Line3.Column2 = maUsedTransformation.get(2, 1);
aMatrix.Line3.Column3 = maUsedTransformation.get(2, 2);
- aAny <<= aMatrix;
-
- xPropSet->setPropertyValue("Transformation", aAny);
+ xPropSet->setPropertyValue("Transformation", Any(aMatrix));
}
}
}
@@ -691,9 +688,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
try
{
// set style on object
- uno::Any aAny;
- aAny <<= xStyle;
- xPropSet->setPropertyValue("Style", aAny);
+ xPropSet->setPropertyValue("Style", Any(xStyle));
}
catch(const uno::Exception&)
{
@@ -749,10 +744,7 @@ void SdXMLShapeContext::SetLayer()
uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY);
if(xPropSet.is() )
{
- uno::Any aAny;
- aAny <<= maLayerName;
-
- xPropSet->setPropertyValue("LayerName", aAny);
+ xPropSet->setPropertyValue("LayerName", Any(maLayerName));
return;
}
}
@@ -1163,14 +1155,12 @@ void SdXMLLineShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
drawing::PointSequence* pOuterSequence = aPolyPoly.getArray();
pOuterSequence->realloc(2L);
awt::Point* pInnerSequence = pOuterSequence->getArray();
- uno::Any aAny;
*pInnerSequence = awt::Point( mnX1 - aTopLeft.X, mnY1 - aTopLeft.Y);
pInnerSequence++;
*pInnerSequence = awt::Point( mnX2 - aTopLeft.X, mnY2 - aTopLeft.Y);
- aAny <<= aPolyPoly;
- xPropSet->setPropertyValue("Geometry", aAny);
+ xPropSet->setPropertyValue("Geometry", Any(aPolyPoly));
}
// set sizes for transformation
@@ -1304,15 +1294,9 @@ void SdXMLEllipseShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY );
if( xPropSet.is() )
{
- uno::Any aAny;
- aAny <<= (drawing::CircleKind)meKind;
- xPropSet->setPropertyValue("CircleKind", aAny );
-
- aAny <<= mnStartAngle;
- xPropSet->setPropertyValue("CircleStartAngle", aAny );
-
- aAny <<= mnEndAngle;
- xPropSet->setPropertyValue("CircleEndAngle", aAny );
+ xPropSet->setPropertyValue("CircleKind", Any( (drawing::CircleKind)meKind) );
+ xPropSet->setPropertyValue("CircleStartAngle", Any(mnStartAngle) );
+ xPropSet->setPropertyValue("CircleEndAngle", Any(mnEndAngle) );
}
}
@@ -1411,11 +1395,8 @@ void SdXMLPolygonShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
}
css::drawing::PointSequenceSequence aPointSequenceSequence;
- uno::Any aAny;
-
basegfx::tools::B2DPolyPolygonToUnoPointSequenceSequence(basegfx::B2DPolyPolygon(aPolygon), aPointSequenceSequence);
- aAny <<= aPointSequenceSequence;
- xPropSet->setPropertyValue("Geometry", aAny);
+ xPropSet->setPropertyValue("Geometry", Any(aPointSequenceSequence));
}
}
}
@@ -2040,24 +2021,12 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- uno::Any aAny;
- aAny <<= maStart;
- xProps->setPropertyValue("StartPosition", aAny);
-
- aAny <<= maEnd;
- xProps->setPropertyValue("EndPosition", aAny );
-
- aAny <<= (drawing::ConnectorType)mnType;
- xProps->setPropertyValue("EdgeKind", aAny );
-
- aAny <<= mnDelta1;
- xProps->setPropertyValue("EdgeLine1Delta", aAny );
-
- aAny <<= mnDelta2;
- xProps->setPropertyValue("EdgeLine2Delta", aAny );
-
- aAny <<= mnDelta3;
- xProps->setPropertyValue("EdgeLine3Delta", aAny );
+ xProps->setPropertyValue("StartPosition", Any(maStart));
+ xProps->setPropertyValue("EndPosition", Any(maEnd) );
+ xProps->setPropertyValue("EdgeKind", Any((drawing::ConnectorType)mnType) );
+ xProps->setPropertyValue("EdgeLine1Delta", Any(mnDelta1) );
+ xProps->setPropertyValue("EdgeLine2Delta", Any(mnDelta2) );
+ xProps->setPropertyValue("EdgeLine3Delta", Any(mnDelta3) );
}
SetStyle();
SetLayer();
@@ -2166,12 +2135,8 @@ void SdXMLMeasureShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- uno::Any aAny;
- aAny <<= maStart;
- xProps->setPropertyValue("StartPosition", aAny);
-
- aAny <<= maEnd;
- xProps->setPropertyValue("EndPosition", aAny );
+ xProps->setPropertyValue("StartPosition", Any(maStart));
+ xProps->setPropertyValue("EndPosition", Any(maEnd) );
}
// delete pre created fields
@@ -2605,8 +2570,7 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri
const OUString aCLSID( "12DCAE26-281F-416F-a234-c3086127382e");
- aAny <<= aCLSID;
- xProps->setPropertyValue("CLSID", aAny );
+ xProps->setPropertyValue("CLSID", Any(aCLSID) );
aAny = xProps->getPropertyValue("Model");
uno::Reference< frame::XModel > xChartModel;
@@ -2942,49 +2906,40 @@ void SdXMLAppletShapeContext::EndElement()
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- uno::Any aAny;
-
if ( maSize.Width && maSize.Height )
{
// the visual area for applet must be set on loading
awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height );
- aAny <<= aRect;
- xProps->setPropertyValue("VisibleArea", aAny );
+ xProps->setPropertyValue("VisibleArea", Any(aRect) );
}
if( maParams.getLength() )
{
- aAny <<= maParams;
- xProps->setPropertyValue("AppletCommands", aAny );
+ xProps->setPropertyValue("AppletCommands", Any(maParams) );
}
if( !maHref.isEmpty() )
{
- aAny <<= maHref;
- xProps->setPropertyValue("AppletCodeBase", aAny );
+ xProps->setPropertyValue("AppletCodeBase", Any(maHref) );
}
if( !maAppletName.isEmpty() )
{
- aAny <<= maAppletName;
- xProps->setPropertyValue("AppletName", aAny );
+ xProps->setPropertyValue("AppletName", Any(maAppletName) );
}
if( mbIsScript )
{
- aAny <<= mbIsScript;
- xProps->setPropertyValue("AppletIsScript", aAny );
+ xProps->setPropertyValue("AppletIsScript", Any(mbIsScript) );
}
if( !maAppletCode.isEmpty() )
{
- aAny <<= maAppletCode;
- xProps->setPropertyValue("AppletCode", aAny );
+ xProps->setPropertyValue("AppletCode", Any(maAppletCode) );
}
- aAny <<= OUString( GetImport().GetDocumentBase() );
- xProps->setPropertyValue("AppletDocBase", aAny );
+ xProps->setPropertyValue("AppletDocBase", Any(GetImport().GetDocumentBase()) );
SetThumbnail();
}
@@ -3163,8 +3118,6 @@ void SdXMLPluginShapeContext::EndElement()
if( xProps.is() )
{
- uno::Any aAny;
-
if ( maSize.Width && maSize.Height )
{
const OUString sVisibleArea( "VisibleArea" );
@@ -3173,8 +3126,7 @@ void SdXMLPluginShapeContext::EndElement()
{
// the visual area for a plugin must be set on loading
awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height );
- aAny <<= aRect;
- xProps->setPropertyValue( sVisibleArea, aAny );
+ xProps->setPropertyValue( sVisibleArea, Any(aRect) );
}
}
@@ -3183,20 +3135,17 @@ void SdXMLPluginShapeContext::EndElement()
// in case we have a plugin object
if( maParams.getLength() )
{
- aAny <<= maParams;
- xProps->setPropertyValue("PluginCommands", aAny );
+ xProps->setPropertyValue("PluginCommands", Any(maParams) );
}
if( !maMimeType.isEmpty() )
{
- aAny <<= maMimeType;
- xProps->setPropertyValue("PluginMimeType", aAny );
+ xProps->setPropertyValue("PluginMimeType", Any(maMimeType) );
}
if( !maHref.isEmpty() )
{
- aAny <<= maHref;
- xProps->setPropertyValue("PluginURL", aAny );
+ xProps->setPropertyValue("PluginURL", Any(maHref) );
}
}
else
@@ -3338,18 +3287,14 @@ void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< cs
uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
- uno::Any aAny;
-
if( !maFrameName.isEmpty() )
{
- aAny <<= maFrameName;
- xProps->setPropertyValue("FrameName", aAny );
+ xProps->setPropertyValue("FrameName", Any(maFrameName) );
}
if( !maHref.isEmpty() )
{
- aAny <<= maHref;
- xProps->setPropertyValue("FrameURL", aAny );
+ xProps->setPropertyValue("FrameURL", Any(maHref) );
}
}
@@ -3393,9 +3338,7 @@ void SdXMLFloatingFrameShapeContext::EndElement()
{
// the visual area for a floating frame must be set on loading
awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height );
- uno::Any aAny;
- aAny <<= aRect;
- xProps->setPropertyValue("VisibleArea", aAny );
+ xProps->setPropertyValue("VisibleArea", Any(aRect) );
}
}
@@ -3772,15 +3715,11 @@ void SdXMLCustomShapeContext::StartElement( const uno::Reference< xml::sax::XAtt
{
if ( !maCustomShapeEngine.isEmpty() )
{
- uno::Any aAny;
- aAny <<= maCustomShapeEngine;
- xPropSet->setPropertyValue( EASGet( EAS_CustomShapeEngine ), aAny );
+ xPropSet->setPropertyValue( EASGet( EAS_CustomShapeEngine ), Any(maCustomShapeEngine) );
}
if ( !maCustomShapeData.isEmpty() )
{
- uno::Any aAny;
- aAny <<= maCustomShapeData;
- xPropSet->setPropertyValue( EASGet( EAS_CustomShapeData ), aAny );
+ xPropSet->setPropertyValue( EASGet( EAS_CustomShapeData ), Any(maCustomShapeData) );
}
}
}
@@ -3864,9 +3803,7 @@ void SdXMLCustomShapeContext::EndElement()
uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY );
if( xPropSet.is() )
{
- uno::Any aAny;
- aAny <<= aSeq;
- xPropSet->setPropertyValue( sCustomShapeGeometry, aAny );
+ xPropSet->setPropertyValue( sCustomShapeGeometry, Any(aSeq) );
}
}
catch(const uno::Exception&)
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index 0b5efd5a7b0b..c24228673bb1 100644
--- a/xmloff/source/draw/ximpshow.cxx
+++ b/xmloff/source/draw/ximpshow.cxx
@@ -96,8 +96,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
case XML_NAMESPACE_PRESENTATION:
if( IsXMLToken( aLocalName, XML_START_PAGE ) )
{
- aAny <<= sValue;
- mpImpl->mxPresProps->setPropertyValue("FirstPage", aAny );
+ mpImpl->mxPresProps->setPropertyValue("FirstPage", Any(sValue) );
bAll = false;
}
else if( IsXMLToken( aLocalName, XML_SHOW ) )
@@ -113,8 +112,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
const sal_Int32 nMS = (aDuration.Hours * 60 +
aDuration.Minutes) * 60 + aDuration.Seconds;
- aAny <<= nMS;
- mpImpl->mxPresProps->setPropertyValue("Pause", aAny );
+ mpImpl->mxPresProps->setPropertyValue("Pause", Any(nMS) );
}
else if( IsXMLToken( aLocalName, XML_ANIMATIONS ) )
{
@@ -168,8 +166,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c
}
}
}
- aAny <<= bAll;
- mpImpl->mxPresProps->setPropertyValue("IsShowAll", aAny );
+ mpImpl->mxPresProps->setPropertyValue("IsShowAll", Any(bAll) );
}
}
@@ -220,7 +217,6 @@ SvXMLImportContext * SdXMLShowsContext::CreateChildContext( sal_uInt16 p_nPrefix
{
SvXMLTokenEnumerator aPageNames( aPages, ',' );
OUString sPageName;
- Any aAny;
while( aPageNames.getNextToken( sPageName ) )
{
@@ -231,13 +227,12 @@ SvXMLImportContext * SdXMLShowsContext::CreateChildContext( sal_uInt16 p_nPrefix
mpImpl->mxPages->getByName( sPageName ) >>= xPage;
if( xPage.is() )
{
- aAny <<= xPage;
- xShow->insertByIndex( xShow->getCount(), aAny );
+ xShow->insertByIndex( xShow->getCount(), Any(xPage) );
}
}
+ Any aAny;
aAny <<= xShow;
-
if( mpImpl->mxShows->hasByName( aName ) )
{
mpImpl->mxShows->replaceByName( aName, aAny );
diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx
index 65161eb13b8e..eef8e3adf1a4 100644
--- a/xmloff/source/meta/MetaExportComponent.cxx
+++ b/xmloff/source/meta/MetaExportComponent.cxx
@@ -90,9 +90,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum )
::comphelper::GenericPropertySet_CreateInstance(
new ::comphelper::PropertySetInfo( aInfoMap ) ) );
- uno::Any aAny;
- aAny <<= GetXMLToken( XML_TEXT );
- xConvPropSet->setPropertyValue("Class", aAny );
+ xConvPropSet->setPropertyValue("Class", uno::Any(GetXMLToken( XML_TEXT )) );
uno::Reference< beans::XPropertySet > xPropSet =
getExportInfo().is()
diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx
index 9e7c3be94114..07ffa2f048b0 100644
--- a/xmloff/source/script/XMLEventsImportContext.cxx
+++ b/xmloff/source/script/XMLEventsImportContext.cxx
@@ -188,12 +188,9 @@ void XMLEventsImportContext::AddEventValues(
// set event (if name is known)
if (xEvents->hasByName(rEventName))
{
- Any aAny;
- aAny <<= rValues;
-
try
{
- xEvents->replaceByName(rEventName, aAny);
+ xEvents->replaceByName(rEventName, Any(rValues));
} catch ( const IllegalArgumentException & rException )
{
Sequence<OUString> aMsgParams { rEventName };
diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
index 83775bdd2976..df2b277821cc 100644
--- a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
+++ b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
@@ -163,43 +163,35 @@ void XMLFootnoteSeparatorImport::StartElement(
}
// OK, now we have all values and can fill the XMLPropertyState vector
- Any aAny;
sal_Int32 nIndex;
- aAny <<= eLineAdjust;
nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_ADJUST);
- XMLPropertyState aLineAdjust( nIndex, aAny);
+ XMLPropertyState aLineAdjust( nIndex, uno::Any(eLineAdjust));
rProperties.push_back(aLineAdjust);
- aAny <<= nLineColor;
nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_COLOR);
- XMLPropertyState aLineColor( nIndex, aAny );
+ XMLPropertyState aLineColor( nIndex, uno::Any(nLineColor) );
rProperties.push_back(aLineColor);
- aAny <<= nLineStyle;
nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_STYLE);
- XMLPropertyState aLineStyle( nIndex, aAny );
+ XMLPropertyState aLineStyle( nIndex, uno::Any(nLineStyle) );
rProperties.push_back(aLineStyle);
- aAny <<= nLineDistance;
nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_DISTANCE);
- XMLPropertyState aLineDistance( nIndex, aAny );
+ XMLPropertyState aLineDistance( nIndex, uno::Any(nLineDistance) );
rProperties.push_back(aLineDistance);
- aAny <<= nLineRelWidth;
nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_WIDTH);
- XMLPropertyState aLineRelWidth( nIndex, aAny);
+ XMLPropertyState aLineRelWidth( nIndex, uno::Any(nLineRelWidth));
rProperties.push_back(aLineRelWidth);
- aAny <<= nLineTextDistance;
nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_DISTANCE);
- XMLPropertyState aLineTextDistance( nIndex, aAny);
+ XMLPropertyState aLineTextDistance( nIndex, uno::Any(nLineTextDistance));
rProperties.push_back(aLineTextDistance);
DBG_ASSERT( rMapper->FindEntryIndex(CTF_PM_FTN_LINE_WEIGHT) == nPropIndex,
"Received wrong property map index!" );
- aAny <<= nLineWeight;
- XMLPropertyState aLineWeight( nPropIndex, aAny );
+ XMLPropertyState aLineWeight( nPropIndex, uno::Any(nLineWeight) );
rProperties.push_back(aLineWeight);
}
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index d97a8bd2815a..5f03fd31d48c 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -363,9 +363,7 @@ void XMLPropStyleContext::CreateAndInsert( bool bOverwrite )
if( !mxStyle.is() )
return;
- Any aAny;
- aAny <<= mxStyle;
- xFamilies->insertByName( rName, aAny );
+ xFamilies->insertByName( rName, Any(mxStyle) );
bNew = true;
}
@@ -501,8 +499,7 @@ void XMLPropStyleContext::Finish( bool bOverwrite )
aAny >>= sCurrFollow;
if( sCurrFollow != sFollow )
{
- aAny <<= sFollow;
- xPropSet->setPropertyValue( msFollowStyle, aAny );
+ xPropSet->setPropertyValue( msFollowStyle, Any(sFollow) );
}
}
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index b841e599876d..ab4bfbe39a2e 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -282,9 +282,7 @@ void SvXMLImportPropertyMapper::importXML(
// #106963#; use userdefined attribute only if it is in the specified property range
if( nIndex != -1 && nIndex >= nStartIdx && nIndex < nEndIdx)
{
- Any aAny;
- aAny <<= xAttrContainer;
- XMLPropertyState aNewProperty( nIndex, aAny );
+ XMLPropertyState aNewProperty( nIndex, Any(xAttrContainer) );
// push it on our stack so we export it later
rProperties.push_back( aNewProperty );
@@ -307,9 +305,7 @@ void SvXMLImportPropertyMapper::importXML(
sName.append( aLocalName );
- Any aAny;
- aAny <<= aData;
- xAttrContainer->insertByName( sName.makeStringAndClear(), aAny );
+ xAttrContainer->insertByName( sName.makeStringAndClear(), Any(aData) );
}
}
}
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index 8b0aa079c32d..ee4cfdcdd78c 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -540,14 +540,12 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
}
else
{
- Any aAny;
OUString sTemp;
const SvXMLUnitConverter& rUnitConv =
GetExport().GetMM100UnitConverter();
XMLFontFamilyNamePropHdl aFamilyNameHdl;
- aAny <<= sBulletFontName;
- if( aFamilyNameHdl.exportXML( sTemp, aAny, rUnitConv ) )
+ if( aFamilyNameHdl.exportXML( sTemp, Any(sBulletFontName), rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_FO,
XML_FONT_FAMILY, sTemp );
@@ -557,21 +555,18 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
sBulletFontStyleName );
XMLFontFamilyPropHdl aFamilyHdl;
- aAny <<= (sal_Int16)eBulletFontFamily;
- if( aFamilyHdl.exportXML( sTemp, aAny, rUnitConv ) )
+ if( aFamilyHdl.exportXML( sTemp, Any((sal_Int16)eBulletFontFamily), rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_FONT_FAMILY_GENERIC,
sTemp );
XMLFontPitchPropHdl aPitchHdl;
- aAny <<= (sal_Int16)eBulletFontPitch;
- if( aPitchHdl.exportXML( sTemp, aAny, rUnitConv ) )
+ if( aPitchHdl.exportXML( sTemp, Any((sal_Int16)eBulletFontPitch), rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_FONT_PITCH, sTemp );
XMLFontEncodingPropHdl aEncHdl;
- aAny <<= (sal_Int16)eBulletFontEncoding;
- if( aEncHdl.exportXML( sTemp, aAny, rUnitConv ) )
+ if( aEncHdl.exportXML( sTemp, Any((sal_Int16)eBulletFontEncoding), rUnitConv ) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_FONT_CHARSET, sTemp );
}
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 09280f2291f5..0a8b5b6823c6 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -1098,9 +1098,7 @@ void SvxXMLListStyleContext::FillUnoNumRule(
{
Sequence<beans::PropertyValue> aProps =
pLevelStyle->GetProperties();
- Any aAny;
- aAny <<= aProps;
- rNumRule->replaceByIndex( nLevel, aAny );
+ rNumRule->replaceByIndex( nLevel, Any(aProps) );
}
}
}
@@ -1175,9 +1173,7 @@ void SvxXMLListStyleContext::CreateAndInsertLate( bool bOverwrite )
if( !xStyle.is() )
return;
- Any aAny;
- aAny <<= xStyle;
- rNumStyles->insertByName( rName, aAny );
+ rNumStyles->insertByName( rName, Any(xStyle) );
bNew = true;
}
@@ -1203,8 +1199,7 @@ void SvxXMLListStyleContext::CreateAndInsertLate( bool bOverwrite )
if( bOverwrite || bNew )
{
FillUnoNumRule(xNumRules);
- aAny <<= xNumRules;
- xPropSet->setPropertyValue( sNumberingRules, aAny );
+ xPropSet->setPropertyValue( sNumberingRules, Any(xNumRules) );
}
else
{
@@ -1291,9 +1286,7 @@ void SvxXMLListStyleContext::SetDefaultStyle(
(pProps++)->Value <<= OUString( "Numbering Symbols" );
}
- Any aAny;
- aAny <<= aPropSeq;
- rNumRule->replaceByIndex( nLevel, aAny );
+ rNumRule->replaceByIndex( nLevel, Any(aPropSeq) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/XMLCalculationSettingsContext.cxx b/xmloff/source/text/XMLCalculationSettingsContext.cxx
index 95d5deb0ee89..ad4d8463133c 100644
--- a/xmloff/source/text/XMLCalculationSettingsContext.cxx
+++ b/xmloff/source/text/XMLCalculationSettingsContext.cxx
@@ -76,9 +76,7 @@ void XMLCalculationSettingsContext::EndElement()
{
Reference < XPropertySet > xPropSet ( xTextDoc, UNO_QUERY );
OUString sTwoDigitYear ( "TwoDigitYear" );
- Any aAny;
- aAny <<= nYear;
- xPropSet->setPropertyValue ( sTwoDigitYear, aAny );
+ xPropSet->setPropertyValue ( sTwoDigitYear, Any(nYear) );
}
}
}
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
index a2e16843d0b2..786c5686309a 100644
--- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -385,11 +385,9 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings(
rConfig->setPropertyValue(sPropertyParagraphStyleName, aAny);
}
- aAny <<= sPrefix;
- rConfig->setPropertyValue(sPropertyPrefix, aAny);
+ rConfig->setPropertyValue(sPropertyPrefix, Any(sPrefix));
- aAny <<= sSuffix;
- rConfig->setPropertyValue(sPropertySuffix, aAny);
+ rConfig->setPropertyValue(sPropertySuffix, Any(sSuffix));
sal_Int16 nNumType = NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType, sNumFormat,
@@ -399,24 +397,16 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings(
if( NumberingType::CHAR_SPECIAL == nNumType )
nNumType = NumberingType::ARABIC;
- aAny <<= nNumType;
- rConfig->setPropertyValue(sPropertyNumberingType, aAny);
+ rConfig->setPropertyValue(sPropertyNumberingType, Any(nNumType));
- aAny <<= nOffset;
- rConfig->setPropertyValue(sPropertyStartAt, aAny);
+ rConfig->setPropertyValue(sPropertyStartAt, Any(nOffset));
if (!bIsEndnote)
{
rConfig->setPropertyValue(sPropertyPositionEndOfDoc, Any(bPosition));
-
- aAny <<= nNumbering;
- rConfig->setPropertyValue(sPropertyFootnoteCounting, aAny);
-
- aAny <<= sEndNotice;
- rConfig->setPropertyValue(sPropertyEndNotice, aAny);
-
- aAny <<= sBeginNotice;
- rConfig->setPropertyValue(sPropertyBeginNotice, aAny);
+ rConfig->setPropertyValue(sPropertyFootnoteCounting, Any(nNumbering));
+ rConfig->setPropertyValue(sPropertyEndNotice, Any(sEndNotice));
+ rConfig->setPropertyValue(sPropertyBeginNotice, Any(sBeginNotice));
}
}
diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
index ebf106523ee0..65a5d7afb77a 100644
--- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
@@ -211,8 +211,7 @@ void XMLIndexAlphabeticalSourceContext::EndElement()
if (!sAlgorithm.isEmpty())
{
- aAny <<= sAlgorithm;
- rIndexPropertySet->setPropertyValue(sSortAlgorithm, aAny);
+ rIndexPropertySet->setPropertyValue(sSortAlgorithm, css::uno::Any(sAlgorithm));
}
if ( !maLanguageTagODF.isEmpty() )
diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
index 5ed4f8fc963a..8e961ea92606 100644
--- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
@@ -195,14 +195,11 @@ SvXMLImportContext *XMLIndexBibliographyConfigurationContext::CreateChildContext
if (SvXMLUnitConverter::convertEnum(nKey, sKey,
aBibliographyDataFieldMap))
{
-
- Any aAny;
Sequence<PropertyValue> aKey(2);
PropertyValue aNameValue;
aNameValue.Name = sSortKey;
- aAny <<= (sal_Int16)nKey;
- aNameValue.Value = aAny;
+ aNameValue.Value = Any((sal_Int16)nKey);
aKey[0] = aNameValue;
PropertyValue aSortValue;
@@ -250,14 +247,9 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
Reference<XPropertySet> xPropSet( xIfc, UNO_QUERY );
Any aAny;
- aAny <<= sSuffix;
- xPropSet->setPropertyValue(sBracketAfter, aAny);
-
- aAny <<= sPrefix;
- xPropSet->setPropertyValue(sBracketBefore, aAny);
-
+ xPropSet->setPropertyValue(sBracketAfter, Any(sSuffix));
+ xPropSet->setPropertyValue(sBracketBefore, Any(sPrefix));
xPropSet->setPropertyValue(sIsNumberEntries, Any(bNumberedEntries));
-
xPropSet->setPropertyValue(sIsSortByPosition, Any(bSortByPosition));
if( !maLanguageTagODF.isEmpty() )
@@ -268,8 +260,7 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
if( !sAlgorithm.isEmpty() )
{
- aAny <<= sAlgorithm;
- xPropSet->setPropertyValue(sSortAlgorithm, aAny);
+ xPropSet->setPropertyValue(sSortAlgorithm, Any(sAlgorithm));
}
sal_Int32 nCount = aSortKeys.size();
@@ -278,8 +269,7 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(bool)
{
aKeysSeq[i] = aSortKeys[i];
}
- aAny <<= aKeysSeq;
- xPropSet->setPropertyValue(sSortKeys, aAny);
+ xPropSet->setPropertyValue(sSortKeys, Any(aKeysSeq));
}
// else: can't get FieldMaster -> ignore
}
diff --git a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
index 3930021e56a6..b5809421b81e 100644
--- a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
@@ -155,9 +155,7 @@ void XMLIndexBibliographyEntryContext::FillPropertyValues(
// bibliography data field
sal_Int32 nIndex = bCharStyleNameOK ? 2 : 1;
rValues[nIndex].Name = rTemplateContext.sBibliographyDataField;
- Any aAny;
- aAny <<= nBibliographyInfo;
- rValues[nIndex].Value = aAny;
+ rValues[nIndex].Value = css::uno::Any(nBibliographyInfo);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
index 8b1f0c0d0424..c71cd9fedcc9 100644
--- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
@@ -177,17 +177,13 @@ void XMLIndexChapterInfoEntryContext::FillPropertyValues(
{
// chapter info field
rValues[nIndex].Name = rTemplateContext.sChapterFormat;
- Any aAny;
- aAny <<= nChapterInfo;
- rValues[nIndex].Value = aAny;
+ rValues[nIndex].Value = css::uno::Any(nChapterInfo);
nIndex++;
}
if( bOutlineLevelOK )
{
rValues[nIndex].Name = rTemplateContext.sChapterLevel;
- Any aAny;
- aAny <<= nOutlineLevel;
- rValues[nIndex].Value = aAny;
+ rValues[nIndex].Value = css::uno::Any(nOutlineLevel);
}
}
diff --git a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
index 59d1ca1af750..f31e3875e585 100644
--- a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
@@ -108,8 +108,7 @@ void XMLIndexSimpleEntryContext::FillPropertyValues(
// token type
rValues[0].Name = rTemplateContext.sTokenType;
- aAny <<= rEntryType;
- rValues[0].Value = aAny;
+ rValues[0].Value = css::uno::Any(rEntryType);
// char style
if (bCharStyleNameOK)
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index 2e82090ae777..78d682dcf660 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -240,13 +240,11 @@ void XMLIndexTOCContext::StartElement(
pStyle->FillPropertySet( xTOCPropertySet );
}
- Any aAny;
xTOCPropertySet->setPropertyValue( sIsProtected, Any(bProtected) );
if (!sIndexName.isEmpty())
{
- aAny <<= sIndexName;
- xTOCPropertySet->setPropertyValue( sName, aAny );
+ xTOCPropertySet->setPropertyValue( sName, Any(sIndexName) );
}
}
}
diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.cxx b/xmloff/source/text/XMLIndexTOCSourceContext.cxx
index 3cff73576e63..77dc6312a11f 100644
--- a/xmloff/source/text/XMLIndexTOCSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCSourceContext.cxx
@@ -135,14 +135,11 @@ void XMLIndexTOCSourceContext::ProcessAttribute(
void XMLIndexTOCSourceContext::EndElement()
{
- Any aAny;
-
rIndexPropertySet->setPropertyValue(sCreateFromMarks, css::uno::Any(bUseMarks));
rIndexPropertySet->setPropertyValue(sCreateFromOutline, css::uno::Any(bUseOutline));
rIndexPropertySet->setPropertyValue(sCreateFromLevelParagraphStyles, css::uno::Any(bUseParagraphStyles));
- aAny <<= (sal_Int16)nOutlineLevel;
- rIndexPropertySet->setPropertyValue(sLevel, aAny);
+ rIndexPropertySet->setPropertyValue(sLevel, css::uno::Any((sal_Int16)nOutlineLevel));
// process common attributes
XMLIndexSourceBaseContext::EndElement();
diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.cxx b/xmloff/source/text/XMLIndexTOCStylesContext.cxx
index d218d9ad9c93..f3a3bc8cd219 100644
--- a/xmloff/source/text/XMLIndexTOCStylesContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCStylesContext.cxx
@@ -106,8 +106,7 @@ void XMLIndexTOCStylesContext::EndElement()
aAny >>= xIndexReplace;
// set style names
- aAny <<= aStyleNamesSequence;
- xIndexReplace->replaceByIndex(nOutlineLevel, aAny);
+ xIndexReplace->replaceByIndex(nOutlineLevel, Any(aStyleNamesSequence));
}
}
diff --git a/xmloff/source/text/XMLIndexTableSourceContext.cxx b/xmloff/source/text/XMLIndexTableSourceContext.cxx
index e4cdea920775..de9cd17a7f3f 100644
--- a/xmloff/source/text/XMLIndexTableSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexTableSourceContext.cxx
@@ -126,20 +126,16 @@ void XMLIndexTableSourceContext::ProcessAttribute(
void XMLIndexTableSourceContext::EndElement()
{
- Any aAny;
-
rIndexPropertySet->setPropertyValue(sCreateFromLabels, css::uno::Any(bUseCaption));
if (bSequenceOK)
{
- aAny <<= sSequence;
- rIndexPropertySet->setPropertyValue(sLabelCategory, aAny);
+ rIndexPropertySet->setPropertyValue(sLabelCategory, css::uno::Any(sSequence));
}
if (bDisplayFormatOK)
{
- aAny <<= nDisplayFormat;
- rIndexPropertySet->setPropertyValue(sLabelDisplayType, aAny);
+ rIndexPropertySet->setPropertyValue(sLabelDisplayType, css::uno::Any(nDisplayFormat));
}
XMLIndexSourceBaseContext::EndElement();
diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx
index ef970f3fac11..a60109e6bba4 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.cxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.cxx
@@ -187,8 +187,7 @@ void XMLIndexTemplateContext::EndElement()
aAny >>= xIndexReplace;
// ... and insert
- aAny <<= aValueSequence;
- xIndexReplace->replaceByIndex(nOutlineLevel, aAny);
+ xIndexReplace->replaceByIndex(nOutlineLevel, Any(aValueSequence));
if (bStyleNameOK)
{
@@ -208,9 +207,8 @@ void XMLIndexTemplateContext::EndElement()
if( rStyles.is() &&
rStyles->hasByName( sDisplayStyleName ) )
{
- aAny <<= sDisplayStyleName;
rPropertySet->setPropertyValue(
- OUString::createFromAscii(pStyleProperty), aAny);
+ OUString::createFromAscii(pStyleProperty), css::uno::Any(sDisplayStyleName));
}
}
}
diff --git a/xmloff/source/text/XMLIndexUserSourceContext.cxx b/xmloff/source/text/XMLIndexUserSourceContext.cxx
index e1f95d4c1ac0..9120e30000af 100644
--- a/xmloff/source/text/XMLIndexUserSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexUserSourceContext.cxx
@@ -151,8 +151,6 @@ void XMLIndexUserSourceContext::ProcessAttribute(
void XMLIndexUserSourceContext::EndElement()
{
- Any aAny;
-
rIndexPropertySet->setPropertyValue(sCreateFromEmbeddedObjects, css::uno::Any(bUseObjects));
rIndexPropertySet->setPropertyValue(sCreateFromGraphicObjects, css::uno::Any(bUseGraphic));
rIndexPropertySet->setPropertyValue(sUseLevelFromSource, css::uno::Any(bUseLevelFromSource));
@@ -163,8 +161,7 @@ void XMLIndexUserSourceContext::EndElement()
if( !sIndexName.isEmpty() )
{
- aAny <<= sIndexName;
- rIndexPropertySet->setPropertyValue(sUserIndexName, aAny);
+ rIndexPropertySet->setPropertyValue(sUserIndexName, css::uno::Any(sIndexName));
}
XMLIndexSourceBaseContext::EndElement();
diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx b/xmloff/source/text/XMLLineNumberingImportContext.cxx
index 3af8f5b472ba..d182f74b76d2 100644
--- a/xmloff/source/text/XMLLineNumberingImportContext.cxx
+++ b/xmloff/source/text/XMLLineNumberingImportContext.cxx
@@ -233,25 +233,18 @@ void XMLLineNumberingImportContext::CreateAndInsert(bool)
xLineNumbering->setPropertyValue(sCharStyleName, aAny);
}
- aAny <<= sSeparator;
- xLineNumbering->setPropertyValue(sSeparatorText, aAny);
-
- aAny <<= nOffset;
- xLineNumbering->setPropertyValue(sDistance, aAny);
-
- aAny <<= nNumberPosition;
- xLineNumbering->setPropertyValue(sNumberPosition, aAny);
+ xLineNumbering->setPropertyValue(sSeparatorText, Any(sSeparator));
+ xLineNumbering->setPropertyValue(sDistance, Any(nOffset));
+ xLineNumbering->setPropertyValue(sNumberPosition, Any(nNumberPosition));
if (nIncrement >= 0)
{
- aAny <<= nIncrement;
- xLineNumbering->setPropertyValue(sInterval, aAny);
+ xLineNumbering->setPropertyValue(sInterval, Any(nIncrement));
}
if (nSeparatorIncrement >= 0)
{
- aAny <<= nSeparatorIncrement;
- xLineNumbering->setPropertyValue(sSeparatorInterval, aAny);
+ xLineNumbering->setPropertyValue(sSeparatorInterval, Any(nSeparatorIncrement));
}
xLineNumbering->setPropertyValue(sIsOn, Any(bNumberLines));
@@ -263,8 +256,7 @@ void XMLLineNumberingImportContext::CreateAndInsert(bool)
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType,
sNumFormat,
sNumLetterSync );
- aAny <<= nNumType;
- xLineNumbering->setPropertyValue(sNumberingType, aAny);
+ xLineNumbering->setPropertyValue(sNumberingType, Any(nNumType));
}
}
}
diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx
index 5f3bc8c0c062..49f660b572b7 100644
--- a/xmloff/source/text/XMLPropertyBackpatcher.cxx
+++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx
@@ -117,9 +117,7 @@ void XMLPropertyBackpatcher<A>::SetProperty(
if (aIDMap.count(sName))
{
// we know this ID -> set property
- Any aAny;
- aAny <<= aIDMap[sName];
- xPropSet->setPropertyValue(sPropertyName, aAny);
+ xPropSet->setPropertyValue(sPropertyName, css::uno::Any(aIDMap[sName]));
}
else
{
diff --git a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
index ad2ff935f30b..78f061cad181 100644
--- a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
+++ b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx
@@ -128,7 +128,6 @@ void XMLSectionFootnoteConfigImport::StartElement(
}
// OK, now we have all values and can fill the XMLPropertyState vector
- Any aAny;
sal_Int32 nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_OWN : CTF_SECTION_FOOTNOTE_NUM_OWN );
@@ -140,33 +139,29 @@ void XMLSectionFootnoteConfigImport::StartElement(
XMLPropertyState aNumRestart( nIndex, css::uno::Any(bNumRestart) );
rProperties.push_back( aNumRestart );
- aAny <<= nNumRestartAt;
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_RESTART_AT :
CTF_SECTION_FOOTNOTE_NUM_RESTART_AT );
- XMLPropertyState aNumRestartAtState( nIndex, aAny );
+ XMLPropertyState aNumRestartAtState( nIndex, css::uno::Any(nNumRestartAt) );
rProperties.push_back( aNumRestartAtState );
sal_Int16 nNumType = NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType,
sNumFormat,
sNumLetterSync );
- aAny <<= nNumType;
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_TYPE : CTF_SECTION_FOOTNOTE_NUM_TYPE );
- XMLPropertyState aNumFormatState( nIndex, aAny );
+ XMLPropertyState aNumFormatState( nIndex, css::uno::Any(nNumType) );
rProperties.push_back( aNumFormatState );
- aAny <<= sNumPrefix;
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_PREFIX : CTF_SECTION_FOOTNOTE_NUM_PREFIX );
- XMLPropertyState aPrefixState( nIndex, aAny );
+ XMLPropertyState aPrefixState( nIndex, css::uno::Any(sNumPrefix) );
rProperties.push_back( aPrefixState );
- aAny <<= sNumSuffix;
nIndex = rMapper->FindEntryIndex( bEndnote ?
CTF_SECTION_ENDNOTE_NUM_SUFFIX : CTF_SECTION_FOOTNOTE_NUM_SUFFIX );
- XMLPropertyState aSuffixState( nIndex, aAny );
+ XMLPropertyState aSuffixState( nIndex, css::uno::Any(sNumSuffix) );
rProperties.push_back( aSuffixState );
nIndex = rMapper->FindEntryIndex( bEndnote ?
diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx
index d89abf0240a4..43f6d247ba0c 100644
--- a/xmloff/source/text/XMLSectionImportContext.cxx
+++ b/xmloff/source/text/XMLSectionImportContext.cxx
@@ -167,7 +167,6 @@ void XMLSectionImportContext::StartElement(
// IsVisible and condition (not for index headers)
if (! bIsIndexHeader)
{
- Any aAny;
xPropSet->setPropertyValue( sIsVisible, Any(bIsVisible) );
// #97450# hidden sections must be hidden on reload
@@ -180,8 +179,7 @@ void XMLSectionImportContext::StartElement(
if (bCondOK)
{
- aAny <<= sCond;
- xPropSet->setPropertyValue( sCondition, aAny );
+ xPropSet->setPropertyValue( sCondition, Any(sCond) );
}
}
@@ -189,9 +187,7 @@ void XMLSectionImportContext::StartElement(
if ( bSequenceOK &&
IsXMLToken(GetLocalName(), XML_SECTION) )
{
- Any aAny;
- aAny <<= aSequence;
- xPropSet->setPropertyValue(sProtectionKey, aAny);
+ xPropSet->setPropertyValue(sProtectionKey, Any(aSequence));
}
// protection
diff --git a/xmloff/source/text/XMLSectionSourceImportContext.cxx b/xmloff/source/text/XMLSectionSourceImportContext.cxx
index 91ab4bf94448..78d4847a3dbb 100644
--- a/xmloff/source/text/XMLSectionSourceImportContext.cxx
+++ b/xmloff/source/text/XMLSectionSourceImportContext.cxx
@@ -110,21 +110,18 @@ void XMLSectionSourceImportContext::StartElement(
const OUString sFileLink("FileLink");
const OUString sLinkRegion("LinkRegion");
- Any aAny;
if (!sURL.isEmpty() || !sFilterName.isEmpty())
{
SectionFileLink aFileLink;
aFileLink.FileURL = GetImport().GetAbsoluteReference( sURL );
aFileLink.FilterName = sFilterName;
- aAny <<= aFileLink;
- rSectionPropertySet->setPropertyValue(sFileLink, aAny);
+ rSectionPropertySet->setPropertyValue(sFileLink, Any(aFileLink));
}
if (!sSectionName.isEmpty())
{
- aAny <<= sSectionName;
- rSectionPropertySet->setPropertyValue(sLinkRegion, aAny);
+ rSectionPropertySet->setPropertyValue(sLinkRegion, Any(sSectionName));
}
}
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index e25e6a465de8..08e8d05270c0 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -442,7 +442,6 @@ void XMLTextColumnsContext::EndElement( )
Reference < XPropertySet > xPropSet( xColumns, UNO_QUERY );
if( xPropSet.is() )
{
- Any aAny;
bool bOn = pColumnSep != nullptr;
xPropSet->setPropertyValue( sSeparatorLineIsOn, Any(bOn) );
@@ -451,33 +450,27 @@ void XMLTextColumnsContext::EndElement( )
{
if( pColumnSep->GetWidth() )
{
- aAny <<= pColumnSep->GetWidth();
- xPropSet->setPropertyValue( sSeparatorLineWidth, aAny );
+ xPropSet->setPropertyValue( sSeparatorLineWidth, Any(pColumnSep->GetWidth()) );
}
if( pColumnSep->GetHeight() )
{
- aAny <<= pColumnSep->GetHeight();
xPropSet->setPropertyValue( sSeparatorLineRelativeHeight,
- aAny );
+ Any(pColumnSep->GetHeight()) );
}
if ( pColumnSep->GetStyle() )
{
- aAny <<= pColumnSep->GetStyle();
- xPropSet->setPropertyValue( sSeparatorLineStyle, aAny );
+ xPropSet->setPropertyValue( sSeparatorLineStyle, Any(pColumnSep->GetStyle()) );
}
- aAny <<= pColumnSep->GetColor();
- xPropSet->setPropertyValue( sSeparatorLineColor, aAny );
+ xPropSet->setPropertyValue( sSeparatorLineColor, Any(pColumnSep->GetColor()) );
- aAny <<= pColumnSep->GetVertAlign();
- xPropSet->setPropertyValue( sSeparatorLineVerticalAlignment, aAny );
+ xPropSet->setPropertyValue( sSeparatorLineVerticalAlignment, Any(pColumnSep->GetVertAlign()) );
}
// handle 'automatic columns': column distance
if( bAutomatic )
{
- aAny <<= nAutomaticDistance;
- xPropSet->setPropertyValue( sAutomaticDistance, aAny );
+ xPropSet->setPropertyValue( sAutomaticDistance, Any(nAutomaticDistance) );
}
}
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 4001d26243c2..8e46ae6df704 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -282,7 +282,6 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl(
{
const SdXMLImExViewBox aViewBox( sViewBox, GetImport().GetMM100UnitConverter());
basegfx::B2DPolyPolygon aPolyPolygon;
- Any aAny;
if( bPath )
{
@@ -317,8 +316,7 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl(
css::drawing::PointSequenceSequence aPointSequenceSequence;
basegfx::tools::B2DPolyPolygonToUnoPointSequenceSequence(aPolyPolygon, aPointSequenceSequence);
- aAny <<= aPointSequenceSequence;
- xPropSet->setPropertyValue( sContourPolyPolygon, aAny );
+ xPropSet->setPropertyValue( sContourPolyPolygon, Any(aPointSequenceSequence) );
}
const OUString sIsPixelContour("IsPixelContour");
@@ -614,16 +612,14 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
if( rStyles.is() &&
rStyles->hasByName( sDisplayStyleName ) )
{
- aAny <<= sDisplayStyleName;
- xPropSet->setPropertyValue( sFrameStyleName, aAny );
+ xPropSet->setPropertyValue( sFrameStyleName, Any(sDisplayStyleName) );
}
}
// anchor type (must be set before any other properties, because
// otherwise some orientations cannot be set or will be changed
// afterwards)
- aAny <<= eAnchorType;
- xPropSet->setPropertyValue( sAnchorType, aAny );
+ xPropSet->setPropertyValue( sAnchorType, Any(eAnchorType) );
// hard properties
if( pStyle )
@@ -635,8 +631,7 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
aAny >>= nHoriOrient;
if( HoriOrientation::NONE == nHoriOrient )
{
- aAny <<= nX;
- xPropSet->setPropertyValue( sHoriOrientPosition, aAny );
+ xPropSet->setPropertyValue( sHoriOrientPosition, Any(nX) );
}
sal_Int16 nVertOrient = VertOrientation::NONE;
@@ -644,20 +639,17 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
aAny >>= nVertOrient;
if( VertOrientation::NONE == nVertOrient )
{
- aAny <<= nY;
- xPropSet->setPropertyValue( sVertOrientPosition, aAny );
+ xPropSet->setPropertyValue( sVertOrientPosition, Any(nY) );
}
// width
if( nWidth > 0 )
{
- aAny <<= nWidth;
- xPropSet->setPropertyValue( sWidth, aAny );
+ xPropSet->setPropertyValue( sWidth, Any(nWidth) );
}
if( nRelWidth > 0 || nWidth > 0 )
{
- aAny <<= nRelWidth;
- xPropSet->setPropertyValue( sRelativeWidth, aAny );
+ xPropSet->setPropertyValue( sRelativeWidth, Any(nRelWidth) );
}
if( bSyncWidth || nWidth > 0 )
{
@@ -669,19 +661,16 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
sal_Int16 nSizeType =
(bMinWidth && XML_TEXT_FRAME_TEXTBOX == nType) ? SizeType::MIN
: SizeType::FIX;
- aAny <<= nSizeType;
- xPropSet->setPropertyValue( sWidthType, aAny );
+ xPropSet->setPropertyValue( sWidthType, Any(nSizeType) );
}
if( nHeight > 0 )
{
- aAny <<= nHeight;
- xPropSet->setPropertyValue( sHeight, aAny );
+ xPropSet->setPropertyValue( sHeight, Any(nHeight) );
}
if( nRelHeight > 0 || nHeight > 0 )
{
- aAny <<= nRelHeight;
- xPropSet->setPropertyValue( sRelativeHeight, aAny );
+ xPropSet->setPropertyValue( sRelativeHeight, Any(nRelHeight) );
}
if( bSyncHeight || nHeight > 0 )
{
@@ -693,8 +682,7 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
sal_Int16 nSizeType =
(bMinHeight && XML_TEXT_FRAME_TEXTBOX == nType) ? SizeType::MIN
: SizeType::FIX;
- aAny <<= nSizeType;
- xPropSet->setPropertyValue( sSizeType, aAny );
+ xPropSet->setPropertyValue( sSizeType, Any(nSizeType) );
}
if( XML_TEXT_FRAME_GRAPHIC == nType )
@@ -717,24 +705,20 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ )
sHRef = GetImport().ResolveGraphicObjectURLFromBase64( xBase64Stream );
xBase64Stream = nullptr;
}
- aAny <<= sHRef;
- xPropSet->setPropertyValue( sGraphicURL, aAny );
+ xPropSet->setPropertyValue( sGraphicURL, Any(sHRef) );
// filter name
- aAny <<=sFilterName;
- xPropSet->setPropertyValue( sGraphicFilter, aAny );
+ xPropSet->setPropertyValue( sGraphicFilter, Any(sFilterName) );
// rotation
- aAny <<= nRotation;
- xPropSet->setPropertyValue( sGraphicRotation, aAny );
+ xPropSet->setPropertyValue( sGraphicRotation, Any(nRotation) );
}
// page number (must be set after the frame is inserted, because it
// will be overwritten then inserting the frame.
if( TextContentAnchorType_AT_PAGE == eAnchorType && nPage > 0 )
{
- aAny <<= nPage;
- xPropSet->setPropertyValue( sAnchorPageNo, aAny );
+ xPropSet->setPropertyValue( sAnchorPageNo, Any(nPage) );
}
if( XML_TEXT_FRAME_OBJECT != nType &&
@@ -1271,20 +1255,16 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef,
!xPropSetInfo->hasPropertyByName(s_HyperLinkURL))
return;
- Any aAny;
- aAny <<= rHRef;
- xPropSet->setPropertyValue( s_HyperLinkURL, aAny );
+ xPropSet->setPropertyValue( s_HyperLinkURL, Any(rHRef) );
if (xPropSetInfo->hasPropertyByName(s_HyperLinkName))
{
- aAny <<= rName;
- xPropSet->setPropertyValue(s_HyperLinkName, aAny);
+ xPropSet->setPropertyValue(s_HyperLinkName, Any(rName));
}
if (xPropSetInfo->hasPropertyByName(s_HyperLinkTarget))
{
- aAny <<= rTargetFrameName;
- xPropSet->setPropertyValue( s_HyperLinkTarget, aAny );
+ xPropSet->setPropertyValue( s_HyperLinkTarget, Any(rTargetFrameName) );
}
if (xPropSetInfo->hasPropertyByName(s_ServerMap))
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index 0c06fe8777b2..155d29697ab8 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -137,8 +137,7 @@ XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
if( !xStyle.is() )
return;
- aAny <<= xStyle;
- xPageStyles->insertByName( sDisplayName, aAny );
+ xPageStyles->insertByName( sDisplayName, Any(xStyle) );
bNew = true;
}
@@ -283,8 +282,7 @@ void XMLTextMasterPageContext::Finish( bool bOverwrite )
aAny >>= sCurrFollow;
if( sCurrFollow != sDisplayFollow )
{
- aAny <<= sDisplayFollow;
- xPropSet->setPropertyValue( sFollowStyle, aAny );
+ xPropSet->setPropertyValue( sFollowStyle, Any(sDisplayFollow) );
}
}
diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx
index 60aae4701189..be9f7f05651e 100644
--- a/xmloff/source/text/XMLTextShapeImportHelper.cxx
+++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx
@@ -120,11 +120,9 @@ void XMLTextShapeImportHelper::addShape(
}
Reference < XPropertySet > xPropSet( rShape, UNO_QUERY );
- Any aAny;
// anchor type
- aAny <<= eAnchorType;
- xPropSet->setPropertyValue( sAnchorType, aAny );
+ xPropSet->setPropertyValue( sAnchorType, Any(eAnchorType) );
Reference < XTextContent > xTxtCntnt( rShape, UNO_QUERY );
xTxtImport->InsertTextContent( xTxtCntnt );
@@ -137,13 +135,11 @@ void XMLTextShapeImportHelper::addShape(
// only set positive page numbers
if ( nPage > 0 )
{
- aAny <<= nPage;
- xPropSet->setPropertyValue( sAnchorPageNo, aAny );
+ xPropSet->setPropertyValue( sAnchorPageNo, Any(nPage) );
}
break;
case TextContentAnchorType_AS_CHARACTER:
- aAny <<= nY;
- xPropSet->setPropertyValue( sVertOrientPosition, aAny );
+ xPropSet->setPropertyValue( sVertOrientPosition, Any(nY) );
break;
default:
break;
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 50b7dca74ebe..438c9783fe90 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -707,9 +707,7 @@ void XMLSenderFieldImportContext::PrepareField(
const Reference<XPropertySet> & rPropSet)
{
// set members
- Any aAny;
- aAny <<= nSubType;
- rPropSet->setPropertyValue(sPropertyFieldSubType, aAny);
+ rPropSet->setPropertyValue(sPropertyFieldSubType, Any(nSubType));
// set fixed
rPropSet->setPropertyValue(sPropertyFixed, Any(bFixed));
@@ -725,8 +723,7 @@ void XMLSenderFieldImportContext::PrepareField(
}
else
{
- aAny <<= GetContent();
- rPropSet->setPropertyValue(sPropertyContent, aAny);
+ rPropSet->setPropertyValue(sPropertyContent, Any(GetContent()));
}
}
}
@@ -839,8 +836,7 @@ void XMLPageContinuationImportContext::PrepareField(
{
Any aAny;
- aAny <<= eSelectPage;
- xPropertySet->setPropertyValue(sPropertySubType, aAny);
+ xPropertySet->setPropertyValue(sPropertySubType, Any(eSelectPage));
aAny <<= (sStringOK ? sString : GetContent());
xPropertySet->setPropertyValue(sPropertyUserText, aAny);
@@ -906,8 +902,6 @@ void XMLPageNumberImportContext::ProcessAttribute(
void XMLPageNumberImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// all properties are optional
Reference<XPropertySetInfo> xPropertySetInfo(
xPropertySet->getPropertySetInfo());
@@ -925,8 +919,7 @@ void XMLPageNumberImportContext::PrepareField(
else
nNumType = style::NumberingType::PAGE_DESCRIPTOR;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
}
if (xPropertySetInfo->hasPropertyByName(sPropertyOffset))
@@ -945,14 +938,12 @@ void XMLPageNumberImportContext::PrepareField(
default:
SAL_WARN("xmloff.text", "unknown page number type");
}
- aAny <<= nPageAdjust;
- xPropertySet->setPropertyValue(sPropertyOffset, aAny);
+ xPropertySet->setPropertyValue(sPropertyOffset, Any(nPageAdjust));
}
if (xPropertySetInfo->hasPropertyByName(sPropertySubType))
{
- aAny <<= eSelectPage;
- xPropertySet->setPropertyValue(sPropertySubType, aAny);
+ xPropertySet->setPropertyValue(sPropertySubType, Any(eSelectPage));
}
}
@@ -1017,8 +1008,7 @@ void XMLPlaceholderFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet) {
Any aAny;
- aAny <<= sDescription;
- xPropertySet->setPropertyValue(sPropertyHint, aAny);
+ xPropertySet->setPropertyValue(sPropertyHint, Any(sDescription));
// remove <...> around content (if present)
OUString aContent = GetContent();
@@ -1036,8 +1026,7 @@ void XMLPlaceholderFieldImportContext::PrepareField(
aAny <<= aContent.copy(nStart, nLength);
xPropertySet->setPropertyValue(sPropertyPlaceholder, aAny);
- aAny <<= nPlaceholderType;
- xPropertySet->setPropertyValue(sPropertyPlaceholderType, aAny);
+ xPropertySet->setPropertyValue(sPropertyPlaceholderType, Any(nPlaceholderType));
}
@@ -1117,8 +1106,6 @@ void XMLTimeFieldImportContext::ProcessAttribute(
void XMLTimeFieldImportContext::PrepareField(
const Reference<XPropertySet> & rPropertySet)
{
- Any aAny;
-
// all properties are optional (except IsDate)
Reference<XPropertySetInfo> xPropertySetInfo(
rPropertySet->getPropertySetInfo());
@@ -1132,8 +1119,7 @@ void XMLTimeFieldImportContext::PrepareField(
if (xPropertySetInfo->hasPropertyByName(sPropertyAdjust))
{
- aAny <<= nAdjust;
- rPropertySet->setPropertyValue(sPropertyAdjust, aAny);
+ rPropertySet->setPropertyValue(sPropertyAdjust, Any(nAdjust));
}
// set value
@@ -1152,13 +1138,11 @@ void XMLTimeFieldImportContext::PrepareField(
{
if (xPropertySetInfo->hasPropertyByName(sPropertyDateTimeValue))
{
- aAny <<= aDateTimeValue;
- rPropertySet->setPropertyValue(sPropertyDateTimeValue,aAny);
+ rPropertySet->setPropertyValue(sPropertyDateTimeValue, Any(aDateTimeValue));
}
else if (xPropertySetInfo->hasPropertyByName(sPropertyDateTime))
{
- aAny <<= aDateTimeValue;
- rPropertySet->setPropertyValue(sPropertyDateTime, aAny);
+ rPropertySet->setPropertyValue(sPropertyDateTime, Any(aDateTimeValue));
}
}
}
@@ -1167,8 +1151,7 @@ void XMLTimeFieldImportContext::PrepareField(
if (bFormatOK &&
xPropertySetInfo->hasPropertyByName(sPropertyNumberFormat))
{
- aAny <<= nFormatKey;
- rPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ rPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormatKey));
if( xPropertySetInfo->hasPropertyByName( sPropertyIsFixedLanguage ) )
{
@@ -1331,28 +1314,22 @@ SvXMLImportContext* XMLDatabaseFieldImportContext::CreateChildContext(
void XMLDatabaseFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sTableName;
- xPropertySet->setPropertyValue(sPropertyTableName, aAny);
+ xPropertySet->setPropertyValue(sPropertyTableName, Any(sTableName));
if( bDatabaseNameOK )
{
- aAny <<= sDatabaseName;
- xPropertySet->setPropertyValue(sPropertyDataBaseName, aAny);
+ xPropertySet->setPropertyValue(sPropertyDataBaseName, Any(sDatabaseName));
}
else if( bDatabaseURLOK )
{
- aAny <<= sDatabaseURL;
- xPropertySet->setPropertyValue(sPropertyDataBaseURL, aAny);
+ xPropertySet->setPropertyValue(sPropertyDataBaseURL, Any(sDatabaseURL));
}
// #99980# load/save command type for all fields; also load
// old documents without command type
if( bCommandTypeOK )
{
- aAny <<= nCommandType;
- xPropertySet->setPropertyValue( sPropertyDataCommandType, aAny );
+ xPropertySet->setPropertyValue( sPropertyDataCommandType, Any(nCommandType) );
}
if( bUseDisplay && bDisplayOK )
@@ -1484,10 +1461,7 @@ void XMLDatabaseSelectImportContext::ProcessAttribute(
void XMLDatabaseSelectImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nNumber;
- xPropertySet->setPropertyValue(sPropertySetNumber, aAny);
+ xPropertySet->setPropertyValue(sPropertySetNumber, Any(nNumber));
XMLDatabaseNextImportContext::PrepareField(xPropertySet);
}
@@ -1545,19 +1519,15 @@ void XMLDatabaseNumberImportContext::ProcessAttribute(
void XMLDatabaseNumberImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
sal_Int16 nNumType = style::NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType,
sNumberFormat,
sNumberSync );
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
if (bValueOK)
{
- aAny <<= nValue;
- xPropertySet->setPropertyValue(sPropertySetNumber, aAny);
+ xPropertySet->setPropertyValue(sPropertySetNumber, Any(nValue));
}
XMLDatabaseFieldImportContext::PrepareField(xPropertySet);
@@ -1736,9 +1706,7 @@ void XMLRevisionDocInfoImportContext::PrepareField(
sal_Int32 nTmp;
if (::sax::Converter::convertNumber(nTmp, GetContent()))
{
- Any aAny;
- aAny <<= nTmp;
- rPropertySet->setPropertyValue(sPropertyRevision, aAny);
+ rPropertySet->setPropertyValue(sPropertyRevision, Any(nTmp));
}
}
}
@@ -1825,8 +1793,6 @@ void XMLDateTimeDocInfoImportContext::PrepareField(
// process fixed and presentation
XMLSimpleDocInfoImportContext::PrepareField(xPropertySet);
- Any aAny;
-
if (bHasDateTime)
{
xPropertySet->setPropertyValue(sPropertyIsDate, Any(bIsDate));
@@ -1834,8 +1800,7 @@ void XMLDateTimeDocInfoImportContext::PrepareField(
if (bFormatOK)
{
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormat));
if( xPropertySet->getPropertySetInfo()->
hasPropertyByName( sPropertyIsFixedLanguage ) )
@@ -1906,19 +1871,16 @@ void XMLUserDocInfoImportContext::ProcessAttribute(
void XMLUserDocInfoImportContext::PrepareField(
const css::uno::Reference<css::beans::XPropertySet> & xPropertySet)
{
- uno::Any aAny;
if ( !aName.isEmpty() )
{
- aAny <<= aName;
- xPropertySet->setPropertyValue(sPropertyName, aAny);
+ xPropertySet->setPropertyValue(sPropertyName, Any(aName));
}
Reference<XPropertySetInfo> xPropertySetInfo(
xPropertySet->getPropertySetInfo());
if (bFormatOK &&
xPropertySetInfo->hasPropertyByName(sPropertyNumberFormat))
{
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormat));
if( xPropertySetInfo->hasPropertyByName( sPropertyIsFixedLanguage ) )
{
@@ -1977,10 +1939,7 @@ void XMLHiddenParagraphImportContext::ProcessAttribute(
void XMLHiddenParagraphImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
- aAny <<= sCondition;
- xPropertySet->setPropertyValue(sPropertyCondition, aAny);
-
+ xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
xPropertySet->setPropertyValue(sPropertyIsHidden, Any(bIsHidden));
}
@@ -2050,21 +2009,11 @@ void XMLConditionalTextImportContext::ProcessAttribute(
void XMLConditionalTextImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sCondition;
- xPropertySet->setPropertyValue(sPropertyCondition, aAny);
-
- aAny <<= sFalseContent;
- xPropertySet->setPropertyValue(sPropertyFalseContent, aAny);
-
- aAny <<= sTrueContent;
- xPropertySet->setPropertyValue(sPropertyTrueContent, aAny);
-
+ xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
+ xPropertySet->setPropertyValue(sPropertyFalseContent, Any(sFalseContent));
+ xPropertySet->setPropertyValue(sPropertyTrueContent, Any(sTrueContent));
xPropertySet->setPropertyValue(sPropertyIsConditionTrue, Any(bCurrentValue));
-
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, Any(GetContent()));
}
@@ -2126,14 +2075,8 @@ void XMLHiddenTextImportContext::ProcessAttribute(
void XMLHiddenTextImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sCondition;
- xPropertySet->setPropertyValue(sPropertyCondition, aAny);
-
- aAny <<= sString;
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
-
+ xPropertySet->setPropertyValue(sPropertyCondition, Any(sCondition));
+ xPropertySet->setPropertyValue(sPropertyContent, Any(sString));
xPropertySet->setPropertyValue(sPropertyIsHidden, Any(bIsHidden));
}
@@ -2199,28 +2142,23 @@ void XMLFileNameImportContext::ProcessAttribute(
void XMLFileNameImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// properties are optional
Reference<XPropertySetInfo> xPropertySetInfo(
xPropertySet->getPropertySetInfo());
if (xPropertySetInfo->hasPropertyByName(sPropertyFixed))
{
- aAny <<= bFixed;
- xPropertySet->setPropertyValue(sPropertyFixed, aAny);
+ xPropertySet->setPropertyValue(sPropertyFixed, Any(bFixed));
}
if (xPropertySetInfo->hasPropertyByName(sPropertyFileFormat))
{
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyFileFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyFileFormat, Any(nFormat));
}
if (xPropertySetInfo->hasPropertyByName(sPropertyCurrentPresentation))
{
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, Any(GetContent()));
}
}
@@ -2276,10 +2214,7 @@ void XMLTemplateNameImportContext::ProcessAttribute(
void XMLTemplateNameImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyFileFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyFileFormat, Any(nFormat));
}
@@ -2349,13 +2284,8 @@ void XMLChapterImportContext::ProcessAttribute(
void XMLChapterImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nFormat;
- xPropertySet->setPropertyValue(sPropertyChapterFormat, aAny);
-
- aAny <<= nLevel;
- xPropertySet->setPropertyValue(sPropertyLevel, aAny);
+ xPropertySet->setPropertyValue(sPropertyChapterFormat, Any(nFormat));
+ xPropertySet->setPropertyValue(sPropertyLevel, Any(nLevel));
}
@@ -2395,8 +2325,6 @@ void XMLCountFieldImportContext::ProcessAttribute(
void XMLCountFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// properties optional
// (only page count, but do for all to save common implementation)
@@ -2413,8 +2341,7 @@ void XMLCountFieldImportContext::PrepareField(
}
else
nNumType = style::NumberingType::PAGE_DESCRIPTOR;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
}
}
@@ -2492,8 +2419,6 @@ void XMLPageVarGetFieldImportContext::ProcessAttribute(
void XMLPageVarGetFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
sal_Int16 nNumType;
if( bNumberFormatOK )
{
@@ -2504,12 +2429,10 @@ void XMLPageVarGetFieldImportContext::PrepareField(
}
else
nNumType = style::NumberingType::PAGE_DESCRIPTOR;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberingType, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberingType, Any(nNumType));
// display old content (#96657#)
- aAny <<= GetContent();
- xPropertySet->setPropertyValue( sAPI_current_presentation, aAny );
+ xPropertySet->setPropertyValue( sAPI_current_presentation, Any(GetContent()) );
}
@@ -2561,12 +2484,8 @@ void XMLPageVarSetFieldImportContext::ProcessAttribute(
void XMLPageVarSetFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
xPropertySet->setPropertyValue(sPropertyOn, Any(bActive));
-
- aAny <<= nAdjust;
- xPropertySet->setPropertyValue(sPropertyOffset, aAny);
+ xPropertySet->setPropertyValue(sPropertyOffset, Any(nAdjust));
}
@@ -2695,14 +2614,9 @@ void XMLMacroFieldImportContext::PrepareField(
sMacroName = sMacro;
}
- aAny <<= sScriptURL;
- xPropertySet->setPropertyValue(sPropertyScriptURL, aAny);
-
- aAny <<= sMacroName;
- xPropertySet->setPropertyValue(sPropertyMacroName, aAny);
-
- aAny <<= sLibraryName;
- xPropertySet->setPropertyValue(sPropertyMacroLibrary, aAny);
+ xPropertySet->setPropertyValue(sPropertyScriptURL, Any(sScriptURL));
+ xPropertySet->setPropertyValue(sPropertyMacroName, Any(sMacroName));
+ xPropertySet->setPropertyValue(sPropertyMacroLibrary, Any(sLibraryName));
}
@@ -2812,20 +2726,15 @@ void XMLReferenceFieldImportContext::ProcessAttribute(
void XMLReferenceFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= nType;
- xPropertySet->setPropertyValue(sPropertyReferenceFieldPart, aAny);
+ xPropertySet->setPropertyValue(sPropertyReferenceFieldPart, Any(nType));
- aAny <<= nSource;
- xPropertySet->setPropertyValue(sPropertyReferenceFieldSource, aAny);
+ xPropertySet->setPropertyValue(sPropertyReferenceFieldSource, Any(nSource));
switch (nElementToken)
{
case XML_TOK_TEXT_REFERENCE_REF:
case XML_TOK_TEXT_BOOKMARK_REF:
- aAny <<= sName;
- xPropertySet->setPropertyValue(sPropertySourceName, aAny);
+ xPropertySet->setPropertyValue(sPropertySourceName, Any(sName));
break;
case XML_TOK_TEXT_NOTE_REF:
@@ -2837,8 +2746,7 @@ void XMLReferenceFieldImportContext::PrepareField(
break;
}
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyCurrentPresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyCurrentPresentation, Any(GetContent()));
}
@@ -2994,20 +2902,14 @@ void XMLDdeFieldDeclImportContext::StartElement(
xPropSet->getPropertySetInfo()->hasPropertyByName(
sPropertyDDECommandType))
{
- Any aAny;
-
- aAny <<= sName;
- xPropSet->setPropertyValue(sPropertyName, aAny);
+ xPropSet->setPropertyValue(sPropertyName, Any(sName));
- aAny <<= sCommandApplication;
- xPropSet->setPropertyValue(sPropertyDDECommandType, aAny);
+ xPropSet->setPropertyValue(sPropertyDDECommandType, Any(sCommandApplication));
- aAny <<= sCommandTopic;
- xPropSet->setPropertyValue(sPropertyDDECommandFile, aAny);
+ xPropSet->setPropertyValue(sPropertyDDECommandFile, Any(sCommandTopic));
- aAny <<= sCommandItem;
xPropSet->setPropertyValue(sPropertyDDECommandElement,
- aAny);
+ Any(sCommandItem));
xPropSet->setPropertyValue(sPropertyIsAutomaticUpdate,
Any(bUpdate));
@@ -3202,19 +3104,14 @@ void XMLUrlFieldImportContext::ProcessAttribute(
void XMLUrlFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
- aAny <<= sURL;
- xPropertySet->setPropertyValue(sPropertyURL, aAny);
+ xPropertySet->setPropertyValue(sPropertyURL, Any(sURL));
if (bFrameOK)
{
- aAny <<= sFrame;
- xPropertySet->setPropertyValue(sPropertyTargetFrame, aAny);
+ xPropertySet->setPropertyValue(sPropertyTargetFrame, Any(sFrame));
}
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyRepresentation, aAny);
+ xPropertySet->setPropertyValue(sPropertyRepresentation, Any(GetContent()));
}
@@ -3330,9 +3227,7 @@ void XMLBibliographyFieldImportContext::PrepareField(
}
// set sequence
- Any aAny;
- aAny <<= aValueSequence;
- xPropertySet->setPropertyValue(sPropertyFields, aAny);
+ xPropertySet->setPropertyValue(sPropertyFields, Any(aValueSequence));
}
const sal_Char* XMLBibliographyFieldImportContext::MapBibliographyFieldName(
@@ -3745,21 +3640,17 @@ void XMLScriptImportContext::ProcessAttribute(
void XMLScriptImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
-
// if href attribute was present, we use it. Else we use element content
if (! bContentOK)
{
sContent = GetContent();
}
- aAny <<= sContent;
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(sContent));
// URL or script text? We use URL if we have an href-attribute
xPropertySet->setPropertyValue(sPropertyURLContent, Any(bContentOK));
- aAny <<= sScriptType;
- xPropertySet->setPropertyValue(sPropertyScriptType, aAny);
+ xPropertySet->setPropertyValue(sPropertyScriptType, Any(sScriptType));
}
@@ -3803,9 +3694,7 @@ void XMLMeasureFieldImportContext::ProcessAttribute(
void XMLMeasureFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
- aAny <<= mnKind;
- xPropertySet->setPropertyValue("Kind", aAny);
+ xPropertySet->setPropertyValue("Kind", Any(mnKind));
}
@@ -3918,34 +3807,28 @@ void XMLDropDownFieldImportContext::PrepareField(
pSequence[n] = aLabels[n];
// now set values:
- Any aAny;
- aAny <<= aSequence;
- xPropertySet->setPropertyValue( sPropertyItems, aAny );
+ xPropertySet->setPropertyValue( sPropertyItems, Any(aSequence) );
if( nSelected >= 0 && nSelected < nLength )
{
- aAny <<= pSequence[nSelected];
- xPropertySet->setPropertyValue( sPropertySelectedItem, aAny );
+ xPropertySet->setPropertyValue( sPropertySelectedItem, Any(pSequence[nSelected]) );
}
// set name
if( bNameOK )
{
- aAny <<= sName;
- xPropertySet->setPropertyValue( sPropertyName, aAny );
+ xPropertySet->setPropertyValue( sPropertyName, Any(sName) );
}
// set help
if( bHelpOK )
{
- aAny <<= sHelp;
- xPropertySet->setPropertyValue( sPropertyHelp, aAny );
+ xPropertySet->setPropertyValue( sPropertyHelp, Any(sHelp) );
}
// set hint
if( bHintOK )
{
- aAny <<= sHint;
- xPropertySet->setPropertyValue( sPropertyToolTip, aAny );
+ xPropertySet->setPropertyValue( sPropertyToolTip, Any(sHint) );
}
}
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 06c3c5301315..5570bf36fc9a 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -975,17 +975,13 @@ void XMLMetaFieldImportContext::InsertMeta(
if (-1 != nKey)
{
- static OUString sPropertyIsFixedLanguage(
- OUString("IsFixedLanguage") );
- Any any;
- any <<= nKey;
- xPropertySet->setPropertyValue("NumberFormat", any);
+ OUString sPropertyIsFixedLanguage("IsFixedLanguage");
+ xPropertySet->setPropertyValue("NumberFormat", Any(nKey));
if ( xPropertySet->getPropertySetInfo()->
hasPropertyByName( sPropertyIsFixedLanguage ) )
{
- any <<= static_cast<bool>(!isDefaultLanguage);
xPropertySet->setPropertyValue( sPropertyIsFixedLanguage,
- any );
+ Any(!isDefaultLanguage) );
}
}
}
@@ -2166,10 +2162,7 @@ XMLParaContext::~XMLParaContext()
{
// set anchor position for at-character anchored objects
Reference<XTextRange> xRange(xAttrCursor, UNO_QUERY);
- Any aPos;
- aPos <<= xRange;
- OUString sTextRange( "TextRange" );
- xPropSet->setPropertyValue(sTextRange, aPos);
+ xPropSet->setPropertyValue("TextRange", Any(xRange));
}
}
}
@@ -2198,10 +2191,7 @@ XMLParaContext::~XMLParaContext()
{
// set anchor position for at-character anchored objects
Reference<XTextRange> xRange(xAttrCursor, UNO_QUERY);
- Any aPos;
- aPos <<= xRange;
- OUString sTextRange( "TextRange" );
- xPropSet->setPropertyValue(sTextRange, aPos);
+ xPropSet->setPropertyValue("TextRange", Any(xRange));
}
}
}
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index a9332109d2eb..eb748ea87696 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -224,9 +224,7 @@ void XMLTextStyleContext::CreateAndInsert( bool bOverwrite )
xPropSetInfo->hasPropertyByName( sCategory ) &&
SvXMLUnitConverter::convertEnum( nCategory, sCategoryVal, aCategoryMap ) )
{
- Any aAny;
- aAny <<= (sal_Int16)nCategory;
- xPropSet->setPropertyValue( sCategory, aAny );
+ xPropSet->setPropertyValue( sCategory, Any((sal_Int16)nCategory) );
}
// tell the style about it's events (if applicable)
@@ -283,11 +281,9 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
if( xPropSetInfo->hasPropertyByName( sOutlineLevel ))
{
- Any aAny;
if( nOutlineLevel >= 0 )
{
- aAny <<= nOutlineLevel;
- xPropSet->setPropertyValue( sOutlineLevel, aAny );
+ xPropSet->setPropertyValue( sOutlineLevel, Any(nOutlineLevel) );
}
}
@@ -325,9 +321,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
{
if ( sListStyleName.isEmpty() )
{
- Any aAny;
- aAny <<= sListStyleName /* empty string */;
- xPropSet->setPropertyValue( sNumberingStyleName, aAny );
+ xPropSet->setPropertyValue( sNumberingStyleName, Any(sListStyleName) ); /* empty string */;
}
else
{
@@ -343,9 +337,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
if ( rNumStyles.is() &&
rNumStyles->hasByName( sDisplayListStyleName ) )
{
- Any aAny;
- aAny <<= sDisplayListStyleName;
- xPropSet->setPropertyValue( sNumberingStyleName, aAny );
+ xPropSet->setPropertyValue( sNumberingStyleName, Any(sDisplayListStyleName) );
}
}
}
@@ -364,9 +356,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
rTextStyles->hasByName( sDisplayDropCapTextStyleName ) &&
xPropSetInfo->hasPropertyByName( sDropCapCharStyleName ) )
{
- Any aAny;
- aAny <<= sDisplayDropCapTextStyleName;
- xPropSet->setPropertyValue( sDropCapCharStyleName, aAny );
+ xPropSet->setPropertyValue( sDropCapCharStyleName, Any(sDisplayDropCapTextStyleName) );
}
}
@@ -383,9 +373,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
rPageStyles->hasByName( sDisplayName )) ) &&
xPropSetInfo->hasPropertyByName( sPageDescName ) )
{
- Any aAny;
- aAny <<= sDisplayName;
- xPropSet->setPropertyValue( sPageDescName, aAny );
+ xPropSet->setPropertyValue( sPageDescName, Any(sDisplayName) );
}
}
}
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 01016aa50864..5aadbb57ad44 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -212,31 +212,23 @@ void XMLVarFieldImportContext::PrepareField(
if (bFormulaOK)
{
- Any aAny;
- aAny <<= sFormula;
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(sFormula));
}
}
if (bSetDescription && bDescriptionOK)
{
- Any aAny;
- aAny <<= sDescription;
- xPropertySet->setPropertyValue(sPropertyHint, aAny);
+ xPropertySet->setPropertyValue(sPropertyHint, Any(sDescription));
}
if (bSetHelp && bHelpOK)
{
- Any aAny;
- aAny <<= sHelp;
- xPropertySet->setPropertyValue(sPropertyHelp, aAny);
+ xPropertySet->setPropertyValue(sPropertyHelp, Any(sHelp));
}
if (bSetHint && bHintOK)
{
- Any aAny;
- aAny <<= sHint;
- xPropertySet->setPropertyValue(sPropertyTooltip, aAny);
+ xPropertySet->setPropertyValue(sPropertyTooltip, Any(sHint));
}
if (bSetVisible && bDisplayOK)
@@ -413,13 +405,12 @@ void XMLSequenceFieldImportContext::PrepareField(
// set format
sal_Int16 nNumType = NumberingType::ARABIC;
GetImport().GetMM100UnitConverter().convertNumFormat( nNumType, sNumFormat, sNumFormatSync );
- Any aAny;
- aAny <<= nNumType;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nNumType));
// handle reference name
if (bRefNameOK)
{
+ Any aAny;
aAny = xPropertySet->getPropertyValue(sPropertySequenceValue);
sal_Int16 nValue = 0;
aAny >>= nValue;
@@ -535,9 +526,7 @@ XMLUserFieldInputImportContext::XMLUserFieldInputImportContext(
void XMLUserFieldInputImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
- Any aAny;
- aAny <<= GetName();
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(GetName()));
// delegate to super class
XMLVarFieldImportContext::PrepareField(xPropertySet);
@@ -565,9 +554,7 @@ void XMLVariableGetFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
// set name
- Any aAny;
- aAny <<= GetName();
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(GetName()));
// the remainder is handled by super class
XMLVarFieldImportContext::PrepareField(xPropertySet);
@@ -598,9 +585,7 @@ void XMLExpressionFieldImportContext::PrepareField(
const Reference<XPropertySet> & xPropertySet)
{
sal_Int16 nSubType = SetVariableType::FORMULA;
- Any aAny;
- aAny <<= nSubType;
- xPropertySet->setPropertyValue(sPropertySubType, aAny);
+ xPropertySet->setPropertyValue(sPropertySubType, Any(nSubType));
// delegate to super class
XMLVarFieldImportContext::PrepareField(xPropertySet);
@@ -631,9 +616,7 @@ void XMLTextInputFieldImportContext::PrepareField(
{
XMLVarFieldImportContext::PrepareField(xPropertySet);
- Any aAny;
- aAny <<= GetContent();
- xPropertySet->setPropertyValue(sPropertyContent, aAny);
+ xPropertySet->setPropertyValue(sPropertyContent, Any(GetContent()));
}
@@ -837,15 +820,13 @@ XMLVariableDeclImportContext::XMLVariableDeclImportContext(
switch (eVarType)
{
case VarTypeSequence:
- aAny <<= nNumLevel;
- xFieldMaster->setPropertyValue(sPropertyNumberingLevel, aAny);
+ xFieldMaster->setPropertyValue(sPropertyNumberingLevel, Any(nNumLevel));
if (nNumLevel >= 0)
{
OUString sStr(&cSeparationChar, 1);
- aAny <<= sStr;
xFieldMaster->setPropertyValue(
- sPropertyNumberingSeparator, aAny);
+ sPropertyNumberingSeparator, Any(sStr));
}
break;
case VarTypeSimple:
@@ -982,13 +963,11 @@ bool XMLVariableDeclImportContext::FindFieldMaster(
xMaster = xTmp;
// set name
- Any aAny;
- aAny <<= sName;
- xMaster->setPropertyValue(sAPI_name, aAny);
+ xMaster->setPropertyValue(sAPI_name, Any(sName));
if (eVarType != VarTypeUserField) {
// set subtype for setexp field
-
+ Any aAny;
aAny <<= ((eVarType == VarTypeSimple) ?
SetVariableType::VAR :
SetVariableType::SEQUENCE);
@@ -1078,8 +1057,7 @@ void XMLDatabaseDisplayImportContext::EndElement()
sAPI_fieldmaster_database))
{
Any aAny;
- aAny <<= sColumnName;
- xMaster->setPropertyValue(sPropertyColumnName, aAny);
+ xMaster->setPropertyValue(sPropertyColumnName, Any(sColumnName));
// fieldmaster takes database, table and column name
XMLDatabaseFieldImportContext::PrepareField(xMaster);
@@ -1345,8 +1323,7 @@ void XMLValueImportHelper::PrepareField(
// format/style
if (bSetStyle && bFormatOK)
{
- aAny <<= nFormatKey;
- xPropertySet->setPropertyValue(sPropertyNumberFormat, aAny);
+ xPropertySet->setPropertyValue(sPropertyNumberFormat, Any(nFormatKey));
if( xPropertySet->getPropertySetInfo()->
hasPropertyByName( sPropertyIsFixedLanguage ) )
@@ -1366,8 +1343,7 @@ void XMLValueImportHelper::PrepareField(
}
else
{
- aAny <<= fValue;
- xPropertySet->setPropertyValue(sPropertyValue, aAny);
+ xPropertySet->setPropertyValue(sPropertyValue, Any(fValue));
}
}
}