diff options
author | Jan Holesovsky <kendy@suse.cz> | 2010-12-20 01:17:18 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-12-20 01:17:18 +0100 |
commit | ad11d85818a1446d1c73954f3eb5e83fc091163e (patch) | |
tree | 5646801724c303966a8166519310d9a2a22aecb0 /sd/source/filter | |
parent | 4f3f5e15f77272291946671fdf98a1cfb530dd2e (diff) | |
parent | be106b6335eee8e63d4789d4be4494eb3fb86a18 (diff) |
Merge commit 'libreoffice-3.3.0.2'
Diffstat (limited to 'sd/source/filter')
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 23 | ||||
-rw-r--r-- | sd/source/filter/eppt/escherex.cxx | 18 | ||||
-rw-r--r-- | sd/source/filter/ppt/propread.cxx | 2 |
3 files changed, 30 insertions, 13 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index cec904ad118b..d04a8c0bfbf9 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -3033,7 +3033,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a continue; } else if ( ( mType == "drawing.OLE2" ) || ( mType == "presentation.OLE2" ) - || ( mType == "presentation.Chart" ) || ( mType == "presentation.Table" ) + || ( mType == "presentation.Chart" ) || ( mType == "presentation.Calc" ) || ( mType == "presentation.OrgChart" ) ) { mpPptEscherEx->OpenContainer( ESCHER_SpContainer ); @@ -3219,7 +3219,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a } } } - else if ( mType == "drawing.Table" ) + else if ( (mType == "drawing.Table") || (mType == "presentation.Table") ) { SvMemoryStream* pTmp = NULL; if ( bEffect && !mbUseNewAnimations ) @@ -3408,7 +3408,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a ImplFlipBoundingBox( aPropOpt ); aPropOpt.CreateShapeProperties( mXShape ); aPropOpt.Commit( *mpStrm ); - mpPptEscherEx->AddClientAnchor( maRect ); + if ( GetCurrentGroupLevel() > 0 ) + mpPptEscherEx->AddChildAnchor( maRect ); + else + mpPptEscherEx->AddClientAnchor( maRect ); if ( pClientData ) { @@ -3478,7 +3481,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a aPropOpt.CreateShapeProperties( mXShape ); aPropOpt.Commit( *mpStrm ); - mpPptEscherEx->AddClientAnchor( maRect ); + if ( GetCurrentGroupLevel() > 0 ) + mpPptEscherEx->AddChildAnchor( maRect ); + else + mpPptEscherEx->AddClientAnchor( maRect ); *mpStrm << (sal_uInt32)( ( ESCHER_ClientTextbox << 16 ) | 0xf ) << (sal_uInt32)pClientTextBox->Tell(); @@ -3625,11 +3631,10 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc aPropOpt.CreateShapeProperties( rXShape ); aPropOpt.Commit( *mpStrm ); aPropOpt2.Commit( *mpStrm, 3, ESCHER_UDefProp ); - mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor ); - *mpStrm << (sal_Int16)maRect.Top() - << (sal_Int16)maRect.Left() - << (sal_Int16)( maRect.GetWidth() + maRect.Left() ) - << (sal_Int16)( maRect.GetHeight() + maRect.Top() ); + if ( GetCurrentGroupLevel() > 0 ) + mpPptEscherEx->AddChildAnchor( maRect ); + else + mpPptEscherEx->AddClientAnchor( maRect ); mpPptEscherEx->CloseContainer(); uno::Reference< table::XCellRange > xCellRange( xTable, uno::UNO_QUERY_THROW ); diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx index 2cbde24ebeb9..c40cf5043038 100644 --- a/sd/source/filter/eppt/escherex.cxx +++ b/sd/source/filter/eppt/escherex.cxx @@ -269,9 +269,21 @@ sal_uInt32 PptEscherEx::EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClie else { AddShape( ESCHER_ShpInst_Min, 0x201, nShapeId ); // Flags: Group | HaveAnchor - AddAtom( 8, ESCHER_ClientAnchor ); - PtReplaceOrInsert( ESCHER_Persist_Grouping_Logic | mnGroupLevel, mpOutStrm->Tell() ); - *mpOutStrm << (INT16)aRect.Top() << (INT16)aRect.Left() << (INT16)aRect.Right() << (INT16)aRect.Bottom(); + if ( mnGroupLevel == 1 ) + { + AddAtom( 8, ESCHER_ClientAnchor ); + PtReplaceOrInsert( ESCHER_Persist_Grouping_Logic | mnGroupLevel, mpOutStrm->Tell() ); + *mpOutStrm << (INT16)aRect.Top() << (INT16)aRect.Left() << (INT16)aRect.Right() << (INT16)aRect.Bottom(); + } + else + { + AddAtom( 16, ESCHER_ChildAnchor ); + PtReplaceOrInsert( ESCHER_Persist_Grouping_Snap | mnGroupLevel, mpOutStrm->Tell() ); + *mpOutStrm << (sal_Int32)aRect.Left() + << (sal_Int32)aRect.Top() + << (sal_Int32)aRect.Right() + << (sal_Int32)aRect.Bottom(); + } } if ( pClientData ) { diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx index ebc54c117c2f..e711263291c8 100644 --- a/sd/source/filter/ppt/propread.cxx +++ b/sd/source/filter/ppt/propread.cxx @@ -100,7 +100,7 @@ static xub_StrLen lcl_getMaxSafeStrLen(sal_uInt32 nSize) if (nSize > STRING_MAXLEN) nSize = STRING_MAXLEN; - return nSize; + return static_cast< xub_StrLen >( nSize ); } BOOL PropItem::Read( String& rString, sal_uInt32 nStringType, sal_Bool bAlign ) |