[Libreoffice-commits] core.git: include/filter sd/qa sd/source

Jan Holesovsky kendy at suse.cz
Wed May 15 00:43:33 PDT 2013


 include/filter/msfilter/svdfppt.hxx |    2 +-
 sd/qa/unit/data/fdo64586.ppt        |binary
 sd/qa/unit/data/xml/fdo64586_0.xml  |   31 +++++++++++++++++++++++++++++++
 sd/qa/unit/import-tests.cxx         |    3 ++-
 sd/source/filter/ppt/pptin.cxx      |    3 +--
 5 files changed, 35 insertions(+), 4 deletions(-)

New commits:
commit 1a357b7394ac7b48b72821bff1aae4706265d7a4
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed May 15 09:37:27 2013 +0200

    fdo#64586: Fix incorrect import non-empty placeholders + unit test.
    
    Change-Id: Ibcb61dfa12c67fd9f93713ba7eb93f947b122f07

diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index 6fc22af..c32b9de 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -1199,7 +1199,7 @@ struct ImplPPTTextObj
     explicit ImplPPTTextObj( PptSlidePersistEntry& rPersistEntry ) : mrPersistEntry ( rPersistEntry ) {};
 };
 
-class PPTTextObj
+class MSFILTER_DLLPUBLIC PPTTextObj
 {
     ImplPPTTextObj*         mpImplTextObj;
     void                    ImplClear();
diff --git a/sd/qa/unit/data/fdo64586.ppt b/sd/qa/unit/data/fdo64586.ppt
new file mode 100644
index 0000000..62a4b11
Binary files /dev/null and b/sd/qa/unit/data/fdo64586.ppt differ
diff --git a/sd/qa/unit/data/xml/fdo64586_0.xml b/sd/qa/unit/data/xml/fdo64586_0.xml
new file mode 100644
index 0000000..695fbd9
--- /dev/null
+++ b/sd/qa/unit/data/xml/fdo64586_0.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<XShapes>
+ <XShape positionX="1397" positionY="963" sizeX="25197" sizeY="3508" type="com.sun.star.presentation.TitleTextShape" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="0" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="3508" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
+  <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+  <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+  <FillHatch style="SINGLE" color="3433903" distance="20" angle="0"/>
+  <FillBitmap/>
+  <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+  <LineStart/>
+  <LineEnd/>
+  <Transformation>
+   <Line1 column1="25198.000000" column2="0.000000" column3="1397.000000"/>
+   <Line2 column1="0.000000" column2="3509.000000" column3="963.000000"/>
+   <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+  </Transformation>
+ </XShape>
+ <XShape positionX="1397" positionY="4912" sizeX="25197" sizeY="12181" type="com.sun.star.presentation.SubtitleShape" text="Blah" textAutoGrowHeight="true" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="CENTER" textLeftDistance="0" textRightDistance="0" textUpperDistance="78" textLowerDistance="0" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="12103" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="NONE" fillColor="16777215" fillTransparence="0" fillTransparenceGradientName="">
+  <FillTransparenceGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+  <FillGradient style="LINEAR" startColor="0" endColor="16777215" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
+  <FillHatch style="SINGLE" color="3433903" distance="20" angle="0"/>
+  <FillBitmap/>
+  <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/>
+  <LineStart/>
+  <LineEnd/>
+  <Transformation>
+   <Line1 column1="25198.000000" column2="0.000000" column3="1397.000000"/>
+   <Line2 column1="0.000000" column2="12182.000000" column3="4912.000000"/>
+   <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/>
+  </Transformation>
+ </XShape>
+</XShapes>
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 0c6d8a7..d8c8204 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -53,7 +53,8 @@ void SdFiltersTest::testDocumentLayout()
     {
         { "odp/shapes-test.odp", "xml/shapes-test_page" },
         { "pptx/fdo47434-all.pptx", "pptx/xml/fdo47434_page" },
-        { "n758621.ppt", "xml/n758621_" }
+        { "n758621.ppt", "xml/n758621_" },
+        { "fdo64586.ppt", "xml/fdo64586_" }
     };
 
     for ( int i = 0; i < static_cast< int >( SAL_N_ELEMENTS( aFilesToCompare ) ); ++i )
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 76b5d67..9e3eab5 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2332,6 +2332,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
                     sal_Bool    bVertical = sal_False;
                     if ( ( pTextObj->GetShapeType() == mso_sptRectangle ) || ( pTextObj->GetShapeType() == mso_sptTextBox ) )
                     {
+                        bEmptyPresObj = ( pTextObj->Count() == 0 ) || ( pTextObj->Count() == 1 && pTextObj->First()->GetTextSize() == 0 );
                         switch ( nPlaceholderId )
                         {
                             case PPT_PLACEHOLDER_NOTESBODY :            ePresObjKind = PRESOBJ_NOTES;   break;
@@ -2358,8 +2359,6 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
                                         case PPT_PLACEHOLDER_ORGANISZATIONCHART : ePresObjKind = PRESOBJ_ORGCHART; break;
                                     }
                                 }
-                                else
-                                    bEmptyPresObj = sal_False;
                             };
                         }
                     }


More information about the Libreoffice-commits mailing list