summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-12-09 10:53:40 +0100
committerobo <obo@openoffice.org>2010-12-09 10:53:40 +0100
commit36abc9c017314364e404a9d835c2358ff503b22a (patch)
tree594cdbfc2bf704cc12c55e00dad2f73a2c205327
parentfb08d0fcf8c246885b98635081328a5ee02d5ba1 (diff)
parent7736d7e159d0e69ee817def98fefdb216f711ca3 (diff)
CWS-TOOLING: integrate CWS impress206
-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
-rw-r--r--slideshow/source/engine/shapes/shapeimporter.cxx13
4 files changed, 40 insertions, 16 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index c948353fa..e6986a897 100755..100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -5012,7 +5012,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 );
@@ -5203,7 +5203,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 )
@@ -5392,7 +5392,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 )
{
@@ -5462,7 +5465,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();
@@ -5641,11 +5647,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 fbbf178c0..872df3376 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 873d4abf5..8ae1c06c4 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 )
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index bbfcfe2cb..b7b913cd9 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -285,7 +285,9 @@ ShapeSharedPtr ShapeImporter::createShape(
rtl::OUString const& shapeType ) const
{
if( shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape") ))
+ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape") ) ||
+ shapeType.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.MediaShape") ) )
{
// Media shape (video etc.). This is a special object
return createMediaShape(xCurrShape,
@@ -337,7 +339,9 @@ ShapeSharedPtr ShapeImporter::createShape(
mrContext );
}
else if( shapeType.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OLE2Shape") ))
+ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OLE2Shape") ) ||
+ shapeType.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.OLE2Shape") ) )
{
// #i46224# Mark OLE shapes as foreign content - scan them for
// unsupported actions, and fallback to bitmap, if necessary
@@ -349,7 +353,10 @@ ShapeSharedPtr ShapeImporter::createShape(
}
else if( shapeType.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM(
- "com.sun.star.drawing.GraphicObjectShape") ))
+ "com.sun.star.drawing.GraphicObjectShape") ) ||
+ shapeType.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM(
+ "com.sun.star.presentation.GraphicObjectShape") ) )
{
GraphicObject aGraphicObject;