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>
This commit is contained in:
parent
82b9af26a6
commit
c46d27cfe4
6 changed files with 16 additions and 16 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue