sc/inc/miscuno.hxx | 2 sc/qa/extras/scautoformatsobj.cxx | 7 sc/qa/extras/scdatapilotfieldgroupitemobj.cxx | 10 - sc/qa/extras/scdatapilotfieldgroupobj.cxx | 10 - sc/qa/extras/scdatapilotfieldgroupsobj.cxx | 10 - sc/qa/extras/scdatapilotitemobj.cxx | 4 sc/qa/extras/scdatapilotitemsobj.cxx | 5 sc/qa/extras/sceditfieldobj-cell.cxx | 4 sc/qa/extras/sceditfieldobj-header.cxx | 2 sc/qa/extras/scheaderfieldsobj.cxx | 2 sc/qa/extras/scpdfexport.cxx | 2 sc/qa/extras/scstylefamilyobj.cxx | 6 sc/qa/extras/scstyleobj.cxx | 4 sc/qa/extras/sctablesheetsobj.cxx | 5 sc/qa/unit/helper/qahelper.cxx | 2 sc/qa/unit/uicalc/uicalc.cxx | 12 - sc/source/core/data/documen5.cxx | 8 sc/source/core/tool/charthelper.cxx | 4 sc/source/core/tool/interpr4.cxx | 2 sc/source/filter/excel/excel.cxx | 8 sc/source/filter/excel/excimp8.cxx | 2 sc/source/filter/excel/xiescher.cxx | 6 sc/source/filter/excel/xistyle.cxx | 4 sc/source/filter/excel/xlchart.cxx | 2 sc/source/filter/excel/xltoolbar.cxx | 6 sc/source/filter/ftools/fapihelper.cxx | 2 sc/source/filter/inc/fapihelper.hxx | 2 sc/source/filter/xml/XMLCalculationSettingsContext.cxx | 20 +- sc/source/filter/xml/XMLTableHeaderFooterContext.cxx | 10 - sc/source/filter/xml/XMLTableShapeImportHelper.cxx | 2 sc/source/filter/xml/xmlcoli.cxx | 2 sc/source/filter/xml/xmlexprt.cxx | 6 sc/source/filter/xml/xmlimprt.cxx | 12 - sc/source/filter/xml/xmlrowi.cxx | 2 sc/source/filter/xml/xmlstyli.cxx | 8 sc/source/filter/xml/xmlwrap.cxx | 80 ++++---- sc/source/ui/Accessibility/AccessibleDocument.cxx | 6 sc/source/ui/docshell/dbdocimp.cxx | 2 sc/source/ui/docshell/docsh.cxx | 2 sc/source/ui/docshell/docsh8.cxx | 2 sc/source/ui/docshell/tablink.cxx | 2 sc/source/ui/drawfunc/fuins2.cxx | 12 - sc/source/ui/formdlg/formula.cxx | 2 sc/source/ui/unoobj/TablePivotCharts.cxx | 10 - sc/source/ui/unoobj/afmtuno.cxx | 6 sc/source/ui/unoobj/appluno.cxx | 4 sc/source/ui/unoobj/cellsuno.cxx | 14 - sc/source/ui/unoobj/cellvaluebinding.cxx | 2 sc/source/ui/unoobj/chart2uno.cxx | 12 - sc/source/ui/unoobj/chartuno.cxx | 12 - sc/source/ui/unoobj/datauno.cxx | 8 sc/source/ui/unoobj/docuno.cxx | 20 +- sc/source/ui/unoobj/fielduno.cxx | 40 ++-- sc/source/ui/unoobj/fmtuno.cxx | 4 sc/source/ui/unoobj/linkuno.cxx | 10 - sc/source/ui/unoobj/nameuno.cxx | 6 sc/source/ui/unoobj/styleuno.cxx | 8 sc/source/ui/unoobj/targuno.cxx | 4 sc/source/ui/unoobj/viewuno.cxx | 6 sc/source/ui/vba/excelvbahelper.cxx | 4 sc/source/ui/vba/vbaapplication.cxx | 44 ++-- sc/source/ui/vba/vbaaxes.cxx | 4 sc/source/ui/vba/vbaaxis.cxx | 32 +-- sc/source/ui/vba/vbaborders.cxx | 30 +-- sc/source/ui/vba/vbachart.cxx | 56 ++--- sc/source/ui/vba/vbachartobject.cxx | 2 sc/source/ui/vba/vbachartobjects.cxx | 4 sc/source/ui/vba/vbacomment.cxx | 2 sc/source/ui/vba/vbacomments.cxx | 2 sc/source/ui/vba/vbafiledialog.cxx | 6 sc/source/ui/vba/vbafiledialogitems.cxx | 6 sc/source/ui/vba/vbafont.cxx | 12 - sc/source/ui/vba/vbaformat.cxx | 18 - sc/source/ui/vba/vbaformat.hxx | 2 sc/source/ui/vba/vbaformatcondition.cxx | 2 sc/source/ui/vba/vbaformatconditions.cxx | 10 - sc/source/ui/vba/vbainterior.cxx | 32 +-- sc/source/ui/vba/vbamenu.cxx | 2 sc/source/ui/vba/vbamenubar.cxx | 2 sc/source/ui/vba/vbamenubars.cxx | 4 sc/source/ui/vba/vbamenuitems.cxx | 10 - sc/source/ui/vba/vbamenus.cxx | 6 sc/source/ui/vba/vbanames.cxx | 10 - sc/source/ui/vba/vbaoleobjects.cxx | 6 sc/source/ui/vba/vbapagebreak.cxx | 6 sc/source/ui/vba/vbapagebreaks.cxx | 10 - sc/source/ui/vba/vbapagesetup.cxx | 34 +-- sc/source/ui/vba/vbapalette.cxx | 2 sc/source/ui/vba/vbapivottables.cxx | 2 sc/source/ui/vba/vbarange.cxx | 166 ++++++++--------- sc/source/ui/vba/vbastyle.cxx | 2 sc/source/ui/vba/vbastyles.cxx | 6 sc/source/ui/vba/vbatextframe.cxx | 2 sc/source/ui/vba/vbatitle.hxx | 4 sc/source/ui/vba/vbavalidation.cxx | 38 +-- sc/source/ui/vba/vbawindow.cxx | 36 +-- sc/source/ui/vba/vbawindows.cxx | 8 sc/source/ui/vba/vbaworkbook.cxx | 2 sc/source/ui/vba/vbaworksheet.cxx | 16 - sc/source/ui/vba/vbaworksheets.cxx | 18 - sc/source/ui/view/viewfun5.cxx | 2 101 files changed, 560 insertions(+), 571 deletions(-)
New commits: commit 6cd4194e05233e8d1ddb59ffb9703778668b3f1b Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue May 3 23:26:42 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed May 4 08:09:59 2022 +0200 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 <sberg...@redhat.com> diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx index 67062c84543d..b0e28cf66aa4 100644 --- a/sc/inc/miscuno.hxx +++ b/sc/inc/miscuno.hxx @@ -85,7 +85,7 @@ css::uno::Sequence< OUString > #define SC_QUERYINTERFACE(x) \ if (rType == cppu::UnoType<x>::get()) \ - { return uno::makeAny(uno::Reference<x>(this)); } + { return uno::Any(uno::Reference<x>(this)); } // SC_QUERY_MULTIPLE( XElementAccess, XIndexAccess ): // use if interface is used several times in one class diff --git a/sc/qa/extras/scautoformatsobj.cxx b/sc/qa/extras/scautoformatsobj.cxx index ed799c018ef4..a51bd76ab9af 100644 --- a/sc/qa/extras/scautoformatsobj.cxx +++ b/sc/qa/extras/scautoformatsobj.cxx @@ -106,14 +106,13 @@ uno::Reference<uno::XInterface> ScAutoFormatsObj::init() if (!xNC->hasByName("ScAutoFormatsObj")) { xNC->insertByName("ScAutoFormatsObj", - uno::makeAny(xMSF->createInstance("com.sun.star.sheet.TableAutoFormat"))); + uno::Any(xMSF->createInstance("com.sun.star.sheet.TableAutoFormat"))); } // XNameContainer XNameContainer::setElement( - uno::makeAny(xMSF->createInstance("com.sun.star.sheet.TableAutoFormat"))); + uno::Any(xMSF->createInstance("com.sun.star.sheet.TableAutoFormat"))); // XNameReplace - XNameReplace::setElement( - uno::makeAny(xMSF->createInstance("com.sun.star.sheet.TableAutoFormat"))); + XNameReplace::setElement(uno::Any(xMSF->createInstance("com.sun.star.sheet.TableAutoFormat"))); return xTAF; } diff --git a/sc/qa/extras/scdatapilotfieldgroupitemobj.cxx b/sc/qa/extras/scdatapilotfieldgroupitemobj.cxx index 6e0716020957..8b31050d729d 100644 --- a/sc/qa/extras/scdatapilotfieldgroupitemobj.cxx +++ b/sc/qa/extras/scdatapilotfieldgroupitemobj.cxx @@ -122,19 +122,17 @@ uno::Reference<uno::XInterface> ScDataPilotFieldGroupItemObj::init() uno::Reference<beans::XPropertySet> xPropertySet0(xDPD->getDataPilotFields()->getByIndex(0), uno::UNO_QUERY_THROW); - xPropertySet0->setPropertyValue("Orientation", - uno::makeAny(sheet::DataPilotFieldOrientation_ROW)); + xPropertySet0->setPropertyValue("Orientation", uno::Any(sheet::DataPilotFieldOrientation_ROW)); uno::Reference<beans::XPropertySet> xPropertySet1(xDPD->getDataPilotFields()->getByIndex(1), uno::UNO_QUERY_THROW); - xPropertySet1->setPropertyValue("Function", uno::makeAny(sheet::GeneralFunction_SUM)); - xPropertySet1->setPropertyValue("Orientation", - uno::makeAny(sheet::DataPilotFieldOrientation_DATA)); + xPropertySet1->setPropertyValue("Function", uno::Any(sheet::GeneralFunction_SUM)); + xPropertySet1->setPropertyValue("Orientation", uno::Any(sheet::DataPilotFieldOrientation_DATA)); uno::Reference<beans::XPropertySet> xPropertySet2(xDPD->getDataPilotFields()->getByIndex(2), uno::UNO_QUERY_THROW); xPropertySet2->setPropertyValue("Orientation", - uno::makeAny(sheet::DataPilotFieldOrientation_COLUMN)); + uno::Any(sheet::DataPilotFieldOrientation_COLUMN)); xDPT->insertNewByName("DataPilotTable", aCellAddress, xDPD); diff --git a/sc/qa/extras/scdatapilotfieldgroupobj.cxx b/sc/qa/extras/scdatapilotfieldgroupobj.cxx index f908dd160c6b..c7b73da5772b 100644 --- a/sc/qa/extras/scdatapilotfieldgroupobj.cxx +++ b/sc/qa/extras/scdatapilotfieldgroupobj.cxx @@ -148,19 +148,17 @@ uno::Reference<uno::XInterface> ScDataPilotFieldGroupObj::init() uno::Reference<beans::XPropertySet> xPropertySet0(xDPD->getDataPilotFields()->getByIndex(0), uno::UNO_QUERY_THROW); - xPropertySet0->setPropertyValue("Orientation", - uno::makeAny(sheet::DataPilotFieldOrientation_ROW)); + xPropertySet0->setPropertyValue("Orientation", uno::Any(sheet::DataPilotFieldOrientation_ROW)); uno::Reference<beans::XPropertySet> xPropertySet1(xDPD->getDataPilotFields()->getByIndex(1), uno::UNO_QUERY_THROW); - xPropertySet1->setPropertyValue("Function", uno::makeAny(sheet::GeneralFunction_SUM)); - xPropertySet1->setPropertyValue("Orientation", - uno::makeAny(sheet::DataPilotFieldOrientation_DATA)); + xPropertySet1->setPropertyValue("Function", uno::Any(sheet::GeneralFunction_SUM)); + xPropertySet1->setPropertyValue("Orientation", uno::Any(sheet::DataPilotFieldOrientation_DATA)); uno::Reference<beans::XPropertySet> xPropertySet2(xDPD->getDataPilotFields()->getByIndex(2), uno::UNO_QUERY_THROW); xPropertySet2->setPropertyValue("Orientation", - uno::makeAny(sheet::DataPilotFieldOrientation_COLUMN)); + uno::Any(sheet::DataPilotFieldOrientation_COLUMN)); xDPT->insertNewByName("DataPilotTable", aCellAddress, xDPD); diff --git a/sc/qa/extras/scdatapilotfieldgroupsobj.cxx b/sc/qa/extras/scdatapilotfieldgroupsobj.cxx index 36ca8fa32a3b..3b05bc0ded65 100644 --- a/sc/qa/extras/scdatapilotfieldgroupsobj.cxx +++ b/sc/qa/extras/scdatapilotfieldgroupsobj.cxx @@ -152,19 +152,17 @@ uno::Reference<uno::XInterface> ScDataPilotFieldGroupsObj::init() uno::Reference<beans::XPropertySet> xPropertySet0(xDPD->getDataPilotFields()->getByIndex(0), uno::UNO_QUERY_THROW); - xPropertySet0->setPropertyValue("Orientation", - uno::makeAny(sheet::DataPilotFieldOrientation_ROW)); + xPropertySet0->setPropertyValue("Orientation", uno::Any(sheet::DataPilotFieldOrientation_ROW)); uno::Reference<beans::XPropertySet> xPropertySet1(xDPD->getDataPilotFields()->getByIndex(1), uno::UNO_QUERY_THROW); - xPropertySet1->setPropertyValue("Function", uno::makeAny(sheet::GeneralFunction_SUM)); - xPropertySet1->setPropertyValue("Orientation", - uno::makeAny(sheet::DataPilotFieldOrientation_DATA)); + xPropertySet1->setPropertyValue("Function", uno::Any(sheet::GeneralFunction_SUM)); + xPropertySet1->setPropertyValue("Orientation", uno::Any(sheet::DataPilotFieldOrientation_DATA)); uno::Reference<beans::XPropertySet> xPropertySet2(xDPD->getDataPilotFields()->getByIndex(2), uno::UNO_QUERY_THROW); xPropertySet2->setPropertyValue("Orientation", - uno::makeAny(sheet::DataPilotFieldOrientation_COLUMN)); + uno::Any(sheet::DataPilotFieldOrientation_COLUMN)); xDPT->insertNewByName("DataPilotTable", aCellAddress, xDPD); diff --git a/sc/qa/extras/scdatapilotitemobj.cxx b/sc/qa/extras/scdatapilotitemobj.cxx index 217c28267c47..6abf684566bd 100644 --- a/sc/qa/extras/scdatapilotitemobj.cxx +++ b/sc/qa/extras/scdatapilotitemobj.cxx @@ -103,9 +103,9 @@ uno::Reference<uno::XInterface> ScDataPilotItemObj::init() uno::Reference<beans::XPropertySet> xDataPilotFieldProp( xDPD->getDataPilotFields()->getByIndex(0), uno::UNO_QUERY_THROW); - xDataPilotFieldProp->setPropertyValue("Function", uno::makeAny(sheet::GeneralFunction_SUM)); + xDataPilotFieldProp->setPropertyValue("Function", uno::Any(sheet::GeneralFunction_SUM)); xDataPilotFieldProp->setPropertyValue("Orientation", - uno::makeAny(sheet::DataPilotFieldOrientation_DATA)); + uno::Any(sheet::DataPilotFieldOrientation_DATA)); if (xDPT->hasByName("DataPilotTable")) xDPT->removeByName("DataPilotTable"); diff --git a/sc/qa/extras/scdatapilotitemsobj.cxx b/sc/qa/extras/scdatapilotitemsobj.cxx index dba8e9ac5100..c59e76a020b5 100644 --- a/sc/qa/extras/scdatapilotitemsobj.cxx +++ b/sc/qa/extras/scdatapilotitemsobj.cxx @@ -131,9 +131,8 @@ uno::Reference<uno::XInterface> ScDataPilotItemsObj::init() uno::Reference<beans::XPropertySet> xPropertySet(xDPD->getDataPilotFields()->getByIndex(1), uno::UNO_QUERY_THROW); - xPropertySet->setPropertyValue("Function", uno::makeAny(sheet::GeneralFunction_SUM)); - xPropertySet->setPropertyValue("Orientation", - uno::makeAny(sheet::DataPilotFieldOrientation_DATA)); + xPropertySet->setPropertyValue("Function", uno::Any(sheet::GeneralFunction_SUM)); + xPropertySet->setPropertyValue("Orientation", uno::Any(sheet::DataPilotFieldOrientation_DATA)); xDPT->insertNewByName("DataPilotTable", aCellAddress, xDPD); diff --git a/sc/qa/extras/sceditfieldobj-cell.cxx b/sc/qa/extras/sceditfieldobj-cell.cxx index b4efe8931e20..c01a40c47a81 100644 --- a/sc/qa/extras/sceditfieldobj-cell.cxx +++ b/sc/qa/extras/sceditfieldobj-cell.cxx @@ -119,8 +119,8 @@ uno::Reference<text::XTextField> getNewField(const uno::Reference<lang::XMultiSe uno::Reference<text::XTextField> xField(xSM->createInstance("com.sun.star.text.TextField.URL"), uno::UNO_QUERY_THROW); uno::Reference<beans::XPropertySet> xPropSet(xField, uno::UNO_QUERY_THROW); - xPropSet->setPropertyValue("Representation", uno::makeAny(OUString("LibreOffice"))); - xPropSet->setPropertyValue("URL", uno::makeAny(OUString("http://www.libreoffice.org/"))); + xPropSet->setPropertyValue("Representation", uno::Any(OUString("LibreOffice"))); + xPropSet->setPropertyValue("URL", uno::Any(OUString("http://www.libreoffice.org/"))); return xField; } diff --git a/sc/qa/extras/sceditfieldobj-header.cxx b/sc/qa/extras/sceditfieldobj-header.cxx index da4558a85826..6e8721ed7304 100644 --- a/sc/qa/extras/sceditfieldobj-header.cxx +++ b/sc/qa/extras/sceditfieldobj-header.cxx @@ -140,7 +140,7 @@ uno::Reference<uno::XInterface> ScEditFieldObj_Header::init() uno::Reference<text::XTextContent> xContent(mxField, uno::UNO_QUERY_THROW); xText->insertTextContent(xRange, xContent, false); - xPropSet->setPropertyValue("RightPageHeaderContent", uno::makeAny(xHeaderContent)); + xPropSet->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent)); mxRightText = xHeaderContent->getRightText(); } diff --git a/sc/qa/extras/scheaderfieldsobj.cxx b/sc/qa/extras/scheaderfieldsobj.cxx index a03e00329104..4333ef6a5061 100644 --- a/sc/qa/extras/scheaderfieldsobj.cxx +++ b/sc/qa/extras/scheaderfieldsobj.cxx @@ -92,7 +92,7 @@ uno::Reference<uno::XInterface> ScHeaderFieldsObj::init() uno::Reference<text::XTextContent> xTC(xMSF->createInstance("com.sun.star.text.TextField.Time"), uno::UNO_QUERY_THROW); m_xText->insertTextContent(m_xText->createTextCursor(), xTC, false); - xPropertySet->setPropertyValue("RightPageHeaderContent", uno::makeAny(xHFC)); + xPropertySet->setPropertyValue("RightPageHeaderContent", uno::Any(xHFC)); uno::Reference<text::XTextFieldsSupplier> xTFS(m_xText, uno::UNO_QUERY_THROW); return xTFS->getTextFields(); diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx index 93f6f763e211..63ed2120c985 100644 --- a/sc/qa/extras/scpdfexport.cxx +++ b/sc/qa/extras/scpdfexport.cxx @@ -204,7 +204,7 @@ std::shared_ptr<utl::TempFile> ScPDFExportTest::exportToPDFWithUnoCommands(const ::osl::FileBase::getFileURLFromSystemPath(sFileURL, sFileURL); uno::Sequence<beans::PropertyValue> aArgs - = comphelper::InitPropertySequence({ { "ToPoint", uno::makeAny(rRange) } }); + = comphelper::InitPropertySequence({ { "ToPoint", uno::Any(rRange) } }); dispatchCommand(mxComponent, ".uno:GoToCell", aArgs); dispatchCommand(mxComponent, ".uno:DefinePrintArea", {}); diff --git a/sc/qa/extras/scstylefamilyobj.cxx b/sc/qa/extras/scstylefamilyobj.cxx index 8597d22b0f71..c1edea68aef9 100644 --- a/sc/qa/extras/scstylefamilyobj.cxx +++ b/sc/qa/extras/scstylefamilyobj.cxx @@ -111,12 +111,12 @@ uno::Reference<uno::XInterface> ScStyleFamilyObj::init() uno::Reference<uno::XInterface> xCS(xMSF->createInstance("com.sun.star.style.CellStyle"), uno::UNO_SET_THROW); // XNameContainer - XNameContainer::setElement(uno::makeAny(xMSF->createInstance("com.sun.star.style.CellStyle"))); + XNameContainer::setElement(uno::Any(xMSF->createInstance("com.sun.star.style.CellStyle"))); // XNameReplace - XNameReplace::setElement(uno::makeAny(xMSF->createInstance("com.sun.star.style.CellStyle"))); + XNameReplace::setElement(uno::Any(xMSF->createInstance("com.sun.star.style.CellStyle"))); uno::Reference<container::XNameContainer> xNC(xNA_SF, uno::UNO_QUERY_THROW); - xNC->insertByName("ScStyleFamilyObj", uno::makeAny(xCS)); + xNC->insertByName("ScStyleFamilyObj", uno::Any(xCS)); return xNA_SF; } diff --git a/sc/qa/extras/scstyleobj.cxx b/sc/qa/extras/scstyleobj.cxx index 3ba41df3042f..bf69fafba64a 100644 --- a/sc/qa/extras/scstyleobj.cxx +++ b/sc/qa/extras/scstyleobj.cxx @@ -95,13 +95,13 @@ uno::Reference<uno::XInterface> ScStyleObj::init() { xNC->removeByName("ScStyleObj"); } - xNC->insertByName("ScStyleObj", uno::makeAny(xStyle)); + xNC->insertByName("ScStyleObj", uno::Any(xStyle)); uno::Reference<container::XIndexAccess> xIA_sheets(xDoc->getSheets(), uno::UNO_QUERY_THROW); uno::Reference<sheet::XSpreadsheet> xSheet0(xIA_sheets->getByIndex(0), uno::UNO_QUERY_THROW); uno::Reference<table::XCell> xCell = xSheet0->getCellByPosition(2, 3); uno::Reference<beans::XPropertySet> xPS(xCell, uno::UNO_QUERY_THROW); - xPS->setPropertyValue("CellStyle", uno::makeAny(xStyle->getName())); + xPS->setPropertyValue("CellStyle", uno::Any(xStyle->getName())); return xStyle; } diff --git a/sc/qa/extras/sctablesheetsobj.cxx b/sc/qa/extras/sctablesheetsobj.cxx index a8ffa36b2ed8..de30ec26bff0 100644 --- a/sc/qa/extras/sctablesheetsobj.cxx +++ b/sc/qa/extras/sctablesheetsobj.cxx @@ -142,10 +142,9 @@ uno::Reference<uno::XInterface> ScTableSheetsObj::init() uno::Reference<uno::XInterface> xReturn(xDocument->getSheets(), UNO_QUERY_THROW); uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY_THROW); - XNameContainer::setElement( - uno::makeAny(xMSF->createInstance("com.sun.star.sheet.Spreadsheet"))); + XNameContainer::setElement(uno::Any(xMSF->createInstance("com.sun.star.sheet.Spreadsheet"))); // XNameReplace - XNameReplace::setElement(uno::makeAny(xMSF->createInstance("com.sun.star.sheet.Spreadsheet"))); + XNameReplace::setElement(uno::Any(xMSF->createInstance("com.sun.star.sheet.Spreadsheet"))); return xReturn; } diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 5c386b2db684..9a5c5124cb08 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -778,7 +778,7 @@ ScDocShellRef ScBootstrapFixture::saveAndReload( { SfxItemSet* pExportSet = aStoreMedium.GetItemSet(); uno::Sequence< beans::NamedValue > aEncryptionData = comphelper::OStorageHelper::CreatePackageEncryptionData( *pPassword ); - pExportSet->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, makeAny(aEncryptionData))); + pExportSet->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, Any(aEncryptionData))); uno::Reference< embed::XStorage > xMedStorage = aStoreMedium.GetStorage(); ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( xMedStorage, aEncryptionData ); diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx index 46d891729a93..f1b49d15ac5a 100644 --- a/sc/qa/unit/uicalc/uicalc.cxx +++ b/sc/qa/unit/uicalc/uicalc.cxx @@ -105,7 +105,7 @@ static void lcl_SelectObjectByName(std::u16string_view rObjName) void ScUiCalcTest::goToCell(const OUString& rCell) { uno::Sequence<beans::PropertyValue> aArgs - = comphelper::InitPropertySequence({ { "ToPoint", uno::makeAny(rCell) } }); + = comphelper::InitPropertySequence({ { "ToPoint", uno::Any(rCell) } }); dispatchCommand(mxComponent, ".uno:GoToCell", aArgs); } @@ -464,7 +464,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf107869) // Add a new comment to A1 and A2 uno::Sequence<beans::PropertyValue> aArgs - = comphelper::InitPropertySequence({ { "Text", uno::makeAny(OUString("Comment")) } }); + = comphelper::InitPropertySequence({ { "Text", uno::Any(OUString("Comment")) } }); goToCell("A1"); dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs); @@ -1516,7 +1516,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteTransposed) // Add a note to A1 goToCell("A1"); uno::Sequence<beans::PropertyValue> aArgs - = comphelper::InitPropertySequence({ { "Text", uno::makeAny(OUString("Note in A1")) } }); + = comphelper::InitPropertySequence({ { "Text", uno::Any(OUString("Note in A1")) } }); dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs); // Set A2 bold @@ -1579,7 +1579,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testPasteAsLink) // Add a note to A1 goToCell("A1"); uno::Sequence<beans::PropertyValue> aArgs - = comphelper::InitPropertySequence({ { "Text", uno::makeAny(OUString("Note in A1")) } }); + = comphelper::InitPropertySequence({ { "Text", uno::Any(OUString("Note in A1")) } }); dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs); // Set A2 bold @@ -2282,7 +2282,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf124778) // Add a new comment uno::Sequence<beans::PropertyValue> aArgs - = comphelper::InitPropertySequence({ { "Text", uno::makeAny(OUString("Comment")) } }); + = comphelper::InitPropertySequence({ { "Text", uno::Any(OUString("Comment")) } }); dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs); Scheduler::ProcessEventsToIdle(); @@ -2312,7 +2312,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf138428) // Add a new comment uno::Sequence<beans::PropertyValue> aArgs - = comphelper::InitPropertySequence({ { "Text", uno::makeAny(OUString("Comment")) } }); + = comphelper::InitPropertySequence({ { "Text", uno::Any(OUString("Comment")) } }); dispatchCommand(mxComponent, ".uno:InsertAnnotation", aArgs); Scheduler::ProcessEventsToIdle(); diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index ba6bea3a6116..1c695244bda4 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -83,16 +83,16 @@ static void lcl_SetChartParameters( const uno::Reference< chart2::data::XDataRec uno::Sequence< beans::PropertyValue > aArgs{ beans::PropertyValue( "CellRangeRepresentation", -1, - uno::makeAny( rRanges ), beans::PropertyState_DIRECT_VALUE ), + uno::Any( rRanges ), 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 ) }; xReceiver->setArguments( aArgs ); } diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx index 8470c83d5b04..a59a61aad3ae 100644 --- a/sc/source/core/tool/charthelper.cxx +++ b/sc/source/core/tool/charthelper.cxx @@ -403,9 +403,9 @@ void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument& rDoc, co else { xProps->setPropertyValue("DisableDataTableDialog", - uno::makeAny( false ) ); + uno::Any( false ) ); xProps->setPropertyValue("DisableComplexChartTypes", - uno::makeAny( false ) ); + uno::Any( false ) ); } } } diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 9baa251b08ba..a104f3be34c4 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -3125,7 +3125,7 @@ static uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCe } } } - return uno::makeAny( xIf ); + return uno::Any( xIf ); } static bool lcl_setVBARange( const ScRange& aRange, const ScDocument& rDok, SbxVariable* pPar ) diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx index 33842ace8270..edc60721ace0 100644 --- a/sc/source/filter/excel/excel.cxx +++ b/sc/source/filter/excel/excel.cxx @@ -131,7 +131,7 @@ static tools::SvRef<SotStorage> lcl_DRMDecrypt(const SfxMedium& rMedium, const t // Set the media descriptor data uno::Sequence<beans::NamedValue> aEncryptionData = xPackageEncryption->createEncryptionData(""); - rMedium.GetItemSet()->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, uno::makeAny(aEncryptionData))); + rMedium.GetItemSet()->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, uno::Any(aEncryptionData))); } catch (const std::exception&) { @@ -266,7 +266,7 @@ static ErrCode lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument, { uno::Reference<uno::XComponentContext> xComponentContext(comphelper::getProcessComponentContext()); uno::Sequence<uno::Any> aArguments{ - uno::makeAny(beans::NamedValue("Binary", uno::makeAny(true))) }; + uno::Any(beans::NamedValue("Binary", uno::Any(true))) }; xPackageEncryption.set( xComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext( "com.sun.star.comp.oox.crypto." + sCryptoType, aArguments, xComponentContext), uno::UNO_QUERY); @@ -389,7 +389,7 @@ static ErrCode lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument, xEncryptedRootStrg->Commit(); // Restore encryption data - rMedium.GetItemSet()->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, uno::makeAny(aEncryptionData))); + rMedium.GetItemSet()->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, uno::Any(aEncryptionData))); } return eRet; @@ -445,7 +445,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportXLS(SvStream& rStream) ScDLL::Init(); SfxMedium aMedium; css::uno::Reference<css::io::XInputStream> xStm(new utl::OInputStreamWrapper(rStream)); - aMedium.GetItemSet()->Put(SfxUnoAnyItem(SID_INPUTSTREAM, css::uno::makeAny(xStm))); + aMedium.GetItemSet()->Put(SfxUnoAnyItem(SID_INPUTSTREAM, css::uno::Any(xStm))); ScDocShellRef xDocShell = new ScDocShell(SfxModelFlags::EMBEDDED_OBJECT | SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS | diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index 930057c7f789..d5db209a119a 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -88,7 +88,7 @@ public: ::osl::MutexGuard aGuard( m_aMutex ); if ( !hasByName(aName) ) throw container::NoSuchElementException(); - return uno::makeAny( IdToOleNameHash[ aName ] ); + return uno::Any( IdToOleNameHash[ aName ] ); } virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) override { diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 4b80fea99cfc..1337e909d1ff 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -129,10 +129,8 @@ #include <utility> using namespace com::sun::star; -using ::com::sun::star::uno::makeAny; using ::com::sun::star::uno::Any; using ::com::sun::star::beans::XPropertySet; -using ::com::sun::star::uno::makeAny; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; @@ -500,7 +498,7 @@ SdrObjectUniquePtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffC const sal_Int16 nOCXControlType = eCreateFromMSOCXControl; xPropSet->setPropertyValue(sPropertyName, Any(nOCXControlType)); //Detail type(checkbox, button ...) - xPropSet->setPropertyValue(sObjIdPropertyName, makeAny<sal_uInt16>(mnObjId)); + xPropSet->setPropertyValue(sObjIdPropertyName, Any(sal_uInt16(mnObjId))); } catch(const Exception&) { @@ -2123,7 +2121,7 @@ void XclImpTbxObjBase::ConvertLabel( ScfPropertySet& rPropSet ) const Reference< css::beans::XPropertySet > xPropset( mxShape, UNO_QUERY ); try{ if(xPropset.is()) - xPropset->setPropertyValue( "Description", makeAny(aLabel) ); + xPropset->setPropertyValue( "Description", Any(aLabel) ); }catch( ... ) { SAL_WARN("sc.filter", "Can't set a default text for TBX Control "); diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index dee145ae384f..f06cb4790aa7 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -101,7 +101,7 @@ public: virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override { //--Index; // apparently the palette is already 1 based - return uno::makeAny( sal_Int32( maColor[ Index ] ) ); + return uno::Any( sal_Int32( maColor[ Index ] ) ); } // Methods XElementAccess @@ -138,7 +138,7 @@ XclImpPalette::ExportPalette() if ( xProps.is() ) { uno::Reference< container::XIndexAccess > xIndex( new PaletteIndex( std::move(aColors) ) ); - xProps->setPropertyValue( "ColorPalette", uno::makeAny( xIndex ) ); + xProps->setPropertyValue( "ColorPalette", uno::Any( xIndex ) ); } } diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx index d446f77d2353..3547dad16d22 100644 --- a/sc/source/filter/excel/xlchart.cxx +++ b/sc/source/filter/excel/xlchart.cxx @@ -957,7 +957,7 @@ void XclChPropSetHelper::WriteLineProperties( uno::Any aDashNameAny; if( eApiStyle == drawing::LineStyle_DASH ) { - OUString aDashName = rDashTable.InsertObject( uno::makeAny( aApiDash ) ); + OUString aDashName = rDashTable.InsertObject( uno::Any( aApiDash ) ); if( !aDashName.isEmpty() ) aDashNameAny <<= aDashName; } diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx index 40759538405a..a743b97a25d4 100644 --- a/sc/source/filter/excel/xltoolbar.cxx +++ b/sc/source/filter/excel/xltoolbar.cxx @@ -181,7 +181,7 @@ bool ScCTB::ImportCustomToolBar( ScCTBWrapper& rWrapper, CustomToolBarImportHelp uno::Reference< beans::XPropertySet > xProps( xIndexContainer, uno::UNO_QUERY_THROW ); WString& name = tb.getName(); // set UI name for toolbar - xProps->setPropertyValue("UIName", uno::makeAny( name.getString() ) ); + xProps->setPropertyValue("UIName", uno::Any( name.getString() ) ); OUString sToolBarName = "private:resource/toolbar/custom_" + name.getString(); for ( auto& rItem : rTBC ) @@ -318,9 +318,9 @@ bool ScTBC::ImportToolBarControl( ScCTBWrapper& rWrapper, const css::uno::Refere // insert spacer uno::Sequence sProps{ comphelper::makePropertyValue("Type", ui::ItemType::SEPARATOR_LINE) }; - toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( sProps ) ); + toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::Any( sProps ) ); } - toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( comphelper::containerToSequence(props) ) ); + toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::Any( comphelper::containerToSequence(props) ) ); } return true; } diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx index 1d6e982120e4..4abfc79be671 100644 --- a/sc/source/filter/ftools/fapihelper.cxx +++ b/sc/source/filter/ftools/fapihelper.cxx @@ -121,7 +121,7 @@ uno::Sequence< beans::NamedValue > ScfApiHelper::QueryEncryptionDataForMedium( S rMedium.GetItemSet()->ClearItem( SID_ENCRYPTIONDATA ); if( !bIsDefaultPassword && aEncryptionData.hasElements() ) - rMedium.GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); + rMedium.GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::Any( aEncryptionData ) ) ); return aEncryptionData; } diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx index b5eaabeda4b3..7449f1193797 100644 --- a/sc/source/filter/inc/fapihelper.hxx +++ b/sc/source/filter/inc/fapihelper.hxx @@ -172,7 +172,7 @@ public: /** Puts the passed value into the property set. */ template< typename Type > void SetProperty( const OUString& rPropName, const Type& rValue ) - { SetAnyProperty( rPropName, css::uno::makeAny( rValue ) ); } + { SetAnyProperty( rPropName, css::uno::Any( rValue ) ); } /** Puts the passed Boolean value into the property set. */ void SetBoolProperty( const OUString& rPropName, bool bValue ) diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx index e02400bcd480..1989b337faf2 100644 --- a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx +++ b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx @@ -117,18 +117,18 @@ void SAL_CALL ScXMLCalculationSettingsContext::endFastElement( sal_Int32 /*nElem if (!xPropertySet.is()) return; - xPropertySet->setPropertyValue( SC_UNO_CALCASSHOWN, uno::makeAny(bCalcAsShown) ); - xPropertySet->setPropertyValue( SC_UNO_IGNORECASE, uno::makeAny(bIgnoreCase) ); - xPropertySet->setPropertyValue( SC_UNO_LOOKUPLABELS, uno::makeAny(bLookUpLabels) ); - xPropertySet->setPropertyValue( SC_UNO_MATCHWHOLE, uno::makeAny(bMatchWholeCell) ); + xPropertySet->setPropertyValue( SC_UNO_CALCASSHOWN, uno::Any(bCalcAsShown) ); + xPropertySet->setPropertyValue( SC_UNO_IGNORECASE, uno::Any(bIgnoreCase) ); + xPropertySet->setPropertyValue( SC_UNO_LOOKUPLABELS, uno::Any(bLookUpLabels) ); + xPropertySet->setPropertyValue( SC_UNO_MATCHWHOLE, uno::Any(bMatchWholeCell) ); bool bWildcards, bRegex; utl::SearchParam::ConvertToBool( eSearchType, bWildcards, bRegex); - xPropertySet->setPropertyValue( SC_UNO_REGEXENABLED, uno::makeAny(bRegex) ); - xPropertySet->setPropertyValue( SC_UNO_WILDCARDSENABLED, uno::makeAny(bWildcards) ); - xPropertySet->setPropertyValue( SC_UNO_ITERENABLED, uno::makeAny(bIsIterationEnabled) ); - xPropertySet->setPropertyValue( SC_UNO_ITERCOUNT, uno::makeAny(nIterationCount) ); - xPropertySet->setPropertyValue( SC_UNO_ITEREPSILON, uno::makeAny(fIterationEpsilon) ); - xPropertySet->setPropertyValue( SC_UNO_NULLDATE, uno::makeAny(aNullDate) ); + xPropertySet->setPropertyValue( SC_UNO_REGEXENABLED, uno::Any(bRegex) ); + xPropertySet->setPropertyValue( SC_UNO_WILDCARDSENABLED, uno::Any(bWildcards) ); + xPropertySet->setPropertyValue( SC_UNO_ITERENABLED, uno::Any(bIsIterationEnabled) ); + xPropertySet->setPropertyValue( SC_UNO_ITERCOUNT, uno::Any(nIterationCount) ); + xPropertySet->setPropertyValue( SC_UNO_ITEREPSILON, uno::Any(fIterationEpsilon) ); + xPropertySet->setPropertyValue( SC_UNO_NULLDATE, uno::Any(aNullDate) ); if (GetScImport().GetDocument()) { ScXMLImport::MutexGuard aGuard(GetScImport()); diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx index 773eb12da88b..99987a449193 100644 --- a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx +++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx @@ -70,19 +70,19 @@ XMLTableHeaderFooterContext::XMLTableHeaderFooterContext( SvXMLImport& rImport, { if( ::cppu::any2bool(xPropSet->getPropertyValue( sShare )) ) // Don't share headers any longer - xPropSet->setPropertyValue( sShare, uno::makeAny(false) ); + xPropSet->setPropertyValue( sShare, uno::Any(false) ); } else { if( !::cppu::any2bool(xPropSet->getPropertyValue( sShare )) ) // share headers - xPropSet->setPropertyValue( sShare, uno::makeAny(true) ); + xPropSet->setPropertyValue( sShare, uno::Any(true) ); } } else { if ( bOn != bDisplay ) - xPropSet->setPropertyValue( sOn, uno::makeAny(bDisplay) ); + xPropSet->setPropertyValue( sOn, uno::Any(bDisplay) ); } if (bLeft) { @@ -91,7 +91,7 @@ XMLTableHeaderFooterContext::XMLTableHeaderFooterContext( SvXMLImport& rImport, else if (bFirst) { sCont = sContentFirst; - xPropSet->setPropertyValue( sShareFirstContent, uno::makeAny(!bDisplay) ); + xPropSet->setPropertyValue( sShareFirstContent, uno::Any(!bDisplay) ); } else { @@ -183,7 +183,7 @@ void XMLTableHeaderFooterContext::endFastElement(sal_Int32 ) if (!bContainsRight) xHeaderFooterContent->getRightText()->setString(""); - xPropSet->setPropertyValue( sCont, uno::makeAny(xHeaderFooterContent) ); + xPropSet->setPropertyValue( sCont, uno::Any(xHeaderFooterContent) ); } } diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx index ba2382580eba..8a6c4b4c3ca6 100644 --- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx +++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx @@ -56,7 +56,7 @@ void XMLTableShapeImportHelper::SetLayer(const uno::Reference<drawing::XShape>& { uno::Reference< beans::XPropertySet > xShapeProp( rShape, uno::UNO_QUERY ); if( xShapeProp.is() ) - xShapeProp->setPropertyValue( SC_LAYERID, uno::makeAny(nLayerID.get()) ); + xShapeProp->setPropertyValue( SC_LAYERID, uno::Any(nLayerID.get()) ); } } diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx index 502690fe2f03..4e52dfa413ad 100644 --- a/sc/source/filter/xml/xmlcoli.cxx +++ b/sc/source/filter/xml/xmlcoli.cxx @@ -122,7 +122,7 @@ void SAL_CALL ScXMLTableColContext::endFastElement( sal_Int32 /*nElement*/ ) bool bValue(true); if (!IsXMLToken(sVisibility, XML_VISIBLE)) bValue = false; - xColumnProperties->setPropertyValue(SC_UNONAME_CELLVIS, uno::makeAny(bValue)); + xColumnProperties->setPropertyValue(SC_UNONAME_CELLVIS, uno::Any(bValue)); } } } diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 9978db86c010..654299294d71 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -637,9 +637,9 @@ void ScXMLExport::ExportMeta_() uno::Sequence<beans::NamedValue> stats { - { "TableCount", uno::makeAny(static_cast<sal_Int32>(nTableCount)) }, - { "CellCount", uno::makeAny(nCellCount) }, - { "ObjectCount", uno::makeAny(nShapesCount) } + { "TableCount", uno::Any(static_cast<sal_Int32>(nTableCount)) }, + { "CellCount", uno::Any(nCellCount) }, + { "ObjectCount", uno::Any(nShapesCount) } }; // update document statistics at the model diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 41078e47e6be..b72cf35ffcf1 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -949,14 +949,14 @@ void ScXMLImport::SetType(const uno::Reference <beans::XPropertySet>& rPropertie { if (!xNumberFormatTypes.is()) xNumberFormatTypes.set(uno::Reference <util::XNumberFormatTypes>(xNumberFormats, uno::UNO_QUERY)); - rProperties->setPropertyValue( SC_UNONAME_NUMFMT, uno::makeAny(xNumberFormatTypes->getStandardFormat(nCellType, aLocale)) ); + rProperties->setPropertyValue( SC_UNONAME_NUMFMT, uno::Any(xNumberFormatTypes->getStandardFormat(nCellType, aLocale)) ); } } else if (!rCurrency.empty() && !sCurrentCurrency.isEmpty()) { if (sCurrentCurrency != rCurrency) if (!IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency)) - rProperties->setPropertyValue( SC_UNONAME_NUMFMT, uno::makeAny(SetCurrencySymbol(rNumberFormat, rCurrency))); + rProperties->setPropertyValue( SC_UNONAME_NUMFMT, uno::Any(SetCurrencySymbol(rNumberFormat, rCurrency))); } } } @@ -970,7 +970,7 @@ void ScXMLImport::SetType(const uno::Reference <beans::XPropertySet>& rPropertie { if ((nCellType == util::NumberFormat::CURRENCY) && !rCurrency.empty() && !sCurrentCurrency.isEmpty() && sCurrentCurrency != rCurrency && !IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency)) - rProperties->setPropertyValue( SC_UNONAME_NUMFMT, uno::makeAny(SetCurrencySymbol(rNumberFormat, rCurrency))); + rProperties->setPropertyValue( SC_UNONAME_NUMFMT, uno::Any(SetCurrencySymbol(rNumberFormat, rCurrency))); } } @@ -1021,7 +1021,7 @@ void ScXMLImport::SetStyleToRanges() } else { - xProperties->setPropertyValue(SC_UNONAME_CELLSTYL, uno::makeAny(GetStyleDisplayName( XmlStyleFamily::TABLE_CELL, sPrevStyleName ))); + xProperties->setPropertyValue(SC_UNONAME_CELLSTYL, uno::Any(GetStyleDisplayName( XmlStyleFamily::TABLE_CELL, sPrevStyleName ))); sal_Int32 nNumberFormat(GetStyleNumberFormats()->GetStyleNumberFormat(sPrevStyleName)); bool bInsert(nNumberFormat == -1); SetType(xProperties, nNumberFormat, nPrevCellType, sPrevCurrency); @@ -1735,8 +1735,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportXLSX(SvStream &rStream) uno::Reference<document::XImporter> xImporter(xFilter, uno::UNO_QUERY_THROW); uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence( { - { "InputStream", uno::makeAny(xStream) }, - { "InputMode", uno::makeAny(true) }, + { "InputStream", uno::Any(xStream) }, + { "InputMode", uno::Any(true) }, })); xImporter->setTargetDocument(xModel); diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx index 7bfee20239ee..fc6a3a7c36c4 100644 --- a/sc/source/filter/xml/xmlrowi.cxx +++ b/sc/source/filter/xml/xmlrowi.cxx @@ -202,7 +202,7 @@ void SAL_CALL ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/) rXMLImport.GetDoc().setRowsVisible(nSheet, nFirstRow, nCurrentRow, false); } if (bFiltered) - xRowProperties->setPropertyValue(SC_ISFILTERED, uno::makeAny(bFiltered)); + xRowProperties->setPropertyValue(SC_ISFILTERED, uno::Any(bFiltered)); uno::Any any = xRowProperties->getPropertyValue(SC_UNONAME_OHEIGHT); bool bOptionalHeight = false; diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index ba327e605d51..96fc38cbc04d 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -516,17 +516,17 @@ void XMLTableStyleContext::FillPropertySet( { if (!bParentSet) { - AddProperty(CTF_SC_CELLSTYLE, uno::makeAny(GetImport().GetStyleDisplayName( XmlStyleFamily::TABLE_CELL, GetParentName() ))); + AddProperty(CTF_SC_CELLSTYLE, uno::Any(GetImport().GetStyleDisplayName( XmlStyleFamily::TABLE_CELL, GetParentName() ))); bParentSet = true; } sal_Int32 nNumFmt = GetNumberFormat(); if (nNumFmt >= 0) - AddProperty(CTF_SC_NUMBERFORMAT, uno::makeAny(nNumFmt)); + AddProperty(CTF_SC_NUMBERFORMAT, uno::Any(nNumFmt)); } else if (GetFamily() == XmlStyleFamily::TABLE_TABLE) { if (!sPageStyle.isEmpty()) - AddProperty(CTF_SC_MASTERPAGENAME, uno::makeAny(GetImport().GetStyleDisplayName( XmlStyleFamily::MASTER_PAGE, sPageStyle ))); + AddProperty(CTF_SC_MASTERPAGENAME, uno::Any(GetImport().GetStyleDisplayName( XmlStyleFamily::MASTER_PAGE, sPageStyle ))); } } XMLPropStyleContext::FillPropertySet(rPropSet); @@ -970,7 +970,7 @@ void ScMasterPageContext::ClearContent(const OUString& rContent) xHeaderFooterContent->getLeftText()->setString(""); xHeaderFooterContent->getCenterText()->setString(""); xHeaderFooterContent->getRightText()->setString(""); - xPropSet->setPropertyValue( rContent, uno::makeAny(xHeaderFooterContent) ); + xPropSet->setPropertyValue( rContent, uno::Any(xHeaderFooterContent) ); } } } diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index c0aac4c43e9f..3c1e690f3de6 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -155,7 +155,7 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCompo OSL_ENSURE( xInfoSet.is(), "missing property set" ); if( xInfoSet.is() ) { - xInfoSet->setPropertyValue( "StreamName", uno::makeAny( sStream ) ); + xInfoSet->setPropertyValue( "StreamName", uno::Any( sStream ) ); } ErrCode nReturn = ERRCODE_NONE; @@ -319,7 +319,7 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCode& rError ) uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aImportInfoMap ) ) ); // No need to lock solar mutex when calling from the wrapper. - xInfoSet->setPropertyValue(SC_UNO_ODS_LOCK_SOLAR_MUTEX, uno::makeAny(false)); + xInfoSet->setPropertyValue(SC_UNO_ODS_LOCK_SOLAR_MUTEX, uno::Any(false)); // ---- get BuildId from parent container if available @@ -343,7 +343,7 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCode& rError ) { sal_Int32 nProgressRange(1000000); xStatusIndicator->start(SvxResId(RID_SVXSTR_DOC_LOAD), nProgressRange); - xInfoSet->setPropertyValue("ProgressRange", uno::makeAny(nProgressRange)); + xInfoSet->setPropertyValue("ProgressRange", uno::Any(nProgressRange)); } // Set base URI @@ -352,7 +352,7 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCode& rError ) // needed for relative URLs, but in clipboard copy/paste there may be none SAL_INFO_IF(aBaseURL.isEmpty(), "sc.filter", "ScXMLImportWrapper: no base URL"); OUString sPropName("BaseURI"); - xInfoSet->setPropertyValue( sPropName, uno::makeAny( aBaseURL ) ); + xInfoSet->setPropertyValue( sPropName, uno::Any( aBaseURL ) ); // TODO/LATER: do not do it for embedded links OUString aName; @@ -371,12 +371,12 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCode& rError ) if( !aName.isEmpty() ) { sPropName = "StreamRelPath"; - xInfoSet->setPropertyValue( sPropName, uno::makeAny( aName ) ); + xInfoSet->setPropertyValue( sPropName, uno::Any( aName ) ); } } if (mrDocShell.GetCreateMode() == SfxObjectCreateMode::ORGANIZER) - xInfoSet->setPropertyValue("OrganizerMode", uno::makeAny(true)); + xInfoSet->setPropertyValue("OrganizerMode", uno::Any(true)); xInfoSet->setPropertyValue( "SourceStorage", uno::Any( xStorage ) ); @@ -417,7 +417,7 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCode& rError ) ErrCode nMetaRetval(ERRCODE_NONE); if (nMode & ImportFlags::Metadata) { - uno::Sequence<uno::Any> aMetaArgs { makeAny(xInfoSet) }; + uno::Sequence<uno::Any> aMetaArgs { Any(xInfoSet) }; SAL_INFO( "sc.filter", "meta import start" ); @@ -446,10 +446,10 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCode& rError ) } uno::Sequence<uno::Any> aStylesArgs { - makeAny(xInfoSet), - makeAny(xGraphicStorageHandler), - makeAny(xStatusIndicator), - makeAny(xObjectResolver) + Any(xInfoSet), + Any(xGraphicStorageHandler), + Any(xStatusIndicator), + Any(xObjectResolver) }; ErrCode nSettingsRetval(ERRCODE_NONE); @@ -458,7 +458,7 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCode& rError ) // Settings must be loaded first because of the printer setting, // which is needed in the page styles (paper tray). - uno::Sequence<uno::Any> aSettingsArgs { makeAny(xInfoSet) }; + uno::Sequence<uno::Any> aSettingsArgs { Any(xInfoSet) }; SAL_INFO( "sc.filter", "settings import start" ); @@ -490,14 +490,14 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCode& rError ) { if (mrDocShell.GetCreateMode() == SfxObjectCreateMode::INTERNAL) // We only need to import content for external link cache document. - xInfoSet->setPropertyValue(SC_UNO_ODS_IMPORT_STYLES, uno::makeAny(false)); + xInfoSet->setPropertyValue(SC_UNO_ODS_IMPORT_STYLES, uno::Any(false)); uno::Sequence<uno::Any> aDocArgs { - makeAny(xInfoSet), - makeAny(xGraphicStorageHandler), - makeAny(xStatusIndicator), - makeAny(xObjectResolver) + Any(xInfoSet), + Any(xGraphicStorageHandler), + Any(xStatusIndicator), + Any(xObjectResolver) }; SAL_INFO( "sc.filter", "content import start" ); @@ -628,10 +628,10 @@ bool ScXMLImportWrapper::ExportToComponent(const uno::Reference<uno::XComponentC uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY ); if (xSet.is()) { - xSet->setPropertyValue("MediaType", uno::makeAny(sMediaType)); + xSet->setPropertyValue("MediaType", uno::Any(sMediaType)); // advise storage impl to use common encryption - xSet->setPropertyValue( "UseCommonStoragePasswordEncryption", uno::makeAny(true) ); + xSet->setPropertyValue( "UseCommonStoragePasswordEncryption", uno::Any(true) ); } xOut = xStream->getOutputStream(); @@ -644,7 +644,7 @@ bool ScXMLImportWrapper::ExportToComponent(const uno::Reference<uno::XComponentC OSL_ENSURE( xInfoSet.is(), "missing property set" ); if( xInfoSet.is() ) { - xInfoSet->setPropertyValue( "StreamName", uno::makeAny( sName ) ); + xInfoSet->setPropertyValue( "StreamName", uno::Any( sName ) ); } xWriter->setOutputStream( xOut ); @@ -806,17 +806,17 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) sal_Int32 nProgressRange(1000000); if(xStatusIndicator.is()) xStatusIndicator->start(ScResId(STR_SAVE_DOC), nProgressRange); - xInfoSet->setPropertyValue("ProgressRange", uno::makeAny(nProgressRange)); + xInfoSet->setPropertyValue("ProgressRange", uno::Any(nProgressRange)); bool bUsePrettyPrinting = officecfg::Office::Common::Save::Document::PrettyPrinting::get(); - xInfoSet->setPropertyValue("UsePrettyPrinting", uno::makeAny(bUsePrettyPrinting)); + xInfoSet->setPropertyValue("UsePrettyPrinting", uno::Any(bUsePrettyPrinting)); xInfoSet->setPropertyValue( "TargetStorage", uno::Any( xStorage ) ); OSL_ENSURE( pMedium, "There is no medium to get MediaDescriptor from!" ); OUString aBaseURL = pMedium ? pMedium->GetBaseURL( true ) : OUString(); OUString sPropName("BaseURI"); - xInfoSet->setPropertyValue( sPropName, uno::makeAny( aBaseURL ) ); + xInfoSet->setPropertyValue( sPropName, uno::Any( aBaseURL ) ); // TODO/LATER: do not do it for embedded links if( SfxObjectCreateMode::EMBEDDED == pObjSh->GetCreateMode() ) @@ -833,7 +833,7 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) if( !aName.isEmpty() ) { sPropName = "StreamRelPath"; - xInfoSet->setPropertyValue( sPropName, uno::makeAny( aName ) ); + xInfoSet->setPropertyValue( sPropName, uno::Any( aName ) ); } } @@ -875,9 +875,9 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) { uno::Sequence<uno::Any> aMetaArgs { - makeAny(xInfoSet), - makeAny(xWriter), - makeAny(xStatusIndicator) + Any(xInfoSet), + Any(xWriter), + Any(xStatusIndicator) }; SAL_INFO( "sc.filter", "meta export start" ); @@ -910,11 +910,11 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) { uno::Sequence<uno::Any> aStylesArgs { - makeAny(xInfoSet), - makeAny(xGraphicStorageHandler), - makeAny(xStatusIndicator), - makeAny(xWriter), - makeAny(xObjectResolver) + Any(xInfoSet), + Any(xGraphicStorageHandler), + Any(xStatusIndicator), + Any(xWriter), + Any(xObjectResolver) }; SAL_INFO( "sc.filter", "styles export start" ); @@ -935,11 +935,11 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) { uno::Sequence<uno::Any> aDocArgs { - makeAny(xInfoSet), - makeAny(xGraphicStorageHandler), - makeAny(xStatusIndicator), - makeAny(xWriter), - makeAny(xObjectResolver) + Any(xInfoSet), + Any(xGraphicStorageHandler), + Any(xStatusIndicator), + Any(xWriter), + Any(xObjectResolver) }; SAL_INFO( "sc.filter", "content export start" ); @@ -968,9 +968,9 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) { uno::Sequence<uno::Any> aSettingsArgs { - makeAny(xInfoSet), - makeAny(xWriter), - makeAny(xStatusIndicator) + Any(xInfoSet), + Any(xWriter), + Any(xStatusIndicator) }; SAL_INFO( "sc.filter", "settings export start" ); 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) ); ... etc. - the rest is truncated