summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/msfilter/msdffimp.cxx17
-rw-r--r--svx/source/svdraw/svditer.cxx59
2 files changed, 46 insertions, 30 deletions
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index 8ff9cea19e..3829c7fb5d 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -4453,7 +4453,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, Rect
// PptSlidePersistEntry& rPersistEntry, SdPage* pPage
SdrObject* SvxMSDffManager::ImportObj( SvStream& rSt, void* pClientData,
- const Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId )
+ Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId )
{
SdrObject* pRet = NULL;
DffRecordHeader aObjHd;
@@ -4471,7 +4471,7 @@ SdrObject* SvxMSDffManager::ImportObj( SvStream& rSt, void* pClientData,
}
SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& rSt, void* pClientData,
- const Rectangle& rClientRect, const Rectangle& rGlobalChildRect,
+ Rectangle& rClientRect, const Rectangle& rGlobalChildRect,
int nCalledByGroup, sal_Int32* pShapeId )
{
SdrObject* pRet = NULL;
@@ -4495,8 +4495,6 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
nGroupRotateAngle = mnFix16Angle;
Rectangle aClientRect( rClientRect );
- if ( rClientRect.IsEmpty() )
- aClientRect = pRet->GetSnapRect();
Rectangle aGlobalChildRect;
if ( !nCalledByGroup || rGlobalChildRect.IsEmpty() )
@@ -4575,7 +4573,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
}
SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& rSt, void* pClientData,
- const Rectangle& rClientRect, const Rectangle& rGlobalChildRect,
+ Rectangle& rClientRect, const Rectangle& rGlobalChildRect,
int nCalledByGroup, sal_Int32* pShapeId )
{
SdrObject* pRet = NULL;
@@ -4686,7 +4684,12 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( aObjData.nSpFlags & SP_FGROUP )
{
pRet = new SdrObjGroup;
- pRet->NbcSetLogicRect( aBoundRect ); // SJ: SnapRect is allowed to be set at the group only for the first time
+ /* After CWS aw033 has been integrated, an empty group object
+ cannot store its resulting bounding rectangle anymore. We have
+ to return this rectangle via rClientRect now, but only, if
+ caller has not passed an own bounding ractangle. */
+ if ( rClientRect.IsEmpty() )
+ rClientRect = aBoundRect;
nGroupShapeFlags = aObjData.nSpFlags; // #73013#
}
else if ( ( aObjData.eShapeType != mso_sptNil ) || IsProperty( DFF_Prop_pVertices ) || bGraphic )
diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx
index 5207c529c6..d396876bfd 100644
--- a/svx/source/svdraw/svditer.cxx
+++ b/svx/source/svdraw/svditer.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svditer.cxx,v $
- * $Revision: 1.9 $
+ * $Revision: 1.9.246.1 $
*
* This file is part of OpenOffice.org.
*
@@ -34,6 +34,7 @@
#include <svx/svdpage.hxx>
#include <svx/svdogrp.hxx>
#include <svx/svdobj.hxx>
+#include <svx/svdmark.hxx>
// #99190#
#include <svx/scene3d.hxx>
@@ -68,33 +69,45 @@ SdrObjListIter::SdrObjListIter( const SdrObject& rObj, SdrIterMode eMode, BOOL b
Reset();
}
+SdrObjListIter::SdrObjListIter( const SdrMarkList& rMarkList, SdrIterMode eMode, BOOL bReverse )
+: maObjList(1024, 64, 64),
+ mnIndex(0L),
+ mbReverse(bReverse)
+{
+ ImpProcessMarkList(rMarkList, eMode);
+ Reset();
+}
+
void SdrObjListIter::ImpProcessObjectList(const SdrObjList& rObjList, SdrIterMode eMode, BOOL bUseZOrder)
{
- for(sal_uInt32 a(0L); a < rObjList.GetObjCount(); a++)
+ for( ULONG nIdx = 0, nCount = rObjList.GetObjCount(); nIdx < nCount; ++nIdx )
{
- SdrObject* pObj = NULL;
- if (bUseZOrder)
- pObj = rObjList.GetObj(a);
- else
- pObj = rObjList.GetObjectForNavigationPosition(a);
- if (pObj == NULL)
- {
- OSL_ASSERT(pObj!=NULL);
- continue;
- }
+ SdrObject* pObj = bUseZOrder ?
+ rObjList.GetObj( nIdx ) : rObjList.GetObjectForNavigationPosition( nIdx );
+ OSL_ASSERT( pObj != 0 );
+ if( pObj )
+ ImpProcessObj( pObj, eMode, bUseZOrder );
+ }
+}
- sal_Bool bIsGroup(pObj->IsGroupObject());
+void SdrObjListIter::ImpProcessMarkList( const SdrMarkList& rMarkList, SdrIterMode eMode )
+{
+ for( ULONG nIdx = 0, nCount = rMarkList.GetMarkCount(); nIdx < nCount; ++nIdx )
+ if( SdrObject* pObj = rMarkList.GetMark( nIdx )->GetMarkedSdrObj() )
+ ImpProcessObj( pObj, eMode, FALSE );
+}
- // #99190# 3D objects are no group objects, IsGroupObject()
- // only tests if pSub is not null ptr :-(
- if(bIsGroup && pObj->ISA(E3dObject) && !pObj->ISA(E3dScene))
- bIsGroup = sal_False;
+void SdrObjListIter::ImpProcessObj(SdrObject* pObj, SdrIterMode eMode, BOOL bUseZOrder)
+{
+ bool bIsGroup = pObj->IsGroupObject();
+ // #99190# 3D objects are no group objects, IsGroupObject()
+ // only tests if pSub is not null ptr :-(
+ if( bIsGroup && pObj->ISA( E3dObject ) && !pObj->ISA( E3dScene ) )
+ bIsGroup = false;
- if(eMode != IM_DEEPNOGROUPS || !bIsGroup)
- maObjList.Insert(pObj, LIST_APPEND);
+ if( !bIsGroup || (eMode != IM_DEEPNOGROUPS) )
+ maObjList.Insert( pObj, LIST_APPEND );
- if(bIsGroup && eMode != IM_FLAT)
- ImpProcessObjectList(*pObj->GetSubList(), eMode, bUseZOrder);
- }
+ if( bIsGroup && (eMode != IM_FLAT) )
+ ImpProcessObjectList( *pObj->GetSubList(), eMode, bUseZOrder );
}
-