summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/qa/unit/data/odp/fdo77027.odpbin0 -> 13229 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx35
-rw-r--r--xmloff/source/draw/ximpshap.cxx2
3 files changed, 36 insertions, 1 deletions
diff --git a/sd/qa/unit/data/odp/fdo77027.odp b/sd/qa/unit/data/odp/fdo77027.odp
new file mode 100644
index 000000000000..4d834d4683c7
--- /dev/null
+++ b/sd/qa/unit/data/odp/fdo77027.odp
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 073169a891a0..c0897d59245b 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -26,6 +26,8 @@
#include <svx/svdoashp.hxx>
#include <svx/svdogrp.hxx>
#include <svx/svdomedia.hxx>
+#include <svx/svdoole2.hxx>
+#include <svx/xflclit.hxx>
#include <animations/animationnodehelper.hxx>
#include <com/sun/star/drawing/XDrawPage.hpp>
@@ -63,6 +65,7 @@ public:
void testN821567();
void testFdo68594();
void testFdo72998();
+ void testFdo77027();
void testStrictOOXML();
void testN862510_1();
void testN862510_2();
@@ -86,6 +89,7 @@ public:
CPPUNIT_TEST(testN821567);
CPPUNIT_TEST(testFdo68594);
CPPUNIT_TEST(testFdo72998);
+ CPPUNIT_TEST(testFdo77027);
CPPUNIT_TEST(testStrictOOXML);
CPPUNIT_TEST(testN862510_1);
CPPUNIT_TEST(testN862510_2);
@@ -549,6 +553,37 @@ void SdFiltersTest::testFdo72998()
xDocShRef->DoClose();
}
+// FIXME copypasta
+std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
+{
+ rStrm << "Color: R:" << rColor.GetRed() << " G:" << rColor.GetGreen() << " B: << rColor.GetBlue()";
+ return rStrm;
+}
+
+void SdFiltersTest::testFdo77027()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/odp/fdo77027.odp"));
+
+ SdDrawDocument *pDoc = xDocShRef->GetDoc();
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ const SdrPage *pPage = pDoc->GetPage(1);
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ {
+ SdrOle2Obj *const pObj = dynamic_cast<SdrOle2Obj*>(pPage->GetObj(0));
+ CPPUNIT_ASSERT(pObj);
+
+ // check that the fill style/color was actually imported
+ const XFillStyleItem& rStyleItem = dynamic_cast<const XFillStyleItem&>(
+ pObj->GetMergedItem(XATTR_FILLSTYLE));
+ CPPUNIT_ASSERT_EQUAL(XFILL_SOLID, rStyleItem.GetValue());
+ const XFillColorItem& rColorItem = dynamic_cast<const XFillColorItem&>(
+ pObj->GetMergedItem(XATTR_FILLCOLOR));
+ CPPUNIT_ASSERT_EQUAL(Color(0xff6600), rColorItem.GetColorValue());
+ }
+
+ xDocShRef->DoClose();
+}
+
void SdFiltersTest::testFdo64512()
{
::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/fdo64512.odp"));
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index ce27251c3429..a3fd8bb5a974 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -2772,7 +2772,7 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen
void SdXMLObjectShapeContext::EndElement()
{
if (GetImport().isGeneratorVersionOlderThan(
- SvXMLImport::OOo_34x, SvXMLImport::LO_4x))
+ SvXMLImport::OOo_34x, SvXMLImport::LO_41x)) // < LO 4.0
{
// #i118485#
// If it's an old file from us written before OOo3.4, we need to correct