summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-03 08:39:03 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:26:04 -0400
commita0e8e05008e143ee5e3bbc281d1c253c7e5ed136 (patch)
treeeaf5f70a067fd48704addd9f2b582624a2fb44ae /sc
parent9c7cae1561cfe16226b1f16dce59f08a38da3ce0 (diff)
use Any constructor instead of temporaries
(cherry picked from commit 58a32075ca4f457f570af75aef368dd6c389aca7) Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'sc')
-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
14 files changed, 51 insertions, 129 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 422a189ae1f3..6c098d920b3f 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -3172,15 +3172,9 @@ uno::Reference<sdbc::XRowSet> ScDPCollection::DBCaches::createRowSet(
// set source parameters
- uno::Any aAny;
- aAny <<= rDBName;
- xRowProp->setPropertyValue( SC_DBPROP_DATASOURCENAME, aAny );
-
- aAny <<= rCommand;
- xRowProp->setPropertyValue( SC_DBPROP_COMMAND, aAny );
-
- aAny <<= nSdbType;
- xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_DATASOURCENAME, Any(rDBName) );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMAND, Any(rCommand) );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, Any(nSdbType) );
uno::Reference<sdb::XCompletedExecution> xExecute( xRowSet, uno::UNO_QUERY );
if ( xExecute.is() )
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 58c12f179a17..7043f699dc9c 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -564,26 +564,22 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
if ( xDimProp.is() )
{
// exceptions are caught at ScDPSaveData::WriteToSource
- uno::Any aAny;
sheet::DataPilotFieldOrientation eOrient = (sheet::DataPilotFieldOrientation)nOrientation;
- aAny <<= eOrient;
- xDimProp->setPropertyValue( SC_UNO_DP_ORIENTATION, aAny );
+ xDimProp->setPropertyValue( SC_UNO_DP_ORIENTATION, uno::Any(eOrient) );
sheet::GeneralFunction eFunc = (sheet::GeneralFunction)nFunction;
- aAny <<= eFunc;
- xDimProp->setPropertyValue( SC_UNO_DP_FUNCTION, aAny );
+ xDimProp->setPropertyValue( SC_UNO_DP_FUNCTION, uno::Any(eFunc) );
if ( nUsedHierarchy >= 0 )
{
- aAny <<= (sal_Int32)nUsedHierarchy;
- xDimProp->setPropertyValue( SC_UNO_DP_USEDHIERARCHY, aAny );
+ xDimProp->setPropertyValue( SC_UNO_DP_USEDHIERARCHY, uno::Any((sal_Int32)nUsedHierarchy) );
}
if ( pReferenceValue )
{
- aAny <<= *pReferenceValue;
- xDimProp->setPropertyValue( SC_UNO_DP_REFVALUE, aAny );
+ ;
+ xDimProp->setPropertyValue( SC_UNO_DP_REFVALUE, uno::Any(*pReferenceValue) );
}
if (mpLayoutName)
@@ -633,7 +629,6 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
OSL_ENSURE( xLevProp.is(), "no properties at level" );
if ( xLevProp.is() )
{
- uno::Any aAny;
if ( !bSubTotalDefault )
{
if ( !pSubTotalFuncs )
@@ -643,8 +638,7 @@ void ScDPSaveDimension::WriteToSource( const uno::Reference<uno::XInterface>& xD
sheet::GeneralFunction* pArray = aSeq.getArray();
for (long i=0; i<nSubTotalCount; i++)
pArray[i] = (sheet::GeneralFunction)pSubTotalFuncs[i];
- aAny <<= aSeq;
- xLevProp->setPropertyValue( SC_UNO_DP_SUBTOTAL, aAny );
+ xLevProp->setPropertyValue( SC_UNO_DP_SUBTOTAL, uno::Any(aSeq) );
}
if ( nShowEmptyMode != SC_DPSAVEMODE_DONTKNOW )
lcl_SetBoolProperty( xLevProp,
@@ -1150,9 +1144,7 @@ static void lcl_ResetOrient( const uno::Reference<sheet::XDimensionsSupplier>& x
uno::Reference<beans::XPropertySet> xDimProp( xIntDim, uno::UNO_QUERY );
if (xDimProp.is())
{
- uno::Any aAny;
- aAny <<= eOrient;
- xDimProp->setPropertyValue( SC_UNO_DP_ORIENTATION, aAny );
+ xDimProp->setPropertyValue( SC_UNO_DP_ORIENTATION, uno::Any(eOrient) );
}
}
}
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index d5922131e1c1..a1eb0433d214 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -463,11 +463,9 @@ SdrObjectPtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, c
{
//Need summary type for export. Detail type(checkbox, button ...) has been contained by mnObjType
const sal_Int16 nTBXControlType = eCreateFromMSTBXControl ;
- Any aAny;
- aAny <<= nTBXControlType;
try
{
- xPropSet->setPropertyValue(sPropertyName, aAny);
+ xPropSet->setPropertyValue(sPropertyName, Any(nTBXControlType));
}
catch(const Exception&)
{
@@ -482,14 +480,11 @@ SdrObjectPtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, c
if( pObj != nullptr && pObj->IsOcxControl() )
{
const sal_Int16 nOCXControlType = eCreateFromMSOCXControl;
- Any aAny;
try
{
- aAny <<= nOCXControlType;
- xPropSet->setPropertyValue(sPropertyName, aAny);
+ xPropSet->setPropertyValue(sPropertyName, Any(nOCXControlType));
//Detail type(checkbox, button ...)
- aAny<<= mnObjId;
- xPropSet->setPropertyValue(sObjIdPropertyName, aAny);
+ xPropSet->setPropertyValue(sObjIdPropertyName, makeAny<sal_uInt16>(mnObjId));
}
catch(const Exception&)
{
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index 65e9a547e366..749400d6f6d2 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -267,20 +267,14 @@ uno::Any SAL_CALL
ScAccessibleCellBase::getMaximumValue( )
throw (uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= DBL_MAX;
-
- return aAny;
+ return uno::Any(DBL_MAX);
}
uno::Any SAL_CALL
ScAccessibleCellBase::getMinimumValue( )
throw (uno::RuntimeException, std::exception)
{
- uno::Any aAny;
- aAny <<= -DBL_MAX;
-
- return aAny;
+ return uno::Any(-DBL_MAX);
}
//===== XServiceInfo ====================================================
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 34c1ca250dd6..a1112b5dbeef 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -173,9 +173,7 @@ uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getCurrentValue() throw (uno::R
else
fValue = maCellPos.Row();
- uno::Any aAny;
- aAny <<= fValue;
- return aAny;
+ return uno::Any(fValue);
}
sal_Bool SAL_CALL ScAccessiblePreviewHeaderCell::setCurrentValue( const uno::Any& /* aNumber */ )
@@ -195,17 +193,13 @@ uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getMaximumValue() throw (uno::R
fValue = MAXCOL;
else
fValue = MAXROW;
- uno::Any aAny;
- aAny <<= fValue;
- return aAny;
+ return uno::Any(fValue);
}
uno::Any SAL_CALL ScAccessiblePreviewHeaderCell::getMinimumValue() throw (uno::RuntimeException, std::exception)
{
double fValue(0.0);
- uno::Any aAny;
- aAny <<= fValue;
- return aAny;
+ return uno::Any(fValue);
}
//===== XAccessibleComponent ============================================
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 0b39678594ff..5fc52586fbf5 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2265,9 +2265,7 @@ void ScModule::SetAutoSpellProperty( bool bSet )
// loading the linguistic component
SvtLinguConfig aConfig;
- uno::Any aAny;
- aAny <<= bSet;
- aConfig.SetProperty( OUString( LINGUPROP_AUTOSPELL ), aAny );
+ aConfig.SetProperty( OUString( LINGUPROP_AUTOSPELL ), uno::Any(bSet) );
}
bool ScModule::HasThesaurusLanguage( sal_uInt16 nLang )
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 1f258da9a526..ec1dd90c7ea8 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -213,16 +213,12 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
sal_Int32 nType = rParam.bSql ? sdb::CommandType::COMMAND :
( (rParam.nType == ScDbQuery) ? sdb::CommandType::QUERY :
sdb::CommandType::TABLE );
- uno::Any aAny;
- aAny <<= rParam.aDBName;
- xRowProp->setPropertyValue( SC_DBPROP_DATASOURCENAME, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_DATASOURCENAME, uno::Any(rParam.aDBName) );
- aAny <<= rParam.aStatement;
- xRowProp->setPropertyValue( SC_DBPROP_COMMAND, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMAND, uno::Any(rParam.aStatement) );
- aAny <<= nType;
- xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, uno::Any(nType) );
uno::Reference<sdb::XCompletedExecution> xExecute( xRowSet, uno::UNO_QUERY );
if ( xExecute.is() )
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 35cd59f0306e..f57582a5f510 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -326,19 +326,14 @@ sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncodi
if (!xRowProp.is()) return SCERR_IMPORT_CONNECT;
sal_Int32 nType = sdb::CommandType::TABLE;
- uno::Any aAny;
- aAny <<= xConnection;
- xRowProp->setPropertyValue( SC_DBPROP_ACTIVECONNECTION, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_ACTIVECONNECTION, uno::Any(xConnection) );
- aAny <<= nType;
- xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, uno::Any(nType) );
- aAny <<= OUString( aTabName );
- xRowProp->setPropertyValue( SC_DBPROP_COMMAND, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMAND, uno::Any(aTabName) );
- aAny <<= false;
- xRowProp->setPropertyValue( SC_DBPROP_PROPCHANGE_NOTIFY, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_PROPCHANGE_NOTIFY, uno::Any(false) );
xRowSet->execute();
@@ -795,7 +790,6 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
KillFile( aDeleteObj );
sal_uLong nErr = eERR_OK;
- uno::Any aAny;
SCCOL nFirstCol, nLastCol;
SCROW nFirstRow, nLastRow;
@@ -870,8 +864,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
OSL_ENSURE( xTableDesc.is(), "can't get table descriptor" );
if (!xTableDesc.is()) return SCERR_EXPORT_CONNECT;
- aAny <<= OUString( aTabName );
- xTableDesc->setPropertyValue( SC_DBPROP_NAME, aAny );
+ xTableDesc->setPropertyValue( SC_DBPROP_NAME, uno::Any(aTabName) );
// create columns
@@ -903,17 +896,13 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
OSL_ENSURE( xColumnDesc.is(), "can't get column descriptor" );
if (!xColumnDesc.is()) return SCERR_EXPORT_CONNECT;
- aAny <<= pColNames[nCol];
- xColumnDesc->setPropertyValue( SC_DBPROP_NAME, aAny );
+ xColumnDesc->setPropertyValue( SC_DBPROP_NAME, uno::Any(pColNames[nCol]) );
- aAny <<= pColTypes[nCol];
- xColumnDesc->setPropertyValue( SC_DBPROP_TYPE, aAny );
+ xColumnDesc->setPropertyValue( SC_DBPROP_TYPE, uno::Any(pColTypes[nCol]) );
- aAny <<= pColLengths[nCol];
- xColumnDesc->setPropertyValue( SC_DBPROP_PRECISION, aAny );
+ xColumnDesc->setPropertyValue( SC_DBPROP_PRECISION, uno::Any(pColLengths[nCol]) );
- aAny <<= pColScales[nCol];
- xColumnDesc->setPropertyValue( SC_DBPROP_SCALE, aAny );
+ xColumnDesc->setPropertyValue( SC_DBPROP_SCALE, uno::Any(pColScales[nCol]) );
xColumnsAppend->appendByDescriptor( xColumnDesc );
}
@@ -929,14 +918,11 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
OSL_ENSURE( xRowProp.is(), "can't get RowSet" );
if (!xRowProp.is()) return SCERR_EXPORT_CONNECT;
- aAny <<= xConnection;
- xRowProp->setPropertyValue( SC_DBPROP_ACTIVECONNECTION, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_ACTIVECONNECTION, uno::Any(xConnection) );
- aAny <<= (sal_Int32) sdb::CommandType::TABLE;
- xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMANDTYPE, uno::Any((sal_Int32) sdb::CommandType::TABLE) );
- aAny <<= OUString( aTabName );
- xRowProp->setPropertyValue( SC_DBPROP_COMMAND, aAny );
+ xRowProp->setPropertyValue( SC_DBPROP_COMMAND, uno::Any(aTabName) );
xRowSet->execute();
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index bdef1063be5f..09aa59f496af 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -189,28 +189,23 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq )
OUString sPropTargetFrame( "TargetFrame" );
OUString sPropLabel( "Label" );
- uno::Any aAny;
if ( xInfo->hasPropertyByName( sPropLabel ) )
{
- aAny <<= OUString(rName);
- xPropSet->setPropertyValue( sPropLabel, aAny );
+ xPropSet->setPropertyValue( sPropLabel, uno::Any(rName) );
}
OUString aTmp = INetURLObject::GetAbsURL( pViewData->GetDocShell()->GetMedium()->GetBaseURL(), rURL );
- aAny <<= aTmp;
- xPropSet->setPropertyValue( sPropTargetURL, aAny );
+ xPropSet->setPropertyValue( sPropTargetURL, uno::Any(aTmp) );
if( !rTarget.isEmpty() && xInfo->hasPropertyByName( sPropTargetFrame ) )
{
- aAny <<= OUString(rTarget);
- xPropSet->setPropertyValue( sPropTargetFrame, aAny );
+ xPropSet->setPropertyValue( sPropTargetFrame, uno::Any(rTarget) );
}
if ( xInfo->hasPropertyByName( sPropButtonType ) )
{
form::FormButtonType eButtonType = form::FormButtonType_URL;
- aAny <<= eButtonType;
- xPropSet->setPropertyValue( sPropButtonType, aAny );
+ xPropSet->setPropertyValue( sPropButtonType, uno::Any(eButtonType) );
}
//! Undo ???
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx
index ae121a45aed0..5fce4c2f2489 100644
--- a/sc/source/ui/unoobj/condformatuno.cxx
+++ b/sc/source/ui/unoobj/condformatuno.cxx
@@ -551,9 +551,7 @@ uno::Any ScCondFormatObj::getByIndex(sal_Int32 nIndex)
const ScFormatEntry* pEntry = getCoreObject()->GetEntry(nIndex);
uno::Reference<beans::XPropertySet> xCondEntry =
createConditionEntry(pEntry, this);
- uno::Any aAny;
- aAny <<= xCondEntry;
- return aAny;
+ return uno::Any(xCondEntry);
}
uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCondFormatObj::getPropertySetInfo()
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index 2caf872d8d5b..d93b4dcd2130 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -1205,9 +1205,7 @@ void ScDDELinkObj::setResults( const uno::Sequence< uno::Sequence< uno::Any > >&
size_t nPos = 0;
if ( rDoc.FindDdeLink( aAppl, aTopic, aItem, SC_DDE_IGNOREMODE, nPos ) )
{
- uno::Any aAny;
- aAny <<= aResults;
- ScMatrixRef xMatrix = ScSequenceToMatrix::CreateMixedMatrix( aAny );
+ ScMatrixRef xMatrix = ScSequenceToMatrix::CreateMixedMatrix( Any(aResults) );
bSuccess = rDoc.SetDdeLinkResultMatrix( nPos, xMatrix );
}
}
@@ -1574,9 +1572,7 @@ Any SAL_CALL ScExternalDocLinkObj::getByName(const OUString &aName)
Reference< sheet::XExternalSheetCache > aSheetCache(new ScExternalSheetCacheObj(mpDocShell, pTable, nIndex));
- Any aAny;
- aAny <<= aSheetCache;
- return aAny;
+ return Any(aSheetCache);
}
Sequence< OUString > SAL_CALL ScExternalDocLinkObj::getElementNames()
@@ -1636,9 +1632,7 @@ Any SAL_CALL ScExternalDocLinkObj::getByIndex(sal_Int32 nApiIndex)
Reference< sheet::XExternalSheetCache > aSheetCache(new ScExternalSheetCacheObj(mpDocShell, pTable, nIndex));
- Any aAny;
- aAny <<= aSheetCache;
- return aAny;
+ return Any(aSheetCache);
}
Reference< container::XEnumeration > SAL_CALL ScExternalDocLinkObj::createEnumeration()
@@ -1705,9 +1699,7 @@ Any SAL_CALL ScExternalDocLinksObj::getByName(const OUString &aName)
sal_uInt16 nFileId = mpRefMgr->getExternalFileId(aDocUrl);
Reference< sheet::XExternalDocLink > aDocLink(new ScExternalDocLinkObj(mpDocShell, mpRefMgr, nFileId));
- Any aAny;
- aAny <<= aDocLink;
- return aAny;
+ return Any(aDocLink);
}
Sequence< OUString > SAL_CALL ScExternalDocLinksObj::getElementNames()
@@ -1752,9 +1744,7 @@ Any SAL_CALL ScExternalDocLinksObj::getByIndex(sal_Int32 nIndex)
throw lang::IndexOutOfBoundsException();
Reference< sheet::XExternalDocLink > aDocLink(new ScExternalDocLinkObj(mpDocShell, mpRefMgr, nFileId));
- Any aAny;
- aAny <<= aDocLink;
- return aAny;
+ return Any(aDocLink);
}
Reference< container::XEnumeration > SAL_CALL ScExternalDocLinksObj::createEnumeration()
diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx
index 54b7ba43a6d2..73cbb2ca2073 100644
--- a/sc/source/ui/view/tabvwshg.cxx
+++ b/sc/source/ui/view/tabvwshg.cxx
@@ -71,29 +71,23 @@ void ScTabViewShell::InsertURLButton( const OUString& rName, const OUString& rUR
return;
uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY );
- uno::Any aAny;
- aAny <<= OUString(rName);
- xPropSet->setPropertyValue("Label", aAny );
+ xPropSet->setPropertyValue("Label", uno::Any(rName) );
OUString aTmp = INetURLObject::GetAbsURL( pDoc->GetDocumentShell()->GetMedium()->GetBaseURL(), rURL );
- aAny <<= aTmp;
- xPropSet->setPropertyValue("TargetURL", aAny );
+ xPropSet->setPropertyValue("TargetURL", uno::Any(aTmp) );
if( !rTarget.isEmpty() )
{
- aAny <<= rTarget;
- xPropSet->setPropertyValue("TargetFrame", aAny );
+ xPropSet->setPropertyValue("TargetFrame", uno::Any(rTarget) );
}
form::FormButtonType eButtonType = form::FormButtonType_URL;
- aAny <<= eButtonType;
- xPropSet->setPropertyValue("ButtonType", aAny );
+ xPropSet->setPropertyValue("ButtonType", uno::Any(eButtonType) );
if ( ::avmedia::MediaWindow::isMediaURL( rURL, ""/*TODO?*/ ) )
{
- aAny <<= true;
- xPropSet->setPropertyValue("DispatchURLInternal", aAny );
+ xPropSet->setPropertyValue("DispatchURLInternal", uno::Any(true) );
}
Point aPos;
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 98f50c82c246..537f58a17754 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2661,11 +2661,9 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe
maTabData[nTab]->WriteUserDataSequence(aTableViewSettings, *this, nTab);
OUString sTabName;
GetDocument()->GetName( nTab, sTabName );
- uno::Any aAny;
- aAny <<= aTableViewSettings;
try
{
- xNameContainer->insertByName(sTabName, aAny);
+ xNameContainer->insertByName(sTabName, uno::Any(aTableViewSettings));
}
//#101739#; two tables with the same name are possible
catch ( container::ElementExistException& )
diff --git a/sc/workben/result.cxx b/sc/workben/result.cxx
index 0548630af8e5..3fd9f5538e6b 100644
--- a/sc/workben/result.cxx
+++ b/sc/workben/result.cxx
@@ -37,13 +37,11 @@ void ScAddInResult::NewValue()
{
++nTickCount;
- uno::Any aAny;
String aRet = aArg;
aRet += nTickCount;
OUString aUStr = StringToOUString( aRet, CHARSET_SYSTEM );
- aAny <<= aUStr;
- sheet::ResultEvent aEvent( (cppu::OWeakObject*)this, aAny );
+ sheet::ResultEvent aEvent( (cppu::OWeakObject*)this, Any(aUStr) );
for (size_t n = 0; n < m_Listeners.size(); ++n)
m_Listeners[n]->modified( aEvent );