diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-03 16:22:03 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-03 21:38:56 +0200 |
commit | ca734f7cfa55814a85d5940e5f64d7c53638f6a7 (patch) | |
tree | 6958c7a84693891a687f29eead25297da0470e46 /sw/qa | |
parent | dc3b0983561f9166da9f3d48f8c64f9077193b0c (diff) |
Just use Any ctor instead of makeAny in sw
Change-Id: I2c9023ba8d07314d23ae7a65e670e8748c5e9322
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133766
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/qa')
45 files changed, 396 insertions, 412 deletions
diff --git a/sw/qa/api/SwXTextField.cxx b/sw/qa/api/SwXTextField.cxx index 27a6eb40891c..5c8464233131 100644 --- a/sw/qa/api/SwXTextField.cxx +++ b/sw/qa/api/SwXTextField.cxx @@ -78,9 +78,9 @@ Reference<XInterface> SwXTextField::init() Reference<XPropertySet> xFieldMaster( xMSF->createInstance("com.sun.star.text.FieldMaster.Database"), UNO_QUERY_THROW); - xFieldMaster->setPropertyValue("DataBaseName", makeAny(OUString("Address Book File"))); - xFieldMaster->setPropertyValue("DataTableName", makeAny(OUString("address"))); - xFieldMaster->setPropertyValue("DataColumnName", makeAny(OUString("FIRSTNAME"))); + xFieldMaster->setPropertyValue("DataBaseName", Any(OUString("Address Book File"))); + xFieldMaster->setPropertyValue("DataTableName", Any(OUString("address"))); + xFieldMaster->setPropertyValue("DataColumnName", Any(OUString("FIRSTNAME"))); Reference<text::XDependentTextField> xField( xMSF->createInstance("com.sun.star.text.TextField.Database"), UNO_QUERY_THROW); diff --git a/sw/qa/core/crsr/crsr.cxx b/sw/qa/core/crsr/crsr.cxx index 0b93fcc43522..e95d0d541c12 100644 --- a/sw/qa/core/crsr/crsr.cxx +++ b/sw/qa/core/crsr/crsr.cxx @@ -52,14 +52,14 @@ CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testFindReplace) xViewCursor->goLeft(/*nCount=*/6, /*bExpand=*/false); xViewCursor->goLeft(/*nCount=*/1, /*bExpand=*/true); uno::Reference<beans::XPropertySet> xViewCursorProps(xViewCursor, uno::UNO_QUERY); - xViewCursorProps->setPropertyValue("CharWeight", uno::makeAny(awt::FontWeight::BOLD)); + xViewCursorProps->setPropertyValue("CharWeight", uno::Any(awt::FontWeight::BOLD)); xViewCursor->gotoStart(/*bExpand=*/false); // When: doing search & replace 3 times. uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence({ - { "SearchItem.SearchString", uno::makeAny(OUString("foo")) }, - { "SearchItem.ReplaceString", uno::makeAny(OUString("bar")) }, - { "SearchItem.Command", uno::makeAny(static_cast<sal_Int16>(SvxSearchCmd::REPLACE)) }, + { "SearchItem.SearchString", uno::Any(OUString("foo")) }, + { "SearchItem.ReplaceString", uno::Any(OUString("bar")) }, + { "SearchItem.Command", uno::Any(static_cast<sal_Int16>(SvxSearchCmd::REPLACE)) }, })); // Find the first foo. dispatchCommand(mxComponent, ".uno:ExecuteSearch", aArgs); diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx index 43894afa03dc..d370d89baefc 100644 --- a/sw/qa/core/doc/doc.cxx +++ b/sw/qa/core/doc/doc.cxx @@ -210,10 +210,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testImageHyperlinkStyle) xText->insertTextContent(xCursor, xImage, /*bAbsorb=*/false); uno::Reference<beans::XPropertySet> xImageProps(xImage, uno::UNO_QUERY); OUString aExpected = "http://www.example.com"; - xImageProps->setPropertyValue("HyperLinkURL", uno::makeAny(aExpected)); + xImageProps->setPropertyValue("HyperLinkURL", uno::Any(aExpected)); // When applying a frame style on it: - xImageProps->setPropertyValue("FrameStyleName", uno::makeAny(OUString("Frame"))); + xImageProps->setPropertyValue("FrameStyleName", uno::Any(OUString("Frame"))); // Then make sure that the hyperlink is not lost: auto aActual = getProperty<OUString>(xImageProps, "HyperLinkURL"); diff --git a/sw/qa/core/fields/fields.cxx b/sw/qa/core/fields/fields.cxx index a0c5a2c86c7e..9df1baf12b2d 100644 --- a/sw/qa/core/fields/fields.cxx +++ b/sw/qa/core/fields/fields.cxx @@ -43,7 +43,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAuthorityTooltip) comphelper::makePropertyValue("Title", OUString("mytitle")), comphelper::makePropertyValue("Year", OUString("2020")), }; - xField->setPropertyValue("Fields", uno::makeAny(aFields)); + xField->setPropertyValue("Fields", uno::Any(aFields)); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); diff --git a/sw/qa/core/frmedt/frmedt.cxx b/sw/qa/core/frmedt/frmedt.cxx index 5742f230c1c4..850dcc65571f 100644 --- a/sw/qa/core/frmedt/frmedt.cxx +++ b/sw/qa/core/frmedt/frmedt.cxx @@ -71,13 +71,11 @@ CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testVertPosFromBottomBoundingBox) xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY); xShape->setSize(awt::Size(10000, 10000)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); - xShapeProps->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); - xShapeProps->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::NONE)); + xShapeProps->setPropertyValue("AnchorType", uno::Any(text::TextContentAnchorType_AT_CHARACTER)); + xShapeProps->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::NONE)); xShapeProps->setPropertyValue("VertOrientRelation", - uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); - xShapeProps->setPropertyValue("VertOrientPosition", - uno::makeAny(static_cast<sal_Int32>(-11000))); + uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); + xShapeProps->setPropertyValue("VertOrientPosition", uno::Any(static_cast<sal_Int32>(-11000))); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); xDrawPageSupplier->getDrawPage()->add(xShape); diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx index 61a8614b4ac2..11a1df0d7be9 100644 --- a/sw/qa/core/layout/layout.cxx +++ b/sw/qa/core/layout/layout.cxx @@ -294,7 +294,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterMargin) // Set the gutter margin to 2cm. sal_Int32 nGutterMm100 = 2000; - xStandard->setPropertyValue("GutterMargin", uno::makeAny(nGutterMm100)); + xStandard->setPropertyValue("GutterMargin", uno::Any(nGutterMm100)); // Verify that the new left edge is larger. tools::Long nNewLeft = pPage->getFramePrintArea().Left(); @@ -314,7 +314,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterTopMargin) uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xSettings( xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); - xSettings->setPropertyValue("GutterAtTop", uno::makeAny(true)); + xSettings->setPropertyValue("GutterAtTop", uno::Any(true)); uno::Reference<beans::XPropertySet> xStandard(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); @@ -323,7 +323,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterTopMargin) // Set the gutter margin to 2cm. sal_Int32 nGutterMm100 = 2000; - xStandard->setPropertyValue("GutterMargin", uno::makeAny(nGutterMm100)); + xStandard->setPropertyValue("GutterMargin", uno::Any(nGutterMm100)); // Verify that the new top edge is larger. tools::Long nNewTop = pPage->getFramePrintArea().Top(); @@ -349,9 +349,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterMirrorMargin) uno::Reference<beans::XPropertySet> xStandard(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); - xStandard->setPropertyValue("PageStyleLayout", uno::makeAny(style::PageStyleLayout_MIRRORED)); + xStandard->setPropertyValue("PageStyleLayout", uno::Any(style::PageStyleLayout_MIRRORED)); sal_Int32 nGutterMm100 = 2000; - xStandard->setPropertyValue("GutterMargin", uno::makeAny(nGutterMm100)); + xStandard->setPropertyValue("GutterMargin", uno::Any(nGutterMm100)); tools::Long nNewLeft = pPage->getFramePrintArea().Left(); tools::Long nGutterTwips = o3tl::toTwips(nGutterMm100, o3tl::Length::mm100); @@ -375,9 +375,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testRtlGutterMargin) tools::Long nOldRight = pPage->getFramePrintArea().Right(); // When setting enable RTL gutter mode and setting a gutter margin: - xStandard->setPropertyValue("RtlGutter", uno::makeAny(true)); + xStandard->setPropertyValue("RtlGutter", uno::Any(true)); sal_Int32 nGutterMm100 = 2000; - xStandard->setPropertyValue("GutterMargin", uno::makeAny(nGutterMm100)); + xStandard->setPropertyValue("GutterMargin", uno::Any(nGutterMm100)); // Then make sure the new right edge of the print area is decreased: tools::Long nNewRight = pPage->getFramePrintArea().Right(); diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index 91c7a928a46a..6840a6884a05 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -239,7 +239,7 @@ void SwMacrosTest::testControlShapeGrouping() UNO_QUERY); xDateShape->setControl(xDateControlModel); uno::Reference<beans::XPropertySet> xDateShapeProps(xDateShape, UNO_QUERY); - xDateShapeProps->setPropertyValue("AnchorType", makeAny(text::TextContentAnchorType_AT_PARAGRAPH)); + xDateShapeProps->setPropertyValue("AnchorType", Any(text::TextContentAnchorType_AT_PARAGRAPH)); uno::Reference<drawing::XControlShape> const xTimeShape( xFactory->createInstance("com.sun.star.drawing.ControlShape"), @@ -249,11 +249,11 @@ void SwMacrosTest::testControlShapeGrouping() UNO_QUERY); xTimeShape->setControl(xTimeControlModel); uno::Reference<beans::XPropertySet> xTimeShapeProps(xTimeShape, UNO_QUERY); - xTimeShapeProps->setPropertyValue("AnchorType", makeAny(text::TextContentAnchorType_AT_PARAGRAPH)); + xTimeShapeProps->setPropertyValue("AnchorType", Any(text::TextContentAnchorType_AT_PARAGRAPH)); - xFormNC->insertByName("aDateCntrl", makeAny(xDateControlModel)); + xFormNC->insertByName("aDateCntrl", Any(xDateControlModel)); xDPShapes->add(xDateShape); - xFormNC->insertByName("aTimeCntrl", makeAny(xTimeControlModel)); + xFormNC->insertByName("aTimeCntrl", Any(xTimeControlModel)); xDPShapes->add(xTimeShape); xShapes->add(xDateShape); @@ -323,16 +323,16 @@ void SwMacrosTest::testFdo55289() createInstance("com.sun.star.drawing.GraphicObjectShape"), UNO_QUERY); xShape->setPropertyValue("AnchorType", - makeAny(text::TextContentAnchorType_AT_PAGE)); + Any(text::TextContentAnchorType_AT_PAGE)); xShapes->add(uno::Reference<drawing::XShape>(xShape, UNO_QUERY)); xShape->setPropertyValue("AnchorType", - makeAny(text::TextContentAnchorType_AT_CHARACTER)); + Any(text::TextContentAnchorType_AT_CHARACTER)); xShape->setPropertyValue("AnchorType", - makeAny(text::TextContentAnchorType_AS_CHARACTER)); + Any(text::TextContentAnchorType_AS_CHARACTER)); xShape->setPropertyValue("AnchorType", - makeAny(text::TextContentAnchorType_AT_CHARACTER)); + Any(text::TextContentAnchorType_AT_CHARACTER)); xShape->setPropertyValue("AnchorType", - makeAny(text::TextContentAnchorType_AS_CHARACTER)); + Any(text::TextContentAnchorType_AS_CHARACTER)); uno::Reference<text::XTextRange> const xEnd = uno::Reference<text::XTextDocument>(xModel, UNO_QUERY_THROW)->getText()->getEnd(); uno::Reference<text::XTextContent> const xShapeContent(xShape, UNO_QUERY); @@ -395,7 +395,7 @@ void SwMacrosTest::testFdo87530() Reference<script::XLibraryContainerPassword> xBasLibPwd(xStorBasLib, UNO_QUERY_THROW); Reference<container::XNameContainer> xLibrary(xBasLib->createLibrary("BarLibrary")); xLibrary->insertByName("BarModule", - uno::makeAny(OUString("Sub Main\nEnd Sub\n"))); + uno::Any(OUString("Sub Main\nEnd Sub\n"))); xBasLibPwd->changeLibraryPassword("BarLibrary", "", "foo"); Reference<frame::XStorable> xDocStorable(xComponent, UNO_QUERY_THROW); @@ -424,7 +424,7 @@ void SwMacrosTest::testFdo87530() // add a second module now - tdf#87530 happened here Reference<container::XNameContainer> xFooLib(xBasLib->createLibrary("FooLibrary")); xFooLib->insertByName("FooModule", - uno::makeAny(OUString("Sub Main\nEnd Sub\n"))); + uno::Any(OUString("Sub Main\nEnd Sub\n"))); xBasLibPwd->changeLibraryPassword("FooLibrary", "", "foo"); // store again diff --git a/sw/qa/core/objectpositioning/objectpositioning.cxx b/sw/qa/core/objectpositioning/objectpositioning.cxx index 7c91bc797512..e3aace4ffc87 100644 --- a/sw/qa/core/objectpositioning/objectpositioning.cxx +++ b/sw/qa/core/objectpositioning/objectpositioning.cxx @@ -30,9 +30,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testOverlapCrash) // Change their anchor type to to-char. uno::Reference<beans::XPropertySet> xShape1(getShape(1), uno::UNO_QUERY); - xShape1->setPropertyValue("AnchorType", uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); + xShape1->setPropertyValue("AnchorType", uno::Any(text::TextContentAnchorType_AT_CHARACTER)); uno::Reference<beans::XPropertySet> xShape2(getShape(1), uno::UNO_QUERY); - xShape2->setPropertyValue("AnchorType", uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); + xShape2->setPropertyValue("AnchorType", uno::Any(text::TextContentAnchorType_AT_CHARACTER)); // Insert a new paragraph at the start. SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); @@ -51,13 +51,11 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertPosFromBottom) xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY); xShape->setSize(awt::Size(10000, 10000)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); - xShapeProps->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); - xShapeProps->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::NONE)); + xShapeProps->setPropertyValue("AnchorType", uno::Any(text::TextContentAnchorType_AT_CHARACTER)); + xShapeProps->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::NONE)); xShapeProps->setPropertyValue("VertOrientRelation", - uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); - xShapeProps->setPropertyValue("VertOrientPosition", - uno::makeAny(static_cast<sal_Int32>(-11000))); + uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); + xShapeProps->setPropertyValue("VertOrientPosition", uno::Any(static_cast<sal_Int32>(-11000))); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); xDrawPageSupplier->getDrawPage()->add(xShape); @@ -87,10 +85,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMargin) xShapeBottom->setSize(awt::Size(500, 500)); uno::Reference<beans::XPropertySet> xShapePropsBottom(xShapeBottom, uno::UNO_QUERY); xShapePropsBottom->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); - xShapePropsBottom->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::BOTTOM)); + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); + xShapePropsBottom->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::BOTTOM)); xShapePropsBottom->setPropertyValue("VertOrientRelation", - uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); + uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplierBottom(mxComponent, uno::UNO_QUERY); xDrawPageSupplierBottom->getDrawPage()->add(xShapeBottom); @@ -100,10 +98,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMargin) xShapeCenter->setSize(awt::Size(500, 500)); uno::Reference<beans::XPropertySet> xShapePropsCenter(xShapeCenter, uno::UNO_QUERY); xShapePropsCenter->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); - xShapePropsCenter->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::CENTER)); + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); + xShapePropsCenter->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::CENTER)); xShapePropsCenter->setPropertyValue("VertOrientRelation", - uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); + uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplierCenter(mxComponent, uno::UNO_QUERY); xDrawPageSupplierCenter->getDrawPage()->add(xShapeCenter); @@ -113,10 +111,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMargin) xShapeTop->setSize(awt::Size(500, 500)); uno::Reference<beans::XPropertySet> xShapePropsTop(xShapeTop, uno::UNO_QUERY); xShapePropsTop->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); - xShapePropsTop->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::TOP)); + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); + xShapePropsTop->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::TOP)); xShapePropsTop->setPropertyValue("VertOrientRelation", - uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); + uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplierTop(mxComponent, uno::UNO_QUERY); xDrawPageSupplierTop->getDrawPage()->add(xShapeTop); @@ -159,10 +157,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMarginWithF xShapeBottom->setSize(awt::Size(1000, 1000)); uno::Reference<beans::XPropertySet> xShapePropsBottom(xShapeBottom, uno::UNO_QUERY); xShapePropsBottom->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); - xShapePropsBottom->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::BOTTOM)); + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); + xShapePropsBottom->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::BOTTOM)); xShapePropsBottom->setPropertyValue("VertOrientRelation", - uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); + uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplierBottom(mxComponent, uno::UNO_QUERY); xDrawPageSupplierBottom->getDrawPage()->add(xShapeBottom); @@ -172,10 +170,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMarginWithF xShapeCenter->setSize(awt::Size(1000, 1000)); uno::Reference<beans::XPropertySet> xShapePropsCenter(xShapeCenter, uno::UNO_QUERY); xShapePropsCenter->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); - xShapePropsCenter->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::CENTER)); + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); + xShapePropsCenter->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::CENTER)); xShapePropsCenter->setPropertyValue("VertOrientRelation", - uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); + uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplierCenter(mxComponent, uno::UNO_QUERY); xDrawPageSupplierCenter->getDrawPage()->add(xShapeCenter); @@ -185,10 +183,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVertAlignBottomMarginWithF xShapeTop->setSize(awt::Size(1000, 1000)); uno::Reference<beans::XPropertySet> xShapePropsTop(xShapeTop, uno::UNO_QUERY); xShapePropsTop->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); - xShapePropsTop->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::TOP)); + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); + xShapePropsTop->setPropertyValue("VertOrient", uno::Any(text::VertOrientation::TOP)); xShapePropsTop->setPropertyValue("VertOrientRelation", - uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); + uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplierTop(mxComponent, uno::UNO_QUERY); xDrawPageSupplierTop->getDrawPage()->add(xShapeTop); diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx index f6c4023af944..2db4d6dab348 100644 --- a/sw/qa/core/text/text.cxx +++ b/sw/qa/core/text/text.cxx @@ -67,7 +67,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testSemiTransparentText) uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY); CPPUNIT_ASSERT(xParagraph.is()); sal_Int16 nTransparence = 50; - xParagraph->setPropertyValue("CharTransparence", uno::makeAny(nTransparence)); + xParagraph->setPropertyValue("CharTransparence", uno::Any(nTransparence)); uno::Reference<text::XTextRange> xTextRange(xParagraph, uno::UNO_QUERY); CPPUNIT_ASSERT(xTextRange.is()); xTextRange->setString("x"); @@ -106,7 +106,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport) comphelper::makePropertyValue("Title", OUString("Title")), comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf#page=1")), }; - xField->setPropertyValue("Fields", uno::makeAny(aFields)); + xField->setPropertyValue("Fields", uno::Any(aFields)); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); @@ -273,7 +273,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreak) xFactory->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY); auto eClear = static_cast<sal_Int16>(SwLineBreakClear::ALL); - xLineBreakProps->setPropertyValue("Clear", uno::makeAny(eClear)); + xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear)); xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false); // When laying out that document: @@ -303,7 +303,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakAtStart) xFactory->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY); auto eClear = static_cast<sal_Int16>(SwLineBreakClear::ALL); - xLineBreakProps->setPropertyValue("Clear", uno::makeAny(eClear)); + xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear)); xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false); // When laying out that document: @@ -333,7 +333,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakLeft) xShape->setSize(awt::Size(5000, 5000)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); xShapeProps->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); uno::Reference<text::XTextContent> xShapeContent(xShape, uno::UNO_QUERY); xText->insertTextContent(xCursor, xShapeContent, /*bAbsorb=*/false); } @@ -343,8 +343,8 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakLeft) xShape->setSize(awt::Size(5000, 7500)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); xShapeProps->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); - xShapeProps->setPropertyValue("HoriOrientPosition", uno::makeAny(sal_Int32(10000))); + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); + xShapeProps->setPropertyValue("HoriOrientPosition", uno::Any(sal_Int32(10000))); uno::Reference<text::XTextContent> xShapeContent2(xShape, uno::UNO_QUERY); xText->insertTextContent(xCursor, xShapeContent2, /*bAbsorb=*/false); } @@ -352,7 +352,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testClearingLineBreakLeft) xFactory->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY); auto eClear = static_cast<sal_Int16>(SwLineBreakClear::LEFT); - xLineBreakProps->setPropertyValue("Clear", uno::makeAny(eClear)); + xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear)); xText->insertString(xCursor, "foo", /*bAbsorb=*/false); xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false); xText->insertString(xCursor, "bar", /*bAbsorb=*/false); @@ -395,7 +395,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testAsCharImageDocModelFromViewPoint) xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY); // Only set the anchor type, the actual bitmap content is not interesting. xTextGraphic->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AS_CHARACTER)); + uno::Any(text::TextContentAnchorType_AS_CHARACTER)); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xBodyText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor(xBodyText->createTextCursor()); diff --git a/sw/qa/core/tox/tox.cxx b/sw/qa/core/tox/tox.cxx index 1ac8764a0574..a5667a6947c0 100644 --- a/sw/qa/core/tox/tox.cxx +++ b/sw/qa/core/tox/tox.cxx @@ -43,7 +43,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAuthorityLinkClick) comphelper::makePropertyValue("Year", OUString("2020")), comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf")), }; - xField->setPropertyValue("Fields", uno::makeAny(aFields)); + xField->setPropertyValue("Fields", uno::Any(aFields)); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); @@ -84,7 +84,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAuthorityTableEntryURL) comphelper::makePropertyValue("Title", OUString("Title")), comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf#page=1")), }; - xField->setPropertyValue("Fields", uno::makeAny(aFields)); + xField->setPropertyValue("Fields", uno::Any(aFields)); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); @@ -129,7 +129,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAuthorityTableEntryClick) comphelper::makePropertyValue("Title", OUString("Title")), comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf#page=1")), }; - xField->setPropertyValue("Fields", uno::makeAny(aFields)); + xField->setPropertyValue("Fields", uno::Any(aFields)); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); @@ -177,7 +177,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAuthorityTableEntryRelClick) comphelper::makePropertyValue("Title", OUString("Title")), comphelper::makePropertyValue("URL", OUString("test.pdf#page=1")), }; - xField->setPropertyValue("Fields", uno::makeAny(aFields)); + xField->setPropertyValue("Fields", uno::Any(aFields)); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); @@ -223,7 +223,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAuthorityTableURLDeduplication) comphelper::makePropertyValue("Title", OUString("Title")), comphelper::makePropertyValue("URL", OUString(rURL)), }; - xField->setPropertyValue("Fields", uno::makeAny(aFields)); + xField->setPropertyValue("Fields", uno::Any(aFields)); uno::Reference<text::XTextContent> xContent(xField, uno::UNO_QUERY); xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false); } diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index f941c60c4aaf..567db1d1fd52 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -79,8 +79,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, flyAtParaAnchor) uno::Reference<text::XTextFrame> const xTextFrame( xMSF->createInstance("com.sun.star.text.TextFrame"), uno::UNO_QUERY_THROW); uno::Reference<beans::XPropertySet> const xFrameProps(xTextFrame, uno::UNO_QUERY_THROW); - xFrameProps->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_PARAGRAPH)); + xFrameProps->setPropertyValue("AnchorType", uno::Any(text::TextContentAnchorType_AT_PARAGRAPH)); auto const xText = xTD->getText(); auto const xTextCursor = xText->createTextCursor(); CPPUNIT_ASSERT(xTextCursor.is()); @@ -101,7 +100,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testRtlGutter) // - Unknown property: RtlGutter auto bRtlGutter = getProperty<bool>(xPageStyle, "RtlGutter"); CPPUNIT_ASSERT(!bRtlGutter); - xPageStyle->setPropertyValue("RtlGutter", uno::makeAny(true)); + xPageStyle->setPropertyValue("RtlGutter", uno::Any(true)); bRtlGutter = getProperty<bool>(xPageStyle, "RtlGutter"); CPPUNIT_ASSERT(bRtlGutter); } @@ -124,7 +123,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testBiblioLocalCopy) comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf")), comphelper::makePropertyValue("LocalURL", OUString("file:///home/me/test.pdf")), }; - xField->setPropertyValue("Fields", uno::makeAny(aFields)); + xField->setPropertyValue("Fields", uno::Any(aFields)); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); @@ -150,7 +149,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testLinkedStyles) uno::Reference<beans::XPropertySet> xParaStyle(xParaStyles->getByName("Caption"), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(xParaStyle, "LinkStyle")); - xParaStyle->setPropertyValue("LinkStyle", uno::makeAny(OUString("Emphasis"))); + xParaStyle->setPropertyValue("LinkStyle", uno::Any(OUString("Emphasis"))); // Then make sure we get the linked char style back: CPPUNIT_ASSERT_EQUAL(OUString("Emphasis"), getProperty<OUString>(xParaStyle, "LinkStyle")); @@ -159,7 +158,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testLinkedStyles) uno::Reference<beans::XPropertySet> xCharStyle(xCharStyles->getByName("Emphasis"), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(xCharStyle, "LinkStyle")); - xCharStyle->setPropertyValue("LinkStyle", uno::makeAny(OUString("Caption"))); + xCharStyle->setPropertyValue("LinkStyle", uno::Any(OUString("Caption"))); // Then make sure we get the linked para style back: CPPUNIT_ASSERT_EQUAL(OUString("Caption"), getProperty<OUString>(xCharStyle, "LinkStyle")); } @@ -230,7 +229,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testLineBreakInsert) xMSF->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY); auto eClear = static_cast<sal_Int16>(SwLineBreakClear::ALL); - xLineBreakProps->setPropertyValue("Clear", uno::makeAny(eClear)); + xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear)); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false); @@ -261,7 +260,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testLineBreakTextPortionEnum) xMSF->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY); auto eClear = static_cast<sal_Int16>(SwLineBreakClear::ALL); - xLineBreakProps->setPropertyValue("Clear", uno::makeAny(eClear)); + xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear)); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false); @@ -291,9 +290,9 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testUserFieldTooltip) xFactory->createInstance("com.sun.star.text.TextField.User"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xMaster( xFactory->createInstance("com.sun.star.text.FieldMaster.User"), uno::UNO_QUERY); - xMaster->setPropertyValue("Name", uno::makeAny(OUString("a_user_field"))); + xMaster->setPropertyValue("Name", uno::Any(OUString("a_user_field"))); xField->attachTextFieldMaster(xMaster); - xField->getTextFieldMaster()->setPropertyValue("Content", uno::makeAny(OUString("42"))); + xField->getTextFieldMaster()->setPropertyValue("Content", uno::Any(OUString("42"))); uno::Reference<text::XTextDocument> xDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xText = xDocument->getText(); xText->insertTextContent(xText->createTextCursor(), xField, /*bAbsorb=*/false); @@ -301,7 +300,7 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testUserFieldTooltip) // When setting a tooltip on the field: OUString aExpected("first line\nsecond line"); - xFieldProps->setPropertyValue("Title", uno::makeAny(aExpected)); + xFieldProps->setPropertyValue("Title", uno::Any(aExpected)); // Then make sure that the tooltip we read back matches the one previously specified: // Without the accompanying fix in place, this test would have failed with: @@ -327,7 +326,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlInsert) xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY); // Set a custom property on the content control: uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY); - xContentControlProps->setPropertyValue("ShowingPlaceHolder", uno::makeAny(true)); + xContentControlProps->setPropertyValue("ShowingPlaceHolder", uno::Any(true)); xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true); // Then make sure that the text attribute is inserted: @@ -358,11 +357,11 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testImageTooltip) xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY); xText->insertTextContent(xCursor, xImage, /*bAbsorb=*/false); uno::Reference<beans::XPropertySet> xImageProps(xImage, uno::UNO_QUERY); - xImageProps->setPropertyValue("HyperLinkURL", uno::makeAny(OUString("http://www.example.com"))); + xImageProps->setPropertyValue("HyperLinkURL", uno::Any(OUString("http://www.example.com"))); // When setting a tooltip on the image: OUString aExpected("first line\nsecond line"); - xImageProps->setPropertyValue("Tooltip", uno::makeAny(aExpected)); + xImageProps->setPropertyValue("Tooltip", uno::Any(aExpected)); // Then make sure that the tooltip we read back matches the one previously specified: // Without the accompanying fix in place, this test would have failed with: @@ -436,10 +435,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlCheckbox) uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY); // Without the accompanying fix in place, this test would have failed with: // An uncaught exception of type com.sun.star.beans.UnknownPropertyException - xContentControlProps->setPropertyValue("Checkbox", uno::makeAny(true)); - xContentControlProps->setPropertyValue("Checked", uno::makeAny(true)); - xContentControlProps->setPropertyValue("CheckedState", uno::makeAny(OUString(u"☒"))); - xContentControlProps->setPropertyValue("UncheckedState", uno::makeAny(OUString(u"☐"))); + xContentControlProps->setPropertyValue("Checkbox", uno::Any(true)); + xContentControlProps->setPropertyValue("Checked", uno::Any(true)); + xContentControlProps->setPropertyValue("CheckedState", uno::Any(OUString(u"☒"))); + xContentControlProps->setPropertyValue("UncheckedState", uno::Any(OUString(u"☐"))); xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true); // Then make sure that the specified properties are set: diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx index d330384ae4ac..ae720f503f56 100644 --- a/sw/qa/extras/globalfilter/globalfilter.cxx +++ b/sw/qa/extras/globalfilter/globalfilter.cxx @@ -646,27 +646,27 @@ void Test::testCharHighlightODF() switch (i) { case 1: // non-transparent highlight - xRun->setPropertyValue("CharBackColor", uno::makeAny(static_cast<sal_Int32>(128))); - xRun->setPropertyValue("CharBackTransparent", uno::makeAny(true)); - xRun->setPropertyValue("CharHighlight", uno::makeAny(static_cast<sal_Int32>(64))); + xRun->setPropertyValue("CharBackColor", uno::Any(static_cast<sal_Int32>(128))); + xRun->setPropertyValue("CharBackTransparent", uno::Any(true)); + xRun->setPropertyValue("CharHighlight", uno::Any(static_cast<sal_Int32>(64))); break; case 2: // transparent backcolor - xRun->setPropertyValue("CharBackColor", uno::makeAny(static_cast<sal_Int32>(128))); - xRun->setPropertyValue("CharBackTransparent", uno::makeAny(true)); - xRun->setPropertyValue("CharHighlight", uno::makeAny(static_cast<sal_Int32>(COL_TRANSPARENT))); + xRun->setPropertyValue("CharBackColor", uno::Any(static_cast<sal_Int32>(128))); + xRun->setPropertyValue("CharBackTransparent", uno::Any(true)); + xRun->setPropertyValue("CharHighlight", uno::Any(static_cast<sal_Int32>(COL_TRANSPARENT))); break; case 3: // non-transparent backcolor - xRun->setPropertyValue("CharBackColor", uno::makeAny(static_cast<sal_Int32>(128))); - xRun->setPropertyValue("CharBackTransparent", uno::makeAny(false)); - xRun->setPropertyValue("CharHighlight", uno::makeAny(static_cast<sal_Int32>(COL_TRANSPARENT))); + xRun->setPropertyValue("CharBackColor", uno::Any(static_cast<sal_Int32>(128))); + xRun->setPropertyValue("CharBackTransparent", uno::Any(false)); + xRun->setPropertyValue("CharHighlight", uno::Any(static_cast<sal_Int32>(COL_TRANSPARENT))); break; case 4: // non-transparent highlight again - xRun->setPropertyValue("CharBackColor", uno::makeAny(static_cast<sal_Int32>(128))); - xRun->setPropertyValue("CharBackTransparent", uno::makeAny(false)); - xRun->setPropertyValue("CharHighlight", uno::makeAny(static_cast<sal_Int32>(64))); + xRun->setPropertyValue("CharBackColor", uno::Any(static_cast<sal_Int32>(128))); + xRun->setPropertyValue("CharBackTransparent", uno::Any(false)); + xRun->setPropertyValue("CharHighlight", uno::Any(static_cast<sal_Int32>(64))); break; } } @@ -765,9 +765,9 @@ void Test::testMSCharBackgroundEditing() case 3: nBackColor = COL_LIGHTGREEN; break; //green 0x00ff00 case 4: nBackColor = COL_LIGHTMAGENTA; break; //magenta 0xff00ff } - xRun->setPropertyValue("CharBackColor", uno::makeAny(nBackColor)); + xRun->setPropertyValue("CharBackColor", uno::Any(nBackColor)); // Remove highlighting - xRun->setPropertyValue("CharHighlight", uno::makeAny(COL_TRANSPARENT)); + xRun->setPropertyValue("CharHighlight", uno::Any(COL_TRANSPARENT)); // Remove shading marker uno::Sequence<beans::PropertyValue> aGrabBag = getProperty<uno::Sequence<beans::PropertyValue> >(xRun,"CharInteropGrabBag"); for (beans::PropertyValue& rProp : asNonConstRange(aGrabBag)) @@ -778,7 +778,7 @@ void Test::testMSCharBackgroundEditing() rProp.Value <<= false; } } - xRun->setPropertyValue("CharInteropGrabBag", uno::makeAny(aGrabBag)); + xRun->setPropertyValue("CharInteropGrabBag", uno::Any(aGrabBag)); } SvtFilterOptions& rOpt = SvtFilterOptions::Get(); diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index 8695a164b3fb..ff9d6504bb72 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -834,7 +834,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIfTableHeight) uno::UNO_QUERY); uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xRow(xTable->getRows()->getByIndex(0), uno::UNO_QUERY); - xRow->setPropertyValue("Height", uno::makeAny(static_cast<sal_Int32>(1000))); + xRow->setPropertyValue("Height", uno::Any(static_cast<sal_Int32>(1000))); // When exporting to reqif-xhtml: ExportToReqif(); @@ -1073,7 +1073,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testBlockQuoteReqIf) // Build a document model that uses the Quotations paragraph style. loadURL("private:factory/swriter", nullptr); uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY); - xParagraph->setPropertyValue("ParaStyleName", uno::makeAny(OUString("Quotations"))); + xParagraph->setPropertyValue("ParaStyleName", uno::Any(OUString("Quotations"))); // Export it. uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); @@ -1143,8 +1143,8 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifComment) // Create a document with a comment in it. loadURL("private:factory/swriter", nullptr); uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({ - { "Text", uno::makeAny(OUString("some text")) }, - { "Author", uno::makeAny(OUString("me")) }, + { "Text", uno::Any(OUString("some text")) }, + { "Author", uno::Any(OUString("me")) }, }); dispatchCommand(mxComponent, ".uno:InsertAnnotation", aPropertyValues); @@ -1164,11 +1164,11 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifFontNameSize) // Create a document with a custom font name and size in it. loadURL("private:factory/swriter", nullptr); uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY); - xParagraph->setPropertyValue("CharFontName", uno::makeAny(OUString("Liberation Serif"))); + xParagraph->setPropertyValue("CharFontName", uno::Any(OUString("Liberation Serif"))); float fCharHeight = 14.0; - xParagraph->setPropertyValue("CharHeight", uno::makeAny(fCharHeight)); + xParagraph->setPropertyValue("CharHeight", uno::Any(fCharHeight)); sal_Int32 nCharColor = 0xff0000; - xParagraph->setPropertyValue("CharColor", uno::makeAny(nCharColor)); + xParagraph->setPropertyValue("CharColor", uno::Any(nCharColor)); uno::Reference<text::XTextRange> xTextRange(xParagraph, uno::UNO_QUERY); xTextRange->setString("x"); @@ -1192,8 +1192,8 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifParagraphAlignment) // Create a document with an explicitly aligned paragraph. loadURL("private:factory/swriter", nullptr); uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY); - xParagraph->setPropertyValue( - "ParaAdjust", uno::makeAny(static_cast<sal_Int16>(style::ParagraphAdjust_RIGHT))); + xParagraph->setPropertyValue("ParaAdjust", + uno::Any(static_cast<sal_Int16>(style::ParagraphAdjust_RIGHT))); // Export it. ExportToReqif(); @@ -1362,8 +1362,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testUnderlineNone) uno::Reference<text::XText> xText = xTextDocument->getText(); xText->insertString(xText->getEnd(), "x", /*bAbsorb=*/false); uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY); - xParagraph->setPropertyValue("CharUnderline", - uno::makeAny(sal_Int16(awt::FontUnderline::NONE))); + xParagraph->setPropertyValue("CharUnderline", uno::Any(sal_Int16(awt::FontUnderline::NONE))); // Export to reqif-xhtml. ExportToReqif(); @@ -1540,9 +1539,9 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testBlockQuoteNoMargin) xText->insertString(xText->getEnd(), "string", /*bAbsorb=*/false); uno::Reference<beans::XPropertySet> xQuotations( getStyles("ParagraphStyles")->getByName("Quotations"), uno::UNO_QUERY); - xQuotations->setPropertyValue("ParaBottomMargin", uno::makeAny(static_cast<sal_Int32>(0))); + xQuotations->setPropertyValue("ParaBottomMargin", uno::Any(static_cast<sal_Int32>(0))); uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY); - xParagraph->setPropertyValue("ParaStyleName", uno::makeAny(OUString("Quotations"))); + xParagraph->setPropertyValue("ParaStyleName", uno::Any(OUString("Quotations"))); // When exporting to XHTML: ExportToReqif(); @@ -1677,7 +1676,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifEmbedPNGShapeDirectly) xFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); xShape->setSize(awt::Size(10000, 10000)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); - xShapeProps->setPropertyValue("GraphicURL", uno::makeAny(aImageURL)); + xShapeProps->setPropertyValue("GraphicURL", uno::Any(aImageURL)); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); xDrawPageSupplier->getDrawPage()->add(xShape); @@ -1710,7 +1709,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifEmbedJPGShapeDirectly) xFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); xShape->setSize(awt::Size(10000, 10000)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); - xShapeProps->setPropertyValue("GraphicURL", uno::makeAny(aImageURL)); + xShapeProps->setPropertyValue("GraphicURL", uno::Any(aImageURL)); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); xDrawPageSupplier->getDrawPage()->add(xShape); @@ -1746,7 +1745,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifEmbedPNGShapeAsOLE) xFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); xShape->setSize(awt::Size(10000, 10000)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); - xShapeProps->setPropertyValue("GraphicURL", uno::makeAny(aImageURL)); + xShapeProps->setPropertyValue("GraphicURL", uno::Any(aImageURL)); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); xDrawPageSupplier->getDrawPage()->add(xShape); diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index c543a89076e5..a55b6ce0bc92 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -3657,10 +3657,10 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testShapeAllowOverlapWrap) xShape->setSize(aSize); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xDocument, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xShapeProperties(xShape, uno::UNO_QUERY); - xShapeProperties->setPropertyValue("AllowOverlap", uno::makeAny(false)); + xShapeProperties->setPropertyValue("AllowOverlap", uno::Any(false)); xShapeProperties->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); - xShapeProperties->setPropertyValue("Surround", uno::makeAny(text::WrapTextMode_THROUGH)); + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); + xShapeProperties->setPropertyValue("Surround", uno::Any(text::WrapTextMode_THROUGH)); xDrawPageSupplier->getDrawPage()->add(xShape); aPoint = awt::Point(2000, 2000); @@ -3668,10 +3668,10 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testShapeAllowOverlapWrap) xShape->setPosition(aPoint); xShape->setSize(aSize); xShapeProperties.set(xShape, uno::UNO_QUERY); - xShapeProperties->setPropertyValue("AllowOverlap", uno::makeAny(false)); + xShapeProperties->setPropertyValue("AllowOverlap", uno::Any(false)); xShapeProperties->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); - xShapeProperties->setPropertyValue("Surround", uno::makeAny(text::WrapTextMode_THROUGH)); + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); + xShapeProperties->setPropertyValue("Surround", uno::Any(text::WrapTextMode_THROUGH)); xDrawPageSupplier->getDrawPage()->add(xShape); // Now verify that the rectangle of the anchored objects do overlap. diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx index c797b03dd859..53678a1caf94 100644 --- a/sw/qa/extras/mailmerge/mailmerge.cxx +++ b/sw/qa/extras/mailmerge/mailmerge.cxx @@ -123,9 +123,9 @@ public: assert( xRowSetPropSet.is() && "failed to get XPropertySet interface from RowSet" ); if (xRowSetPropSet.is()) { - xRowSetPropSet->setPropertyValue( "DataSourceName", uno::makeAny( aDBName ) ); - xRowSetPropSet->setPropertyValue( "Command", uno::makeAny( OUString::createFromAscii(tablename) ) ); - xRowSetPropSet->setPropertyValue( "CommandType", uno::makeAny( sdb::CommandType::TABLE ) ); + xRowSetPropSet->setPropertyValue( "DataSourceName", uno::Any( aDBName ) ); + xRowSetPropSet->setPropertyValue( "Command", uno::Any( OUString::createFromAscii(tablename) ) ); + xRowSetPropSet->setPropertyValue( "CommandType", uno::Any( sdb::CommandType::TABLE ) ); uno::Reference< sdbc::XRowSet > xRowSet( xInstance, uno::UNO_QUERY ); if (xRowSet.is()) @@ -219,7 +219,7 @@ public: } else { - CPPUNIT_ASSERT_EQUAL(uno::makeAny(true), res); + CPPUNIT_ASSERT_EQUAL(uno::Any(true), res); if( !bMMFilenameFromColumn && !bDontLoadResult ) loadMailMergeDocument( 0 ); } diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 8db40efda7bf..bd11c7406a68 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -739,8 +739,8 @@ DECLARE_ODFEXPORT_TEST(testFdo79358, "fdo79358.odt") getProperty< uno::Reference<container::XIndexReplace> >(xTOCProps, "LevelParagraphStyles")); uno::Sequence<OUString> seq { "Heading" }; - CPPUNIT_ASSERT_EQUAL(uno::makeAny(seq), xLevels->getByIndex(1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(uno::Sequence<OUString>()), xLevels->getByIndex(2)); + CPPUNIT_ASSERT_EQUAL(uno::Any(seq), xLevels->getByIndex(1)); + CPPUNIT_ASSERT_EQUAL(uno::Any(uno::Sequence<OUString>()), xLevels->getByIndex(2)); } DECLARE_ODFEXPORT_TEST(testFirstHeaderFooter, "first-header-footer.odt") @@ -1240,61 +1240,61 @@ DECLARE_ODFEXPORT_TEST(testTdf103091, "tdf103091.fodt") CPPUNIT_ASSERT_EQUAL(sal_Int32(28), conditions.getLength()); CPPUNIT_ASSERT_EQUAL(OUString("TableHeader"), conditions[0].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Addressee")), conditions[0].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Addressee")), conditions[0].Value); CPPUNIT_ASSERT_EQUAL(OUString("Table"), conditions[1].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Bibliography 1")), conditions[1].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Bibliography 1")), conditions[1].Value); CPPUNIT_ASSERT_EQUAL(OUString("Frame"), conditions[2].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Bibliography Heading")), conditions[2].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Bibliography Heading")), conditions[2].Value); CPPUNIT_ASSERT_EQUAL(OUString("Section"), conditions[3].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Caption")), conditions[3].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Caption")), conditions[3].Value); CPPUNIT_ASSERT_EQUAL(OUString("Footnote"), conditions[4].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Salutation")), conditions[4].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Salutation")), conditions[4].Value); CPPUNIT_ASSERT_EQUAL(OUString("Endnote"), conditions[5].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 1")), conditions[5].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Contents 1")), conditions[5].Value); CPPUNIT_ASSERT_EQUAL(OUString("Header"), conditions[6].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 2")), conditions[6].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Contents 2")), conditions[6].Value); CPPUNIT_ASSERT_EQUAL(OUString("Footer"), conditions[7].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 3")), conditions[7].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Contents 3")), conditions[7].Value); CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel1"), conditions[8].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 4")), conditions[8].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Contents 4")), conditions[8].Value); CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel2"), conditions[9].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 5")), conditions[9].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Contents 5")), conditions[9].Value); CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel3"), conditions[10].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 6")), conditions[10].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Contents 6")), conditions[10].Value); CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel4"), conditions[11].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 7")), conditions[11].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Contents 7")), conditions[11].Value); CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel5"), conditions[12].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 8")), conditions[12].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Contents 8")), conditions[12].Value); CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel6"), conditions[13].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 9")), conditions[13].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Contents 9")), conditions[13].Value); CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel7"), conditions[14].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents 10")), conditions[14].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Contents 10")), conditions[14].Value); CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel8"), conditions[15].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Contents Heading")), conditions[15].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Contents Heading")), conditions[15].Value); CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel9"), conditions[16].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Standard")), conditions[16].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Standard")), conditions[16].Value); CPPUNIT_ASSERT_EQUAL(OUString("OutlineLevel10"), conditions[17].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Drawing")), conditions[17].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Drawing")), conditions[17].Value); CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel1"), conditions[18].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Endnote")), conditions[18].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Endnote")), conditions[18].Value); CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel2"), conditions[19].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("First line indent")), conditions[19].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("First line indent")), conditions[19].Value); CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel3"), conditions[20].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Footer")), conditions[20].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Footer")), conditions[20].Value); CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel4"), conditions[21].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Footer left")), conditions[21].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Footer left")), conditions[21].Value); CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel5"), conditions[22].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Footer right")), conditions[22].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Footer right")), conditions[22].Value); CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel6"), conditions[23].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Footnote")), conditions[23].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Footnote")), conditions[23].Value); CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel7"), conditions[24].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Frame contents")), conditions[24].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Frame contents")), conditions[24].Value); CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel8"), conditions[25].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Hanging indent")), conditions[25].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Hanging indent")), conditions[25].Value); CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel9"), conditions[26].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Header")), conditions[26].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Header")), conditions[26].Value); CPPUNIT_ASSERT_EQUAL(OUString("NumberingLevel10"), conditions[27].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Header left")), conditions[27].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Header left")), conditions[27].Value); } DECLARE_ODFEXPORT_TEST(testTextframeTransparentShadow, "textframe-transparent-shadow.odt") @@ -1814,7 +1814,7 @@ DECLARE_ODFEXPORT_TEST(testBtlrFrame, "btlr-frame.odt") return; // Make sure that btlr -> tbrl transition clears the "BT" flag. - xTextFrame->setPropertyValue("WritingMode", uno::makeAny(text::WritingMode2::TB_LR)); + xTextFrame->setPropertyValue("WritingMode", uno::Any(text::WritingMode2::TB_LR)); pFlyFrame = dynamic_cast<SwFlyFrame*>(rAnchored[0]); CPPUNIT_ASSERT(pFlyFrame); CPPUNIT_ASSERT(!pFlyFrame->IsVertLRBT()); @@ -2291,9 +2291,9 @@ DECLARE_ODFEXPORT_TEST(testCellUserDefineAttr, "userdefattr-tablecell.odt") uno::Reference<table::XCell> const xCellA1(xTable->getCellByName("A1"), uno::UNO_SET_THROW); uno::Reference<table::XCell> const xCellB1(xTable->getCellByName("B1"), uno::UNO_SET_THROW); uno::Reference<table::XCell> const xCellC1(xTable->getCellByName("C1"), uno::UNO_SET_THROW); - getUserDefineAttribute(uno::makeAny(xCellA1), "proName", "v1"); - getUserDefineAttribute(uno::makeAny(xCellB1), "proName", "v2"); - getUserDefineAttribute(uno::makeAny(xCellC1), "proName", "v3"); + getUserDefineAttribute(uno::Any(xCellA1), "proName", "v1"); + getUserDefineAttribute(uno::Any(xCellB1), "proName", "v2"); + getUserDefineAttribute(uno::Any(xCellC1), "proName", "v3"); } DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, "embedded-pdf.odt") @@ -2800,8 +2800,8 @@ DECLARE_ODFEXPORT_TEST(testReferenceLanguage, "referencelanguage.odt") uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields()); uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration()); - uno::Any aHu = uno::makeAny(OUString("Hu")); - uno::Any ahu = uno::makeAny(OUString("hu")); + uno::Any aHu(OUString("Hu")); + uno::Any ahu(OUString("hu")); for (size_t i = 0; i < SAL_N_ELEMENTS(aFieldTexts); i++) { uno::Any aField = xFields->nextElement(); diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index e79ce4df1da1..d0235dfbd88d 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -80,7 +80,7 @@ CPPUNIT_TEST_FIXTURE(Test, testHideAllSections) uno::Reference<container::XNameAccess> xMasters = xTextFieldsSupplier->getTextFieldMasters(); // Set _CS_Allgemein to 0 uno::Reference<beans::XPropertySet> xMaster(xMasters->getByName("com.sun.star.text.fieldmaster.User._CS_Allgemein"), uno::UNO_QUERY); - xMaster->setPropertyValue("Content", uno::makeAny(OUString("0"))); + xMaster->setPropertyValue("Content", uno::Any(OUString("0"))); // This used to crash uno::Reference<util::XRefreshable>(xTextFieldsSupplier->getTextFields(), uno::UNO_QUERY_THROW)->refresh(); } @@ -461,16 +461,16 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf74524) uno::Reference<lang::XServiceInfo> xServiceInfo1(aField1, uno::UNO_QUERY); CPPUNIT_ASSERT(xServiceInfo1->supportsService("com.sun.star.text.textfield.PageNumber")); uno::Reference<beans::XPropertySet> xPropertySet(aField1, uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(style::NumberingType::PAGE_DESCRIPTOR)), xPropertySet->getPropertyValue("NumberingType")); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(0)), xPropertySet->getPropertyValue("Offset")); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(text::PageNumberType_CURRENT), xPropertySet->getPropertyValue("SubType")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(style::NumberingType::PAGE_DESCRIPTOR)), xPropertySet->getPropertyValue("NumberingType")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(0)), xPropertySet->getPropertyValue("Offset")); + CPPUNIT_ASSERT_EQUAL(uno::Any(text::PageNumberType_CURRENT), xPropertySet->getPropertyValue("SubType")); uno::Reference<text::XTextContent> xField1(aField1, uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString("1"), xField1->getAnchor()->getString()); uno::Any aField2 = xFields->nextElement(); uno::Reference<lang::XServiceInfo> xServiceInfo2(aField2, uno::UNO_QUERY); CPPUNIT_ASSERT(xServiceInfo2->supportsService("com.sun.star.text.textfield.Annotation")); uno::Reference<beans::XPropertySet> xPropertySet2(aField2, uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Comment 1")), xPropertySet2->getPropertyValue("Content")); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Comment 1")), xPropertySet2->getPropertyValue("Content")); uno::Reference<text::XTextContent> xField2(aField2, uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(OUString("Hello 1World"), xField2->getAnchor()->getString()); CPPUNIT_ASSERT(!xFields->hasMoreElements()); @@ -481,17 +481,17 @@ CPPUNIT_TEST_FIXTURE(Test, testPageStyleLayoutRight) load(mpTestDocumentPath, "hello.odt"); uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Page Style"), uno::UNO_QUERY); // This caused a crash. - xPropertySet->setPropertyValue("PageStyleLayout", uno::makeAny(style::PageStyleLayout_RIGHT)); + xPropertySet->setPropertyValue("PageStyleLayout", uno::Any(style::PageStyleLayout_RIGHT)); } CPPUNIT_TEST_FIXTURE(Test, testFdo61952) { load(mpTestDocumentPath, "hello.odt"); uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY); - xPara->setPropertyValue("PageDescName", uno::makeAny(OUString("Left Page"))); - xPara->setPropertyValue("PageDescName", uno::makeAny(OUString("Right Page"))); - xPara->setPropertyValue("PageDescName", uno::makeAny(OUString("Left Page"))); - xPara->setPropertyValue("PageDescName", uno::makeAny(OUString("Right Page"))); + xPara->setPropertyValue("PageDescName", uno::Any(OUString("Left Page"))); + xPara->setPropertyValue("PageDescName", uno::Any(OUString("Right Page"))); + xPara->setPropertyValue("PageDescName", uno::Any(OUString("Left Page"))); + xPara->setPropertyValue("PageDescName", uno::Any(OUString("Right Page"))); } CPPUNIT_TEST_FIXTURE(Test, testFdo60842) @@ -624,7 +624,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo55814) uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields()); uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration()); uno::Reference<beans::XPropertySet> xField(xFields->nextElement(), uno::UNO_QUERY); - xField->setPropertyValue("Content", uno::makeAny(OUString("Yes"))); + xField->setPropertyValue("Content", uno::Any(OUString("Yes"))); uno::Reference<util::XRefreshable>(xTextFieldsSupplier->getTextFields(), uno::UNO_QUERY_THROW)->refresh(); uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY); @@ -1163,9 +1163,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf134971) // _not_ touch pool defaults uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence( { - {"Name", uno::makeAny( + {"Name", uno::Any( m_directories.getURLFromSrc(mpTestDocumentPath) + "tdf134971b.odt")}, - {"Filter", uno::makeAny(OUString("writer8"))}, + {"Filter", uno::Any(OUString("writer8"))}, }); dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues); @@ -1186,9 +1186,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf138879) uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence( { - {"Name", uno::makeAny( + {"Name", uno::Any( m_directories.getURLFromSrc(mpTestDocumentPath) + "tdf138879.odt")}, - {"Filter", uno::makeAny(OUString("writer8"))}, + {"Filter", uno::Any(OUString("writer8"))}, }); dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues); @@ -1207,7 +1207,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPasteFirstParaDirectFormat) // Set some direct formatting on the first paragraph, but leave paragraph adjust at its // default (left). uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY); - xParagraph->setPropertyValue("PageNumberOffset", uno::makeAny(static_cast<sal_Int16>(0))); + xParagraph->setPropertyValue("PageNumberOffset", uno::Any(static_cast<sal_Int16>(0))); } // Paste from ODT. diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index a6fac38a0bbb..0fc4462e32b7 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -77,9 +77,9 @@ protected: uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(std::move(pStream))); uno::Sequence<beans::PropertyValue> aDescriptor(comphelper::InitPropertySequence( { - {"InputStream", uno::makeAny(xStream)}, - {"InputMode", uno::makeAny(true)}, - {"TextInsertModeRange", uno::makeAny(xTextRange)}, + {"InputStream", uno::Any(xStream)}, + {"InputMode", uno::Any(true)}, + {"TextInsertModeRange", uno::Any(xTextRange)}, })); return xFilter->filter(aDescriptor); } @@ -1342,7 +1342,7 @@ DECLARE_OOXMLEXPORT_TEST( testTablePosition14, "table-position-14.docx") // Verify X coord uno::Reference< view::XSelectionSupplier > xCtrl( xModel->getCurrentController(), uno::UNO_QUERY ); - xCtrl->select( uno::makeAny( xTable1 ) ); + xCtrl->select( uno::Any( xTable1 ) ); uno::Reference< text::XTextViewCursorSupplier > xTextViewCursorSupplier( xCtrl, uno::UNO_QUERY ); uno::Reference< text::XTextViewCursor > xCursor = xTextViewCursorSupplier->getViewCursor(); awt::Point pos = xCursor->getPosition(); @@ -1367,7 +1367,7 @@ DECLARE_OOXMLEXPORT_TEST( testTablePosition15, "table-position-15.docx" ) // Verify X coord uno::Reference< view::XSelectionSupplier > xCtrl( xModel->getCurrentController(), uno::UNO_QUERY ); - xCtrl->select( uno::makeAny( xTable1 ) ); + xCtrl->select( uno::Any( xTable1 ) ); uno::Reference< text::XTextViewCursorSupplier > xTextViewCursorSupplier( xCtrl, uno::UNO_QUERY ); uno::Reference< text::XTextViewCursor > xCursor = xTextViewCursorSupplier->getViewCursor(); awt::Point pos = xCursor->getPosition(); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 48f65a6a0793..ceece00a23f5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -742,9 +742,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTextInput) sContent = "content without hint"; break; } - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sContent), xPropertySet->getPropertyValue("Content")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sContent), xPropertySet->getPropertyValue("Content")); CPPUNIT_ASSERT_EQUAL(sContent, xText->getAnchor()->getString()); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sHint), xPropertySet->getPropertyValue("Hint")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sHint), xPropertySet->getPropertyValue("Hint")); nElements++; } while (xFields->hasMoreElements()); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index e808abfc3f97..c6c545b24e54 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -419,7 +419,7 @@ CPPUNIT_TEST_FIXTURE(Test, testArabicZeroNumberingFootnote) uno::Reference<beans::XPropertySet> xFootnoteSettings = xFootnotesSupplier->getFootnoteSettings(); sal_uInt16 nNumberingType = style::NumberingType::ARABIC_ZERO; - xFootnoteSettings->setPropertyValue("NumberingType", uno::makeAny(nNumberingType)); + xFootnoteSettings->setPropertyValue("NumberingType", uno::Any(nNumberingType)); // Insert a footnote. uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); @@ -447,7 +447,7 @@ CPPUNIT_TEST_FIXTURE(Test, testChicagoNumberingFootnote) uno::Reference<beans::XPropertySet> xFootnoteSettings = xFootnotesSupplier->getFootnoteSettings(); sal_uInt16 nNumberingType = style::NumberingType::SYMBOL_CHICAGO; - xFootnoteSettings->setPropertyValue("NumberingType", uno::makeAny(nNumberingType)); + xFootnoteSettings->setPropertyValue("NumberingType", uno::Any(nNumberingType)); // Insert a footnote. uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); @@ -798,7 +798,7 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testZeroLineSpacing) style::LineSpacing aSpacing; aSpacing.Mode = style::LineSpacingMode::MINIMUM; aSpacing.Height = 0; - xParagraph->setPropertyValue("ParaLineSpacing", uno::makeAny(aSpacing)); + xParagraph->setPropertyValue("ParaLineSpacing", uno::Any(aSpacing)); // Export to docx. save("Office Open XML Text", maTempFile); @@ -823,7 +823,7 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testSemiTransparentText) uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY); CPPUNIT_ASSERT(xParagraph.is()); sal_Int16 nTransparence = 75; - xParagraph->setPropertyValue("CharTransparence", uno::makeAny(nTransparence)); + xParagraph->setPropertyValue("CharTransparence", uno::Any(nTransparence)); uno::Reference<text::XTextRange> xTextRange(xParagraph, uno::UNO_QUERY); CPPUNIT_ASSERT(xTextRange.is()); xTextRange->setString("x"); @@ -860,9 +860,9 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testUserField) xFactory->createInstance("com.sun.star.text.TextField.User"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xMaster( xFactory->createInstance("com.sun.star.text.FieldMaster.User"), uno::UNO_QUERY); - xMaster->setPropertyValue("Name", uno::makeAny(OUString("foo"))); + xMaster->setPropertyValue("Name", uno::Any(OUString("foo"))); xField->attachTextFieldMaster(xMaster); - xField->getTextFieldMaster()->setPropertyValue("Content", uno::makeAny(OUString("bar"))); + xField->getTextFieldMaster()->setPropertyValue("Content", uno::Any(OUString("bar"))); uno::Reference<text::XTextDocument> xDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xText = xDocument->getText(); xText->insertTextContent(xText->createTextCursor(), xField, /*bAbsorb=*/false); @@ -919,7 +919,7 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testHighlightEdit_numbering) aMap["CharInteropGrabBag"] <<= aGrabBag; aMap >> aListAutoFormat; - properties->setPropertyValue("ListAutoFormat", uno::makeAny(aListAutoFormat)); + properties->setPropertyValue("ListAutoFormat", uno::Any(aListAutoFormat)); // Export to docx. save("Office Open XML Text", maTempFile); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx index bbbc8e7cfb73..c7bdf83550f6 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx @@ -225,7 +225,7 @@ CPPUNIT_TEST_FIXTURE(Test, testContentControlExport) uno::Reference<text::XTextContent> xContentControl( xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY); - xContentControlProps->setPropertyValue("ShowingPlaceHolder", uno::makeAny(true)); + xContentControlProps->setPropertyValue("ShowingPlaceHolder", uno::Any(true)); xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true); // When exporting to DOCX: @@ -257,10 +257,10 @@ CPPUNIT_TEST_FIXTURE(Test, testCheckboxContentControlExport) uno::Reference<text::XTextContent> xContentControl( xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY); - xContentControlProps->setPropertyValue("Checkbox", uno::makeAny(true)); - xContentControlProps->setPropertyValue("Checked", uno::makeAny(true)); - xContentControlProps->setPropertyValue("CheckedState", uno::makeAny(OUString(u"☒"))); - xContentControlProps->setPropertyValue("UncheckedState", uno::makeAny(OUString(u"☐"))); + xContentControlProps->setPropertyValue("Checkbox", uno::Any(true)); + xContentControlProps->setPropertyValue("Checked", uno::Any(true)); + xContentControlProps->setPropertyValue("CheckedState", uno::Any(OUString(u"☒"))); + xContentControlProps->setPropertyValue("UncheckedState", uno::Any(OUString(u"☐"))); xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true); // When exporting to DOCX: diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index 2cf70462cbe9..cd405b196cba 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -156,7 +156,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf120852_readOnlyUnProtected, "tdf120852_readOnlyU { CPPUNIT_ASSERT_MESSAGE("Section is not protected", !getProperty<bool>(xSect, "IsProtected")); // Enable section protection. The round-trip should have forms protection enabled. - xSect->setPropertyValue("IsProtected", uno::makeAny(true)); + xSect->setPropertyValue("IsProtected", uno::Any(true)); } else { diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index 2a54797ef8c4..043b15a99673 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -801,27 +801,27 @@ DECLARE_OOXMLEXPORT_TEST(testBnc519228OddBreaks, "bnc519228_odd-breaksB.docx") { // Check that all the normal styles are not set as right-only, those should be only those used after odd page breaks. uno::Reference<beans::XPropertySet> defaultStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(style::PageStyleLayout_ALL), defaultStyle->getPropertyValue("PageStyleLayout")); + CPPUNIT_ASSERT_EQUAL(uno::Any(style::PageStyleLayout_ALL), defaultStyle->getPropertyValue("PageStyleLayout")); uno::Reference<beans::XPropertySet> firstPage( getStyles("PageStyles")->getByName("First Page"), uno::UNO_QUERY ); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(style::PageStyleLayout_ALL), firstPage->getPropertyValue("PageStyleLayout")); + CPPUNIT_ASSERT_EQUAL(uno::Any(style::PageStyleLayout_ALL), firstPage->getPropertyValue("PageStyleLayout")); OUString page1StyleName = getProperty<OUString>( getParagraph( 1, "This is the first page." ), "PageDescName"); uno::Reference<beans::XPropertySet> page1Style(getStyles("PageStyles")->getByName(page1StyleName), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(style::PageStyleLayout_RIGHT), page1Style->getPropertyValue("PageStyleLayout")); + CPPUNIT_ASSERT_EQUAL(uno::Any(style::PageStyleLayout_RIGHT), page1Style->getPropertyValue("PageStyleLayout")); getParagraphOfText( 1, getProperty< uno::Reference<text::XText> >(page1Style, "HeaderText"), "This is the header for odd pages"); // Page2 comes from follow of style for page 1 and should be a normal page. Also check the two page style have the same properties, // since page style for page1 was created from page style for page 2. OUString page2StyleName = getProperty<OUString>( page1Style, "FollowStyle" ); uno::Reference<beans::XPropertySet> page2Style(getStyles("PageStyles")->getByName(page2StyleName), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(style::PageStyleLayout_ALL), page2Style->getPropertyValue("PageStyleLayout")); + CPPUNIT_ASSERT_EQUAL(uno::Any(style::PageStyleLayout_ALL), page2Style->getPropertyValue("PageStyleLayout")); getParagraphOfText( 1, getProperty< uno::Reference<text::XText> >(page2Style, "HeaderTextLeft"), "This is the even header"); getParagraphOfText( 1, getProperty< uno::Reference<text::XText> >(page2Style, "HeaderTextRight"), "This is the header for odd pages"); CPPUNIT_ASSERT_EQUAL(getProperty<sal_Int32>(page1Style, "TopMargin"), getProperty<sal_Int32>(page2Style, "TopMargin")); OUString page5StyleName = getProperty<OUString>( getParagraph( 4, "Then an odd break after an odd page, should lead us to page #5." ), "PageDescName"); uno::Reference<beans::XPropertySet> page5Style(getStyles("PageStyles")->getByName(page5StyleName), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(style::PageStyleLayout_RIGHT), page5Style->getPropertyValue("PageStyleLayout")); + CPPUNIT_ASSERT_EQUAL(uno::Any(style::PageStyleLayout_RIGHT), page5Style->getPropertyValue("PageStyleLayout")); getParagraphOfText( 1, getProperty< uno::Reference<text::XText> >(page5Style, "HeaderText"), "This is the header for odd pages"); } @@ -1494,7 +1494,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90789, "tdf90789.docx") uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY_THROW); uno::Reference<view::XSelectionSupplier> xCtrl(xModel->getCurrentController(), uno::UNO_QUERY_THROW); - xCtrl->select(uno::makeAny(xShape->getAnchor())); + xCtrl->select(uno::Any(xShape->getAnchor())); uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xCtrl, uno::UNO_QUERY_THROW); uno::Reference<text::XTextViewCursor> xTextCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_SET_THROW); diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx index b3f45fd9ce95..a630c00d1b71 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx @@ -820,7 +820,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf104823) // Check field value (it should be value from data source) and set new CPPUNIT_ASSERT_EQUAL(OUString("True Core Property Value"), xField1->getPresentation(false)); uno::Reference<beans::XPropertySet> xField1Props(xField1, uno::UNO_QUERY); - xField1Props->setPropertyValue("Content", uno::makeAny(OUString("New Core Property Value"))); + xField1Props->setPropertyValue("Content", uno::Any(OUString("New Core Property Value"))); // Third field: content from custom properties uno::Reference<text::XTextField> xField2(xFields->nextElement(), uno::UNO_QUERY); @@ -828,7 +828,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf104823) // Check field value (it should be value from data source) and set new CPPUNIT_ASSERT_EQUAL(OUString("True Custom XML Value"), xField2->getPresentation(false)); uno::Reference<beans::XPropertySet> xField2Props(xField2, uno::UNO_QUERY); - xField2Props->setPropertyValue("Content", uno::makeAny(OUString("New Custom XML Value"))); + xField2Props->setPropertyValue("Content", uno::Any(OUString("New Custom XML Value"))); // Second field: content from extended properties uno::Reference<text::XTextField> xField3(xFields->nextElement(), uno::UNO_QUERY); @@ -836,7 +836,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf104823) // Check field value (it should be value from data source) and set new CPPUNIT_ASSERT_EQUAL(OUString("True Extended Property Value"), xField3->getPresentation(false)); uno::Reference<beans::XPropertySet> xField3Props(xField3, uno::UNO_QUERY); - xField3Props->setPropertyValue("Content", uno::makeAny(OUString("New Extended Property Value"))); + xField3Props->setPropertyValue("Content", uno::Any(OUString("New Extended Property Value"))); // Save and check saved data save("Office Open XML Text", maTempFile); diff --git a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx index 03e53c0e5c81..eac63c3bcf40 100644 --- a/sw/qa/extras/ooxmlexport/ooxmllinks.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmllinks.cxx @@ -50,8 +50,7 @@ /* Create & apply new URL */ \ OUString sOriginalFileInTempDir = sTempDir + sFileName; \ uno::Reference<beans::XPropertySet> xPropertySet(xText, css::uno::UNO_QUERY); \ - xPropertySet->setPropertyValue("HyperLinkURL", \ - css::uno::makeAny(sOriginalFileInTempDir)); \ + xPropertySet->setPropertyValue("HyperLinkURL", css::uno::Any(sOriginalFileInTempDir)); \ } \ \ public: \ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 8473e44270c1..6e22f8b9cb65 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1359,7 +1359,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo87488) { uno::Reference<beans::XPropertySet> props(group->getByIndex(1), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(props->getPropertyValue("RotateAngle"), - uno::makeAny<sal_Int32>(270 * 100)); + uno::Any(sal_Int32(270 * 100))); comphelper::SequenceAsHashMap geom(props->getPropertyValue("CustomShapeGeometry")); CPPUNIT_ASSERT_EQUAL(sal_Int32(90), geom["TextPreRotateAngle"].get<sal_Int32>()); } diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 692fa45cbe1c..941b112bbdf0 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -1020,7 +1020,7 @@ CPPUNIT_TEST_FIXTURE(Test, testHyperlinkWithoutURL) load(mpTestDocumentPath, "tdf90421.fodt"); // Change the hyperlink, so its URL is empty. uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1), 2), uno::UNO_QUERY); - xRun->setPropertyValue("HyperLinkURL", uno::makeAny(OUString())); + xRun->setPropertyValue("HyperLinkURL", uno::Any(OUString())); reload(mpFilter, "gutter-left.rtf"); SvMemoryStream aMemoryStream; SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ); diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx b/sw/qa/extras/rtfexport/rtfexport3.cxx index 040b75a96b6e..665682c7532c 100644 --- a/sw/qa/extras/rtfexport/rtfexport3.cxx +++ b/sw/qa/extras/rtfexport/rtfexport3.cxx @@ -287,15 +287,14 @@ CPPUNIT_TEST_FIXTURE(Test, testNestedHyperlink) xCursor->gotoStart(/*bExpand=*/false); xCursor->gotoEnd(/*bExpand=*/true); uno::Reference<beans::XPropertySet> xCursorProps(xCursor, uno::UNO_QUERY); - xCursorProps->setPropertyValue("HyperLinkURL", uno::makeAny(OUString("http://body.com/"))); + xCursorProps->setPropertyValue("HyperLinkURL", uno::Any(OUString("http://body.com/"))); uno::Reference<text::XText> xFootnoteText(xFootnote, uno::UNO_QUERY); xCursor = xFootnoteText->createTextCursor(); xFootnoteText->insertString(xCursor, "x", /*bAbsorb=*/false); xCursor->gotoStart(/*bExpand=*/false); xCursor->gotoEnd(/*bExpand=*/true); xCursorProps.set(xCursor, uno::UNO_QUERY); - xCursorProps->setPropertyValue("HyperLinkURL", - uno::makeAny(OUString("http://footnote.com/"))); + xCursorProps->setPropertyValue("HyperLinkURL", uno::Any(OUString("http://footnote.com/"))); } // When exporting to RTF: diff --git a/sw/qa/extras/rtfexport/rtfexport5.cxx b/sw/qa/extras/rtfexport/rtfexport5.cxx index 39bcf7135ddf..b51ce896c21f 100644 --- a/sw/qa/extras/rtfexport/rtfexport5.cxx +++ b/sw/qa/extras/rtfexport/rtfexport5.cxx @@ -1094,7 +1094,7 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testChicagoNumberingFootnote) uno::Reference<beans::XPropertySet> xFootnoteSettings = xFootnotesSupplier->getFootnoteSettings(); sal_uInt16 nNumberingType = style::NumberingType::SYMBOL_CHICAGO; - xFootnoteSettings->setPropertyValue("NumberingType", uno::makeAny(nNumberingType)); + xFootnoteSettings->setPropertyValue("NumberingType", uno::Any(nNumberingType)); // Insert a footnote. uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 9e1e71003b4a..9047d0b87f3a 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1022,7 +1022,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPasteFirstParaDirectFormat) // Set some direct formatting on the first paragraph, but leave paragraph adjust at its // default (left). uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY); - xParagraph->setPropertyValue("PageNumberOffset", uno::makeAny(static_cast<sal_Int16>(0))); + xParagraph->setPropertyValue("PageNumberOffset", uno::Any(static_cast<sal_Int16>(0))); } // Paste from RTF. diff --git a/sw/qa/extras/txtexport/txtexport.cxx b/sw/qa/extras/txtexport/txtexport.cxx index b9b0e95e2875..99315fe44deb 100644 --- a/sw/qa/extras/txtexport/txtexport.cxx +++ b/sw/qa/extras/txtexport/txtexport.cxx @@ -116,7 +116,7 @@ CPPUNIT_TEST_FIXTURE(TxtExportTest, testClearingBreakExport) xMSF->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xLineBreakProps(xLineBreak, uno::UNO_QUERY); auto eClear = static_cast<sal_Int16>(SwLineBreakClear::ALL); - xLineBreakProps->setPropertyValue("Clear", uno::makeAny(eClear)); + xLineBreakProps->setPropertyValue("Clear", uno::Any(eClear)); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); xText->insertString(xCursor, "foo", /*bAbsorb=*/false); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 104d9a6b213b..3e93508ed057 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -1332,8 +1332,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo87448) SvMemoryStream aStream; uno::Reference<io::XOutputStream> xOutputStream(new utl::OStreamWrapper(aStream)); uno::Sequence<beans::PropertyValue> aDescriptor( comphelper::InitPropertySequence({ - { "OutputStream", uno::makeAny(xOutputStream) }, - { "FilterName", uno::makeAny(OUString("SVM")) } + { "OutputStream", uno::Any(xOutputStream) }, + { "FilterName", uno::Any(OUString("SVM")) } })); xGraphicExporter->filter(aDescriptor); aStream.Seek(STREAM_SEEK_TO_BEGIN); @@ -1366,7 +1366,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTextCursorInvalidation) SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); CPPUNIT_ASSERT(xPageStyle.is()); - xPageStyle->setPropertyValue("HeaderIsOn", uno::makeAny(true)); + xPageStyle->setPropertyValue("HeaderIsOn", uno::Any(true)); uno::Reference<text::XText> xHeader(getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderText")); CPPUNIT_ASSERT(xHeader.is()); // create cursor inside the header text diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx index f1a841542380..8e844e424578 100644 --- a/sw/qa/extras/uiwriter/uiwriter2.cxx +++ b/sw/qa/extras/uiwriter/uiwriter2.cxx @@ -1924,8 +1924,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf105413) pWrtShell->EndPara(/*bSelect=*/false); uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({ - { "Style", uno::makeAny(OUString("Heading 1")) }, - { "FamilyName", uno::makeAny(OUString("ParagraphStyles")) }, + { "Style", uno::Any(OUString("Heading 1")) }, + { "FamilyName", uno::Any(OUString("ParagraphStyles")) }, }); dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues); @@ -1962,8 +1962,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf76817) pWrtShell->Down(/*bSelect=*/false); uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({ - { "Style", uno::makeAny(OUString("Heading 1")) }, - { "FamilyName", uno::makeAny(OUString("ParagraphStyles")) }, + { "Style", uno::Any(OUString("Heading 1")) }, + { "FamilyName", uno::Any(OUString("ParagraphStyles")) }, }); dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues); @@ -1993,8 +1993,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf76817) CPPUNIT_ASSERT_EQUAL(OUString("3"), getProperty<OUString>(getParagraph(3), "ListLabelString")); uno::Sequence<beans::PropertyValue> aPropertyValues2 = comphelper::InitPropertySequence({ - { "Style", uno::makeAny(OUString("Heading 2")) }, - { "FamilyName", uno::makeAny(OUString("ParagraphStyles")) }, + { "Style", uno::Any(OUString("Heading 2")) }, + { "FamilyName", uno::Any(OUString("ParagraphStyles")) }, }); dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues2); @@ -2045,8 +2045,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf76817_round_trip) pWrtShell->Down(/*bSelect=*/false); uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({ - { "Style", uno::makeAny(OUString("Heading 1")) }, - { "FamilyName", uno::makeAny(OUString("ParagraphStyles")) }, + { "Style", uno::Any(OUString("Heading 1")) }, + { "FamilyName", uno::Any(OUString("ParagraphStyles")) }, }); dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues); @@ -2076,8 +2076,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf76817_round_trip) CPPUNIT_ASSERT_EQUAL(OUString("3"), getProperty<OUString>(getParagraph(3), "ListLabelString")); uno::Sequence<beans::PropertyValue> aPropertyValues2 = comphelper::InitPropertySequence({ - { "Style", uno::makeAny(OUString("Heading 2")) }, - { "FamilyName", uno::makeAny(OUString("ParagraphStyles")) }, + { "Style", uno::Any(OUString("Heading 2")) }, + { "FamilyName", uno::Any(OUString("ParagraphStyles")) }, }); dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues2); @@ -2128,8 +2128,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf76817_custom_outline) pWrtShell->Down(/*bSelect=*/false); uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({ - { "Style", uno::makeAny(OUString("Heading 1")) }, - { "FamilyName", uno::makeAny(OUString("ParagraphStyles")) }, + { "Style", uno::Any(OUString("Heading 1")) }, + { "FamilyName", uno::Any(OUString("ParagraphStyles")) }, }); dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues); diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index 341237f75aaa..69818b1cff11 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -830,7 +830,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132597) // Paste special as RTF uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence( - { { "SelectedFormat", uno::makeAny(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } }); + { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } }); dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues); Scheduler::ProcessEventsToIdle(); @@ -857,7 +857,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf139737) // Paste special as RTF uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence( - { { "SelectedFormat", uno::makeAny(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } }); + { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } }); dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues); Scheduler::ProcessEventsToIdle(); @@ -901,8 +901,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf147206) // set one to heading so there will be an entry in the tox pWrtShell->Up(false, 1); uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({ - { "Style", uno::makeAny(OUString("Heading 1")) }, - { "FamilyName", uno::makeAny(OUString("ParagraphStyles")) }, + { "Style", uno::Any(OUString("Heading 1")) }, + { "FamilyName", uno::Any(OUString("ParagraphStyles")) }, }); dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues); @@ -977,7 +977,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf144840) // Paste special as RTF uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence( - { { "SelectedFormat", uno::makeAny(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } }); + { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } }); dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues); Scheduler::ProcessEventsToIdle(); @@ -1011,7 +1011,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf131963) // Paste special as RTF uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence( - { { "SelectedFormat", uno::makeAny(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } }); + { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } }); dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues); Scheduler::ProcessEventsToIdle(); @@ -1036,7 +1036,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132596) // Paste special as RTF uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence( - { { "SelectedFormat", uno::makeAny(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } }); + { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::RTF)) } }); dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues); Scheduler::ProcessEventsToIdle(); @@ -2667,7 +2667,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf148791) //CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xTextTable, "TableTemplateName")); uno::Reference<beans::XPropertySet> xTableProps(xTextTable, uno::UNO_QUERY_THROW); - xTableProps->setPropertyValue("HoriOrient", uno::makeAny(text::HoriOrientation::CENTER)); + xTableProps->setPropertyValue("HoriOrient", uno::Any(text::HoriOrientation::CENTER)); CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, getProperty<sal_Int16>(xTextTable, "HoriOrient")); @@ -2715,10 +2715,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf148791) // tdf#64902 add a test case for repeated table headings - xTableProps->setPropertyValue("RepeatHeadline", uno::makeAny(true)); + xTableProps->setPropertyValue("RepeatHeadline", uno::Any(true)); CPPUNIT_ASSERT(getProperty<bool>(xTextTable, "RepeatHeadline")); - xTableProps->setPropertyValue("HeaderRowCount", uno::makeAny(sal_Int32(3))); + xTableProps->setPropertyValue("HeaderRowCount", uno::Any(sal_Int32(3))); CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty<sal_Int32>(xTextTable, "HeaderRowCount")); dispatchCommand(mxComponent, ".uno:SelectTable", {}); @@ -2744,15 +2744,15 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135014) createSwDoc(); uno::Sequence<beans::PropertyValue> aArgs( - comphelper::InitPropertySequence({ { "KeyModifier", uno::makeAny(sal_Int32(0)) } })); + comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(sal_Int32(0)) } })); // Toggle Numbering List dispatchCommand(mxComponent, ".uno:DefaultBullet", aArgs); Scheduler::ProcessEventsToIdle(); uno::Sequence<beans::PropertyValue> aArgs2(comphelper::InitPropertySequence( - { { "Param", uno::makeAny(OUString("NewNumberingStyle")) }, - { "Family", uno::makeAny(static_cast<sal_Int16>(SfxStyleFamily::Pseudo)) } })); + { { "Param", uno::Any(OUString("NewNumberingStyle")) }, + { "Family", uno::Any(static_cast<sal_Int16>(SfxStyleFamily::Pseudo)) } })); // New Style from selection dispatchCommand(mxComponent, ".uno:StyleNewByExample", aArgs2); @@ -2771,7 +2771,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130629) SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); uno::Sequence<beans::PropertyValue> aArgs( - comphelper::InitPropertySequence({ { "KeyModifier", uno::makeAny(KEY_MOD1) } })); + comphelper::InitPropertySequence({ { "KeyModifier", uno::Any(KEY_MOD1) } })); dispatchCommand(mxComponent, ".uno:BasicShapes.diamond", aArgs); Scheduler::ProcessEventsToIdle(); @@ -3015,7 +3015,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf107494) uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); - xPageStyle->setPropertyValue("HeaderIsOn", uno::makeAny(true)); + xPageStyle->setPropertyValue("HeaderIsOn", uno::Any(true)); uno::Reference<text::XText> xHeader( getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderText")); @@ -3026,11 +3026,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf107494) CPPUNIT_ASSERT_EQUAL(1, getShapes()); - xPageStyle->setPropertyValue("HeaderIsOn", uno::makeAny(false)); + xPageStyle->setPropertyValue("HeaderIsOn", uno::Any(false)); CPPUNIT_ASSERT_EQUAL(0, getShapes()); - xPageStyle->setPropertyValue("FooterIsOn", uno::makeAny(true)); + xPageStyle->setPropertyValue("FooterIsOn", uno::Any(true)); uno::Reference<text::XText> xFooter( getProperty<uno::Reference<text::XText>>(xPageStyle, "FooterText")); @@ -3046,7 +3046,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf107494) CPPUNIT_ASSERT_EQUAL(1, getShapes()); - xPageStyle->setPropertyValue("FooterIsOn", uno::makeAny(false)); + xPageStyle->setPropertyValue("FooterIsOn", uno::Any(false)); CPPUNIT_ASSERT_EQUAL(0, getShapes()); } @@ -3084,7 +3084,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf131771) createSwDoc(); 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(); @@ -3098,7 +3098,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf131771) CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xTextTable, "TableTemplateName")); uno::Reference<beans::XPropertySet> xTableProps(xTextTable, uno::UNO_QUERY_THROW); - xTableProps->setPropertyValue("TableTemplateName", uno::makeAny(OUString("Default Style"))); + xTableProps->setPropertyValue("TableTemplateName", uno::Any(OUString("Default Style"))); CPPUNIT_ASSERT_EQUAL(OUString("Default Style"), getProperty<OUString>(xTextTable, "TableTemplateName")); @@ -3127,7 +3127,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf80663) createSwDoc(); 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(); @@ -3208,7 +3208,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf121031) createSwDoc(); uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence( - { { "Rows", uno::makeAny(sal_Int32(3)) }, { "Columns", uno::makeAny(sal_Int32(3)) } })); + { { "Rows", uno::Any(sal_Int32(3)) }, { "Columns", uno::Any(sal_Int32(3)) } })); dispatchCommand(mxComponent, ".uno:InsertTable", aArgs); Scheduler::ProcessEventsToIdle(); @@ -3371,7 +3371,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf139566) SwWrtShell* pWrtSh = pDoc->GetDocShell()->GetWrtShell(); 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(); @@ -3413,7 +3413,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf96067) createSwDoc(); uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence( - { { "Rows", uno::makeAny(sal_Int32(3)) }, { "Columns", uno::makeAny(sal_Int32(3)) } })); + { { "Rows", uno::Any(sal_Int32(3)) }, { "Columns", uno::Any(sal_Int32(3)) } })); dispatchCommand(mxComponent, ".uno:InsertTable", aArgs); Scheduler::ProcessEventsToIdle(); @@ -3447,7 +3447,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf87199) createSwDoc(); uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence( - { { "Rows", uno::makeAny(sal_Int32(2)) }, { "Columns", uno::makeAny(sal_Int32(1)) } })); + { { "Rows", uno::Any(sal_Int32(2)) }, { "Columns", uno::Any(sal_Int32(1)) } })); dispatchCommand(mxComponent, ".uno:InsertTable", aArgs); @@ -3561,7 +3561,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132603) SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); uno::Sequence<beans::PropertyValue> aPropertyValues - = comphelper::InitPropertySequence({ { "Text", uno::makeAny(OUString("Comment")) } }); + = comphelper::InitPropertySequence({ { "Text", uno::Any(OUString("Comment")) } }); dispatchCommand(mxComponent, ".uno:InsertAnnotation", aPropertyValues); Scheduler::ProcessEventsToIdle(); @@ -3594,7 +3594,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf117601) SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence( - { { "Rows", uno::makeAny(sal_Int32(5)) }, { "Columns", uno::makeAny(sal_Int32(3)) } })); + { { "Rows", uno::Any(sal_Int32(5)) }, { "Columns", uno::Any(sal_Int32(3)) } })); dispatchCommand(mxComponent, ".uno:InsertTable", aArgs); Scheduler::ProcessEventsToIdle(); @@ -3954,7 +3954,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, AtPageTextBoxCrash) // Change its anchor to page uno::Reference<beans::XPropertySet> xShpProps(getShape(1), uno::UNO_QUERY_THROW); xShpProps->setPropertyValue( - "AnchorType", uno::makeAny(text::TextContentAnchorType::TextContentAnchorType_AT_PAGE)); + "AnchorType", uno::Any(text::TextContentAnchorType::TextContentAnchorType_AT_PAGE)); // The page anchored objects must not have content anchor // unless this will lead to crash later, for example on @@ -4008,8 +4008,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133477) SvMemoryStream aStream; uno::Reference<io::XOutputStream> xOutputStream(new utl::OStreamWrapper(aStream)); uno::Sequence<beans::PropertyValue> aDescriptor( - comphelper::InitPropertySequence({ { "OutputStream", uno::makeAny(xOutputStream) }, - { "FilterName", uno::makeAny(OUString("BMP")) } })); + comphelper::InitPropertySequence({ { "OutputStream", uno::Any(xOutputStream) }, + { "FilterName", uno::Any(OUString("BMP")) } })); xGraphicExporter->filter(aDescriptor); aStream.Seek(STREAM_SEEK_TO_BEGIN); diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx b/sw/qa/extras/uiwriter/uiwriter4.cxx index d1aee7f23986..f6791e4ebb02 100644 --- a/sw/qa/extras/uiwriter/uiwriter4.cxx +++ b/sw/qa/extras/uiwriter/uiwriter4.cxx @@ -85,7 +85,7 @@ void SwUiWriterTest4::mergeDocs(const char* aDestDoc, const char* aInsertDoc) const OUString insertFileid = m_directories.getURLFromSrc(DATA_DIRECTORY) + OUString::createFromAscii(aInsertDoc); uno::Sequence<beans::PropertyValue> aPropertyValues( - comphelper::InitPropertySequence({ { "Name", uno::makeAny(insertFileid) } })); + comphelper::InitPropertySequence({ { "Name", uno::Any(insertFileid) } })); dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues); } } @@ -860,14 +860,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testClassificationPaste) // Classified source, not classified destination. uno::Sequence<beans::PropertyValue> aInternalOnly - = comphelper::InitPropertySequence({ { "Name", uno::makeAny(OUString("Internal Only")) } }); + = comphelper::InitPropertySequence({ { "Name", uno::Any(OUString("Internal Only")) } }); dispatchCommand(xSourceComponent, ".uno:ClassificationApply", aInternalOnly); CPPUNIT_ASSERT_EQUAL(int(SfxClassificationCheckPasteResult::TargetDocNotClassified), checkShells(pSourceShell, pDestinationShell)); // Classified source and classified destination -- internal only has a higher level than confidential. uno::Sequence<beans::PropertyValue> aConfidential - = comphelper::InitPropertySequence({ { "Name", uno::makeAny(OUString("Confidential")) } }); + = comphelper::InitPropertySequence({ { "Name", uno::Any(OUString("Confidential")) } }); dispatchCommand(mxComponent, ".uno:ClassificationApply", aConfidential); CPPUNIT_ASSERT_EQUAL(int(SfxClassificationCheckPasteResult::DocClassificationTooLow), checkShells(pSourceShell, pDestinationShell)); @@ -1085,12 +1085,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineCopyPaste) // Turn on track changes, make changes, turn off track changes uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY); - xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true)); + xPropertySet->setPropertyValue("RecordChanges", uno::Any(true)); lcl_selectCharacters(aPaM, 2, 3); pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, "c", false); lcl_selectCharacters(aPaM, 6, 7); pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, "f", false); - xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(false)); + xPropertySet->setPropertyValue("RecordChanges", uno::Any(false)); // Create the clipboard document. SwDoc aClipboard; @@ -1115,7 +1115,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf135260) // Turn on track changes uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY); - xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true)); + xPropertySet->setPropertyValue("RecordChanges", uno::Any(true)); for (int i = 0; i < 4; i++) { @@ -1143,7 +1143,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineParam) // Turn on track changes, and add changes to the start and end of the document. uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY); - xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true)); + xPropertySet->setPropertyValue("RecordChanges", uno::Any(true)); pWrtShell->StartOfSection(); pWrtShell->Insert("aaa"); pWrtShell->EndOfSection(); @@ -1155,8 +1155,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineParam) // Select the first redline. pWrtShell->StartOfSection(); uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence( - { { "NextTrackedChange", - uno::makeAny(o3tl::narrowing<sal_uInt16>(rTable[0]->GetId())) } })); + { { "NextTrackedChange", uno::Any(o3tl::narrowing<sal_uInt16>(rTable[0]->GetId())) } })); dispatchCommand(mxComponent, ".uno:NextTrackedChange", aPropertyValues); Scheduler::ProcessEventsToIdle(); SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); @@ -1167,7 +1166,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineParam) // Select the second redline. pWrtShell->StartOfSection(); aPropertyValues = comphelper::InitPropertySequence( - { { "NextTrackedChange", uno::makeAny(o3tl::narrowing<sal_uInt16>(rTable[1]->GetId())) } }); + { { "NextTrackedChange", uno::Any(o3tl::narrowing<sal_uInt16>(rTable[1]->GetId())) } }); dispatchCommand(mxComponent, ".uno:NextTrackedChange", aPropertyValues); Scheduler::ProcessEventsToIdle(); pShellCursor = pWrtShell->getShellCursor(false); @@ -1176,8 +1175,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineParam) // Move the cursor to the start again, and reject the second change. pWrtShell->StartOfSection(); aPropertyValues = comphelper::InitPropertySequence( - { { "RejectTrackedChange", - uno::makeAny(o3tl::narrowing<sal_uInt16>(rTable[1]->GetId())) } }); + { { "RejectTrackedChange", uno::Any(o3tl::narrowing<sal_uInt16>(rTable[1]->GetId())) } }); dispatchCommand(mxComponent, ".uno:RejectTrackedChange", aPropertyValues); Scheduler::ProcessEventsToIdle(); pShellCursor = pWrtShell->getShellCursor(false); @@ -1204,7 +1202,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineViewAuthor) // Turn on track changes, and add changes to the start of the document. uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY); - xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true)); + xPropertySet->setPropertyValue("RecordChanges", uno::Any(true)); pWrtShell->StartOfSection(); pWrtShell->Insert("aaa"); @@ -1240,7 +1238,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf91292) getProperty<Color>(xPropertySet, "FillColor")); // remove background color - xPropertySet->setPropertyValue("FillStyle", uno::makeAny(drawing::FillStyle_NONE)); + xPropertySet->setPropertyValue("FillStyle", uno::Any(drawing::FillStyle_NONE)); // Save it and load it back. reload("Office Open XML Text", "tdf91292_paraBackground.docx"); @@ -1272,7 +1270,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineTimestamp) // Turn on track changes, and add changes to the start and to the end of // the document. uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY); - xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true)); + xPropertySet->setPropertyValue("RecordChanges", uno::Any(true)); pWrtShell->StartOfSection(); pWrtShell->Insert("aaa"); osl::Thread::wait(std::chrono::seconds(1)); @@ -1894,8 +1892,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testCreateDocxAnnotation) // insert an annotation with a text const OUString aSomeText("some text"); uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({ - { "Text", uno::makeAny(aSomeText) }, - { "Author", uno::makeAny(OUString("me")) }, + { "Text", uno::Any(aSomeText) }, + { "Author", uno::Any(OUString("me")) }, }); dispatchCommand(mxComponent, ".uno:InsertAnnotation", aPropertyValues); diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx b/sw/qa/extras/uiwriter/uiwriter5.cxx index dec49313d195..1e9d5a0b7560 100644 --- a/sw/qa/extras/uiwriter/uiwriter5.cxx +++ b/sw/qa/extras/uiwriter/uiwriter5.cxx @@ -679,14 +679,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf144272) // modify with track changes: Standard and Heading 2 uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({ - { "Style", uno::makeAny(OUString("Standard")) }, - { "FamilyName", uno::makeAny(OUString("ParagraphStyles")) }, + { "Style", uno::Any(OUString("Standard")) }, + { "FamilyName", uno::Any(OUString("ParagraphStyles")) }, }); dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues); pWrtShell->Down(/*bSelect=*/false); aPropertyValues = comphelper::InitPropertySequence({ - { "Style", uno::makeAny(OUString("Heading 2")) }, - { "FamilyName", uno::makeAny(OUString("ParagraphStyles")) }, + { "Style", uno::Any(OUString("Heading 2")) }, + { "FamilyName", uno::Any(OUString("ParagraphStyles")) }, }); dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues); @@ -717,15 +717,15 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf101873) // Search for something which does not exist, twice. uno::Sequence<beans::PropertyValue> aFirst(comphelper::InitPropertySequence({ - { "SearchItem.SearchString", uno::makeAny(OUString("fig")) }, - { "SearchItem.Backward", uno::makeAny(false) }, + { "SearchItem.SearchString", uno::Any(OUString("fig")) }, + { "SearchItem.Backward", uno::Any(false) }, })); dispatchCommand(mxComponent, ".uno:ExecuteSearch", aFirst); dispatchCommand(mxComponent, ".uno:ExecuteSearch", aFirst); uno::Sequence<beans::PropertyValue> aSecond(comphelper::InitPropertySequence({ - { "SearchItem.SearchString", uno::makeAny(OUString("something")) }, - { "SearchItem.Backward", uno::makeAny(false) }, + { "SearchItem.SearchString", uno::Any(OUString("something")) }, + { "SearchItem.Backward", uno::Any(false) }, })); dispatchCommand(mxComponent, ".uno:ExecuteSearch", aSecond); @@ -953,13 +953,13 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testDocxAttributeTableExport) // change the properties // 8133 -> 8000 - xShape->setPropertyValue("VertOrientPosition", uno::makeAny(static_cast<sal_Int32>(8000))); + xShape->setPropertyValue("VertOrientPosition", uno::Any(static_cast<sal_Int32>(8000))); // 5964 -> 5000 - xShape->setPropertyValue("HoriOrientPosition", uno::makeAny(static_cast<sal_Int32>(5000))); + xShape->setPropertyValue("HoriOrientPosition", uno::Any(static_cast<sal_Int32>(5000))); // 0 (frame) -> 8 (page print area) - xShape->setPropertyValue("VertOrientRelation", uno::makeAny(static_cast<sal_Int16>(8))); + xShape->setPropertyValue("VertOrientRelation", uno::Any(static_cast<sal_Int16>(8))); // 8 (page print area) -> 0 (frame) - xShape->setPropertyValue("HoriOrientRelation", uno::makeAny(static_cast<sal_Int16>(0))); + xShape->setPropertyValue("HoriOrientRelation", uno::Any(static_cast<sal_Int16>(0))); } // save it to docx reload("Office Open XML Text", "floating-table-position.docx"); @@ -1719,8 +1719,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf118311) // Jump to the first cell, selecting its content uno::Sequence<beans::PropertyValue> aSearch(comphelper::InitPropertySequence({ - { "SearchItem.SearchString", uno::makeAny(OUString("a")) }, - { "SearchItem.Backward", uno::makeAny(false) }, + { "SearchItem.SearchString", uno::Any(OUString("a")) }, + { "SearchItem.Backward", uno::Any(false) }, })); dispatchCommand(mxComponent, ".uno:ExecuteSearch", aSearch); @@ -2734,7 +2734,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf123218) uno::Reference<beans::XPropertySet> xShapeProps( xMSF->createInstance("com.sun.star.text.TextEmbeddedObject"), uno::UNO_QUERY); xShapeProps->setPropertyValue("CLSID", - uno::makeAny(OUString("12dcae26-281f-416f-a234-c3086127382e"))); + uno::Any(OUString("12dcae26-281f-416f-a234-c3086127382e"))); uno::Reference<drawing::XShape> xShape(xShapeProps, uno::UNO_QUERY_THROW); xShape->setSize(awt::Size(16000, 9000)); uno::Reference<text::XTextContent> chartTextContent(xShapeProps, uno::UNO_QUERY_THROW); @@ -2785,7 +2785,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf93747) SwWrtShell* pWrtSh = pDoc->GetDocShell()->GetWrtShell(); 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(); @@ -2818,8 +2818,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf93747) pWrtSh->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false); uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({ - { "Style", uno::makeAny(OUString("Heading 1")) }, - { "FamilyName", uno::makeAny(OUString("ParagraphStyles")) }, + { "Style", uno::Any(OUString("Heading 1")) }, + { "FamilyName", uno::Any(OUString("ParagraphStyles")) }, }); dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues); diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index 50819388e96c..cf37fe5f28ee 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -82,7 +82,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf116640) createSwDoc(); uno::Sequence<beans::PropertyValue> aArgs( - comphelper::InitPropertySequence({ { "Columns", uno::makeAny(sal_Int32(2)) } })); + comphelper::InitPropertySequence({ { "Columns", uno::Any(sal_Int32(2)) } })); dispatchCommand(mxComponent, ".uno:InsertSection", aArgs); Scheduler::ProcessEventsToIdle(); @@ -387,7 +387,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testSectionInTableInTable3) uno::Reference<text::XTextTable> xRowSupplier(xTable, uno::UNO_QUERY); uno::Reference<table::XTableRows> xRows = xRowSupplier->getRows(); uno::Reference<beans::XPropertySet> xRow(xRows->getByIndex(1), uno::UNO_QUERY); - xRow->setPropertyValue("IsSplitAllowed", uno::makeAny(true)); + xRow->setPropertyValue("IsSplitAllowed", uno::Any(true)); // This never returned. calcLayout(); @@ -634,11 +634,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf108048) createSwDoc(); uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({ - { "Kind", uno::makeAny(sal_Int16(3)) }, - { "TemplateName", uno::makeAny(OUString("Default Page Style")) }, - { "PageNumber", - uno::makeAny(sal_uInt16(6)) }, // Even number to avoid auto-inserted blank page - { "PageNumberFilled", uno::makeAny(true) }, + { "Kind", uno::Any(sal_Int16(3)) }, + { "TemplateName", uno::Any(OUString("Default Page Style")) }, + { "PageNumber", uno::Any(sal_uInt16(6)) }, // Even number to avoid auto-inserted blank page + { "PageNumberFilled", uno::Any(true) }, }); dispatchCommand(mxComponent, ".uno:InsertBreak", aPropertyValues); CPPUNIT_ASSERT_EQUAL(2, getParagraphs()); @@ -1142,8 +1141,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testFontEmbedding) // CASE 2 - font embedding enabled, but embed used fonts disabled // Enable font embedding, disable embedding used font only - xProps->setPropertyValue("EmbedFonts", uno::makeAny(true)); - xProps->setPropertyValue("EmbedOnlyUsedFonts", uno::makeAny(false)); + xProps->setPropertyValue("EmbedFonts", uno::Any(true)); + xProps->setPropertyValue("EmbedOnlyUsedFonts", uno::Any(false)); // Save the document again xStorable->storeToURL(aTempFile.GetURL(), aDescriptor); @@ -1202,11 +1201,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testFontEmbedding) // CASE 3 - font embedding enabled, embed only used fonts enabled // Enable font embedding and setting to embed used fonts only - xProps->setPropertyValue("EmbedFonts", uno::makeAny(true)); - xProps->setPropertyValue("EmbedOnlyUsedFonts", uno::makeAny(true)); - xProps->setPropertyValue("EmbedLatinScriptFonts", uno::makeAny(true)); - xProps->setPropertyValue("EmbedAsianScriptFonts", uno::makeAny(true)); - xProps->setPropertyValue("EmbedComplexScriptFonts", uno::makeAny(true)); + xProps->setPropertyValue("EmbedFonts", uno::Any(true)); + xProps->setPropertyValue("EmbedOnlyUsedFonts", uno::Any(true)); + xProps->setPropertyValue("EmbedLatinScriptFonts", uno::Any(true)); + xProps->setPropertyValue("EmbedAsianScriptFonts", uno::Any(true)); + xProps->setPropertyValue("EmbedComplexScriptFonts", uno::Any(true)); // Save the document again xStorable->storeToURL(aTempFile.GetURL(), aDescriptor); @@ -1328,12 +1327,12 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testSpellOnlineParameter) bool bSet = pOpt->IsOnlineSpell(); 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, pOpt->IsOnlineSpell()); // 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, pOpt->IsOnlineSpell()); } @@ -1996,10 +1995,10 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testHatchFill) xShape->setSize(awt::Size(10000, 10000)); xShape->setPosition(awt::Point(1000, 1000)); uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY); - xShapeProps->setPropertyValue("FillStyle", uno::makeAny(drawing::FillStyle_HATCH)); - xShapeProps->setPropertyValue("FillHatchName", uno::makeAny(OUString("Black 0 Degrees"))); - xShapeProps->setPropertyValue("FillBackground", uno::makeAny(false)); - xShapeProps->setPropertyValue("FillTransparence", uno::makeAny(sal_Int32(30))); + xShapeProps->setPropertyValue("FillStyle", uno::Any(drawing::FillStyle_HATCH)); + xShapeProps->setPropertyValue("FillHatchName", uno::Any(OUString("Black 0 Degrees"))); + xShapeProps->setPropertyValue("FillBackground", uno::Any(false)); + xShapeProps->setPropertyValue("FillTransparence", uno::Any(sal_Int32(30))); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); xDrawPage->add(xShape); diff --git a/sw/qa/extras/uiwriter/uiwriter7.cxx b/sw/qa/extras/uiwriter/uiwriter7.cxx index baac87c9c450..3815713dc877 100644 --- a/sw/qa/extras/uiwriter/uiwriter7.cxx +++ b/sw/qa/extras/uiwriter/uiwriter7.cxx @@ -130,21 +130,20 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77340) uno::Reference<style::XStyle> xStyle( xFactory->createInstance("com.sun.star.style.ParagraphStyle"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xPropSet(xStyle, uno::UNO_QUERY_THROW); - xPropSet->setPropertyValue("ParaBackColor", uno::makeAny(sal_Int32(0xFF00FF))); + xPropSet->setPropertyValue("ParaBackColor", uno::Any(sal_Int32(0xFF00FF))); uno::Reference<style::XStyleFamiliesSupplier> xSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XNameAccess> xNameAccess(xSupplier->getStyleFamilies()); uno::Reference<container::XNameContainer> xNameCont; xNameAccess->getByName("ParagraphStyles") >>= xNameCont; - xNameCont->insertByName("myStyle", uno::makeAny(xStyle)); + xNameCont->insertByName("myStyle", uno::Any(xStyle)); CPPUNIT_ASSERT_EQUAL(OUString("myStyle"), xStyle->getName()); //Setting the properties with proper values - xPropSet->setPropertyValue("PageDescName", uno::makeAny(OUString("First Page"))); - xPropSet->setPropertyValue("PageNumberOffset", uno::makeAny(sal_Int16(3))); + xPropSet->setPropertyValue("PageDescName", uno::Any(OUString("First Page"))); + xPropSet->setPropertyValue("PageNumberOffset", uno::Any(sal_Int16(3))); //Getting the properties and checking that they have proper values - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("First Page")), + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("First Page")), xPropSet->getPropertyValue("PageDescName")); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(3)), - xPropSet->getPropertyValue("PageNumberOffset")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(3)), xPropSet->getPropertyValue("PageNumberOffset")); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf79236) @@ -254,11 +253,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTextSearch) uno::Sequence<beans::PropertyValue> aPropVal2(xProp->getSearchAttributes()); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aPropVal2.getLength()); CPPUNIT_ASSERT_EQUAL(OUString("CharWeight"), aPropVal2[0].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(float(css::awt::FontWeight::BOLD)), aPropVal2[0].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(float(css::awt::FontWeight::BOLD)), aPropVal2[0].Value); //specifying the search attributes uno::Reference<beans::XPropertySet> xPropSet(xSearchDes, uno::UNO_QUERY_THROW); - xPropSet->setPropertyValue("SearchWords", uno::makeAny(true)); - xPropSet->setPropertyValue("SearchCaseSensitive", uno::makeAny(true)); + xPropSet->setPropertyValue("SearchWords", uno::Any(true)); + xPropSet->setPropertyValue("SearchCaseSensitive", uno::Any(true)); //this will search all the BOLD words uno::Reference<container::XIndexAccess> xIndex(xSearch->findAll(xSearchDes)); CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndex->getCount()); @@ -271,7 +270,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTextSearch) uno::Sequence<beans::PropertyValue> aRepProp(xProp2->getReplaceAttributes()); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aRepProp.getLength()); CPPUNIT_ASSERT_EQUAL(OUString("CharWeight"), aRepProp[0].Name); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(float(css::awt::FontWeight::BOLD)), aRepProp[0].Value); + CPPUNIT_ASSERT_EQUAL(uno::Any(float(css::awt::FontWeight::BOLD)), aRepProp[0].Value); //setting strings for replacement xReplaceDes->setSearchString("test"); xReplaceDes->setReplaceString("task"); @@ -285,7 +284,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTextSearch) uno::Reference<container::XIndexAccess> xIndex2(xReplace->findAll(xSearchDes)); CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xIndex2->getCount()); // regex tests - xSearchDes->setPropertyValue("SearchRegularExpression", uno::makeAny(true)); + xSearchDes->setPropertyValue("SearchRegularExpression", uno::Any(true)); // regex: test correct matching combined with attributes like BOLD xSearchDes->setSearchString(".*"); // should match all bold words in the text xIndex.set(xReplace->findAll(xSearchDes), uno::UNO_SET_THROW); @@ -310,7 +309,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTextSearch) CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndex->getCount()); xFound.set(xIndex->getByIndex(0), uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_EQUAL(OUString("This"), xFound->getString()); - xReplaceDes->setPropertyValue("SearchRegularExpression", uno::makeAny(true)); + xReplaceDes->setPropertyValue("SearchRegularExpression", uno::Any(true)); // regex: test correct match of paragraph start xReplaceDes->setSearchString("^."); // should only match first character of the paragraph xReplaceDes->setReplaceString("C"); @@ -813,21 +812,21 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) aFormat = pRef1->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pRef1->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(0)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny); //reference field 2 pCursor->Move(fnMoveForward); SwField* pRef2 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pRef2->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pRef2->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny); //reference field 3 pCursor->Move(fnMoveForward); SwField* pRef3 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pRef3->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pRef3->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(2)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //moving cursor to the end of the document pWrtShell->EndOfSection(); //pasting the copied selection at current cursor position @@ -839,21 +838,21 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) aFormat = pOldRef11->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef11->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(0)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny); //old reference field 2 pCursor->Move(fnMoveForward); SwField* pOldRef12 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef12->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef12->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny); //old reference field 3 pCursor->Move(fnMoveForward); SwField* pOldRef13 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef13->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef13->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(2)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //old footnote 1 pCursor->Move(fnMoveForward); SwTextNode* pTextNd1 = pCursor->GetNode().GetTextNode(); @@ -887,14 +886,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) aFormat = pNewRef11->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pNewRef11->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny); //new reference field 2 pCursor->Move(fnMoveForward); SwField* pNewRef12 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pNewRef12->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pNewRef12->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(3)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(3)), aAny); //new footnote 1 pCursor->Move(fnMoveForward); SwTextNode* pTextNd4 = pCursor->GetNode().GetTextNode(); @@ -915,14 +914,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) aFormat = pNewRef21->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pNewRef21->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny); //new reference field 2 pCursor->Move(fnMoveForward); SwField* pNewRef22 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pNewRef22->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pNewRef22->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(4)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(4)), aAny); //new footnote 1 pCursor->Move(fnMoveForward); SwTextNode* pTextNd11 = pCursor->GetNode().GetTextNode(); @@ -938,21 +937,21 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) aFormat = pOldRef21->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef21->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(0)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny); //old reference field 2 pCursor->Move(fnMoveForward); SwField* pOldRef22 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef22->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef22->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny); //old reference field 3 pCursor->Move(fnMoveForward); SwField* pOldRef23 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef23->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef23->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(2)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //old footnote 1 pCursor->Move(fnMoveForward); SwTextNode* pTextNd12 = pCursor->GetNode().GetTextNode(); @@ -986,14 +985,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) aFormat = pOldRef24->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef24->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny); //old reference field 5 pCursor->Move(fnMoveForward); SwField* pOldRef25 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef25->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef25->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(3)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(3)), aAny); //old footnote 4 pCursor->Move(fnMoveForward); SwTextNode* pTextNd15 = pCursor->GetNode().GetTextNode(); @@ -1082,21 +1081,21 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf63553) aFormat = pRef1->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pRef1->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(0)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny); //reference field 2 pCursor->Move(fnMoveForward); SwField* pRef2 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pRef2->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pRef2->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny); //reference field 3 pCursor->Move(fnMoveForward); SwField* pRef3 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pRef3->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pRef3->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(2)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //sequence field 1 pCursor->Move(fnMoveForward); SwSetExpField* pSeqF1 @@ -1127,21 +1126,21 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf63553) aFormat = pOldRef11->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef11->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(0)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny); //old reference field 2 pCursor->Move(fnMoveForward); SwField* pOldRef12 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef12->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef12->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny); //old reference field 3 pCursor->Move(fnMoveForward); SwField* pOldRef13 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef13->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef13->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(2)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //old sequence field 1 pCursor->Move(fnMoveForward); SwSetExpField* pSeq1 @@ -1166,14 +1165,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf63553) aFormat = pNewRef11->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pNewRef11->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(4)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(4)), aAny); //new reference field 2 pCursor->Move(fnMoveForward); SwField* pNewRef12 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pNewRef12->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pNewRef12->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(2)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //new sequence field 1 pCursor->Move(fnMoveForward); SwSetExpField* pNewSeq1 @@ -1198,14 +1197,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf63553) aFormat = pNewRef21->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pNewRef21->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(6)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(6)), aAny); //new reference field 2 pCursor->Move(fnMoveForward); SwField* pNewRef22 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pNewRef22->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pNewRef22->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(2)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //new sequence field 1 pCursor->Move(fnMoveForward); SwSetExpField* pNewSeq11 @@ -1224,21 +1223,21 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf63553) aFormat = pOldRef21->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef21->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(0)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(0)), aAny); //old reference field 2 pCursor->Move(fnMoveForward); SwField* pOldRef22 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef22->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef22->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(1)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(1)), aAny); //old reference field 3 pCursor->Move(fnMoveForward); SwField* pOldRef23 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef23->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef23->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(2)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //old sequence field 1 pCursor->Move(fnMoveForward); SwSetExpField* pOldSeq11 @@ -1263,14 +1262,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf63553) aFormat = pOldRef24->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef24->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(4)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(4)), aAny); //old reference field 5 pCursor->Move(fnMoveForward); SwField* pOldRef25 = SwCursorShell::GetFieldAtCursor(pCursor, true); aFormat = pOldRef25->GetFormat(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(REF_CONTENT), aFormat); pOldRef25->QueryValue(aAny, sal_uInt16(FIELD_PROP_SHORT1)); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_uInt16(2)), aAny); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //old sequence field 4 pCursor->Move(fnMoveForward); SwSetExpField* pOldSeq14 @@ -1628,8 +1627,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf89714) uno::UNO_QUERY); uno::Reference<beans::XPropertyState> xPropState(xInterface, uno::UNO_QUERY); //enabled Paragraph Orphan and Widows by default starting in LO5.1 - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int8(2)), xPropState->getPropertyDefault("ParaOrphans")); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int8(2)), xPropState->getPropertyDefault("ParaWidows")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int8(2)), xPropState->getPropertyDefault("ParaOrphans")); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int8(2)), xPropState->getPropertyDefault("ParaWidows")); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf130287) @@ -1666,9 +1665,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testPropertyDefaults) //asserting property default and defaults received from "css.text.Defaults" service CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharFontName"), aCharFontName); //changing the default value - xPropSet->setPropertyValue("CharFontName", uno::makeAny(OUString("Symbol"))); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Symbol")), - xPropSet->getPropertyValue("CharFontName")); + xPropSet->setPropertyValue("CharFontName", uno::Any(OUString("Symbol"))); + CPPUNIT_ASSERT_EQUAL(uno::Any(OUString("Symbol")), xPropSet->getPropertyValue("CharFontName")); //resetting the value to default xPropState->setPropertyToDefault("CharFontName"); CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharFontName"), aCharFontName); @@ -1678,16 +1676,16 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testPropertyDefaults) //asserting property default and defaults received from "css.text.Defaults" service CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharHeight"), aCharHeight); //changing the default value - xPropSet->setPropertyValue("CharHeight", uno::makeAny(float(14))); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(float(14)), xPropSet->getPropertyValue("CharHeight")); + xPropSet->setPropertyValue("CharHeight", uno::Any(float(14))); + CPPUNIT_ASSERT_EQUAL(uno::Any(float(14)), xPropSet->getPropertyValue("CharHeight")); //resetting the value to default xPropState->setPropertyToDefault("CharHeight"); CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue("CharHeight"), aCharHeight); //testing CharWeight from style::CharacterProperties uno::Any aCharWeight = xPropSet->getPropertyValue("CharWeight"); //changing the default value - xPropSet->setPropertyValue("CharWeight", uno::makeAny(float(awt::FontWeight::BOLD))); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(float(awt::FontWeight::BOLD)), + xPropSet->setPropertyValue("CharWeight", uno::Any(float(awt::FontWeight::BOLD))); + CPPUNIT_ASSERT_EQUAL(uno::Any(float(awt::FontWeight::BOLD)), xPropSet->getPropertyValue("CharWeight")); //resetting the value to default xPropState->setPropertyToDefault("CharWeight"); @@ -1695,9 +1693,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testPropertyDefaults) //testing CharUnderline from style::CharacterProperties uno::Any aCharUnderline = xPropSet->getPropertyValue("CharUnderline"); //changing the default value - xPropSet->setPropertyValue("CharUnderline", - uno::makeAny(sal_Int16(awt::FontUnderline::SINGLE))); - CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(awt::FontUnderline::SINGLE)), + xPropSet->setPropertyValue("CharUnderline", uno::Any(sal_Int16(awt::FontUnderline::SINGLE))); + CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int16(awt::FontUnderline::SINGLE)), xPropSet->getPropertyValue("CharUnderline")); //resetting the value to default xPropState->setPropertyToDefault("CharUnderline"); @@ -1754,13 +1751,13 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf88899) = { sal_uInt32(1234567), sal_uInt16(3), sal_uInt16(3), sal_uInt16(3), sal_uInt16(10), sal_uInt16(11), sal_uInt16(2014), true }; xUserProps->addProperty("dateTime", sal_Int16(beans::PropertyAttribute::OPTIONAL), - uno::makeAny(aDateTime)); + uno::Any(aDateTime)); uno::Reference<lang::XMultiServiceFactory> xFact(mxComponent, uno::UNO_QUERY); uno::Reference<text::XTextField> xTextField( xFact->createInstance("com.sun.star.text.textfield.docinfo.Custom"), uno::UNO_QUERY); //Setting Name Property uno::Reference<beans::XPropertySet> xPropSet(xTextField, uno::UNO_QUERY_THROW); - xPropSet->setPropertyValue("Name", uno::makeAny(OUString("dateTime"))); + xPropSet->setPropertyValue("Name", uno::Any(OUString("dateTime"))); //Setting NumberFormat uno::Reference<util::XNumberFormatsSupplier> xNumberFormatsSupplier(mxComponent, uno::UNO_QUERY); @@ -1770,7 +1767,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf88899) alocale.Language = "en"; alocale.Country = "US"; sal_Int16 key = xNumFormat->getStandardFormat(util::NumberFormat::DATETIME, alocale); - xPropSet->setPropertyValue("NumberFormat", uno::makeAny(key)); + xPropSet->setPropertyValue("NumberFormat", uno::Any(key)); //Inserting Text Content uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XTextRange> xTextRange = xTextDocument->getText(); @@ -2215,8 +2212,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testDde) // Go before the selection and paste as a DDE link. pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false); aPropertyValues = comphelper::InitPropertySequence( - { { "SelectedFormat", - uno::makeAny(static_cast<sal_uInt32>(SotClipboardFormatId::LINK)) } }); + { { "SelectedFormat", uno::Any(static_cast<sal_uInt32>(SotClipboardFormatId::LINK)) } }); dispatchCommand(mxComponent, ".uno:ClipboardFormatItems", aPropertyValues); // Make sure that the document starts with a field now, and its expanded string value contains asdf. diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx index e240970c7d13..8daa22949725 100644 --- a/sw/qa/extras/unowriter/unowriter.cxx +++ b/sw/qa/extras/unowriter/unowriter.cxx @@ -127,14 +127,14 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testDefaultCharStyle) xCursor->goLeft(1, true); uno::Reference<beans::XPropertySet> xCursorProps(xCursor, uno::UNO_QUERY); - xCursorProps->setPropertyValue("CharStyleName", uno::makeAny(OUString("Emphasis"))); + xCursorProps->setPropertyValue("CharStyleName", uno::Any(OUString("Emphasis"))); CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, getProperty<awt::FontSlant>(xCursorProps, "CharPosture")); // Now reset the char style and assert that the font slant is back to none. // This resulted in a lang.IllegalArgumentException, Standard was not // mapped to 'Default Style'. - xCursorProps->setPropertyValue("CharStyleName", uno::makeAny(OUString("Standard"))); + xCursorProps->setPropertyValue("CharStyleName", uno::Any(OUString("Standard"))); CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, getProperty<awt::FontSlant>(xCursorProps, "CharPosture")); } @@ -239,9 +239,9 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testGraphicDescriptorURL) // Set a URL on it. OUString aGraphicURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "test.jpg"; - xTextGraphic->setPropertyValue("GraphicURL", uno::makeAny(aGraphicURL)); + xTextGraphic->setPropertyValue("GraphicURL", uno::Any(aGraphicURL)); xTextGraphic->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); // Insert it. uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -264,14 +264,14 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testGraphicDescriptorURLBitmap) uno::Reference<container::XNameContainer> xBitmaps( xFactory->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY); OUString aGraphicURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "test.jpg"; - xBitmaps->insertByName("test", uno::makeAny(aGraphicURL)); + xBitmaps->insertByName("test", uno::Any(aGraphicURL)); // Create a graphic. uno::Reference<beans::XPropertySet> xTextGraphic( xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY); xTextGraphic->setPropertyValue("GraphicURL", xBitmaps->getByName("test")); xTextGraphic->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); + uno::Any(text::TextContentAnchorType_AT_CHARACTER)); // Insert it. uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); @@ -808,7 +808,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testRenderablePagePosition) uno::Reference<view::XRenderable> xRenderable(mxComponent, uno::UNO_QUERY); CPPUNIT_ASSERT(mxComponent.is()); - uno::Any aSelection = uno::makeAny(mxComponent); + uno::Any aSelection(mxComponent); uno::Reference<awt::XToolkit> xToolkit = VCLUnoHelper::CreateToolkit(); uno::Reference<awt::XDevice> xDevice(xToolkit->createScreenCompatibleDevice(32, 32)); @@ -969,11 +969,11 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testChapterNumberingCharStyle) uno::Reference<beans::XPropertySet> xStyle( xDoc->createInstance("com.sun.star.style.CharacterStyle"), uno::UNO_QUERY); uno::Reference<container::XNamed> xStyleN(xStyle, uno::UNO_QUERY); - xStyle->setPropertyValue("CharColor", uno::makeAny(sal_Int32(0x00FF0000))); + xStyle->setPropertyValue("CharColor", uno::Any(sal_Int32(0x00FF0000))); uno::Reference<style::XStyleFamiliesSupplier> xSFS(mxComponent, uno::UNO_QUERY); uno::Reference<container::XNameContainer> xStyles( xSFS->getStyleFamilies()->getByName("CharacterStyles"), uno::UNO_QUERY); - xStyles->insertByName("red", uno::makeAny(xStyle)); + xStyles->insertByName("red", uno::Any(xStyle)); uno::Reference<text::XChapterNumberingSupplier> xCNS(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexReplace> xOutline(xCNS->getChapterNumberingRules()); @@ -982,7 +982,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testChapterNumberingCharStyle) hashMap["CharStyleName"] <<= OUString("red"); uno::Sequence<beans::PropertyValue> props; hashMap >> props; - xOutline->replaceByIndex(0, uno::makeAny(props)); + xOutline->replaceByIndex(0, uno::Any(props)); } // now rename the style xStyleN->setName("reddishred"); @@ -1064,11 +1064,11 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testShapeAllowOverlap) // The property is on by default, turn it off & verify. uno::Reference<beans::XPropertySet> xShapeProperties(xShape, uno::UNO_QUERY); - xShapeProperties->setPropertyValue("AllowOverlap", uno::makeAny(false)); + xShapeProperties->setPropertyValue("AllowOverlap", uno::Any(false)); CPPUNIT_ASSERT(!getProperty<bool>(xShapeProperties, "AllowOverlap")); // Turn it back to on & verify. - xShapeProperties->setPropertyValue("AllowOverlap", uno::makeAny(true)); + xShapeProperties->setPropertyValue("AllowOverlap", uno::Any(true)); CPPUNIT_ASSERT(getProperty<bool>(xShapeProperties, "AllowOverlap")); } @@ -1143,7 +1143,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testTransparentText) // Set a custom transparency. uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY); sal_Int16 nExpected = 42; - xParagraph->setPropertyValue("CharTransparence", uno::makeAny(nExpected)); + xParagraph->setPropertyValue("CharTransparence", uno::Any(nExpected)); // Get the transparency & verify. CPPUNIT_ASSERT_EQUAL(nExpected, getProperty<sal_Int16>(xParagraph, "CharTransparence")); diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index 4d009663d007..4e6cfd65924a 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -246,7 +246,7 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testArabicZeroNumberingFootnote) uno::Reference<beans::XPropertySet> xFootnoteSettings = xFootnotesSupplier->getFootnoteSettings(); sal_uInt16 nNumberingType = style::NumberingType::ARABIC_ZERO; - xFootnoteSettings->setPropertyValue("NumberingType", uno::makeAny(nNumberingType)); + xFootnoteSettings->setPropertyValue("NumberingType", uno::Any(nNumberingType)); // Insert a footnote. uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); @@ -276,7 +276,7 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testChicagoNumberingFootnote) uno::Reference<beans::XPropertySet> xFootnoteSettings = xFootnotesSupplier->getFootnoteSettings(); sal_uInt16 nNumberingType = style::NumberingType::SYMBOL_CHICAGO; - xFootnoteSettings->setPropertyValue("NumberingType", uno::makeAny(nNumberingType)); + xFootnoteSettings->setPropertyValue("NumberingType", uno::Any(nNumberingType)); // Insert a footnote. uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY); diff --git a/sw/qa/uibase/fldui/fldui.cxx b/sw/qa/uibase/fldui/fldui.cxx index b3785f5ee072..263195112a25 100644 --- a/sw/qa/uibase/fldui/fldui.cxx +++ b/sw/qa/uibase/fldui/fldui.cxx @@ -43,7 +43,7 @@ CPPUNIT_TEST_FIXTURE(Test, testBiblioPageNumberUpdate) comphelper::makePropertyValue("Title", OUString("Title")), comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf#page=1")), }; - xField->setPropertyValue("Fields", uno::makeAny(aFields)); + xField->setPropertyValue("Fields", uno::Any(aFields)); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); @@ -58,7 +58,7 @@ CPPUNIT_TEST_FIXTURE(Test, testBiblioPageNumberUpdate) comphelper::makePropertyValue("Title", OUString("Title")), comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf#page=2")), }; - xField->setPropertyValue("Fields", uno::makeAny(aFields)); + xField->setPropertyValue("Fields", uno::Any(aFields)); xContent.set(xField, uno::UNO_QUERY); xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false); diff --git a/sw/qa/uibase/frmdlg/frmdlg.cxx b/sw/qa/uibase/frmdlg/frmdlg.cxx index ce9367ea815b..790902ce3233 100644 --- a/sw/qa/uibase/frmdlg/frmdlg.cxx +++ b/sw/qa/uibase/frmdlg/frmdlg.cxx @@ -40,8 +40,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseFrmdlgTest, testAnchorTypeFromStyle) createSwDoc(); uno::Reference<beans::XPropertySet> xGraphics(getStyles("FrameStyles")->getByName("Graphics"), uno::UNO_QUERY); - xGraphics->setPropertyValue("AnchorType", - uno::makeAny(text::TextContentAnchorType_AS_CHARACTER)); + xGraphics->setPropertyValue("AnchorType", uno::Any(text::TextContentAnchorType_AS_CHARACTER)); // When inserting an image: OUString aImageURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "image.png"; diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx index ef4cea15476b..902998bcdb1a 100644 --- a/sw/qa/uibase/shells/shells.cxx +++ b/sw/qa/uibase/shells/shells.cxx @@ -170,7 +170,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testBibliographyUrlContextMenu) comphelper::makePropertyValue("Title", OUString("Title")), comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf#page=1")), }; - xField->setPropertyValue("Fields", uno::makeAny(aFields)); + xField->setPropertyValue("Fields", uno::Any(aFields)); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); @@ -208,7 +208,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testBibliographyLocalCopyContextMenu) comphelper::makePropertyValue("URL", OUString("http://www.example.com/test.pdf#page=1")), comphelper::makePropertyValue("LocalURL", OUString("file:///home/me/test.pdf")), }; - xField->setPropertyValue("Fields", uno::makeAny(aFields)); + xField->setPropertyValue("Fields", uno::Any(aFields)); uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); uno::Reference<text::XText> xText = xTextDocument->getText(); uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor(); diff --git a/sw/qa/uibase/wrtsh/wrtsh.cxx b/sw/qa/uibase/wrtsh/wrtsh.cxx index 5fddff1d884f..78d8c26a0b4a 100644 --- a/sw/qa/uibase/wrtsh/wrtsh.cxx +++ b/sw/qa/uibase/wrtsh/wrtsh.cxx @@ -69,7 +69,7 @@ CPPUNIT_TEST_FIXTURE(Test, testGotoContentControl) uno::Reference<text::XTextContent> xContentControl( xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY); - xContentControlProps->setPropertyValue("ShowingPlaceHolder", uno::makeAny(true)); + xContentControlProps->setPropertyValue("ShowingPlaceHolder", uno::Any(true)); xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true); // When going to that content control in placeholder mode: @@ -105,10 +105,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTickCheckboxContentControl) uno::Reference<text::XTextContent> xContentControl( xMSF->createInstance("com.sun.star.text.ContentControl"), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xContentControlProps(xContentControl, uno::UNO_QUERY); - xContentControlProps->setPropertyValue("Checkbox", uno::makeAny(true)); - xContentControlProps->setPropertyValue("Checked", uno::makeAny(true)); - xContentControlProps->setPropertyValue("CheckedState", uno::makeAny(OUString(u"☒"))); - xContentControlProps->setPropertyValue("UncheckedState", uno::makeAny(OUString(u"☐"))); + xContentControlProps->setPropertyValue("Checkbox", uno::Any(true)); + xContentControlProps->setPropertyValue("Checked", uno::Any(true)); + xContentControlProps->setPropertyValue("CheckedState", uno::Any(OUString(u"☒"))); + xContentControlProps->setPropertyValue("UncheckedState", uno::Any(OUString(u"☐"))); xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true); // When clicking on that content control: diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx index 284e42e17587..b48a9030011d 100644 --- a/sw/qa/unit/swmodeltestbase.cxx +++ b/sw/qa/unit/swmodeltestbase.cxx @@ -550,8 +550,8 @@ void SwModelTestBase::reload(const char* pFilter, const char* filename, const ch { OUString sPassword = OUString::createFromAscii(pPassword); css::uno::Sequence<css::beans::NamedValue> aEncryptionData{ - { "CryptoType", css::uno::makeAny(OUString("Standard")) }, - { "OOXPassword", css::uno::makeAny(sPassword) } + { "CryptoType", css::uno::Any(OUString("Standard")) }, + { "OOXPassword", css::uno::Any(sPassword) } }; aMediaDescriptor[utl::MediaDescriptor::PROP_ENCRYPTIONDATA] <<= aEncryptionData; } |