diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-01-06 21:59:21 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-01-10 20:11:21 +0100 |
commit | 4631c5d4c129b826df1cc29af1a558149b823667 (patch) | |
tree | 202dbb3ff7016f25360d9488f1860cd198f8f091 /test | |
parent | 647ad220295e16e05333e4eb801e1c8eac2d77f9 (diff) |
DocumentSettings Writer UNO API test (converted from Java test)
Change-Id: Id9a691b1aae62f37ef7f865c5ed015b7c6a13976
Reviewed-on: https://gerrit.libreoffice.org/65909
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/source/unoapi_property_testers.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/source/unoapi_property_testers.cxx b/test/source/unoapi_property_testers.cxx index 75eed2c9a70b..823972d25afd 100644 --- a/test/source/unoapi_property_testers.cxx +++ b/test/source/unoapi_property_testers.cxx @@ -127,6 +127,19 @@ void testLongProperty(uno::Reference<beans::XPropertySet> const& xPropertySet, c CPPUNIT_ASSERT_EQUAL_MESSAGE(msgSet.getStr(), nValue, nPropertySet); } +void testLongOptionalProperty(uno::Reference<beans::XPropertySet> const& xPropertySet, + const OUString& rName, const sal_Int32& rValue) +{ + try + { + testLongProperty(xPropertySet, rName, rValue); + } + catch (const css::beans::UnknownPropertyException& /*ex*/) + { + // ignore if the property is unknown as it is optional + } +} + void testLongReadonlyProperty(uno::Reference<beans::XPropertySet> const& xPropertySet, const OUString& name, const sal_Int32& nValue) { @@ -166,6 +179,19 @@ void testShortProperty(uno::Reference<beans::XPropertySet> const& xPropertySet, CPPUNIT_ASSERT_EQUAL_MESSAGE(msgSet.getStr(), nValue, nPropertySet); } +void testShortOptionalProperty(uno::Reference<beans::XPropertySet> const& xPropertySet, + const OUString& rName, const sal_Int16& rValue) +{ + try + { + testShortProperty(xPropertySet, rName, rValue); + } + catch (const css::beans::UnknownPropertyException& /*ex*/) + { + // ignore if the property is unknown as it is optional + } +} + void testShortReadonlyProperty(uno::Reference<beans::XPropertySet> const& xPropertySet, const OUString& name, const sal_Int16& nValue) { |