summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-05-10 19:48:06 +0200
committerJan Holesovsky <kendy@suse.cz>2013-05-12 18:05:57 +0200
commit4bba85981771d3626569633796e120e372172750 (patch)
treea9a3456822b9714785c9775a1825be7714f4c758
parentb5465ea16383975357a774128a3432cb2a4a5d27 (diff)
bnc#758621: Kill unused aPlacementId, it is never set.
Based on work of Felix Zhang <fezhang@suse.com>, thank you! Change-Id: I733a2b69d01f86bcaf0fa401671d475d9b4641a6
-rw-r--r--filter/source/msfilter/svdfppt.cxx3
-rw-r--r--include/filter/msfilter/svdfppt.hxx1
-rw-r--r--sd/source/filter/ppt/pptin.cxx5
3 files changed, 3 insertions, 6 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 4d942b4ee6ba..be548545982d 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -286,10 +286,7 @@ void PptSlideLayoutAtom::Clear()
{
eLayout = 0;
for ( sal_uInt16 i = 0; i < 8; i++ )
- {
aPlaceholderId[ i ] = 0;
- aPlacementId[ i ] = 0;
- }
}
SvStream& operator>>( SvStream& rIn, PptSlideLayoutAtom& rAtom )
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index 2fbf096aec58..6fc22afe05cd 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -195,7 +195,6 @@ struct PptSlideLayoutAtom
{
sal_Int32 eLayout; // 0..18
sal_uInt8 aPlaceholderId[ 8 ];
- sal_uLong aPlacementId[ 8 ];
public:
PptSlideLayoutAtom() { Clear(); }
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 30e90f2ec456..c496292e5a53 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2322,6 +2322,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
const PptSlideLayoutAtom* pSlideLayout = GetSlideLayoutAtom();
if ( pSlideLayout || ( eAktPageKind == PPT_NOTEPAGE ) )
{
+ sal_uInt32 nPlacementId = pPlaceHolder->nPlacementId;
sal_Int16 nPlaceholderId = pPlaceHolder->nPlaceholderId;
sal_uInt16 i = 0;
if ( eAktPageKind == PPT_SLIDEPAGE )
@@ -2401,7 +2402,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
ApplyAttributes( rStCtrl, aSet );
pPresObj->SetMergedItemSet(aSet);
- if ( ( eAktPageKind != PPT_NOTEPAGE ) && ( pSlideLayout->aPlacementId[ i ] != (sal_uLong)-1 ) )
+ if ( ( eAktPageKind != PPT_NOTEPAGE ) && ( nPlacementId != 0xffffffff ) )
{
SdrObject* pTitleObj = ((SdPage&)pPage->TRG_GetMasterPage()).GetPresObj( PRESOBJ_TITLE );
SdrObject* pOutlineObj = ((SdPage&)pPage->TRG_GetMasterPage()).GetPresObj( PRESOBJ_OUTLINE );
@@ -2420,7 +2421,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
Rectangle aLogicRect( pPresObj->GetLogicRect() );
Size aLogicSize( aLogicRect.GetSize() );
- switch ( pSlideLayout->aPlacementId[ i ] )
+ switch ( nPlacementId )
{
case 0 : // position in title area
{