[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/filters/libmsooxml
From:       Lassi Taneli Nieminen <lassniem () gmail ! com>
Date:       2010-10-25 11:03:49
Message-ID: 20101025110349.46173AC897 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1189591 by lassin:

Fixed drawingML table bacgkround color for cases that there is no background color.


 M  +21 -5     MsooXmlDrawingReaderTableImpl.h  


--- trunk/koffice/filters/libmsooxml/MsooXmlDrawingReaderTableImpl.h #1189590:1189591
@@ -380,6 +380,7 @@
     READ_PROLOGUE
 
     m_currentColor = QColor();
+    QColor backgroundColor = QColor();
 
     while (!atEnd()) {
         readNext();
@@ -391,22 +392,37 @@
 //            ELSE_TRY_READ_IF(gradFill)
 //            ELSE_TRY_READ_IF(grpFill)
 //            ELSE_TRY_READ_IF(headers)
-//            ELSE_TRY_READ_IF(lnB)
 //            ELSE_TRY_READ_IF(lnBlToTr)
-//            ELSE_TRY_READ_IF(lnL)
-//            ELSE_TRY_READ_IF(lnR)
 //            ELSE_TRY_READ_IF(lnTlToBr)
 //            ELSE_TRY_READ_IF(noFill)
 //            ELSE_TRY_READ_IF(pattFill)
               if (QUALIFIED_NAME_IS(solidFill)) {
                   TRY_READ(solidFill)
-                  if (m_currentColor.isValid()) {
-                      m_currentTableCellStyle.addProperty("fo:background-color", m_currentColor.name());
+                  backgroundColor = m_currentColor;
+              } // Skipping these currently to not interfere with background color.
+              else if (QUALIFIED_NAME_IS(lnB)) {
+                  skipCurrentElement();
                   }
+              else if (QUALIFIED_NAME_IS(lnB)) {
+                  skipCurrentElement();
               }
+              else if (QUALIFIED_NAME_IS(lnB)) {
+                  skipCurrentElement();
+              }
+              else if (QUALIFIED_NAME_IS(lnB)) {
+                  skipCurrentElement();
+              }
+              else if (QUALIFIED_NAME_IS(noFill)) {
+                  backgroundColor = QColor();
+              }
 //             ELSE_WRONG_FORMAT
         }
     }
+
+    if (backgroundColor.isValid()) {
+        m_currentTableCellStyle.addProperty("fo:background-color", backgroundColor.name());
+    }
+
     READ_EPILOGUE
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic