diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-03 17:01:57 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-03 21:48:15 +0200 |
commit | 1d2b6b709e81eec8600118b3402d82707aa113bc (patch) | |
tree | 09dce9cc095e37c3c5a18d81ca3afebba546ae4c /svx/qa | |
parent | ca734f7cfa55814a85d5940e5f64d7c53638f6a7 (diff) |
Just use Any ctor instead of makeAny in svx
Change-Id: I59b1b3f817a9028f132456ea5094f38f88674d00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133768
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx/qa')
-rw-r--r-- | svx/qa/unit/XTableImportExportTest.cxx | 2 | ||||
-rw-r--r-- | svx/qa/unit/svdraw.cxx | 16 | ||||
-rw-r--r-- | svx/qa/unit/unodraw.cxx | 4 | ||||
-rw-r--r-- | svx/qa/unit/xoutdev.cxx | 6 |
4 files changed, 14 insertions, 14 deletions
diff --git a/svx/qa/unit/XTableImportExportTest.cxx b/svx/qa/unit/XTableImportExportTest.cxx index 1693d83d1a39..b97a7c50bc6b 100644 --- a/svx/qa/unit/XTableImportExportTest.cxx +++ b/svx/qa/unit/XTableImportExportTest.cxx @@ -51,7 +51,7 @@ CPPUNIT_TEST_FIXTURE(XTableImportExportTest, testImportExport) Graphic aGraphic(aBitmapEx); uno::Reference<awt::XBitmap> xBitmap(aGraphic.GetXGraphic(), css::uno::UNO_QUERY); - xNameContainer->insertByName("SomeBitmap", uno::makeAny(xBitmap)); + xNameContainer->insertByName("SomeBitmap", uno::Any(xBitmap)); xBitmapList->Save(); aChecksum = aBitmap.GetChecksum(); diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx index a730bb3fc9b9..9ad02060d68e 100644 --- a/svx/qa/unit/svdraw.cxx +++ b/svx/qa/unit/svdraw.cxx @@ -119,9 +119,9 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSemiTransparentText) xShapeText->getText()->setString("hello"); uno::Reference<beans::XPropertySet> xShapeProperties(xShape, uno::UNO_QUERY); - xShapeProperties->setPropertyValue("CharColor", uno::makeAny(COL_RED)); + xShapeProperties->setPropertyValue("CharColor", uno::Any(COL_RED)); sal_Int16 nTransparence = 75; - xShapeProperties->setPropertyValue("CharTransparence", uno::makeAny(nTransparence)); + xShapeProperties->setPropertyValue("CharTransparence", uno::Any(nTransparence)); // Generates drawinglayer primitives for the page. auto pDrawPage = dynamic_cast<SvxDrawPage*>(xDrawPage.get()); @@ -153,9 +153,9 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale) xShape->setPosition(awt::Point(2512, 6062)); xShape->setSize(awt::Size(112, 112)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); - xShapeProps->setPropertyValue("FillStyle", uno::makeAny(drawing::FillStyle_SOLID)); - xShapeProps->setPropertyValue("LineStyle", uno::makeAny(drawing::LineStyle_SOLID)); - xShapeProps->setPropertyValue("FillColor", uno::makeAny(static_cast<sal_Int32>(0))); + xShapeProps->setPropertyValue("FillStyle", uno::Any(drawing::FillStyle_SOLID)); + xShapeProps->setPropertyValue("LineStyle", uno::Any(drawing::LineStyle_SOLID)); + xShapeProps->setPropertyValue("FillColor", uno::Any(static_cast<sal_Int32>(0))); // Add it to the draw page. uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0), @@ -197,7 +197,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale) drawing::PolygonFlags_NORMAL, }, }; - xShapeProps->setPropertyValue("PolyPolygonBezier", uno::makeAny(aPolyPolygonBezierCoords)); + xShapeProps->setPropertyValue("PolyPolygonBezier", uno::Any(aPolyPolygonBezierCoords)); drawing::HomogenMatrix3 aMatrix; aMatrix.Line1.Column1 = 56; aMatrix.Line2.Column1 = -97; @@ -208,7 +208,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testHandlePathObjScale) aMatrix.Line1.Column3 = 3317; aMatrix.Line2.Column3 = 5583; aMatrix.Line3.Column3 = 1; - xShapeProps->setPropertyValue("Transformation", uno::makeAny(aMatrix)); + xShapeProps->setPropertyValue("Transformation", uno::Any(aMatrix)); // Then make sure the scaling is only applied once: // Without the accompanying fix in place, this test would have failed with: @@ -246,7 +246,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testTextEditEmptyGrabBag) comphelper::makePropertyValue("OOXLayout", true), }; uno::Reference<beans::XPropertySet> xGroupProps(xGroup, uno::UNO_QUERY); - xGroupProps->setPropertyValue("InteropGrabBag", uno::makeAny(aGrabBag)); + xGroupProps->setPropertyValue("InteropGrabBag", uno::Any(aGrabBag)); // When editing the shape text of the 2nd rectangle (insert a char at the start). SfxViewShell* pViewShell = SfxViewShell::Current(); diff --git a/svx/qa/unit/unodraw.cxx b/svx/qa/unit/unodraw.cxx index 5d2814e2c21a..d026e07bc076 100644 --- a/svx/qa/unit/unodraw.cxx +++ b/svx/qa/unit/unodraw.cxx @@ -143,9 +143,9 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect) uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); // Without the accompanying fix in place, this test would have failed with throwing a // beans.UnknownPropertyException, as shadow-as-direct-formatting on tables were not possible. - xShapeProps->setPropertyValue("Shadow", uno::makeAny(true)); + xShapeProps->setPropertyValue("Shadow", uno::Any(true)); sal_Int32 nRed = 0xff0000; - xShapeProps->setPropertyValue("ShadowColor", uno::makeAny(nRed)); + xShapeProps->setPropertyValue("ShadowColor", uno::Any(nRed)); CPPUNIT_ASSERT(xShapeProps->getPropertyValue("ShadowColor") >>= nRed); CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xff0000), nRed); diff --git a/svx/qa/unit/xoutdev.cxx b/svx/qa/unit/xoutdev.cxx index 78af484555de..41b46016451c 100644 --- a/svx/qa/unit/xoutdev.cxx +++ b/svx/qa/unit/xoutdev.cxx @@ -127,13 +127,13 @@ CPPUNIT_TEST_FIXTURE(XOutdevTest, testFillColorThemeUnoApi) uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xShape(xPage->getByIndex(0), uno::UNO_QUERY); sal_Int16 nExpected = 4; // Accent 1 - xShape->setPropertyValue("FillColorTheme", uno::makeAny(nExpected)); + xShape->setPropertyValue("FillColorTheme", uno::Any(nExpected)); // 80% lighter sal_Int16 nExpectedLumMod = 2000; - xShape->setPropertyValue("FillColorLumMod", uno::makeAny(nExpectedLumMod)); + xShape->setPropertyValue("FillColorLumMod", uno::Any(nExpectedLumMod)); sal_Int16 nExpectedLumOff = 8000; - xShape->setPropertyValue("FillColorLumOff", uno::makeAny(nExpectedLumOff)); + xShape->setPropertyValue("FillColorLumOff", uno::Any(nExpectedLumOff)); // Then make sure the value we read back is the expected one: sal_Int16 nActual = -1; |