diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-03 23:26:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-04 08:09:59 +0200 |
commit | 6cd4194e05233e8d1ddb59ffb9703778668b3f1b (patch) | |
tree | 7426ebc757cc92988d561b07580854b55160c3b5 /sc/source/ui | |
parent | 5fc8f8620d0367813d20b9a90ece47f0674996b3 (diff) |
Just use Any ctor instead of makeAny in sc
Change-Id: I5c2363ff03ae02274f3c334cc262977c834950d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133788
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/source/ui')
65 files changed, 428 insertions, 428 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index 251bba490f87..52b5a6c53a55 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -697,7 +697,7 @@ void ScChildrenShapes::Select(sal_Int32 nIndex) try { - xSelectionSupplier->select(uno::makeAny(xShapes)); + xSelectionSupplier->select(uno::Any(xShapes)); maZOrderedShapes[nIndex]->bSelected = true; if (maZOrderedShapes[nIndex]->pAccShape.is()) maZOrderedShapes[nIndex]->pAccShape->SetState(AccessibleStateType::SELECTED); @@ -761,7 +761,7 @@ void ScChildrenShapes::SelectAll() xShapes->add(pAccShapeData->xShape); } } - xSelectionSupplier->select(uno::makeAny(xShapes)); + xSelectionSupplier->select(uno::Any(xShapes)); } catch (lang::IllegalArgumentException&) { @@ -856,7 +856,7 @@ void ScChildrenShapes::Deselect(sal_Int32 nChildIndex) try { - xSelectionSupplier->select(uno::makeAny(xShapes)); + xSelectionSupplier->select(uno::Any(xShapes)); } catch (lang::IllegalArgumentException&) { diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx index 42b20f3d2cb5..b7a0f95c9503 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -97,7 +97,7 @@ void ScDBDocFunc::ShowInBeamer( const ScImportParam& rParam, const SfxViewFrame* aSelection[svx::DataAccessDescriptorProperty::Command] <<= rParam.aStatement; aSelection[svx::DataAccessDescriptorProperty::CommandType] <<= nType; - xControllerSelection->select(uno::makeAny(aSelection.createPropertyValueSequence())); + xControllerSelection->select(uno::Any(aSelection.createPropertyValueSequence())); } else { diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 633fda283499..159520c5651f 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -765,7 +765,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) SfxFrame* pFrame = ( pViewFrame ? &pViewFrame->GetFrame() : nullptr ); uno::Reference< frame::XController > xController = ( pFrame ? pFrame->GetController() : nullptr ); uno::Reference< sheet::XSpreadsheetView > xSpreadsheetView( xController, uno::UNO_QUERY_THROW ); - uno::Sequence< beans::NamedValue > aArgsForJob { { "SpreadsheetView", uno::makeAny( xSpreadsheetView ) } }; + uno::Sequence< beans::NamedValue > aArgsForJob { { "SpreadsheetView", uno::Any( xSpreadsheetView ) } }; xJob->execute( aArgsForJob ); } } diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 630856607c79..1f9368e9431d 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -162,7 +162,7 @@ bool ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject& OUString aTransferName = "transfer"; if ( xInfo->hasCommandByName( aTransferName ) ) { - aDestPath.executeCommand( aTransferName, uno::makeAny( + aDestPath.executeCommand( aTransferName, uno::Any( css::ucb::TransferInfo( bMoveData, rSourceObj.GetMainURL(INetURLObject::DecodeMechanism::NONE), aName, css::ucb::NameClash::ERROR ) ) ); } diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 871353c84768..21fe08519773 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -503,7 +503,7 @@ SfxMedium* ScDocumentLoader::CreateMedium( const OUString& rFileName, std::share css::uno::Reference<css::uno::XComponentContext> xContext = comphelper::getProcessComponentContext(); css::uno::Reference<css::task::XInteractionHandler> xIHdl(css::task::InteractionHandler::createWithParent(xContext, pInteractionParent->GetXWindow()), css::uno::UNO_QUERY_THROW); - pSet->Put(SfxUnoAnyItem(SID_INTERACTIONHANDLER, makeAny(xIHdl))); + pSet->Put(SfxUnoAnyItem(SID_INTERACTIONHANDLER, css::uno::Any(xIHdl))); } SfxMedium *pRet = new SfxMedium( rFileName, StreamMode::STD_READ, pFilter, std::move(pSet) ); diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 62cd366da38f..380a5b9ca6bc 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -182,16 +182,16 @@ void lcl_ChartInit(const uno::Reference <embed::XEmbeddedObject>& xObj, ScViewDa uno::Sequence< beans::PropertyValue > aArgs{ beans::PropertyValue( "CellRangeRepresentation", -1, - uno::makeAny( aRangeString ), beans::PropertyState_DIRECT_VALUE ), + uno::Any( aRangeString ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( "HasCategories", -1, - uno::makeAny( bHasCategories ), beans::PropertyState_DIRECT_VALUE ), + uno::Any( bHasCategories ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( "FirstCellAsLabel", -1, - uno::makeAny( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE ), + uno::Any( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( "DataRowSource", -1, - uno::makeAny( eDataRowSource ), beans::PropertyState_DIRECT_VALUE ) + uno::Any( eDataRowSource ), beans::PropertyState_DIRECT_VALUE ) }; try @@ -655,12 +655,12 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawV //calculate and set new position Point aDialogPos = rViewShell.GetChartDialogPos( aDialogSize, aRect ); xDialogProps->setPropertyValue("Position", - uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); + uno::Any( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); } } //tell the dialog to unlock controller xDialogProps->setPropertyValue("UnlockControllersOnExecute", - uno::makeAny( true ) ); + uno::Any( true ) ); } catch( uno::Exception& ) diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index 031b6b23f4a3..6f4dfab2cc7a 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -89,7 +89,7 @@ ScFormulaDlg::ScFormulaDlg(SfxBindings* pB, SfxChildWindow* pCW, m_xParser.set(ScServiceProvider::MakeInstance(ScServiceProvider::Type::FORMULAPARS, static_cast<ScDocShell*>(m_pDoc->GetDocumentShell())),uno::UNO_QUERY); uno::Reference< beans::XPropertySet> xSet(m_xParser,uno::UNO_QUERY); - xSet->setPropertyValue(SC_UNO_COMPILEFAP, uno::makeAny(true)); + xSet->setPropertyValue(SC_UNO_COMPILEFAP, uno::Any(true)); m_xOpCodeMapper.set(ScServiceProvider::MakeInstance(ScServiceProvider::Type::OPCODEMAPPER, static_cast<ScDocShell*>(m_pDoc->GetDocumentShell())),uno::UNO_QUERY); diff --git a/sc/source/ui/unoobj/TablePivotCharts.cxx b/sc/source/ui/unoobj/TablePivotCharts.cxx index e4d09f459f91..8e9203fe4223 100644 --- a/sc/source/ui/unoobj/TablePivotCharts.cxx +++ b/sc/source/ui/unoobj/TablePivotCharts.cxx @@ -143,9 +143,9 @@ void SAL_CALL TablePivotCharts::addNewByName(OUString const & rName, xReceiver->attachNumberFormatsSupplier(xNumberFormatsSupplier); uno::Sequence<beans::PropertyValue> aArgs( comphelper::InitPropertySequence({ - { "CellRangeRepresentation", uno::makeAny(rDataPilotName) }, - { "HasCategories", uno::makeAny(true) }, - { "DataRowSource", uno::makeAny(chart::ChartDataRowSource_COLUMNS) } + { "CellRangeRepresentation", uno::Any(rDataPilotName) }, + { "HasCategories", uno::Any(true) }, + { "DataRowSource", uno::Any(chart::ChartDataRowSource_COLUMNS) } })); xReceiver->setArguments(aArgs); } @@ -218,7 +218,7 @@ uno::Any SAL_CALL TablePivotCharts::getByIndex(sal_Int32 nIndex) if (!xChart.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xChart); + return uno::Any(xChart); } uno::Type SAL_CALL TablePivotCharts::getElementType() @@ -244,7 +244,7 @@ uno::Any SAL_CALL TablePivotCharts::getByName(OUString const & rName) if (!xChart.is()) throw container::NoSuchElementException(); - return uno::makeAny(xChart); + return uno::Any(xChart); } uno::Sequence<OUString> SAL_CALL TablePivotCharts::getElementNames() diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index 15a8bcbafe1b..6507ce6e2ec2 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -280,7 +280,7 @@ uno::Any SAL_CALL ScAutoFormatsObj::getByIndex( sal_Int32 nIndex ) uno::Reference< container::XNamed > xFormat(GetObjectByIndex_Impl(static_cast<sal_uInt16>(nIndex))); if (!xFormat.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xFormat); + return uno::Any(xFormat); } uno::Type SAL_CALL ScAutoFormatsObj::getElementType() @@ -303,7 +303,7 @@ uno::Any SAL_CALL ScAutoFormatsObj::getByName( const OUString& aName ) uno::Reference< container::XNamed > xFormat(GetObjectByName_Impl(aName)); if (!xFormat.is()) throw container::NoSuchElementException(); - return uno::makeAny(xFormat); + return uno::Any(xFormat); } uno::Sequence<OUString> SAL_CALL ScAutoFormatsObj::getElementNames() @@ -397,7 +397,7 @@ uno::Any SAL_CALL ScAutoFormatObj::getByIndex( sal_Int32 nIndex ) throw lang::IndexOutOfBoundsException(); if (IsInserted()) - return uno::makeAny(uno::Reference< beans::XPropertySet >(GetObjectByIndex_Impl(static_cast<sal_uInt16>(nIndex)))); + return uno::Any(uno::Reference< beans::XPropertySet >(GetObjectByIndex_Impl(static_cast<sal_uInt16>(nIndex)))); return uno::Any(); } diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index af81993e231c..841d9b2f0315 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -518,7 +518,7 @@ uno::Any SAL_CALL ScFunctionListObj::getByName( const OUString& aName ) { uno::Sequence<beans::PropertyValue> aSeq( SC_FUNCDESC_PROPCOUNT ); lcl_FillSequence( aSeq, *pDesc ); - return uno::makeAny(aSeq); + return uno::Any(aSeq); } } @@ -551,7 +551,7 @@ uno::Any SAL_CALL ScFunctionListObj::getByIndex( sal_Int32 nIndex ) { uno::Sequence<beans::PropertyValue> aSeq( SC_FUNCDESC_PROPCOUNT ); lcl_FillSequence( aSeq, *pDesc ); - return uno::makeAny(aSeq); + return uno::Any(aSeq); } } diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 70873df00568..9901466102e4 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -4482,7 +4482,7 @@ uno::Any SAL_CALL ScCellRangesObj::getByIndex( sal_Int32 nIndex ) if (!xRange.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xRange); + return uno::Any(xRange); } @@ -6039,7 +6039,7 @@ void SAL_CALL ScCellObj::insertTextContent( const uno::Reference<text::XTextRang } if (pCellField->GetFieldType() == text::textfield::Type::TABLE) - pCellField->setPropertyValue(SC_UNONAME_TABLEPOS, uno::makeAny<sal_Int32>(aCellPos.Tab())); + pCellField->setPropertyValue(SC_UNONAME_TABLEPOS, uno::Any(sal_Int32(aCellPos.Tab()))); SvxFieldItem aItem = pCellField->CreateFieldItem(); SvxTextForwarder* pForwarder = pEditSource->GetTextForwarder(); @@ -8779,7 +8779,7 @@ uno::Any SAL_CALL ScCellsEnumeration::nextElement() ScAddress aTempPos(aPos); Advance_Impl(); - return uno::makeAny(uno::Reference<table::XCell>(new ScCellObj( pDocShell, aTempPos ))); + return uno::Any(uno::Reference<table::XCell>(new ScCellObj( pDocShell, aTempPos ))); } throw container::NoSuchElementException(); // no more elements @@ -8877,7 +8877,7 @@ uno::Any SAL_CALL ScCellFormatsObj::getByIndex( sal_Int32 nIndex ) if (!xRange.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xRange); + return uno::Any(xRange); } @@ -9004,7 +9004,7 @@ uno::Any SAL_CALL ScCellFormatsEnumeration::nextElement() // interface must match ScCellFormatsObj::getElementType - return uno::makeAny(uno::Reference<table::XCellRange> (NextObject_Impl())); + return uno::Any(uno::Reference<table::XCellRange> (NextObject_Impl())); } ScUniqueCellFormatsObj::~ScUniqueCellFormatsObj() @@ -9230,7 +9230,7 @@ uno::Any SAL_CALL ScUniqueCellFormatsObj::getByIndex( sal_Int32 nIndex ) if(o3tl::make_unsigned(nIndex) >= aRangeLists.size()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(uno::Reference<sheet::XSheetCellRangeContainer>(new ScCellRangesObj(pDocShell, aRangeLists[nIndex]))); + return uno::Any(uno::Reference<sheet::XSheetCellRangeContainer>(new ScCellRangesObj(pDocShell, aRangeLists[nIndex]))); } @@ -9302,7 +9302,7 @@ uno::Any SAL_CALL ScUniqueCellFormatsEnumeration::nextElement() // interface type must match ScCellFormatsObj::getElementType - return uno::makeAny(uno::Reference<sheet::XSheetCellRangeContainer>(new ScCellRangesObj(pDocShell, aRangeLists[nCurrentPosition++]))); + return uno::Any(uno::Reference<sheet::XSheetCellRangeContainer>(new ScCellRangesObj(pDocShell, aRangeLists[nCurrentPosition++]))); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx index 701743277e43..6bf868cf37cb 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.cxx +++ b/sc/source/ui/unoobj/cellvaluebinding.cxx @@ -386,7 +386,7 @@ namespace calc if ( !bWasBoolean ) { sal_Int32 nNewIndex = xTypes->getStandardFormat( NumberFormat::LOGICAL, aLocale ); - xCellProp->setPropertyValue( sPropName, makeAny( nNewIndex ) ); + xCellProp->setPropertyValue( sPropName, Any( nNewIndex ) ); } } diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 9ca2e73bd4ec..194b166e6bf5 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -1930,7 +1930,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum func = ::std::for_each(aAllTokens.begin(), aAllTokens.end(), func); func.getVector(aTableNumVector); aResult.emplace_back( "TableNumberList", -1, - uno::makeAny( lcl_createTableNumberList( aTableNumVector ) ), + uno::Any( lcl_createTableNumberList( aTableNumVector ) ), beans::PropertyState_DIRECT_VALUE ); } @@ -1938,13 +1938,13 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum { // DataRowSource (calculated before) aResult.emplace_back( "DataRowSource", -1, - uno::makeAny( eRowSource ), beans::PropertyState_DIRECT_VALUE ); + uno::Any( eRowSource ), beans::PropertyState_DIRECT_VALUE ); // HasCategories aResult.emplace_back( "HasCategories", -1, - uno::makeAny( bHasCategories ), beans::PropertyState_DIRECT_VALUE ); + uno::Any( bHasCategories ), beans::PropertyState_DIRECT_VALUE ); // FirstCellAsLabel aResult.emplace_back( "FirstCellAsLabel", -1, - uno::makeAny( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE ); + uno::Any( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE ); } // Add the left upper corner to the range if it is missing. @@ -1969,7 +1969,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum // add cell range property aResult.emplace_back( "CellRangeRepresentation", -1, - uno::makeAny( sRangeRep ), beans::PropertyState_DIRECT_VALUE ); + uno::Any( sRangeRep ), beans::PropertyState_DIRECT_VALUE ); //Sequence Mapping bool const bSequencesReordered = true;//todo detect this above or detect this sequence mapping cheaper ... @@ -2029,7 +2029,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum if( bDifferentIndexes && !aSequenceMappingVector.empty() ) { aResult.emplace_back( "SequenceMapping", -1, - uno::makeAny( comphelper::containerToSequence(aSequenceMappingVector) ) + uno::Any( comphelper::containerToSequence(aSequenceMappingVector) ) , beans::PropertyState_DIRECT_VALUE ); } } diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index 9bf802f812d5..03018c6505b0 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -226,16 +226,16 @@ void SAL_CALL ScChartsObj::addNewByName( const OUString& rName, uno::Sequence< beans::PropertyValue > aArgs{ beans::PropertyValue( "CellRangeRepresentation", -1, - uno::makeAny( sRangeStr ), beans::PropertyState_DIRECT_VALUE ), + uno::Any( sRangeStr ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( "HasCategories", -1, - uno::makeAny( bRowHeaders ), beans::PropertyState_DIRECT_VALUE ), + uno::Any( bRowHeaders ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( "FirstCellAsLabel", -1, - uno::makeAny( bColumnHeaders ), beans::PropertyState_DIRECT_VALUE ), + uno::Any( bColumnHeaders ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( "DataRowSource", -1, - uno::makeAny( chart::ChartDataRowSource_COLUMNS ), beans::PropertyState_DIRECT_VALUE ) + uno::Any( chart::ChartDataRowSource_COLUMNS ), beans::PropertyState_DIRECT_VALUE ) }; xReceiver->setArguments( aArgs ); } @@ -326,7 +326,7 @@ uno::Any SAL_CALL ScChartsObj::getByIndex( sal_Int32 nIndex ) if (!xChart.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xChart); + return uno::Any(xChart); } uno::Type SAL_CALL ScChartsObj::getElementType() @@ -348,7 +348,7 @@ uno::Any SAL_CALL ScChartsObj::getByName( const OUString& aName ) if (!xChart.is()) throw container::NoSuchElementException(); - return uno::makeAny(xChart); + return uno::Any(xChart); } uno::Sequence<OUString> SAL_CALL ScChartsObj::getElementNames() diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index 27a3dc4c7917..5c6e82faae35 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -638,7 +638,7 @@ uno::Any SAL_CALL ScSubTotalDescriptorBase::getByIndex( sal_Int32 nIndex ) if (!xField.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xField); + return uno::Any(xField); } uno::Type SAL_CALL ScSubTotalDescriptorBase::getElementType() @@ -2245,7 +2245,7 @@ uno::Any SAL_CALL ScDatabaseRangesObj::getByIndex( sal_Int32 nIndex ) if (!xRange.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xRange); + return uno::Any(xRange); } uno::Type SAL_CALL ScDatabaseRangesObj::getElementType() @@ -2269,7 +2269,7 @@ uno::Any SAL_CALL ScDatabaseRangesObj::getByName( const OUString& aName ) if (!xRange.is()) throw container::NoSuchElementException(); - return uno::makeAny(xRange); + return uno::Any(xRange); } uno::Sequence<OUString> SAL_CALL ScDatabaseRangesObj::getElementNames() @@ -2371,7 +2371,7 @@ uno::Any ScUnnamedDatabaseRangesObj::getByTable( sal_Int32 nTab ) if (!xRange.is()) throw container::NoSuchElementException(); - return uno::makeAny(xRange); + return uno::Any(xRange); } sal_Bool ScUnnamedDatabaseRangesObj::hasByTable( sal_Int32 nTab ) diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 0f822195364d..6141039d1a06 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2627,7 +2627,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL ScModelObj::getViewData( ) comphelper::makePropertyValue(SC_POSITIONLEFT, nPosLeft), comphelper::makePropertyValue(SC_POSITIONTOP, nPosTop) }; - xCont->insertByIndex( 0, uno::makeAny( aSeq ) ); + xCont->insertByIndex( 0, uno::Any( aSeq ) ); } } @@ -3586,7 +3586,7 @@ uno::Any SAL_CALL ScDrawPagesObj::getByIndex( sal_Int32 nIndex ) if (!xPage.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xPage); + return uno::Any(xPage); } uno::Type SAL_CALL ScDrawPagesObj::getElementType() @@ -3913,7 +3913,7 @@ uno::Any SAL_CALL ScTableSheetsObj::getByIndex( sal_Int32 nIndex ) if (!xSheet.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xSheet); + return uno::Any(xSheet); // return uno::Any(); } @@ -3939,7 +3939,7 @@ uno::Any SAL_CALL ScTableSheetsObj::getByName( const OUString& aName ) if (!xSheet.is()) throw container::NoSuchElementException(); - return uno::makeAny(xSheet); + return uno::Any(xSheet); } uno::Sequence<OUString> SAL_CALL ScTableSheetsObj::getElementNames() @@ -4085,7 +4085,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getByIndex( sal_Int32 nIndex ) if (!xColumn.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xColumn); + return uno::Any(xColumn); } @@ -4108,7 +4108,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getByName( const OUString& aName ) if (!xColumn.is()) throw container::NoSuchElementException(); - return uno::makeAny(xColumn); + return uno::Any(xColumn); } uno::Sequence<OUString> SAL_CALL ScTableColumnsObj::getElementNames() @@ -4329,7 +4329,7 @@ uno::Any SAL_CALL ScTableRowsObj::getByIndex( sal_Int32 nIndex ) if (!xRow.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xRow); + return uno::Any(xRow); } uno::Type SAL_CALL ScTableRowsObj::getElementType() @@ -4640,7 +4640,7 @@ uno::Any SAL_CALL ScAnnotationsObj::getByIndex( sal_Int32 nIndex ) if (!xAnnotation.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xAnnotation); + return uno::Any(xAnnotation); } uno::Type SAL_CALL ScAnnotationsObj::getElementType() @@ -4795,7 +4795,7 @@ uno::Any SAL_CALL ScScenariosObj::getByIndex( sal_Int32 nIndex ) if (!xScen.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xScen); + return uno::Any(xScen); } uno::Type SAL_CALL ScScenariosObj::getElementType() @@ -4817,7 +4817,7 @@ uno::Any SAL_CALL ScScenariosObj::getByName( const OUString& aName ) if (!xScen.is()) throw container::NoSuchElementException(); - return uno::makeAny(xScen); + return uno::Any(xScen); } uno::Sequence<OUString> SAL_CALL ScScenariosObj::getElementNames() diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index d3b64cac7df3..b7ad6b63a4e8 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -355,7 +355,7 @@ uno::Any SAL_CALL ScCellFieldsObj::getByIndex( sal_Int32 nIndex ) if (!xField.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xField); + return uno::Any(xField); } uno::Type SAL_CALL ScCellFieldsObj::getElementType() @@ -506,7 +506,7 @@ uno::Any SAL_CALL ScHeaderFieldsObj::getByIndex( sal_Int32 nIndex ) if (!xField.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xField); + return uno::Any(xField); } uno::Type SAL_CALL ScHeaderFieldsObj::getElementType() @@ -908,10 +908,10 @@ uno::Any ScEditFieldObj::getPropertyValueDateTime(const OUString& rName) { SvxDateField* p = static_cast<SvxDateField*>(pField); if (rName == SC_UNONAME_ISDATE) - return uno::makeAny(true); + return uno::Any(true); if (rName == SC_UNONAME_ISFIXED) - return uno::makeAny<sal_Bool>(p->GetType() == SvxDateType::Fix); + return uno::Any(p->GetType() == SvxDateType::Fix); if (rName == SC_UNONAME_DATETIME) { @@ -923,39 +923,39 @@ uno::Any ScEditFieldObj::getPropertyValueDateTime(const OUString& rName) maDateTime.Minutes = 0; maDateTime.Seconds = 0; maDateTime.NanoSeconds = 0; - return uno::makeAny(maDateTime); + return uno::Any(maDateTime); } if (rName == SC_UNONAME_NUMFMT) - return uno::makeAny<sal_Int32>(static_cast<sal_Int32>(p->GetFormat())); + return uno::Any(static_cast<sal_Int32>(p->GetFormat())); } break; case text::textfield::Type::TIME: { // SvxTimeField doesn't have any attributes. if (rName == SC_UNONAME_ISDATE) - return uno::makeAny(false); + return uno::Any(false); if (rName == SC_UNONAME_ISFIXED) - return uno::makeAny(false); + return uno::Any(false); if (rName == SC_UNONAME_DATETIME) // This is the best we can do. - return uno::makeAny(maDateTime); + return uno::Any(maDateTime); if (rName == SC_UNONAME_NUMFMT) // Same as above. - return uno::makeAny<sal_Int32>(0); + return uno::Any(sal_Int32(0)); } break; case text::textfield::Type::EXTENDED_TIME: { SvxExtTimeField* p = static_cast<SvxExtTimeField*>(pField); if (rName == SC_UNONAME_ISDATE) - return uno::makeAny(false); + return uno::Any(false); if (rName == SC_UNONAME_ISFIXED) - return uno::makeAny<sal_Bool>(p->GetType() == SvxTimeType::Fix); + return uno::Any(p->GetType() == SvxTimeType::Fix); if (rName == SC_UNONAME_DATETIME) { @@ -967,11 +967,11 @@ uno::Any ScEditFieldObj::getPropertyValueDateTime(const OUString& rName) maDateTime.Minutes = aT.GetMin(); maDateTime.Seconds = aT.GetSec(); maDateTime.NanoSeconds = aT.GetNanoSec(); - return uno::makeAny(maDateTime); + return uno::Any(maDateTime); } if (rName == SC_UNONAME_NUMFMT) - return uno::makeAny<sal_Int32>(static_cast<sal_Int32>(p->GetFormat())); + return uno::Any(static_cast<sal_Int32>(p->GetFormat())); } break; default: @@ -981,16 +981,16 @@ uno::Any ScEditFieldObj::getPropertyValueDateTime(const OUString& rName) else { if (rName == SC_UNONAME_ISDATE) - return uno::makeAny<sal_Bool>(mbIsDate); + return uno::Any(mbIsDate); if (rName == SC_UNONAME_ISFIXED) - return uno::makeAny<sal_Bool>(mbIsFixed); + return uno::Any(mbIsFixed); if (rName == SC_UNONAME_DATETIME) - return uno::makeAny(maDateTime); + return uno::Any(maDateTime); if (rName == SC_UNONAME_NUMFMT) - return uno::makeAny(mnNumFormat); + return uno::Any(mnNumFormat); } throw beans::UnknownPropertyException(rName); @@ -1218,10 +1218,10 @@ uno::Any SAL_CALL ScEditFieldObj::getPropertyValue( const OUString& aPropertyNam { SolarMutexGuard aGuard; if (aPropertyName == SC_UNONAME_TEXTFIELD_TYPE) - return uno::makeAny(meType); + return uno::Any(meType); if (aPropertyName == SC_UNONAME_ANCHOR) - return uno::makeAny(mpContent); + return uno::Any(mpContent); if (aPropertyName == SC_UNONAME_ANCTYPE) { diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx index e23af3503b20..6e815b2f8646 100644 --- a/sc/source/ui/unoobj/fmtuno.cxx +++ b/sc/source/ui/unoobj/fmtuno.cxx @@ -377,7 +377,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByIndex( sal_Int32 nIndex ) if (!xEntry.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xEntry); + return uno::Any(xEntry); } uno::Type SAL_CALL ScTableConditionalFormat::getElementType() @@ -417,7 +417,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByName( const OUString& aName ) if (!xEntry.is()) throw container::NoSuchElementException(); - return uno::makeAny(xEntry); + return uno::Any(xEntry); } uno::Sequence<OUString> SAL_CALL ScTableConditionalFormat::getElementNames() diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index 8e7be93c5baf..61b095abeab2 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -472,7 +472,7 @@ uno::Any SAL_CALL ScSheetLinksObj::getByIndex( sal_Int32 nIndex ) if (!xLink.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xLink); + return uno::Any(xLink); } uno::Type SAL_CALL ScSheetLinksObj::getElementType() @@ -494,7 +494,7 @@ uno::Any SAL_CALL ScSheetLinksObj::getByName( const OUString& aName ) if (!xLink.is()) throw container::NoSuchElementException(); - return uno::makeAny(xLink); + return uno::Any(xLink); } sal_Bool SAL_CALL ScSheetLinksObj::hasByName( const OUString& aName ) @@ -973,7 +973,7 @@ uno::Any SAL_CALL ScAreaLinksObj::getByIndex( sal_Int32 nIndex ) if (!xLink.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xLink); + return uno::Any(xLink); } @@ -1263,7 +1263,7 @@ uno::Any SAL_CALL ScDDELinksObj::getByIndex( sal_Int32 nIndex ) if (!xLink.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xLink); + return uno::Any(xLink); } uno::Type SAL_CALL ScDDELinksObj::getElementType() @@ -1285,7 +1285,7 @@ uno::Any SAL_CALL ScDDELinksObj::getByName( const OUString& aName ) if (!xLink.is()) throw container::NoSuchElementException(); - return uno::makeAny(xLink); + return uno::Any(xLink); } uno::Sequence<OUString> SAL_CALL ScDDELinksObj::getElementNames() diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 05cd82fa91a4..9a286bb6d41b 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -608,7 +608,7 @@ uno::Any SAL_CALL ScNamedRangesObj::getByIndex( sal_Int32 nIndex ) if ( !xRange.is() ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xRange); + return uno::Any(xRange); } uno::Type SAL_CALL ScNamedRangesObj::getElementType() @@ -659,7 +659,7 @@ uno::Any SAL_CALL ScNamedRangesObj::getByName( const OUString& aName ) if ( !xRange.is() ) throw container::NoSuchElementException(); - return uno::makeAny(xRange); + return uno::Any(xRange); } uno::Sequence<OUString> SAL_CALL ScNamedRangesObj::getElementNames() @@ -1143,7 +1143,7 @@ uno::Any SAL_CALL ScLabelRangesObj::getByIndex( sal_Int32 nIndex ) if ( !xRange.is() ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xRange); + return uno::Any(xRange); } uno::Type SAL_CALL ScLabelRangesObj::getElementType() diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index b03f8dc0788b..01a7e90d63d8 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -485,7 +485,7 @@ uno::Any SAL_CALL ScStyleFamiliesObj::getByIndex( sal_Int32 nIndex ) if (!xFamily.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xFamily); + return uno::Any(xFamily); } uno::Type SAL_CALL ScStyleFamiliesObj::getElementType() @@ -509,7 +509,7 @@ uno::Any SAL_CALL ScStyleFamiliesObj::getByName( const OUString& aName ) if (!xFamily.is()) throw container::NoSuchElementException(); - return uno::makeAny(xFamily); + return uno::Any(xFamily); } uno::Sequence<OUString> SAL_CALL ScStyleFamiliesObj::getElementNames() @@ -801,7 +801,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByIndex( sal_Int32 nIndex ) if (!xObj.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xObj); + return uno::Any(xObj); } uno::Type SAL_CALL ScStyleFamilyObj::getElementType() @@ -826,7 +826,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByName( const OUString& aName ) if (!xObj.is()) throw container::NoSuchElementException(); - return uno::makeAny(xObj); + return uno::Any(xObj); } uno::Sequence<OUString> SAL_CALL ScStyleFamilyObj::getElementNames() diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx index 9d3ca299872b..d14c1090f31e 100644 --- a/sc/source/ui/unoobj/targuno.cxx +++ b/sc/source/ui/unoobj/targuno.cxx @@ -97,7 +97,7 @@ uno::Any SAL_CALL ScLinkTargetTypesObj::getByName(const OUString& aName) { for (sal_uInt16 i=0; i<SC_LINKTARGETTYPE_COUNT; i++) if ( aNames[i] == aName ) - return uno::makeAny(uno::Reference< beans::XPropertySet >(new ScLinkTargetTypeObj( pDocShell, i ))); + return uno::Any(uno::Reference< beans::XPropertySet >(new ScLinkTargetTypeObj( pDocShell, i ))); } throw container::NoSuchElementException(); @@ -264,7 +264,7 @@ uno::Any SAL_CALL ScLinkTargetsObj::getByName(const OUString& aName) { uno::Reference<beans::XPropertySet> xProp(xCollection->getByName(aName), uno::UNO_QUERY); if (xProp.is()) - return uno::makeAny(xProp); + return uno::Any(xProp); throw container::NoSuchElementException(); } diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index 4fe5b0c1f7d9..37fef30cf520 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -859,7 +859,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() // is something selected in drawing layer? uno::Reference<uno::XInterface> xRet(pViewSh->getSelectedXShapes()); if (xRet.is()) - return uno::makeAny(xRet); + return uno::Any(xRet); // otherwise sheet (cell) selection @@ -927,7 +927,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() } } - return uno::makeAny(uno::Reference<uno::XInterface>(static_cast<cppu::OWeakObject*>(pObj.get()))); + return uno::Any(uno::Reference<uno::XInterface>(static_cast<cppu::OWeakObject*>(pObj.get()))); } // XEnumerationAccess @@ -964,7 +964,7 @@ uno::Any SAL_CALL ScTabViewObj::getByIndex( sal_Int32 nIndex ) if (!xPane.is()) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(xPane); + return uno::Any(xPane); } uno::Type SAL_CALL ScTabViewObj::getElementType() diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index 37d3a5fcf1de..317b064543b2 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -368,9 +368,9 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& sModuleInfo.ModuleType = script::ModuleType::DOCUMENT; xVBAModuleInfo->insertModuleInfo( rName, sModuleInfo ); if( xLib->hasByName( rName ) ) - xLib->replaceByName( rName, uno::makeAny( OUString( "Option VBASupport 1\n") ) ); + xLib->replaceByName( rName, uno::Any( OUString( "Option VBASupport 1\n") ) ); else - xLib->insertByName( rName, uno::makeAny( OUString( "Option VBASupport 1\n" ) ) ); + xLib->insertByName( rName, uno::Any( OUString( "Option VBASupport 1\n" ) ) ); } } } diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index f9ceb7d930be..2fda7fa860ee 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -300,23 +300,23 @@ ScVbaApplication::getSelection() // TODO Oval with text box if( ScVbaShape::getAutoShapeType( xShape ) == office::MsoAutoShapeType::msoShapeOval ) { - return uno::makeAny( uno::Reference< msforms::XOval >(new ScVbaOvalShape( mxContext, xShape, xShapes, xModel ) ) ); + return uno::Any( uno::Reference< msforms::XOval >(new ScVbaOvalShape( mxContext, xShape, xShapes, xModel ) ) ); } uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW ); if ( xShapeServiceInfo->supportsService("com.sun.star.drawing.Text") ) { - return uno::makeAny( uno::Reference< msforms::XTextBoxShape >( + return uno::Any( uno::Reference< msforms::XTextBoxShape >( new ScVbaTextBoxShape( mxContext, xShape, xShapes, xModel ) ) ); } } else if ( nType == office::MsoShapeType::msoLine ) { - return uno::makeAny( uno::Reference< msforms::XLine >( new ScVbaLineShape( + return uno::Any( uno::Reference< msforms::XLine >( new ScVbaLineShape( mxContext, xShape, xShapes, xModel ) ) ); } - return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, xModel, ScVbaShape::getType( xShape ) ) ) ); + return uno::Any( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, xModel, ScVbaShape::getType( xShape ) ) ) ); } else if( xServiceInfo->supportsService("com.sun.star.sheet.SheetCellRange") || xServiceInfo->supportsService("com.sun.star.sheet.SheetCellRanges") ) @@ -326,10 +326,10 @@ ScVbaApplication::getSelection() { uno::Reference< sheet::XSheetCellRangeContainer > xRanges( aSelection, ::uno::UNO_QUERY); if ( xRanges.is() ) - return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( excel::getUnoSheetModuleObj( xRanges ), mxContext, xRanges ) ) ); + return uno::Any( uno::Reference< excel::XRange >( new ScVbaRange( excel::getUnoSheetModuleObj( xRanges ), mxContext, xRanges ) ) ); } - return uno::makeAny( uno::Reference< excel::XRange >(new ScVbaRange( excel::getUnoSheetModuleObj( xRange ), mxContext, xRange ) ) ); + return uno::Any( uno::Reference< excel::XRange >(new ScVbaRange( excel::getUnoSheetModuleObj( xRange ), mxContext, xRange ) ) ); } else { @@ -368,7 +368,7 @@ ScVbaApplication::GetOpenFilename(const uno::Any& /*aFileFilter*/, const uno::An if (xDialog->Show() == 0) { // return FALSE when canceled - return uno::makeAny(false); + return uno::Any(false); } uno::Reference<excel::XFileDialogSelectedItems> xItems = xDialog->getSelectedItems(); @@ -385,12 +385,12 @@ ScVbaApplication::GetOpenFilename(const uno::Any& /*aFileFilter*/, const uno::An OUString aPath; if (!rItemVector.empty()) aPath = rItemVector.at(0); - return uno::makeAny(aPath); + return uno::Any(aPath); } else { // convert to sequence - return uno::makeAny(comphelper::containerToSequence(rItemVector)); + return uno::Any(comphelper::containerToSequence(rItemVector)); } } @@ -440,7 +440,7 @@ ScVbaApplication::Worksheets( const uno::Any& aIndex ) uno::Any SAL_CALL ScVbaApplication::WorksheetFunction( ) { - return uno::makeAny( uno::Reference< script::XInvocation >( new ScVbaWSFunction( this, mxContext ) ) ); + return uno::Any( uno::Reference< script::XInvocation >( new ScVbaWSFunction( this, mxContext ) ) ); } uno::Any SAL_CALL @@ -490,7 +490,7 @@ ScVbaApplication::setCutCopyMode( const uno::Any& /* _cutcopymode */ ) uno::Any SAL_CALL ScVbaApplication::getStatusBar() { - return uno::makeAny( !getDisplayStatusBar() ); + return uno::Any( !getDisplayStatusBar() ); } css::uno::Any SAL_CALL ScVbaApplication::getWindowState() @@ -590,7 +590,7 @@ uno::Any SAL_CALL ScVbaApplication::Range( const uno::Any& Cell1, const uno::Any& Cell2 ) { uno::Reference< excel::XRange > xVbRange = ScVbaRange::ApplicationRange( mxContext, Cell1, Cell2 ); - return uno::makeAny( xVbRange ); + return uno::Any( xVbRange ); } uno::Any SAL_CALL @@ -681,10 +681,10 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) ScSplitPos eWhich = pShell->GetViewData().GetActivePart(); sal_Int32 nValueX = pShell->GetViewData().GetPosX(WhichH(eWhich)); sal_Int32 nValueY = pShell->GetViewData().GetPosY(WhichV(eWhich)); - xWindow->SmallScroll( uno::makeAny( static_cast<sal_Int16>(xVbaSheetRange->getRow() - 1) ), - uno::makeAny( static_cast<sal_Int16>(nValueY) ), - uno::makeAny( static_cast<sal_Int16>(xVbaSheetRange->getColumn() - 1) ), - uno::makeAny( static_cast<sal_Int16>(nValueX) ) ); + xWindow->SmallScroll( uno::Any( static_cast<sal_Int16>(xVbaSheetRange->getRow() - 1) ), + uno::Any( static_cast<sal_Int16>(nValueY) ), + uno::Any( static_cast<sal_Int16>(xVbaSheetRange->getColumn() - 1) ), + uno::Any( static_cast<sal_Int16>(nValueX) ) ); gridWindow->GrabFocus(); } else @@ -721,10 +721,10 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) ScSplitPos eWhich = pShell->GetViewData().GetActivePart(); sal_Int32 nValueX = pShell->GetViewData().GetPosX(WhichH(eWhich)); sal_Int32 nValueY = pShell->GetViewData().GetPosY(WhichV(eWhich)); - xWindow->SmallScroll( uno::makeAny( static_cast<sal_Int16>(xVbaRange->getRow() - 1) ), - uno::makeAny( static_cast<sal_Int16>(nValueY) ), - uno::makeAny( static_cast<sal_Int16>(xVbaRange->getColumn() - 1) ), - uno::makeAny( static_cast<sal_Int16>(nValueX) ) ); + xWindow->SmallScroll( uno::Any( static_cast<sal_Int16>(xVbaRange->getRow() - 1) ), + uno::Any( static_cast<sal_Int16>(nValueY) ), + uno::Any( static_cast<sal_Int16>(xVbaRange->getColumn() - 1) ), + uno::Any( static_cast<sal_Int16>(nValueX) ) ); gridWindow->GrabFocus(); } else @@ -882,8 +882,8 @@ ScVbaApplication::setDisplayScrollBars( sal_Bool bSet ) // use uno here as it does all he repainting etc. magic uno::Reference< sheet::XSpreadsheetView > xView( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xProps( xView, uno::UNO_QUERY ); - xProps->setPropertyValue("HasVerticalScrollBar", uno::makeAny( bSet ) ); - xProps->setPropertyValue("HasHorizontalScrollBar", uno::makeAny( bSet ) ); + xProps->setPropertyValue("HasVerticalScrollBar", uno::Any( bSet ) ); + xProps->setPropertyValue("HasHorizontalScrollBar", uno::Any( bSet ) ); } sal_Bool SAL_CALL diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx index 61d09208751e..c295158b7d0a 100644 --- a/sc/source/ui/vba/vbaaxes.cxx +++ b/sc/source/ui/vba/vbaaxes.cxx @@ -123,7 +123,7 @@ public: try { AxesCoordinate dIndexes = mCoordinates[ Index ]; - return uno::makeAny( ScVbaAxes::createAxis( mxChart, mxContext, dIndexes.second, dIndexes.first ) ); + return uno::Any( ScVbaAxes::createAxis( mxChart, mxContext, dIndexes.second, dIndexes.first ) ); } catch (const css::script::BasicErrorException&) { @@ -183,7 +183,7 @@ ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup) if ( _oAxisGroup.hasValue() ) _oAxisGroup >>= nAxisGroup ; - return uno::makeAny( createAxis( moChartParent, mxContext, nType, nAxisGroup ) ); + return uno::Any( createAxis( moChartParent, mxContext, nType, nAxisGroup ) ); } uno::Any diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx index f9e8d25c35df..c34649fa57a5 100644 --- a/sc/source/ui/vba/vbaaxis.cxx +++ b/sc/source/ui/vba/vbaaxis.cxx @@ -122,7 +122,7 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCrosses ) switch (_nCrosses) { case xlAxisCrossesAutomatic: //Microsoft Excel sets the axis crossing point. - mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny( true ) ); + mxPropertySet->setPropertyValue(AUTOORIGIN, uno::Any( true ) ); bCrossesAreCustomized = false; return; case xlAxisCrossesMinimum: // The axis crosses at the minimum value. @@ -139,7 +139,7 @@ ScVbaAxis::setCrosses( ::sal_Int32 _nCrosses ) bCrossesAreCustomized = true; break; } - mxPropertySet->setPropertyValue(AUTOORIGIN, uno::makeAny(false) ); + mxPropertySet->setPropertyValue(AUTOORIGIN, uno::Any(false) ); } catch (const uno::Exception&) { @@ -187,7 +187,7 @@ ScVbaAxis::setCrossesAt( double _fCrossesAt ) { setMaximumScaleIsAuto( false ); setMinimumScaleIsAuto( false ); - mxPropertySet->setPropertyValue(ORIGIN, uno::makeAny(_fCrossesAt)); + mxPropertySet->setPropertyValue(ORIGIN, uno::Any(_fCrossesAt)); } catch (const uno::Exception& e) { @@ -232,13 +232,13 @@ ScVbaAxis::setHasTitle( sal_Bool _bHasTitle ) switch(nType) { case xlCategory: - pChart->mxDiagramPropertySet->setPropertyValue("HasXAxisTitle", uno::makeAny(_bHasTitle)); + pChart->mxDiagramPropertySet->setPropertyValue("HasXAxisTitle", uno::Any(_bHasTitle)); break; case xlSeriesAxis: - pChart->mxDiagramPropertySet->setPropertyValue("HasZAxisTitle", uno::makeAny(_bHasTitle)); + pChart->mxDiagramPropertySet->setPropertyValue("HasZAxisTitle", uno::Any(_bHasTitle)); break; default: // xlValue: - pChart->mxDiagramPropertySet->setPropertyValue("HasYAxisTitle", uno::makeAny(_bHasTitle)); + pChart->mxDiagramPropertySet->setPropertyValue("HasYAxisTitle", uno::Any(_bHasTitle)); } } @@ -281,7 +281,7 @@ ScVbaAxis::setMinorUnit( double _fMinorUnit ) try { if (isValueAxis()) - mxPropertySet->setPropertyValue("StepHelp", uno::makeAny(_fMinorUnit)); + mxPropertySet->setPropertyValue("StepHelp", uno::Any(_fMinorUnit)); } catch (uno::Exception& ) { @@ -311,7 +311,7 @@ ScVbaAxis::setMinorUnitIsAuto( sal_Bool _bMinorUnitIsAuto ) try { if (isValueAxis()) - mxPropertySet->setPropertyValue("AutoStepHelp", uno::makeAny(_bMinorUnitIsAuto)); + mxPropertySet->setPropertyValue("AutoStepHelp", uno::Any(_bMinorUnitIsAuto)); } catch (uno::Exception& ) { @@ -357,7 +357,7 @@ ScVbaAxis::setMajorUnit( double _fMajorUnit ) { if (isValueAxis()) { - mxPropertySet->setPropertyValue("StepMain", uno::makeAny(_fMajorUnit)); + mxPropertySet->setPropertyValue("StepMain", uno::Any(_fMajorUnit)); } } catch (const uno::Exception&) @@ -389,7 +389,7 @@ ScVbaAxis::setMajorUnitIsAuto( sal_Bool _bMajorUnitIsAuto ) { if (isValueAxis()) { - mxPropertySet->setPropertyValue("AutoStepMain", uno::makeAny( _bMajorUnitIsAuto )); + mxPropertySet->setPropertyValue("AutoStepMain", uno::Any( _bMajorUnitIsAuto )); } } catch (const uno::Exception&) @@ -423,7 +423,7 @@ ScVbaAxis::setMaximumScale( double _fMaximumScale ) { if ( isValueAxis() ) { - mxPropertySet->setPropertyValue("Max", uno::makeAny(_fMaximumScale)); + mxPropertySet->setPropertyValue("Max", uno::Any(_fMaximumScale)); } } catch (const uno::Exception&) @@ -457,7 +457,7 @@ ScVbaAxis::setMaximumScaleIsAuto( sal_Bool _bMaximumScaleIsAuto ) try { if ( isValueAxis() ) - mxPropertySet->setPropertyValue("AutoMax", uno::makeAny( _bMaximumScaleIsAuto )); + mxPropertySet->setPropertyValue("AutoMax", uno::Any( _bMaximumScaleIsAuto )); } catch (const uno::Exception&) @@ -488,7 +488,7 @@ ScVbaAxis::setMinimumScale( double _fMinimumScale ) try { if (isValueAxis()) - mxPropertySet->setPropertyValue("Min", uno::makeAny( _fMinimumScale ) ); + mxPropertySet->setPropertyValue("Min", uno::Any( _fMinimumScale ) ); } catch ( uno::Exception& ) { @@ -519,7 +519,7 @@ ScVbaAxis::setMinimumScaleIsAuto( sal_Bool _bMinimumScaleIsAuto ) { if (isValueAxis()) { - mxPropertySet->setPropertyValue("AutoMin", uno::makeAny(_bMinimumScaleIsAuto)); + mxPropertySet->setPropertyValue("AutoMin", uno::Any(_bMinimumScaleIsAuto)); } } catch (const uno::Exception&) @@ -562,10 +562,10 @@ ScVbaAxis::setScaleType( ::sal_Int32 _nScaleType ) switch (_nScaleType) { case xlScaleLinear: - mxPropertySet->setPropertyValue("Logarithmic", uno::makeAny( false ) ); + mxPropertySet->setPropertyValue("Logarithmic", uno::Any( false ) ); break; case xlScaleLogarithmic: - mxPropertySet->setPropertyValue("Logarithmic", uno::makeAny( true ) ); + mxPropertySet->setPropertyValue("Logarithmic", uno::Any( true ) ); break; default: // According to MS the parameter is ignored and no Error is thrown diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx index 34f2f0fe3f42..22434f971b5f 100644 --- a/sc/source/ui/vba/vbaborders.cxx +++ b/sc/source/ui/vba/vbaborders.cxx @@ -98,7 +98,7 @@ private: default: return; } - m_xProps->setPropertyValue( sTableBorder, uno::makeAny(aTableBorder) ); + m_xProps->setPropertyValue( sTableBorder, uno::Any(aTableBorder) ); } bool getBorderLine( table::BorderLine& rBorderLine ) @@ -165,7 +165,7 @@ public: { table::BorderLine aBorderLine; if ( getBorderLine( aBorderLine ) ) - return uno::makeAny( OORGBToXLRGB( Color(ColorTransparency, aBorderLine.Color) ) ); + return uno::Any( OORGBToXLRGB( Color(ColorTransparency, aBorderLine.Color) ) ); throw uno::RuntimeException("No Implementation available" ); } void SAL_CALL setColor( const uno::Any& _color ) override @@ -198,7 +198,7 @@ public: break; } } - return uno::makeAny(nIndex); + return uno::Any(nIndex); } void SAL_CALL setColorIndex( const uno::Any& _colorindex ) override @@ -218,13 +218,13 @@ public: { case 0: // Thin = default OO thickness case OOLineThin: - return uno::makeAny( XlBorderWeight::xlThin ); + return uno::Any( XlBorderWeight::xlThin ); case OOLineMedium: - return uno::makeAny( XlBorderWeight::xlMedium ); + return uno::Any( XlBorderWeight::xlMedium ); case OOLineThick: - return uno::makeAny( XlBorderWeight::xlThick ); + return uno::Any( XlBorderWeight::xlThick ); case OOLineHairline: - return uno::makeAny( XlBorderWeight::xlHairline ); + return uno::Any( XlBorderWeight::xlHairline ); default: break; } @@ -267,13 +267,13 @@ public: uno::Any SAL_CALL getTintAndShade() override { // TODO implement - return uno::makeAny(static_cast<double>(0)); + return uno::Any(static_cast<double>(0)); } uno::Any SAL_CALL getLineStyle() override { // always return xlContinuous; - return uno::makeAny( XlLineStyle::xlContinuous ); + return uno::Any( XlLineStyle::xlContinuous ); } void SAL_CALL setLineStyle( const uno::Any& _linestyle ) override { @@ -339,7 +339,7 @@ public: if ( nIndex >= 0 && nIndex < getCount() ) { uno::Reference< beans::XPropertySet > xProps( m_xRange, uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< excel::XBorder >( new ScVbaBorder( xProps, m_xContext, supportedIndexTable[ nIndex ], m_Palette )) ); + return uno::Any( uno::Reference< excel::XBorder >( new ScVbaBorder( xProps, m_xContext, supportedIndexTable[ nIndex ], m_Palette )) ); } throw lang::IndexOutOfBoundsException(); } @@ -432,7 +432,7 @@ uno::Any SAL_CALL ScVbaBorders::getColor() if( color.hasValue() ) { if( color != xBorder->getColor() ) - return uno::makeAny( uno::Reference< uno::XInterface >() ); + return uno::Any( uno::Reference< uno::XInterface >() ); } else color = xBorder->getColor(); @@ -461,7 +461,7 @@ uno::Any SAL_CALL ScVbaBorders::getColorIndex() if( nColorIndex.hasValue() ) { if( nColorIndex != xBorder->getColorIndex() ) - return uno::makeAny( uno::Reference< uno::XInterface >() ); + return uno::Any( uno::Reference< uno::XInterface >() ); } else nColorIndex = xBorder->getColorIndex(); @@ -519,7 +519,7 @@ uno::Any SAL_CALL ScVbaBorders::getLineStyle() aLinestyle = XlLineStyle::xlContinuous; } } - return uno::makeAny( aLinestyle ); + return uno::Any( aLinestyle ); } void SAL_CALL ScVbaBorders::setLineStyle( const uno::Any& _linestyle ) { @@ -542,7 +542,7 @@ uno::Any SAL_CALL ScVbaBorders::getWeight() if( weight.hasValue() ) { if( weight != xBorder->getWeight() ) - return uno::makeAny( uno::Reference< uno::XInterface >() ); + return uno::Any( uno::Reference< uno::XInterface >() ); } else weight = xBorder->getWeight(); @@ -554,7 +554,7 @@ uno::Any SAL_CALL ScVbaBorders::getWeight() uno::Any SAL_CALL ScVbaBorders::getTintAndShade() { // TODO implement - return uno::makeAny(static_cast<double>(0)); + return uno::Any(static_cast<double>(0)); } void SAL_CALL ScVbaBorders::setTintAndShade(const uno::Any& /*rAny*/) diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx index adc1b7f4467e..5d9cd56a88c5 100644 --- a/sc/source/ui/vba/vbachart.cxx +++ b/sc/source/ui/vba/vbachart.cxx @@ -291,8 +291,8 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlStockVHLC: case xlStockVOHLC: setDiagram( "com.sun.star.chart.StockDiagram"); - mxDiagramPropertySet->setPropertyValue( UPDOWN, uno::makeAny((_nChartType == xlStockOHLC) || (_nChartType == xlStockVOHLC))); - mxDiagramPropertySet->setPropertyValue( VOLUME, uno::makeAny((_nChartType == xlStockVHLC) || (_nChartType == xlStockVOHLC))); + mxDiagramPropertySet->setPropertyValue( UPDOWN, uno::Any((_nChartType == xlStockOHLC) || (_nChartType == xlStockVOHLC))); + mxDiagramPropertySet->setPropertyValue( VOLUME, uno::Any((_nChartType == xlStockVHLC) || (_nChartType == xlStockVOHLC))); break; case xlPieOfPie: // not possible @@ -322,15 +322,15 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlXYScatter: case xlBubble: // not possible case xlBubble3DEffect: // not possible - mxDiagramPropertySet->setPropertyValue(LINES, uno::makeAny( false )); + mxDiagramPropertySet->setPropertyValue(LINES, uno::Any( false )); break; case xlXYScatterLines: case xlXYScatterLinesNoMarkers: - mxDiagramPropertySet->setPropertyValue(LINES, uno::makeAny( true )); + mxDiagramPropertySet->setPropertyValue(LINES, uno::Any( true )); break; case xlXYScatterSmooth: case xlXYScatterSmoothNoMarkers: - mxDiagramPropertySet->setPropertyValue(SPLINETYPE, uno::makeAny( sal_Int32(1))); + mxDiagramPropertySet->setPropertyValue(SPLINETYPE, uno::Any( sal_Int32(1))); break; default: break; @@ -351,12 +351,12 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlXYScatter: case xlBubble: // not possible case xlBubble3DEffect: // not possible - mxDiagramPropertySet->setPropertyValue(SYMBOLTYPE, uno::makeAny( chart::ChartSymbolType::AUTO)); + mxDiagramPropertySet->setPropertyValue(SYMBOLTYPE, uno::Any( chart::ChartSymbolType::AUTO)); break; default: if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(SYMBOLTYPE)) { - mxDiagramPropertySet->setPropertyValue(SYMBOLTYPE, uno::makeAny(chart::ChartSymbolType::NONE)); + mxDiagramPropertySet->setPropertyValue(SYMBOLTYPE, uno::Any(chart::ChartSymbolType::NONE)); } break; } @@ -371,12 +371,12 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlSurfaceWireframe: case xlSurfaceTopView: case xlSurfaceTopViewWireframe: - mxDiagramPropertySet->setPropertyValue(DEEP,uno::makeAny( true )); + mxDiagramPropertySet->setPropertyValue(DEEP,uno::Any( true )); break; default: if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(DEEP)) { - mxDiagramPropertySet->setPropertyValue(DEEP, uno::makeAny( false)); + mxDiagramPropertySet->setPropertyValue(DEEP, uno::Any( false)); } break; } @@ -390,7 +390,7 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlConeBarStacked: case xlConeBarStacked100: case xlConeCol: - mxDiagramPropertySet->setPropertyValue(SOLIDTYPE, uno::makeAny(chart::ChartSolidType::CONE)); + mxDiagramPropertySet->setPropertyValue(SOLIDTYPE, uno::Any(chart::ChartSolidType::CONE)); break; case xlPyramidColClustered: case xlPyramidColStacked: @@ -399,7 +399,7 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlPyramidBarStacked: case xlPyramidBarStacked100: case xlPyramidCol: - mxDiagramPropertySet->setPropertyValue(SOLIDTYPE, uno::makeAny(chart::ChartSolidType::PYRAMID)); + mxDiagramPropertySet->setPropertyValue(SOLIDTYPE, uno::Any(chart::ChartSolidType::PYRAMID)); break; case xlCylinderColClustered: case xlCylinderColStacked: @@ -408,12 +408,12 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlCylinderBarStacked: case xlCylinderBarStacked100: case xlCylinderCol: - mxDiagramPropertySet->setPropertyValue(SOLIDTYPE, uno::makeAny(chart::ChartSolidType::CYLINDER)); + mxDiagramPropertySet->setPropertyValue(SOLIDTYPE, uno::Any(chart::ChartSolidType::CYLINDER)); break; default: if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(SOLIDTYPE)) { - mxDiagramPropertySet->setPropertyValue(SOLIDTYPE, uno::makeAny(chart::ChartSolidType::RECTANGULAR_SOLID)); + mxDiagramPropertySet->setPropertyValue(SOLIDTYPE, uno::Any(chart::ChartSolidType::RECTANGULAR_SOLID)); } break; } @@ -440,12 +440,12 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlSurfaceWireframe: case xlSurfaceTopView: case xlSurfaceTopViewWireframe: - mxDiagramPropertySet->setPropertyValue(VERTICAL, uno::makeAny( true)); + mxDiagramPropertySet->setPropertyValue(VERTICAL, uno::Any( true)); break; default: if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(VERTICAL)) { - mxDiagramPropertySet->setPropertyValue(VERTICAL, uno::makeAny(false)); + mxDiagramPropertySet->setPropertyValue(VERTICAL, uno::Any(false)); } break; } @@ -466,8 +466,8 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlConeBarStacked: case xlPyramidColStacked: case xlPyramidBarStacked: - mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( false )); - mxDiagramPropertySet->setPropertyValue(STACKED, uno::makeAny( true )); + mxDiagramPropertySet->setPropertyValue(PERCENT, uno::Any( false )); + mxDiagramPropertySet->setPropertyValue(STACKED, uno::Any( true )); break; case xlPyramidColStacked100: case xlPyramidBarStacked100: @@ -483,12 +483,12 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlBarStacked100: case xl3DColumnStacked100: case xlColumnStacked100: - mxDiagramPropertySet->setPropertyValue(STACKED, uno::makeAny( true)); - mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( true )); + mxDiagramPropertySet->setPropertyValue(STACKED, uno::Any( true)); + mxDiagramPropertySet->setPropertyValue(PERCENT, uno::Any( true )); break; default: - mxDiagramPropertySet->setPropertyValue(PERCENT, uno::makeAny( false)); - mxDiagramPropertySet->setPropertyValue(STACKED, uno::makeAny( false)); + mxDiagramPropertySet->setPropertyValue(PERCENT, uno::Any( false)); + mxDiagramPropertySet->setPropertyValue(STACKED, uno::Any( false)); break; } switch (_nChartType) @@ -527,12 +527,12 @@ ScVbaChart::setChartType( ::sal_Int32 _nChartType ) case xlCylinderBarStacked: case xlCylinderBarStacked100: case xlCylinderCol: - mxDiagramPropertySet->setPropertyValue(DIM3D, uno::makeAny( true)); + mxDiagramPropertySet->setPropertyValue(DIM3D, uno::Any( true)); break; default: if (mxDiagramPropertySet->getPropertySetInfo()->hasPropertyByName(DIM3D)) { - mxDiagramPropertySet->setPropertyValue(DIM3D, uno::makeAny( false)); + mxDiagramPropertySet->setPropertyValue(DIM3D, uno::Any( false)); } break; } @@ -645,10 +645,10 @@ ScVbaChart::setPlotBy( ::sal_Int32 _nPlotBy ) switch (_nPlotBy) { case xlRows: - mxDiagramPropertySet->setPropertyValue( DATAROWSOURCE, uno::makeAny( chart::ChartDataRowSource_ROWS ) ); + mxDiagramPropertySet->setPropertyValue( DATAROWSOURCE, uno::Any( chart::ChartDataRowSource_ROWS ) ); break; case xlColumns: - mxDiagramPropertySet->setPropertyValue( DATAROWSOURCE, uno::makeAny( chart::ChartDataRowSource_COLUMNS) ); + mxDiagramPropertySet->setPropertyValue( DATAROWSOURCE, uno::Any( chart::ChartDataRowSource_COLUMNS) ); break; default: throw script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), OUString() ); @@ -820,7 +820,7 @@ ScVbaChart::setHasTitle( sal_Bool bTitle ) { try { - mxChartPropertySet->setPropertyValue(HASMAINTITLE, uno::makeAny( bTitle )); + mxChartPropertySet->setPropertyValue(HASMAINTITLE, uno::Any( bTitle )); } catch (const uno::Exception&) { @@ -849,7 +849,7 @@ ScVbaChart::setHasLegend( sal_Bool bLegend ) { try { - mxChartPropertySet->setPropertyValue(HASLEGEND, uno::makeAny(bLegend)); + mxChartPropertySet->setPropertyValue(HASLEGEND, uno::Any(bLegend)); } catch (const uno::Exception&) { @@ -871,7 +871,7 @@ ScVbaChart::Axes( const uno::Any& Type, const uno::Any& AxisGroup ) // mmm chart probably is the parent, #TODO check parent uno::Reference< excel::XAxes > xAxes = new ScVbaAxes( this, mxContext, this ); if ( !Type.hasValue() ) - return uno::makeAny( xAxes ); + return uno::Any( xAxes ); return xAxes->Item( Type, AxisGroup ); } bool diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx index 2afcea0ffe2f..5246a9040eb6 100644 --- a/sc/source/ui/vba/vbachartobject.cxx +++ b/sc/source/ui/vba/vbachartobject.cxx @@ -114,7 +114,7 @@ ScVbaChartObject::Activate() // the XModel owner //uno::Reference< view::XSelectionSupplier > xSelectionSupplier( getXModel().getCurrentController()); uno::Reference< view::XSelectionSupplier > xSelectionSupplier( getCurrentExcelDoc(mxContext)->getCurrentController(), uno::UNO_QUERY_THROW ); - xSelectionSupplier->select(uno::makeAny(xShape)); + xSelectionSupplier->select(uno::Any(xShape)); } catch (uno::Exception& ) { diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index 74c6ce0e1678..674c925110bb 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -146,7 +146,7 @@ ScVbaChartObjects::Add( double _nX, double _nY, double _nWidth, double _nHeight xTableCharts->addNewByName(sPersistChartName, aRectangle, aCellRangeAddress, true, false ); uno::Reference< excel::XChartObject > xChartObject( getItemByStringIndex( sPersistChartName ), uno::UNO_QUERY_THROW ); xChartObject->getChart()->setChartType(excel::XlChartType::xlColumnClustered); - return uno::makeAny( xChartObject ); + return uno::Any( xChartObject ); } catch (const uno::Exception&) { @@ -184,7 +184,7 @@ ScVbaChartObjects::createCollectionObject( const css::uno::Any& aSource ) { uno::Reference< table::XTableChart > xTableChart( aSource, uno::UNO_QUERY_THROW ); // correct parent object is sheet - return uno::makeAny( uno::Reference< excel::XChartObject > ( new ScVbaChartObject( getParent(), mxContext, xTableChart, xDrawPageSupplier ) ) ); + return uno::Any( uno::Reference< excel::XChartObject > ( new ScVbaChartObject( getParent(), mxContext, xTableChart, xDrawPageSupplier ) ) ); } OUString diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx index 1552fadb240e..a9b1cf7c47f2 100644 --- a/sc/source/ui/vba/vbacomment.cxx +++ b/sc/source/ui/vba/vbacomment.cxx @@ -106,7 +106,7 @@ ScVbaComment::getCommentByIndex( sal_Int32 Index ) // parent is sheet ( parent of the range which is the parent of the comment ) uno::Reference< XCollection > xColl( new ScVbaComments( getParent()->getParent(), mxContext, mxModel, xIndexAccess ) ); - return uno::Reference< excel::XComment > ( xColl->Item( uno::makeAny( Index ), uno::Any() ), uno::UNO_QUERY_THROW ); + return uno::Reference< excel::XComment > ( xColl->Item( uno::Any( Index ), uno::Any() ), uno::UNO_QUERY_THROW ); } // public vba functions diff --git a/sc/source/ui/vba/vbacomments.cxx b/sc/source/ui/vba/vbacomments.cxx index b8d933fc8378..470e468b7189 100644 --- a/sc/source/ui/vba/vbacomments.cxx +++ b/sc/source/ui/vba/vbacomments.cxx @@ -34,7 +34,7 @@ static uno::Any AnnotationToComment( const uno::Any& aSource, const uno::Referen uno::Reference< table::XCellRange > xCellRange( xChild->getParent(), uno::UNO_QUERY_THROW ); // #FIXME needs to find the correct Parent - return uno::makeAny( uno::Reference< excel::XComment > ( + return uno::Any( uno::Reference< excel::XComment > ( new ScVbaComment( uno::Reference< XHelperInterface >(), xContext, xModel, xCellRange ) ) ); } diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx index 49b00408426d..f7f31db2a579 100644 --- a/sc/source/ui/vba/vbafiledialog.cxx +++ b/sc/source/ui/vba/vbafiledialog.cxx @@ -40,7 +40,7 @@ ScVbaFileDialog::ScVbaFileDialog( const uno::Reference< XHelperInterface >& xPar {} uno::Any -ScVbaFileDialog::getInitialFileName() { return uno::makeAny( m_sInitialFileName ); } +ScVbaFileDialog::getInitialFileName() { return uno::Any( m_sInitialFileName ); } void ScVbaFileDialog::setInitialFileName( const css::uno::Any& rName ) { @@ -58,7 +58,7 @@ void ScVbaFileDialog::setInitialFileName( const css::uno::Any& rName ) } } -css::uno::Any ScVbaFileDialog::getTitle() { return uno::makeAny( m_sTitle ); } +css::uno::Any ScVbaFileDialog::getTitle() { return uno::Any( m_sTitle ); } void ScVbaFileDialog::setTitle( const css::uno::Any& rTitle ) { @@ -67,7 +67,7 @@ void ScVbaFileDialog::setTitle( const css::uno::Any& rTitle ) uno::Any ScVbaFileDialog::getAllowMultiSelect() { - return uno::makeAny(m_bMultiSelectMode); + return uno::Any(m_bMultiSelectMode); } void ScVbaFileDialog::setAllowMultiSelect(const uno::Any& rAllowMultiSelect) diff --git a/sc/source/ui/vba/vbafiledialogitems.cxx b/sc/source/ui/vba/vbafiledialogitems.cxx index 20ca30e3bf89..f64f706d3a7c 100644 --- a/sc/source/ui/vba/vbafiledialogitems.cxx +++ b/sc/source/ui/vba/vbafiledialogitems.cxx @@ -38,7 +38,7 @@ public: if( !hasMoreElements() ) throw container::NoSuchElementException(); OUString sPath = *mIt++; - return uno::makeAny( sPath ); + return uno::Any( sPath ); } }; @@ -75,7 +75,7 @@ ScVbaFileDialogSelectedItems::createCollectionObject( const uno::Any& aSource ) throw uno::RuntimeException("out of range"); OUString sPath = m_sItems[nPosition]; - return uno::makeAny( sPath ); + return uno::Any( sPath ); } // Methods @@ -92,7 +92,7 @@ ScVbaFileDialogSelectedItems::Item( const uno::Any& aIndex, const uno::Any& /*aI throw uno::RuntimeException(); } - return createCollectionObject( uno::makeAny( nPosition ) ); + return createCollectionObject( uno::Any( nPosition ) ); } sal_Int32 ScVbaFileDialogSelectedItems::getCount() diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index ef67d6925507..094a3bd4ce64 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -74,7 +74,7 @@ ScVbaFont::setColorIndex( const uno::Any& _colorindex ) if ( !nIndex || ( nIndex == excel::XlColorIndex::xlColorIndexAutomatic ) ) { nIndex = 1; // check default ( assume black ) - ScVbaFont_BASE::setColorIndex( uno::makeAny( nIndex ) ); + ScVbaFont_BASE::setColorIndex( uno::Any( nIndex ) ); } else ScVbaFont_BASE::setColorIndex( _colorindex ); @@ -149,8 +149,8 @@ ScVbaFont::setFontStyle( const uno::Any& aValue ) } } - setBold( uno::makeAny( bBold ) ); - setItalic( uno::makeAny( bItalic ) ); + setBold( uno::Any( bBold ) ); + setItalic( uno::Any( bItalic ) ); } uno::Any SAL_CALL @@ -169,7 +169,7 @@ ScVbaFont::getFontStyle() aStyles.append(" "); aStyles.append("Italic"); } - return uno::makeAny( aStyles.makeStringAndClear() ); + return uno::Any( aStyles.makeStringAndClear() ); } uno::Any SAL_CALL @@ -228,7 +228,7 @@ ScVbaFont::getUnderline() sal_Int32 nValue = awt::FontUnderline::NONE; if(mbFormControl) - return uno::makeAny( nValue ); + return uno::Any( nValue ); mxFont->getPropertyValue("CharUnderline") >>= nValue; switch ( nValue ) @@ -246,7 +246,7 @@ ScVbaFont::getUnderline() throw uno::RuntimeException("Unknown value retrieved for Underline" ); } - return uno::makeAny( nValue ); + return uno::Any( nValue ); } uno::Any SAL_CALL diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index f3fd768f16e3..a027279ae594 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -255,7 +255,7 @@ ScVbaFormat< Ifc... >::setOrientation( const uno::Any& _aOrientation ) break; case excel::XlOrientation::xlHorizontal: aVal <<= table::CellOrientation_STANDARD; - mxPropertySet->setPropertyValue( SC_UNONAME_ROTANG, uno::makeAny( sal_Int32(0) ) ); + mxPropertySet->setPropertyValue( SC_UNONAME_ROTANG, uno::Any( sal_Int32(0) ) ); break; case excel::XlOrientation::xlUpward: aVal <<= table::CellOrientation_BOTTOMTOP; @@ -359,7 +359,7 @@ ScVbaFormat< Ifc... >::Borders( const uno::Any& Index ) { return xColl->Item( Index, uno::Any() ); } - return uno::makeAny( xColl ); + return uno::Any( xColl ); } template< typename... Ifc > @@ -381,7 +381,7 @@ template< typename... Ifc > uno::Any SAL_CALL ScVbaFormat< Ifc... >::getNumberFormatLocal( ) { - uno::Any aRet = uno::makeAny( OUString() ); + uno::Any aRet{ OUString() }; try { OUString sPropName( SC_UNO_DP_NUMBERFO ); @@ -429,7 +429,7 @@ ScVbaFormat< Ifc... >::setNumberFormatLocal( const uno::Any& _oLocalFormatString if (nNewFormat == -1) nNewFormat = xNumberFormats->addNew(sLocalFormatString, aRangeLocale); - mxPropertySet->setPropertyValue(sNumFormat, uno::makeAny( nNewFormat )); + mxPropertySet->setPropertyValue(sNumFormat, uno::Any( nNewFormat )); } catch (const uno::Exception& ) { @@ -459,7 +459,7 @@ ScVbaFormat< Ifc... >::setNumberFormat( const uno::Any& _oFormatString ) lang::Locale aRangeLocale; xNumberFormats->getByKey(nFormat)->getPropertyValue( LOCALE ) >>= aRangeLocale; sal_Int32 nNewFormat = xNumberFormatTypes->getFormatForLocale(nFormat, aRangeLocale); - mxPropertySet->setPropertyValue( SC_UNO_DP_NUMBERFO, uno::makeAny( nNewFormat)); + mxPropertySet->setPropertyValue( SC_UNO_DP_NUMBERFO, uno::Any( nNewFormat)); } catch (const uno::Exception& ) { @@ -483,8 +483,8 @@ ScVbaFormat< Ifc... >::setIndentLevel( const uno::Any& _aLevel ) if ( !( mxPropertySet->getPropertyValue(sHoriJust) >>= aAPIAlignment ) ) throw uno::RuntimeException(); if (aAPIAlignment == table::CellHoriJustify_STANDARD) - mxPropertySet->setPropertyValue( sHoriJust, uno::makeAny( table::CellHoriJustify_LEFT) ) ; - mxPropertySet->setPropertyValue( SC_UNONAME_PINDENT, uno::makeAny( sal_Int16(nLevel * 352.8) ) ); + mxPropertySet->setPropertyValue( sHoriJust, uno::Any( table::CellHoriJustify_LEFT) ) ; + mxPropertySet->setPropertyValue( SC_UNONAME_PINDENT, uno::Any( sal_Int16(nLevel * 352.8) ) ); } catch (const uno::Exception&) { @@ -529,7 +529,7 @@ ScVbaFormat< Ifc... >::setLocked( const uno::Any& _aLocked ) OUString sCellProt( SC_UNONAME_CELLPRO ); mxPropertySet->getPropertyValue(sCellProt) >>= aCellProtection; aCellProtection.IsLocked = bIsLocked; - mxPropertySet->setPropertyValue(sCellProt, uno::makeAny( aCellProtection ) ); + mxPropertySet->setPropertyValue(sCellProt, uno::Any( aCellProtection ) ); } catch (const uno::Exception&) { @@ -549,7 +549,7 @@ ScVbaFormat< Ifc... >::setFormulaHidden( const uno::Any& FormulaHidden ) OUString sCellProt( SC_UNONAME_CELLPRO ); mxPropertySet->getPropertyValue(sCellProt) >>= aCellProtection; aCellProtection.IsFormulaHidden = bIsFormulaHidden; - mxPropertySet->setPropertyValue(sCellProt,uno::makeAny(aCellProtection)); + mxPropertySet->setPropertyValue(sCellProt,uno::Any(aCellProtection)); } catch (const uno::Exception&) { diff --git a/sc/source/ui/vba/vbaformat.hxx b/sc/source/ui/vba/vbaformat.hxx index 5232448a0094..f3c6750ce211 100644 --- a/sc/source/ui/vba/vbaformat.hxx +++ b/sc/source/ui/vba/vbaformat.hxx @@ -66,7 +66,7 @@ public: /// @throws css::uno::RuntimeException void SAL_CALL setAddIndent( const css::uno::Any& BAddIndent) { BAddIndent >>= mbAddIndent; } /// @throws css::uno::RuntimeException - css::uno::Any SAL_CALL getAddIndent() { return css::uno::makeAny( mbAddIndent ); } + css::uno::Any SAL_CALL getAddIndent() { return css::uno::Any( mbAddIndent ); } // Interface Methods /// @throws css::script::BasicErrorException /// @throws css::uno::RuntimeException diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx index 56f387608218..d9804399cce1 100644 --- a/sc/source/ui/vba/vbaformatcondition.cxx +++ b/sc/source/ui/vba/vbaformatcondition.cxx @@ -130,7 +130,7 @@ ScVbaFormatCondition::notifyRange() { try { - mxParentRangePropertySet->setPropertyValue(SC_UNONAME_CONDFMT, uno::makeAny( mxSheetConditionalEntries)); + mxParentRangePropertySet->setPropertyValue(SC_UNONAME_CONDFMT, uno::Any( mxSheetConditionalEntries)); } catch (uno::Exception& ) { diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index e5d98656ad7a..bbf167b3c3a2 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -65,9 +65,9 @@ static uno::Any xSheetConditionToFormatCondition( const uno::Reference< XHelperI uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry; aObject >>= xSheetConditionalEntry; - uno::Reference< excel::XStyle > xStyle( xStyles->Item( uno::makeAny( xSheetConditionalEntry->getStyleName() ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XStyle > xStyle( xStyles->Item( uno::Any( xSheetConditionalEntry->getStyleName() ), uno::Any() ), uno::UNO_QUERY_THROW ); uno::Reference< excel::XFormatCondition > xCondition = new ScVbaFormatCondition( xRangeParent, xContext, xSheetConditionalEntry, xStyle, xFormatConditions, xRangeProps ); - return uno::makeAny( xCondition ); + return uno::Any( xCondition ); } uno::Any @@ -172,12 +172,12 @@ ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, cons if ( _aFormula1.hasValue() ) { - beans::PropertyValue aProp( "Formula1", 0, uno::makeAny( getA1Formula( _aFormula1 ) ), beans::PropertyState_DIRECT_VALUE ); + beans::PropertyValue aProp( "Formula1", 0, uno::Any( getA1Formula( _aFormula1 ) ), beans::PropertyState_DIRECT_VALUE ); aPropertyValueVector.push_back( aProp ); } if ( _aFormula2.hasValue() ) { - beans::PropertyValue aProp( "Formula2", 0, uno::makeAny( getA1Formula( _aFormula2 ) ), beans::PropertyState_DIRECT_VALUE ); + beans::PropertyValue aProp( "Formula2", 0, uno::Any( getA1Formula( _aFormula2 ) ), beans::PropertyState_DIRECT_VALUE ); aPropertyValueVector.push_back( aProp ); } aProperty.Name = "StyleName"; @@ -213,7 +213,7 @@ ScVbaFormatConditions::notifyRange() { try { - mxParentRangePropertySet->setPropertyValue(SC_UNONAME_CONDFMT, uno::makeAny( mxSheetConditionalEntries )); + mxParentRangePropertySet->setPropertyValue(SC_UNONAME_CONDFMT, uno::Any( mxSheetConditionalEntries )); } catch (uno::Exception& ) { diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx index 9c99fc39e762..2849ed672cc6 100644 --- a/sc/source/ui/vba/vbainterior.cxx +++ b/sc/source/ui/vba/vbainterior.cxx @@ -73,7 +73,7 @@ ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent, uno::Any ScVbaInterior::getColor() { - return uno::makeAny( OORGBToXLRGB( GetBackColor() ) ); + return uno::Any( OORGBToXLRGB( GetBackColor() ) ); } void @@ -114,7 +114,7 @@ ScVbaInterior::SetMixedColor() else aMixedColor = GetPatternColor( aBackColor, aBackColor, static_cast<sal_uInt32>(nPattern) ); Color nMixedColor = aMixedColor.GetRGBColor(); - m_xProps->setPropertyValue( BACKCOLOR , uno::makeAny( nMixedColor ) ); + m_xProps->setPropertyValue( BACKCOLOR , uno::Any( nMixedColor ) ); } uno::Reference< container::XIndexAccess > @@ -136,7 +136,7 @@ ScVbaInterior::setColorIndex( const css::uno::Any& _colorindex ) // hackly for excel::XlColorIndex::xlColorIndexNone if( nIndex == excel::XlColorIndex::xlColorIndexNone ) { - m_xProps->setPropertyValue( BACKCOLOR, uno::makeAny( sal_Int32( -1 ) ) ); + m_xProps->setPropertyValue( BACKCOLOR, uno::Any( sal_Int32( -1 ) ) ); } else { @@ -187,7 +187,7 @@ ScVbaInterior::getColorIndex() if( ( aColor >>= nColor ) && ( nColor == -1 ) ) { nColor = excel::XlColorIndex::xlColorIndexNone; - return uno::makeAny( nColor ); + return uno::Any( nColor ); } // getColor returns Xl ColorValue, need to convert it to OO val @@ -196,7 +196,7 @@ ScVbaInterior::getColorIndex() // and then back again to OO RGB value XLRGBToOORGB( getColor() ) >>= nColor; - return uno::makeAny( GetColorIndex( nColor ) ); + return uno::Any( GetColorIndex( nColor ) ); } Color ScVbaInterior::GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern ) @@ -248,7 +248,7 @@ ScVbaInterior::SetAttributeData( sal_Int32 nValue ) xml::AttributeData aAttributeData; aAttributeData.Type = "sal_Int32"; aAttributeData.Value = OUString::number( nValue ); - return uno::makeAny( aAttributeData ); + return uno::Any( aAttributeData ); } uno::Any ScVbaInterior::GetUserDefinedAttributes( const OUString& sName ) @@ -269,7 +269,7 @@ ScVbaInterior::SetUserDefinedAttributes( const OUString& sName, const uno::Any& if( xNameContainer->hasByName( sName ) ) xNameContainer->removeByName( sName ); xNameContainer->insertByName( sName, aValue ); - m_xProps->setPropertyValue("UserDefinedAttributes", uno::makeAny( xNameContainer ) ); + m_xProps->setPropertyValue("UserDefinedAttributes", uno::Any( xNameContainer ) ); } } // OOo do not support below API @@ -279,8 +279,8 @@ ScVbaInterior::getPattern() // XlPattern uno::Any aPattern = GetUserDefinedAttributes( PATTERN ); if( aPattern.hasValue() ) - return uno::makeAny( GetAttributeData( aPattern ) ); - return uno::makeAny( excel::XlPattern::xlPatternNone ); + return uno::Any( GetAttributeData( aPattern ) ); + return uno::Any( excel::XlPattern::xlPatternNone ); } void SAL_CALL ScVbaInterior::setPattern( const uno::Any& _pattern ) @@ -323,9 +323,9 @@ ScVbaInterior::getPatternColor() if( aPatternColor.hasValue() ) { sal_uInt32 nPatternColor = GetAttributeData( aPatternColor ); - return uno::makeAny( OORGBToXLRGB( Color(ColorTransparency, nPatternColor) ) ); + return uno::Any( OORGBToXLRGB( Color(ColorTransparency, nPatternColor) ) ); } - return uno::makeAny( sal_Int32( 0 ) ); + return uno::Any( sal_Int32( 0 ) ); } void SAL_CALL ScVbaInterior::setPatternColor( const uno::Any& _patterncolor ) @@ -344,7 +344,7 @@ ScVbaInterior::getPatternColorIndex() sal_Int32 nColor = 0; XLRGBToOORGB( getPatternColor() ) >>= nColor; - return uno::makeAny( GetColorIndex( nColor ) ); + return uno::Any( GetColorIndex( nColor ) ); } void SAL_CALL ScVbaInterior::setPatternColorIndex( const uno::Any& _patterncolorindex ) @@ -357,14 +357,14 @@ ScVbaInterior::setPatternColorIndex( const uno::Any& _patterncolorindex ) return; Color nPattColor; GetIndexColor( nColorIndex ) >>= nPattColor; - setPatternColor( uno::makeAny( OORGBToXLRGB( nPattColor ) ) ); + setPatternColor( uno::Any( OORGBToXLRGB( nPattColor ) ) ); } uno::Any SAL_CALL ScVbaInterior::getThemeColor() { // Just a stub for now. - return uno::makeAny(static_cast<sal_Int32>(0)); + return uno::Any(static_cast<sal_Int32>(0)); } void SAL_CALL ScVbaInterior::setThemeColor(const uno::Any& /*rAny*/) @@ -375,7 +375,7 @@ void SAL_CALL ScVbaInterior::setThemeColor(const uno::Any& /*rAny*/) uno::Any SAL_CALL ScVbaInterior::getTintAndShade() { // Just a stub for now. - return uno::makeAny(static_cast<double>(0)); + return uno::Any(static_cast<double>(0)); } void SAL_CALL ScVbaInterior::setTintAndShade(const uno::Any& /*rAny*/) @@ -386,7 +386,7 @@ void SAL_CALL ScVbaInterior::setTintAndShade(const uno::Any& /*rAny*/) uno::Any SAL_CALL ScVbaInterior::getPatternTintAndShade() { // Just a stub for now. - return uno::makeAny(static_cast<double>(0)); + return uno::Any(static_cast<double>(0)); } void SAL_CALL ScVbaInterior::setPatternTintAndShade(const uno::Any& /*rAny*/) diff --git a/sc/source/ui/vba/vbamenu.cxx b/sc/source/ui/vba/vbamenu.cxx index 8bfa966b89a6..38b4feb116b7 100644 --- a/sc/source/ui/vba/vbamenu.cxx +++ b/sc/source/ui/vba/vbamenu.cxx @@ -45,7 +45,7 @@ ScVbaMenu::MenuItems( const uno::Any& aIndex ) { return xMenuItems->Item( aIndex, uno::Any() ); } - return uno::makeAny( xMenuItems ); + return uno::Any( xMenuItems ); } OUString diff --git a/sc/source/ui/vba/vbamenubar.cxx b/sc/source/ui/vba/vbamenubar.cxx index f8f7f5665233..bd25c02a7147 100644 --- a/sc/source/ui/vba/vbamenubar.cxx +++ b/sc/source/ui/vba/vbamenubar.cxx @@ -26,7 +26,7 @@ ScVbaMenuBar::Menus( const uno::Any& aIndex ) { return xMenus->Item( aIndex, uno::Any() ); } - return uno::makeAny( xMenus ); + return uno::Any( xMenus ); } OUString diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx index 5e84e72139c0..6bcea2baa146 100644 --- a/sc/source/ui/vba/vbamenubars.cxx +++ b/sc/source/ui/vba/vbamenubars.cxx @@ -39,7 +39,7 @@ public: uno::Reference< XCommandBar > xCommandBar( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); uno::Reference< excel::XMenuBar > xMenuBar( new ScVbaMenuBar( m_xParent, m_xContext, xCommandBar ) ); - return uno::makeAny( xMenuBar ); + return uno::Any( xMenuBar ); } }; @@ -92,7 +92,7 @@ ScVbaMenuBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) aSource <<= OUString( "Worksheet Menu Bar" ); uno::Reference< XCommandBar > xCommandBar( m_xCommandBars->Item( aSource, uno::Any() ), uno::UNO_QUERY_THROW ); uno::Reference< excel::XMenuBar > xMenuBar( new ScVbaMenuBar( this, mxContext, xCommandBar ) ); - return uno::makeAny( xMenuBar ); + return uno::Any( xMenuBar ); } throw uno::RuntimeException("Not implemented" ); diff --git a/sc/source/ui/vba/vbamenuitems.cxx b/sc/source/ui/vba/vbamenuitems.cxx index fb7271ef3f21..646fd82cb7d4 100644 --- a/sc/source/ui/vba/vbamenuitems.cxx +++ b/sc/source/ui/vba/vbamenuitems.cxx @@ -44,12 +44,12 @@ public: if( xCommandBarControl->getType() == office::MsoControlType::msoControlPopup ) { uno::Reference< excel::XMenu > xMenu( new ScVbaMenu( m_xParent, m_xContext, xCommandBarControl ) ); - return uno::makeAny( xMenu ); + return uno::Any( xMenu ); } else if( xCommandBarControl->getType() == office::MsoControlType::msoControlButton ) { uno::Reference< excel::XMenuItem > xMenuItem( new ScVbaMenuItem( m_xParent, m_xContext, xCommandBarControl ) ); - return uno::makeAny( xMenuItem ); + return uno::Any( xMenuItem ); } nextElement(); @@ -97,16 +97,16 @@ ScVbaMenuItems::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) { uno::Reference< XCommandBarControl > xCommandBarControl( m_xCommandBarControls->Item( aIndex, uno::Any() ), uno::UNO_QUERY_THROW ); if( xCommandBarControl->getType() == office::MsoControlType::msoControlPopup ) - return uno::makeAny( uno::Reference< excel::XMenu > ( new ScVbaMenu( this, mxContext, xCommandBarControl ) ) ); + return uno::Any( uno::Reference< excel::XMenu > ( new ScVbaMenu( this, mxContext, xCommandBarControl ) ) ); else if( xCommandBarControl->getType() == office::MsoControlType::msoControlButton ) - return uno::makeAny( uno::Reference< excel::XMenuItem > ( new ScVbaMenuItem( this, mxContext, xCommandBarControl ) ) ); + return uno::Any( uno::Reference< excel::XMenuItem > ( new ScVbaMenuItem( this, mxContext, xCommandBarControl ) ) ); throw uno::RuntimeException(); } uno::Reference< excel::XMenuItem > SAL_CALL ScVbaMenuItems::Add( const OUString& Caption, const css::uno::Any& OnAction, const css::uno::Any& /*ShortcutKey*/, const css::uno::Any& Before, const css::uno::Any& Restore, const css::uno::Any& /*StatusBar*/, const css::uno::Any& /*HelpFile*/, const css::uno::Any& /*HelpContextID*/ ) { uno::Reference< XCommandBarControl > xCommandBarControl = m_xCommandBarControls->Add( - uno::makeAny( office::MsoControlType::msoControlButton ), + uno::Any( office::MsoControlType::msoControlButton ), uno::Any(), uno::Any(), Before, Restore ); xCommandBarControl->setCaption( Caption ); if( OnAction.hasValue() ) diff --git a/sc/source/ui/vba/vbamenus.cxx b/sc/source/ui/vba/vbamenus.cxx index f6b33fd89603..807f0cf5ade3 100644 --- a/sc/source/ui/vba/vbamenus.cxx +++ b/sc/source/ui/vba/vbamenus.cxx @@ -43,7 +43,7 @@ public: if( xCommandBarControl->getType() == office::MsoControlType::msoControlPopup ) { uno::Reference< excel::XMenu > xMenu( new ScVbaMenu( m_xParent, m_xContext, xCommandBarControl ) ); - return uno::makeAny( xMenu ); + return uno::Any( xMenu ); } nextElement(); @@ -92,13 +92,13 @@ ScVbaMenus::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) uno::Reference< XCommandBarControl > xCommandBarControl( m_xCommandBarControls->Item( aIndex, uno::Any() ), uno::UNO_QUERY_THROW ); if( xCommandBarControl->getType() != office::MsoControlType::msoControlPopup ) throw uno::RuntimeException(); - return uno::makeAny( uno::Reference< excel::XMenu > ( new ScVbaMenu( this, mxContext, xCommandBarControl ) ) ); + return uno::Any( uno::Reference< excel::XMenu > ( new ScVbaMenu( this, mxContext, xCommandBarControl ) ) ); } uno::Reference< excel::XMenu > SAL_CALL ScVbaMenus::Add( const OUString& Caption, const css::uno::Any& Before, const css::uno::Any& Restore ) { uno::Reference< XCommandBarControl > xCommandBarControl = m_xCommandBarControls->Add( - uno::makeAny( office::MsoControlType::msoControlPopup ), + uno::Any( office::MsoControlType::msoControlPopup ), uno::Any(), uno::Any(), Before, Restore ); xCommandBarControl->setCaption( Caption ); return uno::Reference< excel::XMenu >( new ScVbaMenu( this, mxContext, xCommandBarControl ) ); diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx index 8eba8097b236..287dbcf3cfff 100644 --- a/sc/source/ui/vba/vbanames.cxx +++ b/sc/source/ui/vba/vbanames.cxx @@ -50,7 +50,7 @@ public: virtual uno::Any SAL_CALL nextElement( ) override { uno::Reference< sheet::XNamedRange > xNamed( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< excel::XName > ( new ScVbaName( m_xParent, m_xContext, xNamed ,m_xNames , m_xModel ) ) ); + return uno::Any( uno::Reference< excel::XName > ( new ScVbaName( m_xParent, m_xContext, xNamed ,m_xNames , m_xModel ) ) ); } }; @@ -189,7 +189,7 @@ ScVbaNames::Add( const css::uno::Any& Name , if ( !xRange.is() ) xRange = new ScVbaRange( mxParent, mxContext, xUnoRange ); - uno::Reference< excel::XRange > xArea( xRange->Areas( uno::makeAny( sal_Int32(1) ) ), uno::UNO_QUERY ); + uno::Reference< excel::XRange > xArea( xRange->Areas( uno::Any( sal_Int32(1) ) ), uno::UNO_QUERY ); uno::Any aAny = xArea->getCellRange() ; @@ -206,7 +206,7 @@ ScVbaNames::Add( const css::uno::Any& Name , uno::Reference< ov::XCollection > xCol( xRange->Areas( uno::Any() ), uno::UNO_QUERY ); for ( sal_Int32 nArea = 1; nArea <= xCol->getCount(); ++nArea ) { - xArea.set( xRange->Areas( uno::makeAny( nArea ) ), uno::UNO_QUERY_THROW ); + xArea.set( xRange->Areas( uno::Any( nArea ) ), uno::UNO_QUERY_THROW ); OUString sRangeAdd = xArea->Address( aAny2, aAny2 , aAny2 , aAny2, aAny2 ); if ( nArea > 1 ) @@ -214,7 +214,7 @@ ScVbaNames::Add( const css::uno::Any& Name , sTmp.append("'" + xRange->getWorksheet()->getName() + "'." + sRangeAdd); } mxNames->addNewByName( sName, sTmp.makeStringAndClear(), aCellAddr, 0/*nUnoType*/); - return Item( uno::makeAny( sName ), uno::Any() ); + return Item( uno::Any( sName ), uno::Any() ); } } return css::uno::Any(); @@ -238,7 +238,7 @@ uno::Any ScVbaNames::createCollectionObject( const uno::Any& aSource ) { uno::Reference< sheet::XNamedRange > xName( aSource, uno::UNO_QUERY ); - return uno::makeAny( uno::Reference< excel::XName > ( new ScVbaName( getParent(), mxContext, xName, mxNames , mxModel ) ) ); + return uno::Any( uno::Reference< excel::XName > ( new ScVbaName( getParent(), mxContext, xName, mxNames , mxModel ) ) ); } OUString diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx index f0ddf68c82ac..11a8c3934658 100644 --- a/sc/source/ui/vba/vbaoleobjects.cxx +++ b/sc/source/ui/vba/vbaoleobjects.cxx @@ -57,7 +57,7 @@ public: { if ( Index < 0 || Index >= getCount() ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny( vObjects[ Index ] ); + return uno::Any( vObjects[ Index ] ); } // Methods XElementAccess @@ -96,7 +96,7 @@ public: if ( nIndex < m_xIndexAccess->getCount() ) { uno::Reference< drawing::XControlShape > xControlShape ( m_xIndexAccess->getByIndex( nIndex++ ), uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< ov::excel::XOLEObject >( new ScVbaOLEObject( m_xParent, m_xContext, xControlShape ) ) ); + return uno::Any( uno::Reference< ov::excel::XOLEObject >( new ScVbaOLEObject( m_xParent, m_xContext, xControlShape ) ) ); } throw container::NoSuchElementException(); } @@ -127,7 +127,7 @@ ScVbaOLEObjects::createCollectionObject( const css::uno::Any& aSource ) { uno::Reference< drawing::XControlShape > xControlShape( aSource, uno::UNO_QUERY_THROW ); // parent of OLEObject is the same parent as the collection ( e.g. the sheet ) - return uno::makeAny( uno::Reference< ov::excel::XOLEObject >( new ScVbaOLEObject( getParent(), mxContext, xControlShape ) ) ); + return uno::Any( uno::Reference< ov::excel::XOLEObject >( new ScVbaOLEObject( getParent(), mxContext, xControlShape ) ) ); } return uno::Any(); } diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx index ad7bca1265ae..3d9269c72fb0 100644 --- a/sc/source/ui/vba/vbapagebreak.cxx +++ b/sc/source/ui/vba/vbapagebreak.cxx @@ -65,11 +65,11 @@ void ScVbaPageBreak< Ifc... >::setType(sal_Int32 type) if( type == excel::XlPageBreak::xlPageBreakNone ) { - mxRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::makeAny(false)); + mxRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::Any(false)); return; } - mxRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::makeAny(true)); + mxRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::Any(true)); if( type == excel::XlPageBreak::xlPageBreakManual ) maTablePageBreakData.ManualBreak = true; else @@ -79,7 +79,7 @@ void ScVbaPageBreak< Ifc... >::setType(sal_Int32 type) template< typename... Ifc > void ScVbaPageBreak< Ifc... >::Delete() { - mxRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::makeAny(false)); + mxRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::Any(false)); } template< typename... Ifc > diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx index c8c142df8702..36d9f5c7f0f3 100644 --- a/sc/source/ui/vba/vbapagebreaks.cxx +++ b/sc/source/ui/vba/vbapagebreaks.cxx @@ -136,8 +136,8 @@ uno::Any SAL_CALL RangePageBreaks::getByIndex( sal_Int32 Index ) { uno::Reference< beans::XPropertySet > xRowColPropertySet( xIndexAccess->getByIndex(nPos), uno::UNO_QUERY_THROW ); if( m_bColumn ) - return uno::makeAny( uno::Reference< excel::XVPageBreak >( new ScVbaVPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) )); - return uno::makeAny( uno::Reference< excel::XHPageBreak >( new ScVbaHPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) )); + return uno::Any( uno::Reference< excel::XVPageBreak >( new ScVbaVPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) )); + return uno::Any( uno::Reference< excel::XHPageBreak >( new ScVbaHPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) )); } } throw lang::IndexOutOfBoundsException(); @@ -179,13 +179,13 @@ uno::Any RangePageBreaks::Add( const css::uno::Any& Before ) sal_Int32 nAPIRowColIndex = getAPIStartofRange( xRange ); uno::Reference< container::XIndexAccess > xIndexAccess = getRowColContainer(); uno::Reference< beans::XPropertySet > xRowColPropertySet( xIndexAccess->getByIndex(nAPIRowColIndex), uno::UNO_QUERY_THROW ); - xRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::makeAny(true)); + xRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::Any(true)); sheet::TablePageBreakData aTablePageBreakData; aTablePageBreakData.ManualBreak = true; aTablePageBreakData.Position = nAPIRowColIndex; if( m_bColumn ) - return uno::makeAny( uno::Reference< excel::XVPageBreak >( new ScVbaVPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) )); - return uno::makeAny( uno::Reference< excel::XHPageBreak >( new ScVbaHPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) )); + return uno::Any( uno::Reference< excel::XVPageBreak >( new ScVbaVPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) )); + return uno::Any( uno::Reference< excel::XHPageBreak >( new ScVbaHPageBreak( mxParent, mxContext, xRowColPropertySet, aTablePageBreakData) )); } namespace { diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx index 112522b8155a..7b7b23d16e4c 100644 --- a/sc/source/ui/vba/vbapagesetup.cxx +++ b/sc/source/ui/vba/vbapagesetup.cxx @@ -149,7 +149,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) fitToPagesTall >>= scaleToPageY; } - mxPageProps->setPropertyValue("ScaleToPagesY", uno::makeAny( scaleToPageY )); + mxPageProps->setPropertyValue("ScaleToPagesY", uno::Any( scaleToPageY )); } catch( uno::Exception& ) { @@ -172,7 +172,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) fitToPagesWide >>= scaleToPageX; } - mxPageProps->setPropertyValue("ScaleToPagesX", uno::makeAny( scaleToPageX )); + mxPageProps->setPropertyValue("ScaleToPagesX", uno::Any( scaleToPageX )); } catch( uno::Exception& ) { @@ -209,9 +209,9 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) // these only exist in S08 sal_uInt16 nScale = 0; - mxPageProps->setPropertyValue("ScaleToPages", uno::makeAny( nScale )); - mxPageProps->setPropertyValue("ScaleToPagesX", uno::makeAny( nScale )); - mxPageProps->setPropertyValue("ScaleToPagesY", uno::makeAny( nScale )); + mxPageProps->setPropertyValue("ScaleToPages", uno::Any( nScale )); + mxPageProps->setPropertyValue("ScaleToPagesX", uno::Any( nScale )); + mxPageProps->setPropertyValue("ScaleToPagesY", uno::Any( nScale )); } catch (const beans::UnknownPropertyException&) { @@ -224,7 +224,7 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) { } - mxPageProps->setPropertyValue("PageScale", uno::makeAny( pageScale )); + mxPageProps->setPropertyValue("PageScale", uno::Any( pageScale )); } OUString SAL_CALL ScVbaPageSetup::getLeftHeader() @@ -250,7 +250,7 @@ void SAL_CALL ScVbaPageSetup::setLeftHeader( const OUString& leftHeader) uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xHeaderContent->getLeftText(); xText->setString( leftHeader ); - mxPageProps->setPropertyValue("RightPageHeaderContent", uno::makeAny(xHeaderContent) ); + mxPageProps->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent) ); } catch( uno::Exception& ) { @@ -280,7 +280,7 @@ void SAL_CALL ScVbaPageSetup::setCenterHeader( const OUString& centerHeader) uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xHeaderContent->getCenterText(); xText->setString( centerHeader ); - mxPageProps->setPropertyValue("RightPageHeaderContent", uno::makeAny(xHeaderContent) ); + mxPageProps->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent) ); } catch( uno::Exception& ) { @@ -310,7 +310,7 @@ void SAL_CALL ScVbaPageSetup::setRightHeader( const OUString& rightHeader) uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xHeaderContent->getRightText(); xText->setString( rightHeader ); - mxPageProps->setPropertyValue("RightPageHeaderContent", uno::makeAny(xHeaderContent) ); + mxPageProps->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent) ); } catch( uno::Exception& ) { @@ -340,7 +340,7 @@ void SAL_CALL ScVbaPageSetup::setLeftFooter( const OUString& leftFooter) uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xFooterContent->getLeftText(); xText->setString( leftFooter ); - mxPageProps->setPropertyValue("RightPageFooterContent", uno::makeAny(xFooterContent) ); + mxPageProps->setPropertyValue("RightPageFooterContent", uno::Any(xFooterContent) ); } catch( uno::Exception& ) { @@ -370,7 +370,7 @@ void SAL_CALL ScVbaPageSetup::setCenterFooter( const OUString& centerFooter) uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xFooterContent->getCenterText(); xText->setString( centerFooter ); - mxPageProps->setPropertyValue("RightPageFooterContent", uno::makeAny(xFooterContent) ); + mxPageProps->setPropertyValue("RightPageFooterContent", uno::Any(xFooterContent) ); } catch( uno::Exception& ) { @@ -401,7 +401,7 @@ void SAL_CALL ScVbaPageSetup::setRightFooter( const OUString& rightFooter) uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); uno::Reference< text::XText > xText = xFooterContent->getRightText(); xText->setString( rightFooter ); - mxPageProps->setPropertyValue("RightPageFooterContent", uno::makeAny(xFooterContent) ); + mxPageProps->setPropertyValue("RightPageFooterContent", uno::Any(xFooterContent) ); } catch( uno::Exception& ) { @@ -442,7 +442,7 @@ void SAL_CALL ScVbaPageSetup::setOrder(sal_Int32 order) try { - mxPageProps->setPropertyValue("PrintDownFirst", uno::makeAny( bOrder )); + mxPageProps->setPropertyValue("PrintDownFirst", uno::Any( bOrder )); } catch (const uno::Exception&) { @@ -503,7 +503,7 @@ void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically) { try { - mxPageProps->setPropertyValue("CenterVertically", uno::makeAny( centerVertically )); + mxPageProps->setPropertyValue("CenterVertically", uno::Any( centerVertically )); } catch (const uno::Exception&) { @@ -528,7 +528,7 @@ void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally { try { - mxPageProps->setPropertyValue("CenterHorizontally", uno::makeAny( centerHorizontally )); + mxPageProps->setPropertyValue("CenterHorizontally", uno::Any( centerHorizontally )); } catch (const uno::Exception&) { @@ -553,7 +553,7 @@ void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings) { try { - mxPageProps->setPropertyValue("PrintHeaders", uno::makeAny( printHeadings )); + mxPageProps->setPropertyValue("PrintHeaders", uno::Any( printHeadings )); } catch( uno::Exception& ) { @@ -608,7 +608,7 @@ void SAL_CALL ScVbaPageSetup::setPaperSize( sal_Int32 papersize ) aPaperSize.Width = rConvertedSize.mnWidth; if ( mbIsLandscape ) ::std::swap( aPaperSize.Width, aPaperSize.Height ); - mxPageProps->setPropertyValue( "Size", uno::makeAny( aPaperSize ) ); + mxPageProps->setPropertyValue( "Size", uno::Any( aPaperSize ) ); } } diff --git a/sc/source/ui/vba/vbapalette.cxx b/sc/source/ui/vba/vbapalette.cxx index 2fdb74d77bfa..81caebab60a9 100644 --- a/sc/source/ui/vba/vbapalette.cxx +++ b/sc/source/ui/vba/vbapalette.cxx @@ -68,7 +68,7 @@ public: { if ( Index < 0 || Index >= getCount() ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny( sal_Int32( spnDefColorTable8[ Index ] ) ); + return uno::Any( sal_Int32( spnDefColorTable8[ Index ] ) ); } // Methods XElementAccess diff --git a/sc/source/ui/vba/vbapivottables.cxx b/sc/source/ui/vba/vbapivottables.cxx index 8dad4b638624..f49fbeaeb97c 100644 --- a/sc/source/ui/vba/vbapivottables.cxx +++ b/sc/source/ui/vba/vbapivottables.cxx @@ -27,7 +27,7 @@ using namespace ::ooo::vba; static uno::Any DataPilotToPivotTable( const uno::Any& aSource, const uno::Reference< uno::XComponentContext > & xContext ) { uno::Reference< sheet::XDataPilotTable > xTable( aSource, uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< excel::XPivotTable > ( new ScVbaPivotTable( xContext, xTable ) ) ); + return uno::Any( uno::Reference< excel::XPivotTable > ( new ScVbaPivotTable( xContext, xTable ) ) ); } namespace { diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index c424c687ecee..4e1ff71a6ceb 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -193,7 +193,7 @@ static double lcl_Round2DecPlaces( double nVal ) static uno::Any lcl_makeRange( const uno::Reference< XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Any& rAny, bool bIsRows, bool bIsColumns ) { uno::Reference< table::XCellRange > xCellRange(rAny, uno::UNO_QUERY_THROW); - return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( rParent, rContext, xCellRange, bIsRows, bIsColumns ) ) ); + return uno::Any( uno::Reference< excel::XRange >( new ScVbaRange( rParent, rContext, xCellRange, bIsRows, bIsColumns ) ) ); } static uno::Reference< excel::XRange > lcl_makeXRangeFromSheetCellRanges( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XSheetCellRanges >& xLocSheetCellRanges, ScDocShell* pDoc ) @@ -278,7 +278,7 @@ public: if ( !bHasMore ) throw container::NoSuchElementException(); bHasMore = false; - return uno::makeAny( m_xRange ); + return uno::Any( m_xRange ); } }; @@ -299,7 +299,7 @@ public: { if ( Index != 0 ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny( m_xRange ); + return uno::Any( m_xRange ); } // XElementAccess virtual uno::Type SAL_CALL getElementType() override { return cppu::UnoType<table::XCellRange>::get(); } @@ -550,7 +550,7 @@ public: if ( nNewIndex == -1 ) // format not defined nNewIndex = mxFormats->addNew( rFormat, aLocale ); } - mxRangeProps->setPropertyValue( "NumberFormat", uno::makeAny( nNewIndex ) ); + mxRangeProps->setPropertyValue( "NumberFormat", uno::Any( nNewIndex ) ); } void setNumberFormat( sal_Int16 nType ) @@ -562,7 +562,7 @@ public: if ( xTypes.is() ) { sal_Int32 nNewIndex = xTypes->getStandardFormat( nType, aLocale ); - mxRangeProps->setPropertyValue( "NumberFormat", uno::makeAny( nNewIndex ) ); + mxRangeProps->setPropertyValue( "NumberFormat", uno::Any( nNewIndex ) ); } } @@ -606,7 +606,7 @@ public: if ( !hasMoreElements() ) throw container::NoSuchElementException(); sal_Int32 vbaIndex = 1 + mCurElem++; - return uno::makeAny( mxRange->Item( uno::makeAny( vbaIndex ), uno::Any() ) ); + return uno::Any( mxRange->Item( uno::Any( vbaIndex ), uno::Any() ) ); } }; @@ -623,7 +623,7 @@ class CellsEnumeration : public CellsEnumeration_BASE { if ( nVBAIndex < 1 || nVBAIndex > m_xAreas->getCount() ) throw uno::RuntimeException(); - uno::Reference< excel::XRange > xRange( m_xAreas->Item( uno::makeAny(nVBAIndex), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_xAreas->Item( uno::Any(nVBAIndex), uno::Any() ), uno::UNO_QUERY_THROW ); uno::Reference< table::XCellRange > xCellRange( ScVbaRange::getCellRange( xRange ), uno::UNO_QUERY_THROW ); return xCellRange; } @@ -660,7 +660,7 @@ public: uno::Reference< table::XCellRange > xRangeArea = getArea( aPos.m_nArea ); uno::Reference< table::XCellRange > xCellRange( xRangeArea->getCellByPosition( aPos.m_nCol, aPos.m_nRow ), uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( mxParent, mxContext, xCellRange ) ) ); + return uno::Any( uno::Reference< excel::XRange >( new ScVbaRange( mxParent, mxContext, xCellRange ) ) ); } }; @@ -990,7 +990,7 @@ public: if ( y < nColCount ) mCellValueSetter.processValue( aMatrix[ y ], xCell ); else - mCellValueSetter.processValue( uno::makeAny( OUString(sNA) ), xCell ); + mCellValueSetter.processValue( uno::Any( OUString(sNA) ), xCell ); } }; @@ -1013,7 +1013,7 @@ public: if ( x < nRowCount && y < nColCount ) mCellValueSetter.processValue( aMatrix[ x ][ y ], xCell ); else - mCellValueSetter.processValue( uno::makeAny( OUString(sNA) ), xCell ); + mCellValueSetter.processValue( uno::Any( OUString(sNA) ), xCell ); } }; @@ -1077,7 +1077,7 @@ public: sal_Int32 nItems = m_Areas->getCount(); for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); processor.process( xRange ); } } @@ -1469,7 +1469,7 @@ uno::Reference< XCollection >& ScVbaRange::getBorders() { if ( !m_Borders.is() ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); m_Borders = lcl_setupBorders( this, mxContext, uno::Reference< table::XCellRange >( xRange->getCellRange(), uno::UNO_QUERY_THROW ) ); } return m_Borders; @@ -1514,7 +1514,7 @@ ScVbaRange::getValue( ValueGetter& valueGetter) // multi cell range ( return array ) Dim2ArrayValueGetter arrayGetter( nRowCount, nColCount, valueGetter ); visitArray( arrayGetter ); - return uno::makeAny( script::ArrayWrapper( false, arrayGetter.getValue() ) ); + return uno::Any( script::ArrayWrapper( false, arrayGetter.getValue() ) ); } uno::Any SAL_CALL @@ -1608,7 +1608,7 @@ ScVbaRange::ClearContents( sal_Int32 nFlags, bool bFireEvent ) sal_Int32 nItems = m_Areas->getCount(); for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); ScVbaRange* pRange = getImplementation( xRange ); if ( pRange ) pRange->ClearContents( nFlags, false ); // do not fire for single ranges @@ -1791,7 +1791,7 @@ ScVbaRange::HasFormula() uno::Any aResult = aNULL(); for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); // if the HasFormula for any area is different to another // return null if ( index > 1 ) @@ -1812,7 +1812,7 @@ ScVbaRange::HasFormula() assert(pFormulaRanges); // check if there are no formula cell, return false if ( pFormulaRanges->GetRangeList().empty() ) - return uno::makeAny(false); + return uno::Any(false); // check if there are holes (where some cells are not formulas) // or returned range is not equal to this range @@ -1822,7 +1822,7 @@ ScVbaRange::HasFormula() ) return aNULL(); // should return aNULL; } - return uno::makeAny( true ); + return uno::Any( true ); } void ScVbaRange::fillSeries( sheet::FillDirection nFillDirection, sheet::FillMode nFillMode, sheet::FillDateMode nFillDateMode, double fStep, double fEndValue ) @@ -1833,7 +1833,7 @@ ScVbaRange::fillSeries( sheet::FillDirection nFillDirection, sheet::FillMode nFi uno::Reference< XCollection > xCollection( m_Areas, uno::UNO_SET_THROW ); for ( sal_Int32 index = 1; index <= xCollection->getCount(); ++index ) { - uno::Reference< excel::XRange > xRange( xCollection->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( xCollection->Item( uno::Any( index ), uno::Any() ), uno::UNO_QUERY_THROW ); ScVbaRange* pThisRange = getImplementation( xRange ); pThisRange->fillSeries( nFillDirection, nFillMode, nFillDateMode, fStep, fEndValue ); @@ -1987,7 +1987,7 @@ ScVbaRange::getFormulaArray() // for the moment any tests we have pass uno::Reference< sheet::XArrayFormulaRange> xFormulaArray( mxRange, uno::UNO_QUERY_THROW ); if ( !xFormulaArray->getArrayFormula().isEmpty() ) - return uno::makeAny( xFormulaArray->getArrayFormula() ); + return uno::Any( xFormulaArray->getArrayFormula() ); uno::Reference< sheet::XCellRangeFormula> xCellRangeFormula( mxRange, uno::UNO_QUERY_THROW ); const uno::Reference< script::XTypeConverter >& xConverter = getTypeConverter( mxContext ); @@ -2001,7 +2001,7 @@ ScVbaRange::getFormulaArray() aSingleValueOrMatrix <<= aTmpSeq[ 0 ][ 0 ]; } else - aSingleValueOrMatrix = xConverter->convertTo( uno::makeAny( aTmpSeq ) , cppu::UnoType<uno::Sequence< uno::Sequence< uno::Any > >>::get() ) ; + aSingleValueOrMatrix = xConverter->convertTo( uno::Any( aTmpSeq ) , cppu::UnoType<uno::Sequence< uno::Sequence< uno::Any > >>::get() ) ; return aSingleValueOrMatrix; } @@ -2078,7 +2078,7 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut uno::Any aExternalCopy = External; for ( sal_Int32 index = 1; index <= xCollection->getCount(); ++index ) { - uno::Reference< excel::XRange > xRange( xCollection->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( xCollection->Item( uno::Any( index ), uno::Any() ), uno::UNO_QUERY_THROW ); if ( index > 1 ) { sAddress.append(","); @@ -2585,7 +2585,7 @@ ScVbaRange::setNumberFormat( const uno::Any& aFormat ) sal_Int32 nItems = m_Areas->getCount(); for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); xRange->setNumberFormat( aFormat ); } return; @@ -2604,7 +2604,7 @@ ScVbaRange::getNumberFormat() uno::Any aResult = aNULL(); for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); // if the numberformat of one area is different to another // return null if ( index > 1 ) @@ -2619,7 +2619,7 @@ ScVbaRange::getNumberFormat() NumFormatHelper numFormat( mxRange ); OUString sFormat = numFormat.getNumberFormatString(); if ( !sFormat.isEmpty() ) - return uno::makeAny( sFormat ); + return uno::Any( sFormat ); return aNULL(); } @@ -2655,7 +2655,7 @@ ScVbaRange::setWrapText( const uno::Any& aIsWrapped ) sal_Int32 nItems = m_Areas->getCount(); for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); xRange->setWrapText( aIsWrapped ); } return; @@ -2675,7 +2675,7 @@ ScVbaRange::getWrapText() uno::Any aResult; for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); if ( index > 1 ) if ( aResult != xRange->getWrapText() ) return aNULL(); @@ -2885,7 +2885,7 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons uno::Reference< frame::XModel > xModel(pShell->GetModel(), uno::UNO_SET_THROW); uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW ); // select this range - xSelection->select( uno::makeAny( mxRange ) ); + xSelection->select( uno::Any( mxRange ) ); // set up defaults sal_Int32 nPaste = excel::XlPasteType::xlPasteAll; sal_Int32 nOperation = excel::XlPasteSpecialOperation::xlPasteSpecialOperationNone; @@ -3007,7 +3007,7 @@ ScVbaRange::getHidden() // first area if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(sal_Int32(1)), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(sal_Int32(1)), uno::Any() ), uno::UNO_QUERY_THROW ); return xRange->getHidden(); } bool bIsVisible = false; @@ -3023,7 +3023,7 @@ ScVbaRange::getHidden() throw css::lang::WrappedTargetRuntimeException( e.Message, nullptr, anyEx ); } - return uno::makeAny( !bIsVisible ); + return uno::Any( !bIsVisible ); } void SAL_CALL @@ -3034,7 +3034,7 @@ ScVbaRange::setHidden( const uno::Any& _hidden ) sal_Int32 nItems = m_Areas->getCount(); for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); xRange->setHidden( _hidden ); } return; @@ -3061,7 +3061,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un { for ( sal_Int32 index = 1; index <= m_Areas->getCount(); ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( index ), uno::Any() ), uno::UNO_QUERY_THROW ); xRange->Replace( What, Replacement, LookAt, SearchOrder, MatchCase, MatchByte, SearchFormat, ReplaceFormat ); } return true; // seems to return true always ( or at least I haven't found the trick of @@ -3083,7 +3083,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un xReplace->createReplaceDescriptor(); xDescriptor->setSearchString( sWhat); - xDescriptor->setPropertyValue( SC_UNO_SRCHREGEXP, uno::makeAny( true ) ); + xDescriptor->setPropertyValue( SC_UNO_SRCHREGEXP, uno::Any( true ) ); xDescriptor->setReplaceString( Replacement); if ( LookAt.hasValue() ) { @@ -3099,7 +3099,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un // set global search props ( affects the find dialog // and of course the defaults for this method newOptions.SetWordOnly( bSearchWords ); - xDescriptor->setPropertyValue( SC_UNO_SRCHWORDS, uno::makeAny( bSearchWords ) ); + xDescriptor->setPropertyValue( SC_UNO_SRCHWORDS, uno::Any( bSearchWords ) ); } // sets SearchByRow ( true for Rows ) if ( SearchOrder.hasValue() ) @@ -3114,7 +3114,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder" ); newOptions.SetRowDirection( bSearchByRow ); - xDescriptor->setPropertyValue( SC_UNO_SRCHBYROW, uno::makeAny( bSearchByRow ) ); + xDescriptor->setPropertyValue( SC_UNO_SRCHBYROW, uno::Any( bSearchByRow ) ); } if ( MatchCase.hasValue() ) { @@ -3122,7 +3122,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un // SearchCaseSensitive MatchCase >>= bMatchCase; - xDescriptor->setPropertyValue( SC_UNO_SRCHCASE, uno::makeAny( bMatchCase ) ); + xDescriptor->setPropertyValue( SC_UNO_SRCHCASE, uno::Any( bMatchCase ) ); } ScGlobal::SetSearchItem( newOptions ); @@ -3196,7 +3196,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L // After must be a single cell in the range if( xAfterRange->getCount() > 1 ) throw uno::RuntimeException("After must be a single cell." ); - uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), uno::UNO_SET_THROW ); + uno::Reference< excel::XRange > xCell( Cells( uno::Any( xAfterRange->getRow() ), uno::Any( xAfterRange->getColumn() ) ), uno::UNO_SET_THROW ); xStartCell.set( xAfterRange->getCellRange(), uno::UNO_QUERY_THROW ); } @@ -3222,7 +3222,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L throw uno::RuntimeException("Range::Find, illegal value for LookIn." ); } newOptions.SetCellType( nSearchType ); - xDescriptor->setPropertyValue( "SearchType", uno::makeAny( static_cast<sal_uInt16>(nSearchType) ) ); + xDescriptor->setPropertyValue( "SearchType", uno::Any( static_cast<sal_uInt16>(nSearchType) ) ); } } @@ -3238,7 +3238,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L else throw uno::RuntimeException("Range::Find, illegal value for LookAt" ); newOptions.SetWordOnly( bSearchWords ); - xDescriptor->setPropertyValue( SC_UNO_SRCHWORDS, uno::makeAny( bSearchWords ) ); + xDescriptor->setPropertyValue( SC_UNO_SRCHWORDS, uno::Any( bSearchWords ) ); } // SearchOrder @@ -3254,7 +3254,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L throw uno::RuntimeException("Range::Find, illegal value for SearchOrder" ); newOptions.SetRowDirection( bSearchByRow ); - xDescriptor->setPropertyValue( SC_UNO_SRCHBYROW, uno::makeAny( bSearchByRow ) ); + xDescriptor->setPropertyValue( SC_UNO_SRCHBYROW, uno::Any( bSearchByRow ) ); } // SearchDirection @@ -3271,7 +3271,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L else throw uno::RuntimeException("Range::Find, illegal value for SearchDirection" ); newOptions.SetBackward( bSearchBackwards ); - xDescriptor->setPropertyValue( "SearchBackwards", uno::makeAny( bSearchBackwards ) ); + xDescriptor->setPropertyValue( "SearchBackwards", uno::Any( bSearchBackwards ) ); } } @@ -3283,7 +3283,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L if( !( MatchCase >>= bMatchCase ) ) throw uno::RuntimeException("Range::Find illegal value for MatchCase" ); } - xDescriptor->setPropertyValue( SC_UNO_SRCHCASE, uno::makeAny( bMatchCase ) ); + xDescriptor->setPropertyValue( SC_UNO_SRCHCASE, uno::Any( bMatchCase ) ); // MatchByte // SearchFormat @@ -3589,7 +3589,7 @@ ScVbaRange::End( ::sal_Int32 Direction ) OUString sActiveCell = xApplication->getActiveCell()->Address(aDft, aDft, aDft, aDft, aDft ); // position current cell upper left of this range - Cells( uno::makeAny( sal_Int32(1) ), uno::makeAny( sal_Int32(1) ) )->Select(); + Cells( uno::Any( sal_Int32(1) ), uno::Any( sal_Int32(1) ) )->Select(); uno::Reference< frame::XModel > xModel = getModelFromRange( mxRange ); @@ -3633,10 +3633,10 @@ ScVbaRange::End( ::sal_Int32 Direction ) uno::Any aVoid; uno::Reference< excel::XRange > resultCell; - resultCell.set( xApplication->getActiveSheet()->Range( uno::makeAny( sMoved ), aVoid ), uno::UNO_SET_THROW ); + resultCell.set( xApplication->getActiveSheet()->Range( uno::Any( sMoved ), aVoid ), uno::UNO_SET_THROW ); // restore old ActiveCell - uno::Reference< excel::XRange > xOldActiveCell( sActiveSheet->Range( uno::makeAny( sActiveCell ), aVoid ), uno::UNO_SET_THROW ); + uno::Reference< excel::XRange > xOldActiveCell( sActiveSheet->Range( uno::Any( sActiveCell ), aVoid ), uno::UNO_SET_THROW ); xOldActiveCell->Select(); @@ -3676,7 +3676,7 @@ ScVbaRange::Delete( const uno::Any& Shift ) sal_Int32 nItems = m_Areas->getCount(); for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); xRange->Delete( Shift ); } return; @@ -3735,7 +3735,7 @@ ScVbaRange::createEnumeration() if ( mbIsColumns || mbIsRows ) { uno::Reference< table::XColumnRowRange > xColumnRowRange(mxRange, uno::UNO_QUERY ); - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); sal_Int32 nElems = 0; if ( mbIsColumns ) nElems = xColumnRowRange->getColumns()->getCount(); @@ -3793,7 +3793,7 @@ ScVbaRange::getColumnWidth() sal_Int32 nLen = m_Areas->getCount(); if ( nLen > 1 ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); return xRange->getColumnWidth(); } @@ -3821,7 +3821,7 @@ ScVbaRange::getColumnWidth() nColWidth = ( nColWidth / defaultCharWidth ) - fExtraWidth; } nColWidth = lcl_Round2DecPlaces( nColWidth ); - return uno::makeAny( nColWidth ); + return uno::Any( nColWidth ); } void SAL_CALL @@ -3832,7 +3832,7 @@ ScVbaRange::setColumnWidth( const uno::Any& _columnwidth ) { for ( sal_Int32 index = 1; index != nLen; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( index ), uno::Any() ), uno::UNO_QUERY_THROW ); xRange->setColumnWidth( _columnwidth ); } return; @@ -3861,7 +3861,7 @@ ScVbaRange::getWidth() { if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); return xRange->getWidth(); } uno::Reference< table::XColumnRowRange > xColRowRange( mxRange, uno::UNO_QUERY_THROW ); @@ -3874,14 +3874,14 @@ ScVbaRange::getWidth() double nTmpWidth = getCalcColWidth( xAddressable->getRangeAddress() ); nWidth += nTmpWidth; } - return uno::makeAny( nWidth ); + return uno::Any( nWidth ); } uno::Any SAL_CALL ScVbaRange::Areas( const uno::Any& item) { if ( !item.hasValue() ) - return uno::makeAny( m_Areas ); + return uno::Any( m_Areas ); return m_Areas->Item( item, uno::Any() ); } @@ -3890,7 +3890,7 @@ ScVbaRange::getArea( sal_Int32 nIndex ) { if ( !m_Areas.is() ) throw uno::RuntimeException("No areas available" ); - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( ++nIndex ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( ++nIndex ), uno::Any() ), uno::UNO_QUERY_THROW ); return xRange; } @@ -3898,7 +3898,7 @@ uno::Any ScVbaRange::Borders( const uno::Any& item ) { if ( !item.hasValue() ) - return uno::makeAny( getBorders() ); + return uno::Any( getBorders() ); return getBorders()->Item( item, uno::Any() ); } @@ -3918,7 +3918,7 @@ ScVbaRange::BorderAround( const css::uno::Any& LineStyle, const css::uno::Any& W case excel::XlBordersIndex::xlEdgeBottom: case excel::XlBordersIndex::xlEdgeRight: { - uno::Reference< excel::XBorder > xBorder( m_Borders->Item( uno::makeAny( nLineType ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XBorder > xBorder( m_Borders->Item( uno::Any( nLineType ), uno::Any() ), uno::UNO_QUERY_THROW ); if( LineStyle.hasValue() ) { xBorder->setLineStyle( LineStyle ); @@ -3943,10 +3943,10 @@ ScVbaRange::BorderAround( const css::uno::Any& LineStyle, const css::uno::Any& W case excel::XlBordersIndex::xlDiagonalUp: break; default: - return uno::makeAny( false ); + return uno::Any( false ); } } - return uno::makeAny( true ); + return uno::Any( true ); } uno::Any SAL_CALL @@ -3955,7 +3955,7 @@ ScVbaRange::getRowHeight() sal_Int32 nLen = m_Areas->getCount(); if ( nLen > 1 ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); return xRange->getRowHeight(); } @@ -3985,7 +3985,7 @@ ScVbaRange::getRowHeight() } } double nHeight = lcl_Round2DecPlaces( lcl_TwipsToPoints( nRowTwips ) ); - return uno::makeAny( nHeight ); + return uno::Any( nHeight ); } void SAL_CALL @@ -3996,7 +3996,7 @@ ScVbaRange::setRowHeight( const uno::Any& _rowheight) { for ( sal_Int32 index = 1; index != nLen; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( index ), uno::Any() ), uno::UNO_QUERY_THROW ); xRange->setRowHeight( _rowheight ); } return; @@ -4047,7 +4047,7 @@ ScVbaRange::getPageBreak() } } - return uno::makeAny( nPageBreak ); + return uno::Any( nPageBreak ); } void SAL_CALL @@ -4086,7 +4086,7 @@ ScVbaRange::getHeight() { if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); return xRange->getHeight(); } @@ -4099,7 +4099,7 @@ ScVbaRange::getHeight() uno::Reference< sheet::XCellRangeAddressable > xAddressable( xIndexAccess->getByIndex( index ), uno::UNO_QUERY_THROW ); nHeight += getCalcRowHeight(xAddressable->getRangeAddress() ); } - return uno::makeAny( nHeight ); + return uno::Any( nHeight ); } awt::Point @@ -4121,7 +4121,7 @@ ScVbaRange::getLeft() if ( m_Areas->getCount() > 1 ) return getArea( 0 )->getLeft(); awt::Point aPoint = getPosition(); - return uno::makeAny(o3tl::convert<double>(aPoint.X, o3tl::Length::mm100, o3tl::Length::pt)); + return uno::Any(o3tl::convert<double>(aPoint.X, o3tl::Length::mm100, o3tl::Length::pt)); } uno::Any SAL_CALL @@ -4131,7 +4131,7 @@ ScVbaRange::getTop() if ( m_Areas->getCount() > 1 ) return getArea( 0 )->getTop(); awt::Point aPoint= getPosition(); - return uno::makeAny(o3tl::convert<double>(aPoint.Y, o3tl::Length::mm100, o3tl::Length::pt)); + return uno::Any(o3tl::convert<double>(aPoint.Y, o3tl::Length::mm100, o3tl::Length::pt)); } static uno::Reference< sheet::XCellRangeReferrer > getNamedRange( const uno::Reference< uno::XInterface >& xIf, const uno::Reference< table::XCellRange >& thisRange ) @@ -4756,7 +4756,7 @@ ScVbaRange::Autofit() { for ( sal_Int32 index = 1; index != nLen; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( index ), uno::Any() ), uno::UNO_QUERY_THROW ); xRange->Autofit(); } return; @@ -4939,7 +4939,7 @@ uno::Any ScVbaRange::getShowDetail() if( pEntry ) { const bool bShowDetail = !pEntry->IsHidden(); - return uno::makeAny( bShowDetail ); + return uno::Any( bShowDetail ); } return aNULL(); @@ -5016,7 +5016,7 @@ ScVbaRange::PrintOut( const uno::Any& From, const uno::Any& To, const uno::Any& uno::Reference< sheet::XPrintAreas > xPrintAreas; for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); RangeHelper thisRange( xRange->getCellRange() ); table::CellRangeAddress rangeAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); @@ -5168,7 +5168,7 @@ ScVbaRange::GoalSeek( const uno::Any& Goal, const uno::Reference< excel::XRange table::CellAddress thisCell( thisAddress.Sheet, thisAddress.StartColumn, thisAddress.StartRow ); table::CellAddress changingCell( changingCellAddr.Sheet, changingCellAddr.StartColumn, changingCellAddr.StartRow ); sheet::GoalResult res = xGoalSeek->seekGoal( thisCell, changingCell, sGoal ); - ChangingCell->setValue( uno::makeAny( res.Result ) ); + ChangingCell->setValue( uno::Any( res.Result ) ); // openoffice behaves differently, result is 0 if the divergence is too great // but... if it detects 0 is the value it requires then it will use that @@ -5236,7 +5236,7 @@ ScVbaRange:: ClearOutline( ) sal_Int32 nItems = m_Areas->getCount(); for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); xRange->ClearOutline(); } return; @@ -5288,7 +5288,7 @@ ScVbaRange::Merge( const uno::Any& Across ) sal_Int32 nItems = m_Areas->getCount(); for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); xRange->Merge(Across); } return; @@ -5303,7 +5303,7 @@ ScVbaRange::Merge( const uno::Any& Across ) // #TODO #FIXME this seems incredibly lame, this can't be right for (sal_Int32 i=1; i <= oRangeRowsImpl->getCount();i++) { - oRangeRowsImpl->Cells( uno::makeAny( i ), uno::Any() )->Merge( uno::makeAny( false ) ); + oRangeRowsImpl->Cells( uno::Any( i ), uno::Any() )->Merge( uno::Any( false ) ); } } } @@ -5316,7 +5316,7 @@ ScVbaRange::UnMerge( ) sal_Int32 nItems = m_Areas->getCount(); for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); xRange->UnMerge(); } return; @@ -5329,7 +5329,7 @@ ScVbaRange::getStyle() { if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32( 1 ) ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( sal_Int32( 1 ) ), uno::Any() ), uno::UNO_QUERY_THROW ); return xRange->getStyle(); } uno::Reference< beans::XPropertySet > xProps( mxRange, uno::UNO_QUERY_THROW ); @@ -5338,14 +5338,14 @@ ScVbaRange::getStyle() ScDocShell* pShell = getScDocShell(); uno::Reference< frame::XModel > xModel( pShell->GetModel() ); uno::Reference< excel::XStyle > xStyle = new ScVbaStyle( this, mxContext, sStyleName, xModel ); - return uno::makeAny( xStyle ); + return uno::Any( xStyle ); } void SAL_CALL ScVbaRange::setStyle( const uno::Any& _style ) { if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32( 1 ) ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( sal_Int32( 1 ) ), uno::Any() ), uno::UNO_QUERY_THROW ); xRange->setStyle( _style ); return; } @@ -5353,7 +5353,7 @@ ScVbaRange::setStyle( const uno::Any& _style ) uno::Reference< excel::XStyle > xStyle; _style >>= xStyle; if ( xStyle.is() ) - xProps->setPropertyValue( CELLSTYLE, uno::makeAny( xStyle->getName() ) ); + xProps->setPropertyValue( CELLSTYLE, uno::Any( xStyle->getName() ) ); } uno::Reference< excel::XRange > @@ -5390,7 +5390,7 @@ ScVbaRange::Next() { if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32( 1 ) ), uno::Any() ) , uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( sal_Int32( 1 ) ), uno::Any() ) , uno::UNO_QUERY_THROW ); return xRange->Next(); } return PreviousNext( false ); @@ -5401,7 +5401,7 @@ ScVbaRange::Previous() { if ( m_Areas->getCount() > 1 ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32( 1 ) ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any( sal_Int32( 1 ) ), uno::Any() ), uno::UNO_QUERY_THROW ); return xRange->Previous(); } return PreviousNext( true ); @@ -5439,7 +5439,7 @@ ScVbaRange::SpecialCells( const uno::Any& _oType, const uno::Any& _oValue) sal_Int32 nItems = m_Areas->getCount() + 1; for ( sal_Int32 index=1; index <= nItems; ++index ) { - uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::Any(index), uno::Any() ), uno::UNO_QUERY_THROW ); xRange = xRange->SpecialCells( _oType, _oValue); ScVbaRange* pRange = getImplementation( xRange ); if ( xRange.is() && pRange ) @@ -5447,7 +5447,7 @@ ScVbaRange::SpecialCells( const uno::Any& _oType, const uno::Any& _oValue) sal_Int32 nElems = pRange->m_Areas->getCount() + 1; for ( sal_Int32 nArea = 1; nArea < nElems; ++nArea ) { - uno::Reference< excel::XRange > xTmpRange( m_Areas->Item( uno::makeAny( nArea ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XRange > xTmpRange( m_Areas->Item( uno::Any( nArea ), uno::Any() ), uno::UNO_QUERY_THROW ); RangeHelper rHelper( xTmpRange->getCellRange() ); rangeResults.push_back( rHelper.getCellRangeAddressable()->getRangeAddress() ); } @@ -5548,7 +5548,7 @@ ScVbaRange::SpecialCellsImpl( sal_Int32 nType, const uno::Any& _oValue) break; } case excel::XlCellType::xlCellTypeLastCell: - xRange = Cells( uno::makeAny( getCount() ), uno::Any() ); + xRange = Cells( uno::Any( getCount() ), uno::Any() ); [[fallthrough]]; //TODO ??? case excel::XlCellType::xlCellTypeVisible: xLocSheetCellRanges = xQuery->queryVisibleCells(); @@ -5589,7 +5589,7 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGroupBy, ::sal_Int32 _nFunction, const uno:: uno::Reference< sheet::XSubTotalCalculatable> xSub(mxRange, uno::UNO_QUERY_THROW ); uno::Reference< sheet::XSubTotalDescriptor > xSubDesc = xSub->createSubTotalDescriptor(true); uno::Reference< beans::XPropertySet > xSubDescPropertySet( xSubDesc, uno::UNO_QUERY_THROW ); - xSubDescPropertySet->setPropertyValue("InsertPageBreaks", uno::makeAny( bAddPageBreaks)); + xSubDescPropertySet->setPropertyValue("InsertPageBreaks", uno::Any( bAddPageBreaks)); sal_Int32 nLen = _nTotalList.getLength(); uno::Sequence< sheet::SubTotalColumn > aColumns( nLen ); auto aColumnsRange = asNonConstRange(aColumns); diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx index da4e756cf7b6..ae393804d70e 100644 --- a/sc/source/ui/vba/vbastyle.cxx +++ b/sc/source/ui/vba/vbastyle.cxx @@ -115,7 +115,7 @@ ScVbaStyle::setNameLocal( const OUString& NameLocal ) { try { - mxPropertySet->setPropertyValue(DISPLAYNAME, uno::makeAny( NameLocal ) ); + mxPropertySet->setPropertyValue(DISPLAYNAME, uno::Any( NameLocal ) ); } catch (const uno::Exception& e) { diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx index 316bc26b7481..c21adf06487a 100644 --- a/sc/source/ui/vba/vbastyles.cxx +++ b/sc/source/ui/vba/vbastyles.cxx @@ -32,7 +32,7 @@ lcl_createAPIStyleToVBAObject( const css::uno::Any& aObject, const uno::Referenc { uno::Reference< beans::XPropertySet > xStyleProps( aObject, uno::UNO_QUERY_THROW ); uno::Reference< excel::XStyle > xStyle( new ScVbaStyle( xParent, xContext, xStyleProps, xModel ) ); - return uno::makeAny( xStyle ); + return uno::Any( xStyle ); } ScVbaStyles::ScVbaStyles( const uno::Reference< XHelperInterface >& xParent, @@ -151,13 +151,13 @@ ScVbaStyles::Add( const OUString& _sName, const uno::Any& _aBasedOn ) if (!mxNameContainerCellStyles->hasByName(_sName)) { - mxNameContainerCellStyles->insertByName(_sName, uno::makeAny( xStyle) ); + mxNameContainerCellStyles->insertByName(_sName, uno::Any( xStyle) ); } if (sParentCellStyleName != "Default") { xStyle->setParentStyle( sParentCellStyleName ); } - aRet.set( Item( uno::makeAny( _sName ), uno::Any() ), uno::UNO_QUERY_THROW ); + aRet.set( Item( uno::Any( _sName ), uno::Any() ), uno::UNO_QUERY_THROW ); } catch (const uno::Exception&) { diff --git a/sc/source/ui/vba/vbatextframe.cxx b/sc/source/ui/vba/vbatextframe.cxx index ef797da31a7d..9f921a8fa132 100644 --- a/sc/source/ui/vba/vbatextframe.cxx +++ b/sc/source/ui/vba/vbatextframe.cxx @@ -37,7 +37,7 @@ ScVbaTextFrame::Characters() ScVbaPalette aPalette( SfxObjectShell::Current() ); uno::Any aStart( sal_Int32( 1 ) ); uno::Any aLength(sal_Int32( -1 ) ); - return uno::makeAny( uno::Reference< ov::excel::XCharacters >( new ScVbaCharacters( this, mxContext, aPalette, xSimpleText, aStart, aLength, true ) ) ); + return uno::Any( uno::Reference< ov::excel::XCharacters >( new ScVbaCharacters( this, mxContext, aPalette, xSimpleText, aStart, aLength, true ) ) ); } OUString diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx index 21fe9fba1079..550be00607fe 100644 --- a/sc/source/ui/vba/vbatitle.hxx +++ b/sc/source/ui/vba/vbatitle.hxx @@ -65,7 +65,7 @@ public: { try { - xShapePropertySet->setPropertyValue("String", css::uno::makeAny( Text )); + xShapePropertySet->setPropertyValue("String", css::uno::Any( Text )); } catch ( css::uno::Exception& ) { @@ -106,7 +106,7 @@ public: { try { - xShapePropertySet->setPropertyValue("TextRotation", css::uno::makeAny(_nOrientation*100)); + xShapePropertySet->setPropertyValue("TextRotation", css::uno::Any(_nOrientation*100)); } catch (css::uno::Exception& ) { diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx index 65d6f985c343..a30b43fe734a 100644 --- a/sc/source/ui/vba/vbavalidation.cxx +++ b/sc/source/ui/vba/vbavalidation.cxx @@ -39,7 +39,7 @@ static void lcl_setValidationProps( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< beans::XPropertySet >& xProps ) { uno::Reference< beans::XPropertySet > xRangeProps( xRange, uno::UNO_QUERY_THROW ); - xRangeProps->setPropertyValue( SC_UNONAME_VALIDAT , uno::makeAny( xProps ) ); + xRangeProps->setPropertyValue( SC_UNONAME_VALIDAT , uno::Any( xProps ) ); } static uno::Reference< beans::XPropertySet > @@ -64,7 +64,7 @@ void SAL_CALL ScVbaValidation::setIgnoreBlank( sal_Bool _ignoreblank ) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - xProps->setPropertyValue( SC_UNONAME_IGNOREBL, uno::makeAny( _ignoreblank ) ); + xProps->setPropertyValue( SC_UNONAME_IGNOREBL, uno::Any( _ignoreblank ) ); lcl_setValidationProps( m_xRange, xProps ); } @@ -84,7 +84,7 @@ ScVbaValidation::setInCellDropdown( sal_Bool _incelldropdown ) if ( _incelldropdown ) nDropDown = 1; uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps(m_xRange) ); - xProps->setPropertyValue( SC_UNONAME_SHOWLIST, uno::makeAny( nDropDown ) ); + xProps->setPropertyValue( SC_UNONAME_SHOWLIST, uno::Any( nDropDown ) ); lcl_setValidationProps( m_xRange, xProps ); } @@ -101,7 +101,7 @@ void SAL_CALL ScVbaValidation:: setShowInput( sal_Bool _showinput ) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps(m_xRange) ); - xProps->setPropertyValue( SC_UNONAME_IGNOREBL, uno::makeAny( _showinput ) ); + xProps->setPropertyValue( SC_UNONAME_IGNOREBL, uno::Any( _showinput ) ); lcl_setValidationProps( m_xRange, xProps ); } @@ -118,7 +118,7 @@ void SAL_CALL ScVbaValidation::setShowError( sal_Bool _showerror ) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - xProps->setPropertyValue( SC_UNONAME_SHOWERR, uno::makeAny( _showerror ) ); + xProps->setPropertyValue( SC_UNONAME_SHOWERR, uno::Any( _showerror ) ); lcl_setValidationProps( m_xRange, xProps ); } @@ -135,7 +135,7 @@ void ScVbaValidation::setErrorTitle( const OUString& _errormessage ) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - xProps->setPropertyValue( SC_UNONAME_ERRTITLE, uno::makeAny( _errormessage ) ); + xProps->setPropertyValue( SC_UNONAME_ERRTITLE, uno::Any( _errormessage ) ); lcl_setValidationProps( m_xRange, xProps ); } @@ -152,7 +152,7 @@ void SAL_CALL ScVbaValidation::setInputMessage( const OUString& _inputmessage ) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - xProps->setPropertyValue( SC_UNONAME_INPMESS, uno::makeAny( _inputmessage ) ); + xProps->setPropertyValue( SC_UNONAME_INPMESS, uno::Any( _inputmessage ) ); lcl_setValidationProps( m_xRange, xProps ); } @@ -169,7 +169,7 @@ void SAL_CALL ScVbaValidation::setInputTitle( const OUString& _inputtitle ) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - xProps->setPropertyValue( SC_UNONAME_INPTITLE, uno::makeAny( _inputtitle ) ); + xProps->setPropertyValue( SC_UNONAME_INPTITLE, uno::Any( _inputtitle ) ); lcl_setValidationProps( m_xRange, xProps ); } @@ -186,7 +186,7 @@ void SAL_CALL ScVbaValidation::setErrorMessage( const OUString& _errormessage ) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - xProps->setPropertyValue( SC_UNONAME_ERRMESS, uno::makeAny( _errormessage ) ); + xProps->setPropertyValue( SC_UNONAME_ERRMESS, uno::Any( _errormessage ) ); lcl_setValidationProps( m_xRange, xProps ); } @@ -196,13 +196,13 @@ ScVbaValidation::Delete( ) OUString sBlank; uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); uno::Reference< sheet::XSheetCondition > xCond( xProps, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue( SC_UNONAME_IGNOREBL, uno::makeAny( true ) ); - xProps->setPropertyValue( SC_UNONAME_SHOWINP, uno::makeAny( true ) ); - xProps->setPropertyValue( SC_UNONAME_SHOWERR, uno::makeAny( true ) ); - xProps->setPropertyValue( SC_UNONAME_ERRTITLE, uno::makeAny( sBlank ) ); - xProps->setPropertyValue( SC_UNONAME_INPMESS, uno::makeAny( sBlank) ); - xProps->setPropertyValue( SC_UNONAME_ERRALSTY, uno::makeAny( sheet::ValidationAlertStyle_STOP) ); - xProps->setPropertyValue( SC_UNONAME_TYPE, uno::makeAny( sheet::ValidationType_ANY ) ); + xProps->setPropertyValue( SC_UNONAME_IGNOREBL, uno::Any( true ) ); + xProps->setPropertyValue( SC_UNONAME_SHOWINP, uno::Any( true ) ); + xProps->setPropertyValue( SC_UNONAME_SHOWERR, uno::Any( true ) ); + xProps->setPropertyValue( SC_UNONAME_ERRTITLE, uno::Any( sBlank ) ); + xProps->setPropertyValue( SC_UNONAME_INPMESS, uno::Any( sBlank) ); + xProps->setPropertyValue( SC_UNONAME_ERRALSTY, uno::Any( sheet::ValidationAlertStyle_STOP) ); + xProps->setPropertyValue( SC_UNONAME_TYPE, uno::Any( sheet::ValidationType_ANY ) ); xCond->setFormula1( sBlank ); xCond->setFormula2( sBlank ); xCond->setOperator( sheet::ConditionOperator_NONE ); @@ -239,14 +239,14 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un if ( !Formula1.hasValue() ) throw uno::RuntimeException("missing param" ); nValType = sheet::ValidationType_LIST; - xProps->setPropertyValue( SC_UNONAME_TYPE, uno::makeAny(nValType )); + xProps->setPropertyValue( SC_UNONAME_TYPE, uno::Any(nValType )); // #TODO validate required params // #TODO need to correct the ';' delimited formula on get/set break; } case excel::XlDVType::xlValidateWholeNumber: nValType = sheet::ValidationType_WHOLE; - xProps->setPropertyValue( SC_UNONAME_TYPE, uno::makeAny(nValType )); + xProps->setPropertyValue( SC_UNONAME_TYPE, uno::Any(nValType )); break; default: throw uno::RuntimeException("unsupported operation..." ); @@ -275,7 +275,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un } } - xProps->setPropertyValue( SC_UNONAME_ERRALSTY, uno::makeAny( eStyle ) ); + xProps->setPropertyValue( SC_UNONAME_ERRALSTY, uno::Any( eStyle ) ); // i#108860: fix the defect that validation cannot work when the input // should be limited between a lower bound and an upper bound diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 4bb77c5d8971..3e7cc4f5676f 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -89,7 +89,7 @@ public: throw container::NoSuchElementException(); } // #FIXME needs ThisWorkbook as parent - return uno::makeAny( uno::Reference< excel::XWorksheet > ( new ScVbaWorksheet( uno::Reference< XHelperInterface >(), m_xContext, *(m_it++), m_xModel ) ) ); + return uno::Any( uno::Reference< excel::XWorksheet > ( new ScVbaWorksheet( uno::Reference< XHelperInterface >(), m_xContext, *(m_it++), m_xModel ) ) ); } }; @@ -147,7 +147,7 @@ public: || o3tl::make_unsigned( Index ) >= sheets.size() ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny( sheets[ Index ] ); + return uno::Any( sheets[ Index ] ); } //XElementAccess @@ -167,7 +167,7 @@ public: NameIndexHash::const_iterator it = namesToIndices.find( aName ); if ( it == namesToIndices.end() ) throw container::NoSuchElementException(); - return uno::makeAny( sheets[ it->second ] ); + return uno::Any( sheets[ it->second ] ); } @@ -276,7 +276,7 @@ ScVbaWindow::SelectedSheets( const uno::Any& aIndex ) uno::Reference< XCollection > xColl( xSheets, uno::UNO_QUERY_THROW ); return xColl->Item( aIndex, uno::Any() ); } - return uno::makeAny( xSheets ); + return uno::Any( xSheets ); } void SAL_CALL @@ -305,7 +305,7 @@ ScVbaWindow::getCaption() // tdf#118129 - return only the caption property of the frame OUString sTitle; getFrameProps()->getPropertyValue(SC_UNONAME_TITLE) >>= sTitle; - return uno::makeAny( sTitle ); + return uno::Any( sTitle ); } void SAL_CALL @@ -326,7 +326,7 @@ ScVbaWindow::getScrollRow() nValue = pViewShell->GetViewData().GetPosY(WhichV(eWhich)); } - return uno::makeAny( nValue + 1); + return uno::Any( nValue + 1); } void SAL_CALL @@ -356,7 +356,7 @@ ScVbaWindow::getScrollColumn() nValue = pViewShell->GetViewData().GetPosX(WhichH(eWhich)); } - return uno::makeAny( nValue + 1); + return uno::Any( nValue + 1); } void SAL_CALL @@ -389,7 +389,7 @@ ScVbaWindow::getWindowState() else if (pWork -> IsMinimized()) nwindowState = xlMinimized; } - return uno::makeAny( nwindowState ); + return uno::Any( nwindowState ); } void SAL_CALL @@ -469,7 +469,7 @@ ScVbaWindow::getDisplayGridlines() void SAL_CALL ScVbaWindow::setDisplayGridlines( sal_Bool _displaygridlines ) { - getControllerProps()->setPropertyValue( SC_UNO_SHOWGRID, uno::makeAny( _displaygridlines )); + getControllerProps()->setPropertyValue( SC_UNO_SHOWGRID, uno::Any( _displaygridlines )); } sal_Bool SAL_CALL @@ -483,7 +483,7 @@ ScVbaWindow::getDisplayHeadings() void SAL_CALL ScVbaWindow::setDisplayHeadings( sal_Bool _bDisplayHeadings ) { - getControllerProps()->setPropertyValue( SC_UNO_COLROWHDR, uno::makeAny( _bDisplayHeadings )); + getControllerProps()->setPropertyValue( SC_UNO_COLROWHDR, uno::Any( _bDisplayHeadings )); } sal_Bool SAL_CALL @@ -497,7 +497,7 @@ ScVbaWindow::getDisplayHorizontalScrollBar() void SAL_CALL ScVbaWindow::setDisplayHorizontalScrollBar( sal_Bool _bDisplayHorizontalScrollBar ) { - getControllerProps()->setPropertyValue( SC_UNO_HORSCROLL, uno::makeAny( _bDisplayHorizontalScrollBar )); + getControllerProps()->setPropertyValue( SC_UNO_HORSCROLL, uno::Any( _bDisplayHorizontalScrollBar )); } sal_Bool SAL_CALL @@ -511,7 +511,7 @@ ScVbaWindow::getDisplayOutline() void SAL_CALL ScVbaWindow::setDisplayOutline( sal_Bool _bDisplayOutline ) { - getControllerProps()->setPropertyValue( SC_UNO_OUTLSYMB, uno::makeAny( _bDisplayOutline )); + getControllerProps()->setPropertyValue( SC_UNO_OUTLSYMB, uno::Any( _bDisplayOutline )); } sal_Bool SAL_CALL @@ -525,7 +525,7 @@ ScVbaWindow::getDisplayVerticalScrollBar() void SAL_CALL ScVbaWindow::setDisplayVerticalScrollBar( sal_Bool _bDisplayVerticalScrollBar ) { - getControllerProps()->setPropertyValue( SC_UNO_VERTSCROLL, uno::makeAny( _bDisplayVerticalScrollBar )); + getControllerProps()->setPropertyValue( SC_UNO_VERTSCROLL, uno::Any( _bDisplayVerticalScrollBar )); } sal_Bool SAL_CALL @@ -539,7 +539,7 @@ ScVbaWindow::getDisplayWorkbookTabs() void SAL_CALL ScVbaWindow::setDisplayWorkbookTabs( sal_Bool _bDisplayWorkbookTabs ) { - getControllerProps()->setPropertyValue( SC_UNO_SHEETTABS, uno::makeAny( _bDisplayWorkbookTabs )); + getControllerProps()->setPropertyValue( SC_UNO_SHEETTABS, uno::Any( _bDisplayWorkbookTabs )); } sal_Bool SAL_CALL @@ -690,7 +690,7 @@ void ScVbaWindow::SplitAtDefinedPosition( sal_Int32 nColumns, sal_Int32 nRows ) uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW ); uno::Reference< excel::XWorksheet > xSheet( xApplication->getActiveSheet(), uno::UNO_SET_THROW ); - xSheet->Cells(uno::makeAny(cellRow), uno::makeAny(cellColumn))->Select(); + xSheet->Cells(uno::Any(cellRow), uno::Any(cellColumn))->Select(); //pViewShell->FreezeSplitters( FALSE ); dispatchExecute( pViewShell, SID_WINDOW_SPLIT ); @@ -706,14 +706,14 @@ ScVbaWindow::getZoom() xProps->getPropertyValue( sName ) >>= nZoomType; if( nZoomType == view::DocumentZoomType::PAGE_WIDTH ) { - return uno::makeAny( true ); + return uno::Any( true ); } else if( nZoomType == view::DocumentZoomType::BY_VALUE ) { sName = SC_UNO_ZOOMVALUE; sal_Int16 nZoom = 100; xProps->getPropertyValue( sName ) >>= nZoom; - return uno::makeAny( nZoom ); + return uno::Any( nZoom ); } return uno::Any(); } @@ -753,7 +753,7 @@ ScVbaWindow::getView() else nWindowView = excel::XlWindowView::xlNormalView; - return uno::makeAny( nWindowView ); + return uno::Any( nWindowView ); } void SAL_CALL diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index 9108913df41b..3a99603782a1 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -48,7 +48,7 @@ static uno::Any ComponentToWindow( const uno::Any& aSource, const uno::Reference // !! TODO !! iterate over all controllers uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW ); uno::Reference< excel::XWindow > xWin( new ScVbaWindow( lcl_createWorkbookHIParent( xModel, xContext, aApplication ), xContext, xModel, xController ) ); - return uno::makeAny( xWin ); + return uno::Any( xWin ); } typedef std::vector < uno::Reference< sheet::XSpreadsheetDocument > > Components; @@ -96,7 +96,7 @@ public: { throw container::NoSuchElementException(); } - return makeAny( *(m_it++) ); + return css::uno::Any( *(m_it++) ); } }; @@ -164,7 +164,7 @@ public: if ( Index < 0 || o3tl::make_unsigned( Index ) >= m_windows.size() ) throw lang::IndexOutOfBoundsException(); - return makeAny( m_windows[ Index ] ); // returns xspreadsheetdoc + return css::uno::Any( m_windows[ Index ] ); // returns xspreadsheetdoc } //XElementAccess @@ -184,7 +184,7 @@ public: NameIndexHash::const_iterator it = namesToIndices.find( aName ); if ( it == namesToIndices.end() ) throw container::NoSuchElementException(); - return makeAny( m_windows[ it->second ] ); + return css::uno::Any( m_windows[ it->second ] ); } diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx index 3818689b9a9e..23cc523a1aa8 100644 --- a/sc/source/ui/vba/vbaworkbook.cxx +++ b/sc/source/ui/vba/vbaworkbook.cxx @@ -361,7 +361,7 @@ ScVbaWorkbook::Styles( const uno::Any& Item ) uno::Reference< XCollection > dStyles = new ScVbaStyles( uno::Reference< XHelperInterface >(), mxContext, getModel() ); if ( Item.hasValue() ) return dStyles->Item( Item, uno::Any() ); - return uno::makeAny( dStyles ); + return uno::Any( dStyles ); } uno::Any SAL_CALL diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index 1cdc1c111b97..c5128442799d 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -240,7 +240,7 @@ ScVbaWorksheet::createSheetCopy(uno::Reference<excel::XWorksheet> const & xSheet } // return new sheet uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW ); - uno::Reference< excel::XWorksheet > xNewSheet( xApplication->Worksheets( uno::makeAny( aSheetName ) ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XWorksheet > xNewSheet( xApplication->Worksheets( uno::Any( aSheetName ) ), uno::UNO_QUERY_THROW ); return xNewSheet; } @@ -433,7 +433,7 @@ ScVbaWorksheet::HPageBreaks( const uno::Any& aIndex ) uno::Reference< excel::XHPageBreaks > xHPageBreaks( new ScVbaHPageBreaks( this, mxContext, xSheetPageBreak)); if ( aIndex.hasValue() ) return xHPageBreaks->Item( aIndex, uno::Any()); - return uno::makeAny( xHPageBreaks ); + return uno::Any( xHPageBreaks ); } uno::Any @@ -443,7 +443,7 @@ ScVbaWorksheet::VPageBreaks( const uno::Any& aIndex ) uno::Reference< excel::XVPageBreaks > xVPageBreaks( new ScVbaVPageBreaks( this, mxContext, xSheetPageBreak ) ); if( aIndex.hasValue() ) return xVPageBreaks->Item( aIndex, uno::Any()); - return uno::makeAny( xVPageBreaks ); + return uno::Any( xVPageBreaks ); } sal_Int32 @@ -705,7 +705,7 @@ ScVbaWorksheet::ChartObjects( const uno::Any& Index ) return xColl->Item( Index, uno::Any() ); } else - return uno::makeAny( mxCharts ); + return uno::Any( mxCharts ); } @@ -719,7 +719,7 @@ ScVbaWorksheet::PivotTables( const uno::Any& Index ) uno::Reference< XCollection > xColl( new ScVbaPivotTables( this, mxContext, xIndexAccess ) ); if ( Index.hasValue() ) return xColl->Item( Index, uno::Any() ); - return uno::makeAny( xColl ); + return uno::Any( xColl ); } uno::Any SAL_CALL @@ -732,7 +732,7 @@ ScVbaWorksheet::Comments( const uno::Any& Index ) uno::Reference< XCollection > xColl( new ScVbaComments( this, mxContext, mxModel, xIndexAccess ) ); if ( Index.hasValue() ) return xColl->Item( Index, uno::Any() ); - return uno::makeAny( xColl ); + return uno::Any( xColl ); } uno::Any SAL_CALL @@ -783,7 +783,7 @@ ScVbaWorksheet::Shapes( const uno::Any& aIndex ) uno::Reference< msforms::XShapes> xVbaShapes( new ScVbaShapes( this, mxContext, xIndexAccess, getModel() ) ); if ( aIndex.hasValue() ) return xVbaShapes->Item( aIndex, uno::Any() ); - return uno::makeAny( xVbaShapes ); + return uno::Any( xVbaShapes ); } uno::Any @@ -903,7 +903,7 @@ ScVbaWorksheet::getValue( const OUString& aPropertyName ) uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW ); uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext("ooo.vba.ControlProvider", mxContext ), uno::UNO_QUERY_THROW ); uno::Reference< msforms::XControl > xControl( xControlProvider->createControl( xControlShape, getModel() ) ); - return uno::makeAny( xControl ); + return uno::Any( xControl ); } sal_Bool SAL_CALL diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index f1231cabf4ea..5df1bc622a24 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -66,7 +66,7 @@ public: if ( !hasMoreElements() ) throw container::NoSuchElementException(); uno::Reference< sheet::XSpreadsheet > xSheet( *mIt++ ); - return uno::makeAny( xSheet ) ; + return uno::Any( xSheet ) ; } }; @@ -86,7 +86,7 @@ public: { if ( !hasByName(aName) ) throw container::NoSuchElementException(); - return uno::makeAny( *cachePos ); + return uno::Any( *cachePos ); } virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) override { @@ -121,7 +121,7 @@ public: if ( Index < 0 || Index >= getCount() ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny( mSheetMap[ Index ] ); + return uno::Any( mSheetMap[ Index ] ); } // XEnumerationAccess @@ -289,7 +289,7 @@ ScVbaWorksheets::Delete() sal_Int32 nElems = getCount(); for ( sal_Int32 nItem = 1; nItem <= nElems; ++nItem ) { - uno::Reference< excel::XWorksheet > xSheet( Item( uno::makeAny( nItem ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XWorksheet > xSheet( Item( uno::Any( nItem ), uno::Any() ), uno::UNO_QUERY_THROW ); xSheet->Delete(); } } @@ -330,7 +330,7 @@ ScVbaWorksheets::getVisible() break; } } - return uno::makeAny( bVisible ); + return uno::Any( bVisible ); } void SAL_CALL @@ -366,7 +366,7 @@ ScVbaWorksheets::Select( const uno::Any& Replace ) sal_Int32 nElems = getCount(); for ( sal_Int32 nItem = 1; nItem <= nElems; ++nItem ) { - uno::Reference< excel::XWorksheet > xSheet( Item( uno::makeAny( nItem ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XWorksheet > xSheet( Item( uno::Any( nItem ), uno::Any() ), uno::UNO_QUERY_THROW ); ScVbaWorksheet* pSheet = excel::getImplFromDocModuleWrapper<ScVbaWorksheet>( xSheet ); if ( bSelectSingle ) { @@ -390,7 +390,7 @@ ScVbaWorksheets::Copy ( const uno::Any& Before, const uno::Any& After) for ( nItem = 1; nItem <= nElems; ++nItem) { - uno::Reference<excel::XWorksheet> xWorksheet(Item( uno::makeAny( nItem ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference<excel::XWorksheet> xWorksheet(Item( uno::Any( nItem ), uno::Any() ), uno::UNO_QUERY_THROW ); Sheets.push_back(xWorksheet); } bool bNewDoc = (!(Before >>= xSheet) && !(After >>=xSheet)&& !(Before.hasValue()) && !(After.hasValue())); @@ -441,7 +441,7 @@ ScVbaWorksheets::Item(const uno::Any& Index, const uno::Any& Index2) } uno::Reference< container::XIndexAccess > xIndexAccess = new SheetCollectionHelper( std::move(aSheets) ); uno::Reference< XCollection > xSelectedSheets( new ScVbaWorksheets( getParent(), mxContext, xIndexAccess, mxModel ) ); - return uno::makeAny( xSelectedSheets ); + return uno::Any( xSelectedSheets ); } return ScVbaWorksheets_BASE::Item( Index, Index2 ); } @@ -510,7 +510,7 @@ void ScVbaWorksheets::PrintPreview( const css::uno::Any& /*EnableChanges*/ ) sal_Int32 nElems = getCount(); for ( sal_Int32 nItem = 1; nItem <= nElems; ++nItem ) { - uno::Reference< excel::XWorksheet > xSheet( Item( uno::makeAny( nItem ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XWorksheet > xSheet( Item( uno::Any( nItem ), uno::Any() ), uno::UNO_QUERY_THROW ); ScVbaWorksheet* pSheet = excel::getImplFromDocModuleWrapper<ScVbaWorksheet>( xSheet ); if ( pSheet ) aMarkData.SelectTable(static_cast< SCTAB >( pSheet->getSheetID() ), true ); diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 1ca4c7ba7809..516aa04f5477 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -615,7 +615,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, aInsDoc.ResetClip( &rDoc, nSrcTab ); SfxMedium aMed; - aMed.GetItemSet()->Put( SfxUnoAnyItem( SID_INPUTSTREAM, uno::makeAny( xStm ) ) ); + aMed.GetItemSet()->Put( SfxUnoAnyItem( SID_INPUTSTREAM, uno::Any( xStm ) ) ); ErrCode eErr = ScFormatFilter::Get().ScImportExcel( aMed, &aInsDoc, EIF_AUTO ); if ( eErr == ERRCODE_NONE ) { |