INTEGRATION: CWS swundo01 (1.9.126); FILE MERGED

2004/05/25 14:43:39 hbrinkm 1.9.126.3: #116912# Compile time fixes
2003/11/18 13:47:21 hbrinkm 1.9.126.2: #i7983#
2003/08/15 14:14:19 hbrinkm 1.9.126.1: #111827#
This commit is contained in:
Rüdiger Timm
2004-05-25 14:20:49 +00:00
parent d1a30ede51
commit 8a98e5e529

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: docstyle.cxx,v $ * $RCSfile: docstyle.cxx,v $
* *
* $Revision: 1.10 $ * $Revision: 1.11 $
* *
* last change: $Author: kz $ $Date: 2004-05-18 14:09:49 $ * last change: $Author: rt $ $Date: 2004-05-25 15:20:49 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -1043,7 +1043,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr)
SwPageDesc aDesc( *pDesc ); SwPageDesc aDesc( *pDesc );
aDesc.SetFollow( pFollowDesc ); aDesc.SetFollow( pFollowDesc );
rDoc.ChgPageDesc( nId, aDesc ); rDoc.ChgPageDesc( nId, aDesc );
pDesc = &rDoc.GetPageDesc( nId ); pDesc = &const_cast<const SwDoc &>(rDoc).GetPageDesc( nId );
} }
} }
break; break;
@@ -1336,7 +1336,7 @@ void SwDocStyleSheet::SetItemSet(const SfxItemSet& rSet)
{ {
::ItemSetToPageDesc( aSet, *pNewDsc ); ::ItemSetToPageDesc( aSet, *pNewDsc );
rDoc.ChgPageDesc( nPgDscPos, *pNewDsc ); rDoc.ChgPageDesc( nPgDscPos, *pNewDsc );
pDesc = &rDoc.GetPageDesc( nPgDscPos ); pDesc = &const_cast<const SwDoc &>(rDoc).GetPageDesc( nPgDscPos );
rDoc.PreDelPageDesc(pNewDsc); // #i7983# rDoc.PreDelPageDesc(pNewDsc); // #i7983#
delete pNewDsc; delete pNewDsc;
} }
@@ -1393,7 +1393,8 @@ void lcl_SaveStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
{ {
for( sal_uInt16 n = 0, nCnt = rDoc.GetPageDescCnt(); n < nCnt; ++n ) for( sal_uInt16 n = 0, nCnt = rDoc.GetPageDescCnt(); n < nCnt; ++n )
{ {
void* p = (void*)&rDoc.GetPageDesc( n ); void* p =
(void*)&const_cast<const SwDoc &>(rDoc).GetPageDesc( n );
rArr.Insert( p, n ); rArr.Insert( p, n );
} }
} }
@@ -1467,7 +1468,8 @@ void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
SvUShorts aDelArr; SvUShorts aDelArr;
for( n = 0, nCnt = rDoc.GetPageDescCnt(); n < nCnt; ++n ) for( n = 0, nCnt = rDoc.GetPageDescCnt(); n < nCnt; ++n )
{ {
void* p = (void*)&rDoc.GetPageDesc( n ); void* p =
(void*)&const_cast<const SwDoc &>(rDoc).GetPageDesc( n );
if( USHRT_MAX == rArr.GetPos( p )) if( USHRT_MAX == rArr.GetPos( p ))
aDelArr.Insert( n, 0 ); aDelArr.Insert( n, 0 );
} }
@@ -1723,7 +1725,7 @@ void SwDocStyleSheet::Create()
if( !pDesc ) if( !pDesc )
{ {
USHORT nId = rDoc.MakePageDesc(aName); USHORT nId = rDoc.MakePageDesc(aName);
pDesc = &rDoc.GetPageDesc(nId); pDesc = &const_cast<const SwDoc &>(rDoc).GetPageDesc(nId);
} }
break; break;
@@ -2138,7 +2140,9 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
pTargetFmt->ResetAllAttr(); pTargetFmt->ResetAllAttr();
if( USHRT_MAX != nPgDscPos ) if( USHRT_MAX != nPgDscPos )
rDoc.ChgPageDesc( nPgDscPos, rDoc.GetPageDesc(nPgDscPos) ); rDoc.ChgPageDesc( nPgDscPos,
const_cast<const SwDoc &>(rDoc).
GetPageDesc(nPgDscPos) );
} }
((SwDocStyleSheet&)rTarget).SetItemSet( rSource.GetItemSet() ); ((SwDocStyleSheet&)rTarget).SetItemSet( rSource.GetItemSet() );
} }
@@ -2655,7 +2659,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
const USHORT nCount = rDoc.GetPageDescCnt(); const USHORT nCount = rDoc.GetPageDescCnt();
for(USHORT i = 0; i < nCount; ++i) for(USHORT i = 0; i < nCount; ++i)
{ {
const SwPageDesc& rDesc = rDoc.GetPageDesc(i); const SwPageDesc& rDesc =
const_cast<const SwDoc &>(rDoc).GetPageDesc(i);
const USHORT nId = rDesc.GetPoolFmtId(); const USHORT nId = rDesc.GetPoolFmtId();
BOOL bUsed = bSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc)); BOOL bUsed = bSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc));
if( !bUsed ) if( !bUsed )