vcl/qa/api/XGraphicTest.cxx | 18 +++++++++--------- vcl/qa/cppunit/filter/ipdf/ipdf.cxx | 2 +- vcl/qa/cppunit/pdfexport/pdfexport.cxx | 14 +++++++------- vcl/source/components/fontident.cxx | 2 +- vcl/source/control/managedmenubutton.cxx | 6 +++--- vcl/source/gdi/pdfwriter_impl2.cxx | 2 +- vcl/source/gdi/print3.cxx | 14 +++++++------- vcl/source/gdi/vectorgraphicdata.cxx | 4 ++-- vcl/source/outdev/outdev.cxx | 2 +- vcl/source/window/printdlg.cxx | 10 +++++----- vcl/source/window/winproc.cxx | 4 ++-- vcl/win/dtrans/DOTransferable.cxx | 2 +- 12 files changed, 40 insertions(+), 40 deletions(-)
New commits: commit c8053f5a5629c04defd813b061f0d59d6bf15f88 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon May 2 22:23:07 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue May 3 07:15:11 2022 +0200 Just use Any ctor instead of makeAny in vcl Change-Id: Ib9b588cd10154049a5493c1be16de72955ea6077 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133736 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/vcl/qa/api/XGraphicTest.cxx b/vcl/qa/api/XGraphicTest.cxx index afe50155a927..df05c05f9f4c 100644 --- a/vcl/qa/api/XGraphicTest.cxx +++ b/vcl/qa/api/XGraphicTest.cxx @@ -125,9 +125,9 @@ void XGraphicTest::testGraphicProvider() xGraphicProvider.set(graphic::GraphicProvider::create(xContext), uno::UNO_SET_THROW); auto aMediaProperties(comphelper::InitPropertySequence({ - { "URL", uno::makeAny(aGraphicURL) }, - { "LazyRead", uno::makeAny(true) }, - { "LoadAsLink", uno::makeAny(false) }, + { "URL", uno::Any(aGraphicURL) }, + { "LazyRead", uno::Any(true) }, + { "LoadAsLink", uno::Any(false) }, })); uno::Reference<graphic::XGraphic> xGraphic( @@ -164,9 +164,9 @@ void XGraphicTest::testGraphicProvider() xGraphicProvider.set(graphic::GraphicProvider::create(xContext), uno::UNO_SET_THROW); auto aMediaProperties(comphelper::InitPropertySequence({ - { "URL", uno::makeAny(aGraphicURL) }, - { "LazyRead", uno::makeAny(false) }, - { "LoadAsLink", uno::makeAny(true) }, + { "URL", uno::Any(aGraphicURL) }, + { "LazyRead", uno::Any(false) }, + { "LoadAsLink", uno::Any(true) }, })); uno::Reference<graphic::XGraphic> xGraphic( @@ -201,9 +201,9 @@ void XGraphicTest::testGraphicProvider() xGraphicProvider.set(graphic::GraphicProvider::create(xContext), uno::UNO_SET_THROW); auto aMediaProperties(comphelper::InitPropertySequence({ - { "URL", uno::makeAny(aGraphicURL) }, - { "LazyRead", uno::makeAny(true) }, - { "LoadAsLink", uno::makeAny(true) }, + { "URL", uno::Any(aGraphicURL) }, + { "LazyRead", uno::Any(true) }, + { "LoadAsLink", uno::Any(true) }, })); uno::Reference<graphic::XGraphic> xGraphic( diff --git a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx index a2732b58d862..ca5460e63b48 100644 --- a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx +++ b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx @@ -114,7 +114,7 @@ CPPUNIT_TEST_FIXTURE(VclFilterIpdfTest, testPDFAddVisibleSignatureLastPage) // Select it and assign a certificate. uno::Reference<view::XSelectionSupplier> xSelectionSupplier(pBaseModel->getCurrentController(), uno::UNO_QUERY); - xSelectionSupplier->select(uno::makeAny(xShape)); + xSelectionSupplier->select(uno::Any(xShape)); auto xCert = GetValidCertificate( getSecurityContext()->getSecurityEnvironment()->getPersonalCertificates()); if (!xCert) diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 0bfebea97464..54f9334a1607 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -1513,7 +1513,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf113143) // want to test. { "ReduceImageResolution", uno::Any(false) }, // Set a custom PDF version. - { "SelectPdfVersion", uno::makeAny(static_cast<sal_Int32>(16)) }, + { "SelectPdfVersion", uno::Any(static_cast<sal_Int32>(16)) }, })); aMediaDescriptor["FilterData"] <<= aFilterData; saveAsPDF(u"tdf113143.odp"); @@ -2113,7 +2113,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testPdfImageResourceInlineXObjectRef) xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY); OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "pdf-image-resource-inline-xobject-ref.pdf"; - xGraphicObject->setPropertyValue("GraphicURL", uno::makeAny(aURL)); + xGraphicObject->setPropertyValue("GraphicURL", uno::Any(aURL)); uno::Reference<drawing::XShape> xShape(xGraphicObject, uno::UNO_QUERY); xShape->setSize(awt::Size(1000, 1000)); uno::Reference<text::XTextContent> xTextContent(xGraphicObject, uno::UNO_QUERY); @@ -2191,7 +2191,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testVersion15) // Save as PDF. uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence( - { { "SelectPdfVersion", uno::makeAny(static_cast<sal_Int32>(15)) } })); + { { "SelectPdfVersion", uno::Any(static_cast<sal_Int32>(15)) } })); aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export"); aMediaDescriptor["FilterData"] <<= aFilterData; xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); @@ -2847,7 +2847,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testPdfImageRotate180) uno::Reference<beans::XPropertySet> xGraphicObject( xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY); OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "pdf-image-rotate-180.pdf"; - xGraphicObject->setPropertyValue("GraphicURL", uno::makeAny(aURL)); + xGraphicObject->setPropertyValue("GraphicURL", uno::Any(aURL)); uno::Reference<drawing::XShape> xShape(xGraphicObject, uno::UNO_QUERY); xShape->setSize(awt::Size(1000, 1000)); uno::Reference<text::XTextContent> xTextContent(xGraphicObject, uno::UNO_QUERY); @@ -3099,8 +3099,8 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testURIs) { // Test the filename rewriting uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence({ - { "ExportLinksRelativeFsys", uno::makeAny(URIs[i].relativeFsys) }, - { "ConvertOOoTargetToPDFTarget", uno::makeAny(true) }, + { "ExportLinksRelativeFsys", uno::Any(URIs[i].relativeFsys) }, + { "ConvertOOoTargetToPDFTarget", uno::Any(true) }, })); aMediaDescriptor["FilterData"] <<= aFilterData; @@ -3108,7 +3108,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testURIs) xCursor->gotoStart(/*bExpand=*/false); xCursor->gotoEnd(/*bExpand=*/true); uno::Reference<beans::XPropertySet> xCursorProps(xCursor, uno::UNO_QUERY); - xCursorProps->setPropertyValue("HyperLinkURL", uno::makeAny(URIs[i].in)); + xCursorProps->setPropertyValue("HyperLinkURL", uno::Any(URIs[i].in)); // Save as PDF. uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx index fd4cbb2d2b59..78d5703c5050 100644 --- a/vcl/source/components/fontident.cxx +++ b/vcl/source/components/fontident.cxx @@ -145,7 +145,7 @@ Any SAL_CALL FontIdentificator::getMaterial() aFD.Slant = css::awt::FontSlant_DONTKNOW; break; } - return makeAny( aFD ); + return Any( aFD ); } // XServiceInfo diff --git a/vcl/source/control/managedmenubutton.cxx b/vcl/source/control/managedmenubutton.cxx index 880730721ce2..bf3065e71cdf 100644 --- a/vcl/source/control/managedmenubutton.cxx +++ b/vcl/source/control/managedmenubutton.cxx @@ -72,9 +72,9 @@ void ManagedMenuButton::Activate() {} css::uno::Sequence<css::uno::Any> aArgs { - css::uno::makeAny(comphelper::makePropertyValue("ModuleIdentifier", aModuleName)), - css::uno::makeAny(comphelper::makePropertyValue("Frame", css::uno::makeAny(xFrame))), - css::uno::makeAny(comphelper::makePropertyValue("InToolbar", css::uno::makeAny(true))) + css::uno::Any(comphelper::makePropertyValue("ModuleIdentifier", aModuleName)), + css::uno::Any(comphelper::makePropertyValue("Frame", css::uno::Any(xFrame))), + css::uno::Any(comphelper::makePropertyValue("InToolbar", css::uno::Any(true))) }; const OUString aCommand(GetCommand()); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 69ac8708f4f1..f4c60a661684 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -1063,7 +1063,7 @@ public: // XMaterialHolder virtual uno::Any SAL_CALL getMaterial() override { - return uno::makeAny( sal_Int64(maID) ); + return uno::Any( sal_Int64(maID) ); } static EncHashTransporter* getEncHashTransporter( const uno::Reference< beans::XMaterialHolder >& ); diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 413d2ca2eb56..5d449a0677b4 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -349,7 +349,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController, xBox->run(); } xController->setValue( "IsDirect", - css::uno::makeAny( false ) ); + css::uno::Any( false ) ); } // setup printer @@ -425,7 +425,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController, aBuf.append( "-" ); aBuf.append( nPages ); } - xController->setValue("PageRange", css::uno::makeAny(aBuf.makeStringAndClear())); + xController->setValue("PageRange", css::uno::Any(aBuf.makeStringAndClear())); } } } @@ -525,7 +525,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController, return false; } xController->setValue( "LocalFileName", - css::uno::makeAny( aFile ) ); + css::uno::Any( aFile ) ); } else if (aDlg.isSingleJobs()) { @@ -828,7 +828,7 @@ void PrinterController::setPrinter( const VclPtr<Printer>& i_rPrinter ) mpImplData->mxPrinter = i_rPrinter; setValue( "Name", - css::uno::makeAny( i_rPrinter->GetName() ) ); + css::uno::Any( i_rPrinter->GetName() ) ); mpImplData->mnDefaultPaperBin = mpImplData->mxPrinter->GetPaperBin(); mpImplData->mxPrinter->Push(); mpImplData->mxPrinter->SetMapMode(MapMode(MapUnit::Map100thMM)); @@ -1700,12 +1700,12 @@ OUString PrinterController::makeEnabled( const OUString& i_rProperty ) { if( it->second.mnDependsOnEntry != -1 ) { - setValue( aDependency, css::uno::makeAny( sal_Int32( it->second.mnDependsOnEntry ) ) ); + setValue( aDependency, css::uno::Any( sal_Int32( it->second.mnDependsOnEntry ) ) ); } } else if( pVal->Value >>= bDepVal ) { - setValue( aDependency, css::uno::makeAny( it->second.mnDependsOnEntry != 0 ) ); + setValue( aDependency, css::uno::Any( it->second.mnDependsOnEntry != 0 ) ); } else { @@ -1984,7 +1984,7 @@ css::uno::Any PrinterOptionsHelper::setUIControlOpt(const css::uno::Sequence< OU SAL_WARN_IF( nUsed != nElements, "vcl.gdi", "nUsed != nElements, probable heap corruption" ); - return css::uno::makeAny( aCtrl ); + return css::uno::Any( aCtrl ); } css::uno::Any PrinterOptionsHelper::setGroupControlOpt(const OUString& i_rID, diff --git a/vcl/source/gdi/vectorgraphicdata.cxx b/vcl/source/gdi/vectorgraphicdata.cxx index 3bf729d65418..100776286e2d 100644 --- a/vcl/source/gdi/vectorgraphicdata.cxx +++ b/vcl/source/gdi/vectorgraphicdata.cxx @@ -244,7 +244,7 @@ void VectorGraphicData::ensureSequenceAndRange() if (!mbEnableEMFPlus) { auto aVector = comphelper::sequenceToContainer<std::vector<beans::PropertyValue>>(aPropertySequence); - aVector.push_back(comphelper::makePropertyValue("EMFPlusEnable", uno::makeAny(false))); + aVector.push_back(comphelper::makePropertyValue("EMFPlusEnable", uno::Any(false))); aPropertySequence = comphelper::containerToSequence(aVector); } @@ -257,7 +257,7 @@ void VectorGraphicData::ensureSequenceAndRange() { const uno::Reference<graphic::XPdfDecomposer> xPdfDecomposer = graphic::PdfTools::create(xContext); uno::Sequence<beans::PropertyValue> aDecompositionParameters = comphelper::InitPropertySequence({ - {"PageIndex", uno::makeAny<sal_Int32>(mnPageIndex)}, + {"PageIndex", uno::Any(sal_Int32(mnPageIndex))}, }); rtl::Reference<UnoBinaryDataContainer> xDataContainer = new UnoBinaryDataContainer(getBinaryDataContainer()); diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 0d9248d2fd77..e831cf746199 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -291,7 +291,7 @@ css::uno::Any OutputDevice::GetSystemGfxDataAny() const css::uno::Sequence< sal_Int8 > aSeq( reinterpret_cast<sal_Int8 const *>(&aSysData), aSysData.nSize ); - return css::uno::makeAny(aSeq); + return css::uno::Any(aSeq); } void OutputDevice::SetRefPoint() diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 2c305f170d13..9944541fb91e 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1816,13 +1816,13 @@ IMPL_LINK(PrintDialog, ToggleHdl, weld::Toggleable&, rButton, void) else if (&rButton == mxSingleJobsBox.get()) { maPController->setValue( "SinglePrintJobs", - makeAny( isSingleJobs() ) ); + Any( isSingleJobs() ) ); checkControlDependencies(); } else if( &rButton == mxCollateBox.get() ) { maPController->setValue( "Collate", - makeAny( isCollate() ) ); + Any( isCollate() ) ); checkControlDependencies(); } else if( &rButton == mxReverseOrderBox.get() ) @@ -1830,7 +1830,7 @@ IMPL_LINK(PrintDialog, ToggleHdl, weld::Toggleable&, rButton, void) bool bChecked = mxReverseOrderBox->get_active(); maPController->setReversePrint( bChecked ); maPController->setValue( "PrintReverse", - makeAny( bChecked ) ); + Any( bChecked ) ); maUpdatePreviewIdle.Start(); } else if (&rButton == mxBrochureBtn.get()) @@ -2051,9 +2051,9 @@ IMPL_LINK( PrintDialog, SpinModifyHdl, weld::SpinButton&, rEdit, void ) else if( &rEdit == mxCopyCountField.get() ) { maPController->setValue( "CopyCount", - makeAny( sal_Int32(mxCopyCountField->get_value()) ) ); + Any( sal_Int32(mxCopyCountField->get_value()) ) ); maPController->setValue( "Collate", - makeAny( isCollate() ) ); + Any( isCollate() ) ); } } diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 1e6d42ddcbff..b4ac7ac08ffa 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -515,7 +515,7 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent if( xDragSource.is() ) { static_cast < DNDListenerContainer * > ( xDragGestureRecognizer.get() )->fireDragGestureEvent( 0, - relLoc.X(), relLoc.Y(), xDragSource, css::uno::makeAny( aMouseEvent ) ); + relLoc.X(), relLoc.Y(), xDragSource, css::uno::Any( aMouseEvent ) ); } } } @@ -953,7 +953,7 @@ bool ImplLOKHandleMouseEvent(const VclPtr<vcl::Window>& xWindow, MouseNotifyEven aWinPos.X(), aWinPos.Y(), xDragSource, - css::uno::makeAny(aEvent)); + css::uno::Any(aEvent)); } } } diff --git a/vcl/win/dtrans/DOTransferable.cxx b/vcl/win/dtrans/DOTransferable.cxx index ea048f98f4f5..7c5b55c02f9b 100644 --- a/vcl/win/dtrans/DOTransferable.cxx +++ b/vcl/win/dtrans/DOTransferable.cxx @@ -257,7 +257,7 @@ Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor ) m_bUnicodeRegistered ) { OUString aUnicodeText = synthesizeUnicodeText( ); - Any aAny = makeAny( aUnicodeText ); + Any aAny( aUnicodeText ); return aAny; } // #i124085# CF_DIBV5 should not be possible, but keep for reading from the