summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-03 16:07:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-05-03 20:03:32 +0200
commitc46d27cfe4dce83f68b3f222c9c1d26ad33d0b49 (patch)
treeba5d049ce19e2afe96abdda86524902086035bc3 /test
parent82b9af26a64cd91173dbec43c1805bc069dd9f71 (diff)
Just use Any ctor instead of makeAny in test
Change-Id: I926cabc8be39344ec254e87b429f4d1bc8cfc94f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133763 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/source/beans/xpropertyset.cxx18
-rw-r--r--test/source/helper/form.cxx2
-rw-r--r--test/source/sheet/globalsheetsettings.cxx2
-rw-r--r--test/source/table/tablecolumn.cxx2
-rw-r--r--test/source/text/baseindex.cxx4
-rw-r--r--test/source/text/textcontent.cxx4
6 files changed, 16 insertions, 16 deletions
diff --git a/test/source/beans/xpropertyset.cxx b/test/source/beans/xpropertyset.cxx
index 33c0398650db..00c3378106d9 100644
--- a/test/source/beans/xpropertyset.cxx
+++ b/test/source/beans/xpropertyset.cxx
@@ -184,63 +184,63 @@ bool XPropertySet::isPropertyValueChangeable(const OUString& rName)
{
// boolean type
bool bOld = any.get<bool>();
- xPropSet->setPropertyValue(rName, makeAny(!bOld));
+ xPropSet->setPropertyValue(rName, Any(!bOld));
}
else if (type == cppu::UnoType<sal_Int8>::get())
{
// 8-bit integer
sal_Int8 nOld = any.get<sal_Int8>();
sal_Int8 nNew = nOld + 1;
- xPropSet->setPropertyValue(rName, makeAny(nNew));
+ xPropSet->setPropertyValue(rName, Any(nNew));
}
else if (type == cppu::UnoType<sal_Int16>::get())
{
// 16-bit integer
sal_Int16 nOld = any.get<sal_Int16>();
sal_Int16 nNew = nOld + 1;
- xPropSet->setPropertyValue(rName, makeAny(nNew));
+ xPropSet->setPropertyValue(rName, Any(nNew));
}
else if (type == cppu::UnoType<sal_Int32>::get())
{
// 32-bit integer
sal_Int32 nOld = any.get<sal_Int32>();
sal_Int32 nNew = nOld + 3;
- xPropSet->setPropertyValue(rName, makeAny(nNew));
+ xPropSet->setPropertyValue(rName, Any(nNew));
}
else if (type == cppu::UnoType<sal_Int64>::get())
{
// 64-bit integer
sal_Int64 nOld = any.get<sal_Int64>();
sal_Int64 nNew = nOld + 4;
- xPropSet->setPropertyValue(rName, makeAny(nNew));
+ xPropSet->setPropertyValue(rName, Any(nNew));
}
else if (type == cppu::UnoType<float>::get())
{
// single precision
float fOld = any.get<float>();
float fNew = fOld + 1.2;
- xPropSet->setPropertyValue(rName, makeAny(fNew));
+ xPropSet->setPropertyValue(rName, Any(fNew));
}
else if (type == cppu::UnoType<double>::get())
{
// double precision
double fOld = any.get<double>();
double fNew = fOld + 1.3;
- xPropSet->setPropertyValue(rName, makeAny(fNew));
+ xPropSet->setPropertyValue(rName, Any(fNew));
}
else if (type == cppu::UnoType<OUString>::get())
{
// string type
OUString aOld = any.get<OUString>();
OUString aNew = aOld + "foo";
- xPropSet->setPropertyValue(rName, makeAny(aNew));
+ xPropSet->setPropertyValue(rName, Any(aNew));
}
else if (type == cppu::UnoType<util::DateTime>::get())
{
// date time type
util::DateTime aDT = any.get<util::DateTime>();
aDT.Year += 1;
- xPropSet->setPropertyValue(rName, makeAny(aDT));
+ xPropSet->setPropertyValue(rName, Any(aDT));
}
else
{
diff --git a/test/source/helper/form.cxx b/test/source/helper/form.cxx
index c610070a1372..5727909a603a 100644
--- a/test/source/helper/form.cxx
+++ b/test/source/helper/form.cxx
@@ -46,7 +46,7 @@ uno::Reference<drawing::XControlShape> OOO_DLLPUBLIC_TEST createControlShape(
uno::UNO_SET_THROW);
uno::Reference<beans::XPropertySet> xPropertySet(aComponent, uno::UNO_QUERY_THROW);
xPropertySet->setPropertyValue(
- "DefaultControl", uno::makeAny(OUString::Concat("com.sun.star.form.control.") + r_aKind));
+ "DefaultControl", uno::Any(OUString::Concat("com.sun.star.form.control.") + r_aKind));
uno::Reference<awt::XControlModel> xControlModel(aComponent, uno::UNO_QUERY_THROW);
xControlShape->setSize(awt::Size(nHeight, nWidth));
diff --git a/test/source/sheet/globalsheetsettings.cxx b/test/source/sheet/globalsheetsettings.cxx
index c1e527158794..3e796fc58efe 100644
--- a/test/source/sheet/globalsheetsettings.cxx
+++ b/test/source/sheet/globalsheetsettings.cxx
@@ -38,7 +38,7 @@ void GlobalSheetSettings::testGlobalSheetSettingsProperties()
css::uno::Any aOrigValue(origValue), aNewValue(newValue);
css::uno::Sequence<css::uno::Any> args{ css::uno::Any(
- css::beans::NamedValue("nodepath", css::uno::makeAny(regNodeName))) };
+ css::beans::NamedValue("nodepath", css::uno::Any(regNodeName))) };
css::uno::Reference<beans::XPropertySet> xRegNodeRO(
configProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess", args),
diff --git a/test/source/table/tablecolumn.cxx b/test/source/table/tablecolumn.cxx
index 9f25c39355e4..08a008ce8823 100644
--- a/test/source/table/tablecolumn.cxx
+++ b/test/source/table/tablecolumn.cxx
@@ -36,7 +36,7 @@ void TableColumn::testTableColumnProperties()
uno::Reference<table::XCellRange> xCR(m_xSheet, uno::UNO_QUERY_THROW);
xCR->getCellByPosition(0, 0)->setFormula("That's a pretty long text.");
const sal_Int64 nWidthBefore = ::comphelper::getINT64(xPS->getPropertyValue("Width"));
- xPS->setPropertyValue(aPropName, uno::makeAny(true));
+ xPS->setPropertyValue(aPropName, uno::Any(true));
CPPUNIT_ASSERT(::comphelper::getBOOL(xPS->getPropertyValue(aPropName)));
const sal_Int64 nWidthAfter = ::comphelper::getINT64(xPS->getPropertyValue("Width"));
CPPUNIT_ASSERT(nWidthBefore != nWidthAfter);
diff --git a/test/source/text/baseindex.cxx b/test/source/text/baseindex.cxx
index 79ec57270af5..683a24221bb8 100644
--- a/test/source/text/baseindex.cxx
+++ b/test/source/text/baseindex.cxx
@@ -76,7 +76,7 @@ void BaseIndex::testBaseIndexProperties()
CPPUNIT_ASSERT(xBaseIndex->getPropertyValue(name) >>= xGetTextColumns);
xGetTextColumns->setColumnCount(xGetTextColumns->getColumnCount() + 1);
- xBaseIndex->setPropertyValue(name, css::uno::makeAny(xGetTextColumns));
+ xBaseIndex->setPropertyValue(name, css::uno::Any(xGetTextColumns));
css::uno::Reference<css::text::XTextColumns> xSetTextColumns;
CPPUNIT_ASSERT(xBaseIndex->getPropertyValue(name) >>= xSetTextColumns);
@@ -108,7 +108,7 @@ void BaseIndex::testBaseIndexProperties()
CPPUNIT_ASSERT(xBaseIndex->getPropertyValue("BackGraphic") >>= xGraphic);
CPPUNIT_ASSERT(!xGraphic.is());
- xBaseIndex->setPropertyValue(name, css::uno::makeAny(aTempFile.GetURL()));
+ xBaseIndex->setPropertyValue(name, css::uno::Any(aTempFile.GetURL()));
CPPUNIT_ASSERT(xBaseIndex->getPropertyValue("BackGraphic") >>= xGraphic);
CPPUNIT_ASSERT(xGraphic.is());
diff --git a/test/source/text/textcontent.cxx b/test/source/text/textcontent.cxx
index 132981b2ac65..61990d869f97 100644
--- a/test/source/text/textcontent.cxx
+++ b/test/source/text/textcontent.cxx
@@ -32,7 +32,7 @@ void TextContent::testTextContentProperties()
try
{
- xPS->setPropertyValue("AnchorType", uno::makeAny(m_aNewTCAT));
+ xPS->setPropertyValue("AnchorType", uno::Any(m_aNewTCAT));
text::TextContentAnchorType aNewTCAT;
CPPUNIT_ASSERT(xPS->getPropertyValue("AnchorType") >>= aNewTCAT);
CPPUNIT_ASSERT_EQUAL(m_aNewTCAT, aNewTCAT);
@@ -52,7 +52,7 @@ void TextContent::testTextContentProperties()
try
{
- xPS->setPropertyValue("TextWrap", uno::makeAny(m_aNewWTM));
+ xPS->setPropertyValue("TextWrap", uno::Any(m_aNewWTM));
text::WrapTextMode aNewWTM;
CPPUNIT_ASSERT(xPS->getPropertyValue("TextWrap") >>= aNewWTM);
CPPUNIT_ASSERT_EQUAL(m_aNewWTM, aNewWTM);