summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-03 23:23:15 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-05-04 06:55:14 +0200
commitaebfe0e9432e37936bbdd040fe8a0f099a0d22a5 (patch)
treed5df90912957caa017bd0431bb9ad31e707530a8 /sd/qa
parent75f008ff116f936e51f268c3fa6775de7addee7a (diff)
Just use Any ctor instead of makeAny in sd
Change-Id: I0cd03dcfef02b0ef3bce6bfb88aee4c04d7f6f98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133785 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx6
-rw-r--r--sd/qa/unit/export-tests-ooxml3.cxx6
-rw-r--r--sd/qa/unit/export-tests.cxx2
-rw-r--r--sd/qa/unit/misc-tests.cxx6
-rw-r--r--sd/qa/unit/uiimpress.cxx44
5 files changed, 32 insertions, 32 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index dd3dbd286803..b9c1f437c64c 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -733,10 +733,10 @@ void SdOOXMLExportTest2::testTdf92527()
xShape1->setPosition(awt::Point(1000, 1000));
uno::Sequence<beans::PropertyValue> aShapeGeometry(comphelper::InitPropertySequence(
{
- {"Type", uno::makeAny(OUString("diamond"))},
+ {"Type", uno::Any(OUString("diamond"))},
}));
uno::Reference<beans::XPropertySet> xPropertySet1(xShape1, uno::UNO_QUERY);
- xPropertySet1->setPropertyValue("CustomShapeGeometry", uno::makeAny(aShapeGeometry));
+ xPropertySet1->setPropertyValue("CustomShapeGeometry", uno::Any(aShapeGeometry));
xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
@@ -1503,7 +1503,7 @@ void SdOOXMLExportTest2::testSmartartRotation2()
// code to support this for now
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
uno::Sequence<beans::PropertyValue> aInteropGrabBag;
- xShape->setPropertyValue("InteropGrabBag", uno::makeAny(aInteropGrabBag));
+ xShape->setPropertyValue("InteropGrabBag", uno::Any(aInteropGrabBag));
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx
index 63c7ea278595..c53abe6b363a 100644
--- a/sd/qa/unit/export-tests-ooxml3.cxx
+++ b/sd/qa/unit/export-tests-ooxml3.cxx
@@ -1306,7 +1306,7 @@ void SdOOXMLExportTest3::testTdf125360()
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
- xShape->setPropertyValue("FillTransparence", uno::makeAny(static_cast<sal_Int32>(23)));
+ xShape->setPropertyValue("FillTransparence", uno::Any(static_cast<sal_Int32>(23)));
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1329,7 +1329,7 @@ void SdOOXMLExportTest3::testTdf125360_1()
uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef));
- xShape->setPropertyValue("FillTransparence", uno::makeAny(static_cast<sal_Int32>(23)));
+ xShape->setPropertyValue("FillTransparence", uno::Any(static_cast<sal_Int32>(23)));
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
@@ -1356,7 +1356,7 @@ void SdOOXMLExportTest3::testTdf125360_2()
xShape->getPropertyValue("FillTransparence") >>= nTransparence;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(82), nTransparence);
- xShape->setPropertyValue("FillTransparence", uno::makeAny(static_cast<sal_Int32>(23)));
+ xShape->setPropertyValue("FillTransparence", uno::Any(static_cast<sal_Int32>(23)));
utl::TempFile tempFile;
xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index be1b2d08c6ab..2e1a3ad5ec30 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -667,7 +667,7 @@ void SdExportTest::testTdf128985()
xPropSet->getPropertyValue( "WritingMode" ) >>= nWritingMode;
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, nWritingMode);
- xPropSet->setPropertyValue("WritingMode", uno::makeAny(text::WritingMode2::LR_TB));
+ xPropSet->setPropertyValue("WritingMode", uno::Any(text::WritingMode2::LR_TB));
xDocShRef = saveAndReload( xDocShRef.get(), ODP );
}
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 1dcc2566afb4..f864dfa6b938 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -372,8 +372,8 @@ void SdMiscTest::testFillGradient()
awt::Gradient aGradient;
aGradient.StartColor = sal_Int32(Color(255, 0, 0));
aGradient.EndColor = sal_Int32(Color(0, 255, 0));
- xPropSet->setPropertyValue("FillStyle", uno::makeAny(drawing::FillStyle_GRADIENT));
- xPropSet->setPropertyValue("FillGradient", uno::makeAny(aGradient));
+ xPropSet->setPropertyValue("FillStyle", uno::Any(drawing::FillStyle_GRADIENT));
+ xPropSet->setPropertyValue("FillGradient", uno::Any(aGradient));
// Add the rectangle to the page.
xShapes->add(xShape1);
@@ -469,7 +469,7 @@ void SdMiscTest::testTdf120527()
xFactory->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY);
CPPUNIT_ASSERT(xBitmaps.is());
OUString aGraphicURL = m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf120527.jpg");
- xBitmaps->insertByName("test", uno::makeAny(aGraphicURL));
+ xBitmaps->insertByName("test", uno::Any(aGraphicURL));
// Create a graphic.
uno::Reference<drawing::XShape> xShape(
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 41664efb3497..f035c1f68fac 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -195,9 +195,9 @@ static void lcl_search(const OUString& rKey, bool bFindAll = false, bool bBackwa
SvxSearchCmd eSearch = bFindAll ? SvxSearchCmd::FIND_ALL : SvxSearchCmd::FIND;
uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence({
- { "SearchItem.SearchString", uno::makeAny(rKey) },
- { "SearchItem.Backward", uno::makeAny(bBackwards) },
- { "SearchItem.Command", uno::makeAny(sal_uInt16(eSearch)) },
+ { "SearchItem.SearchString", uno::Any(rKey) },
+ { "SearchItem.Backward", uno::Any(bBackwards) },
+ { "SearchItem.Command", uno::Any(sal_uInt16(eSearch)) },
}));
comphelper::dispatchCommand(".uno:ExecuteSearch", aPropertyValues);
@@ -341,7 +341,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf143412)
OUString aImageURL = m_directories.getURLFromSrc(u"sd/qa/unit/data/tdf143412.svg");
uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence({
- { "FileName", uno::makeAny(aImageURL) },
+ { "FileName", uno::Any(aImageURL) },
}));
dispatchCommand(mxComponent, ".uno:InsertGraphic", aArgs);
@@ -530,10 +530,10 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testmoveSlides)
sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
uno::Sequence<beans::PropertyValue> aArgs(
- comphelper::InitPropertySequence({ { "PageName", uno::makeAny(OUString("Test 1")) },
- { "WhatLayout", uno::makeAny(sal_Int32(1)) },
- { "IsPageBack", uno::makeAny(false) },
- { "IsPageObj", uno::makeAny(false) } }));
+ comphelper::InitPropertySequence({ { "PageName", uno::Any(OUString("Test 1")) },
+ { "WhatLayout", uno::Any(sal_Int32(1)) },
+ { "IsPageBack", uno::Any(false) },
+ { "IsPageObj", uno::Any(false) } }));
dispatchCommand(mxComponent, ".uno:InsertPage", aArgs);
Scheduler::ProcessEventsToIdle();
@@ -541,10 +541,10 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testmoveSlides)
CPPUNIT_ASSERT_EQUAL(OUString("Test 1"), pViewShell->GetActualPage()->GetName());
- aArgs = comphelper::InitPropertySequence({ { "PageName", uno::makeAny(OUString("Test 2")) },
- { "WhatLayout", uno::makeAny(sal_Int32(1)) },
- { "IsPageBack", uno::makeAny(false) },
- { "IsPageObj", uno::makeAny(false) } });
+ aArgs = comphelper::InitPropertySequence({ { "PageName", uno::Any(OUString("Test 2")) },
+ { "WhatLayout", uno::Any(sal_Int32(1)) },
+ { "IsPageBack", uno::Any(false) },
+ { "IsPageObj", uno::Any(false) } });
dispatchCommand(mxComponent, ".uno:InsertPage", aArgs);
Scheduler::ProcessEventsToIdle();
@@ -591,7 +591,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf141703)
auto pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
- { { "Rows", uno::makeAny(sal_Int32(2)) }, { "Columns", uno::makeAny(sal_Int32(2)) } }));
+ { { "Rows", uno::Any(sal_Int32(2)) }, { "Columns", uno::Any(sal_Int32(2)) } }));
dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
Scheduler::ProcessEventsToIdle();
@@ -656,7 +656,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127481)
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), pActualPage->GetObjCount());
uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
- { { "Rows", uno::makeAny(sal_Int32(1)) }, { "Columns", uno::makeAny(sal_Int32(1)) } }));
+ { { "Rows", uno::Any(sal_Int32(1)) }, { "Columns", uno::Any(sal_Int32(1)) } }));
dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
Scheduler::ProcessEventsToIdle();
@@ -690,7 +690,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testPageFillColor)
// Set FillPageColor
uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence({
- { "Color", uno::makeAny(OUString("ff0000")) },
+ { "Color", uno::Any(OUString("ff0000")) },
}));
dispatchCommand(mxComponent, ".uno:FillPageColor", aPropertyValues);
@@ -717,7 +717,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testPageFillGradient)
uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence({
{ "FillPageGradientJSON",
- uno::makeAny(
+ uno::Any(
OUString("{\"style\":\"LINEAR\",\"startcolor\":\"ff0000\",\"endcolor\":\"0000ff\","
"\"angle\":\"300\",\"border\":\"0\",\"x\":\"0\",\"y\":\"0\",\"intensstart\":"
"\"100\",\"intensend\":\"100\",\"stepcount\":\"0\"}")) },
@@ -772,12 +772,12 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testSpellOnlineParameter)
bool bSet = pImpressDocument->GetDoc()->GetOnlineSpell();
uno::Sequence<beans::PropertyValue> params(
- comphelper::InitPropertySequence({ { "Enable", uno::makeAny(!bSet) } }));
+ comphelper::InitPropertySequence({ { "Enable", uno::Any(!bSet) } }));
dispatchCommand(mxComponent, ".uno:SpellOnline", params);
CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell());
// set the same state as now and we don't expect any change (no-toggle)
- params = comphelper::InitPropertySequence({ { "Enable", uno::makeAny(!bSet) } });
+ params = comphelper::InitPropertySequence({ { "Enable", uno::Any(!bSet) } });
dispatchCommand(mxComponent, ".uno:SpellOnline", params);
CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell());
}
@@ -791,7 +791,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf38669)
// Insert shape with ctrl key
uno::Sequence<beans::PropertyValue> aArgs(
- comphelper::InitPropertySequence({ { "KeyModifier", uno::makeAny(KEY_MOD1) } }));
+ comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) } }));
dispatchCommand(mxComponent, ".uno:BasicShapes.rectangle", aArgs);
Scheduler::ProcessEventsToIdle();
@@ -822,7 +822,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf123841)
CPPUNIT_ASSERT(pImpressDocument);
uno::Sequence<beans::PropertyValue> aArgs(
- comphelper::InitPropertySequence({ { "KeyModifier", uno::makeAny(KEY_MOD1) } }));
+ comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) } }));
dispatchCommand(mxComponent, ".uno:Rect_Unfilled", aArgs);
Scheduler::ProcessEventsToIdle();
@@ -915,7 +915,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testCharColorTheme)
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
uno::Reference<view::XSelectionSupplier> xController(xModel->getCurrentController(),
uno::UNO_QUERY);
- xController->select(uno::makeAny(xShape));
+ xController->select(uno::Any(xShape));
Scheduler::ProcessEventsToIdle();
dispatchCommand(mxComponent, ".uno:Text", {});
Scheduler::ProcessEventsToIdle();
@@ -971,7 +971,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testFillColorTheme)
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
uno::Reference<view::XSelectionSupplier> xController(xModel->getCurrentController(),
uno::UNO_QUERY);
- xController->select(uno::makeAny(xShape));
+ xController->select(uno::Any(xShape));
// When setting the fill color of that shape, with theme metadata:
uno::Sequence<beans::PropertyValue> aColorArgs = {