tdf#45904 Move XPropertySet Java tests to C++

Move XPropertySet Java tests to C++ for ScStyleObj.

Change-Id: Ic4f2d69d0b569de9fe99c8af41370b0699f2ab1b
Reviewed-on: https://gerrit.libreoffice.org/81556
Tested-by: Jenkins
Reviewed-by: Jens Carl <[email protected]>
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScStyleObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScStyleObj.csv
index fbcfe7e..30c529f 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScStyleObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScStyleObj.csv
@@ -12,13 +12,6 @@
"ScStyleObj";"com::sun::star::style::Style";"FollowStyle#optional"
"ScStyleObj";"com::sun::star::style::Style";"DisplayName#optional"
"ScStyleObj";"com::sun::star::style::Style";"IsAutoUpdate#optional"
"ScStyleObj";"com::sun::star::beans::XPropertySet";"getPropertySetInfo()"
"ScStyleObj";"com::sun::star::beans::XPropertySet";"setPropertyValue()"
"ScStyleObj";"com::sun::star::beans::XPropertySet";"getPropertyValue()"
"ScStyleObj";"com::sun::star::beans::XPropertySet";"addPropertyChangeListener()"
"ScStyleObj";"com::sun::star::beans::XPropertySet";"removePropertyChangeListener()"
"ScStyleObj";"com::sun::star::beans::XPropertySet";"addVetoableChangeListener()"
"ScStyleObj";"com::sun::star::beans::XPropertySet";"removeVetoableChangeListener()"
"ScStyleObj";"com::sun::star::beans::XMultiPropertyStates#optional";"getPropertyStates()"
"ScStyleObj";"com::sun::star::beans::XMultiPropertyStates#optional";"setAllPropertiesToDefault()"
"ScStyleObj";"com::sun::star::beans::XMultiPropertyStates#optional";"setPropertiesToDefault()"
diff --git a/sc/qa/extras/scstyleobj.cxx b/sc/qa/extras/scstyleobj.cxx
index a292438..3ba41df 100644
--- a/sc/qa/extras/scstyleobj.cxx
+++ b/sc/qa/extras/scstyleobj.cxx
@@ -8,6 +8,7 @@
 */

#include <test/calc_unoapi_test.hxx>
#include <test/beans/xpropertyset.hxx>
#include <test/container/xnamed.hxx>

#include <com/sun/star/beans/XPropertySet.hpp>
@@ -30,7 +31,7 @@ using namespace css;

namespace sc_apitest
{
class ScStyleObj : public CalcUnoApiTest, public apitest::XNamed
class ScStyleObj : public CalcUnoApiTest, public apitest::XNamed, public apitest::XPropertySet
{
public:
    ScStyleObj();
@@ -46,6 +47,13 @@ public:
    CPPUNIT_TEST(testGetName);
    CPPUNIT_TEST(testSetName);

    // XPropertySet
    CPPUNIT_TEST(testGetPropertySetInfo);
    CPPUNIT_TEST(testGetPropertyValue);
    CPPUNIT_TEST(testSetPropertyValue);
    CPPUNIT_TEST(testPropertyChangeListener);
    CPPUNIT_TEST(testVetoableChangeListener);

    CPPUNIT_TEST_SUITE_END();

private:
@@ -55,6 +63,15 @@ private:
ScStyleObj::ScStyleObj()
    : CalcUnoApiTest("/sc/qa/extras/testdocuments")
    , XNamed("ScStyleObj")
    , XPropertySet({
          "BottomBorder",          "BottomBorder2",     "CellProtection", "CharLocale",
          "CharLocaleAsian",       "CharLocaleComplex", "CharPosture",    "CharPostureAsian",
          "CharPostureComplex",    "DiagonalBLTR",      "DiagonalBLTR2",  "DiagonalTLBR",
          "DiagonalTLBR2",         "HoriJustify",       "LeftBorder",     "LeftBorder2",
          "NumberFormat",          "Orientation",       "RightBorder",    "RightBorder2",
          "ShadowFormat",          "TableBorder",       "TopBorder",      "TopBorder2",
          "UserDefinedAttributes",
      })
{
}