diff options
author | Jens Carl <j.carl43@gmx.de> | 2019-01-25 17:41:27 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2019-01-25 21:52:05 +0100 |
commit | 7422d394812958a2014615b996df0378cc7d495f (patch) | |
tree | 5f24fc07bbc85dec75dc74f8c96b305ed12c8bca /test | |
parent | 79b04f8b02268399fd5388227e947d547366a4e5 (diff) |
tdf#45904 Move XPropertySet Java tests to C++
Move XPropertySet Java tests to C++ for ScSpreadsheetSettings.
Change-Id: Id969a566fcb4e544c26a4097e0f49a01bc967ad7
Reviewed-on: https://gerrit.libreoffice.org/66926
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'test')
-rw-r--r-- | test/source/beans/xpropertyset.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/source/beans/xpropertyset.cxx b/test/source/beans/xpropertyset.cxx index b67c485a17a7..993b609ec4b4 100644 --- a/test/source/beans/xpropertyset.cxx +++ b/test/source/beans/xpropertyset.cxx @@ -171,6 +171,10 @@ void XPropertySet::testGetPropertyValue() bool XPropertySet::isPropertyValueChangeable(const OUString& rName) { + bool bIgnore = isPropertyIgnored(rName); + if (bIgnore) + return false; + uno::Reference<beans::XPropertySet> xPropSet(init(), UNO_QUERY_THROW); try { @@ -193,7 +197,7 @@ bool XPropertySet::isPropertyValueChangeable(const OUString& rName) { // 16-bit integer sal_Int16 nOld = any.get<sal_Int16>(); - sal_Int16 nNew = nOld + 2; + sal_Int16 nNew = nOld + 1; xPropSet->setPropertyValue(rName, makeAny(nNew)); } else if (type == cppu::UnoType<sal_Int32>::get()) @@ -240,14 +244,10 @@ bool XPropertySet::isPropertyValueChangeable(const OUString& rName) } else { - bool bIgnore = isPropertyIgnored(rName); - if (bIgnore) - return false; - std::cout << type.getTypeName() << std::endl; std::cout << rName << std::endl; - CPPUNIT_ASSERT_MESSAGE("XPropertySet::isChangeable: unknown type in Any tested.", - false); + CPPUNIT_ASSERT_MESSAGE( + "XPropertySet::isPropertyValueChangeable: unknown type in Any tested.", false); } uno::Any anyTest = xPropSet->getPropertyValue(rName); @@ -255,9 +255,9 @@ bool XPropertySet::isPropertyValueChangeable(const OUString& rName) } catch (const uno::Exception&) { - CPPUNIT_ASSERT_MESSAGE( - "XPropertySet::isChangeable: exception thrown while retrieving the property value.", - false); + CPPUNIT_ASSERT_MESSAGE("XPropertySet::isPropertyValueChangeable: exception thrown while " + "retrieving the property value.", + false); } return false; |