[Libreoffice-commits] .: sw/qa

Michael Stahl mst at kemper.freedesktop.org
Wed Aug 15 07:29:06 PDT 2012


 dev/null                                      |binary
 sw/qa/extras/inc/bordertest.hxx               |  190 -------------------------
 sw/qa/extras/odfimport/data/borders_ooo33.odt |binary
 sw/qa/extras/odfimport/odfimport.cxx          |  197 ++++++++++++++++++++++++++
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx      |    9 -
 5 files changed, 197 insertions(+), 199 deletions(-)

New commits:
commit 6736ad3847a5667bbfbde7b891d324b97d7e331e
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Wed Aug 15 16:06:56 2012 +0200

    moved my border test to odfimport
    
    Change-Id: Iafab67a2e1f75f754be99a98f8e573ad07847463

diff --git a/sw/qa/extras/inc/bordertest.hxx b/sw/qa/extras/inc/bordertest.hxx
index 030fcc7..3ac7c6e 100644
--- a/sw/qa/extras/inc/bordertest.hxx
+++ b/sw/qa/extras/inc/bordertest.hxx
@@ -38,9 +38,6 @@ using rtl::OUString;
 typedef std::map<rtl::OUString, com::sun::star::table::BorderLine> BorderLineMap;
 typedef std::pair<rtl::OUString, com::sun::star::table::BorderLine> StringBorderPair;
 
-typedef std::map<rtl::OUString, com::sun::star::uno::Sequence< com::sun::star::table::BorderLine> > AllBordersMap;
-typedef std::pair<rtl::OUString, com::sun::star::uno::Sequence< com::sun::star::table::BorderLine> > StringSequencePair;
-
 using namespace com::sun::star;
 
 class BorderTest
@@ -187,192 +184,5 @@ public:
     } while(xParaEnum->hasMoreElements());
     }
 
-    void testOdtBorders(uno::Reference<lang::XComponent> mxComponent)
-    {
-        AllBordersMap map;
-        uno::Sequence< table::BorderLine > tempSequence(4);
-
-        tempSequence[0] = table::BorderLine(0, 2, 2, 35);   // left
-        tempSequence[1] = table::BorderLine(0, 2, 2, 35);   // right
-        tempSequence[2] = table::BorderLine(0, 2, 2, 35);   // top
-        tempSequence[3] = table::BorderLine(0, 2, 2, 35);   // bottom
-        map.insert(StringSequencePair(OUString("B2"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 0, 2, 0);
-        tempSequence[1] = table::BorderLine(0, 0, 2, 0);
-        tempSequence[2] = table::BorderLine(0, 0, 2, 0);
-        tempSequence[3] = table::BorderLine(0, 0, 2, 0);
-        map.insert(StringSequencePair(OUString("D2"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 2, 2, 88);
-        tempSequence[1] = table::BorderLine(0, 2, 2, 88);
-        tempSequence[2] = table::BorderLine(0, 2, 2, 88);
-        tempSequence[3] = table::BorderLine(0, 2, 2, 88);
-        map.insert(StringSequencePair(OUString("B4"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 0, 18, 0);
-        tempSequence[1] = table::BorderLine(0, 0, 18, 0);
-        tempSequence[2] = table::BorderLine(0, 0, 18, 0);
-        tempSequence[3] = table::BorderLine(0, 0, 18, 0);
-        map.insert(StringSequencePair(OUString("D4"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 35, 35, 35);
-        tempSequence[1] = table::BorderLine(0, 35, 35, 35);
-        tempSequence[2] = table::BorderLine(0, 35, 35, 35);
-        tempSequence[3] = table::BorderLine(0, 35, 35, 35);
-        map.insert(StringSequencePair(OUString("B6"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 0, 35, 0);
-        tempSequence[1] = table::BorderLine(0, 0, 35, 0);
-        tempSequence[2] = table::BorderLine(0, 0, 35, 0);
-        tempSequence[3] = table::BorderLine(0, 0, 35, 0);
-        map.insert(StringSequencePair(OUString("D6"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 88, 88, 88);
-        tempSequence[1] = table::BorderLine(0, 88, 88, 88);
-        tempSequence[2] = table::BorderLine(0, 88, 88, 88);
-        tempSequence[3] = table::BorderLine(0, 88, 88, 88);
-        map.insert(StringSequencePair(OUString("B8"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 0, 88, 0);
-        tempSequence[1] = table::BorderLine(0, 0, 88, 0);
-        tempSequence[2] = table::BorderLine(0, 0, 88, 0);
-        tempSequence[3] = table::BorderLine(0, 0, 88, 0);
-        map.insert(StringSequencePair(OUString("D8"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 2, 35, 88);
-        tempSequence[1] = table::BorderLine(0, 2, 35, 88);
-        tempSequence[2] = table::BorderLine(0, 2, 35, 88);
-        tempSequence[3] = table::BorderLine(0, 2, 35, 88);
-        map.insert(StringSequencePair(OUString("B10"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 0, 141, 0);
-        tempSequence[1] = table::BorderLine(0, 0, 141, 0);
-        tempSequence[2] = table::BorderLine(0, 0, 141, 0);
-        tempSequence[3] = table::BorderLine(0, 0, 141, 0);
-        map.insert(StringSequencePair(OUString("D10"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 2, 88, 88);
-        tempSequence[1] = table::BorderLine(0, 2, 88, 88);
-        tempSequence[2] = table::BorderLine(0, 2, 88, 88);
-        tempSequence[3] = table::BorderLine(0, 2, 88, 88);
-        map.insert(StringSequencePair(OUString("B12"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 0, 176, 0);
-        tempSequence[1] = table::BorderLine(0, 0, 176, 0);
-        tempSequence[2] = table::BorderLine(0, 0, 176, 0);
-        tempSequence[3] = table::BorderLine(0, 0, 176, 0);
-        map.insert(StringSequencePair(OUString("D12"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 2, 141, 88);
-        tempSequence[1] = table::BorderLine(0, 2, 141, 88);
-        tempSequence[2] = table::BorderLine(0, 2, 141, 88);
-        tempSequence[3] = table::BorderLine(0, 2, 141, 88);
-        map.insert(StringSequencePair(OUString("B14"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 35, 88, 88);
-        tempSequence[1] = table::BorderLine(0, 35, 88, 88);
-        tempSequence[2] = table::BorderLine(0, 35, 88, 88);
-        tempSequence[3] = table::BorderLine(0, 35, 88, 88);
-        map.insert(StringSequencePair(OUString("B16"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 88, 35, 35);
-        tempSequence[1] = table::BorderLine(0, 88, 35, 35);
-        tempSequence[2] = table::BorderLine(0, 88, 35, 35);
-        tempSequence[3] = table::BorderLine(0, 88, 35, 35);
-        map.insert(StringSequencePair(OUString("B18"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 88, 141, 88);
-        tempSequence[1] = table::BorderLine(0, 88, 141, 88);
-        tempSequence[2] = table::BorderLine(0, 88, 141, 88);
-        tempSequence[3] = table::BorderLine(0, 88, 141, 88);
-        map.insert(StringSequencePair(OUString("B20"), tempSequence));
-        tempSequence[0] = table::BorderLine(0, 141, 88, 88);
-        tempSequence[1] = table::BorderLine(0, 141, 88, 88);
-        tempSequence[2] = table::BorderLine(0, 141, 88, 88);
-        tempSequence[3] = table::BorderLine(0, 141, 88, 88);
-        map.insert(StringSequencePair(OUString("B22"), tempSequence));
-
-        uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
-        uno::Reference<container::XEnumerationAccess> xParaEnumAccess(textDocument->getText(), uno::UNO_QUERY);
-        // list of paragraphs
-        uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
-        do
-        {
-            uno::Reference<lang::XServiceInfo> xServiceInfo;
-            if (xParaEnum->nextElement() >>= xServiceInfo)
-            {
-                if (xServiceInfo->supportsService("com.sun.star.text.TextTable"))
-                {
-                    uno::Reference<text::XTextTable> const xTextTable(xServiceInfo, uno::UNO_QUERY_THROW);
-                    uno::Sequence<rtl::OUString> const cells = xTextTable->getCellNames();
-                    uno::Sequence< uno::Sequence< sal_Int32 > > borderWidthSequence;
-                    sal_Int32 nLength = cells.getLength();
-
-                    AllBordersMap::iterator it;
-                    it = map.begin();
-
-                    for (sal_Int32 i = 0; i < nLength; ++i)
-                    {
-                    if(i%10==6 || (i%10==8 && i<60))    // only B and D cells have borders, every 2 rows
-                    {
-                        uno::Reference<table::XCell> xCell = xTextTable->getCellByName(cells[i]);
-                        uno::Reference< beans::XPropertySet > xPropSet(xCell, uno::UNO_QUERY_THROW);
-                        it = map.find(cells[i]);
-
-                        uno::Any aLeftBorder = xPropSet->getPropertyValue("LeftBorder");
-                        table::BorderLine aLeftBorderLine;
-                        if (aLeftBorder >>= aLeftBorderLine)
-                        {
-                            sal_Int32 innerLineWidth = aLeftBorderLine.InnerLineWidth;
-                            sal_Int32 outerLineWidth = aLeftBorderLine.OuterLineWidth;
-                            sal_Int32 lineDistance = aLeftBorderLine.LineDistance;
-
-                            sal_Int32 perfectInner = it->second[0].InnerLineWidth;
-                            sal_Int32 perfectOuter = it->second[0].OuterLineWidth;
-                            sal_Int32 perfectDistance = it->second[0].LineDistance;
-                            CPPUNIT_ASSERT_EQUAL(perfectInner, innerLineWidth);
-                            CPPUNIT_ASSERT_EQUAL(perfectOuter, outerLineWidth);
-                            CPPUNIT_ASSERT_EQUAL(perfectDistance, lineDistance);
-                        }
-
-                        uno::Any aRightBorder = xPropSet->getPropertyValue("RightBorder");
-                        table::BorderLine aRightBorderLine;
-                        if (aRightBorder >>= aRightBorderLine)
-                        {
-                            sal_Int32 innerLineWidth = aRightBorderLine.InnerLineWidth;
-                            sal_Int32 outerLineWidth = aRightBorderLine.OuterLineWidth;
-                            sal_Int32 lineDistance = aRightBorderLine.LineDistance;
-
-                            sal_Int32 perfectInner = it->second[1].InnerLineWidth;
-                            sal_Int32 perfectOuter = it->second[1].OuterLineWidth;
-                            sal_Int32 perfectDistance = it->second[1].LineDistance;
-                            CPPUNIT_ASSERT_EQUAL(perfectInner, innerLineWidth);
-                            CPPUNIT_ASSERT_EQUAL(perfectOuter, outerLineWidth);
-                            CPPUNIT_ASSERT_EQUAL(perfectDistance, lineDistance);
-                        }
-
-                        uno::Any aTopBorder = xPropSet->getPropertyValue("TopBorder");
-                        table::BorderLine aTopBorderLine;
-                        if (aTopBorder >>= aTopBorderLine)
-                        {
-                            sal_Int32 innerLineWidth = aTopBorderLine.InnerLineWidth;
-                            sal_Int32 outerLineWidth = aTopBorderLine.OuterLineWidth;
-                            sal_Int32 lineDistance = aTopBorderLine.LineDistance;
-
-                            sal_Int32 perfectInner = it->second[2].InnerLineWidth;
-                            sal_Int32 perfectOuter = it->second[2].OuterLineWidth;
-                            sal_Int32 perfectDistance = it->second[2].LineDistance;
-                            CPPUNIT_ASSERT_EQUAL(perfectInner, innerLineWidth);
-                            CPPUNIT_ASSERT_EQUAL(perfectOuter, outerLineWidth);
-                            CPPUNIT_ASSERT_EQUAL(perfectDistance, lineDistance);
-                        }
-
-                        uno::Any aBottomBorder = xPropSet->getPropertyValue("BottomBorder");
-                        table::BorderLine aBottomBorderLine;
-                        if (aBottomBorder >>= aBottomBorderLine)
-                        {
-                            sal_Int32 innerLineWidth = aBottomBorderLine.InnerLineWidth;
-                            sal_Int32 outerLineWidth = aBottomBorderLine.OuterLineWidth;
-                            sal_Int32 lineDistance = aBottomBorderLine.LineDistance;
-
-                            sal_Int32 perfectInner = it->second[3].InnerLineWidth;
-                            sal_Int32 perfectOuter = it->second[3].OuterLineWidth;
-                            sal_Int32 perfectDistance = it->second[3].LineDistance;
-                            CPPUNIT_ASSERT_EQUAL(perfectInner, innerLineWidth);
-                            CPPUNIT_ASSERT_EQUAL(perfectOuter, outerLineWidth);
-                            CPPUNIT_ASSERT_EQUAL(perfectDistance, lineDistance);
-                        }
-                    }
-                    }   //end of the 'for' loop
-                }
-            }
-        } while(xParaEnum->hasMoreElements());
-    }
 };
 #endif
diff --git a/sw/qa/extras/odfimport/data/borders_ooo33.odt b/sw/qa/extras/odfimport/data/borders_ooo33.odt
new file mode 100644
index 0000000..b4ba916
Binary files /dev/null and b/sw/qa/extras/odfimport/data/borders_ooo33.odt differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index ef51e31..daf82cc 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -26,6 +26,12 @@
  */
 
 #include "../swmodeltestbase.hxx"
+#include <com/sun/star/table/XCell.hpp>
+#include <com/sun/star/table/BorderLine.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+
+typedef std::map<rtl::OUString, com::sun::star::uno::Sequence< com::sun::star::table::BorderLine> > AllBordersMap;
+typedef std::pair<rtl::OUString, com::sun::star::uno::Sequence< com::sun::star::table::BorderLine> > StringSequencePair;
 
 using rtl::OUString;
 
@@ -34,11 +40,13 @@ class Test : public SwModelTestBase
 public:
     void testEmptySvgFamilyName();
     void testHideAllSections();
+    void testOdtBorders();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
     CPPUNIT_TEST(testEmptySvgFamilyName);
     CPPUNIT_TEST(testHideAllSections);
+    CPPUNIT_TEST(testOdtBorders);
 #endif
     CPPUNIT_TEST_SUITE_END();
 
@@ -71,6 +79,195 @@ void Test::testHideAllSections()
     uno::Reference<util::XRefreshable>(xTextFieldsSupplier->getTextFields(), uno::UNO_QUERY)->refresh();
 }
 
+void Test::testOdtBorders()
+{
+    load("borders_ooo33.odt");
+    AllBordersMap map;
+    uno::Sequence< table::BorderLine > tempSequence(4);
+
+    tempSequence[0] = table::BorderLine(0, 2, 2, 35);   // left
+    tempSequence[1] = table::BorderLine(0, 2, 2, 35);   // right
+    tempSequence[2] = table::BorderLine(0, 2, 2, 35);   // top
+    tempSequence[3] = table::BorderLine(0, 2, 2, 35);   // bottom
+    map.insert(StringSequencePair(OUString("B2"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 0, 2, 0);
+    tempSequence[1] = table::BorderLine(0, 0, 2, 0);
+    tempSequence[2] = table::BorderLine(0, 0, 2, 0);
+    tempSequence[3] = table::BorderLine(0, 0, 2, 0);
+    map.insert(StringSequencePair(OUString("D2"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 2, 2, 88);
+    tempSequence[1] = table::BorderLine(0, 2, 2, 88);
+    tempSequence[2] = table::BorderLine(0, 2, 2, 88);
+    tempSequence[3] = table::BorderLine(0, 2, 2, 88);
+    map.insert(StringSequencePair(OUString("B4"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 0, 18, 0);
+    tempSequence[1] = table::BorderLine(0, 0, 18, 0);
+    tempSequence[2] = table::BorderLine(0, 0, 18, 0);
+    tempSequence[3] = table::BorderLine(0, 0, 18, 0);
+    map.insert(StringSequencePair(OUString("D4"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 35, 35, 35);
+    tempSequence[1] = table::BorderLine(0, 35, 35, 35);
+    tempSequence[2] = table::BorderLine(0, 35, 35, 35);
+    tempSequence[3] = table::BorderLine(0, 35, 35, 35);
+    map.insert(StringSequencePair(OUString("B6"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 0, 35, 0);
+    tempSequence[1] = table::BorderLine(0, 0, 35, 0);
+    tempSequence[2] = table::BorderLine(0, 0, 35, 0);
+    tempSequence[3] = table::BorderLine(0, 0, 35, 0);
+    map.insert(StringSequencePair(OUString("D6"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 88, 88, 88);
+    tempSequence[1] = table::BorderLine(0, 88, 88, 88);
+    tempSequence[2] = table::BorderLine(0, 88, 88, 88);
+    tempSequence[3] = table::BorderLine(0, 88, 88, 88);
+    map.insert(StringSequencePair(OUString("B8"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 0, 88, 0);
+    tempSequence[1] = table::BorderLine(0, 0, 88, 0);
+    tempSequence[2] = table::BorderLine(0, 0, 88, 0);
+    tempSequence[3] = table::BorderLine(0, 0, 88, 0);
+    map.insert(StringSequencePair(OUString("D8"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 2, 35, 88);
+    tempSequence[1] = table::BorderLine(0, 2, 35, 88);
+    tempSequence[2] = table::BorderLine(0, 2, 35, 88);
+    tempSequence[3] = table::BorderLine(0, 2, 35, 88);
+    map.insert(StringSequencePair(OUString("B10"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 0, 141, 0);
+    tempSequence[1] = table::BorderLine(0, 0, 141, 0);
+    tempSequence[2] = table::BorderLine(0, 0, 141, 0);
+    tempSequence[3] = table::BorderLine(0, 0, 141, 0);
+    map.insert(StringSequencePair(OUString("D10"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 2, 88, 88);
+    tempSequence[1] = table::BorderLine(0, 2, 88, 88);
+    tempSequence[2] = table::BorderLine(0, 2, 88, 88);
+    tempSequence[3] = table::BorderLine(0, 2, 88, 88);
+    map.insert(StringSequencePair(OUString("B12"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 0, 176, 0);
+    tempSequence[1] = table::BorderLine(0, 0, 176, 0);
+    tempSequence[2] = table::BorderLine(0, 0, 176, 0);
+    tempSequence[3] = table::BorderLine(0, 0, 176, 0);
+    map.insert(StringSequencePair(OUString("D12"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 2, 141, 88);
+    tempSequence[1] = table::BorderLine(0, 2, 141, 88);
+    tempSequence[2] = table::BorderLine(0, 2, 141, 88);
+    tempSequence[3] = table::BorderLine(0, 2, 141, 88);
+    map.insert(StringSequencePair(OUString("B14"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 35, 88, 88);
+    tempSequence[1] = table::BorderLine(0, 35, 88, 88);
+    tempSequence[2] = table::BorderLine(0, 35, 88, 88);
+    tempSequence[3] = table::BorderLine(0, 35, 88, 88);
+    map.insert(StringSequencePair(OUString("B16"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 88, 35, 35);
+    tempSequence[1] = table::BorderLine(0, 88, 35, 35);
+    tempSequence[2] = table::BorderLine(0, 88, 35, 35);
+    tempSequence[3] = table::BorderLine(0, 88, 35, 35);
+    map.insert(StringSequencePair(OUString("B18"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 88, 141, 88);
+    tempSequence[1] = table::BorderLine(0, 88, 141, 88);
+    tempSequence[2] = table::BorderLine(0, 88, 141, 88);
+    tempSequence[3] = table::BorderLine(0, 88, 141, 88);
+    map.insert(StringSequencePair(OUString("B20"), tempSequence));
+    tempSequence[0] = table::BorderLine(0, 141, 88, 88);
+    tempSequence[1] = table::BorderLine(0, 141, 88, 88);
+    tempSequence[2] = table::BorderLine(0, 141, 88, 88);
+    tempSequence[3] = table::BorderLine(0, 141, 88, 88);
+    map.insert(StringSequencePair(OUString("B22"), tempSequence));
+
+    uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
+    uno::Reference<container::XEnumerationAccess> xParaEnumAccess(textDocument->getText(), uno::UNO_QUERY);
+    // list of paragraphs
+    uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+    do
+    {
+        uno::Reference<lang::XServiceInfo> xServiceInfo;
+        if (xParaEnum->nextElement() >>= xServiceInfo)
+        {
+            if (xServiceInfo->supportsService("com.sun.star.text.TextTable"))
+            {
+                uno::Reference<text::XTextTable> const xTextTable(xServiceInfo, uno::UNO_QUERY_THROW);
+                uno::Sequence<rtl::OUString> const cells = xTextTable->getCellNames();
+                uno::Sequence< uno::Sequence< sal_Int32 > > borderWidthSequence;
+                sal_Int32 nLength = cells.getLength();
+
+                AllBordersMap::iterator it;
+                it = map.begin();
+
+                for (sal_Int32 i = 0; i < nLength; ++i)
+                {
+                    if(i%10==6 || (i%10==8 && i<60))    // only B and D cells have borders, every 2 rows
+                    {
+                        uno::Reference<table::XCell> xCell = xTextTable->getCellByName(cells[i]);
+                        uno::Reference< beans::XPropertySet > xPropSet(xCell, uno::UNO_QUERY_THROW);
+                        it = map.find(cells[i]);
+
+                        uno::Any aLeftBorder = xPropSet->getPropertyValue("LeftBorder");
+                        table::BorderLine aLeftBorderLine;
+                        if (aLeftBorder >>= aLeftBorderLine)
+                        {
+                            sal_Int32 innerLineWidth = aLeftBorderLine.InnerLineWidth;
+                            sal_Int32 outerLineWidth = aLeftBorderLine.OuterLineWidth;
+                            sal_Int32 lineDistance = aLeftBorderLine.LineDistance;
+
+                            sal_Int32 perfectInner = it->second[0].InnerLineWidth;
+                            sal_Int32 perfectOuter = it->second[0].OuterLineWidth;
+                            sal_Int32 perfectDistance = it->second[0].LineDistance;
+                            CPPUNIT_ASSERT_EQUAL(perfectInner, innerLineWidth);
+                            CPPUNIT_ASSERT_EQUAL(perfectOuter, outerLineWidth);
+                            CPPUNIT_ASSERT_EQUAL(perfectDistance, lineDistance);
+                        }
+
+                        uno::Any aRightBorder = xPropSet->getPropertyValue("RightBorder");
+                        table::BorderLine aRightBorderLine;
+                        if (aRightBorder >>= aRightBorderLine)
+                        {
+                            sal_Int32 innerLineWidth = aRightBorderLine.InnerLineWidth;
+                            sal_Int32 outerLineWidth = aRightBorderLine.OuterLineWidth;
+                            sal_Int32 lineDistance = aRightBorderLine.LineDistance;
+
+                            sal_Int32 perfectInner = it->second[1].InnerLineWidth;
+                            sal_Int32 perfectOuter = it->second[1].OuterLineWidth;
+                            sal_Int32 perfectDistance = it->second[1].LineDistance;
+                            CPPUNIT_ASSERT_EQUAL(perfectInner, innerLineWidth);
+                            CPPUNIT_ASSERT_EQUAL(perfectOuter, outerLineWidth);
+                            CPPUNIT_ASSERT_EQUAL(perfectDistance, lineDistance);
+                        }
+
+                        uno::Any aTopBorder = xPropSet->getPropertyValue("TopBorder");
+                        table::BorderLine aTopBorderLine;
+                        if (aTopBorder >>= aTopBorderLine)
+                        {
+                            sal_Int32 innerLineWidth = aTopBorderLine.InnerLineWidth;
+                            sal_Int32 outerLineWidth = aTopBorderLine.OuterLineWidth;
+                            sal_Int32 lineDistance = aTopBorderLine.LineDistance;
+
+                            sal_Int32 perfectInner = it->second[2].InnerLineWidth;
+                            sal_Int32 perfectOuter = it->second[2].OuterLineWidth;
+                            sal_Int32 perfectDistance = it->second[2].LineDistance;
+                            CPPUNIT_ASSERT_EQUAL(perfectInner, innerLineWidth);
+                            CPPUNIT_ASSERT_EQUAL(perfectOuter, outerLineWidth);
+                            CPPUNIT_ASSERT_EQUAL(perfectDistance, lineDistance);
+                        }
+
+                        uno::Any aBottomBorder = xPropSet->getPropertyValue("BottomBorder");
+                        table::BorderLine aBottomBorderLine;
+                        if (aBottomBorder >>= aBottomBorderLine)
+                        {
+                            sal_Int32 innerLineWidth = aBottomBorderLine.InnerLineWidth;
+                            sal_Int32 outerLineWidth = aBottomBorderLine.OuterLineWidth;
+                            sal_Int32 lineDistance = aBottomBorderLine.LineDistance;
+
+                            sal_Int32 perfectInner = it->second[3].InnerLineWidth;
+                            sal_Int32 perfectOuter = it->second[3].OuterLineWidth;
+                            sal_Int32 perfectDistance = it->second[3].LineDistance;
+                            CPPUNIT_ASSERT_EQUAL(perfectInner, innerLineWidth);
+                            CPPUNIT_ASSERT_EQUAL(perfectOuter, outerLineWidth);
+                            CPPUNIT_ASSERT_EQUAL(perfectDistance, lineDistance);
+                        }
+                    }
+                }   //end of the 'for' loop
+            }
+        }
+    } while(xParaEnum->hasMoreElements());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/ooxmlimport/data/borders_ooo33.odt b/sw/qa/extras/ooxmlimport/data/borders_ooo33.odt
deleted file mode 100644
index b4ba916..0000000
Binary files a/sw/qa/extras/ooxmlimport/data/borders_ooo33.odt and /dev/null differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index e0d82ad..342f476 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -83,7 +83,6 @@ public:
     void testNumbering1();
     void testBnc773061();
     void testAllGapsWord();
-    void testBordersOoo33();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -111,7 +110,6 @@ public:
     CPPUNIT_TEST(testNumbering1);
     CPPUNIT_TEST(testBnc773061);
     CPPUNIT_TEST(testAllGapsWord);
-    CPPUNIT_TEST(testBordersOoo33);
 #endif
     CPPUNIT_TEST_SUITE_END();
 
@@ -721,13 +719,6 @@ void Test::testAllGapsWord()
     borderTest.testTheBorders(mxComponent);
 }
 
-void Test::testBordersOoo33()
-{
-    load("borders_ooo33.odt");
-    BorderTest borderTest;
-    borderTest.testOdtBorders(mxComponent);
-}
-
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();


More information about the Libreoffice-commits mailing list