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 | |
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>
163 files changed, 1009 insertions, 1029 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; } diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 69c28dbbd09f..1447b97a6dbd 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1515,7 +1515,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl( { PropertyValue rPropVal; rPropVal.Name = UNO_NAME_PARA_STYLE_NAME; - uno::Any aVal( uno::makeAny( pTextNode->GetTextColl()->GetName() ) ); + uno::Any aVal( uno::Any( pTextNode->GetTextColl()->GetName() ) ); rPropVal.Value = aVal; rPropVal.Handle = -1; rPropVal.State = beans::PropertyState_DEFAULT_VALUE; diff --git a/sw/source/core/doc/docxforms.cxx b/sw/source/core/doc/docxforms.cxx index 2a7ee714cece..5cd7792c991c 100644 --- a/sw/source/core/doc/docxforms.cxx +++ b/sw/source/core/doc/docxforms.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star; using uno::Reference; using uno::UNO_QUERY; -using uno::makeAny; +using uno::Any; using uno::Exception; using xforms::XModel2; using frame::XModule; @@ -74,7 +74,7 @@ void SwDoc::initXForms( bool bCreateDefaultModel ) "Instance 1", OUString(), true ); xModel->initialize(); - mxXForms->insertByName( sName, makeAny( xModel ) ); + mxXForms->insertByName( sName, Any( xModel ) ); OSL_ENSURE( mxXForms->hasElements(), "can't create XForms model" ); } diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 3eeed981d74f..676f31fd4022 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -131,17 +131,17 @@ void SwTextBoxHelper::create(SwFrameFormat* pShape, SdrObject* pObject, bool bCo } // Initialize properties. uno::Reference<beans::XPropertySet> xPropertySet(xTextFrame, uno::UNO_QUERY); - uno::Any aEmptyBorder = uno::makeAny(table::BorderLine2()); + uno::Any aEmptyBorder{ table::BorderLine2() }; xPropertySet->setPropertyValue(UNO_NAME_TOP_BORDER, aEmptyBorder); xPropertySet->setPropertyValue(UNO_NAME_BOTTOM_BORDER, aEmptyBorder); xPropertySet->setPropertyValue(UNO_NAME_LEFT_BORDER, aEmptyBorder); xPropertySet->setPropertyValue(UNO_NAME_RIGHT_BORDER, aEmptyBorder); - xPropertySet->setPropertyValue(UNO_NAME_FILL_TRANSPARENCE, uno::makeAny(sal_Int32(100))); + xPropertySet->setPropertyValue(UNO_NAME_FILL_TRANSPARENCE, uno::Any(sal_Int32(100))); - xPropertySet->setPropertyValue(UNO_NAME_SIZE_TYPE, uno::makeAny(text::SizeType::FIX)); + xPropertySet->setPropertyValue(UNO_NAME_SIZE_TYPE, uno::Any(text::SizeType::FIX)); - xPropertySet->setPropertyValue(UNO_NAME_SURROUND, uno::makeAny(text::WrapTextMode_THROUGH)); + xPropertySet->setPropertyValue(UNO_NAME_SURROUND, uno::Any(text::WrapTextMode_THROUGH)); uno::Reference<container::XNamed> xNamed(xTextFrame, uno::UNO_QUERY); xNamed->setName(pShape->GetDoc()->GetUniqueFrameName()); @@ -161,7 +161,7 @@ void SwTextBoxHelper::create(SwFrameFormat* pShape, SdrObject* pObject, bool bCo // Also initialize the properties, which are not constant, but inherited from the shape's ones. uno::Reference<drawing::XShape> xShape(pObject->getUnoShape(), uno::UNO_QUERY); - syncProperty(pShape, RES_FRM_SIZE, MID_FRMSIZE_SIZE, uno::makeAny(xShape->getSize()), pObject); + syncProperty(pShape, RES_FRM_SIZE, MID_FRMSIZE_SIZE, uno::Any(xShape->getSize()), pObject); uno::Reference<beans::XPropertySet> xShapePropertySet(xShape, uno::UNO_QUERY); syncProperty(pShape, RES_FOLLOW_TEXT_FLOW, MID_FOLLOW_TEXT_FLOW, @@ -186,7 +186,7 @@ void SwTextBoxHelper::create(SwFrameFormat* pShape, SdrObject* pObject, bool bCo xShapePropertySet->getPropertyValue(UNO_NAME_TEXT_VERT_ADJUST), pObject); text::WritingMode eMode; if (xShapePropertySet->getPropertyValue(UNO_NAME_TEXT_WRITINGMODE) >>= eMode) - syncProperty(pShape, RES_FRAMEDIR, 0, uno::makeAny(sal_Int16(eMode)), pObject); + syncProperty(pShape, RES_FRAMEDIR, 0, uno::Any(sal_Int16(eMode)), pObject); if (bIsGroupObj) doTextBoxPositioning(pShape, pObject); @@ -264,21 +264,20 @@ void SwTextBoxHelper::set(SwFrameFormat* pShapeFormat, SdrObject* pObj, } // Initialize its properties uno::Reference<beans::XPropertySet> xPropertySet(xNew, uno::UNO_QUERY); - uno::Any aEmptyBorder = uno::makeAny(table::BorderLine2()); + uno::Any aEmptyBorder{ table::BorderLine2() }; xPropertySet->setPropertyValue(UNO_NAME_TOP_BORDER, aEmptyBorder); xPropertySet->setPropertyValue(UNO_NAME_BOTTOM_BORDER, aEmptyBorder); xPropertySet->setPropertyValue(UNO_NAME_LEFT_BORDER, aEmptyBorder); xPropertySet->setPropertyValue(UNO_NAME_RIGHT_BORDER, aEmptyBorder); - xPropertySet->setPropertyValue(UNO_NAME_FILL_TRANSPARENCE, uno::makeAny(sal_Int32(100))); - xPropertySet->setPropertyValue(UNO_NAME_SIZE_TYPE, uno::makeAny(text::SizeType::FIX)); - xPropertySet->setPropertyValue(UNO_NAME_SURROUND, uno::makeAny(text::WrapTextMode_THROUGH)); + xPropertySet->setPropertyValue(UNO_NAME_FILL_TRANSPARENCE, uno::Any(sal_Int32(100))); + xPropertySet->setPropertyValue(UNO_NAME_SIZE_TYPE, uno::Any(text::SizeType::FIX)); + xPropertySet->setPropertyValue(UNO_NAME_SURROUND, uno::Any(text::WrapTextMode_THROUGH)); // Add a new name to it uno::Reference<container::XNamed> xNamed(xNew, uno::UNO_QUERY); xNamed->setName(pShapeFormat->GetDoc()->GetUniqueFrameName()); // And sync. properties. uno::Reference<drawing::XShape> xShape(pObj->getUnoShape(), uno::UNO_QUERY); - syncProperty(pShapeFormat, RES_FRM_SIZE, MID_FRMSIZE_SIZE, uno::makeAny(xShape->getSize()), - pObj); + syncProperty(pShapeFormat, RES_FRM_SIZE, MID_FRMSIZE_SIZE, uno::Any(xShape->getSize()), pObj); uno::Reference<beans::XPropertySet> xShapePropertySet(xShape, uno::UNO_QUERY); syncProperty(pShapeFormat, RES_ANCHOR, MID_ANCHOR_ANCHORTYPE, xShapePropertySet->getPropertyValue(UNO_NAME_ANCHOR_TYPE), pObj); @@ -304,10 +303,10 @@ void SwTextBoxHelper::set(SwFrameFormat* pShapeFormat, SdrObject* pObj, aVertAdj = xShapePropertySet->getPropertyValue(UNO_NAME_TEXT_VERT_ADJUST) .get<drawing::TextVerticalAdjust>(); } - xPropertySet->setPropertyValue(UNO_NAME_TEXT_VERT_ADJUST, uno::makeAny(aVertAdj)); + xPropertySet->setPropertyValue(UNO_NAME_TEXT_VERT_ADJUST, uno::Any(aVertAdj)); text::WritingMode eMode; if (xShapePropertySet->getPropertyValue(UNO_NAME_TEXT_WRITINGMODE) >>= eMode) - syncProperty(pShapeFormat, RES_FRAMEDIR, 0, uno::makeAny(sal_Int16(eMode)), pObj); + syncProperty(pShapeFormat, RES_FRAMEDIR, 0, uno::Any(sal_Int16(eMode)), pObj); if (aOldProps.size()) { for (auto& rProp : aOldProps) @@ -434,7 +433,7 @@ uno::Any SwTextBoxHelper::getByIndex(SdrPage const* pPage, sal_Int32 nIndex) if (!pRet) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(uno::Reference<drawing::XShape>(pRet->getUnoShape(), uno::UNO_QUERY)); + return uno::Any(uno::Reference<drawing::XShape>(pRet->getUnoShape(), uno::UNO_QUERY)); } sal_Int32 SwTextBoxHelper::getOrdNum(const SdrObject* pObject) @@ -615,17 +614,17 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, std::u16string_view rP case drawing::TextHorizontalAdjust::TextHorizontalAdjust_CENTER: xFrameParaProps->setPropertyValue( UNO_NAME_PARA_ADJUST, - uno::makeAny(style::ParagraphAdjust::ParagraphAdjust_CENTER)); //3 + uno::Any(style::ParagraphAdjust::ParagraphAdjust_CENTER)); //3 break; case drawing::TextHorizontalAdjust::TextHorizontalAdjust_LEFT: xFrameParaProps->setPropertyValue( UNO_NAME_PARA_ADJUST, - uno::makeAny(style::ParagraphAdjust::ParagraphAdjust_LEFT)); //0 + uno::Any(style::ParagraphAdjust::ParagraphAdjust_LEFT)); //0 break; case drawing::TextHorizontalAdjust::TextHorizontalAdjust_RIGHT: xFrameParaProps->setPropertyValue( UNO_NAME_PARA_ADJUST, - uno::makeAny(style::ParagraphAdjust::ParagraphAdjust_RIGHT)); //1 + uno::Any(style::ParagraphAdjust::ParagraphAdjust_RIGHT)); //1 break; default: SAL_WARN("sw.core", @@ -645,12 +644,10 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, std::u16string_view rP if (pObject) { tools::Rectangle aRectangle(pObject->GetSnapRect()); - syncProperty( - pShape, RES_HORI_ORIENT, MID_HORIORIENT_POSITION, - uno::makeAny(static_cast<sal_Int32>(convertTwipToMm100(aRectangle.Left())))); - syncProperty( - pShape, RES_VERT_ORIENT, MID_VERTORIENT_POSITION, - uno::makeAny(static_cast<sal_Int32>(convertTwipToMm100(aRectangle.Top())))); + syncProperty(pShape, RES_HORI_ORIENT, MID_HORIORIENT_POSITION, + uno::Any(static_cast<sal_Int32>(convertTwipToMm100(aRectangle.Left())))); + syncProperty(pShape, RES_VERT_ORIENT, MID_VERTORIENT_POSITION, + uno::Any(static_cast<sal_Int32>(convertTwipToMm100(aRectangle.Top())))); } SwFrameFormat* pFormat = getOtherTextBoxFormat(pShape, RES_DRAWFRMFMT, pObj); @@ -690,7 +687,7 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, std::u16string_view rP if (nDirection) { - syncProperty(pShape, RES_FRAMEDIR, 0, uno::makeAny(nDirection), pObj); + syncProperty(pShape, RES_FRAMEDIR, 0, uno::Any(nDirection), pObj); } } } @@ -711,9 +708,9 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, std::u16string_view rP text::WritingMode eMode; sal_Int16 eMode2; if (rValue >>= eMode) - syncProperty(pShape, RES_FRAMEDIR, 0, uno::makeAny(sal_Int16(eMode)), pObj); + syncProperty(pShape, RES_FRAMEDIR, 0, uno::Any(sal_Int16(eMode)), pObj); else if (rValue >>= eMode2) - syncProperty(pShape, RES_FRAMEDIR, 0, uno::makeAny(eMode2), pObj); + syncProperty(pShape, RES_FRAMEDIR, 0, uno::Any(eMode2), pObj); } else SAL_INFO("sw.core", "SwTextBoxHelper::syncProperty: unhandled property: " @@ -1254,8 +1251,7 @@ bool SwTextBoxHelper::changeAnchor(SwFrameFormat* pShape, SdrObject* pObj) const auto pOldCnt = rOldAnch.GetContentAnchor(); const auto pNewCnt = rNewAnch.GetContentAnchor(); - const uno::Any aShapeHorRelOrient - = uno::makeAny(pShape->GetHoriOrient().GetRelationOrient()); + const uno::Any aShapeHorRelOrient(pShape->GetHoriOrient().GetRelationOrient()); try { diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 094febba9b97..5333764798e5 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -704,7 +704,7 @@ static void insertFieldToDocument(uno::Reference<lang::XMultiServiceFactory> con OUString const & rsKey) { uno::Reference<beans::XPropertySet> xField(rxMultiServiceFactory->createInstance(DocInfoServiceName), uno::UNO_QUERY); - xField->setPropertyValue(UNO_NAME_NAME, uno::makeAny(rsKey)); + xField->setPropertyValue(UNO_NAME_NAME, uno::Any(rsKey)); uno::Reference<text::XTextContent> xTextContent(xField, uno::UNO_QUERY); rxText->insertTextContent(rxParagraphCursor, xTextContent, false); @@ -843,7 +843,7 @@ void SwEditShell::ApplyAdvancedClassification(std::vector<svx::ClassificationRes bool bHeaderIsOn = false; xPageStyle->getPropertyValue(UNO_NAME_HEADER_IS_ON) >>= bHeaderIsOn; if (!bHeaderIsOn) - xPageStyle->setPropertyValue(UNO_NAME_HEADER_IS_ON, uno::makeAny(true)); + xPageStyle->setPropertyValue(UNO_NAME_HEADER_IS_ON, uno::Any(true)); uno::Reference<text::XText> xHeaderText; xPageStyle->getPropertyValue(UNO_NAME_HEADER_TEXT) >>= xHeaderText; equaliseNumberOfParagraph(rResults, xHeaderText); @@ -852,7 +852,7 @@ void SwEditShell::ApplyAdvancedClassification(std::vector<svx::ClassificationRes bool bFooterIsOn = false; xPageStyle->getPropertyValue(UNO_NAME_FOOTER_IS_ON) >>= bFooterIsOn; if (!bFooterIsOn) - xPageStyle->setPropertyValue(UNO_NAME_FOOTER_IS_ON, uno::makeAny(true)); + xPageStyle->setPropertyValue(UNO_NAME_FOOTER_IS_ON, uno::Any(true)); uno::Reference<text::XText> xFooterText; xPageStyle->getPropertyValue(UNO_NAME_FOOTER_TEXT) >>= xFooterText; equaliseNumberOfParagraph(rResults, xFooterText); @@ -924,13 +924,13 @@ void SwEditShell::ApplyAdvancedClassification(std::vector<svx::ClassificationRes uno::Reference<beans::XPropertySet> xFooterPropertySet(xFooterParagraphCursor, uno::UNO_QUERY_THROW); if (rResult.msName == "BOLD") { - xHeaderPropertySet->setPropertyValue("CharWeight", uno::makeAny(awt::FontWeight::BOLD)); - xFooterPropertySet->setPropertyValue("CharWeight", uno::makeAny(awt::FontWeight::BOLD)); + xHeaderPropertySet->setPropertyValue("CharWeight", uno::Any(awt::FontWeight::BOLD)); + xFooterPropertySet->setPropertyValue("CharWeight", uno::Any(awt::FontWeight::BOLD)); } else { - xHeaderPropertySet->setPropertyValue("CharWeight", uno::makeAny(awt::FontWeight::NORMAL)); - xFooterPropertySet->setPropertyValue("CharWeight", uno::makeAny(awt::FontWeight::NORMAL)); + xHeaderPropertySet->setPropertyValue("CharWeight", uno::Any(awt::FontWeight::NORMAL)); + xFooterPropertySet->setPropertyValue("CharWeight", uno::Any(awt::FontWeight::NORMAL)); } } break; @@ -1106,7 +1106,7 @@ void SwEditShell::SetClassification(const OUString& rName, SfxClassificationPoli bool bHeaderIsOn = false; xPageStyle->getPropertyValue(UNO_NAME_HEADER_IS_ON) >>= bHeaderIsOn; if (!bHeaderIsOn) - xPageStyle->setPropertyValue(UNO_NAME_HEADER_IS_ON, uno::makeAny(true)); + xPageStyle->setPropertyValue(UNO_NAME_HEADER_IS_ON, uno::Any(true)); // If the header already contains a document header field, no need to do anything. uno::Reference<text::XText> xHeaderText; @@ -1118,7 +1118,7 @@ void SwEditShell::SetClassification(const OUString& rName, SfxClassificationPoli { // Append a field to the end of the header text. uno::Reference<beans::XPropertySet> xField(xMultiServiceFactory->createInstance(DocInfoServiceName), uno::UNO_QUERY); - xField->setPropertyValue(UNO_NAME_NAME, uno::makeAny(SfxClassificationHelper::PROP_PREFIX_INTELLECTUALPROPERTY() + SfxClassificationHelper::PROP_DOCHEADER())); + xField->setPropertyValue(UNO_NAME_NAME, uno::Any(SfxClassificationHelper::PROP_PREFIX_INTELLECTUALPROPERTY() + SfxClassificationHelper::PROP_DOCHEADER())); uno::Reference<text::XTextContent> xTextContent(xField, uno::UNO_QUERY); xHeaderText->insertTextContent(xHeaderText->getEnd(), xTextContent, /*bAbsorb=*/false); } @@ -1135,7 +1135,7 @@ void SwEditShell::SetClassification(const OUString& rName, SfxClassificationPoli bool bFooterIsOn = false; xPageStyle->getPropertyValue(UNO_NAME_FOOTER_IS_ON) >>= bFooterIsOn; if (!bFooterIsOn) - xPageStyle->setPropertyValue(UNO_NAME_FOOTER_IS_ON, uno::makeAny(true)); + xPageStyle->setPropertyValue(UNO_NAME_FOOTER_IS_ON, uno::Any(true)); // If the footer already contains a document header field, no need to do anything. uno::Reference<text::XText> xFooterText; @@ -1145,7 +1145,7 @@ void SwEditShell::SetClassification(const OUString& rName, SfxClassificationPoli { // Append a field to the end of the footer text. uno::Reference<beans::XPropertySet> xField(xMultiServiceFactory->createInstance(DocInfoServiceName), uno::UNO_QUERY); - xField->setPropertyValue(UNO_NAME_NAME, uno::makeAny(sFooter)); + xField->setPropertyValue(UNO_NAME_NAME, uno::Any(sFooter)); uno::Reference<text::XTextContent> xTextContent(xField, uno::UNO_QUERY); xFooterText->insertTextContent(xFooterText->getEnd(), xTextContent, /*bAbsorb=*/false); } @@ -1547,28 +1547,28 @@ static void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark, aMatrix.Line3.Column2 = aTransformation.get(2, 1); aMatrix.Line3.Column3 = aTransformation.get(2, 2); uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY); - xPropertySet->setPropertyValue(UNO_NAME_ANCHOR_TYPE, uno::makeAny(text::TextContentAnchorType_AT_CHARACTER)); + xPropertySet->setPropertyValue(UNO_NAME_ANCHOR_TYPE, uno::Any(text::TextContentAnchorType_AT_CHARACTER)); uno::Reference<text::XTextContent> xTextContent(xShape, uno::UNO_QUERY); xHeaderText->insertTextContent(xHeaderText->getEnd(), xTextContent, false); // The remaining properties have to be set after the shape is inserted: do that in one batch to avoid flickering. uno::Reference<document::XActionLockable> xLockable(xShape, uno::UNO_QUERY); xLockable->addActionLock(); - xPropertySet->setPropertyValue(UNO_NAME_FILLCOLOR, uno::makeAny(static_cast<sal_Int32>(nColor))); - xPropertySet->setPropertyValue(UNO_NAME_FILLSTYLE, uno::makeAny(drawing::FillStyle_SOLID)); - xPropertySet->setPropertyValue(UNO_NAME_FILL_TRANSPARENCE, uno::makeAny(nTransparency)); - xPropertySet->setPropertyValue(UNO_NAME_LINESTYLE, uno::makeAny(drawing::LineStyle_NONE)); - xPropertySet->setPropertyValue(UNO_NAME_OPAQUE, uno::makeAny(false)); - xPropertySet->setPropertyValue(UNO_NAME_TEXT_AUTOGROWHEIGHT, uno::makeAny(false)); - xPropertySet->setPropertyValue(UNO_NAME_TEXT_AUTOGROWWIDTH, uno::makeAny(false)); - xPropertySet->setPropertyValue(UNO_NAME_TEXT_MINFRAMEHEIGHT, uno::makeAny(nHeight)); - xPropertySet->setPropertyValue(UNO_NAME_TEXT_MINFRAMEWIDTH, uno::makeAny(nWidth)); - xPropertySet->setPropertyValue(UNO_NAME_TEXT_WRAP, uno::makeAny(text::WrapTextMode_THROUGH)); - xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT_RELATION, uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA)); - xPropertySet->setPropertyValue(UNO_NAME_VERT_ORIENT_RELATION, uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA)); - xPropertySet->setPropertyValue(UNO_NAME_CHAR_FONT_NAME, uno::makeAny(sFont)); - xPropertySet->setPropertyValue(UNO_NAME_CHAR_HEIGHT, uno::makeAny(WATERMARK_AUTO_SIZE)); - xPropertySet->setPropertyValue("Transformation", uno::makeAny(aMatrix)); + xPropertySet->setPropertyValue(UNO_NAME_FILLCOLOR, uno::Any(static_cast<sal_Int32>(nColor))); + xPropertySet->setPropertyValue(UNO_NAME_FILLSTYLE, uno::Any(drawing::FillStyle_SOLID)); + xPropertySet->setPropertyValue(UNO_NAME_FILL_TRANSPARENCE, uno::Any(nTransparency)); + xPropertySet->setPropertyValue(UNO_NAME_LINESTYLE, uno::Any(drawing::LineStyle_NONE)); + xPropertySet->setPropertyValue(UNO_NAME_OPAQUE, uno::Any(false)); + xPropertySet->setPropertyValue(UNO_NAME_TEXT_AUTOGROWHEIGHT, uno::Any(false)); + xPropertySet->setPropertyValue(UNO_NAME_TEXT_AUTOGROWWIDTH, uno::Any(false)); + xPropertySet->setPropertyValue(UNO_NAME_TEXT_MINFRAMEHEIGHT, uno::Any(nHeight)); + xPropertySet->setPropertyValue(UNO_NAME_TEXT_MINFRAMEWIDTH, uno::Any(nWidth)); + xPropertySet->setPropertyValue(UNO_NAME_TEXT_WRAP, uno::Any(text::WrapTextMode_THROUGH)); + xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT_RELATION, uno::Any(text::RelOrientation::PAGE_PRINT_AREA)); + xPropertySet->setPropertyValue(UNO_NAME_VERT_ORIENT_RELATION, uno::Any(text::RelOrientation::PAGE_PRINT_AREA)); + xPropertySet->setPropertyValue(UNO_NAME_CHAR_FONT_NAME, uno::Any(sFont)); + xPropertySet->setPropertyValue(UNO_NAME_CHAR_HEIGHT, uno::Any(WATERMARK_AUTO_SIZE)); + xPropertySet->setPropertyValue("Transformation", uno::Any(aMatrix)); uno::Reference<text::XTextRange> xTextRange(xShape, uno::UNO_QUERY); xTextRange->setString(rWatermark.GetText()); @@ -1580,7 +1580,7 @@ static void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark, auto aGeomPropVec = comphelper::sequenceToContainer< std::vector<beans::PropertyValue> >(aGeomPropSeq); uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence( { - {"TextPath", uno::makeAny(true)}, + {"TextPath", uno::Any(true)}, })); auto it = std::find_if(aGeomPropVec.begin(), aGeomPropVec.end(), [](const beans::PropertyValue& rValue) { @@ -1590,15 +1590,15 @@ static void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark, aGeomPropVec.push_back(comphelper::makePropertyValue("TextPath", aPropertyValues)); else it->Value <<= aPropertyValues; - xPropertySet->setPropertyValue("CustomShapeGeometry", uno::makeAny(comphelper::containerToSequence(aGeomPropVec))); + xPropertySet->setPropertyValue("CustomShapeGeometry", uno::Any(comphelper::containerToSequence(aGeomPropVec))); // tdf#108494, tdf#109313 the header height was switched to height of a watermark // and shape was moved to the lower part of a page, force position update xPropertySet->getPropertyValue("Transformation") >>= aMatrix; - xPropertySet->setPropertyValue("Transformation", uno::makeAny(aMatrix)); + xPropertySet->setPropertyValue("Transformation", uno::Any(aMatrix)); - xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT, uno::makeAny(text::HoriOrientation::CENTER)); - xPropertySet->setPropertyValue(UNO_NAME_VERT_ORIENT, uno::makeAny(text::VertOrientation::CENTER)); + xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT, uno::Any(text::HoriOrientation::CENTER)); + xPropertySet->setPropertyValue(UNO_NAME_VERT_ORIENT, uno::Any(text::VertOrientation::CENTER)); xLockable->removeActionLock(); } @@ -1628,7 +1628,7 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& rWatermark) if (bNoWatermark) continue; // the style doesn't have any watermark - no need to do anything - xPageStyle->setPropertyValue(UNO_NAME_HEADER_IS_ON, uno::makeAny(true)); + xPageStyle->setPropertyValue(UNO_NAME_HEADER_IS_ON, uno::Any(true)); } // backup header height @@ -1658,8 +1658,8 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& rWatermark) // tdf#108494 the header height was switched to height of a watermark // and shape was moved to the lower part of a page - xPageStyle->setPropertyValue(UNO_NAME_HEADER_HEIGHT, uno::makeAny(sal_Int32(11))); - xPageStyle->setPropertyValue(UNO_NAME_HEADER_HEIGHT, uno::makeAny(nOldValue)); + xPageStyle->setPropertyValue(UNO_NAME_HEADER_HEIGHT, uno::Any(sal_Int32(11))); + xPageStyle->setPropertyValue(UNO_NAME_HEADER_HEIGHT, uno::Any(nOldValue)); xPageStyle->setPropertyValue(UNO_NAME_HEADER_IS_DYNAMIC_HEIGHT, uno::Any(bDynamicHeight)); } } diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index b1798aa1d305..060a742814f8 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -366,7 +366,7 @@ uno::Any SwConvIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) //!! Please check SwSpellIter also when modifying this //!! - uno::Any aConvRet( makeAny( OUString() ) ); + uno::Any aConvRet{ OUString() }; SwEditShell *pMySh = GetSh(); if( !pMySh ) return aConvRet; @@ -417,7 +417,7 @@ uno::Any SwConvIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) --GetCursorCnt(); } }while ( bGoOn ); - return makeAny( aConvText ); + return Any( aConvText ); } bool SwHyphIter::IsAuto() diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index 996aa1f3a5bb..491e860014f2 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -741,7 +741,7 @@ SwRect SwAnchoredDrawObject::GetObjBoundRect() const // Shape has relative size and also a textbox, update its text area as well. uno::Reference<drawing::XShape> xShape(pObject->getUnoShape(), uno::UNO_QUERY); SwTextBoxHelper::syncProperty(pFrameFormat, RES_FRM_SIZE, MID_FRMSIZE_SIZE, - uno::makeAny(xShape->getSize())); + uno::Any(xShape->getSize())); } } diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index 9aa41c332814..defed7eba5f1 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -244,7 +244,7 @@ ErrCode SwXMLTextBlocks::StartPutBlock( const OUString& rShort, const OUString& uno::Reference< beans::XPropertySet > xRootProps( m_xRoot, uno::UNO_QUERY_THROW ); OUString aMime( SotExchange::GetFormatMimeType( SotClipboardFormatId::STARWRITER_8 ) ); - xRootProps->setPropertyValue( "MediaType", uno::makeAny( aMime ) ); + xRootProps->setPropertyValue( "MediaType", uno::Any( aMime ) ); } catch (const uno::Exception&) { diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx index 04f0dc0ad4b9..b574693e262d 100644 --- a/sw/source/core/unocore/swunohelper.cxx +++ b/sw/source/core/unocore/swunohelper.cxx @@ -64,7 +64,7 @@ bool UCB_DeleteFile( const OUString& rURL ) ucbhelper::Content aTempContent( rURL, css::uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - aTempContent.executeCommand("delete", css::uno::makeAny( true ) ); + aTempContent.executeCommand("delete", css::uno::Any( true ) ); bRemoved = true; } catch( css::uno::Exception& ) diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 84ff2dd8a781..a98956749713 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -758,7 +758,7 @@ uno::Any SAL_CALL SwXFieldmark::getPropertyValue(const OUString& rPropertyName) if ( !pCheckboxFm ) throw uno::RuntimeException(); - return uno::makeAny( pCheckboxFm->IsChecked() ); + return uno::Any( pCheckboxFm->IsChecked() ); } return uno::Any(); // this doesn't support any SwXBookmark property } diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 9eac5a41949f..fe2043e37f7c 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -183,7 +183,7 @@ public: { if ( !hasByName( aName ) ) throw container::NoSuchElementException(); - return uno::makeAny( mTemplateToProject.find( aName )->second ); + return uno::Any( mTemplateToProject.find( aName )->second ); } virtual css::uno::Sequence< OUString > SAL_CALL getElementNames( ) override { @@ -252,7 +252,7 @@ public: uno::Reference< uno::XInterface > xDocObj = ooo::vba::createVBAUnoAPIServiceWithArgs( mpDocShell, "ooo.vba.word.Document" , aArgs ); SAL_INFO("sw.uno", "Creating Object ( ooo.vba.word.Document ) 0x" << xDocObj.get()); - return uno::makeAny( xDocObj ); + return uno::Any( xDocObj ); } virtual css::uno::Sequence< OUString > SAL_CALL getElementNames( ) override { @@ -1002,7 +1002,7 @@ namespace { uno::Reference<text::XTextFrame> const xRet( SwXTextFrame::CreateXTextFrame(*rFrameFormat.GetDoc(), &rFrameFormat)); - return uno::makeAny(xRet); + return uno::Any(xRet); } static bool filter(const SwNode* const pNode) { return !pNode->IsNoTextNode(); }; }; @@ -1014,7 +1014,7 @@ namespace { uno::Reference<text::XTextContent> const xRet( SwXTextGraphicObject::CreateXTextGraphicObject(*rFrameFormat.GetDoc(), &rFrameFormat)); - return uno::makeAny(xRet); + return uno::Any(xRet); } static bool filter(const SwNode* const pNode) { return pNode->IsGrfNode(); }; }; @@ -1026,7 +1026,7 @@ namespace { uno::Reference<text::XTextContent> const xRet( SwXTextEmbeddedObject::CreateXTextEmbeddedObject(*rFrameFormat.GetDoc(), &rFrameFormat)); - return uno::makeAny(xRet); + return uno::Any(xRet); } static bool filter(const SwNode* const pNode) { return pNode->IsOLENode(); }; }; @@ -1424,7 +1424,7 @@ uno::Any SwXTextSections::getByIndex(sal_Int32 nIndex) SwSectionFormat* pFormat = rFormats[nIndex]; xRet = GetObject(*pFormat); - return makeAny(xRet); + return Any(xRet); } uno::Any SwXTextSections::getByName(const OUString& rName) diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index f75e95f30722..b97ee8910e07 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -329,7 +329,7 @@ static uno::Any GetParaListAutoFormat(SwTextNode const& rNode) props.emplace_back(pEntry->aName, value); } } - return uno::makeAny(comphelper::containerToSequence(props)); + return uno::Any(comphelper::containerToSequence(props)); } // Read the special properties of the cursor diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index f9467e5e1cb0..c2e97c361cee 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -410,7 +410,7 @@ SwXShapesEnumeration::SwXShapesEnumeration(SwXDrawPage* const pDrawPage) for(sal_Int32 nIdx = 0; nIdx < nCount; nIdx++) { uno::Reference<drawing::XShape> xShape(pDrawPage->getByIndex(nIdx), uno::UNO_QUERY); - m_aShapes.push_back(uno::makeAny(xShape)); + m_aShapes.push_back(uno::Any(xShape)); } } @@ -2354,7 +2354,7 @@ void SAL_CALL SwXShape::setSize( const awt::Size& aSize ) { mxShape->setSize( aSize ); } - SwTextBoxHelper::syncProperty(GetFrameFormat(), RES_FRM_SIZE, MID_FRMSIZE_SIZE, uno::makeAny(aSize)); + SwTextBoxHelper::syncProperty(GetFrameFormat(), RES_FRM_SIZE, MID_FRMSIZE_SIZE, uno::Any(aSize)); } // #i31698# // implementation of virtual methods from drawing::XShapeDescriptor diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 486552c774f6..53eb083e8156 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -2730,7 +2730,7 @@ uno::Any SwXTextFieldMasters::getByName(const OUString& rName) uno::Reference<beans::XPropertySet> const xRet( SwXFieldMaster::CreateXFieldMaster(GetDoc(), pType)); - return uno::makeAny(xRet); + return uno::Any(xRet); } bool SwXTextFieldMasters::getInstanceName( diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index a04004124dd1..806b5f8be55a 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -101,11 +101,11 @@ SwXFlatParagraph::getPropertyValue(const OUString& rPropertyName) if (rPropertyName == "FieldPositions") { - return uno::makeAny( comphelper::containerToSequence( GetConversionMap().getFieldPositions() ) ); + return uno::Any( comphelper::containerToSequence( GetConversionMap().getFieldPositions() ) ); } else if (rPropertyName == "FootnotePositions") { - return uno::makeAny( comphelper::containerToSequence( GetConversionMap().getFootnotePositions() ) ); + return uno::Any( comphelper::containerToSequence( GetConversionMap().getFootnotePositions() ) ); } return uno::Any(); } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index fe4f0bdfadc3..5120081063cc 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -541,7 +541,7 @@ uno::Any SwXStyleFamilies::getByIndex(sal_Int32 nIndex) auto& rxFamily = m_vFamilies[eFamily]; if(!rxFamily.is()) rxFamily = new XStyleFamily(m_pDocShell, eFamily); - return uno::makeAny(rxFamily); + return uno::Any(rxFamily); } uno::Type SwXStyleFamilies::getElementType() @@ -899,7 +899,7 @@ uno::Any XStyleFamily::getByName(const OUString& rName) uno::Reference<style::XStyle> xStyle = FindStyle(sStyleName); if(!xStyle.is()) xStyle = m_rEntry.m_fCreateStyle(m_pBasePool, m_pDocShell, m_rEntry.m_eFamily == SfxStyleFamily::Frame ? pBase->GetName() : sStyleName); - return uno::makeAny(xStyle); + return uno::Any(xStyle); } uno::Sequence<OUString> XStyleFamily::getElementNames() @@ -1082,7 +1082,7 @@ uno::Any SAL_CALL XStyleFamily::getPropertyValue( const OUString& sPropertyName if(sPropertyName != "DisplayName") throw beans::UnknownPropertyException( "unknown property: " + sPropertyName, static_cast<OWeakObject *>(this) ); SolarMutexGuard aGuard; - return uno::makeAny(SwResId(m_rEntry.m_pResId)); + return uno::Any(SwResId(m_rEntry.m_pResId)); } @@ -1717,7 +1717,7 @@ void SwXStyle::SetPropertyValue<sal_uInt16(RES_PAPER_BIN)>(const SfxItemProperty SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet(); SfxItemSet aSet(*rStyleSet.GetPool(), rEntry.nWID, rEntry.nWID); aSet.SetParent(&rStyleSet); - rPropSet.setPropertyValue(rEntry, uno::makeAny(static_cast<sal_Int8>(nBin == std::numeric_limits<printeridx_t>::max()-1 ? -1 : nBin)), aSet); + rPropSet.setPropertyValue(rEntry, uno::Any(static_cast<sal_Int8>(nBin == std::numeric_limits<printeridx_t>::max()-1 ? -1 : nBin)), aSet); rStyleSet.Put(aSet); } template<> @@ -2133,23 +2133,23 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_IS_PHYSICAL>(const SfxItemPropertyMap { SfxStyleSheetBase* pBase(GetStyleSheetBase()); if(!pBase) - return uno::makeAny(false); + return uno::Any(false); bool bPhys = static_cast<SwDocStyleSheet*>(pBase)->IsPhysical(); // The standard character format is not existing physically if( bPhys && SfxStyleFamily::Char == GetFamily() && static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat() && static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat()->IsDefault() ) bPhys = false; - return uno::makeAny<bool>(bPhys); + return uno::Any(bool(bPhys)); } template<> uno::Any SwXStyle::GetStyleProperty<FN_UNO_HIDDEN>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl&) { SfxStyleSheetBase* pBase(GetStyleSheetBase()); if(!pBase) - return uno::makeAny(false); + return uno::Any(false); rtl::Reference<SwDocStyleSheet> xBase(new SwDocStyleSheet(*static_cast<SwDocStyleSheet*>(pBase))); - return uno::makeAny(xBase->IsHidden()); + return uno::Any(xBase->IsHidden()); } template<> uno::Any SwXStyle::GetStyleProperty<FN_UNO_STYLE_INTEROP_GRAB_BAG>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl&) @@ -2171,11 +2171,11 @@ uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PAPER_BIN)>(const SfxItemProp rPropSet.getPropertyValue(rEntry, rSet, aValue); sal_Int8 nBin(aValue.get<sal_Int8>()); if(nBin == -1) - return uno::makeAny<OUString>("[From printer settings]"); + return uno::Any(OUString("[From printer settings]")); SfxPrinter* pPrinter = GetDoc()->getIDocumentDeviceAccess().getPrinter(false); if(!pPrinter) return uno::Any(); - return uno::makeAny(pPrinter->GetPaperBinName(nBin)); + return uno::Any(pPrinter->GetPaperBinName(nBin)); } template<> uno::Any SwXStyle::GetStyleProperty<FN_UNO_NUM_RULES>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase) @@ -2184,14 +2184,14 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_NUM_RULES>(const SfxItemPropertyMapEn const SwNumRule* pRule = rBase.getNewBase()->GetNumRule(); assert(pRule && "Where is the NumRule?"); uno::Reference<container::XIndexReplace> xRules(new SwXNumberingRules(*pRule, GetDoc())); - return uno::makeAny<uno::Reference<container::XIndexReplace>>(xRules); + return uno::Any(xRules); } template<> uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PARATR_OUTLINELEVEL)>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase) { PrepareStyleBase(rBase); SAL_WARN_IF(SfxStyleFamily::Para != GetFamily(), "sw.uno", "only paras"); - return uno::makeAny<sal_Int16>(rBase.getNewBase()->GetCollection()->GetAttrOutlineLevel()); + return uno::Any(sal_Int16(rBase.getNewBase()->GetCollection()->GetAttrOutlineLevel())); } template<> uno::Any SwXStyle::GetStyleProperty<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase) @@ -2199,7 +2199,7 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_FOLLOW_STYLE>(const SfxItemPropertyMa PrepareStyleBase(rBase); OUString aString; SwStyleNameMapper::FillProgName(rBase.getNewBase()->GetFollow(), aString, lcl_GetSwEnumFromSfxEnum(GetFamily())); - return uno::makeAny(aString); + return uno::Any(aString); } template <> @@ -2211,7 +2211,7 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_LINK_STYLE>(const SfxItemPropertyMapE OUString aString; SwStyleNameMapper::FillProgName(rBase.getNewBase()->GetLink(), aString, lcl_GetSwEnumFromSfxEnum(GetFamily())); - return uno::makeAny(aString); + return uno::Any(aString); } template<> @@ -2230,7 +2230,7 @@ uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PAGEDESC)>(const SfxItemPrope return uno::Any(); OUString aString; SwStyleNameMapper::FillProgName(pDesc->GetName(), aString, SwGetPoolIdFromName::PageDesc); - return uno::makeAny(aString); + return uno::Any(aString); } template<> uno::Any SwXStyle::GetStyleProperty<FN_UNO_IS_AUTO_UPDATE>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase) @@ -2238,8 +2238,8 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_IS_AUTO_UPDATE>(const SfxItemProperty PrepareStyleBase(rBase); switch(GetFamily()) { - case SfxStyleFamily::Para : return uno::makeAny<bool>(rBase.getNewBase()->GetCollection()->IsAutoUpdateFormat()); - case SfxStyleFamily::Frame: return uno::makeAny<bool>(rBase.getNewBase()->GetFrameFormat()->IsAutoUpdateFormat()); + case SfxStyleFamily::Para : return uno::Any(rBase.getNewBase()->GetCollection()->IsAutoUpdateFormat()); + case SfxStyleFamily::Frame: return uno::Any(rBase.getNewBase()->GetFrameFormat()->IsAutoUpdateFormat()); default: return uno::Any(); } } @@ -2247,7 +2247,7 @@ template<> uno::Any SwXStyle::GetStyleProperty<FN_UNO_DISPLAY_NAME>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase) { PrepareStyleBase(rBase); - return uno::makeAny(rBase.getNewBase()->GetName()); + return uno::Any(rBase.getNewBase()->GetName()); } template<> uno::Any SwXStyle::GetStyleProperty<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase) @@ -2277,7 +2277,7 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemP pSeq[n].Value <<= aStyleName; } } - return uno::makeAny(aSeq); + return uno::Any(aSeq); } template<> uno::Any SwXStyle::GetStyleProperty<FN_UNO_CATEGORY>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase) @@ -2294,8 +2294,8 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_CATEGORY>(const SfxItemPropertyMapEnt const sal_uInt16 nPoolId = rBase.getNewBase()->GetCollection()->GetPoolFormatId(); const auto pUnoToCoreIt(pUnoToCore->find(COLL_GET_RANGE_BITS & nPoolId)); if(pUnoToCoreIt == pUnoToCore->end()) - return uno::makeAny<sal_Int16>(-1); - return uno::makeAny(pUnoToCoreIt->second); + return uno::Any(sal_Int16(-1)); + return uno::Any(pUnoToCoreIt->second); } template<> uno::Any SwXStyle::GetStyleProperty<SID_SWREGISTER_COLLECTION>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, SwStyleBase_Impl& rBase) @@ -2303,13 +2303,13 @@ uno::Any SwXStyle::GetStyleProperty<SID_SWREGISTER_COLLECTION>(const SfxItemProp PrepareStyleBase(rBase); const SwPageDesc *pPageDesc = rBase.getNewBase()->GetPageDesc(); if(!pPageDesc) - return uno::makeAny(OUString()); + return uno::Any(OUString()); const SwTextFormatColl* pCol = pPageDesc->GetRegisterFormatColl(); if(!pCol) - return uno::makeAny(OUString()); + return uno::Any(OUString()); OUString aName; SwStyleNameMapper::FillProgName(pCol->GetName(), aName, SwGetPoolIdFromName::TxtColl); - return uno::makeAny(aName); + return uno::Any(aName); } template<> uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_BACKGROUND)>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet&, SwStyleBase_Impl& rBase) @@ -2328,10 +2328,10 @@ uno::Any SwXStyle::GetStyleProperty<OWN_ATTR_FILLBMP_MODE>(const SfxItemProperty PrepareStyleBase(rBase); const SfxItemSet& rSet = rBase.GetItemSet(); if (rSet.Get(XATTR_FILLBMP_TILE).GetValue()) - return uno::makeAny(drawing::BitmapMode_REPEAT); + return uno::Any(drawing::BitmapMode_REPEAT); if (rSet.Get(XATTR_FILLBMP_STRETCH).GetValue()) - return uno::makeAny(drawing::BitmapMode_STRETCH); - return uno::makeAny(drawing::BitmapMode_NO_REPEAT); + return uno::Any(drawing::BitmapMode_STRETCH); + return uno::Any(drawing::BitmapMode_NO_REPEAT); } template<> uno::Any SwXStyle::GetStyleProperty<HINT_BEGIN>(const SfxItemPropertyMapEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase) @@ -3404,7 +3404,7 @@ uno::Sequence<uno::Type> SwXFrameStyle::getTypes() uno::Any SwXFrameStyle::queryInterface(const uno::Type& rType) { if(rType == cppu::UnoType<XEventsSupplier>::get()) - return uno::makeAny(uno::Reference<XEventsSupplier>(this)); + return uno::Any(uno::Reference<XEventsSupplier>(this)); return SwXStyle::queryInterface(rType); } @@ -4547,11 +4547,11 @@ css::uno::Any SAL_CALL SwXTextTableStyle::getPropertyValue(const OUString& rProp else if (rPropertyName == UNO_NAME_TABLE_LAST_ROW_START_COLUMN) bIsRow = m_pTableAutoFormat->LastRowStartColumnIsRow(); else if (rPropertyName == UNO_NAME_DISPLAY_NAME) - return uno::makeAny(m_pTableAutoFormat->GetName()); + return uno::Any(m_pTableAutoFormat->GetName()); else throw css::beans::UnknownPropertyException(rPropertyName); - return uno::makeAny(bIsRow ? OUString("row") : OUString("column")); + return uno::Any(bIsRow ? OUString("row") : OUString("column")); } void SAL_CALL SwXTextTableStyle::addPropertyChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XPropertyChangeListener >& /*xListener*/ ) diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 836866bef198..829ea727e5d6 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -264,8 +264,8 @@ static uno::Any lcl_GetSpecialProperty(SwFrameFormat* pFormat, const SfxItemProp SwTable* pTable = SwTable::FindTable( pFormat ); const sal_uInt16 nRepeat = pTable->GetRowsToRepeat(); if(pEntry->nWID == FN_TABLE_HEADLINE_REPEAT) - return uno::makeAny<bool>(nRepeat > 0); - return uno::makeAny<sal_Int32>(nRepeat); + return uno::Any(nRepeat > 0); + return uno::Any(sal_Int32(nRepeat)); } case FN_TABLE_WIDTH: @@ -290,25 +290,25 @@ static uno::Any lcl_GetSpecialProperty(SwFrameFormat* pFormat, const SfxItemProp { const SwPageDesc* pDsc = pItem->GetPageDesc(); if(pDsc) - return uno::makeAny<OUString>(SwStyleNameMapper::GetProgName(pDsc->GetName(), SwGetPoolIdFromName::PageDesc )); + return uno::Any(SwStyleNameMapper::GetProgName(pDsc->GetName(), SwGetPoolIdFromName::PageDesc )); } - return uno::makeAny(OUString()); + return uno::Any(OUString()); } case RES_ANCHOR: - return uno::makeAny(text::TextContentAnchorType_AT_PARAGRAPH); + return uno::Any(text::TextContentAnchorType_AT_PARAGRAPH); case FN_UNO_ANCHOR_TYPES: { uno::Sequence<text::TextContentAnchorType> aTypes{text::TextContentAnchorType_AT_PARAGRAPH}; - return uno::makeAny(aTypes); + return uno::Any(aTypes); } case FN_UNO_WRAP : - return uno::makeAny(text::WrapTextMode_NONE); + return uno::Any(text::WrapTextMode_NONE); case FN_PARAM_LINK_DISPLAY_NAME : - return uno::makeAny(pFormat->GetName()); + return uno::Any(pFormat->GetName()); case FN_UNO_REDLINE_NODE_START: case FN_UNO_REDLINE_NODE_END: @@ -326,7 +326,7 @@ static uno::Any lcl_GetSpecialProperty(SwFrameFormat* pFormat, const SfxItemProp const SwNode& rStartOfRedline = SwNodeIndex(rRedPointNode) <= SwNodeIndex(rRedMarkNode) ? rRedPointNode : rRedMarkNode; bool bIsStart = &rStartOfRedline == pTableNode; - return uno::makeAny(SwXRedlinePortion::CreateRedlineProperties(*pRedline, bIsStart)); + return uno::Any(SwXRedlinePortion::CreateRedlineProperties(*pRedline, bIsStart)); } } } @@ -1015,7 +1015,7 @@ uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName) switch(pEntry->nWID) { case FN_UNO_CELL_ROW_SPAN: - return uno::makeAny(m_pBox->getRowSpan()); + return uno::Any(m_pBox->getRowSpan()); case FN_UNO_TEXT_SECTION: { SwFrameFormat* pTableFormat = GetFrameFormat(); @@ -1025,11 +1025,11 @@ uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName) if(!pSectionNode) return uno::Any(); SwSection& rSect = pSectionNode->GetSection(); - return uno::makeAny(SwXTextSections::GetObject(*rSect.GetFormat())); + return uno::Any(SwXTextSections::GetObject(*rSect.GetFormat())); } break; case FN_UNO_CELL_NAME: - return uno::makeAny(m_pBox->GetName()); + return uno::Any(m_pBox->GetName()); case FN_UNO_REDLINE_NODE_START: case FN_UNO_REDLINE_NODE_END: { @@ -1054,7 +1054,7 @@ uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName) m_xParentText = sw::CreateParentXText(rDoc, aPos); } - return uno::makeAny(m_xParentText); + return uno::Any(m_xParentText); } break; default: @@ -1205,7 +1205,7 @@ uno::Any SwXCell::GetAny() const // check if table box value item is set auto pBoxFormat(m_pBox->GetFrameFormat()); const bool bIsNum = pBoxFormat->GetItemState(RES_BOXATR_VALUE, false) == SfxItemState::SET; - return bIsNum ? uno::makeAny(getValue()) : uno::makeAny(const_cast<SwXCell*>(this)->getString()); + return bIsNum ? uno::Any(getValue()) : uno::Any(const_cast<SwXCell*>(this)->getString()); } OUString SwXCell::getImplementationName() @@ -3900,7 +3900,7 @@ uno::Any SwXTableRows::getByIndex(sal_Int32 nIndex) if(!aHint.m_pResult) aHint.m_pResult = new SwXTextTableRow(pFrameFormat, pLine); uno::Reference<beans::XPropertySet> xRet = static_cast<beans::XPropertySet*>(aHint.m_pResult.get()); - return uno::makeAny(xRet); + return uno::Any(xRet); } uno::Type SAL_CALL SwXTableRows::getElementType() @@ -4059,7 +4059,7 @@ uno::Any SwXTableColumns::getByIndex(sal_Int32 nIndex) SolarMutexGuard aGuard; if(nIndex < 0 || getCount() <= nIndex) throw lang::IndexOutOfBoundsException(); - return uno::makeAny(uno::Reference<uno::XInterface>()); // i#21699 not supported + return uno::Any(uno::Reference<uno::XInterface>()); // i#21699 not supported } uno::Type SAL_CALL SwXTableColumns::getElementType() diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 8b0f605640e6..a837d42d71c2 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2118,10 +2118,10 @@ lcl_MergeCells(std::vector<VerticallyMergedCell> & rMergedCells) SAL_WARN("sw.uno", "incomplete vertical cell merge"); continue; } - aMergedCell.aCells.front()->setPropertyValue(UNO_NAME_ROW_SPAN, uno::makeAny(nCellCount--)); + aMergedCell.aCells.front()->setPropertyValue(UNO_NAME_ROW_SPAN, uno::Any(nCellCount--)); nCellCount*=-1; for(auto pxPSet = aMergedCell.aCells.begin()+1; nCellCount<0; ++pxPSet, ++nCellCount) - (*pxPSet)->setPropertyValue(UNO_NAME_ROW_SPAN, uno::makeAny(nCellCount)); + (*pxPSet)->setPropertyValue(UNO_NAME_ROW_SPAN, uno::Any(nCellCount)); } } diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx index 1b18d54a3f6f..16766d9a3b8a 100644 --- a/sw/source/filter/html/SwAppletImpl.cxx +++ b/sw/source/filter/html/SwAppletImpl.cxx @@ -131,14 +131,14 @@ void SwApplet_Impl::CreateApplet( const OUString& rCode, const OUString& rName, uno::Reference < beans::XPropertySet > xSet( m_xApplet->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue("AppletCode", uno::makeAny( rCode ) ); - xSet->setPropertyValue("AppletName", uno::makeAny( rName ) ); - xSet->setPropertyValue("AppletIsScript", uno::makeAny( bMayScript ) ); - xSet->setPropertyValue("AppletDocBase", uno::makeAny( sDocBase ) ); + xSet->setPropertyValue("AppletCode", uno::Any( rCode ) ); + xSet->setPropertyValue("AppletName", uno::Any( rName ) ); + xSet->setPropertyValue("AppletIsScript", uno::Any( bMayScript ) ); + xSet->setPropertyValue("AppletDocBase", uno::Any( sDocBase ) ); if ( !rCodeBase.isEmpty() ) - xSet->setPropertyValue("AppletCodeBase", uno::makeAny( rCodeBase ) ); + xSet->setPropertyValue("AppletCodeBase", uno::Any( rCodeBase ) ); else - xSet->setPropertyValue("AppletCodeBase", uno::makeAny( sDocBase ) ); + xSet->setPropertyValue("AppletCodeBase", uno::Any( sDocBase ) ); } } #if HAVE_FEATURE_JAVA @@ -179,7 +179,7 @@ void SwApplet_Impl::FinishApplet() { uno::Sequence < beans::PropertyValue > aProps; m_aCommandList.FillSequence( aProps ); - xSet->setPropertyValue("AppletCommands", uno::makeAny( aProps ) ); + xSet->setPropertyValue("AppletCommands", uno::Any( aProps ) ); } } diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 12a5a8c912dd..e45f2b7db018 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -1616,7 +1616,7 @@ void SwHTMLParser::InsertInput() if( bDisabled ) { - xPropSet->setPropertyValue("Enabled", makeAny(false) ); + xPropSet->setPropertyValue("Enabled", Any(false) ); } } @@ -2010,7 +2010,7 @@ void SwHTMLParser::NewTextArea() if( bDisabled ) { - xPropSet->setPropertyValue("Enabled", makeAny(false) ); + xPropSet->setPropertyValue("Enabled", Any(false) ); } OSL_ENSURE( m_pFormImpl->GetText().isEmpty(), "Text is not empty!" ); @@ -2267,14 +2267,14 @@ void SwHTMLParser::NewSelect() if( bDisabled ) { - xPropSet->setPropertyValue("Enabled", makeAny(false) ); + xPropSet->setPropertyValue("Enabled", Any(false) ); } Size aTextSz( 0, 0 ); bool bMinWidth = true, bMinHeight = true; if( !bMultiple && 1==m_nSelectEntryCnt ) { - xPropSet->setPropertyValue("Dropdown", makeAny(true) ); + xPropSet->setPropertyValue("Dropdown", Any(true) ); } else { @@ -2283,7 +2283,7 @@ void SwHTMLParser::NewSelect() if( bMultiple ) { - xPropSet->setPropertyValue("MultiSelection", makeAny(true) ); + xPropSet->setPropertyValue("MultiSelection", Any(true) ); } aTextSz.setHeight( m_nSelectEntryCnt ); bMinHeight = false; diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index eacb1647361f..bd8446c9ca1e 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -539,13 +539,13 @@ bool SwHTMLParser::InsertEmbed() if ( xSet.is() ) { if( bHasURL ) - xSet->setPropertyValue("PluginURL", uno::makeAny( aURL ) ); + xSet->setPropertyValue("PluginURL", uno::Any( aURL ) ); if( bHasType ) - xSet->setPropertyValue("PluginMimeType", uno::makeAny( aType ) ); + xSet->setPropertyValue("PluginMimeType", uno::Any( aType ) ); uno::Sequence < beans::PropertyValue > aProps; aCmdLst.FillSequence( aProps ); - xSet->setPropertyValue("PluginCommands", uno::makeAny( aProps ) ); + xSet->setPropertyValue("PluginCommands", uno::Any( aProps ) ); } } @@ -582,9 +582,9 @@ bool SwHTMLParser::InsertEmbed() if (bOwnFormat) { uno::Sequence<beans::PropertyValue> aMedium = comphelper::InitPropertySequence( - { { "InputStream", uno::makeAny(xInStream) }, - { "URL", uno::makeAny(OUString("private:stream")) }, - { "DocumentBaseURL", uno::makeAny(m_sBaseURL) } }); + { { "InputStream", uno::Any(xInStream) }, + { "URL", uno::Any(OUString("private:stream")) }, + { "DocumentBaseURL", uno::Any(m_sBaseURL) } }); xObj = aCnt.InsertEmbeddedObject(aMedium, aName, &m_sBaseURL); } else @@ -612,7 +612,7 @@ bool SwHTMLParser::InsertEmbed() // Set media type of the native data. uno::Reference<beans::XPropertySet> xOutStreamProps(xOutStream, uno::UNO_QUERY); if (xOutStreamProps.is()) - xOutStreamProps->setPropertyValue("MediaType", uno::makeAny(aType)); + xOutStreamProps->setPropertyValue("MediaType", uno::Any(aType)); } } xObj = aCnt.GetEmbeddedObject(aObjName); @@ -651,7 +651,7 @@ bool SwHTMLParser::InsertEmbed() // during parsing. uno::Sequence<beans::PropertyValue> aValues{ comphelper::makePropertyValue("StreamReadOnly", true) }; - uno::Sequence<uno::Any> aArguments{ uno::makeAny(aValues) }; + uno::Sequence<uno::Any> aArguments{ uno::Any(aValues) }; xObjInitialization->initialize(aArguments); } SwFrameFormat* pFlyFormat = @@ -662,7 +662,7 @@ bool SwHTMLParser::InsertEmbed() { uno::Sequence<beans::PropertyValue> aValues{ comphelper::makePropertyValue("StreamReadOnly", false) }; - uno::Sequence<uno::Any> aArguments{ uno::makeAny(aValues) }; + uno::Sequence<uno::Any> aArguments{ uno::Any(aValues) }; xObjInitialization->initialize(aArguments); } @@ -1097,24 +1097,24 @@ void SwHTMLParser::InsertFloatingFrame() bool bHasBorder = aFrameDesc.HasFrameBorder(); Size aMargin = aFrameDesc.GetMargin(); - xSet->setPropertyValue("FrameURL", uno::makeAny( aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ); - xSet->setPropertyValue("FrameName", uno::makeAny( aName ) ); + xSet->setPropertyValue("FrameURL", uno::Any( aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ); + xSet->setPropertyValue("FrameName", uno::Any( aName ) ); if ( eScroll == ScrollingMode::Auto ) xSet->setPropertyValue("FrameIsAutoScroll", - uno::makeAny( true ) ); + uno::Any( true ) ); else xSet->setPropertyValue("FrameIsScrollingMode", - uno::makeAny( eScroll == ScrollingMode::Yes ) ); + uno::Any( eScroll == ScrollingMode::Yes ) ); xSet->setPropertyValue("FrameIsBorder", - uno::makeAny( bHasBorder ) ); + uno::Any( bHasBorder ) ); xSet->setPropertyValue("FrameMarginWidth", - uno::makeAny( sal_Int32( aMargin.Width() ) ) ); + uno::Any( sal_Int32( aMargin.Width() ) ) ); xSet->setPropertyValue("FrameMarginHeight", - uno::makeAny( sal_Int32( aMargin.Height() ) ) ); + uno::Any( sal_Int32( aMargin.Height() ) ) ); } } } diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 7c30e25e4f55..b86655365162 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1523,7 +1523,7 @@ void DocxExport::WriteGlossary() gId = gId.copy(3); //"rId" only save the numeric value PropertySet aProps(xOutputStream); - aProps.setAnyProperty( PROP_RelId, uno::makeAny( gId.toInt32() )); + aProps.setAnyProperty( PROP_RelId, uno::Any( gId.toInt32() )); m_rFilter.addRelation( xOutputStream, gType, gTarget); uno::Reference< xml::sax::XSAXSerializable > gserializer( xDom, uno::UNO_QUERY ); writer->setOutputStream(GetFilter().openFragmentStream( "word/glossary/" + gTarget, contentType ) ); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index dbbe0d67fc9d..5da3ca9fbee5 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -3352,13 +3352,13 @@ void MSWordExportBase::UpdateTocSectionNodeProperties(const SwSectionNode& rSect { uno::Sequence<beans::PropertyValue> aDocPropertyValues(comphelper::InitPropertySequence( { - {"ooxml:CT_SdtDocPart_docPartGallery", uno::makeAny(OUString("Table of Contents"))}, - {"ooxml:CT_SdtDocPart_docPartUnique", uno::makeAny(OUString("true"))}, + {"ooxml:CT_SdtDocPart_docPartGallery", uno::Any(OUString("Table of Contents"))}, + {"ooxml:CT_SdtDocPart_docPartUnique", uno::Any(OUString("true"))}, })); uno::Sequence<beans::PropertyValue> aSdtPrPropertyValues(comphelper::InitPropertySequence( { - {"ooxml:CT_SdtPr_docPartObj", uno::makeAny(aDocPropertyValues)}, + {"ooxml:CT_SdtPr_docPartObj", uno::Any(aDocPropertyValues)}, })); SfxGrabBagItem aGrabBag(RES_PARATR_GRABBAG); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 132fb02bff50..faa25df0ec62 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3440,7 +3440,7 @@ bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec rCodec.InitKey( aPassword, pDocId ); aEncryptionData = rCodec.GetEncryptionData(); - mpMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); + mpMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::Any( aEncryptionData ) ) ); } } @@ -3722,7 +3722,7 @@ ErrCode SwWW8Writer::WriteStorage() { uno::Reference<uno::XComponentContext> xComponentContext(comphelper::getProcessComponentContext()); uno::Sequence<uno::Any> aArguments{ - uno::makeAny(beans::NamedValue("Binary", uno::makeAny(true))) }; + uno::Any(beans::NamedValue("Binary", uno::Any(true))) }; xPackageEncryption.set( xComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext( "com.sun.star.comp.oox.crypto." + sCryptoType, aArguments, xComponentContext), uno::UNO_QUERY); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 292b4475a216..35a3568b1dd7 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1847,7 +1847,7 @@ void SwWW8ImplReader::ImportDop() uno::Reference< uno::XComponentContext > xComponentContext(comphelper::getProcessComponentContext()); uno::Reference<container::XIndexContainer> xBox = document::IndexedPropertyValues::create(xComponentContext); - xBox->insertByIndex(sal_Int32(0), uno::makeAny(aViewProps)); + xBox->insertByIndex(sal_Int32(0), uno::Any(aViewProps)); uno::Reference<document::XViewDataSupplier> xViewDataSupplier(m_pDocShell->GetModel(), uno::UNO_QUERY); xViewDataSupplier->setViewData(xBox); } @@ -1905,7 +1905,7 @@ void SwWW8ImplReader::ImportDop() if (xInfo.is()) { if (xInfo->hasPropertyByName("ApplyFormDesignMode")) - xDocProps->setPropertyValue("ApplyFormDesignMode", css::uno::makeAny(false)); + xDocProps->setPropertyValue("ApplyFormDesignMode", css::uno::Any(false)); } } @@ -4897,7 +4897,7 @@ static void lcl_createTemplateToProjectEntry( const uno::Reference< container::X if ( nIndex != -1 ) { OUString templateName = templateNameWithExt.copy( 0, nIndex ); - xPrjNameCache->insertByName( templateName, uno::makeAny( sVBAProjName ) ); + xPrjNameCache->insertByName( templateName, uno::Any( sVBAProjName ) ); } } catch( const uno::Exception& ) @@ -5865,7 +5865,7 @@ ErrCode SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss) } pMedium->GetItemSet()->ClearItem( SID_PASSWORD ); - pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); + pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::Any( aEncryptionData ) ) ); } } break; @@ -5929,7 +5929,7 @@ ErrCode SwWW8ImplReader::LoadThroughDecryption(WW8Glossary *pGloss) } pMedium->GetItemSet()->ClearItem( SID_PASSWORD ); - pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); + pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::Any( aEncryptionData ) ) ); } } break; @@ -6477,7 +6477,7 @@ ErrCode WW8Reader::DecryptDRMPackage() // Set the media descriptor data uno::Sequence<beans::NamedValue> aEncryptionData = xPackageEncryption->createEncryptionData(""); - m_pMedium->GetItemSet()->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, uno::makeAny(aEncryptionData))); + m_pMedium->GetItemSet()->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, uno::Any(aEncryptionData))); } catch (const std::exception&) { diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 0d1c634d9839..db67528cdf5a 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2432,7 +2432,7 @@ bool WW8FormulaListBox::Import(const uno::Reference < xPropSet->setPropertyValue("HelpText", aTmp ); } - xPropSet->setPropertyValue("Dropdown", css::uno::makeAny(true)); + xPropSet->setPropertyValue("Dropdown", css::uno::Any(true)); if (!maListEntries.empty()) { diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index a55495404760..5b29666a9ee2 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -657,11 +657,11 @@ sal_uInt16 SwWW8ImplReader::End_Field() pFieldmark->GetParameters()->insert( std::pair< OUString, uno::Any > ( ODF_ID_PARAM, - uno::makeAny( sFieldId ) ) ); + uno::Any( sFieldId ) ) ); pFieldmark->GetParameters()->insert( std::pair< OUString, uno::Any > ( ODF_CODE_PARAM, - uno::makeAny( aCode ) ) ); + uno::Any( aCode ) ) ); if ( m_aFieldStack.back().mnObjLocFc > 0 ) { @@ -696,7 +696,7 @@ sal_uInt16 SwWW8ImplReader::End_Field() // Store the OLE Id as a parameter pFieldmark->GetParameters()->insert( std::pair< OUString, uno::Any >( - ODF_OLE_PARAM, uno::makeAny( sOleId ) ) ); + ODF_OLE_PARAM, uno::Any( sOleId ) ) ); } } } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 963fecb13c0a..4795205762fa 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -4130,7 +4130,7 @@ void SwWW8ImplReader::Read_CharShadow( sal_uInt16, const sal_uInt8* pData, shor // Add a marker to the grabbag indicating that character background was imported from MSO shading SfxGrabBagItem aGrabBag = *static_cast<const SfxGrabBagItem*>(GetFormatAttr(RES_CHRATR_GRABBAG)); std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag(); - rMap.insert(std::pair<OUString, css::uno::Any>("CharShadingMarker",uno::makeAny(true))); + rMap.insert(std::pair<OUString, css::uno::Any>("CharShadingMarker",uno::Any(true))); NewAttr(aGrabBag); } } @@ -4152,7 +4152,7 @@ void SwWW8ImplReader::Read_TextBackColor(sal_uInt16, const sal_uInt8* pData, sho // Add a marker to the grabbag indicating that character background was imported from MSO shading SfxGrabBagItem aGrabBag = *static_cast<const SfxGrabBagItem*>(GetFormatAttr(RES_CHRATR_GRABBAG)); std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag(); - rMap.insert(std::pair<OUString, css::uno::Any>("CharShadingMarker",uno::makeAny(true))); + rMap.insert(std::pair<OUString, css::uno::Any>("CharShadingMarker",uno::Any(true))); NewAttr(aGrabBag); } } diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx index aca7004f086a..a28d28be559e 100644 --- a/sw/source/filter/ww8/ww8toolbar.cxx +++ b/sw/source/filter/ww8/ww8toolbar.cxx @@ -303,7 +303,7 @@ bool Customization::ImportMenu( SwCTBWrapper& rWrapper, CustomToolBarImportHelpe if ( pCust->customizationDataCTB && !pCust->customizationDataCTB->ImportMenuTB( rWrapper, xMenuContainer, helper ) ) return false; SAL_INFO("sw.ww8","** there are " << xIndexContainer->getCount() << " menu items on the bar, inserting after that"); - xIndexContainer->insertByIndex( xIndexContainer->getCount(), uno::makeAny( aPopupMenu ) ); + xIndexContainer->insertByIndex( xIndexContainer->getCount(), uno::Any( aPopupMenu ) ); if ( bHasSettings ) helper.getCfgManager()->replaceSettings( sMenuBar, uno::Reference< container::XIndexAccess >( xIndexContainer, uno::UNO_QUERY_THROW ) ); @@ -434,7 +434,7 @@ bool SwCTB::ImportCustomToolBar( SwCTBWrapper& rWrapper, CustomToolBarImportHelp uno::Reference< beans::XPropertySet > xProps( xIndexContainer, uno::UNO_QUERY_THROW ); // set UI name for toolbar - xProps->setPropertyValue( "UIName", uno::makeAny( name.getString() ) ); + xProps->setPropertyValue( "UIName", uno::Any( name.getString() ) ); const OUString sToolBarName = "private:resource/toolbar/custom_" + name.getString(); for ( auto& rItem : rTBC ) @@ -591,10 +591,10 @@ SwTBC::ImportToolBarControl( SwCTBWrapper& rWrapper, const css::uno::Reference< // insert spacer uno::Sequence< beans::PropertyValue > sProps{ comphelper::makePropertyValue( "Type", ui::ItemType::SEPARATOR_LINE) }; - toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( sProps ) ); + toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::Any( sProps ) ); } - toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::makeAny( comphelper::containerToSequence(props) ) ); + toolbarcontainer->insertByIndex( toolbarcontainer->getCount(), uno::Any( comphelper::containerToSequence(props) ) ); } return true; } diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 18c72567c30e..6d1aaa9b37af 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -275,7 +275,7 @@ XMLRedlineImportHelper::XMLRedlineImportHelper( // set redline mode to "don't record changes" if( bHandleRecordChanges ) { - m_xModelPropertySet->setPropertyValue( g_sRecordChanges, makeAny(false) ); + m_xModelPropertySet->setPropertyValue( g_sRecordChanges, Any(false) ); } } diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 234a802a4753..fb6fe1f1d733 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -303,7 +303,7 @@ ErrCode ReadThroughComponent( OSL_ENSURE( xInfoSet.is(), "missing property set" ); if( xInfoSet.is() ) { - xInfoSet->setPropertyValue( "StreamName", makeAny( sStreamName ) ); + xInfoSet->setPropertyValue( "StreamName", Any( sStreamName ) ); } try @@ -642,7 +642,7 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con xInfoSet->setPropertyValue("ProgressRange", aProgRange); Reference< container::XNameAccess > xLateInitSettings( document::NamedPropertyValues::create(xContext), UNO_QUERY_THROW ); - beans::NamedValue aLateInitSettings( "LateInitSettings", makeAny( xLateInitSettings ) ); + beans::NamedValue aLateInitSettings( "LateInitSettings", Any( xLateInitSettings ) ); xInfoSet->setPropertyValue( "SourceStorage", Any( xStorage ) ); @@ -684,16 +684,16 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con *pSeq++ = "NumberingStyles"; xInfoSet->setPropertyValue( "StyleInsertModeFamilies", - makeAny(aFamiliesSeq) ); + Any(aFamiliesSeq) ); - xInfoSet->setPropertyValue( "StyleInsertModeOverwrite", makeAny(!m_aOption.IsMerge()) ); + xInfoSet->setPropertyValue( "StyleInsertModeOverwrite", Any(!m_aOption.IsMerge()) ); } else if( m_bInsertMode ) { const uno::Reference<text::XTextRange> xInsertTextRange = SwXTextRange::CreateXTextRange(rDoc, *rPaM.GetPoint(), nullptr); xInfoSet->setPropertyValue( "TextInsertModeRange", - makeAny(xInsertTextRange) ); + Any(xInsertTextRange) ); } else { @@ -703,11 +703,11 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con if( IsBlockMode() ) { - xInfoSet->setPropertyValue( "AutoTextMode", makeAny(true) ); + xInfoSet->setPropertyValue( "AutoTextMode", Any(true) ); } if( IsOrganizerMode() ) { - xInfoSet->setPropertyValue( "OrganizerMode", makeAny(true) ); + xInfoSet->setPropertyValue( "OrganizerMode", Any(true) ); } // Set base URI @@ -716,7 +716,7 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con SfxMedium* pMedDescrMedium = m_pMedium ? m_pMedium : pDocSh->GetMedium(); OSL_ENSURE( pMedDescrMedium, "There is no medium to get MediaDescriptor from!" ); - xInfoSet->setPropertyValue( "BaseURI", makeAny( rBaseURL ) ); + xInfoSet->setPropertyValue( "BaseURI", Any( rBaseURL ) ); // TODO/LATER: separate links from usual embedded objects OUString StreamPath; @@ -736,7 +736,7 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con if( !StreamPath.isEmpty() ) { - xInfoSet->setPropertyValue( "StreamRelPath", makeAny( StreamPath ) ); + xInfoSet->setPropertyValue( "StreamRelPath", Any( StreamPath ) ); } } @@ -748,11 +748,11 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con static const OUStringLiteral sRecordChanges(u"RecordChanges"); static const OUStringLiteral sRedlineProtectionKey(u"RedlineProtectionKey"); xInfoSet->setPropertyValue( sShowChanges, - makeAny(IDocumentRedlineAccess::IsShowChanges(rDoc.getIDocumentRedlineAccess().GetRedlineFlags())) ); + Any(IDocumentRedlineAccess::IsShowChanges(rDoc.getIDocumentRedlineAccess().GetRedlineFlags())) ); xInfoSet->setPropertyValue( sRecordChanges, - makeAny(IDocumentRedlineAccess::IsRedlineOn(rDoc.getIDocumentRedlineAccess().GetRedlineFlags())) ); + Any(IDocumentRedlineAccess::IsRedlineOn(rDoc.getIDocumentRedlineAccess().GetRedlineFlags())) ); xInfoSet->setPropertyValue( sRedlineProtectionKey, - makeAny(rDoc.getIDocumentRedlineAccess().GetRedlinePassword()) ); + Any(rDoc.getIDocumentRedlineAccess().GetRedlinePassword()) ); // force redline mode to "none" rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::NONE ); @@ -763,13 +763,13 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con const bool bShapePositionInHoriL2R = !bOASIS; xInfoSet->setPropertyValue( "ShapePositionInHoriL2R", - makeAny( bShapePositionInHoriL2R ) ); + Any( bShapePositionInHoriL2R ) ); } { const bool bTextDocInOOoFileFormat = !bOASIS; xInfoSet->setPropertyValue( "TextDocInOOoFileFormat", - makeAny( bTextDocInOOoFileFormat ) ); + Any( bTextDocInOOoFileFormat ) ); } ErrCode nWarnRDF = ERRCODE_NONE; diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index bd9a4c4c8be5..6c553a6fc567 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -188,7 +188,7 @@ ErrCode SwXMLWriter::Write_(const SfxItemSet* pMediumItemSet) xInfoSet->setPropertyValue( "TargetStorage", Any( m_xStg ) ); - xInfoSet->setPropertyValue("NoEmbDataSet", makeAny(bNoEmbDS)); + xInfoSet->setPropertyValue("NoEmbDataSet", Any(bNoEmbDS)); if (m_bShowProgress) { @@ -204,7 +204,7 @@ ErrCode SwXMLWriter::Write_(const SfxItemSet* pMediumItemSet) xInfoSet->setPropertyValue("ProgressMax", Any(static_cast < sal_Int32 >( -1 ))); } - xInfoSet->setPropertyValue( "UsePrettyPrinting", makeAny(officecfg::Office::Common::Save::Document::PrettyPrinting::get()) ); + xInfoSet->setPropertyValue( "UsePrettyPrinting", Any(officecfg::Office::Common::Save::Document::PrettyPrinting::get()) ); uno::Reference<lang::XComponent> const xModelComp(m_pDoc->GetDocShell()->GetModel()); uno::Reference<drawing::XDrawPageSupplier> const xDPS(xModelComp, uno::UNO_QUERY); @@ -218,14 +218,14 @@ ErrCode SwXMLWriter::Write_(const SfxItemSet* pMediumItemSet) // TODO: ideally this would be stored per-view... SwRootFrame const*const pLayout(m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout()); isShowChanges = pLayout == nullptr || !pLayout->IsHideRedlines(); - xInfoSet->setPropertyValue("ShowChanges", makeAny(isShowChanges)); + xInfoSet->setPropertyValue("ShowChanges", Any(isShowChanges)); // ... and hide redlines for export nRedlineFlags &= ~RedlineFlags::ShowMask; nRedlineFlags |= RedlineFlags::ShowInsert; m_pDoc->getIDocumentRedlineAccess().SetRedlineFlags( nRedlineFlags ); // Set base URI - xInfoSet->setPropertyValue( "BaseURI", makeAny( GetBaseURL() ) ); + xInfoSet->setPropertyValue( "BaseURI", Any( GetBaseURL() ) ); if( SfxObjectCreateMode::EMBEDDED == m_pDoc->GetDocShell()->GetCreateMode() ) { @@ -233,12 +233,12 @@ ErrCode SwXMLWriter::Write_(const SfxItemSet* pMediumItemSet) ? aDocHierarchicalName : OUString( "dummyObjectName" ) ); - xInfoSet->setPropertyValue( "StreamRelPath", makeAny( aName ) ); + xInfoSet->setPropertyValue( "StreamRelPath", Any( aName ) ); } if( m_bBlock ) { - xInfoSet->setPropertyValue( "AutoTextMode", makeAny(true) ); + xInfoSet->setPropertyValue( "AutoTextMode", Any(true) ); } // #i69627# @@ -246,7 +246,7 @@ ErrCode SwXMLWriter::Write_(const SfxItemSet* pMediumItemSet) if ( bOASIS && docfunc::HasOutlineStyleToBeWrittenAsNormalListStyle( *m_pDoc ) ) { - xInfoSet->setPropertyValue( "OutlineStyleAsNormalListStyle", makeAny( true ) ); + xInfoSet->setPropertyValue( "OutlineStyleAsNormalListStyle", Any( true ) ); } // filter arguments @@ -508,7 +508,7 @@ bool SwXMLWriter::WriteThroughComponent( xSet->setPropertyValue("MediaType", Any(OUString("text/xml")) ); // even plain stream should be encrypted in encrypted documents - xSet->setPropertyValue( "UseCommonStoragePasswordEncryption", makeAny(true) ); + xSet->setPropertyValue( "UseCommonStoragePasswordEncryption", Any(true) ); // set buffer and create outputstream uno::Reference< io::XOutputStream > xOutputStream = xStream->getOutputStream(); @@ -520,7 +520,7 @@ bool SwXMLWriter::WriteThroughComponent( OSL_ENSURE( xInfoSet.is(), "missing property set" ); if( xInfoSet.is() ) { - xInfoSet->setPropertyValue( "StreamName", makeAny( sStreamName ) ); + xInfoSet->setPropertyValue( "StreamName", Any( sStreamName ) ); } // write the stuff diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index d107828a2981..9f5ee3cf0dc1 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -333,7 +333,7 @@ SwXMLTextStyleContext_Impl::Finish( bool bOverwrite ) try { - xPropSet->setPropertyValue(UNO_NAME_PARA_STYLE_CONDITIONS, uno::makeAny(aSeq)); + xPropSet->setPropertyValue(UNO_NAME_PARA_STYLE_CONDITIONS, uno::Any(aSeq)); } catch (uno::Exception const&) { @@ -473,7 +473,7 @@ void SwXMLCellStyleContext::AddDataFormat() if (aIter != GetProperties().end()) aIter->maValue <<= nNumberFormat; else - GetProperties().push_back(XMLPropertyState(nIndex, makeAny(nNumberFormat))); + GetProperties().push_back(XMLPropertyState(nIndex, Any(nNumberFormat))); } void SwXMLCellStyleContext::FillPropertySet(const css::uno::Reference<css::beans::XPropertySet>& rPropSet) diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 97d0d5bd385a..a3b7485fd9d3 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1431,42 +1431,42 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC if( ! bAddExternalLeading ) { - xProps->setPropertyValue( "AddExternalLeading", makeAny( false ) ); + xProps->setPropertyValue( "AddExternalLeading", Any( false ) ); } if( ! bUseFormerLineSpacing ) { - xProps->setPropertyValue( "UseFormerLineSpacing", makeAny( true ) ); + xProps->setPropertyValue( "UseFormerLineSpacing", Any( true ) ); } if( !bUseFormerObjectPositioning ) { - xProps->setPropertyValue( "UseFormerObjectPositioning", makeAny( true ) ); + xProps->setPropertyValue( "UseFormerObjectPositioning", Any( true ) ); } if( !bUseOldNumbering ) { - xProps->setPropertyValue( "UseOldNumbering", makeAny(true) ); + xProps->setPropertyValue( "UseOldNumbering", Any(true) ); } if( !bAddParaSpacingToTableCells ) { xProps->setPropertyValue( "AddParaSpacingToTableCells", - makeAny( false ) ); + Any( false ) ); } if (!bAddParaLineSpacingToTableCells) { - xProps->setPropertyValue("AddParaLineSpacingToTableCells", makeAny(false)); + xProps->setPropertyValue("AddParaLineSpacingToTableCells", Any(false)); } if( !bUseFormerTextWrapping ) { - xProps->setPropertyValue( "UseFormerTextWrapping", makeAny( true ) ); + xProps->setPropertyValue( "UseFormerTextWrapping", Any( true ) ); } if (!bConsiderWrapOnObjPos && bAreUserSettingsFromDocument) { - xProps->setPropertyValue( "ConsiderTextWrapOnObjPos", makeAny( false ) ); + xProps->setPropertyValue( "ConsiderTextWrapOnObjPos", Any( false ) ); } // #i47448# @@ -1483,40 +1483,40 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC if( !bIgnoreFirstLineIndentInNumbering && bDocumentPriorSO8 ) { xProps->setPropertyValue( "IgnoreFirstLineIndentInNumbering", - makeAny( true ) ); + Any( true ) ); } // This flag has to be set for all documents < SO8 if ( !bDoNotJustifyLinesWithManualBreak && bDocumentPriorSO8 ) { xProps->setPropertyValue( "DoNotJustifyLinesWithManualBreak", - makeAny( true ) ); + Any( true ) ); } // This flag has to be set for all documents < SO8 if ( !bDoNotResetParaAttrsForNumFont && bDocumentPriorSO8 ) { xProps->setPropertyValue( "DoNotResetParaAttrsForNumFont", - makeAny( true ) ); + Any( true ) ); } // This flag has to be set for all documents < SO8 if ( !bDoNotCaptureDrawObjsOnPage && bDocumentPriorSO8 ) { xProps->setPropertyValue( "DoNotCaptureDrawObjsOnPage", - makeAny( true ) ); + Any( true ) ); } // This flag has to be set for all documents < SO8 if ( !bClipAsCharacterAnchoredWriterFlyFrames && bDocumentPriorSO8 ) { xProps->setPropertyValue( "ClipAsCharacterAnchoredWriterFlyFrames", - makeAny( true ) ); + Any( true ) ); } if ( !bUnixForceZeroExtLeading ) { - xProps->setPropertyValue( "UnxForceZeroExtLeading", makeAny( true ) ); + xProps->setPropertyValue( "UnxForceZeroExtLeading", Any( true ) ); } // Old LO versions had 66 as the value for small caps percentage, later changed to 80. @@ -1525,12 +1525,12 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC // are considered to be old files, so set the compatibility option too. if ( !bSmallCapsPercentage66 ) { - xProps->setPropertyValue( "SmallCapsPercentage66", makeAny( true ) ); + xProps->setPropertyValue( "SmallCapsPercentage66", Any( true ) ); } if ( !bTabOverflow ) { - xProps->setPropertyValue( "TabOverflow", makeAny( false ) ); + xProps->setPropertyValue( "TabOverflow", Any( false ) ); } if (bTabOverMarginValue) @@ -1542,19 +1542,19 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC uno::Any(document::PrinterIndependentLayout::HIGH_RESOLUTION)); if (!bPropLineSpacingShrinksFirstLine) - xProps->setPropertyValue("PropLineSpacingShrinksFirstLine", makeAny(false)); + xProps->setPropertyValue("PropLineSpacingShrinksFirstLine", Any(false)); if (!bSubtractFlysAnchoredAtFlys && bAreUserSettingsFromDocument) - xProps->setPropertyValue("SubtractFlysAnchoredAtFlys", makeAny(true)); + xProps->setPropertyValue("SubtractFlysAnchoredAtFlys", Any(true)); if (!bEmptyDbFieldHidesPara && bAreUserSettingsFromDocument) - xProps->setPropertyValue("EmptyDbFieldHidesPara", makeAny(false)); + xProps->setPropertyValue("EmptyDbFieldHidesPara", Any(false)); if (!bCollapseEmptyCellPara) - xProps->setPropertyValue("CollapseEmptyCellPara", makeAny(false)); + xProps->setPropertyValue("CollapseEmptyCellPara", Any(false)); if (!bAutoFirstLineIndentDisregardLineSpace) - xProps->setPropertyValue("AutoFirstLineIndentDisregardLineSpace", makeAny(false)); + xProps->setPropertyValue("AutoFirstLineIndentDisregardLineSpace", Any(false)); SwDoc *pDoc = getDoc(); SfxPrinter *pPrinter = pDoc->getIDocumentDeviceAccess().getPrinter( false ); @@ -1587,11 +1587,11 @@ void SwXMLImport::SetDocumentSpecificSettings( { if ( m_xLateInitSettings->hasByName( _rSettingsGroupName ) ) { - m_xLateInitSettings->replaceByName( _rSettingsGroupName, makeAny( _rSettings ) ); + m_xLateInitSettings->replaceByName( _rSettingsGroupName, Any( _rSettings ) ); OSL_FAIL( "SwXMLImport::SetDocumentSpecificSettings: already have settings for this model!" ); } else - m_xLateInitSettings->insertByName( _rSettingsGroupName, makeAny( _rSettings ) ); + m_xLateInitSettings->insertByName( _rSettingsGroupName, Any( _rSettings ) ); } catch( const Exception& ) { @@ -1779,8 +1779,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportDOCX(SvStream &rStream) uno::Reference<document::XImporter> xImporter(xFilter, uno::UNO_QUERY_THROW); uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence( { - { "InputStream", uno::makeAny(xStream) }, - { "InputMode", uno::makeAny(true) }, + { "InputStream", uno::Any(xStream) }, + { "InputMode", uno::Any(true) }, })); xImporter->setTargetDocument(xModel); diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 140204d3dcb6..2fd9e9c40376 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -117,7 +117,7 @@ static void lcl_addAspect( { sal_Int64 nAspect = rObj.GetViewAspect(); if ( nAspect ) - rStates.emplace_back( rMapper->FindEntryIndex( CTF_OLE_DRAW_ASPECT ), uno::makeAny( nAspect ) ); + rStates.emplace_back( rMapper->FindEntryIndex( CTF_OLE_DRAW_ASPECT ), uno::Any( nAspect ) ); } static void lcl_addOutplaceProperties( @@ -174,9 +174,9 @@ static void lcl_addFrameProperties( aAny >>= nHeight; if( !bIsAutoScroll ) - rStates.emplace_back( rMapper->FindEntryIndex( CTF_FRAME_DISPLAY_SCROLLBAR ), makeAny(bIsScrollingMode) ); + rStates.emplace_back( rMapper->FindEntryIndex( CTF_FRAME_DISPLAY_SCROLLBAR ), Any(bIsScrollingMode) ); if( !bIsAutoBorder ) - rStates.emplace_back( rMapper->FindEntryIndex( CTF_FRAME_DISPLAY_BORDER ), makeAny(bIsBorderSet) ); + rStates.emplace_back( rMapper->FindEntryIndex( CTF_FRAME_DISPLAY_BORDER ), Any(bIsBorderSet) ); if( SIZE_NOT_SET != nWidth ) rStates.emplace_back( rMapper->FindEntryIndex( CTF_FRAME_MARGIN_HORI ), Any(nWidth) ); if( SIZE_NOT_SET != nHeight ) diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 1c48efe3eae6..43f1a98abe56 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -696,10 +696,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( { if( bValidURL ) xSet->setPropertyValue("PluginURL", - makeAny( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ); + Any( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ); if( bValidMimeType ) xSet->setPropertyValue("PluginMimeType", - makeAny( rMimeType ) ); + Any( rMimeType ) ); } SwFrameFormat *const pFrameFormat = @@ -824,31 +824,31 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra if ( xSet.is() ) { xSet->setPropertyValue("FrameURL", - makeAny( URIHelper::SmartRel2Abs( + Any( URIHelper::SmartRel2Abs( INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) ); xSet->setPropertyValue("FrameName", - makeAny( rName ) ); + Any( rName ) ); if ( eScrollMode == ScrollingMode::Auto ) xSet->setPropertyValue("FrameIsAutoScroll", - makeAny( true ) ); + Any( true ) ); else xSet->setPropertyValue("FrameIsScrollingMode", - makeAny( eScrollMode == ScrollingMode::Yes ) ); + Any( eScrollMode == ScrollingMode::Yes ) ); if ( bIsBorderSet ) xSet->setPropertyValue("FrameIsBorder", - makeAny( bHasBorder ) ); + Any( bHasBorder ) ); else xSet->setPropertyValue("FrameIsAutoBorder", - makeAny( true ) ); + Any( true ) ); xSet->setPropertyValue("FrameMarginWidth", - makeAny( sal_Int32( aMargin.Width() ) ) ); + Any( sal_Int32( aMargin.Width() ) ) ); xSet->setPropertyValue("FrameMarginHeight", - makeAny( sal_Int32( aMargin.Height() ) ) ); + Any( sal_Int32( aMargin.Height() ) ) ); } SwFrameFormat *const pFrameFormat = @@ -914,14 +914,14 @@ void SwXMLTextImportHelper::endAppletOrPlugin( OUString aParaName("AppletCommands"); try { - xSet->setPropertyValue( aParaName, makeAny( aCommandSequence ) ); + xSet->setPropertyValue( aParaName, Any( aCommandSequence ) ); } catch ( uno::Exception& ) { aParaName = "PluginCommands"; try { - xSet->setPropertyValue( aParaName, makeAny( aCommandSequence ) ); + xSet->setPropertyValue( aParaName, Any( aCommandSequence ) ); } catch ( uno::Exception& ) { diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 1a5f972869ab..26e8c9e960df 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -251,10 +251,10 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl, weld::Button&, void) xMgr->createInstance("com.sun.star.sdb.RowSet"), UNO_QUERY); uno::Reference<XPropertySet> xRowProperties(xRowSet, UNO_QUERY); xRowProperties->setPropertyValue("DataSourceName", - makeAny(m_xListLB->get_text(nSelect, 0))); - xRowProperties->setPropertyValue("Command", makeAny(sCommand)); - xRowProperties->setPropertyValue("CommandType", makeAny(pUserData->nCommandType)); - xRowProperties->setPropertyValue("ActiveConnection", makeAny(pUserData->xConnection.getTyped())); + Any(m_xListLB->get_text(nSelect, 0))); + xRowProperties->setPropertyValue("Command", Any(sCommand)); + xRowProperties->setPropertyValue("CommandType", Any(pUserData->nCommandType)); + xRowProperties->setPropertyValue("ActiveConnection", Any(pUserData->xConnection.getTyped())); xRowSet->execute(); OUString sQuery; diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 1de09d99824b..e37b9d2131ff 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -266,7 +266,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( weld::Window* pParent, SwDocShell& rDocSh, SwAsciiFilterDlg::~SwAsciiFilterDlg() { SvtViewOptions aDlgOpt(EViewType::Dialog, OStringToOUString(m_xDialog->get_help_id(), RTL_TEXTENCODING_UTF8)); - aDlgOpt.SetUserItem("UserItem", uno::makeAny(m_sExtraData)); + aDlgOpt.SetUserItem("UserItem", uno::Any(m_sExtraData)); } void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions ) diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index b2ef183d7b2c..a3386f333398 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -198,7 +198,7 @@ SfxTabPage* SwFieldEditDlg::CreatePage(sal_uInt16 nGroup) uno::Reference< beans::XPropertySet > xUDProps( xDocProps->getUserDefinedProperties(), uno::UNO_QUERY_THROW); - pSet->Put( SfxUnoAnyItem( FN_FIELD_DIALOG_DOC_PROPS, uno::makeAny(xUDProps) ) ); + pSet->Put( SfxUnoAnyItem( FN_FIELD_DIALOG_DOC_PROPS, uno::Any(xUDProps) ) ); xTabPage = SwFieldDokInfPage::Create(get_content_area(), this, pSet); break; } diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 24cc745e4007..53e5a51c6eaf 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -147,7 +147,7 @@ SfxItemSet* SwFieldDlg::CreateInputItemSet(const OString& rID) uno::Reference< beans::XPropertySet > xUDProps( xDocProps->getUserDefinedProperties(), uno::UNO_QUERY_THROW); - mxInputItemSet->Put( SfxUnoAnyItem( FN_FIELD_DIALOG_DOC_PROPS, uno::makeAny(xUDProps) ) ); + mxInputItemSet->Put( SfxUnoAnyItem( FN_FIELD_DIALOG_DOC_PROPS, uno::Any(xUDProps) ) ); return mxInputItemSet.get(); } else diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index 134785415221..5ce1d903cea4 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -194,7 +194,7 @@ void SwFrameDlg::PageCreated(const OString& rId, SfxTabPage &rPage) { sal_Int32 nPreferredDPI = m_pWrtShell->GetDoc()->getIDocumentSettingAccess().getImagePreferredDPI(); if (nPreferredDPI) - rPage.getAdditionalProperties().emplace("PreferredDPI", css::uno::makeAny(nPreferredDPI)); + rPage.getAdditionalProperties().emplace("PreferredDPI", css::uno::Any(nPreferredDPI)); } } diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index ebcfec09a14d..a0f8ab67cea7 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2521,7 +2521,7 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl, weld::Button&, void) m_xGrfDlg->SetDisplayDirectory(m_xConnectED->get_text()); uno::Reference < ui::dialogs::XFilePicker3 > xFP = m_xGrfDlg->GetFilePicker(); uno::Reference < ui::dialogs::XFilePickerControlAccess > xCtrlAcc(xFP, uno::UNO_QUERY); - xCtrlAcc->setValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, uno::makeAny(true) ); + xCtrlAcc->setValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, uno::Any(true) ); if ( m_xGrfDlg->Execute() != ERRCODE_NONE ) return; diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 75907a422662..8bb2dce2e226 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -80,7 +80,7 @@ static void lcl_SetBOOLProp( { if(xInfo->hasPropertyByName(aPropName)) { - xProps->setPropertyValue(aPropName, makeAny(bValue)); + xProps->setPropertyValue(aPropName, Any(bValue)); } } @@ -170,7 +170,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( uno::Reference< beans::XPropertySet > xSectPr(m_vTypeData[i].m_pxIndexSections->xContainerSection, uno::UNO_QUERY); if(xSectPr.is()) { - xSectPr->setPropertyValue(UNO_NAME_IS_VISIBLE, makeAny(i == nTOXIndex)); + xSectPr->setPropertyValue(UNO_NAME_IS_VISIBLE, Any(i == nTOXIndex)); } } // set properties diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx index 0054b360e18e..0d2f2672b397 100644 --- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx +++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx @@ -50,7 +50,7 @@ SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg() OUString sExtraData; m_xImplDlg->FillInfo(sExtraData); SvtViewOptions aDlgOpt(EViewType::Dialog, OStringToOUString(m_xDialog->get_help_id(), RTL_TEXTENCODING_UTF8)); - aDlgOpt.SetUserItem("UserItem", css::uno::makeAny(sExtraData)); + aDlgOpt.SetUserItem("UserItem", css::uno::Any(sExtraData)); m_xDialog->set_modal(false); } diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx index 7aa61e93cef2..1cab0573121a 100644 --- a/sw/source/ui/vba/vbaapplication.cxx +++ b/sw/source/ui/vba/vbaapplication.cxx @@ -241,7 +241,7 @@ SwVbaApplication::Documents( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaDocuments( this, mxContext ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -250,7 +250,7 @@ SwVbaApplication::Addins( const uno::Any& index ) static uno::Reference< XCollection > xCol( new SwVbaAddins( this, mxContext ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -259,7 +259,7 @@ SwVbaApplication::Dialogs( const uno::Any& index ) uno::Reference< word::XDialogs > xCol( new SwVbaDialogs( this, mxContext, getCurrentDocument() )); if ( index.hasValue() ) return xCol->Item( index ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -269,7 +269,7 @@ SwVbaApplication::ListGalleries( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaListGalleries( this, mxContext, xTextDoc ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } sal_Bool SAL_CALL SwVbaApplication::getDisplayAutoCompleteTips() @@ -707,14 +707,14 @@ SwWordBasic::ToolsOptionsView( const css::uno::Any& DraftFont, css::uno::Any SAL_CALL SwWordBasic::WindowName( const css::uno::Any& /*Number*/ ) { - return css::uno::makeAny( mpApp->getActiveSwVbaWindow()->getCaption() ); + return css::uno::Any( mpApp->getActiveSwVbaWindow()->getCaption() ); } css::uno::Any SAL_CALL SwWordBasic::ExistingBookmark( const OUString& Name ) { uno::Reference< word::XBookmarks > xBookmarks( mpApp->getActiveDocument()->Bookmarks( uno::Any() ), uno::UNO_QUERY ); - return css::uno::makeAny( xBookmarks.is() && xBookmarks->Exists( Name ) ); + return css::uno::Any( xBookmarks.is() && xBookmarks->Exists( Name ) ); } void SAL_CALL @@ -742,7 +742,7 @@ SwWordBasic::AppMaximize( const css::uno::Any& WindowName, const css::uno::Any& SAL_INFO("sw.vba", "WordBasic.AppMaximize( WindowName:=" << WindowName << ", State:=" << State); // FIXME: Implement if necessary - return css::uno::makeAny( sal_Int32(0) ); + return css::uno::Any( sal_Int32(0) ); } css::uno::Any SAL_CALL @@ -751,7 +751,7 @@ SwWordBasic::DocMaximize( const css::uno::Any& State ) SAL_INFO("sw.vba", "WordBasic.DocMaximize(State:=" << State << ")"); // FIXME: Implement if necessary - return css::uno::makeAny( sal_Int32(0) ); + return css::uno::Any( sal_Int32(0) ); } void SAL_CALL @@ -768,7 +768,7 @@ SwWordBasic::AppCount() SAL_INFO("sw.vba", "WordBasic.AppCount()"); // FIXME: Implement if necessary. Return a random number for now. - return css::uno::makeAny( sal_Int32(2) ); + return css::uno::Any( sal_Int32(2) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx index a45618c94ea9..018c7dbf8930 100644 --- a/sw/source/ui/vba/vbaautotextentry.cxx +++ b/sw/source/ui/vba/vbaautotextentry.cxx @@ -109,7 +109,7 @@ uno::Any SwVbaAutoTextEntries::createCollectionObject( const css::uno::Any& aSource ) { uno::Reference< text::XAutoTextEntry > xEntry( aSource, uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XAutoTextEntry >( new SwVbaAutoTextEntry( this, mxContext, xEntry ) ) ); + return uno::Any( uno::Reference< word::XAutoTextEntry >( new SwVbaAutoTextEntry( this, mxContext, xEntry ) ) ); } OUString diff --git a/sw/source/ui/vba/vbabookmark.cxx b/sw/source/ui/vba/vbabookmark.cxx index 4ba7030c13c6..e2a9c7b71116 100644 --- a/sw/source/ui/vba/vbabookmark.cxx +++ b/sw/source/ui/vba/vbabookmark.cxx @@ -57,7 +57,7 @@ void SAL_CALL SwVbaBookmark::Select() { checkVality(); uno::Reference< view::XSelectionSupplier > xSelectSupp( mxModel->getCurrentController(), uno::UNO_QUERY_THROW ); - xSelectSupp->select( uno::makeAny( mxBookmark ) ); + xSelectSupp->select( uno::Any( mxBookmark ) ); } OUString SAL_CALL SwVbaBookmark::getName() @@ -76,7 +76,7 @@ uno::Any SAL_CALL SwVbaBookmark::Range() uno::Reference< text::XTextContent > xTextContent( mxBookmark, uno::UNO_SET_THROW ); uno::Reference< text::XTextDocument > xTextDocument( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextRange > xTextRange( xTextContent->getAnchor(), uno::UNO_SET_THROW ); - return uno::makeAny( uno::Reference< word::XRange>( new SwVbaRange( this, mxContext, xTextDocument, xTextRange->getStart(), xTextRange->getEnd(), xTextRange->getText() ) ) ); + return uno::Any( uno::Reference< word::XRange>( new SwVbaRange( this, mxContext, xTextDocument, xTextRange->getStart(), xTextRange->getEnd(), xTextRange->getText() ) ) ); } OUString diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx index 4da9fc1e79ca..018121291a06 100644 --- a/sw/source/ui/vba/vbabookmarks.cxx +++ b/sw/source/ui/vba/vbabookmarks.cxx @@ -43,7 +43,7 @@ public: { uno::Reference< container::XNamed > xNamed( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); OUString aName = xNamed->getName(); - return uno::makeAny( uno::Reference< word::XBookmark > ( new SwVbaBookmark( m_xParent, m_xContext, mxModel, aName ) ) ); + return uno::Any( uno::Reference< word::XBookmark > ( new SwVbaBookmark( m_xParent, m_xContext, mxModel, aName ) ) ); } }; @@ -134,7 +134,7 @@ SwVbaBookmarks::createCollectionObject( const css::uno::Any& aSource ) { uno::Reference< container::XNamed > xNamed( aSource, uno::UNO_QUERY_THROW ); OUString aName = xNamed->getName(); - return uno::makeAny( uno::Reference< word::XBookmark > ( new SwVbaBookmark( getParent(), mxContext, mxModel, aName ) ) ); + return uno::Any( uno::Reference< word::XBookmark > ( new SwVbaBookmark( getParent(), mxContext, mxModel, aName ) ) ); } void SwVbaBookmarks::removeBookmarkByName( const OUString& rName ) @@ -175,7 +175,7 @@ SwVbaBookmarks::Add( const OUString& rName, const uno::Any& rRange ) addBookmarkByName( mxModel, rName, xTextRange ); - return uno::makeAny( uno::Reference< word::XBookmark >( new SwVbaBookmark( getParent(), mxContext, mxModel, rName ) ) ); + return uno::Any( uno::Reference< word::XBookmark >( new SwVbaBookmark( getParent(), mxContext, mxModel, rName ) ) ); } sal_Int32 SAL_CALL diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index 7f641b829313..4c88228d5876 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -86,7 +86,7 @@ private: default: return; } - m_xProps->setPropertyValue( "TableBorder", uno::makeAny(aTableBorder) ); + m_xProps->setPropertyValue( "TableBorder", uno::Any(aTableBorder) ); } bool getBorderLine( table::BorderLine& rBorderLine ) @@ -167,7 +167,7 @@ public: nLineStyle = word::WdLineStyle::wdLineStyleNone; } } - return uno::makeAny( nLineStyle ); + return uno::Any( nLineStyle ); } void SAL_CALL setLineStyle( const uno::Any& _linestyle ) override { @@ -259,7 +259,7 @@ public: if ( nIndex >= 0 && nIndex < getCount() ) { uno::Reference< beans::XPropertySet > xProps( m_xRange, uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XBorder >( new SwVbaBorder( xProps, m_xContext, supportedIndexTable[ nIndex ] )) ); + return uno::Any( uno::Reference< word::XBorder >( new SwVbaBorder( xProps, m_xContext, supportedIndexTable[ nIndex ] )) ); } throw lang::IndexOutOfBoundsException(); } diff --git a/sw/source/ui/vba/vbacell.cxx b/sw/source/ui/vba/vbacell.cxx index 6b9c248caf15..673e38d1497a 100644 --- a/sw/source/ui/vba/vbacell.cxx +++ b/sw/source/ui/vba/vbacell.cxx @@ -78,7 +78,7 @@ void SAL_CALL SwVbaCell::SetHeight( float height, sal_Int32 heightrule ) { // FIXME: handle the argument: heightrule setHeightRule( heightrule ); - setHeight( uno::makeAny( height ) ); + setHeight( uno::Any( height ) ); } OUString diff --git a/sw/source/ui/vba/vbacells.cxx b/sw/source/ui/vba/vbacells.cxx index 72daf252cb69..69cb6e8fd7af 100644 --- a/sw/source/ui/vba/vbacells.cxx +++ b/sw/source/ui/vba/vbacells.cxx @@ -82,7 +82,7 @@ public: for( sal_Int32 col = mnLeft; col <= mnRight; col++ ) { if( Index == ( ( row - mnTop ) * ( mnRight - mnLeft + 1 ) + ( col - mnLeft ) ) ) - return uno::makeAny( uno::Reference< word::XCell >( new SwVbaCell( mxParent, mxContext, mxTextTable, col, row ) ) ); + return uno::Any( uno::Reference< word::XCell >( new SwVbaCell( mxParent, mxContext, mxTextTable, col, row ) ) ); } } throw css::lang::IndexOutOfBoundsException(); diff --git a/sw/source/ui/vba/vbacolumn.cxx b/sw/source/ui/vba/vbacolumn.cxx index 3e2d380f63cb..a0c544588ea2 100644 --- a/sw/source/ui/vba/vbacolumn.cxx +++ b/sw/source/ui/vba/vbacolumn.cxx @@ -68,7 +68,7 @@ void SwVbaColumn::SelectColumn( const uno::Reference< frame::XModel >& xModel, c uno::Reference< table::XCellRange > xSelRange = xCellRange->getCellRangeByName( aRangeName ); uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW ); - xSelection->select( uno::makeAny( xSelRange ) ); + xSelection->select( uno::Any( xSelRange ) ); } OUString diff --git a/sw/source/ui/vba/vbacolumns.cxx b/sw/source/ui/vba/vbacolumns.cxx index 9d9c32db8db1..45647aa8af4e 100644 --- a/sw/source/ui/vba/vbacolumns.cxx +++ b/sw/source/ui/vba/vbacolumns.cxx @@ -47,7 +47,7 @@ public: { if( nIndex < mxIndexAccess->getCount() ) { - return uno::makeAny( uno::Reference< word::XColumn > ( new SwVbaColumn( mxParent, mxContext, mxTextTable, nIndex++ ) ) ); + return uno::Any( uno::Reference< word::XColumn > ( new SwVbaColumn( mxParent, mxContext, mxTextTable, nIndex++ ) ) ); } throw container::NoSuchElementException(); } @@ -105,7 +105,7 @@ uno::Any SAL_CALL SwVbaColumns::Item( const uno::Any& Index1, const uno::Any& /* { throw lang::IndexOutOfBoundsException("Index out of bounds" ); } - return uno::makeAny( uno::Reference< word::XColumn >( new SwVbaColumn( this, mxContext, mxTextTable, nIndex - 1 ) ) ); + return uno::Any( uno::Reference< word::XColumn >( new SwVbaColumn( this, mxContext, mxTextTable, nIndex - 1 ) ) ); } throw uno::RuntimeException("Index out of bounds" ); } diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index 656a2bb942e5..92251ef36da2 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -177,7 +177,7 @@ SwVbaDocument::BuiltInDocumentProperties( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaBuiltinDocumentProperties( mxParent, mxContext, getModel() ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -186,7 +186,7 @@ SwVbaDocument::CustomDocumentProperties( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaCustomDocumentProperties( mxParent, mxContext, getModel() ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -196,7 +196,7 @@ SwVbaDocument::Bookmarks( const uno::Any& rIndex ) uno::Reference<container::XIndexAccess > xBookmarks( xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY_THROW ); uno::Reference< XCollection > xBookmarksVba( new SwVbaBookmarks( this, mxContext, xBookmarks, getModel() ) ); if ( rIndex.getValueTypeClass() == uno::TypeClass_VOID ) - return uno::makeAny( xBookmarksVba ); + return uno::Any( xBookmarksVba ); return xBookmarksVba->Item( rIndex, uno::Any() ); } @@ -210,7 +210,7 @@ SwVbaDocument::Variables( const uno::Any& rIndex ) uno::Reference< XCollection > xVariables( new SwVbaVariables( this, mxContext, xUserDefined ) ); if ( rIndex.getValueTypeClass() == uno::TypeClass_VOID ) - return uno::makeAny( xVariables ); + return uno::Any( xVariables ); return xVariables->Item( rIndex, uno::Any() ); } @@ -221,7 +221,7 @@ SwVbaDocument::Paragraphs( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaParagraphs( mxParent, mxContext, mxTextDocument ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -230,7 +230,7 @@ SwVbaDocument::Styles( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaStyles( mxParent, mxContext, getModel() ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -239,7 +239,7 @@ SwVbaDocument::Fields( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaFields( mxParent, mxContext, getModel() ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -252,7 +252,7 @@ SwVbaDocument::Shapes( const uno::Any& index ) if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -261,7 +261,7 @@ SwVbaDocument::Sections( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaSections( mxParent, mxContext, getModel() ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -270,21 +270,21 @@ SwVbaDocument::TablesOfContents( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaTablesOfContents( this, mxContext, mxTextDocument ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL SwVbaDocument::FormFields( const uno::Any& /*index*/ ) { uno::Reference< XCollection > xCol; - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL SwVbaDocument::PageSetup( ) { uno::Reference< beans::XPropertySet > xPageProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, mxModel, xPageProps ) ) ); + return uno::Any( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, mxModel, xPageProps ) ) ); } OUString @@ -303,7 +303,7 @@ SwVbaDocument::getAttachedTemplate() OUString sTemplateUrl = xDocProps->getTemplateURL(); xTemplate = new SwVbaTemplate( this, mxContext, sTemplateUrl ); - return uno::makeAny( xTemplate ); + return uno::Any( xTemplate ); } void SAL_CALL @@ -337,7 +337,7 @@ SwVbaDocument::Tables( const css::uno::Any& aIndex ) if ( aIndex.hasValue() ) return xColl->Item( aIndex, uno::Any() ); - return uno::makeAny( xColl ); + return uno::Any( xColl ); } void SAL_CALL SwVbaDocument::Activate() @@ -380,7 +380,7 @@ void SAL_CALL SwVbaDocument::setAutoHyphenation( sal_Bool _autohyphenation ) { //TODO uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->setPropertyValue("ParaIsHyphenation", uno::makeAny( _autohyphenation ) ); + xParaProps->setPropertyValue("ParaIsHyphenation", uno::Any( _autohyphenation ) ); } ::sal_Int32 SAL_CALL SwVbaDocument::getHyphenationZone() @@ -407,7 +407,7 @@ void SAL_CALL SwVbaDocument::setConsecutiveHyphensLimit( ::sal_Int32 _consecutiv { sal_Int16 nHyphensLimit = static_cast< sal_Int16 >( _consecutivehyphenslimit ); uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->setPropertyValue("ParaHyphenationMaxHyphens", uno::makeAny( nHyphensLimit ) ); + xParaProps->setPropertyValue("ParaHyphenationMaxHyphens", uno::Any( nHyphensLimit ) ); } uno::Reference< ooo::vba::word::XMailMerge > SAL_CALL SwVbaDocument::getMailMerge() @@ -444,7 +444,7 @@ SwVbaDocument::Revisions( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaRevisions( this, mxContext, getModel(), xRedlines ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -455,7 +455,7 @@ SwVbaDocument::Frames( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaFrames( this, mxContext, xFrames, getModel() ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } void SAL_CALL @@ -591,7 +591,7 @@ SwVbaDocument::getValue( const OUString& aPropertyName ) uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW ); uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext("ooo.vba.ControlProvider", mxContext ), uno::UNO_QUERY_THROW ); uno::Reference< msforms::XControl > xControl( xControlProvider->createControl( xControlShape, getModel() ) ); - return uno::makeAny( xControl ); + return uno::Any( xControl ); } sal_Bool SAL_CALL diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 931890a9848f..10ae56ab2d88 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -97,55 +97,55 @@ public: if ( rPropName == "EditingDuration" ) { sal_Int32 const nSecs = m_xDocProps->getEditingDuration(); - return uno::makeAny( nSecs/60 ); // minutes + return uno::Any( nSecs/60 ); // minutes } else if ("Title" == rPropName) { - return uno::makeAny(m_xDocProps->getTitle()); + return uno::Any(m_xDocProps->getTitle()); } else if ("Subject" == rPropName) { - return uno::makeAny(m_xDocProps->getSubject()); + return uno::Any(m_xDocProps->getSubject()); } else if ("Author" == rPropName) { - return uno::makeAny(m_xDocProps->getAuthor()); + return uno::Any(m_xDocProps->getAuthor()); } else if ("Keywords" == rPropName) { - return uno::makeAny(m_xDocProps->getKeywords()); + return uno::Any(m_xDocProps->getKeywords()); } else if ("Description" == rPropName) { - return uno::makeAny(m_xDocProps->getDescription()); + return uno::Any(m_xDocProps->getDescription()); } else if ("Template" == rPropName) { - return uno::makeAny(m_xDocProps->getTemplateName()); + return uno::Any(m_xDocProps->getTemplateName()); } else if ("ModifiedBy" == rPropName) { - return uno::makeAny(m_xDocProps->getModifiedBy()); + return uno::Any(m_xDocProps->getModifiedBy()); } else if ("Generator" == rPropName) { - return uno::makeAny(m_xDocProps->getGenerator()); + return uno::Any(m_xDocProps->getGenerator()); } else if ("PrintDate" == rPropName) { - return uno::makeAny(m_xDocProps->getPrintDate()); + return uno::Any(m_xDocProps->getPrintDate()); } else if ("CreationDate" == rPropName) { - return uno::makeAny(m_xDocProps->getCreationDate()); + return uno::Any(m_xDocProps->getCreationDate()); } else if ("ModifyDate" == rPropName) { - return uno::makeAny(m_xDocProps->getModificationDate()); + return uno::Any(m_xDocProps->getModificationDate()); } else if ("AutoloadURL" == rPropName) { - return uno::makeAny(m_xDocProps->getAutoloadURL()); + return uno::Any(m_xDocProps->getAutoloadURL()); } else { @@ -660,7 +660,7 @@ public: { if ( !hasMoreElements() ) throw container::NoSuchElementException(); - return uno::makeAny( mIt++->second ); + return uno::Any( mIt++->second ); } }; @@ -700,7 +700,7 @@ protected: DocProps::iterator it = mDocProps.find( ++Index ); if ( it == mDocProps.end() ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny( it->second ); + return uno::Any( it->second ); } virtual uno::Any SAL_CALL getByName( const OUString& aName ) override { @@ -825,7 +825,7 @@ public: throw lang::IndexOutOfBoundsException(); // How to determine type e.g Date? ( com.sun.star.util.DateTime ) DocPropInfo aPropInfo = DocPropInfo::createDocPropInfo( aProps[ Index ].Name, aProps[ Index ].Name, mpPropGetSetHelper ); - return uno::makeAny( uno::Reference< XDocumentProperty >( new SwVbaCustomDocumentProperty( m_xParent, m_xContext, aPropInfo ) ) ); + return uno::Any( uno::Reference< XDocumentProperty >( new SwVbaCustomDocumentProperty( m_xParent, m_xContext, aPropInfo ) ) ); } virtual uno::Any SAL_CALL getByName( const OUString& aName ) override @@ -834,7 +834,7 @@ public: throw container::NoSuchElementException(); DocPropInfo aPropInfo = DocPropInfo::createDocPropInfo( aName, aName, mpPropGetSetHelper ); - return uno::makeAny( uno::Reference< XDocumentProperty >( new SwVbaCustomDocumentProperty( m_xParent, m_xContext, aPropInfo ) ) ); + return uno::Any( uno::Reference< XDocumentProperty >( new SwVbaCustomDocumentProperty( m_xParent, m_xContext, aPropInfo ) ) ); } virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) override diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index f9c35ca890e5..a61ca5a4f070 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -221,7 +221,7 @@ static uno::Any lcl_createField( const uno::Reference< XHelperInterface >& xPare uno::Reference< text::XTextField > xTextField( aSource, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextDocument > xTextDocument( xModel, uno::UNO_QUERY_THROW ); uno::Reference< word::XField > xField( new SwVbaField( xParent, xContext, xTextField ) ); - return uno::makeAny( xField ); + return uno::Any( xField ); } namespace { @@ -373,7 +373,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const OUS } uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue("FileFormat", uno::makeAny( nFileFormat ) ); + xProps->setPropertyValue("FileFormat", uno::Any( nFileFormat ) ); return xTextField; } @@ -473,7 +473,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const if( bCustom ) { uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue("Name", uno::makeAny( aDocProperty ) ); + xProps->setPropertyValue("Name", uno::Any( aDocProperty ) ); } return xTextField; diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx index dcc7be4f4ce1..db34a32f9b64 100644 --- a/sw/source/ui/vba/vbafind.cxx +++ b/sw/source/ui/vba/vbafind.cxx @@ -133,7 +133,7 @@ bool SwVbaFind::SearchReplace() if( xFindOne.is() ) { xFindOne->setString( GetReplaceWith() ); - result = mxSelSupp->select( uno::makeAny( xFindOne ) ); + result = mxSelSupp->select( uno::Any( xFindOne ) ); } break; } @@ -164,7 +164,7 @@ bool SwVbaFind::SearchReplace() { uno::Reference< text::XTextRange > xFindOne = FindOneElement(); if( xFindOne.is() ) - result = mxSelSupp->select( uno::makeAny( xFindOne ) ); + result = mxSelSupp->select( uno::Any( xFindOne ) ); } return result; @@ -182,7 +182,7 @@ void SAL_CALL SwVbaFind::setText( const OUString& _text ) uno::Any SAL_CALL SwVbaFind::getReplacement() { - return uno::makeAny( uno::Reference< word::XReplacement >( new SwVbaReplacement( this, mxContext, mxPropertyReplace ) ) ); + return uno::Any( uno::Reference< word::XReplacement >( new SwVbaReplacement( this, mxContext, mxPropertyReplace ) ) ); } void SAL_CALL SwVbaFind::setReplacement( const uno::Any& /*_replacement */ ) @@ -200,7 +200,7 @@ sal_Bool SAL_CALL SwVbaFind::getForward() void SAL_CALL SwVbaFind::setForward( sal_Bool _forward ) { bool bBackward = !_forward; - mxPropertyReplace->setPropertyValue("SearchBackwards", uno::makeAny( bBackward ) ); + mxPropertyReplace->setPropertyValue("SearchBackwards", uno::Any( bBackward ) ); } ::sal_Int32 SAL_CALL SwVbaFind::getWrap() @@ -234,7 +234,7 @@ sal_Bool SAL_CALL SwVbaFind::getMatchCase() void SAL_CALL SwVbaFind::setMatchCase( sal_Bool _matchcase ) { - mxPropertyReplace->setPropertyValue("SearchCaseSensitive", uno::makeAny( _matchcase ) ); + mxPropertyReplace->setPropertyValue("SearchCaseSensitive", uno::Any( _matchcase ) ); } sal_Bool SAL_CALL SwVbaFind::getMatchWholeWord() @@ -246,7 +246,7 @@ sal_Bool SAL_CALL SwVbaFind::getMatchWholeWord() void SAL_CALL SwVbaFind::setMatchWholeWord( sal_Bool _matchwholeword ) { - mxPropertyReplace->setPropertyValue("SearchWords", uno::makeAny( _matchwholeword ) ); + mxPropertyReplace->setPropertyValue("SearchWords", uno::Any( _matchwholeword ) ); } sal_Bool SAL_CALL SwVbaFind::getMatchWildcards() @@ -258,7 +258,7 @@ sal_Bool SAL_CALL SwVbaFind::getMatchWildcards() void SAL_CALL SwVbaFind::setMatchWildcards( sal_Bool _matchwildcards ) { - mxPropertyReplace->setPropertyValue("SearchRegularExpression", uno::makeAny( _matchwildcards ) ); + mxPropertyReplace->setPropertyValue("SearchRegularExpression", uno::Any( _matchwildcards ) ); } sal_Bool SAL_CALL SwVbaFind::getMatchSoundsLike() @@ -271,7 +271,7 @@ sal_Bool SAL_CALL SwVbaFind::getMatchSoundsLike() void SAL_CALL SwVbaFind::setMatchSoundsLike( sal_Bool _matchsoundslike ) { // seems not accurate - mxPropertyReplace->setPropertyValue("SearchSimilarity", uno::makeAny( _matchsoundslike ) ); + mxPropertyReplace->setPropertyValue("SearchSimilarity", uno::Any( _matchsoundslike ) ); } sal_Bool SAL_CALL SwVbaFind::getMatchAllWordForms() @@ -286,8 +286,8 @@ sal_Bool SAL_CALL SwVbaFind::getMatchAllWordForms() void SAL_CALL SwVbaFind::setMatchAllWordForms( sal_Bool _matchallwordforms ) { // seems not accurate - mxPropertyReplace->setPropertyValue("SearchSimilarity", uno::makeAny( _matchallwordforms ) ); - mxPropertyReplace->setPropertyValue("SearchSimilarityRelax", uno::makeAny( _matchallwordforms ) ); + mxPropertyReplace->setPropertyValue("SearchSimilarity", uno::Any( _matchallwordforms ) ); + mxPropertyReplace->setPropertyValue("SearchSimilarityRelax", uno::Any( _matchallwordforms ) ); } uno::Any SAL_CALL SwVbaFind::getStyle() diff --git a/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx index 79642b3109f4..6a6442544a0e 100644 --- a/sw/source/ui/vba/vbafont.cxx +++ b/sw/source/ui/vba/vbafont.cxx @@ -120,7 +120,7 @@ SwVbaFont::getUnderline() { sal_Int32 nOOVal = 0; mxFont->getPropertyValue( UnderLineMapper::propName() ) >>= nOOVal; - return uno::makeAny( UnderLineMapper::instance().getMSOFromOOO( nOOVal ) ); + return uno::Any( UnderLineMapper::instance().getMSOFromOOO( nOOVal ) ); } void SAL_CALL @@ -131,7 +131,7 @@ SwVbaFont::setUnderline( const uno::Any& _underline ) if ( _underline >>= nMSOVal ) { sal_Int32 nOOVal = UnderLineMapper::instance().getOOOFromMSO( nMSOVal ); - mxFont->setPropertyValue( UnderLineMapper::propName(), uno::makeAny( nOOVal ) ); + mxFont->setPropertyValue( UnderLineMapper::propName(), uno::Any( nOOVal ) ); } } @@ -167,7 +167,7 @@ SwVbaFont::getColorIndex() break; } } - return uno::makeAny( nIndex ); + return uno::Any( nIndex ); } uno::Any SAL_CALL SwVbaFont::getSubscript() diff --git a/sw/source/ui/vba/vbaframe.cxx b/sw/source/ui/vba/vbaframe.cxx index a149ab9c07e1..2ed29fabc653 100644 --- a/sw/source/ui/vba/vbaframe.cxx +++ b/sw/source/ui/vba/vbaframe.cxx @@ -35,7 +35,7 @@ SwVbaFrame::~SwVbaFrame() void SAL_CALL SwVbaFrame::Select() { uno::Reference< view::XSelectionSupplier > xSelectSupp( mxModel->getCurrentController(), uno::UNO_QUERY_THROW ); - xSelectSupp->select( uno::makeAny( mxTextFrame ) ); + xSelectSupp->select( uno::Any( mxTextFrame ) ); } OUString diff --git a/sw/source/ui/vba/vbaframes.cxx b/sw/source/ui/vba/vbaframes.cxx index 676438a19ac1..66042950c944 100644 --- a/sw/source/ui/vba/vbaframes.cxx +++ b/sw/source/ui/vba/vbaframes.cxx @@ -49,7 +49,7 @@ public: if ( !hasMoreElements() ) throw container::NoSuchElementException(); uno::Reference< text::XTextFrame > xTextFrame( mxIndexAccess->getByIndex( nCurrentPos++ ), uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XFrame > ( new SwVbaFrame( mxParent, mxContext, mxModel, xTextFrame ) ) ); + return uno::Any( uno::Reference< word::XFrame > ( new SwVbaFrame( mxParent, mxContext, mxModel, xTextFrame ) ) ); } }; @@ -77,7 +77,7 @@ uno::Any SwVbaFrames::createCollectionObject( const css::uno::Any& aSource ) { uno::Reference< text::XTextFrame > xTextFrame( aSource, uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XFrame > ( new SwVbaFrame( this, mxContext, mxModel, xTextFrame ) ) ); + return uno::Any( uno::Reference< word::XFrame > ( new SwVbaFrame( this, mxContext, mxModel, xTextFrame ) ) ); } OUString diff --git a/sw/source/ui/vba/vbaheaderfooter.cxx b/sw/source/ui/vba/vbaheaderfooter.cxx index 3382d3155e49..7245d1d143ea 100644 --- a/sw/source/ui/vba/vbaheaderfooter.cxx +++ b/sw/source/ui/vba/vbaheaderfooter.cxx @@ -79,7 +79,7 @@ SwVbaHeaderFooter::Shapes( const uno::Any& index ) uno::Reference< XCollection > xCol( new ScVbaShapes( this, mxContext, xIndexAccess, mxModel ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } OUString diff --git a/sw/source/ui/vba/vbaheadersfooters.cxx b/sw/source/ui/vba/vbaheadersfooters.cxx index 03a997d3ff39..dd84f6206f0a 100644 --- a/sw/source/ui/vba/vbaheadersfooters.cxx +++ b/sw/source/ui/vba/vbaheadersfooters.cxx @@ -48,7 +48,7 @@ public: { if( Index < 1 || Index > 3 ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny( uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( mxParent, mxContext, mxModel, mxPageStyleProps, mbHeader, Index ) ) ); + return uno::Any( uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( mxParent, mxContext, mxModel, mxPageStyleProps, mbHeader, Index ) ) ); } virtual uno::Type SAL_CALL getElementType( ) override { @@ -74,7 +74,7 @@ public: virtual uno::Any SAL_CALL nextElement( ) override { if ( nIndex < pHeadersFooters->getCount() ) - return pHeadersFooters->Item( uno::makeAny( ++nIndex ), uno::Any() ); + return pHeadersFooters->Item( uno::Any( ++nIndex ), uno::Any() ); throw container::NoSuchElementException(); } }; @@ -99,7 +99,7 @@ uno::Any SAL_CALL SwVbaHeadersFooters::Item( const uno::Any& Index1, const uno:: { throw lang::IndexOutOfBoundsException(); } - return uno::makeAny( uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( this, mxContext, mxModel, mxPageStyleProps, mbHeader, nIndex ) ) ); + return uno::Any( uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( this, mxContext, mxModel, mxPageStyleProps, mbHeader, nIndex ) ) ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbalistformat.cxx b/sw/source/ui/vba/vbalistformat.cxx index 281f09c048af..615eee10ad6e 100644 --- a/sw/source/ui/vba/vbalistformat.cxx +++ b/sw/source/ui/vba/vbalistformat.cxx @@ -83,16 +83,16 @@ void SAL_CALL SwVbaListFormat::ApplyListTemplate( const css::uno::Reference< wor if( isFirstElement ) { bool isNumberingRestart = !bContinuePreviousList; - xProps->setPropertyValue("ParaIsNumberingRestart", uno::makeAny( isNumberingRestart ) ); + xProps->setPropertyValue("ParaIsNumberingRestart", uno::Any( isNumberingRestart ) ); if( isNumberingRestart ) { - xProps->setPropertyValue("NumberingStartValue", uno::makeAny( sal_Int16(1) ) ); + xProps->setPropertyValue("NumberingStartValue", uno::Any( sal_Int16(1) ) ); } isFirstElement = false; } else { - xProps->setPropertyValue("ParaIsNumberingRestart", uno::makeAny( false ) ); + xProps->setPropertyValue("ParaIsNumberingRestart", uno::Any( false ) ); } rListTemplate.applyListTemplate( xProps ); } diff --git a/sw/source/ui/vba/vbalistgalleries.cxx b/sw/source/ui/vba/vbalistgalleries.cxx index 0a4c8084bed0..5ac8e2f3ab1f 100644 --- a/sw/source/ui/vba/vbalistgalleries.cxx +++ b/sw/source/ui/vba/vbalistgalleries.cxx @@ -39,7 +39,7 @@ public: virtual uno::Any SAL_CALL nextElement( ) override { if ( nIndex <= pListGalleries->getCount() ) - return pListGalleries->Item( uno::makeAny( nIndex++ ), uno::Any() ); + return pListGalleries->Item( uno::Any( nIndex++ ), uno::Any() ); throw container::NoSuchElementException(); } }; @@ -64,7 +64,7 @@ uno::Any SAL_CALL SwVbaListGalleries::Item( const uno::Any& Index1, const uno::A if( nIndex == word::WdListGalleryType::wdBulletGallery || nIndex == word::WdListGalleryType::wdNumberGallery || nIndex == word::WdListGalleryType::wdOutlineNumberGallery ) - return uno::makeAny( uno::Reference< word::XListGallery >( new SwVbaListGallery( this, mxContext, mxTextDocument, nIndex ) ) ); + return uno::Any( uno::Reference< word::XListGallery >( new SwVbaListGallery( this, mxContext, mxTextDocument, nIndex ) ) ); } throw uno::RuntimeException("Index out of bounds" ); } diff --git a/sw/source/ui/vba/vbalistgallery.cxx b/sw/source/ui/vba/vbalistgallery.cxx index d7f41e88160f..d224f09fd15c 100644 --- a/sw/source/ui/vba/vbalistgallery.cxx +++ b/sw/source/ui/vba/vbalistgallery.cxx @@ -36,7 +36,7 @@ SwVbaListGallery::ListTemplates( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaListTemplates( mxParent, mxContext, mxTextDocument, mnType ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } OUString diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx index fa7d69a23d20..89e0fd2feef7 100644 --- a/sw/source/ui/vba/vbalisthelper.cxx +++ b/sw/source/ui/vba/vbalisthelper.cxx @@ -94,12 +94,12 @@ void SwVbaListHelper::Init() uno::Reference< lang::XMultiServiceFactory > xDocMSF( mxTextDocument, uno::UNO_QUERY_THROW ); mxStyleProps.set( xDocMSF->createInstance("com.sun.star.style.NumberingStyle"), uno::UNO_QUERY_THROW ); // insert this style into style family, or the property NumberingRules doesn't exist. - mxStyleFamily->insertByName( msStyleName, uno::makeAny( mxStyleProps ) ); + mxStyleFamily->insertByName( msStyleName, uno::Any( mxStyleProps ) ); mxStyleProps->getPropertyValue("NumberingRules") >>= mxNumberingRules; CreateListTemplate(); - mxStyleProps->setPropertyValue("NumberingRules", uno::makeAny( mxNumberingRules ) ); + mxStyleProps->setPropertyValue("NumberingRules", uno::Any( mxNumberingRules ) ); } } @@ -135,8 +135,8 @@ void SwVbaListHelper::CreateBulletListTemplate() sal_Int32 nLevel = 0; uno::Sequence< beans::PropertyValue > aPropertyValues; mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_CHAR_STYLE_NAME, uno::makeAny( OUString( "Bullet Symbols" ) ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( sal_Int16(style::NumberingType::CHAR_SPECIAL) ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_CHAR_STYLE_NAME, uno::Any( OUString( "Bullet Symbols" ) ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::Any( sal_Int16(style::NumberingType::CHAR_SPECIAL) ) ); OUString aBulletChar; switch( mnTemplateType ) @@ -182,9 +182,9 @@ void SwVbaListHelper::CreateBulletListTemplate() throw css::uno::RuntimeException(); } } - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_BULLET_CHAR, uno::makeAny( aBulletChar ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_BULLET_CHAR, uno::Any( aBulletChar ) ); - mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); + mxNumberingRules->replaceByIndex( nLevel, uno::Any( aPropertyValues ) ); } void SwVbaListHelper::CreateNumberListTemplate() @@ -246,10 +246,10 @@ void SwVbaListHelper::CreateNumberListTemplate() throw css::uno::RuntimeException(); } } - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::makeAny( sSuffix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::Any( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::Any( sSuffix ) ); - mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); + mxNumberingRules->replaceByIndex( nLevel, uno::Any( aPropertyValues ) ); } void SwVbaListHelper::CreateOutlineNumberListTemplate() @@ -369,10 +369,10 @@ void SwVbaListHelper::CreateOutlineNumberForType1() break; } } - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::makeAny( sPrefix ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::makeAny( sSuffix ) ); - mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::Any( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::Any( sPrefix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::Any( sSuffix ) ); + mxNumberingRules->replaceByIndex( nLevel, uno::Any( aPropertyValues ) ); } } @@ -385,14 +385,14 @@ void SwVbaListHelper::CreateOutlineNumberForType2() for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ ) { mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( sal_Int16(style::NumberingType::ARABIC) ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::makeAny( sSuffix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::Any( sal_Int16(style::NumberingType::ARABIC) ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::Any( sSuffix ) ); if( nLevel != 0 ) { nParentNumbering = sal_Int16( nLevel - 1 ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PARENT_NUMBERING, uno::makeAny( nParentNumbering ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PARENT_NUMBERING, uno::Any( nParentNumbering ) ); } - mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); + mxNumberingRules->replaceByIndex( nLevel, uno::Any( aPropertyValues ) ); } } @@ -404,8 +404,8 @@ void SwVbaListHelper::CreateOutlineNumberForType3() for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ ) { mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( sal_Int16(style::NumberingType::CHAR_SPECIAL) ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_CHAR_STYLE_NAME, uno::makeAny( OUString("Bullet Symbols") ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::Any( sal_Int16(style::NumberingType::CHAR_SPECIAL) ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_CHAR_STYLE_NAME, uno::Any( OUString("Bullet Symbols") ) ); switch( nLevel ) { case 0: @@ -438,8 +438,8 @@ void SwVbaListHelper::CreateOutlineNumberForType3() break; } } - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_BULLET_CHAR, uno::makeAny( aBulletChar ) ); - mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_BULLET_CHAR, uno::Any( aBulletChar ) ); + mxNumberingRules->replaceByIndex( nLevel, uno::Any( aPropertyValues ) ); } } @@ -467,7 +467,7 @@ void SwVbaListHelper::CreateOutlineNumberForType4() nNumberingType = style::NumberingType::ARABIC; sPrefix.clear(); sSuffix = "."; - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PARENT_NUMBERING, uno::makeAny( sal_Int16(0) ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PARENT_NUMBERING, uno::Any( sal_Int16(0) ) ); break; } case 2: @@ -520,10 +520,10 @@ void SwVbaListHelper::CreateOutlineNumberForType4() break; } } - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::makeAny( sPrefix ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::makeAny( sSuffix ) ); - mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::Any( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::Any( sPrefix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::Any( sSuffix ) ); + mxNumberingRules->replaceByIndex( nLevel, uno::Any( aPropertyValues ) ); } } @@ -535,13 +535,13 @@ void SwVbaListHelper::CreateOutlineNumberForType5() for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ ) { mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( sal_Int16(style::NumberingType::ARABIC) ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::Any( sal_Int16(style::NumberingType::ARABIC) ) ); if( nLevel != 0 ) { nParentNumbering = sal_Int16( nLevel - 1 ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PARENT_NUMBERING, uno::makeAny( nParentNumbering ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PARENT_NUMBERING, uno::Any( nParentNumbering ) ); } - mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); + mxNumberingRules->replaceByIndex( nLevel, uno::Any( aPropertyValues ) ); } } @@ -621,10 +621,10 @@ void SwVbaListHelper::CreateOutlineNumberForType6() break; } } - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( nNumberingType ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::makeAny( sPrefix ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::makeAny( sSuffix ) ); - mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::Any( nNumberingType ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::Any( sPrefix ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_SUFFIX, uno::Any( sSuffix ) ); + mxNumberingRules->replaceByIndex( nLevel, uno::Any( aPropertyValues ) ); } } @@ -635,9 +635,9 @@ void SwVbaListHelper::CreateOutlineNumberForType7() for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ ) { mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::makeAny( sal_Int16(style::NumberingType::ARABIC) ) ); - setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::makeAny( OUString("Chapter ") ) ); - mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_NUMBERING_TYPE, uno::Any( sal_Int16(style::NumberingType::ARABIC) ) ); + setOrAppendPropertyValue( aPropertyValues, UNO_NAME_PREFIX, uno::Any( OUString("Chapter ") ) ); + mxNumberingRules->replaceByIndex( nLevel, uno::Any( aPropertyValues ) ); } } @@ -653,8 +653,8 @@ void SwVbaListHelper::setPropertyValueWithNameAndLevel( sal_Int32 nLevel, const uno::Sequence< beans::PropertyValue > aPropertyValues; mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; setOrAppendPropertyValue( aPropertyValues, sName, aValue ); - mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); - mxStyleProps->setPropertyValue("NumberingRules", uno::makeAny( mxNumberingRules ) ); + mxNumberingRules->replaceByIndex( nLevel, uno::Any( aPropertyValues ) ); + mxStyleProps->setPropertyValue("NumberingRules", uno::Any( mxNumberingRules ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/vba/vbalistlevel.cxx b/sw/source/ui/vba/vbalistlevel.cxx index 07374bd9fe72..b69cef41ef8e 100644 --- a/sw/source/ui/vba/vbalistlevel.cxx +++ b/sw/source/ui/vba/vbalistlevel.cxx @@ -88,7 +88,7 @@ void SAL_CALL SwVbaListLevel::setAlignment( ::sal_Int32 _alignment ) throw uno::RuntimeException(); } } - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "Adjust", uno::makeAny( nAlignment ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "Adjust", uno::Any( nAlignment ) ); } uno::Reference< ::ooo::vba::word::XFont > SAL_CALL SwVbaListLevel::getFont() @@ -149,7 +149,7 @@ void SAL_CALL SwVbaListLevel::setNumberPosition( float _numberposition ) pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= nIndentAt; sal_Int32 nFirstLineIndent = nNumberPosition - nIndentAt; - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent", uno::makeAny( nFirstLineIndent ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent", uno::Any( nFirstLineIndent ) ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getNumberStyle() @@ -287,7 +287,7 @@ void SAL_CALL SwVbaListLevel::setNumberStyle( ::sal_Int32 _numberstyle ) } } - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "NumberingType", uno::makeAny( nNumberingType ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "NumberingType", uno::Any( nNumberingType ) ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getResetOnHigher() @@ -311,7 +311,7 @@ void SAL_CALL SwVbaListLevel::setResetOnHigher( ::sal_Int32 /*_resetonhigher*/ ) void SAL_CALL SwVbaListLevel::setStartAt( ::sal_Int32 _startat ) { sal_Int16 nStartWith = static_cast<sal_Int16>(_startat); - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "StartWith", uno::makeAny( nStartWith ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "StartWith", uno::Any( nStartWith ) ); } float SAL_CALL SwVbaListLevel::getTabPosition() @@ -325,7 +325,7 @@ float SAL_CALL SwVbaListLevel::getTabPosition() void SAL_CALL SwVbaListLevel::setTabPosition( float _tabposition ) { sal_Int32 nTabPosition = Millimeter::getInHundredthsOfOneMillimeter( _tabposition ); - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "ListtabStopPosition", uno::makeAny( nTabPosition ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "ListtabStopPosition", uno::Any( nTabPosition ) ); } float SAL_CALL SwVbaListLevel::getTextPosition() @@ -348,8 +348,8 @@ void SAL_CALL SwVbaListLevel::setTextPosition( float _textposition ) nIndentAt = Millimeter::getInHundredthsOfOneMillimeter( _textposition ); nFirstLineIndent = nAlignedAt - nIndentAt; - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "IndentAt", uno::makeAny( nIndentAt ) ); - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent", uno::makeAny( nFirstLineIndent ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "IndentAt", uno::Any( nIndentAt ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent", uno::Any( nFirstLineIndent ) ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getTrailingCharacter() @@ -363,7 +363,7 @@ void SAL_CALL SwVbaListLevel::setTextPosition( float _textposition ) void SAL_CALL SwVbaListLevel::setTrailingCharacter( ::sal_Int32 _trailingcharacter ) { sal_Int16 nLabelFollowedBy = static_cast<sal_Int16>(_trailingcharacter); - pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "LabelFollowedBy", uno::makeAny( nLabelFollowedBy ) ); + pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "LabelFollowedBy", uno::Any( nLabelFollowedBy ) ); } OUString diff --git a/sw/source/ui/vba/vbalistlevels.cxx b/sw/source/ui/vba/vbalistlevels.cxx index a83e6fe971dc..1ffd244d066a 100644 --- a/sw/source/ui/vba/vbalistlevels.cxx +++ b/sw/source/ui/vba/vbalistlevels.cxx @@ -39,7 +39,7 @@ public: virtual uno::Any SAL_CALL nextElement( ) override { if ( nIndex <= pListLevels->getCount() ) - return pListLevels->Item( uno::makeAny( nIndex++ ), uno::Any() ); + return pListLevels->Item( uno::Any( nIndex++ ), uno::Any() ); throw container::NoSuchElementException(); } }; @@ -69,7 +69,7 @@ uno::Any SAL_CALL SwVbaListLevels::Item( const uno::Any& Index1, const uno::Any& if( nIndex <=0 || nIndex > getCount() ) throw uno::RuntimeException("Index out of bounds" ); - return uno::makeAny( uno::Reference< word::XListLevel >( new SwVbaListLevel( this, mxContext, pListHelper, nIndex - 1 ) ) ); + return uno::Any( uno::Reference< word::XListLevel >( new SwVbaListLevel( this, mxContext, pListHelper, nIndex - 1 ) ) ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbalisttemplate.cxx b/sw/source/ui/vba/vbalisttemplate.cxx index cffea7728051..b2b69ee67318 100644 --- a/sw/source/ui/vba/vbalisttemplate.cxx +++ b/sw/source/ui/vba/vbalisttemplate.cxx @@ -38,13 +38,13 @@ SwVbaListTemplate::ListLevels( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaListLevels( mxParent, mxContext, pListHelper ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } void SwVbaListTemplate::applyListTemplate( uno::Reference< beans::XPropertySet > const & xProps ) { uno::Reference< container::XIndexReplace > xNumberingRules = pListHelper->getNumberingRules(); - xProps->setPropertyValue("NumberingRules", uno::makeAny( xNumberingRules ) ); + xProps->setPropertyValue("NumberingRules", uno::Any( xNumberingRules ) ); } OUString diff --git a/sw/source/ui/vba/vbalisttemplates.cxx b/sw/source/ui/vba/vbalisttemplates.cxx index ffcef424b938..9902dd4f2390 100644 --- a/sw/source/ui/vba/vbalisttemplates.cxx +++ b/sw/source/ui/vba/vbalisttemplates.cxx @@ -38,7 +38,7 @@ public: virtual uno::Any SAL_CALL nextElement( ) override { if ( nIndex <= pListTemplates->getCount() ) - return pListTemplates->Item( uno::makeAny( nIndex++ ), uno::Any() ); + return pListTemplates->Item( uno::Any( nIndex++ ), uno::Any() ); throw container::NoSuchElementException(); } }; @@ -63,7 +63,7 @@ uno::Any SAL_CALL SwVbaListTemplates::Item( const uno::Any& Index1, const uno::A if( nIndex <=0 || nIndex > getCount() ) throw uno::RuntimeException("Index out of bounds" ); - return uno::makeAny( uno::Reference< word::XListTemplate >( new SwVbaListTemplate( this, mxContext, mxTextDocument, mnGalleryType, nIndex ) ) ); + return uno::Any( uno::Reference< word::XListTemplate >( new SwVbaListTemplate( this, mxContext, mxTextDocument, mnGalleryType, nIndex ) ) ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbaoptions.cxx b/sw/source/ui/vba/vbaoptions.cxx index 7b02b4794322..ef74dcd8a6f0 100644 --- a/sw/source/ui/vba/vbaoptions.cxx +++ b/sw/source/ui/vba/vbaoptions.cxx @@ -86,7 +86,7 @@ SwVbaOptions::DefaultFilePath( sal_Int32 _path ) break; } } - return uno::makeAny( uno::Reference< XPropValue > ( new ScVbaPropValue( this ) ) ); + return uno::Any( uno::Reference< XPropValue > ( new ScVbaPropValue( this ) ) ); } void SwVbaOptions::setValueEvent( const uno::Any& value ) @@ -105,7 +105,7 @@ void SwVbaOptions::setValueEvent( const uno::Any& value ) { sNewPathUrl = sOldPathUrl.subView( 0, nIndex + 1 ) + sNewPathUrl; } - xPathSettings->setPropertyValue( msDefaultFilePath, uno::makeAny( sNewPathUrl ) ); + xPathSettings->setPropertyValue( msDefaultFilePath, uno::Any( sNewPathUrl ) ); } uno::Any SwVbaOptions::getValueEvent() @@ -122,7 +122,7 @@ uno::Any SwVbaOptions::getValueEvent() } OUString sPath; ::osl::File::getSystemPathFromFileURL( sPathUrl, sPath ); - return uno::makeAny( sPath ); + return uno::Any( sPath ); } sal_Int32 SAL_CALL SwVbaOptions::getDefaultBorderLineStyle() diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx index 45e4ca87477b..b22437dbd260 100644 --- a/sw/source/ui/vba/vbapagesetup.cxx +++ b/sw/source/ui/vba/vbapagesetup.cxx @@ -59,7 +59,7 @@ double SAL_CALL SwVbaPageSetup::getHeaderDistance() bool isHeaderOn = false; mxPageProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; if( !isHeaderOn ) - mxPageProps->setPropertyValue("HeaderIsOn", uno::makeAny( true ) ); + mxPageProps->setPropertyValue("HeaderIsOn", uno::Any( true ) ); return VbaPageSetupBase::getHeaderMargin(); } @@ -82,7 +82,7 @@ void SAL_CALL SwVbaPageSetup::setHeaderDistance( double _headerdistance ) mxPageProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; if( !isHeaderOn ) - mxPageProps->setPropertyValue("HeaderIsOn", uno::makeAny( true ) ); + mxPageProps->setPropertyValue("HeaderIsOn", uno::Any( true ) ); mxPageProps->getPropertyValue("TopMargin") >>= currentTopMargin; mxPageProps->getPropertyValue("HeaderBodyDistance") >>= currentSpacing; @@ -92,9 +92,9 @@ void SAL_CALL SwVbaPageSetup::setHeaderDistance( double _headerdistance ) sal_Int32 height = currentHeaderHeight - currentSpacing; sal_Int32 newHeaderHeight = newSpacing + height; - mxPageProps->setPropertyValue("TopMargin", uno::makeAny( newHeaderDistance ) ); - mxPageProps->setPropertyValue("HeaderBodyDistance", uno::makeAny( newSpacing ) ); - mxPageProps->setPropertyValue("HeaderHeight", uno::makeAny( newHeaderHeight ) ); + mxPageProps->setPropertyValue("TopMargin", uno::Any( newHeaderDistance ) ); + mxPageProps->setPropertyValue("HeaderBodyDistance", uno::Any( newSpacing ) ); + mxPageProps->setPropertyValue("HeaderHeight", uno::Any( newHeaderHeight ) ); } double SAL_CALL SwVbaPageSetup::getFooterDistance() @@ -102,7 +102,7 @@ double SAL_CALL SwVbaPageSetup::getFooterDistance() bool isFooterOn = false; mxPageProps->getPropertyValue("FooterIsOn") >>= isFooterOn; if( !isFooterOn ) - mxPageProps->setPropertyValue("FooterIsOn", uno::makeAny( true ) ); + mxPageProps->setPropertyValue("FooterIsOn", uno::Any( true ) ); return VbaPageSetupBase::getFooterMargin(); } @@ -116,7 +116,7 @@ void SAL_CALL SwVbaPageSetup::setFooterDistance( double _footerdistance ) mxPageProps->getPropertyValue("FooterIsOn") >>= isFooterOn; if( !isFooterOn ) - mxPageProps->setPropertyValue("FooterIsOn", uno::makeAny( true ) ); + mxPageProps->setPropertyValue("FooterIsOn", uno::Any( true ) ); mxPageProps->getPropertyValue("BottomMargin") >>= currentBottomMargin; mxPageProps->getPropertyValue("FooterBodyDistance") >>= currentSpacing; @@ -126,9 +126,9 @@ void SAL_CALL SwVbaPageSetup::setFooterDistance( double _footerdistance ) sal_Int32 height = currentFooterHeight - currentSpacing; sal_Int32 newFooterHeight = newSpacing + height; - mxPageProps->setPropertyValue("BottomMargin", uno::makeAny( newFooterDistance ) ); - mxPageProps->setPropertyValue("FooterBodyDistance", uno::makeAny( newSpacing ) ); - mxPageProps->setPropertyValue("FooterHeight", uno::makeAny( newFooterHeight ) ); + mxPageProps->setPropertyValue("BottomMargin", uno::Any( newFooterDistance ) ); + mxPageProps->setPropertyValue("FooterBodyDistance", uno::Any( newSpacing ) ); + mxPageProps->setPropertyValue("FooterHeight", uno::Any( newFooterHeight ) ); } sal_Bool SAL_CALL SwVbaPageSetup::getDifferentFirstPageHeaderFooter() @@ -171,8 +171,8 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status { nTopMargin += nHeaderHeight; nBottomMargin += nFooterHeight; - xStyleProps->setPropertyValue("HeaderIsOn", uno::makeAny( false ) ); - xStyleProps->setPropertyValue("FooterIsOn", uno::makeAny( false ) ); + xStyleProps->setPropertyValue("HeaderIsOn", uno::Any( false ) ); + xStyleProps->setPropertyValue("FooterIsOn", uno::Any( false ) ); } uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( mxModel ), uno::UNO_QUERY_THROW ); if( xPageCursor->getPage() != 1 ) @@ -184,18 +184,18 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue("TextTable"), uno::UNO_QUERY ); if( xTableProps.is() ) { - xTableProps->setPropertyValue("PageDescName", uno::makeAny( newStyle ) ); + xTableProps->setPropertyValue("PageDescName", uno::Any( newStyle ) ); } else { - xCursorProps->setPropertyValue("PageDescName", uno::makeAny( newStyle ) ); + xCursorProps->setPropertyValue("PageDescName", uno::Any( newStyle ) ); } uno::Reference< beans::XPropertySet > xFirstPageProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); - xFirstPageProps->setPropertyValue("TopMargin", uno::makeAny( nTopMargin ) ); - xFirstPageProps->setPropertyValue("BottomMargin", uno::makeAny( nBottomMargin ) ); - xFirstPageProps->setPropertyValue("LeftMargin", uno::makeAny( nLeftMargin ) ); - xFirstPageProps->setPropertyValue("RightMargin", uno::makeAny( nRightMargin ) ); + xFirstPageProps->setPropertyValue("TopMargin", uno::Any( nTopMargin ) ); + xFirstPageProps->setPropertyValue("BottomMargin", uno::Any( nBottomMargin ) ); + xFirstPageProps->setPropertyValue("LeftMargin", uno::Any( nLeftMargin ) ); + xFirstPageProps->setPropertyValue("RightMargin", uno::Any( nRightMargin ) ); } OUString SwVbaPageSetup::getStyleOfFirstPage() const diff --git a/sw/source/ui/vba/vbapalette.cxx b/sw/source/ui/vba/vbapalette.cxx index 9bb41947c779..351f2711c586 100644 --- a/sw/source/ui/vba/vbapalette.cxx +++ b/sw/source/ui/vba/vbapalette.cxx @@ -67,7 +67,7 @@ public: { if ( Index < 0 || Index >= getCount() ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny( sal_Int32( ColorTable[ Index ] ) ); + return uno::Any( sal_Int32( ColorTable[ Index ] ) ); } // Methods XElementAccess diff --git a/sw/source/ui/vba/vbapane.cxx b/sw/source/ui/vba/vbapane.cxx index f7f6fc54021d..7f14b69bfefc 100644 --- a/sw/source/ui/vba/vbapane.cxx +++ b/sw/source/ui/vba/vbapane.cxx @@ -36,7 +36,7 @@ SwVbaPane::~SwVbaPane() uno::Any SAL_CALL SwVbaPane::View() { - return uno::makeAny( uno::Reference< word::XView >( new SwVbaView( this, mxContext, mxModel ) ) ); + return uno::Any( uno::Reference< word::XView >( new SwVbaView( this, mxContext, mxModel ) ) ); } void SAL_CALL diff --git a/sw/source/ui/vba/vbapanes.cxx b/sw/source/ui/vba/vbapanes.cxx index a9e4373803f0..cc507a6f840f 100644 --- a/sw/source/ui/vba/vbapanes.cxx +++ b/sw/source/ui/vba/vbapanes.cxx @@ -45,7 +45,7 @@ public: { if( Index != 0 ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny( uno::Reference< word::XPane >( new SwVbaPane( mxParent, mxContext, mxModel ) ) ); + return uno::Any( uno::Reference< word::XPane >( new SwVbaPane( mxParent, mxContext, mxModel ) ) ); } virtual uno::Type SAL_CALL getElementType( ) override { diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx index 5d0363e924ce..28cd264c1bc4 100644 --- a/sw/source/ui/vba/vbaparagraph.cxx +++ b/sw/source/ui/vba/vbaparagraph.cxx @@ -119,7 +119,7 @@ public: if( xServiceInfo->supportsService("com.sun.star.text.Paragraph") ) { if( Index == nCount ) - return uno::makeAny( xServiceInfo ); + return uno::Any( xServiceInfo ); nCount++; } } @@ -156,7 +156,7 @@ uno::Any SwVbaParagraphs::createCollectionObject( const css::uno::Any& aSource ) { uno::Reference< text::XTextRange > xTextRange( aSource, uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XParagraph >( new SwVbaParagraph( this, mxContext, mxTextDocument, xTextRange ) ) ); + return uno::Any( uno::Reference< word::XParagraph >( new SwVbaParagraph( this, mxContext, mxTextDocument, xTextRange ) ) ); } OUString diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index 3286e331e49f..7838a6f76bc1 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -55,7 +55,7 @@ sal_Int32 SAL_CALL SwVbaParagraphFormat::getAlignment() void SAL_CALL SwVbaParagraphFormat::setAlignment( sal_Int32 _alignment ) { style::ParagraphAdjust aParaAdjust = getOOoAlignment( _alignment ); - mxParaProps->setPropertyValue("ParaAdjust", uno::makeAny( aParaAdjust ) ); + mxParaProps->setPropertyValue("ParaAdjust", uno::Any( aParaAdjust ) ); } float SAL_CALL SwVbaParagraphFormat::getFirstLineIndent() @@ -68,14 +68,14 @@ float SAL_CALL SwVbaParagraphFormat::getFirstLineIndent() void SAL_CALL SwVbaParagraphFormat::setFirstLineIndent( float _firstlineindent ) { sal_Int32 indent = Millimeter::getInHundredthsOfOneMillimeter( _firstlineindent ); - mxParaProps->setPropertyValue("ParaFirstLineIndent", uno::makeAny( indent ) ); + mxParaProps->setPropertyValue("ParaFirstLineIndent", uno::Any( indent ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getKeepTogether() { bool bKeep = false; mxParaProps->getPropertyValue("ParaKeepTogether") >>= bKeep; - return uno::makeAny ( bKeep ); + return uno::Any ( bKeep ); } void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogether ) @@ -83,7 +83,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogeth bool bKeep = false; if( _keeptogether >>= bKeep ) { - mxParaProps->setPropertyValue("ParaKeepTogether", uno::makeAny( bKeep ) ); + mxParaProps->setPropertyValue("ParaKeepTogether", uno::Any( bKeep ) ); } else { @@ -95,7 +95,7 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getKeepWithNext() { bool bKeep = false; mxParaProps->getPropertyValue("ParaSplit") >>= bKeep; - return uno::makeAny ( bKeep ); + return uno::Any ( bKeep ); } void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithnext ) @@ -103,7 +103,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithne bool bKeep = false; if( _keepwithnext >>= bKeep ) { - mxParaProps->setPropertyValue("ParaSplit", uno::makeAny( bKeep ) ); + mxParaProps->setPropertyValue("ParaSplit", uno::Any( bKeep ) ); } else { @@ -115,7 +115,7 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getHyphenation() { bool bHypn = false; mxParaProps->getPropertyValue("ParaIsHyphenation") >>= bHypn; - return uno::makeAny ( bHypn ); + return uno::Any ( bHypn ); } void SAL_CALL SwVbaParagraphFormat::setHyphenation( const uno::Any& _hyphenation ) @@ -123,7 +123,7 @@ void SAL_CALL SwVbaParagraphFormat::setHyphenation( const uno::Any& _hyphenation bool bHypn = false; if( _hyphenation >>= bHypn ) { - mxParaProps->setPropertyValue("ParaIsHyphenation", uno::makeAny( bHypn ) ); + mxParaProps->setPropertyValue("ParaIsHyphenation", uno::Any( bHypn ) ); } else { @@ -143,7 +143,7 @@ void SAL_CALL SwVbaParagraphFormat::setLineSpacing( float _linespacing ) style::LineSpacing aLineSpacing; mxParaProps->getPropertyValue("ParaLineSpacing") >>= aLineSpacing; aLineSpacing = getOOoLineSpacing( _linespacing, aLineSpacing.Mode ); - mxParaProps->setPropertyValue("ParaLineSpacing", uno::makeAny( aLineSpacing ) ); + mxParaProps->setPropertyValue("ParaLineSpacing", uno::Any( aLineSpacing ) ); } sal_Int32 SAL_CALL SwVbaParagraphFormat::getLineSpacingRule() @@ -156,14 +156,14 @@ sal_Int32 SAL_CALL SwVbaParagraphFormat::getLineSpacingRule() void SAL_CALL SwVbaParagraphFormat::setLineSpacingRule( sal_Int32 _linespacingrule ) { style::LineSpacing aLineSpacing = getOOoLineSpacingFromRule( _linespacingrule ); - mxParaProps->setPropertyValue("ParaLineSpacing", uno::makeAny( aLineSpacing ) ); + mxParaProps->setPropertyValue("ParaLineSpacing", uno::Any( aLineSpacing ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getNoLineNumber() { bool noLineNum = false; mxParaProps->getPropertyValue("ParaLineNumberCount") >>= noLineNum; - return uno::makeAny ( noLineNum ); + return uno::Any ( noLineNum ); } void SAL_CALL SwVbaParagraphFormat::setNoLineNumber( const uno::Any& _nolinenumber ) @@ -171,7 +171,7 @@ void SAL_CALL SwVbaParagraphFormat::setNoLineNumber( const uno::Any& _nolinenumb bool noLineNum = false; if( _nolinenumber >>= noLineNum ) { - mxParaProps->setPropertyValue("ParaLineNumberCount", uno::makeAny( noLineNum ) ); + mxParaProps->setPropertyValue("ParaLineNumberCount", uno::Any( noLineNum ) ); } else { @@ -206,7 +206,7 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getPageBreakBefore() style::BreakType aBreakType; mxParaProps->getPropertyValue("BreakType") >>= aBreakType; bool bBreakBefore = ( aBreakType == style::BreakType_PAGE_BEFORE || aBreakType == style::BreakType_PAGE_BOTH ); - return uno::makeAny( bBreakBefore ); + return uno::Any( bBreakBefore ); } void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbefore ) @@ -230,7 +230,7 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe else if ( aBreakType == style::BreakType_PAGE_BEFORE ) aBreakType = style::BreakType_PAGE_AFTER; } - mxParaProps->setPropertyValue("BreakType", uno::makeAny( aBreakType ) ); + mxParaProps->setPropertyValue("BreakType", uno::Any( aBreakType ) ); } else { @@ -248,7 +248,7 @@ float SAL_CALL SwVbaParagraphFormat::getSpaceBefore() void SAL_CALL SwVbaParagraphFormat::setSpaceBefore( float _space ) { sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _space ); - mxParaProps->setPropertyValue("ParaTopMargin", uno::makeAny( nSpace ) ); + mxParaProps->setPropertyValue("ParaTopMargin", uno::Any( nSpace ) ); } float SAL_CALL SwVbaParagraphFormat::getSpaceAfter() @@ -261,7 +261,7 @@ float SAL_CALL SwVbaParagraphFormat::getSpaceAfter() void SAL_CALL SwVbaParagraphFormat::setSpaceAfter( float _space ) { sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _space ); - mxParaProps->setPropertyValue("ParaBottomMargin", uno::makeAny( nSpace ) ); + mxParaProps->setPropertyValue("ParaBottomMargin", uno::Any( nSpace ) ); } float SAL_CALL SwVbaParagraphFormat::getLeftIndent() @@ -274,7 +274,7 @@ float SAL_CALL SwVbaParagraphFormat::getLeftIndent() void SAL_CALL SwVbaParagraphFormat::setLeftIndent( float _leftindent ) { sal_Int32 nIndent = Millimeter::getInHundredthsOfOneMillimeter( _leftindent ); - mxParaProps->setPropertyValue("ParaLeftMargin", uno::makeAny( nIndent ) ); + mxParaProps->setPropertyValue("ParaLeftMargin", uno::Any( nIndent ) ); } float SAL_CALL SwVbaParagraphFormat::getRightIndent() @@ -287,12 +287,12 @@ float SAL_CALL SwVbaParagraphFormat::getRightIndent() void SAL_CALL SwVbaParagraphFormat::setRightIndent( float _rightindent ) { sal_Int32 nIndent = Millimeter::getInHundredthsOfOneMillimeter( _rightindent ); - mxParaProps->setPropertyValue("ParaRightMargin", uno::makeAny( nIndent ) ); + mxParaProps->setPropertyValue("ParaRightMargin", uno::Any( nIndent ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() { - return uno::makeAny( uno::Reference< word::XTabStops >( new SwVbaTabStops( this, mxContext, mxParaProps ) ) ); + return uno::Any( uno::Reference< word::XTabStops >( new SwVbaTabStops( this, mxContext, mxParaProps ) ) ); } void SAL_CALL SwVbaParagraphFormat::setTabStops( const uno::Any& /*_tabstops*/ ) @@ -309,7 +309,7 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getWidowControl() // if the amount of single lines on one page > 1 and the same of start and end of the paragraph, // true is returned. bool bWidow = ( nWidow > 1 && nOrphan == nWidow ); - return uno::makeAny( bWidow ); + return uno::Any( bWidow ); } void SAL_CALL SwVbaParagraphFormat::setWidowControl( const uno::Any& _widowcontrol ) @@ -320,8 +320,8 @@ void SAL_CALL SwVbaParagraphFormat::setWidowControl( const uno::Any& _widowcontr if( _widowcontrol >>= bWidow ) { sal_Int8 nControl = bWidow? 2:1; - mxParaProps->setPropertyValue("ParaWidows", uno::makeAny( nControl ) ); - mxParaProps->setPropertyValue("ParaOrphans", uno::makeAny( nControl ) ); + mxParaProps->setPropertyValue("ParaWidows", uno::Any( nControl ) ); + mxParaProps->setPropertyValue("ParaOrphans", uno::Any( nControl ) ); } else { diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx index 88f54a1d43c0..eaa7cac51c3b 100644 --- a/sw/source/ui/vba/vbarange.cxx +++ b/sw/source/ui/vba/vbarange.cxx @@ -205,7 +205,7 @@ void SAL_CALL SwVbaRange::InsertBreak(const uno::Any& _breakType) } uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW ); - xProp->setPropertyValue("BreakType", uno::makeAny( eBreakType ) ); + xProp->setPropertyValue("BreakType", uno::Any( eBreakType ) ); } } @@ -280,7 +280,7 @@ SwVbaRange::getStyle() uno::Reference< container::XNameAccess > xStylesAccess( xStyleSupplier->getStyleFamilies()->getByName( aStyleType ), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xStyleProps( xStylesAccess->getByName( aStyleName ), uno::UNO_QUERY_THROW ); uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xModel, xStyleProps ) ) ); + return uno::Any( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xModel, xStyleProps ) ) ); } void SAL_CALL @@ -326,7 +326,7 @@ SwVbaRange::PageSetup( ) uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_SET_THROW ); uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName("PageStyles"), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xPageProps( xPageStyles->getByName( aPageStyleName ), uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, xModel, xPageProps ) ) ); + return uno::Any( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, xModel, xPageProps ) ) ); } ::sal_Int32 SAL_CALL SwVbaRange::getStart() @@ -380,7 +380,7 @@ SwVbaRange::Revisions( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaRevisions( mxParent, mxContext, xModel, xTextRange ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -391,7 +391,7 @@ SwVbaRange::Sections( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaSections( mxParent, mxContext, xModel, xTextRange ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -402,7 +402,7 @@ SwVbaRange::Fields( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaFields( mxParent, mxContext, xModel ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } OUString diff --git a/sw/source/ui/vba/vbarevisions.cxx b/sw/source/ui/vba/vbarevisions.cxx index 03ab7c886b1d..b394fa1170c6 100644 --- a/sw/source/ui/vba/vbarevisions.cxx +++ b/sw/source/ui/vba/vbarevisions.cxx @@ -46,7 +46,7 @@ public: if ( !hasMoreElements() ) throw container::NoSuchElementException(); uno::Reference< beans::XPropertySet > xRevision( *mIt++ ); - return uno::makeAny( xRevision ) ; + return uno::Any( xRevision ) ; } }; @@ -68,7 +68,7 @@ RevisionCollectionHelper( const uno::Reference< frame::XModel >& xModel, const u if ( Index < 0 || Index >= getCount() ) throw lang::IndexOutOfBoundsException(); - return uno::makeAny( mRevisionMap[ Index ] ); + return uno::Any( mRevisionMap[ Index ] ); } // XEnumerationAccess @@ -109,7 +109,7 @@ public: virtual uno::Any SAL_CALL nextElement( ) override { uno::Reference< beans::XPropertySet > xRevision( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XRevision > ( new SwVbaRevision( m_xParent, m_xContext, m_xModel, xRevision ) ) ); + return uno::Any( uno::Reference< word::XRevision > ( new SwVbaRevision( m_xParent, m_xContext, m_xModel, xRevision ) ) ); } }; @@ -141,7 +141,7 @@ uno::Any SwVbaRevisions::createCollectionObject( const css::uno::Any& aSource ) { uno::Reference< beans::XPropertySet > xRevision( aSource, uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XRevision > ( new SwVbaRevision( this, mxContext, mxModel, xRevision ) ) ); + return uno::Any( uno::Reference< word::XRevision > ( new SwVbaRevision( this, mxContext, mxModel, xRevision ) ) ); } void SAL_CALL SwVbaRevisions::AcceptAll( ) diff --git a/sw/source/ui/vba/vbarow.cxx b/sw/source/ui/vba/vbarow.cxx index 4ce00b71616d..6b9aa84b8d29 100644 --- a/sw/source/ui/vba/vbarow.cxx +++ b/sw/source/ui/vba/vbarow.cxx @@ -43,11 +43,11 @@ SwVbaRow::~SwVbaRow() uno::Any SAL_CALL SwVbaRow::getHeight() { if( getHeightRule() == word::WdRowHeightRule::wdRowHeightAuto ) - return uno::makeAny( sal_Int32( word::WdConstants::wdUndefined ) ); + return uno::Any( sal_Int32( word::WdConstants::wdUndefined ) ); sal_Int32 nHeight = 0; mxRowProps->getPropertyValue("Height") >>= nHeight; - return uno::makeAny( static_cast<float>(Millimeter::getInPoints( nHeight )) ); + return uno::Any( static_cast<float>(Millimeter::getInPoints( nHeight )) ); } void SAL_CALL SwVbaRow::setHeight( const uno::Any& _height ) @@ -56,7 +56,7 @@ void SAL_CALL SwVbaRow::setHeight( const uno::Any& _height ) _height >>= height; sal_Int32 nHeight = Millimeter::getInHundredthsOfOneMillimeter( height ); - mxRowProps->setPropertyValue("Height", uno::makeAny( nHeight ) ); + mxRowProps->setPropertyValue("Height", uno::Any( nHeight ) ); } ::sal_Int32 SAL_CALL SwVbaRow::getHeightRule() @@ -69,7 +69,7 @@ void SAL_CALL SwVbaRow::setHeight( const uno::Any& _height ) void SAL_CALL SwVbaRow::setHeightRule( ::sal_Int32 _heightrule ) { bool isAutoHeight = ( _heightrule == word::WdRowHeightRule::wdRowHeightAuto ); - mxRowProps->setPropertyValue("IsAutoHeight", uno::makeAny( isAutoHeight ) ); + mxRowProps->setPropertyValue("IsAutoHeight", uno::Any( isAutoHeight ) ); } void SAL_CALL @@ -92,13 +92,13 @@ void SwVbaRow::SelectRow( const uno::Reference< frame::XModel >& xModel, const u uno::Reference< table::XCellRange > xSelRange = xCellRange->getCellRangeByName( sRangeName ); uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW ); - xSelection->select( uno::makeAny( xSelRange ) ); + xSelection->select( uno::Any( xSelRange ) ); } void SAL_CALL SwVbaRow::SetHeight( float height, sal_Int32 heightrule ) { setHeightRule( heightrule ); - setHeight( uno::makeAny( height ) ); + setHeight( uno::Any( height ) ); } OUString diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx index 08afc401ef7c..5ebca8eef3b4 100644 --- a/sw/source/ui/vba/vbarows.cxx +++ b/sw/source/ui/vba/vbarows.cxx @@ -55,7 +55,7 @@ public: { if( nIndex < mxIndexAccess->getCount() ) { - return uno::makeAny( uno::Reference< word::XRow > ( new SwVbaRow( mxParent, mxContext, mxTextTable, nIndex++ ) ) ); + return uno::Any( uno::Reference< word::XRow > ( new SwVbaRow( mxParent, mxContext, mxTextTable, nIndex++ ) ) ); } throw container::NoSuchElementException(); } @@ -127,7 +127,7 @@ void SAL_CALL SwVbaRows::setAlignment( ::sal_Int32 _alignment ) } } uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); - xTableProps->setPropertyValue("HoriOrient", uno::makeAny( nAlignment ) ); + xTableProps->setPropertyValue("HoriOrient", uno::Any( nAlignment ) ); } uno::Any SAL_CALL SwVbaRows::getAllowBreakAcrossPages() @@ -145,10 +145,10 @@ uno::Any SAL_CALL SwVbaRows::getAllowBreakAcrossPages() } if( bSplit != bAllowBreak ) { - return uno::makeAny( sal_Int32(word::WdConstants::wdUndefined) ); + return uno::Any( sal_Int32(word::WdConstants::wdUndefined) ); } } - return uno::makeAny( bAllowBreak ); + return uno::Any( bAllowBreak ); } void SAL_CALL SwVbaRows::setAllowBreakAcrossPages( const uno::Any& _allowbreakacrosspages ) @@ -159,7 +159,7 @@ void SAL_CALL SwVbaRows::setAllowBreakAcrossPages( const uno::Any& _allowbreakac for( sal_Int32 index = mnStartRowIndex; index <= mnEndRowIndex; ++index ) { uno::Reference< beans::XPropertySet > xRowProps( xRowsAccess->getByIndex( index ), uno::UNO_QUERY_THROW ); - xRowProps->setPropertyValue("IsSplitAllowed", uno::makeAny( bAllowBreak ) ); + xRowProps->setPropertyValue("IsSplitAllowed", uno::Any( bAllowBreak ) ); } } @@ -187,8 +187,8 @@ void SAL_CALL SwVbaRows::setSpaceBetweenColumns( float _spacebetweencolumns ) for( sal_Int32 column = 0; column < nColumns; ++column ) { uno::Reference< beans::XPropertySet > xCellProps( xCellRange->getCellByPosition( column, row ), uno::UNO_QUERY_THROW ); - xCellProps->setPropertyValue("LeftBorderDistance", uno::makeAny( nSpace ) ); - xCellProps->setPropertyValue("RightBorderDistance", uno::makeAny( nSpace ) ); + xCellProps->setPropertyValue("LeftBorderDistance", uno::Any( nSpace ) ); + xCellProps->setPropertyValue("RightBorderDistance", uno::Any( nSpace ) ); } } } @@ -237,13 +237,13 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) sal_Int32 nMargin = 0; xTableProps->getPropertyValue("LeftMargin") >>= nMargin; nMargin += indent; - xTableProps->setPropertyValue("LeftMargin", uno::makeAny( nMargin ) ); + xTableProps->setPropertyValue("LeftMargin", uno::Any( nMargin ) ); } void SwVbaRows::setIndentWithAdjustFirstColumn( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) { uno::Reference< XCollection > xCol( xColumns, uno::UNO_QUERY_THROW ); - uno::Reference< word::XColumn > xColumn( xCol->Item( uno::makeAny( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< word::XColumn > xColumn( xCol->Item( uno::Any( sal_Int32(1) ), uno::Any() ), uno::UNO_QUERY_THROW ); sal_Int32 nWidth = xColumn->getWidth(); nWidth -= indent; xColumn->setWidth( nWidth ); @@ -274,7 +274,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) sal_Int32 nColCount = xCol->getCount(); for( sal_Int32 i = 0; i < nColCount; i++ ) { - uno::Reference< word::XColumn > xColumn( xCol->Item( uno::makeAny( i ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< word::XColumn > xColumn( xCol->Item( uno::Any( i ), uno::Any() ), uno::UNO_QUERY_THROW ); sal_Int32 nColWidth = xColumn->getWidth(); sal_Int32 nNewColWidth = static_cast<sal_Int32>( propFactor * nColWidth ); xColumn->setWidth( nNewColWidth ); @@ -282,7 +282,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) // set the width and position of the table setIndentWithAdjustNone( indent ); - xTableProps->setPropertyValue("Width", uno::makeAny( nNewWidth ) ); + xTableProps->setPropertyValue("Width", uno::Any( nNewWidth ) ); } void SwVbaRows::setIndentWithAdjustSameWidth( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) @@ -299,13 +299,13 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) sal_Int32 nNewColWidth = static_cast<sal_Int32>( double( nNewWidth )/nColCount ); for( sal_Int32 i = 0; i < nColCount; i++ ) { - uno::Reference< word::XColumn > xColumn( xCol->Item( uno::makeAny( i ), uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< word::XColumn > xColumn( xCol->Item( uno::Any( i ), uno::Any() ), uno::UNO_QUERY_THROW ); xColumn->setWidth( nNewColWidth ); } // set the width and position of the table setIndentWithAdjustNone( indent ); - xTableProps->setPropertyValue("Width", uno::makeAny( nNewWidth ) ); + xTableProps->setPropertyValue("Width", uno::Any( nNewWidth ) ); } void SAL_CALL SwVbaRows::Select( ) @@ -327,7 +327,7 @@ uno::Any SAL_CALL SwVbaRows::Item( const uno::Any& Index1, const uno::Any& /*not { throw lang::IndexOutOfBoundsException("Index out of bounds" ); } - return uno::makeAny( uno::Reference< word::XRow >( new SwVbaRow( this, mxContext, mxTextTable, nIndex - 1 ) ) ); + return uno::Any( uno::Reference< word::XRow >( new SwVbaRow( this, mxContext, mxTextTable, nIndex - 1 ) ) ); } throw uno::RuntimeException("Index out of bounds" ); } diff --git a/sw/source/ui/vba/vbasection.cxx b/sw/source/ui/vba/vbasection.cxx index 53be97c3b6b0..4ef15bf94be0 100644 --- a/sw/source/ui/vba/vbasection.cxx +++ b/sw/source/ui/vba/vbasection.cxx @@ -47,7 +47,7 @@ uno::Any SAL_CALL SwVbaSection::Headers( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaHeadersFooters( this, mxContext, mxModel, mxPageProps, true ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL SwVbaSection::Footers( const uno::Any& index ) @@ -55,13 +55,13 @@ uno::Any SAL_CALL SwVbaSection::Footers( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaHeadersFooters( this, mxContext, mxModel, mxPageProps, false ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL SwVbaSection::PageSetup( ) { - return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, mxModel, mxPageProps ) ) ); + return uno::Any( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, mxModel, mxPageProps ) ) ); } OUString diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index 0665ebfce809..9d940416c756 100644 --- a/sw/source/ui/vba/vbasections.cxx +++ b/sw/source/ui/vba/vbasections.cxx @@ -46,7 +46,7 @@ public: virtual uno::Any SAL_CALL nextElement( ) override { if ( hasMoreElements() ) - return uno::makeAny( *mIt++ ); + return uno::Any( *mIt++ ); throw container::NoSuchElementException(); } }; @@ -102,7 +102,7 @@ public: throw css::lang::IndexOutOfBoundsException(); uno::Reference< beans::XPropertySet > xPageProps( mxSections[ Index ], uno::UNO_SET_THROW ); - return uno::makeAny( uno::Reference< word::XSection >( new SwVbaSection( mxParent, mxContext, mxModel, xPageProps ) ) ); + return uno::Any( uno::Reference< word::XSection >( new SwVbaSection( mxParent, mxContext, mxModel, xPageProps ) ) ); } virtual uno::Type SAL_CALL getElementType( ) override { @@ -129,7 +129,7 @@ public: virtual uno::Any SAL_CALL nextElement( ) override { uno::Reference< beans::XPropertySet > xPageProps( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XSection > ( new SwVbaSection( m_xParent, m_xContext, mxModel, xPageProps ) ) ); + return uno::Any( uno::Reference< word::XSection > ( new SwVbaSection( m_xParent, m_xContext, mxModel, xPageProps ) ) ); } }; diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index 309227c30354..dde7d4e21fb5 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -406,7 +406,7 @@ SwVbaSelection::MoveRight(const uno::Any& _unit, const uno::Any& _count, const u if( nCount < 0 ) { - MoveLeft( _unit, uno::makeAny( -nCount ), _extend ); + MoveLeft( _unit, uno::Any( -nCount ), _extend ); return; } @@ -425,7 +425,7 @@ SwVbaSelection::MoveLeft(const uno::Any& _unit, const uno::Any& _count, const un if( nCount < 0 ) { - MoveRight( _unit, uno::makeAny( -nCount ), _extend ); + MoveRight( _unit, uno::Any( -nCount ), _extend ); return; } @@ -445,7 +445,7 @@ SwVbaSelection::MoveDown(const uno::Any& _unit, const uno::Any& _count, const un if( nCount < 0 ) { - MoveUp( _unit, uno::makeAny( -nCount ), _extend ); + MoveUp( _unit, uno::Any( -nCount ), _extend ); return; } @@ -465,7 +465,7 @@ SwVbaSelection::MoveUp(const uno::Any& _unit, const uno::Any& _count, const uno: if( nCount < 0 ) { - MoveDown( _unit, uno::makeAny( -nCount ), _extend ); + MoveDown( _unit, uno::Any( -nCount ), _extend ); return; } @@ -815,7 +815,7 @@ SwVbaSelection::Fields( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaFields( mxParent, mxContext, mxModel ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Reference< word::XHeaderFooter > SAL_CALL @@ -851,7 +851,7 @@ SwVbaSelection::ShapeRange( ) uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< drawing::XDrawPage > xDrawPage = xDrawPageSupplier->getDrawPage(); uno::Reference< container::XIndexAccess > xShapesAccess( xShapes, uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< msforms::XShapeRange >( new ScVbaShapeRange( this, mxContext, xShapesAccess, xDrawPage, mxModel ) ) ); + return uno::Any( uno::Reference< msforms::XShapeRange >( new ScVbaShapeRange( this, mxContext, xShapesAccess, xDrawPage, mxModel ) ) ); } ::sal_Int32 SAL_CALL SwVbaSelection::getStart() @@ -908,7 +908,7 @@ uno::Any SAL_CALL SwVbaSelection::Rows( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaRows( this, mxContext, xTextTable, xTextTable->getRows(), nStartRow, nEndRow ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL SwVbaSelection::Columns( const uno::Any& index ) @@ -934,7 +934,7 @@ uno::Any SAL_CALL SwVbaSelection::Columns( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaColumns( this, mxContext, xTextTable, xTextTable->getColumns(), nStartColumn, nEndColumn ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Reference< text::XTextTable > SwVbaSelection::GetXTextTable() const @@ -1019,7 +1019,7 @@ uno::Any SAL_CALL SwVbaSelection::Cells( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaCells( this, mxContext, xTextTable, nLeft, nTop, nRight, nBottom ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } void SAL_CALL SwVbaSelection::Copy( ) diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx index 5565575f342a..830e749b681e 100644 --- a/sw/source/ui/vba/vbastyle.cxx +++ b/sw/source/ui/vba/vbastyle.cxx @@ -57,7 +57,7 @@ LanguageType SwVbaStyle::getLanguageID( const uno::Reference< beans::XPropertySe void SwVbaStyle::setLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps, LanguageType _languageid ) { lang::Locale aLocale = LanguageTag( _languageid ).getLocale(); - xTCProps->setPropertyValue("CharLocale", uno::makeAny( aLocale ) ) ; + xTCProps->setPropertyValue("CharLocale", uno::Any( aLocale ) ) ; } ::sal_Int32 SAL_CALL SwVbaStyle::getLanguageID() @@ -105,7 +105,7 @@ void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xParaPro if( !sStyle.isEmpty() ) { - xParaProps->setPropertyValue("ParaStyleName", uno::makeAny( sStyle ) ); + xParaProps->setPropertyValue("ParaStyleName", uno::Any( sStyle ) ); return; } @@ -121,7 +121,7 @@ OUString SAL_CALL SwVbaStyle::getNameLocal() void SAL_CALL SwVbaStyle::setNameLocal( const OUString& _namelocal ) { - mxStyleProps->setPropertyValue("DisplayName", uno::makeAny( _namelocal ) ); + mxStyleProps->setPropertyValue("DisplayName", uno::Any( _namelocal ) ); } uno::Reference< word::XParagraphFormat > SAL_CALL SwVbaStyle::getParagraphFormat() @@ -144,7 +144,7 @@ sal_Bool SAL_CALL SwVbaStyle::getAutomaticallyUpdate() void SAL_CALL SwVbaStyle::setAutomaticallyUpdate( sal_Bool _automaticallyupdate ) { - mxStyleProps->setPropertyValue("IsAutoUpdate", uno::makeAny( _automaticallyupdate ) ); + mxStyleProps->setPropertyValue("IsAutoUpdate", uno::Any( _automaticallyupdate ) ); } uno::Any SAL_CALL SwVbaStyle::getBaseStyle() @@ -158,7 +158,7 @@ uno::Any SAL_CALL SwVbaStyle::getBaseStyle() } uno::Reference< XCollection > xCol( new SwVbaStyles( this, mxContext, mxModel ) ); - return xCol->Item( uno::makeAny( sBaseStyle ), uno::Any() ); + return xCol->Item( uno::Any( sBaseStyle ), uno::Any() ); } void SAL_CALL SwVbaStyle::setBaseStyle( const uno::Any& _basestyle ) @@ -171,7 +171,7 @@ void SAL_CALL SwVbaStyle::setBaseStyle( const uno::Any& _basestyle ) } OUString sBaseStyle = xStyle->getName(); - mxStyleProps->setPropertyValue("ParentStyle", uno::makeAny( sBaseStyle ) ); + mxStyleProps->setPropertyValue("ParentStyle", uno::Any( sBaseStyle ) ); } uno::Any SAL_CALL SwVbaStyle::getNextParagraphStyle() @@ -185,7 +185,7 @@ uno::Any SAL_CALL SwVbaStyle::getNextParagraphStyle() } uno::Reference< XCollection > xCol( new SwVbaStyles( this, mxContext, mxModel ) ); - return xCol->Item( uno::makeAny( sFollowStyle ), uno::Any() ); + return xCol->Item( uno::Any( sFollowStyle ), uno::Any() ); } void SAL_CALL SwVbaStyle::setNextParagraphStyle( const uno::Any& _nextparagraphstyle ) @@ -198,7 +198,7 @@ void SAL_CALL SwVbaStyle::setNextParagraphStyle( const uno::Any& _nextparagraphs } OUString sFollowStyle = xStyle->getName(); - mxStyleProps->setPropertyValue("FollowStyle", uno::makeAny( sFollowStyle ) ); + mxStyleProps->setPropertyValue("FollowStyle", uno::Any( sFollowStyle ) ); } ::sal_Int32 SAL_CALL SwVbaStyle::getListLevelNumber() diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx index f14758eb8810..12217e15324c 100644 --- a/sw/source/ui/vba/vbastyles.cxx +++ b/sw/source/ui/vba/vbastyles.cxx @@ -269,7 +269,7 @@ public: virtual uno::Any SAL_CALL nextElement( ) override { if ( nIndex <= pStyles->getCount() ) - return pStyles->Item( uno::makeAny( nIndex++ ), uno::Any() ); + return pStyles->Item( uno::Any( nIndex++ ), uno::Any() ); throw container::NoSuchElementException(); } }; @@ -286,7 +286,7 @@ uno::Any SwVbaStyles::createCollectionObject(const uno::Any& aObject) { uno::Reference< beans::XPropertySet > xStyleProp( aObject, uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, mxModel, xStyleProp ) ) ); + return uno::Any( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, mxModel, xStyleProp ) ) ); } uno::Type SAL_CALL @@ -344,9 +344,9 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) // set the property "NumberingStyleName" if it is a listbullet if( pTable->wdStyleType == word::WdStyleType::wdStyleTypeList ) { - xStyleProps->setPropertyValue("NumberingStyleName", uno::makeAny( aStyleName ) ); + xStyleProps->setPropertyValue("NumberingStyleName", uno::Any( aStyleName ) ); } - return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, mxModel, xStyleProps ) ) ); + return uno::Any( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, mxModel, xStyleProps ) ) ); } else { diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index 0d228e6d883c..e09c89554ec9 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -120,7 +120,7 @@ uno::Any PrivateProfileStringListener::getValueEvent() sValue = OStringToOUString(aCfg.ReadKey(maKey), RTL_TEXTENCODING_DONTKNOW); - return uno::makeAny( sValue ); + return uno::Any( sValue ); } void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value ) @@ -253,7 +253,7 @@ SwVbaSystem::PrivateProfileString( const OUString& rFilename, const OUString& rS OString aKey(OUStringToOString(rKey, RTL_TEXTENCODING_DONTKNOW)); maPrivateProfileStringListener.Initialize( sFileUrl, aGroupName, aKey ); - return uno::makeAny( uno::Reference< XPropValue > ( new ScVbaPropValue( &maPrivateProfileStringListener ) ) ); + return uno::Any( uno::Reference< XPropValue > ( new ScVbaPropValue( &maPrivateProfileStringListener ) ) ); } OUString diff --git a/sw/source/ui/vba/vbatable.cxx b/sw/source/ui/vba/vbatable.cxx index 501168abfcdb..67f812a6e2fe 100644 --- a/sw/source/ui/vba/vbatable.cxx +++ b/sw/source/ui/vba/vbatable.cxx @@ -54,7 +54,7 @@ SwVbaTable::Select( ) uno::Reference< view::XSelectionSupplier > xSelectionSupplier( xController, uno::UNO_QUERY_THROW ); // set the view cursor to the start of the table. - xSelectionSupplier->select( uno::makeAny( mxTextTable ) ); + xSelectionSupplier->select( uno::Any( mxTextTable ) ); // go to the end of the table and span the view uno::Reference< text::XTextViewCursor > xCursor = xViewCursorSupplier->getViewCursor(); @@ -84,7 +84,7 @@ SwVbaTable::Borders( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaBorders( this, mxContext, aCellRange, aPalette ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -94,7 +94,7 @@ SwVbaTable::Rows( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaRows( this, mxContext, mxTextTable, xTableRows ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } uno::Any SAL_CALL @@ -104,7 +104,7 @@ SwVbaTable::Columns( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaColumns( this, mxContext, mxTextTable, xTableColumns ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } // XHelperInterface diff --git a/sw/source/ui/vba/vbatableofcontents.cxx b/sw/source/ui/vba/vbatableofcontents.cxx index 8c5fa066abe5..08cb11b7ec55 100644 --- a/sw/source/ui/vba/vbatableofcontents.cxx +++ b/sw/source/ui/vba/vbatableofcontents.cxx @@ -42,7 +42,7 @@ SwVbaTableOfContents::~SwVbaTableOfContents() void SAL_CALL SwVbaTableOfContents::setLowerHeadingLevel( ::sal_Int32 _lowerheadinglevel ) { - mxTocProps->setPropertyValue("Level", uno::makeAny( sal_Int8( _lowerheadinglevel ) ) ); + mxTocProps->setPropertyValue("Level", uno::Any( sal_Int8( _lowerheadinglevel ) ) ); } ::sal_Int32 SAL_CALL SwVbaTableOfContents::getTabLeader() @@ -65,7 +65,7 @@ sal_Bool SAL_CALL SwVbaTableOfContents::getUseFields() void SAL_CALL SwVbaTableOfContents::setUseFields( sal_Bool _useFields ) { - mxTocProps->setPropertyValue("CreateFromMarks", uno::makeAny( _useFields ) ); + mxTocProps->setPropertyValue("CreateFromMarks", uno::Any( _useFields ) ); } sal_Bool SAL_CALL SwVbaTableOfContents::getUseOutlineLevels() @@ -77,7 +77,7 @@ sal_Bool SAL_CALL SwVbaTableOfContents::getUseOutlineLevels() void SAL_CALL SwVbaTableOfContents::setUseOutlineLevels( sal_Bool _useOutlineLevels ) { - mxTocProps->setPropertyValue("CreateFromOutline", uno::makeAny( _useOutlineLevels ) ); + mxTocProps->setPropertyValue("CreateFromOutline", uno::Any( _useOutlineLevels ) ); } void SAL_CALL SwVbaTableOfContents::Delete( ) diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx index 286bb25a8325..35b6f6173664 100644 --- a/sw/source/ui/vba/vbatables.cxx +++ b/sw/source/ui/vba/vbatables.cxx @@ -47,7 +47,7 @@ static uno::Any lcl_createTable( const uno::Reference< XHelperInterface >& xPare uno::Reference< text::XTextTable > xTextTable( aSource, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextDocument > xTextDocument( xDocument, uno::UNO_QUERY_THROW ); uno::Reference< word::XTable > xTable( new SwVbaTable( xParent, xContext, xTextDocument, xTextTable ) ); - return uno::makeAny( xTable ); + return uno::Any( xTable ); } static bool lcl_isInHeaderFooter( const uno::Reference< text::XTextTable >& xTable ) @@ -93,7 +93,7 @@ public: if ( Index < 0 || Index >= getCount() ) throw lang::IndexOutOfBoundsException(); uno::Reference< text::XTextTable > xTable( mxTables[ Index ], uno::UNO_SET_THROW ); - return uno::makeAny( xTable ); + return uno::Any( xTable ); } // XElementAccess virtual uno::Type SAL_CALL getElementType( ) override { return cppu::UnoType<text::XTextTable>::get(); } @@ -104,7 +104,7 @@ public: if ( !hasByName(aName) ) throw container::NoSuchElementException(); uno::Reference< text::XTextTable > xTable( *cachePos, uno::UNO_SET_THROW ); - return uno::makeAny( xTable ); + return uno::Any( xTable ); } virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) override { diff --git a/sw/source/ui/vba/vbatablesofcontents.cxx b/sw/source/ui/vba/vbatablesofcontents.cxx index c6cc23e6e155..b966e673e489 100644 --- a/sw/source/ui/vba/vbatablesofcontents.cxx +++ b/sw/source/ui/vba/vbatablesofcontents.cxx @@ -89,7 +89,7 @@ public: throw lang::IndexOutOfBoundsException(); uno::Reference< text::XDocumentIndex > xToc( maToc[Index], uno::UNO_SET_THROW ); - return uno::makeAny( uno::Reference< word::XTableOfContents >( new SwVbaTableOfContents( mxParent, mxContext, mxTextDocument, xToc ) ) ); + return uno::Any( uno::Reference< word::XTableOfContents >( new SwVbaTableOfContents( mxParent, mxContext, mxTextDocument, xToc ) ) ); } virtual uno::Type SAL_CALL getElementType( ) override { @@ -119,7 +119,7 @@ SwVbaTablesOfContents::Add( const uno::Reference< word::XRange >& Range, const u uno::Reference< text::XDocumentIndex > xDocumentIndex( xDocMSF->createInstance("com.sun.star.text.ContentIndex"), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xTocProps( xDocumentIndex, uno::UNO_QUERY_THROW ); - xTocProps->setPropertyValue("IsProtected", uno::makeAny( false ) ); + xTocProps->setPropertyValue("IsProtected", uno::Any( false ) ); uno::Reference< word::XTableOfContents > xToc( new SwVbaTableOfContents( this, mxContext, mxTextDocument, xDocumentIndex ) ); diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx index b790db76805b..ac93903cd901 100644 --- a/sw/source/ui/vba/vbatabstops.cxx +++ b/sw/source/ui/vba/vbatabstops.cxx @@ -40,7 +40,7 @@ static uno::Sequence< style::TabStop > lcl_getTabStops( const uno::Reference< be /// @throws uno::RuntimeException static void lcl_setTabStops( const uno::Reference< beans::XPropertySet >& xParaProps, const uno::Sequence< style::TabStop >& aSeq ) { - xParaProps->setPropertyValue("ParaTabStops", uno::makeAny( aSeq ) ); + xParaProps->setPropertyValue("ParaTabStops", uno::Any( aSeq ) ); } namespace { @@ -92,7 +92,7 @@ public: if ( Index < 0 || Index >= getCount() ) throw css::lang::IndexOutOfBoundsException(); - return uno::makeAny( uno::Reference< word::XTabStop >( new SwVbaTabStop( mxParent, mxContext ) ) ); + return uno::Any( uno::Reference< word::XTabStop >( new SwVbaTabStop( mxParent, mxContext ) ) ); } virtual uno::Type SAL_CALL getElementType( ) override { diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx index 58059da512de..94cdcf56c12b 100644 --- a/sw/source/ui/vba/vbatemplate.cxx +++ b/sw/source/ui/vba/vbatemplate.cxx @@ -106,7 +106,7 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) uno::Reference< XCollection > xCol( new SwVbaAutoTextEntries( this, mxContext, xGroup ) ); if( index.hasValue() ) return xCol->Item( index, uno::Any() ); - return uno::makeAny( xCol ); + return uno::Any( xCol ); } OUString diff --git a/sw/source/ui/vba/vbavariables.cxx b/sw/source/ui/vba/vbavariables.cxx index 9e786e905028..33bc3c0c4612 100644 --- a/sw/source/ui/vba/vbavariables.cxx +++ b/sw/source/ui/vba/vbavariables.cxx @@ -73,7 +73,7 @@ SwVbaVariables::Add( const OUString& rName, const uno::Any& rValue ) uno::Reference< beans::XPropertyContainer > xPropertyContainer( mxUserDefined, uno::UNO_QUERY_THROW ); xPropertyContainer->addProperty( rName, beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::REMOVABLE, aValue ); - return uno::makeAny( uno::Reference< word::XVariable >( new SwVbaVariable( getParent(), mxContext, mxUserDefined, rName ) ) ); + return uno::Any( uno::Reference< word::XVariable >( new SwVbaVariable( getParent(), mxContext, mxUserDefined, rName ) ) ); } OUString diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx index 4efeac437e81..cb3c40321935 100644 --- a/sw/source/ui/vba/vbaview.cxx +++ b/sw/source/ui/vba/vbaview.cxx @@ -197,7 +197,7 @@ SwVbaView::getTableGridLines() void SAL_CALL SwVbaView::setTableGridLines( sal_Bool _tablegridlines ) { - mxViewSettings->setPropertyValue("ShowTableBoundaries", uno::makeAny( _tablegridlines ) ); + mxViewSettings->setPropertyValue("ShowTableBoundaries", uno::Any( _tablegridlines ) ); } ::sal_Int32 SAL_CALL @@ -218,12 +218,12 @@ SwVbaView::setType( ::sal_Int32 _type ) case word::WdViewType::wdPrintView: case word::WdViewType::wdNormalView: { - mxViewSettings->setPropertyValue("ShowOnlineLayout", uno::makeAny( false ) ); + mxViewSettings->setPropertyValue("ShowOnlineLayout", uno::Any( false ) ); break; } case word::WdViewType::wdWebView: { - mxViewSettings->setPropertyValue("ShowOnlineLayout", uno::makeAny( true ) ); + mxViewSettings->setPropertyValue("ShowOnlineLayout", uno::Any( true ) ); break; } case word::WdViewType::wdPrintPreview: @@ -331,8 +331,8 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) xPageProps->getPropertyValue( aPropIsShared ) >>= isShared; if( !isOn ) { - xPageProps->setPropertyValue( aPropIsOn, uno::makeAny( true ) ); - xPageProps->setPropertyValue( aPropBodyDistance, uno::makeAny( DEFAULT_BODY_DISTANCE ) ); + xPageProps->setPropertyValue( aPropIsOn, uno::Any( true ) ); + xPageProps->setPropertyValue( aPropBodyDistance, uno::Any( DEFAULT_BODY_DISTANCE ) ); } if( !isShared ) { diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx index ed76ad494b31..1f5822efe2ca 100644 --- a/sw/source/ui/vba/vbawindow.cxx +++ b/sw/source/ui/vba/vbawindow.cxx @@ -62,7 +62,7 @@ SwVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& RouteDocument ) uno::Any SAL_CALL SwVbaWindow::getView() { - return uno::makeAny( uno::Reference< word::XView >( new SwVbaView( this, mxContext, m_xModel ) ) ); + return uno::Any( uno::Reference< word::XView >( new SwVbaView( this, mxContext, m_xModel ) ) ); } void SAL_CALL SwVbaWindow::setView( const uno::Any& _view ) @@ -89,7 +89,7 @@ SwVbaWindow::getWindowState() else if (pWork -> IsMinimized()) nwindowState = word::WdWindowState::wdWindowStateMinimize; } - return uno::makeAny( nwindowState ); + return uno::Any( nwindowState ); } void SAL_CALL @@ -141,7 +141,7 @@ SwVbaWindow::setCaption( const OUString& _caption ) if( !xFrameProps.is() ) return; - xFrameProps->setPropertyValue( "Title", uno::makeAny( _caption ) ); + xFrameProps->setPropertyValue( "Title", uno::Any( _caption ) ); } uno::Any SAL_CALL @@ -149,7 +149,7 @@ SwVbaWindow::Panes( const uno::Any& aIndex ) { uno::Reference< XCollection > xPanes( new SwVbaPanes( this, mxContext, m_xModel ) ); if( aIndex.getValueTypeClass() == uno::TypeClass_VOID ) - return uno::makeAny( xPanes ); + return uno::Any( xPanes ); return xPanes->Item( aIndex, uno::Any() ); } @@ -157,7 +157,7 @@ SwVbaWindow::Panes( const uno::Any& aIndex ) uno::Any SAL_CALL SwVbaWindow::ActivePane() { - return uno::makeAny( uno::Reference< word::XPane >( new SwVbaPane( this, mxContext, m_xModel ) ) ); + return uno::Any( uno::Reference< word::XPane >( new SwVbaPane( this, mxContext, m_xModel ) ) ); } OUString diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx index 0e77d3c58341..2aef0523b432 100644 --- a/sw/source/ui/vba/vbawrapformat.cxx +++ b/sw/source/ui/vba/vbawrapformat.cxx @@ -66,13 +66,13 @@ void SwVbaWrapFormat::makeWrap() case word::WdWrapType::wdWrapSquare: { eTextMode = text::WrapTextMode_PARALLEL; - m_xPropertySet->setPropertyValue("SurroundContour", uno::makeAny( false ) ); + m_xPropertySet->setPropertyValue("SurroundContour", uno::Any( false ) ); break; } case word::WdWrapType::wdWrapTight: { eTextMode = text::WrapTextMode_PARALLEL; - m_xPropertySet->setPropertyValue("SurroundContour", uno::makeAny( true ) ); + m_xPropertySet->setPropertyValue("SurroundContour", uno::Any( true ) ); break; } default: @@ -81,7 +81,7 @@ void SwVbaWrapFormat::makeWrap() } } } - m_xPropertySet->setPropertyValue("TextWrap", uno::makeAny( eTextMode ) ); + m_xPropertySet->setPropertyValue("TextWrap", uno::Any( eTextMode ) ); } ::sal_Int32 SAL_CALL SwVbaWrapFormat::getType() @@ -173,7 +173,7 @@ float SwVbaWrapFormat::getDistance( const OUString& sName ) void SwVbaWrapFormat::setDistance( const OUString& sName, float _distance ) { sal_Int32 nDistance = Millimeter::getInHundredthsOfOneMillimeter( _distance ); - m_xPropertySet->setPropertyValue( sName, uno::makeAny( nDistance ) ); + m_xPropertySet->setPropertyValue( sName, uno::Any( nDistance ) ); } float SAL_CALL SwVbaWrapFormat::getDistanceTop() diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx index 7b916ccfde90..5bf7e26c771b 100644 --- a/sw/source/ui/vba/wordvbahelper.cxx +++ b/sw/source/ui/vba/wordvbahelper.cxx @@ -165,7 +165,7 @@ bool gotoSelectedObjectAnchor( const uno::Reference< frame::XModel>& xModel ) { uno::Reference< text::XTextRange > xTextRange( xTextContent->getAnchor(), uno::UNO_SET_THROW ); uno::Reference< view::XSelectionSupplier > xSelectSupp( xModel->getCurrentController(), uno::UNO_QUERY_THROW ); - xSelectSupp->select( uno::makeAny( xTextRange ) ); + xSelectSupp->select( uno::Any( xTextRange ) ); isObjectSelected = true; } return isObjectSelected; diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index bf5b82fd5f81..958b326f6400 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -772,15 +772,15 @@ void SwModule::ExecOther(SfxRequest& rReq) // now the record has to be merged into the source document // TODO can we re-use PerformMailMerge() here somehow? const SwDBData& rDBData = xConfigItem->GetCurrentDBData(); - uno::Sequence<uno::Any> vSelection({ uno::makeAny(xConfigItem->GetResultSetPosition()) }); + uno::Sequence<uno::Any> vSelection({ uno::Any(xConfigItem->GetResultSetPosition()) }); svx::ODataAccessDescriptor aDescriptor(::comphelper::InitPropertySequence({ - {"Selection", uno::makeAny(vSelection)}, - {"DataSourceName", uno::makeAny(rDBData.sDataSource)}, - {"Command", uno::makeAny(rDBData.sCommand)}, - {"CommandType", uno::makeAny(rDBData.nCommandType)}, - {"ActiveConnection", uno::makeAny(xConfigItem->GetConnection().getTyped())}, - {"Filter", uno::makeAny(xConfigItem->GetFilter())}, - {"Cursor", uno::makeAny(xConfigItem->GetResultSet())} + {"Selection", uno::Any(vSelection)}, + {"DataSourceName", uno::Any(rDBData.sDataSource)}, + {"Command", uno::Any(rDBData.sCommand)}, + {"CommandType", uno::Any(rDBData.nCommandType)}, + {"ActiveConnection", uno::Any(xConfigItem->GetConnection().getTyped())}, + {"Filter", uno::Any(xConfigItem->GetFilter())}, + {"Cursor", uno::Any(xConfigItem->GetResultSet())} })); SwWrtShell& rSh = pView->GetWrtShell(); diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index db389061771e..789a221ff090 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -720,7 +720,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) // TODO/MBA: testing uno::Reference < beans::XPropertySet > xSet( rMedium.GetStorage(), uno::UNO_QUERY ); if ( xSet.is() ) - xSet->setPropertyValue("MediaType", uno::makeAny( SotExchange::GetFormatMimeType( nSaveClipId ) ) ); + xSet->setPropertyValue("MediaType", uno::Any( SotExchange::GetFormatMimeType( nSaveClipId ) ) ); } catch (const uno::Exception&) { diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index db1f5d86e0dc..cf73c8c91947 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1509,7 +1509,7 @@ void SwDocShell::ReloadFromHtml( const OUString& rStreamName, SwSrcView* pSrcVie if( pBasic ) { // Notify the IDE - SfxUnoAnyItem aShellItem( SID_BASICIDE_ARG_DOCUMENT_MODEL, makeAny( GetModel() ) ); + SfxUnoAnyItem aShellItem( SID_BASICIDE_ARG_DOCUMENT_MODEL, Any( GetModel() ) ); OUString aLibName( pBasic->GetName() ); SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName ); pSrcView->GetViewFrame()->GetDispatcher()->ExecuteList( diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx index cf7d8b6282a0..ccd6afcc4075 100644 --- a/sw/source/uibase/app/swmodul1.cxx +++ b/sw/source/uibase/app/swmodul1.cxx @@ -383,7 +383,7 @@ void SwModule::ShowDBObj(SwView const & rView, const SwDBData& rData) aSelection.setDataSource(rData.sDataSource); aSelection[DataAccessDescriptorProperty::Command] <<= rData.sCommand; aSelection[DataAccessDescriptorProperty::CommandType] <<= rData.nCommandType; - xControllerSelection->select(makeAny(aSelection.createPropertyValueSequence())); + xControllerSelection->select(Any(aSelection.createPropertyValueSequence())); } else { OSL_FAIL("no selection supplier in the beamer!"); diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx index 4833a6af0b7b..43dbde46bdb8 100644 --- a/sw/source/uibase/config/StoredChapterNumbering.cxx +++ b/sw/source/uibase/config/StoredChapterNumbering.cxx @@ -129,7 +129,7 @@ public: uno::Sequence<beans::PropertyValue> const ret( SwXNumberingRules::GetPropertiesForNumFormat( *pNumFormat, *pCharStyleName, &dummy, "")); - return uno::makeAny(ret); + return uno::Any(ret); } // XIndexReplace diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 332911df9973..f7607bac9dda 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -814,7 +814,7 @@ static bool lcl_SaveDoc( *pStoreToFilterOptions)); if( pSaveToFilterData->hasElements() ) pDstMed->GetItemSet()->Put( SfxUnoAnyItem(SID_FILTER_DATA, - uno::makeAny(*pSaveToFilterData))); + uno::Any(*pSaveToFilterData))); } // convert fields to text if we are exporting to PDF. @@ -1906,11 +1906,11 @@ uno::Reference< sdbcx::XColumnsSupplier> SwDBManager::GetColumnSupplier(uno::Ref } uno::Reference<beans::XPropertySet> xRowProperties(xRowSet, uno::UNO_QUERY); - xRowProperties->setPropertyValue("DataSourceName", uno::makeAny(sDataSource)); - xRowProperties->setPropertyValue("Command", uno::makeAny(rTableOrQuery)); - xRowProperties->setPropertyValue("CommandType", uno::makeAny(nCommandType)); - xRowProperties->setPropertyValue("FetchSize", uno::makeAny(sal_Int32(10))); - xRowProperties->setPropertyValue("ActiveConnection", uno::makeAny(xConnection)); + xRowProperties->setPropertyValue("DataSourceName", uno::Any(sDataSource)); + xRowProperties->setPropertyValue("Command", uno::Any(rTableOrQuery)); + xRowProperties->setPropertyValue("CommandType", uno::Any(nCommandType)); + xRowProperties->setPropertyValue("FetchSize", uno::Any(sal_Int32(10))); + xRowProperties->setPropertyValue("ActiveConnection", uno::Any(xConnection)); xRowSet->execute(); xRet.set( xRowSet, uno::UNO_QUERY ); } @@ -2720,7 +2720,7 @@ OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference uno::Reference < beans::XPropertySet > xDSSettings; aSettings >>= xDSSettings; ::comphelper::copyProperties(*pSettings, xDSSettings); - xDSSettings->setPropertyValue("Extension", uno::makeAny(sExt)); + xDSSettings->setPropertyValue("Extension", uno::Any(sExt)); } uno::Reference<sdb::XDocumentDataSource> xDS(xNewInstance, uno::UNO_QUERY_THROW); @@ -2745,7 +2745,7 @@ OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference // we can load it again next time the file is imported. uno::Reference<lang::XMultiServiceFactory> xFactory(pDocShell->GetModel(), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xPropertySet(xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); - xPropertySet->setPropertyValue("EmbeddedDatabaseName", uno::makeAny(aStreamRelPath)); + xPropertySet->setPropertyValue("EmbeddedDatabaseName", uno::Any(aStreamRelPath)); // Store it only after setting the above property, so that only one data source gets registered. SwDBManager::StoreEmbeddedDataSource(xStore, xStorage, aStreamRelPath, aOwnURL); @@ -2844,9 +2844,9 @@ void SwDBManager::StoreEmbeddedDataSource(const uno::Reference<frame::XStorable> uno::Sequence<beans::PropertyValue> aSequence = comphelper::InitPropertySequence( { - {"TargetStorage", uno::makeAny(xStorage)}, - {"StreamRelPath", uno::makeAny(rStreamRelPath)}, - {"BaseURI", uno::makeAny(rOwnURL)} + {"TargetStorage", uno::Any(xStorage)}, + {"StreamRelPath", uno::Any(rStreamRelPath)}, + {"BaseURI", uno::Any(rOwnURL)} }); if (bCopyTo) xStorable->storeToURL(sTmpName, aSequence); @@ -3110,10 +3110,10 @@ uno::Reference<sdbc::XResultSet> SwDBManager::createCursor(const OUString& _sDat uno::Reference<beans::XPropertySet> xRowSetPropSet(xInstance, uno::UNO_QUERY); if(xRowSetPropSet.is()) { - xRowSetPropSet->setPropertyValue("DataSourceName", uno::makeAny(_sDataSourceName)); - xRowSetPropSet->setPropertyValue("ActiveConnection", uno::makeAny(_xConnection)); - xRowSetPropSet->setPropertyValue("Command", uno::makeAny(_sCommand)); - xRowSetPropSet->setPropertyValue("CommandType", uno::makeAny(_nCommandType)); + xRowSetPropSet->setPropertyValue("DataSourceName", uno::Any(_sDataSourceName)); + xRowSetPropSet->setPropertyValue("ActiveConnection", uno::Any(_xConnection)); + xRowSetPropSet->setPropertyValue("Command", uno::Any(_sCommand)); + xRowSetPropSet->setPropertyValue("CommandType", uno::Any(_nCommandType)); uno::Reference< sdb::XCompletedExecution > xRowSet(xInstance, uno::UNO_QUERY); diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index 200cbec1a478..86c1a73f37d4 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -855,15 +855,15 @@ Reference< XResultSet> const & SwMailMergeConfigItem::GetResultSet() const Reference<XRowSet> xRowSet( xMgr->createInstance("com.sun.star.sdb.RowSet"), UNO_QUERY ); Reference<XPropertySet> xRowProperties(xRowSet, UNO_QUERY); - xRowProperties->setPropertyValue("DataSourceName", makeAny(m_pImpl->m_aDBData.sDataSource)); - xRowProperties->setPropertyValue("Command", makeAny(m_pImpl->m_aDBData.sCommand)); - xRowProperties->setPropertyValue("CommandType", makeAny(m_pImpl->m_aDBData.nCommandType)); - xRowProperties->setPropertyValue("FetchSize", makeAny(sal_Int32(10))); - xRowProperties->setPropertyValue("ActiveConnection", makeAny(m_pImpl->m_xConnection.getTyped())); + xRowProperties->setPropertyValue("DataSourceName", Any(m_pImpl->m_aDBData.sDataSource)); + xRowProperties->setPropertyValue("Command", Any(m_pImpl->m_aDBData.sCommand)); + xRowProperties->setPropertyValue("CommandType", Any(m_pImpl->m_aDBData.nCommandType)); + xRowProperties->setPropertyValue("FetchSize", Any(sal_Int32(10))); + xRowProperties->setPropertyValue("ActiveConnection", Any(m_pImpl->m_xConnection.getTyped())); try { - xRowProperties->setPropertyValue("ApplyFilter", makeAny(!m_pImpl->m_sFilter.isEmpty())); - xRowProperties->setPropertyValue("Filter", makeAny(m_pImpl->m_sFilter)); + xRowProperties->setPropertyValue("ApplyFilter", Any(!m_pImpl->m_sFilter.isEmpty())); + xRowProperties->setPropertyValue("Filter", Any(m_pImpl->m_sFilter)); } catch (const Exception&) { @@ -909,8 +909,8 @@ void SwMailMergeConfigItem::SetFilter(OUString const & rFilter) try { - xRowProperties->setPropertyValue("ApplyFilter", makeAny(!m_pImpl->m_sFilter.isEmpty())); - xRowProperties->setPropertyValue("Filter", makeAny(m_pImpl->m_sFilter)); + xRowProperties->setPropertyValue("ApplyFilter", Any(!m_pImpl->m_sFilter.isEmpty())); + xRowProperties->setPropertyValue("Filter", Any(m_pImpl->m_sFilter)); uno::Reference<XRowSet> xRowSet( m_pImpl->m_xResultSet, UNO_QUERY_THROW ); xRowSet->execute(); } @@ -1004,7 +1004,7 @@ uno::Sequence<uno::Any> SwMailMergeConfigItem::GetSelection() const std::vector<uno::Any> vResult; for(sal_uInt32 nIdx=1; nIdx<nResultSetSize;++nIdx) if( !IsRecordExcluded(nIdx) && IsRecordIncluded(nIdx) ) - vResult.push_back(uno::makeAny<sal_uInt32>(nIdx)); + vResult.push_back(uno::Any(sal_uInt32(nIdx))); return comphelper::containerToSequence(vResult); } diff --git a/sw/source/uibase/dialog/watermarkdialog.cxx b/sw/source/uibase/dialog/watermarkdialog.cxx index 3e9a914a2917..37e7ff0ed1f8 100644 --- a/sw/source/uibase/dialog/watermarkdialog.cxx +++ b/sw/source/uibase/dialog/watermarkdialog.cxx @@ -103,11 +103,11 @@ IMPL_LINK_NOARG(SwWatermarkDialog, OKButtonHdl, weld::Button&, void) css::uno::Sequence<css::beans::PropertyValue> aPropertyValues( comphelper::InitPropertySequence( { - { "Text", css::uno::makeAny( sText ) }, - { "Font", css::uno::makeAny( m_xFont->get_active_text() ) }, - { "Angle", css::uno::makeAny( static_cast<sal_Int16>( m_xAngle->get_value(FieldUnit::DEGREE) ) ) }, - { "Transparency", css::uno::makeAny( static_cast<sal_Int16>( m_xTransparency->get_value(FieldUnit::PERCENT) ) ) }, - { "Color", css::uno::makeAny( static_cast<sal_uInt32>( m_xColor->GetSelectEntryColor().GetRGBColor() ) ) } + { "Text", css::uno::Any( sText ) }, + { "Font", css::uno::Any( m_xFont->get_active_text() ) }, + { "Angle", css::uno::Any( static_cast<sal_Int16>( m_xAngle->get_value(FieldUnit::DEGREE) ) ) }, + { "Transparency", css::uno::Any( static_cast<sal_Int16>( m_xTransparency->get_value(FieldUnit::PERCENT) ) ) }, + { "Color", css::uno::Any( static_cast<sal_uInt32>( m_xColor->GetSelectEntryColor().GetRGBColor() ) ) } } ) ); comphelper::dispatchCommand( ".uno:Watermark", aPropertyValues ); diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 43cd6bba9717..2e81d7495a43 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -3251,7 +3251,7 @@ bool SwTransferable::PasteDBData( const TransferableDataHelper& rData, { pConnectionItem.reset(new SfxUnoAnyItem(FN_DB_CONNECTION_ANY, aDesc[DataAccessDescriptorProperty::Connection])); pColumnItem.reset(new SfxUnoAnyItem(FN_DB_COLUMN_ANY, aDesc[DataAccessDescriptorProperty::ColumnObject])); - pSourceItem.reset(new SfxUnoAnyItem(FN_DB_DATA_SOURCE_ANY, makeAny(aDesc.getDataSource()))); + pSourceItem.reset(new SfxUnoAnyItem(FN_DB_DATA_SOURCE_ANY, Any(aDesc.getDataSource()))); pCommandItem.reset(new SfxUnoAnyItem(FN_DB_DATA_COMMAND_ANY, aDesc[DataAccessDescriptorProperty::Command])); pCommandTypeItem.reset(new SfxUnoAnyItem(FN_DB_DATA_COMMAND_TYPE_ANY, aDesc[DataAccessDescriptorProperty::CommandType])); pColumnNameItem.reset(new SfxUnoAnyItem(FN_DB_DATA_COLUMN_NAME_ANY, aDesc[DataAccessDescriptorProperty::ColumnName])); diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 68855b28f1b5..e7c6a950bb76 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -557,7 +557,7 @@ SwSpellPopup::SwSpellPopup( checkRedline(); m_xPopupMenu->RemoveDisabledEntries(true); - SvtLinguConfig().SetProperty( UPN_IS_GRAMMAR_INTERACTIVE, uno::makeAny( true )); + SvtLinguConfig().SetProperty( UPN_IS_GRAMMAR_INTERACTIVE, uno::Any( true )); InitItemCommands(rSuggestions); } diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 280e667eaf2c..815b353d825c 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -291,28 +291,28 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) if ( pMarginItem ) aMargin = pMarginItem->GetSize(); - xSet->setPropertyValue("FrameURL", uno::makeAny( pURLItem->GetValue() ) ); + xSet->setPropertyValue("FrameURL", uno::Any( pURLItem->GetValue() ) ); if ( pNameItem ) - xSet->setPropertyValue("FrameName", uno::makeAny( pNameItem->GetValue() ) ); + xSet->setPropertyValue("FrameName", uno::Any( pNameItem->GetValue() ) ); if ( eScroll == ScrollingMode::Auto ) xSet->setPropertyValue("FrameIsAutoScroll", - uno::makeAny( true ) ); + uno::Any( true ) ); else xSet->setPropertyValue("FrameIsScrollingMode", - uno::makeAny( eScroll == ScrollingMode::Yes ) ); + uno::Any( eScroll == ScrollingMode::Yes ) ); if ( pBorderItem ) xSet->setPropertyValue("FrameIsBorder", - uno::makeAny( pBorderItem->GetValue() ) ); + uno::Any( pBorderItem->GetValue() ) ); if ( pMarginItem ) { xSet->setPropertyValue("FrameMarginWidth", - uno::makeAny( sal_Int32( aMargin.Width() ) ) ); + uno::Any( sal_Int32( aMargin.Width() ) ) ); xSet->setPropertyValue("FrameMarginHeight", - uno::makeAny( sal_Int32( aMargin.Height() ) ) ); + uno::Any( sal_Int32( aMargin.Height() ) ) ); } } catch (const uno::Exception&) diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx index f6488f384344..72a9238c7c66 100644 --- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx +++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx @@ -408,7 +408,7 @@ static void MetadataToTreeNode(const css::uno::Reference<css::uno::XInterface>& aCurNode.NodeType = svx::sidebar::TreeNode::ComplexProperty; aCurNode.children.push_back( - SimplePropToTreeNode("xml:id", uno::makeAny(xMeta->getMetadataReference().Second))); + SimplePropToTreeNode("xml:id", uno::Any(xMeta->getMetadataReference().Second))); // list associated (predicate, object) pairs of the actual subject // under the tree node "Metadata Reference" @@ -420,7 +420,7 @@ static void MetadataToTreeNode(const css::uno::Reference<css::uno::XInterface>& std::map<OUString, OUString> xStatements = SwRDFHelper::getStatements(pDocSh->GetBaseModel(), xRepo->getGraphNames(), xSubject); for (const auto& pair : xStatements) - aCurNode.children.push_back(SimplePropToTreeNode(pair.first, uno::makeAny(pair.second))); + aCurNode.children.push_back(SimplePropToTreeNode(pair.first, uno::Any(pair.second))); rNode.children.push_back(aCurNode); } diff --git a/sw/source/uibase/table/chartins.cxx b/sw/source/uibase/table/chartins.cxx index 2fcea5f285f5..a1b18fedac28 100644 --- a/sw/source/uibase/table/chartins.cxx +++ b/sw/source/uibase/table/chartins.cxx @@ -200,7 +200,7 @@ SwInsertChart::SwInsertChart( const Link<css::ui::dialogs::DialogClosedEvent*, v tools::Rectangle aRect( aSwRect.SVRect() ); Point aDialogPos = SwGetChartDialogPos( &rWrtShell.GetView().GetEditWin(), aDialogSize, aRect ); xDialogProps->setPropertyValue("Position", - uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); + uno::Any( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); } } } diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx index e062a305a279..854fa30ab6ce 100644 --- a/sw/source/uibase/table/tablemgr.cxx +++ b/sw/source/uibase/table/tablemgr.cxx @@ -296,16 +296,16 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart( uno::Sequence< beans::PropertyValue > aArgs{ beans::PropertyValue( "CellRangeRepresentation", -1, - uno::makeAny( rCellRange ), beans::PropertyState_DIRECT_VALUE ), + uno::Any( rCellRange ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( "HasCategories", -1, - uno::makeAny( bHasCategories ), beans::PropertyState_DIRECT_VALUE ), + uno::Any( bHasCategories ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( "FirstCellAsLabel", -1, - uno::makeAny( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE ), + uno::Any( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE ), beans::PropertyValue( "DataRowSource", -1, - uno::makeAny( eDataRowSource ), beans::PropertyState_DIRECT_VALUE ) + uno::Any( eDataRowSource ), beans::PropertyState_DIRECT_VALUE ) }; xDataReceiver->setArguments( aArgs ); } diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 1a80e02bb5a6..fefada834a84 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -552,7 +552,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq) pOpt->SetOnlineSpell(bSet); { SvtLinguConfig aCfg; - aCfg.SetProperty( UPN_IS_SPELL_AUTO, uno::makeAny( bSet ) ); + aCfg.SetProperty( UPN_IS_SPELL_AUTO, uno::Any( bSet ) ); if (xLngProp.is()) xLngProp->setIsSpellAuto( bSet ); diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 910fea4e1bf2..2cb38325ba67 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -323,7 +323,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) uno::Reference < XFilePickerControlAccess > xCtrlAcc(xFP, UNO_QUERY); if(nHtmlMode & HTMLMODE_ON) { - xCtrlAcc->setValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, makeAny(true)); + xCtrlAcc->setValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, Any(true)); xCtrlAcc->enableControl( ExtendedFilePickerElementIds::CHECKBOX_LINK, false); } diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index 9b0a3d7e6a93..3804354a7521 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -108,7 +108,7 @@ uno::Any SwXAutoTextContainer::getByName(const OUString& GroupName) if ( !xGroup.is() ) throw container::NoSuchElementException(); - return makeAny( xGroup ); + return css::uno::Any( xGroup ); } uno::Sequence< OUString > SwXAutoTextContainer::getElementNames() @@ -513,7 +513,7 @@ uno::Any SwXAutoTextGroup::getByName(const OUString& _rName) uno::Reference< text::XAutoTextEntry > xEntry = m_pGlossaries->GetAutoTextEntry( m_sGroupName, m_sName, _rName ); OSL_ENSURE( xEntry.is(), "SwXAutoTextGroup::getByName: GetAutoTextEntry is fractious!" ); // we told it to create the object, so why didn't it? - return makeAny( xEntry ); + return css::uno::Any( xEntry ); } uno::Sequence< OUString > SwXAutoTextGroup::getElementNames() diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx index e21810038ccc..0c7f465806d9 100644 --- a/sw/source/uibase/uno/unodispatch.cxx +++ b/sw/source/uibase/uno/unodispatch.cxx @@ -220,7 +220,7 @@ void SwXDispatch::dispatch(const util::URL& aURL, } else if(aURL.Complete == cURLFormLetter) { - SfxUnoAnyItem aDBProperties(FN_PARAM_DATABASE_PROPERTIES, uno::makeAny(aArgs)); + SfxUnoAnyItem aDBProperties(FN_PARAM_DATABASE_PROPERTIES, uno::Any(aArgs)); m_pView->GetViewFrame()->GetDispatcher()->ExecuteList( FN_MAILMERGE_WIZARD, SfxCallMode::ASYNCHRON, diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index 203879289a9b..89aa97861017 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -620,13 +620,13 @@ uno::Any SAL_CALL SwXMailMerge::execute( if (xRowSetPropSet.is()) { if (xCurConnection.is()) - xRowSetPropSet->setPropertyValue( "ActiveConnection", makeAny( xCurConnection ) ); - xRowSetPropSet->setPropertyValue( "DataSourceName", makeAny( aCurDataSourceName ) ); - xRowSetPropSet->setPropertyValue( "Command", makeAny( aCurDataCommand ) ); - xRowSetPropSet->setPropertyValue( "CommandType", makeAny( nCurDataCommandType ) ); - xRowSetPropSet->setPropertyValue( "EscapeProcessing", makeAny( bCurEscapeProcessing ) ); - xRowSetPropSet->setPropertyValue( "ApplyFilter", makeAny( true ) ); - xRowSetPropSet->setPropertyValue( "Filter", makeAny( aCurFilter ) ); + xRowSetPropSet->setPropertyValue( "ActiveConnection", Any( xCurConnection ) ); + xRowSetPropSet->setPropertyValue( "DataSourceName", Any( aCurDataSourceName ) ); + xRowSetPropSet->setPropertyValue( "Command", Any( aCurDataCommand ) ); + xRowSetPropSet->setPropertyValue( "CommandType", Any( nCurDataCommandType ) ); + xRowSetPropSet->setPropertyValue( "EscapeProcessing", Any( bCurEscapeProcessing ) ); + xRowSetPropSet->setPropertyValue( "ApplyFilter", Any( true ) ); + xRowSetPropSet->setPropertyValue( "Filter", Any( aCurFilter ) ); Reference< sdbc::XRowSet > xRowSet( xInstance, UNO_QUERY ); if (xRowSet.is()) @@ -814,10 +814,10 @@ uno::Any SAL_CALL SwXMailMerge::execute( if (DBMGR_MERGE_SHELL == nMergeType) { - return makeAny( aMergeDesc.pMailMergeConfigItem->GetTargetView()->GetDocShell()->GetBaseModel() ); + return Any( aMergeDesc.pMailMergeConfigItem->GetTargetView()->GetDocShell()->GetBaseModel() ); } else - return makeAny( true ); + return Any( true ); } void SAL_CALL SwXMailMerge::cancel() diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index 31ec42ff75ea..2246aee9331a 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -74,7 +74,7 @@ static void disableScrollBars(uno::Reference< beans::XPropertySet > const & xVie //To reproduce this problem, in edit->autotext and click through //the examples and see if the preview gets a horizontal scrollbar - uno::Any aFalseSet(uno::makeAny(false)); + uno::Any aFalseSet(uno::Any(false)); xViewProps->setPropertyValue(UNO_NAME_SHOW_ONLINE_LAYOUT, aFalseSet); xViewProps->setPropertyValue(UNO_NAME_SHOW_HORI_SCROLL_BAR, aFalseSet); @@ -82,7 +82,7 @@ static void disableScrollBars(uno::Reference< beans::XPropertySet > const & xVie if (bEnableOnlineMode) { - xViewProps->setPropertyValue(UNO_NAME_SHOW_ONLINE_LAYOUT, uno::makeAny(true)); + xViewProps->setPropertyValue(UNO_NAME_SHOW_ONLINE_LAYOUT, uno::Any(true)); } } diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 32d515de2217..ca1c55c0f8c7 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -534,7 +534,7 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame { try { - xSet->setPropertyValue("Formula", uno::makeAny( aMathData ) ); + xSet->setPropertyValue("Formula", uno::Any( aMathData ) ); bActivate = false; } catch (const uno::Exception&) @@ -598,9 +598,9 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame bDisableDataTableDialog ) { xProps->setPropertyValue("DisableDataTableDialog", - uno::makeAny( false ) ); + uno::Any( false ) ); xProps->setPropertyValue("DisableComplexChartTypes", - uno::makeAny( false ) ); + uno::Any( false ) ); uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY ); if ( xModifiable.is() ) { @@ -659,7 +659,7 @@ void SwWrtShell::LaunchOLEObj(sal_Int32 nVerb) { uno::Sequence<beans::PropertyValue> aArguments = { comphelper::makePropertyValue("ReadOnly", pCli->IsProtected()) }; - xOLEInit->initialize({ uno::makeAny(aArguments) }); + xOLEInit->initialize({ uno::Any(aArguments) }); } static_cast<SwOleClient*>(pCli)->SetInDoVerb( true ); |