summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-31 12:21:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-31 11:08:00 +0000
commit82025e7f7af562549a900b9f1d76ed73fe4f2a58 (patch)
tree5f939dedec3de369c0604fd8e5e053a6d68b4442 /sd/qa
parentff1f83dd08b7b0169301ffe0a53499a27af613b9 (diff)
use actual UNO enums in sd
Change-Id: Ife2590d2d8d7622ea6fa2f03d6a333c856326d34 Reviewed-on: https://gerrit.libreoffice.org/35963 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx6
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx4
-rw-r--r--sd/qa/unit/import-tests.cxx35
-rw-r--r--sd/qa/unit/misc-tests.cxx6
4 files changed, 43 insertions, 8 deletions
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 2fc233bf836a..e7a29c25f6c4 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -507,12 +507,12 @@ void SdOOXMLExportTest1::testTableCellFillProperties()
drawing::FillStyle aFillStyle( drawing::FillStyle_NONE );
xCell.set(xTable->getCellByPosition(0, 1), uno::UNO_QUERY_THROW);
xCell->getPropertyValue("FillStyle") >>= aFillStyle;
- CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, aFillStyle);
+ CPPUNIT_ASSERT_EQUAL((int)drawing::FillStyle_BITMAP, (int)aFillStyle);
// Test Gradient fill type for cell
xCell.set(xTable->getCellByPosition(1, 0), uno::UNO_QUERY_THROW);
xCell->getPropertyValue("FillStyle") >>= aFillStyle;
- CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, aFillStyle);
+ CPPUNIT_ASSERT_EQUAL((int)drawing::FillStyle_GRADIENT, (int)aFillStyle);
xDocShRef->DoClose();
}
@@ -543,7 +543,7 @@ void SdOOXMLExportTest1::testLineStyle()
const XLineStyleItem& rStyleItem = dynamic_cast<const XLineStyleItem&>(
pShape->GetMergedItem(XATTR_LINESTYLE));
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong style",drawing::LineStyle_SOLID, rStyleItem.GetValue());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong style", (int)drawing::LineStyle_SOLID, (int)rStyleItem.GetValue());
xDocShRef->DoClose();
}
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index fa83615f268e..0e6bd2542814 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -768,12 +768,12 @@ void SdOOXMLExportTest2::testTdf105739()
// Test fill type
drawing::FillStyle aFillStyle(drawing::FillStyle_NONE);
aXBackgroundPropSet->getPropertyValue("FillStyle") >>= aFillStyle;
- CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, aFillStyle);
+ CPPUNIT_ASSERT_EQUAL((int)drawing::FillStyle_GRADIENT, (int)aFillStyle);
// Test gradient properties
com::sun::star::awt::Gradient aFillGradient;
aXBackgroundPropSet->getPropertyValue("FillGradient") >>= aFillGradient;
- CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_LINEAR, aFillGradient.Style);
+ CPPUNIT_ASSERT_EQUAL((int)awt::GradientStyle_LINEAR, (int)aFillGradient.Style);
CPPUNIT_ASSERT_EQUAL(util::Color(0xff0000), aFillGradient.StartColor);
CPPUNIT_ASSERT_EQUAL(util::Color(0x00b050), aFillGradient.EndColor);
}
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index c4dfd192dd09..f45ae187d0db 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -623,6 +623,41 @@ std::ostream& operator<<(std::ostream& rStrm, const uno::Reference<T>& xRef)
} } } }
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, LineStyle n)
+{
+ rStrm << (int) n;
+ return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+ rStrm << (int) n;
+ return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace presentation {
+
+std::ostream& operator<<(std::ostream& rStrm, ClickAction n)
+{
+ rStrm << (int) n;
+ return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace style {
+
+std::ostream& operator<<(std::ostream& rStrm, ParagraphAdjust n)
+{
+ rStrm << (int) n;
+ return rStrm;
+}
+
+} } } }
+
void SdImportTest::testTdf97808()
{
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf97808.fodp"), FODP);
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 87c6beb66ca0..014869cb0790 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -228,7 +228,7 @@ void SdMiscTest::testTdf99396TextEdit()
uno::Reference<table::XTable> xTable = pTableObject->getTable();
uno::Reference<beans::XPropertySet> xCell(xTable->getCellByPosition(0, 0), uno::UNO_QUERY);
drawing::TextVerticalAdjust eAdjust = xCell->getPropertyValue("TextVerticalAdjust").get<drawing::TextVerticalAdjust>();
- CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, eAdjust);
+ CPPUNIT_ASSERT_EQUAL((int)drawing::TextVerticalAdjust_BOTTOM, (int)eAdjust);
}
{
const EditTextObject& rEdit = pTableObject->getText(0)->GetOutlinerParaObject()->GetTextObject();
@@ -246,7 +246,7 @@ void SdMiscTest::testTdf99396TextEdit()
uno::Reference<beans::XPropertySet> xCell(xTable->getCellByPosition(0, 0), uno::UNO_QUERY);
drawing::TextVerticalAdjust eAdjust = xCell->getPropertyValue("TextVerticalAdjust").get<drawing::TextVerticalAdjust>();
// This failed: Undo() did not change it from drawing::TextVerticalAdjust_BOTTOM.
- CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_TOP, eAdjust);
+ CPPUNIT_ASSERT_EQUAL((int)drawing::TextVerticalAdjust_TOP, (int)eAdjust);
}
{
const EditTextObject& rEdit = pTableObject->getText(0)->GetOutlinerParaObject()->GetTextObject();
@@ -298,7 +298,7 @@ void SdMiscTest::testFillGradient()
drawing::FillStyle eFillStyle;
awt::Gradient aGradient2;
CPPUNIT_ASSERT(xPropSet2->getPropertyValue("FillStyle") >>= eFillStyle);
- CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT,eFillStyle);
+ CPPUNIT_ASSERT_EQUAL((int)drawing::FillStyle_GRADIENT, (int)eFillStyle);
CPPUNIT_ASSERT(xPropSet2->getPropertyValue("FillGradient") >>= aGradient2);
CPPUNIT_ASSERT_EQUAL(sal_Int32(RGB_COLORDATA(255, 0, 0)),aGradient2.StartColor);
CPPUNIT_ASSERT_EQUAL(sal_Int32(RGB_COLORDATA(0, 255, 0)),aGradient2.EndColor);