[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - 4 commits - filter/inc filter/source sd/source
Jan Holesovsky
kendy at suse.cz
Mon May 13 02:05:35 PDT 2013
filter/inc/filter/msfilter/svdfppt.hxx | 1 -
filter/source/msfilter/svdfppt.cxx | 11 ++++++++---
sd/source/filter/ppt/pptin.cxx | 21 +++++++--------------
3 files changed, 15 insertions(+), 18 deletions(-)
New commits:
commit 8378527a678f15b588550fcdfda84ac45613f84c
Author: Jan Holesovsky <kendy at suse.cz>
Date: Sun May 12 17:33:22 2013 +0200
bnc#758621: Set the attribs for the entire para if a placeholder.
Setting attributes for empty paragraphs does nothing, we have to apply it to
the style directly.
Change-Id: Id2a63c961e408906fa7c6457091405692262c6b7
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 4870559..514dba3 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2296,6 +2296,14 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
}
pPortion->ApplyTo( aPortionAttribs, (SdrPowerPointImport&)*this, nDestinationInstance, pTextObj );
rOutliner.QuickSetAttribs( aPortionAttribs, aSelection );
+
+ // set the attribs for the entire paragraph, if it is a placeholder
+ if ( pTextObj->GetOEPlaceHolderAtom() && aSelection.nStartPos == aSelection.nEndPos )
+ {
+ SfxItemSet& rItemSet = rOutliner.GetStyleSheet( nParaIndex )->GetItemSet();
+ pPortion->ApplyTo( rItemSet, (SdrPowerPointImport&)*this, nDestinationInstance, pTextObj );
+ }
+
aSelection.nStartPos = aSelection.nEndPos;
}
boost::optional< sal_Int16 > oStartNumbering;
commit c8f1d9140b898e1b63fe12f049738b8333202561
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri May 10 20:27:40 2013 +0200
bnc#758621: Set presentation object as non-empty only if not a placeholder.
Based on work of Felix Zhang <fezhang at suse.com>, thank you!
Change-Id: I26c7cef17b9a5f3d73107b5c974983e58c347d52
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 5b88e50..c4ab6d2 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2340,8 +2340,6 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
sal_Bool bVertical = sal_False;
if ( ( pTextObj->GetShapeType() == mso_sptRectangle ) || ( pTextObj->GetShapeType() == mso_sptTextBox ) )
{
- if ( pTextObj->Count() )
- bEmptyPresObj = sal_False;
switch ( nPlaceholderId )
{
case PPT_PLACEHOLDER_NOTESBODY : ePresObjKind = PRESOBJ_NOTES; break;
@@ -2356,7 +2354,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
default :
{
- if ( !pTextObj->Count() )
+ if ( pTextObj->Count() == 0 )
{
switch ( nPlaceholderId )
{
@@ -2368,6 +2366,8 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
case PPT_PLACEHOLDER_ORGANISZATIONCHART : ePresObjKind = PRESOBJ_ORGCHART; break;
}
}
+ else
+ bEmptyPresObj = sal_False;
};
}
}
commit 04bd0886d0208d08d96078539d491a7c2c3d2b20
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri May 10 19:56:04 2013 +0200
bnc#758621: We don't need this index for anything.
Worse, it prevents us to enter part of the code that we need to execute in
some (valid) circumstances.
Change-Id: I15084b5efa10fbd5cd0d42856c2745c93d6765da
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index f587b06..5b88e50 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2332,17 +2332,9 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
{
sal_uInt32 nPlacementId = pPlaceHolder->nPlacementId;
sal_Int16 nPlaceholderId = pPlaceHolder->nPlaceholderId;
- sal_uInt16 i = 0;
+
if ( eAktPageKind == PPT_SLIDEPAGE )
{
- for ( ; i < 8; i++ )
- {
- if ( pSlideLayout->aPlaceholderId[ i ] == nPlaceholderId )
- break;
- }
- }
- if ( i < 8 )
- {
PresObjKind ePresObjKind = PRESOBJ_NONE;
sal_Bool bEmptyPresObj = sal_True;
sal_Bool bVertical = sal_False;
commit f829f34cff62c60a25b2c05015c4d1deb568fd6b
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri May 10 19:48:06 2013 +0200
bnc#758621: Kill unused aPlacementId, it is never set.
Based on work of Felix Zhang <fezhang at suse.com>, thank you!
Change-Id: I733a2b69d01f86bcaf0fa401671d475d9b4641a6
diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx
index 8a6d1ed..da82d7f 100644
--- a/filter/inc/filter/msfilter/svdfppt.hxx
+++ b/filter/inc/filter/msfilter/svdfppt.hxx
@@ -206,7 +206,6 @@ struct PptSlideLayoutAtom
{
sal_Int32 eLayout; // 0..18
sal_uInt8 aPlaceholderId[ 8 ];
- sal_uLong aPlacementId[ 8 ];
public:
PptSlideLayoutAtom() { Clear(); }
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index f6eb87a..4870559 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -295,10 +295,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/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index e456a4e..f587b06 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2330,6 +2330,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 )
@@ -2409,7 +2410,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 );
@@ -2428,7 +2429,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
Rectangle aLogicRect( pPresObj->GetLogicRect() );
Size aLogicSize( aLogicRect.GetSize() );
- switch ( pSlideLayout->aPlacementId[ i ] )
+ switch ( nPlacementId )
{
case 0 : // Lage im Titelbereich
{
More information about the Libreoffice-commits
mailing list