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

List:       kde-commits
Subject:    koffice/filters
From:       Lassi Taneli Nieminen <lassniem () gmail ! com>
Date:       2010-11-09 11:09:04
Message-ID: 20101109110904.214E5AC8A0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1194632 by lassin:

Fixed some autoFit bugs in pptx filter.


 M  +12 -14    kpresenter/pptx/PptxXmlSlideReader.cpp  
 M  +2 -2      kpresenter/pptx/PptxXmlSlideReader.h  
 M  +1 -0      libmsooxml/MsooXmlCommonReaderDrawingMLImpl.h  


--- trunk/koffice/filters/kpresenter/pptx/PptxXmlSlideReader.cpp #1194631:1194632
@@ -118,7 +118,6 @@
 PptxSlideLayoutProperties::PptxSlideLayoutProperties()
 {
     m_drawingPageProperties = KoGenStyle(KoGenStyle::DrawingPageAutoStyle, \
                "drawing-page");
-    m_textAutoFit = MSOOXML::Utils::autoFitUnUsed;
 }
 
 PptxSlideLayoutProperties::~PptxSlideLayoutProperties()
@@ -132,7 +131,6 @@
 PptxSlideMasterPageProperties::PptxSlideMasterPageProperties()
 {
     m_drawingPageProperties = KoGenStyle(KoGenStyle::DrawingPageAutoStyle, \
                "drawing-page");
-    m_textAutoFit = MSOOXML::Utils::autoFitUnUsed;
 }
 
 void PptxSlideMasterPageProperties::clear()
@@ -1598,7 +1596,7 @@
             m_context->slideMasterPageProperties->textRightBorders[d->phIdx] = \
                m_shapeTextRightOff;
             m_context->slideMasterPageProperties->textTopBorders[d->phIdx] = \
                m_shapeTextTopOff;
             m_context->slideMasterPageProperties->textBottomBorders[d->phIdx] = \
                m_shapeTextBottomOff;
-            m_context->slideMasterPageProperties->m_textAutoFit = m_normAutoFit;
+            m_context->slideMasterPageProperties->m_textAutoFit[d->phIdx] = \
m_normAutoFit;  }
         if (!d->phType.isEmpty()) {
             m_context->slideMasterPageProperties->textShapePositions[d->phType] = \
m_shapeTextPosition; @@ -1606,7 +1604,7 @@
             m_context->slideMasterPageProperties->textRightBorders[d->phType] = \
                m_shapeTextRightOff;
             m_context->slideMasterPageProperties->textTopBorders[d->phType] = \
                m_shapeTextTopOff;
             m_context->slideMasterPageProperties->textBottomBorders[d->phType] = \
                m_shapeTextBottomOff;
-            m_context->slideMasterPageProperties->m_textAutoFit = m_normAutoFit;
+            m_context->slideMasterPageProperties->m_textAutoFit[d->phType] = \
m_normAutoFit;  }
     }
     else if (m_context->type == SlideLayout) {
@@ -1616,7 +1614,7 @@
             m_context->slideLayoutProperties->textRightBorders[d->phIdx] = \
                m_shapeTextRightOff;
             m_context->slideLayoutProperties->textTopBorders[d->phIdx] = \
                m_shapeTextTopOff;
             m_context->slideLayoutProperties->textBottomBorders[d->phIdx] = \
                m_shapeTextBottomOff;
-            m_context->slideLayoutProperties->m_textAutoFit = m_normAutoFit;
+            m_context->slideLayoutProperties->m_textAutoFit[d->phIdx] = \
m_normAutoFit;  }
         if (!d->phType.isEmpty()) {
             m_context->slideLayoutProperties->textShapePositions[d->phType] = \
m_shapeTextPosition; @@ -1624,7 +1622,7 @@
             m_context->slideLayoutProperties->textRightBorders[d->phType] = \
                m_shapeTextRightOff;
             m_context->slideLayoutProperties->textTopBorders[d->phType] = \
                m_shapeTextTopOff;
             m_context->slideLayoutProperties->textBottomBorders[d->phType] = \
                m_shapeTextBottomOff;
-            m_context->slideLayoutProperties->m_textAutoFit = m_normAutoFit;
+            m_context->slideLayoutProperties->m_textAutoFit[d->phType] = \
m_normAutoFit;  }
     }
 }
@@ -1660,9 +1658,9 @@
         if (!bottom.isEmpty()) {
             m_shapeTextLeftOff = bottom;
         }
-        if (m_context->slideMasterPageProperties->m_textAutoFit != \
MSOOXML::Utils::autoFitUnUsed) { +        if \
(m_context->slideMasterPageProperties->m_textAutoFit.value(d->phIdx) != \
MSOOXML::Utils::autoFitUnUsed) {  if (m_normAutoFit == MSOOXML::Utils::autoFitUnUsed) \
                {
-                 m_normAutoFit = \
m_context->slideMasterPageProperties->m_textAutoFit; +                 m_normAutoFit \
= m_context->slideMasterPageProperties->m_textAutoFit.value(d->phIdx);  }
         }
     }
@@ -1688,9 +1686,9 @@
         if (!bottom.isEmpty()) {
             m_shapeTextLeftOff = bottom;
         }
-        if (m_context->slideMasterPageProperties->m_textAutoFit != \
MSOOXML::Utils::autoFitUnUsed) { +        if \
(m_context->slideMasterPageProperties->m_textAutoFit.value(d->phType) != \
MSOOXML::Utils::autoFitUnUsed) {  if (m_normAutoFit == MSOOXML::Utils::autoFitUnUsed) \
                {
-                 m_normAutoFit = \
m_context->slideMasterPageProperties->m_textAutoFit; +                 m_normAutoFit \
= m_context->slideMasterPageProperties->m_textAutoFit.value(d->phType);  }
         }
     }
@@ -1718,9 +1716,9 @@
         if (!bottom.isEmpty()) {
             m_shapeTextLeftOff = bottom;
         }
-        if (m_context->slideLayoutProperties->m_textAutoFit != \
MSOOXML::Utils::autoFitUnUsed) { +        if \
(m_context->slideLayoutProperties->m_textAutoFit.value(d->phType) != \
MSOOXML::Utils::autoFitUnUsed) {  if (m_normAutoFit == MSOOXML::Utils::autoFitUnUsed) \
                {
-                 m_normAutoFit = \
m_context->slideMasterPageProperties->m_textAutoFit; +                 m_normAutoFit \
= m_context->slideLayoutProperties->m_textAutoFit.value(d->phType);  }
         }
     }
@@ -1745,9 +1743,9 @@
         if (!bottom.isEmpty()) {
             m_shapeTextLeftOff = bottom;
         }
-        if (m_context->slideLayoutProperties->m_textAutoFit != \
MSOOXML::Utils::autoFitUnUsed) { +        if \
(m_context->slideLayoutProperties->m_textAutoFit.value(d->phIdx) != \
MSOOXML::Utils::autoFitUnUsed) {  if (m_normAutoFit == MSOOXML::Utils::autoFitUnUsed) \
                {
-                 m_normAutoFit = \
m_context->slideMasterPageProperties->m_textAutoFit; +                 m_normAutoFit \
= m_context->slideLayoutProperties->m_textAutoFit.value(d->phIdx);  }
         }
     }
--- trunk/koffice/filters/kpresenter/pptx/PptxXmlSlideReader.h #1194631:1194632
@@ -132,7 +132,7 @@
     QMap<QString, QString> textShapePositions;
 
     //! Possible text shrinkage
-    MSOOXML::Utils::autoFitStatus m_textAutoFit;
+    QMap<QString, MSOOXML::Utils::autoFitStatus> m_textAutoFit;
 
     //! Borders in the frame
     QMap<QString, QString> textLeftBorders;
@@ -174,7 +174,7 @@
     QMap<QString, QString> textShapePositions;
 
     //! Possible text shrinkage
-    MSOOXML::Utils::autoFitStatus m_textAutoFit;
+    QMap<QString, MSOOXML::Utils::autoFitStatus> m_textAutoFit;
 
     //! Borders in the frame
     QMap<QString, QString> textLeftBorders;
--- trunk/koffice/filters/libmsooxml/MsooXmlCommonReaderDrawingMLImpl.h \
#1194631:1194632 @@ -5255,6 +5255,7 @@
             if (qualifiedName() == QLatin1String("a:spAutoFit")) {
                 TRY_READ(spAutoFit)
                 spAutoFit = true;
+                m_normAutoFit = MSOOXML::Utils::autoFitOn;
             }
             else if (qualifiedName() == QLatin1String("a:normAutofit")) {
                 m_normAutoFit = MSOOXML::Utils::autoFitOn;


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

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