diff options
author | Christian Lippka ORACLE <christian.lippka@oracle.com> | 2010-12-06 13:51:25 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@novell.com> | 2010-12-15 10:02:59 +0100 |
commit | 5ba86b4ab27fe4d3b07c2535576eec655558d2d3 (patch) | |
tree | bbe3c131b5a53e51cb98b985c1cecbcd93c81f9b /sd | |
parent | 977fa1655cbe7cbb36b45a3eb26bc99a8c4e0d8c (diff) |
impress206: #i115898# use updated anchor for group shapes to work around ms office 2010 bug(cherry picked from commit 7736d7e159d0e69ee817def98fefdb216f711ca3)
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/filter/eppt/escherex.cxx | 18 |
2 files changed, 27 insertions, 10 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 2b7635307661..55f143ee9849 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -3442,7 +3442,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 ) { @@ -3512,7 +3515,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(); @@ -3659,11 +3665,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..100755 --- 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 ) { |