Kaydet (Commit) 1a357b73 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

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

Change-Id: Ibcb61dfa12c67fd9f93713ba7eb93f947b122f07
üst 5b9c27b6
......@@ -1199,7 +1199,7 @@ struct ImplPPTTextObj
explicit ImplPPTTextObj( PptSlidePersistEntry& rPersistEntry ) : mrPersistEntry ( rPersistEntry ) {};
};
class PPTTextObj
class MSFILTER_DLLPUBLIC PPTTextObj
{
ImplPPTTextObj* mpImplTextObj;
void ImplClear();
......
<?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>
......@@ -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 )
......
......@@ -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;
};
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment