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

List:       kde-commits
Subject:    branches/work/koffice-essen/filters/libmsooxml
From:       Carlos Licea <carlos_licea () hotmail ! com>
Date:       2010-12-04 23:52:46
Message-ID: 20101204235246.4DB29AC8B3 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1203651 by clicea:

Pass around the local styles to the table instance so that they can be applied when
appropiate.

BUG:252158

 M  +44 -2     MsooXmlDrawingReaderTableImpl.h  
 M  +3 -0      MsooXmlDrawingReaderTableMethods.h  


--- branches/work/koffice-essen/filters/libmsooxml/MsooXmlDrawingReaderTableImpl.h #1203650:1203651
@@ -77,7 +77,8 @@
     const int columnCount = m_table->columnCount();
 
     MSOOXML::TableStyleInstanceProperties styleProperties(rowCount, columnCount);
-    styleProperties.roles(m_activeRoles);
+    styleProperties.roles(m_activeRoles)
+                   .localStyles(m_localTableStyles);
 
     MSOOXML::TableStyleInstance styleInstance(&m_tableStyle, styleProperties);
 
@@ -259,7 +260,7 @@
                 body = oldBody;
             }
 //             ELSE_TRY_READ_IF(extLst)
-//             ELSE_TRY_READ_IF(tcPr)
+            ELSE_TRY_READ_IF(tcPr)
 //             ELSE_WRONG_FORMAT
         }
     }
@@ -282,3 +283,44 @@
  
     READ_EPILOGUE
 }
+
+// Local styles
+
+#undef CURRENT_EL
+#define CURRENT_EL tcPr
+//! tcPR (Table Cell Properties)  §21.1.3.17
+KoFilter::ConversionStatus MSOOXML_CURRENT_CLASS::read_tcPr()
+{
+    READ_PROLOGUE
+
+    m_currentLocalStyleProperties = new MSOOXML::TableStyleProperties();
+
+    while (!atEnd()) {
+        readNext();
+        BREAK_IF_END_OF(CURRENT_EL);
+        if (isStartElement()) {
+//             TRY_READ_IF(blipFill)
+//             ELSE_TRY_READ_IF(cell3D)
+//             ELSE_TRY_READ_IF(extLst)
+//             ELSE_TRY_READ_IF(gradFill)
+//             ELSE_TRY_READ_IF(grpFill)
+//             ELSE_TRY_READ_IF(lnBlToTr)
+//             ELSE_TRY_READ_IF(lnB)
+//             ELSE_TRY_READ_IF(lnR)
+//             ELSE_TRY_READ_IF(lnT)
+//             ELSE_TRY_READ_IF(lnTlToBr)
+//             ELSE_TRY_READ_IF(pattFill)
+            /*else */if(QUALIFIED_NAME_IS(solidFill)) {
+                TRY_READ(solidFill)
+                m_currentLocalStyleProperties->backgroundColor = m_currentColor;
+                m_currentLocalStyleProperties->setProperties |= MSOOXML::TableStyleProperties::BackgroundColor;
+            }
+        }
+    }
+
+    m_localTableStyles.setLocalStyle(m_currentLocalStyleProperties, m_currentTableRowNumber, m_currentTableColumnNumber);
+
+    READ_EPILOGUE
+}
+
+
--- branches/work/koffice-essen/filters/libmsooxml/MsooXmlDrawingReaderTableMethods.h #1203650:1203651
@@ -42,3 +42,6 @@
 
     MSOOXML::TableStyle m_tableStyle;
     MSOOXML::TableStyleInstanceProperties::Roles m_activeRoles;
+
+    MSOOXML::TableStyleProperties* m_currentLocalStyleProperties;
+    MSOOXML::LocalTableStyles m_localTableStyles;
[prev in list] [next in list] [prev in thread] [next in thread] 

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