[Libreoffice-commits] core.git: basctl/source basic/source chart2/source chart2/workbench comphelper/source cui/source dbaccess/source editeng/source embedserv/source filter/source forms/source fpicker/source linguistic/source package/source reportdesign/source sc/source sc/workben sdext/source sd/source sfx2/source slideshow/source sot/source starmath/source svtools/source svx/source sw/source toolkit/source ucb/source vbahelper/source vcl/source vcl/unx writerfilter/source xmlhelp/source xmloff/source
Noel Grandin
noel at peralex.com
Wed May 4 10:40:34 UTC 2016
basctl/source/basicide/baside3.cxx | 4
basctl/source/basicide/localizationmgr.cxx | 37 -
basctl/source/dlged/dlged.cxx | 12
basctl/source/dlged/dlgedfac.cxx | 8
basctl/source/dlged/dlgedobj.cxx | 73 --
basic/source/classes/propacc.cxx | 4
basic/source/classes/sbunoobj.cxx | 18
chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx | 8
chart2/source/view/main/DummyXShape.cxx | 4
chart2/workbench/addin/sampleaddin.cxx | 4
comphelper/source/container/IndexedPropertyValuesContainer.cxx | 4
comphelper/source/container/embeddedobjectcontainer.cxx | 4
cui/source/options/optasian.cxx | 4
dbaccess/source/filter/xml/xmlStyleImport.cxx | 4
editeng/source/misc/svxacorr.cxx | 12
embedserv/source/embed/docholder.cxx | 29 -
filter/source/graphicfilter/icgm/actimpr.cxx | 89 ---
filter/source/msfilter/msdffimp.cxx | 13
forms/source/xforms/convert.cxx | 2
fpicker/source/win32/misc/WinImplHelper.cxx | 21
linguistic/source/convdiclist.cxx | 8
package/source/zippackage/ZipPackage.cxx | 26
package/source/zippackage/ZipPackageStream.cxx | 22
reportdesign/source/core/api/ReportDefinition.cxx | 4
sc/source/core/data/dpobject.cxx | 12
sc/source/core/data/dpsave.cxx | 22
sc/source/filter/excel/xiescher.cxx | 11
sc/source/ui/Accessibility/AccessibleCellBase.cxx | 10
sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx | 12
sc/source/ui/app/scmod.cxx | 4
sc/source/ui/docshell/dbdocimp.cxx | 10
sc/source/ui/docshell/docsh8.cxx | 38 -
sc/source/ui/drawfunc/drawsh5.cxx | 13
sc/source/ui/unoobj/condformatuno.cxx | 4
sc/source/ui/unoobj/linkuno.cxx | 20
sc/source/ui/view/tabvwshg.cxx | 16
sc/source/ui/view/viewdata.cxx | 4
sc/workben/result.cxx | 4
sd/source/core/EffectMigration.cxx | 20
sd/source/filter/eppt/pptexanimations.cxx | 2
sd/source/filter/xml/sdxmlwrp.cxx | 4
sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx | 6
sd/source/ui/framework/factories/ViewShellWrapper.cxx | 5
sdext/source/presenter/PresenterScreen.cxx | 4
sfx2/source/appl/fileobj.cxx | 4
sfx2/source/appl/newhelp.cxx | 8
sfx2/source/appl/opengrf.cxx | 3
sfx2/source/doc/docfile.cxx | 4
sfx2/source/doc/objstor.cxx | 8
sfx2/source/doc/sfxbasemodel.cxx | 7
sfx2/source/view/viewfrm2.cxx | 3
slideshow/source/engine/slideshowimpl.cxx | 10
sot/source/sdstor/ucbstorage.cxx | 16
starmath/source/mathmlexport.cxx | 4
svtools/source/misc/embedtransfer.cxx | 4
svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx | 4
svx/source/form/datanavi.cxx | 4
svx/source/form/fmshimp.cxx | 8
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 4
svx/source/unodraw/XPropertyTable.cxx | 26
svx/source/unodraw/gluepts.cxx | 8
svx/source/unodraw/unoshap3.cxx | 4
svx/source/xml/xmlgrhlp.cxx | 7
sw/source/core/access/acccell.cxx | 12
sw/source/core/access/accnotextframe.cxx | 8
sw/source/core/swg/SwXMLTextBlocks1.cxx | 12
sw/source/core/unocore/swunohelper.cxx | 4
sw/source/filter/html/htmlform.cxx | 16
sw/source/filter/xml/wrtxml.cxx | 10
sw/source/filter/xml/xmlimp.cxx | 4
sw/source/filter/xml/xmlimpit.cxx | 4
sw/source/filter/xml/xmltexte.cxx | 21
sw/source/ui/dbui/addresslistdialog.cxx | 9
toolkit/source/controls/dialogcontrol.cxx | 19
toolkit/source/controls/roadmapcontrol.cxx | 11
toolkit/source/controls/tkscrollbar.cxx | 14
toolkit/source/controls/unocontrols.cxx | 287 ++--------
ucb/source/core/FileAccess.cxx | 8
ucb/source/ucp/file/filglob.cxx | 22
ucb/source/ucp/file/filrset.cxx | 8
ucb/source/ucp/file/prov.cxx | 12
ucb/source/ucp/file/shell.cxx | 14
ucb/source/ucp/ftp/ftpcontent.cxx | 14
ucb/source/ucp/ftp/ftpintreq.cxx | 4
ucb/source/ucp/ftp/ftpresultsetbase.cxx | 8
vbahelper/source/vbahelper/vbapagesetupbase.cxx | 25
vcl/source/filter/FilterConfigItem.cxx | 18
vcl/unx/gtk/a11y/atkvalue.cxx | 4
writerfilter/source/dmapper/FormControlHelper.cxx | 25
writerfilter/source/rtftok/rtfsdrimport.cxx | 3
xmlhelp/source/cxxhelp/provider/content.cxx | 4
xmlhelp/source/cxxhelp/provider/resultsetbase.cxx | 8
xmlhelp/source/treeview/tvfactory.cxx | 4
xmlhelp/source/treeview/tvread.cxx | 4
xmloff/source/chart/SchXMLChartContext.cxx | 8
xmloff/source/chart/SchXMLPlotAreaContext.cxx | 12
xmloff/source/chart/XMLChartStyleContext.cxx | 4
xmloff/source/core/unoatrcn.cxx | 4
xmloff/source/core/xmlerror.cxx | 4
xmloff/source/core/xmlexp.cxx | 15
xmloff/source/core/xmlimp.cxx | 19
xmloff/source/draw/XMLImageMapContext.cxx | 21
xmloff/source/draw/XMLShapePropertySetContext.cxx | 5
xmloff/source/draw/animimp.cxx | 24
xmloff/source/draw/sdxmlexp.cxx | 5
xmloff/source/draw/shapeexport.cxx | 4
xmloff/source/draw/shapeimport.cxx | 11
xmloff/source/draw/ximp3dobject.cxx | 22
xmloff/source/draw/ximp3dscene.cxx | 32 -
xmloff/source/draw/ximppage.cxx | 29 -
xmloff/source/draw/ximpshap.cxx | 131 +---
xmloff/source/draw/ximpshow.cxx | 15
xmloff/source/meta/MetaExportComponent.cxx | 4
xmloff/source/script/XMLEventsImportContext.cxx | 5
xmloff/source/style/XMLFootnoteSeparatorImport.cxx | 22
xmloff/source/style/prstylei.cxx | 7
xmloff/source/style/xmlimppr.cxx | 8
xmloff/source/style/xmlnume.cxx | 13
xmloff/source/style/xmlnumi.cxx | 15
xmloff/source/text/XMLCalculationSettingsContext.cxx | 4
xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx | 24
xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx | 3
xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx | 20
xmloff/source/text/XMLIndexBibliographyEntryContext.cxx | 4
xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx | 8
xmloff/source/text/XMLIndexSimpleEntryContext.cxx | 3
xmloff/source/text/XMLIndexTOCContext.cxx | 4
xmloff/source/text/XMLIndexTOCSourceContext.cxx | 5
xmloff/source/text/XMLIndexTOCStylesContext.cxx | 3
xmloff/source/text/XMLIndexTableSourceContext.cxx | 8
xmloff/source/text/XMLIndexTemplateContext.cxx | 6
xmloff/source/text/XMLIndexUserSourceContext.cxx | 5
xmloff/source/text/XMLLineNumberingImportContext.cxx | 20
xmloff/source/text/XMLPropertyBackpatcher.cxx | 4
xmloff/source/text/XMLSectionFootnoteConfigImport.cxx | 13
xmloff/source/text/XMLSectionImportContext.cxx | 8
xmloff/source/text/XMLSectionSourceImportContext.cxx | 7
xmloff/source/text/XMLTextColumnsContext.cxx | 19
xmloff/source/text/XMLTextFrameContext.cxx | 56 -
xmloff/source/text/XMLTextMasterPageContext.cxx | 6
xmloff/source/text/XMLTextShapeImportHelper.cxx | 10
xmloff/source/text/txtfldi.cxx | 243 ++------
xmloff/source/text/txtparai.cxx | 20
xmloff/source/text/txtstyli.cxx | 24
xmloff/source/text/txtvfldi.cxx | 58 --
145 files changed, 658 insertions(+), 1753 deletions(-)
New commits:
commit 58a32075ca4f457f570af75aef368dd6c389aca7
Author: Noel Grandin <noel at peralex.com>
Date: Tue May 3 08:39:03 2016 +0200
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index d09ec30..5fe3403 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 0fb4244..19604dc 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 af96640..a5f2542 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 7ddd166..c5aefca 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 ae73dba..33c7f8e 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 856b42d..2da061bd 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 d0bd047..05f9aba 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 9ffd2e8..7bee58d 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 3b37fe4..f3cc72c 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 b478193..d2cce930 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 914629a..824756e 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 1204d3c..169f375 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 ed37f51..2b0b33e 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 6a3f59f..f1b8521 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 2a261ae..de42542 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 97f3ffa..5568535 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 1a2dd6f..124bba8 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 3619210..77c2ecf 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 da5eb7f..7acec47 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 84c5141..d4156bc 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 8394c59..88b10d0 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 84cf1f7..0f58bc4 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 8ecb31f..79c42b1 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 006265f..8626105 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 0b0171b..23bfd0e 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 15920ed..1e356e9 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 2c18099..726ef0d 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 7637027..526c80a 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 5a40bcf..816a78d 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 756d028..5da4341 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 45a68e6..8cba579 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 c160b8a..86fe2a9 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 6f58a85..28a9084 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 ae121a4..5fce4c2 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 301f36b..abe81aa 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 54b7ba4..73cbb2c 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 4bfa4e7..5c3e552 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 0548630..3fd9f55 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 7b1ab2e..83ca865 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 45dff69..4c18cc23 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 7483757..89aa12f 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 0af2049..1731248 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 3004c91..1c4be5b 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 0a66ff2..098bcd5 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 4b2a496..4e9b901 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 6858249..051ca22 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 a98514c..2668096 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 28e12bef..e3663e4 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 f8c9d4b..ab7319a 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 5646783..6be889c 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 81ada85..27292d8 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 f826b44..1e8d9e6 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 264eafb..8aa42b0 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 aea07ed..b14dd1f 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 666e43a..2be8ce8 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 72bc10a..aafb7df 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 eab715d..5f5c943 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 8cf9565..192d717 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 6caf85a..2f5ce47 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 1d2b7df..dc036a1 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;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list