summaryrefslogtreecommitdiff
path: root/sd/source/filter
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2011-01-06 14:57:12 +0100
committerMikhail Voytenko <mav@openoffice.org>2011-01-06 14:57:12 +0100
commite672cd42fd750b9d2b033b743e544597fe137703 (patch)
tree3bdf80aa94e50ad3ad278ec7a5ed16cc1d474ce5 /sd/source/filter
parentc1dfee3e9860e0e6abad45551d014ab46a94cb06 (diff)
parent0bafb5a5e88a430440cb7a3ea42d787c6d1dcd79 (diff)
removetooltypes01: rebase to DEV300_m96
Diffstat (limited to 'sd/source/filter')
-rw-r--r--[-rwxr-xr-x]sd/source/filter/eppt/epptso.cxx23
-rwxr-xr-x[-rw-r--r--]sd/source/filter/eppt/escherex.cxx18
-rw-r--r--[-rwxr-xr-x]sd/source/filter/ppt/propread.cxx2
3 files changed, 30 insertions, 13 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 764d56906620..7372cbdcf5d3 100755..100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -5010,7 +5010,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 );
@@ -5201,7 +5201,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 )
@@ -5390,7 +5390,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 )
{
@@ -5460,7 +5463,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();
@@ -5639,11 +5645,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();
diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx
index fbb94de67ae7..9ef58c082b6e 100644..100755
--- a/sd/source/filter/eppt/escherex.cxx
+++ b/sd/source/filter/eppt/escherex.cxx
@@ -270,9 +270,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 ff1250bdf090..b77c2563fc03 100755..100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -99,7 +99,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 )