CWS-TOOLING: integrate CWS dr66

2009-01-22 15:51:40 +0100 dr  r266730 : #i98028# moved to CWS dr66
2009-01-22 15:50:28 +0100 dr  r266729 : #i98028# moved to CWS dr66
2009-01-20 16:25:49 +0100 dr  r266595 : #i98282# resolve palette colors while loading chart gradients (convert back to unx lineends...)
2009-01-20 16:23:19 +0100 dr  r266594 : #i98282# resolve palette colors while loading chart gradients
2009-01-19 15:43:57 +0100 dr  r266507 : #i97900# move fix to CWS dr66
2009-01-19 15:40:28 +0100 dr  r266506 : #i97900# move fix to CWS dr66
2009-01-19 15:20:14 +0100 dr  r266505 : #i98141# correctly update note position while switching LTR/RTL mode of sheet
2009-01-06 10:28:02 +0100 dr  r265899 : CWS-TOOLING: rebase CWS dr66 to trunk@265758 (milestone: DEV300:m38)
2008-11-13 13:59:02 +0100 dr  r263644 : #i10000# merge problems
2008-11-13 13:25:15 +0100 dr  r263639 : #i10000# merge problems
2008-11-13 13:22:58 +0100 dr  r263638 : #i10000# merge problems
2008-11-13 13:22:25 +0100 dr  r263637 : #i10000# merge problems
2008-11-12 13:40:46 +0100 dr  r263595 : #i10000# merge problem
2008-11-12 11:34:51 +0100 dr  r263583 : CWS-TOOLING: rebase CWS dr66 to trunk@263288 (milestone: DEV300:m35)
2008-11-11 16:58:11 +0100 dr  r263568 : CWS-TOOLING: rebase CWS dr66 to trunk@262087 (milestone: DEV300:m33)
2008-10-27 14:38:34 +0100 dr  r262675 : migrate CWS dr66 to SVN
This commit is contained in:
Oliver Bolte 2009-03-02 14:19:13 +00:00
parent 7916faf1b8
commit 0abfa25fe4
4 changed files with 57 additions and 35 deletions

View file

@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svditer.hxx,v $
* $Revision: 1.9 $
* $Revision: 1.9.246.1 $
*
* This file is part of OpenOffice.org.
*
@ -37,6 +37,7 @@
class SdrObjList;
class SdrObject;
class SdrMarkList;
// SdrObjListIter methods:
// IM_FLAT : Flach ueber die Liste
@ -51,6 +52,8 @@ class SVX_DLLPUBLIC SdrObjListIter
BOOL mbReverse;
void ImpProcessObjectList(const SdrObjList& rObjList, SdrIterMode eMode, BOOL bUseZOrder);
void ImpProcessMarkList(const SdrMarkList& rMarkList, SdrIterMode eMode);
void ImpProcessObj(SdrObject* pObj, SdrIterMode eMode, BOOL bUseZOrder);
public:
SdrObjListIter(const SdrObjList& rObjList, SdrIterMode eMode = IM_DEEPNOGROUPS, BOOL bReverse = FALSE);
@ -67,6 +70,9 @@ public:
SdrObject and is no longer limited to group objects */
SdrObjListIter(const SdrObject& rObj, SdrIterMode eMode = IM_DEEPNOGROUPS, BOOL bReverse = FALSE);
/** Iterates over a list of marked objects received from the SdrMarkView. */
SdrObjListIter(const SdrMarkList& rMarkList, SdrIterMode eMode = IM_DEEPNOGROUPS, BOOL bReverse = FALSE);
void Reset() { mnIndex = (mbReverse ? maObjList.Count() : 0L); }
BOOL IsMore() const { return (mbReverse ? mnIndex != 0 : ( mnIndex < maObjList.Count())); }
SdrObject* Next() { return (SdrObject*)maObjList.GetObject(mbReverse ? --mnIndex : mnIndex++); }

View file

@ -616,13 +616,13 @@ public:
// BOOL bLookForEnd );
//
SdrObject* ImportObj(SvStream& rSt, void* pData,
const Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup = 0, sal_Int32* pShapeId = NULL);
Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup = 0, sal_Int32* pShapeId = NULL);
SdrObject* ImportGroup( const DffRecordHeader& rHd, SvStream& rSt, void* pData,
const Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup = 0, sal_Int32* pShapeId = NULL );
Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup = 0, sal_Int32* pShapeId = NULL );
SdrObject* ImportShape( const DffRecordHeader& rHd, SvStream& rSt, void* pData,
const Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup = 0, sal_Int32* pShapeId = NULL);
Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup = 0, sal_Int32* pShapeId = NULL);
Rectangle GetGlobalChildAnchor( const DffRecordHeader& rHd, SvStream& rSt, Rectangle& aClientRect );
void GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt,

View file

@ -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 )

View file

@ -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;
}
sal_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 = sal_False;
if(eMode != IM_DEEPNOGROUPS || !bIsGroup)
maObjList.Insert(pObj, LIST_APPEND);
if(bIsGroup && eMode != IM_FLAT)
ImpProcessObjectList(*pObj->GetSubList(), eMode, bUseZOrder);
SdrObject* pObj = bUseZOrder ?
rObjList.GetObj( nIdx ) : rObjList.GetObjectForNavigationPosition( nIdx );
OSL_ASSERT( pObj != 0 );
if( pObj )
ImpProcessObj( pObj, eMode, bUseZOrder );
}
}
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 );
}
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( !bIsGroup || (eMode != IM_DEEPNOGROUPS) )
maObjList.Insert( pObj, LIST_APPEND );
if( bIsGroup && (eMode != IM_FLAT) )
ImpProcessObjectList( *pObj->GetSubList(), eMode, bUseZOrder );
}