[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 5 commits - sd/source slideshow/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Wed Dec 15 01:04:48 PST 2010
sd/source/filter/eppt/epptso.cxx | 23 ++++++++++++++---------
sd/source/filter/eppt/escherex.cxx | 18 +++++++++++++++---
sd/source/filter/ppt/propread.cxx | 2 +-
sd/source/ui/view/sdview4.cxx | 3 ++-
sd/source/ui/view/sdview5.cxx | 2 +-
slideshow/source/engine/shapes/shapeimporter.cxx | 13 ++++++++++---
6 files changed, 43 insertions(+), 18 deletions(-)
New commits:
commit 7074930f8c7ea96345120eee9b66d83849546570
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Wed Dec 15 10:04:00 2010 +0100
This surely shouldn't need executable flag
diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx
old mode 100755
new mode 100644
commit b0be7f2318e1043f0d3c6ebfc3c264040b009c98
Author: Christian Lippka ORACLE <christian.lippka at oracle.com>
Date: Wed Dec 8 14:39:25 2010 +0100
impress207: #i115993# do not insert objects as presentation objects on master pages(cherry picked from commit 056b298538918df97390c645a1a0fb690a89468e)
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 8fec180..86dd2c9 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -100,6 +100,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
SdrGrafObj* pNewGrafObj = NULL;
SdrPageView* pPV = GetSdrPageView();
SdrObject* pPickObj = pObj;
+ const bool bOnMaster = pPV && pPV->GetPage() && pPV->GetPage()->IsMasterPage();
if(pPV && this->ISA(::sd::slidesorter::view::SlideSorterView))
{
@@ -116,7 +117,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
if( mnAction == DND_ACTION_LINK && pPickObj && pPV )
{
const bool bIsGraphic = pPickObj->ISA( SdrGrafObj );
- if( bIsGraphic || pObj->IsEmptyPresObj() )
+ if( bIsGraphic || (pObj->IsEmptyPresObj() && !bOnMaster) )
{
if( IsUndoEnabled() )
BegUndo(String(SdResId(STR_INSERTGRAPHIC)));
diff --git a/sd/source/ui/view/sdview5.cxx b/sd/source/ui/view/sdview5.cxx
index d3174e9..9f348b7 100644
--- a/sd/source/ui/view/sdview5.cxx
+++ b/sd/source/ui/view/sdview5.cxx
@@ -61,7 +61,7 @@ SdrObject* View::GetEmptyPresentationObject( PresObjKind eKind )
if( pPV )
{
SdPage* pPage = static_cast< SdPage* >( pPV->GetPage() );
- if( pPage )
+ if( pPage && !pPage->IsMasterPage() )
{
// first try selected shape
if ( AreObjectsMarked() )
commit 1bcfdb91f4a74eacc51d28c3ccc47f6842b5dad7
Author: Christian Lippka ORACLE <christian.lippka at oracle.com>
Date: Mon Dec 6 13:51:25 2010 +0100
impress206: #i115898# use updated anchor for group shapes to work around ms office 2010 bug(cherry picked from commit 7736d7e159d0e69ee817def98fefdb216f711ca3)
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 2b76353..df9e4b6 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
old mode 100644
new mode 100755
index 36beba2..f6db4e1
--- 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 )
{
commit 9252273081649088bb72b1b4b1e82a45021ee3a8
Author: Christian Lippka ORACLE <christian.lippka at oracle.com>
Date: Mon Dec 6 13:49:27 2010 +0100
impress206: #i115898# take into account new presentation shapes(cherry picked from commit c8c648474da56e2ecdbdcc11c269366716fe88c9)
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index a1671c4..145be66 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -286,7 +286,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,
@@ -338,7 +340,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
@@ -350,7 +354,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;
commit 8f62cd85de50a5023a6065455677971193f0e699
Author: Christian Lippka <christian.lippka at oracle.com>
Date: Sun Dec 5 11:40:40 2010 +0100
impress206: fixed compiler warning(cherry picked from commit 8df4a00b9bc1739289e45d9f4485f355298a35eb)
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 91f0ae4..2b76353 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -3063,7 +3063,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 );
@@ -3253,7 +3253,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 )
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 4713cbb..3da9b25 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 )
More information about the Libreoffice-commits
mailing list