summaryrefslogtreecommitdiff
path: root/sc/qa/extras
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-12-05 21:14:20 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-12-05 23:08:25 +0100
commit27f50cecdc3c4b36dc61b05b3d8de6e69518d967 (patch)
tree97d850507a8c1b759e383ae13ebbbb5dbd962166 /sc/qa/extras
parent27fa364db8af77ddfbbce43d8fc49d318c779efb (diff)
enable sc's c++ subsequenttests related to fdo#43308
Diffstat (limited to 'sc/qa/extras')
-rw-r--r--sc/qa/extras/cellproperties.cxx13
-rw-r--r--sc/qa/extras/tableautoformatfield.cxx15
2 files changed, 12 insertions, 16 deletions
diff --git a/sc/qa/extras/cellproperties.cxx b/sc/qa/extras/cellproperties.cxx
index 20e90f4f6c83..6ed0878bf83a 100644
--- a/sc/qa/extras/cellproperties.cxx
+++ b/sc/qa/extras/cellproperties.cxx
@@ -43,9 +43,8 @@ class ScCellProperties : public UnoApiTest
void testVertJustify();
void testRotateReference();
CPPUNIT_TEST_SUITE(ScCellProperties);
- //enable as soon as fixed
- //CPPUNIT_TEST(testVertJustify);
- //CPPUNIT_TEST(testRotateReference);
+ CPPUNIT_TEST(testVertJustify);
+ CPPUNIT_TEST(testRotateReference);
CPPUNIT_TEST_SUITE_END();
};
@@ -59,12 +58,12 @@ void ScCellProperties::testVertJustify()
std::cout << "Old VertJustify value: " << aValue << std::endl;
uno::Any aNewVertJustify;
- aNewVertJustify <<= table::CellVertJustify_BOTTOM;
+ aNewVertJustify <<= static_cast<sal_Int32>(3);
xCellRangeBase->setPropertyValue(aVertJustify, aNewVertJustify);
uno::Any aVertJustifyControllValue = xCellRangeBase->getPropertyValue(aVertJustify);
CPPUNIT_ASSERT(aVertJustifyControllValue >>= aValue);
std::cout << "New VertJustify value: " << aValue << std::endl;
- CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == table::CellVertJustify_BOTTOM);
+ CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
}
void ScCellProperties::testRotateReference()
@@ -77,12 +76,12 @@ void ScCellProperties::testRotateReference()
std::cout << "Old RotateReference Value: " << aValue << std::endl;
uno::Any aNewRotateReference;
- aNewRotateReference <<= table::CellVertJustify_BOTTOM;
+ aNewRotateReference <<= static_cast<sal_Int32>(3);
xCellRangeBase->setPropertyValue(aRotateReference, aNewRotateReference);
uno::Any aRotateReferenceControllValue = xCellRangeBase->getPropertyValue(aRotateReference);
CPPUNIT_ASSERT(aRotateReferenceControllValue >>= aValue);
std::cout << "New RotateReference value: " << aValue << std::endl;
- CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == table::CellVertJustify_BOTTOM);
+ CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
}
uno::Reference< beans::XPropertySet > ScCellProperties::init()
diff --git a/sc/qa/extras/tableautoformatfield.cxx b/sc/qa/extras/tableautoformatfield.cxx
index c405c2ed0651..e53758ab200d 100644
--- a/sc/qa/extras/tableautoformatfield.cxx
+++ b/sc/qa/extras/tableautoformatfield.cxx
@@ -29,7 +29,6 @@
#include <test/unoapi_test.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/table/CellVertJustify.hpp>
#include <iostream>
@@ -43,10 +42,8 @@ public:
void testVertJustify();
CPPUNIT_TEST_SUITE(ScTableAutoFormatField);
- // both tests are broken
- // related to: 7da57d17b6179e71c8b6d7549ad89eaf3a4a28c6
- //CPPUNIT_TEST(testRotateReference);
- //CPPUNIT_TEST(testVertJustify);
+ CPPUNIT_TEST(testRotateReference);
+ CPPUNIT_TEST(testVertJustify);
CPPUNIT_TEST_SUITE_END();
};
@@ -72,12 +69,12 @@ void ScTableAutoFormatField::testRotateReference()
std::cout << "Old RotateReferene Value: " << aValue << std::endl;
uno::Any aNewRotateReference;
- aNewRotateReference <<= table::CellVertJustify_BOTTOM;
+ aNewRotateReference <<= static_cast<sal_Int32>(3);
xTableAutoFormatField->setPropertyValue(aRotateReference, aNewRotateReference);
uno::Any aRotateReferenceControllValue = xTableAutoFormatField->getPropertyValue(aRotateReference);
CPPUNIT_ASSERT(aRotateReferenceControllValue >>= aValue);
std::cout << "New VertJustify value: " << aValue << std::endl;
- CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == table::CellVertJustify_BOTTOM);
+ CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
}
void ScTableAutoFormatField::testVertJustify()
@@ -90,12 +87,12 @@ void ScTableAutoFormatField::testVertJustify()
std::cout << "Old VertJustify value: " << aValue << std::endl;
uno::Any aNewVertJustify;
- aNewVertJustify <<= table::CellVertJustify_BOTTOM;
+ aNewVertJustify <<= static_cast<sal_Int32>(3);
xTableAutoFormatField->setPropertyValue(aVertJustify, aNewVertJustify);
uno::Any aVertJustifyControllValue = xTableAutoFormatField->getPropertyValue(aVertJustify);
CPPUNIT_ASSERT(aVertJustifyControllValue >>= aValue);
std::cout << "New VertJustify value: " << aValue << std::endl;
- CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == table::CellVertJustify_BOTTOM);
+ CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTableAutoFormatField);