const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Icb14a036ea9d7636359b6bc5e0af17568c0d54cb
This commit is contained in:
parent
5429049e3b
commit
6f3c52bb37
@ -65,13 +65,13 @@ public:
|
||||
|
||||
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
|
||||
inline void ChgDefinedIn( const SwModify* pNew )
|
||||
{ pDefinedIn = (SwModify*)pNew; }
|
||||
{ pDefinedIn = const_cast<SwModify*>(pNew); }
|
||||
// BoxAttribut -> BoxStartNode
|
||||
virtual const SwNode* GetNodeOfFormula() const SAL_OVERRIDE;
|
||||
|
||||
SwTableBox* GetTableBox();
|
||||
const SwTableBox* GetTableBox() const
|
||||
{ return ((SwTblBoxFormula*)this)->GetTableBox(); }
|
||||
{ return const_cast<SwTblBoxFormula*>(this)->GetTableBox(); }
|
||||
|
||||
void ChangeState( const SfxPoolItem* pItem );
|
||||
void Calc( SwTblCalcPara& rCalcPara, double& rValue );
|
||||
|
@ -51,7 +51,7 @@ class SdrTextObj;
|
||||
Implementation in dcontact.cxx. */
|
||||
SW_DLLPUBLIC SwFrmFmt *FindFrmFmt( SdrObject *pObj );
|
||||
inline const SwFrmFmt *FindFrmFmt( const SdrObject *pObj )
|
||||
{ return ::FindFrmFmt( (SdrObject*)pObj ); }
|
||||
{ return ::FindFrmFmt( const_cast<SdrObject*>(pObj) ); }
|
||||
bool HasWrap( const SdrObject* pObj );
|
||||
|
||||
void setContextWritingMode( SdrObject* pObj, SwFrm* pAnchor );
|
||||
|
@ -1686,7 +1686,7 @@ void ClrContourCache();
|
||||
|
||||
inline const SwTableNode* SwDoc::IsIdxInTbl( const SwNodeIndex& rIdx ) const
|
||||
{
|
||||
return ((SwDoc*)this)->IsIdxInTbl( rIdx );
|
||||
return const_cast<SwDoc*>(this)->IsIdxInTbl( rIdx );
|
||||
}
|
||||
|
||||
inline SvNumberFormatter* SwDoc::GetNumberFormatter( bool bCreate )
|
||||
@ -1698,7 +1698,7 @@ inline SvNumberFormatter* SwDoc::GetNumberFormatter( bool bCreate )
|
||||
|
||||
inline const SvNumberFormatter* SwDoc::GetNumberFormatter( bool bCreate ) const
|
||||
{
|
||||
return ((SwDoc*)this)->GetNumberFormatter( bCreate );
|
||||
return const_cast<SwDoc*>(this)->GetNumberFormatter( bCreate );
|
||||
}
|
||||
|
||||
inline void SwDoc::SetOLEPrtNotifyPending( bool bSet )
|
||||
|
@ -225,7 +225,7 @@ public:
|
||||
/// For Core - it knows the DocShell but not the WrtShell!
|
||||
SwFEShell *GetFEShell();
|
||||
const SwFEShell *GetFEShell() const
|
||||
{ return ((SwDocShell*)this)->GetFEShell(); }
|
||||
{ return const_cast<SwDocShell*>(this)->GetFEShell(); }
|
||||
|
||||
/// For inserting document.
|
||||
Reader* StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
|
||||
|
@ -863,7 +863,7 @@ public:
|
||||
/// Query NumberFormater from document.
|
||||
SvNumberFormatter* GetNumberFormatter();
|
||||
const SvNumberFormatter* GetNumberFormatter() const
|
||||
{ return ((SwEditShell*)this)->GetNumberFormatter(); }
|
||||
{ return const_cast<SwEditShell*>(this)->GetNumberFormatter(); }
|
||||
|
||||
/// Interfaces for GlobalDocument.
|
||||
bool IsGlobalDoc() const;
|
||||
@ -948,7 +948,7 @@ private:
|
||||
};
|
||||
|
||||
inline const sfx2::LinkManager& SwEditShell::GetLinkManager() const
|
||||
{ return ((SwEditShell*)this)->GetLinkManager(); }
|
||||
{ return const_cast<SwEditShell*>(this)->GetLinkManager(); }
|
||||
|
||||
/// Class for automated call of Start- and EndAction().
|
||||
class SwActContext {
|
||||
|
@ -272,7 +272,7 @@ public:
|
||||
|
||||
inline void SwFieldType::UpdateFlds() const
|
||||
{
|
||||
((SwFieldType*)this)->ModifyNotification( 0, 0 );
|
||||
const_cast<SwFieldType*>(this)->ModifyNotification( 0, 0 );
|
||||
}
|
||||
|
||||
/** Base class of all fields.
|
||||
@ -414,7 +414,7 @@ public:
|
||||
virtual SwFieldType* ChgTyp( SwFieldType* ) SAL_OVERRIDE;
|
||||
virtual void SetLanguage(sal_uInt16 nLng) SAL_OVERRIDE;
|
||||
|
||||
inline SwDoc* GetDoc() const { return const_cast<SwValueFieldType*>(static_cast<const SwValueFieldType*>(GetTyp()))->GetDoc(); }
|
||||
inline SwDoc* GetDoc() const { return static_cast<const SwValueFieldType*>(GetTyp())->GetDoc(); }
|
||||
|
||||
virtual double GetValue() const;
|
||||
virtual void SetValue( const double& rVal );
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
|
||||
/// Query / set where attribute is anchored.
|
||||
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
|
||||
void ChgDefinedIn( const SwModify* pNew ) { pDefinedIn = (SwModify*)pNew; }
|
||||
void ChgDefinedIn( const SwModify* pNew ) { pDefinedIn = const_cast<SwModify*>(pNew); }
|
||||
void RegisterToEndNotInfo( SwEndNoteInfo& );
|
||||
void RegisterToPageDesc( SwPageDesc& );
|
||||
bool KnowsPageDesc() const;
|
||||
|
@ -97,7 +97,7 @@ public:
|
||||
The UserCall knows its SdrObject. */
|
||||
SwContact *FindContactObj();
|
||||
const SwContact *FindContactObj() const
|
||||
{ return ((SwFrmFmt*)this)->FindContactObj(); }
|
||||
{ return const_cast<SwFrmFmt*>(this)->FindContactObj(); }
|
||||
|
||||
/** @return the SdrObject, that is connected to the ContactObject.
|
||||
Only DrawFrmFmts are connected to the "real SdrObject". FlyFrmFmts
|
||||
@ -105,11 +105,11 @@ public:
|
||||
"Real SdrObject" has position and a Z-order. */
|
||||
SdrObject *FindSdrObject();
|
||||
const SdrObject *FindSdrObject() const
|
||||
{ return ((SwFrmFmt*)this)->FindSdrObject(); }
|
||||
{ return const_cast<SwFrmFmt*>(this)->FindSdrObject(); }
|
||||
|
||||
SdrObject *FindRealSdrObject();
|
||||
const SdrObject *FindRealSdrObject() const
|
||||
{ return ((SwFrmFmt*)this)->FindRealSdrObject(); }
|
||||
{ return const_cast<SwFrmFmt*>(this)->FindRealSdrObject(); }
|
||||
|
||||
bool IsLowerOf( const SwFrmFmt& rFmt ) const;
|
||||
|
||||
|
@ -660,15 +660,15 @@ inline bool SwNode::IsGrfNode() const
|
||||
|
||||
inline const SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp ) const
|
||||
{
|
||||
return ((SwNode*)this)->FindSttNodeByType( eTyp );
|
||||
return const_cast<SwNode*>(this)->FindSttNodeByType( eTyp );
|
||||
}
|
||||
inline const SwTableNode* SwNode::FindTableNode() const
|
||||
{
|
||||
return ((SwNode*)this)->FindTableNode();
|
||||
return const_cast<SwNode*>(this)->FindTableNode();
|
||||
}
|
||||
inline const SwSectionNode* SwNode::FindSectionNode() const
|
||||
{
|
||||
return ((SwNode*)this)->FindSectionNode();
|
||||
return const_cast<SwNode*>(this)->FindSectionNode();
|
||||
}
|
||||
inline sal_uLong SwNode::StartOfSectionIndex() const
|
||||
{
|
||||
|
@ -253,7 +253,7 @@ public:
|
||||
|
||||
inline void SwPageDesc::SetFollow( const SwPageDesc* pNew )
|
||||
{
|
||||
pFollow = pNew ? (SwPageDesc*)pNew : this;
|
||||
pFollow = pNew ? const_cast<SwPageDesc*>(pNew) : this;
|
||||
}
|
||||
|
||||
inline bool SwPageDesc::IsHeaderShared() const
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
/// Get and set Modify pointer.
|
||||
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
|
||||
inline void ChgDefinedIn( const SwModify* pNew )
|
||||
{ pDefinedIn = (SwModify*)pNew; }
|
||||
{ pDefinedIn = const_cast<SwModify*>(pNew); }
|
||||
};
|
||||
|
||||
class SwRegisterItem : public SfxBoolItem
|
||||
|
@ -47,7 +47,7 @@ protected:
|
||||
|
||||
inline const SwDDEFieldType* SwDDETable::GetDDEFldType() const
|
||||
{
|
||||
return ((SwDDETable*)this)->GetDDEFldType();
|
||||
return const_cast<SwDDETable*>(this)->GetDDEFldType();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -285,7 +285,7 @@ public:
|
||||
// Get box, whose start index is set on nBoxStt.
|
||||
SwTableBox* GetTblBox( sal_uLong nSttIdx );
|
||||
const SwTableBox* GetTblBox( sal_uLong nSttIdx ) const
|
||||
{ return ((SwTable*)this)->GetTblBox( nSttIdx ); }
|
||||
{ return const_cast<SwTable*>(this)->GetTblBox( nSttIdx ); }
|
||||
|
||||
// Returns true if table contains nestings.
|
||||
bool IsTblComplex() const;
|
||||
|
@ -476,7 +476,7 @@ public:
|
||||
|
||||
// DrawView may be used at UI.
|
||||
SdrView *GetDrawView();
|
||||
const SdrView *GetDrawView() const { return ((SwViewShell*)this)->GetDrawView(); }
|
||||
const SdrView *GetDrawView() const { return const_cast<SwViewShell*>(this)->GetDrawView(); }
|
||||
|
||||
// Take care that MarkList is up-to-date in any case (Bug 57153).
|
||||
SdrView *GetDrawViewWithValidMarkList();
|
||||
@ -626,7 +626,7 @@ inline void SwViewShell::UnlockPaint( bool bVirDev )
|
||||
}
|
||||
inline const SfxItemPool& SwViewShell::GetAttrPool() const
|
||||
{
|
||||
return ((SwViewShell*)this)->GetAttrPool();
|
||||
return const_cast<SwViewShell*>(this)->GetAttrPool();
|
||||
}
|
||||
|
||||
#endif // INCLUDED_SW_INC_VIEWSH_HXX
|
||||
|
@ -3163,7 +3163,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
|
||||
SwHyperlinkIter_Impl aHIter( pTxtFrm );
|
||||
sal_Int32 nTIndex = -1;
|
||||
SwTOXSortTabBase* pTBase = GetTOXSortTabBase();
|
||||
SwTxtAttr* pHt = (SwTxtAttr*)(aHIter.next());
|
||||
SwTxtAttr* pHt = const_cast<SwTxtAttr*>(aHIter.next());
|
||||
while( (nLinkIndex < getHyperLinkCount()) && nTIndex < nLinkIndex)
|
||||
{
|
||||
sal_Int32 nHStt = -1;
|
||||
@ -3227,7 +3227,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
|
||||
// iterate next
|
||||
if( bH )
|
||||
// iterate next hyperlink
|
||||
pHt = (SwTxtAttr*)(aHIter.next());
|
||||
pHt = const_cast<SwTxtAttr*>(aHIter.next());
|
||||
else if(bTOC)
|
||||
continue;
|
||||
else
|
||||
|
@ -187,11 +187,11 @@ void SwFmt::CopyAttrs( const SwFmt& rFmt, bool bReplace )
|
||||
SetInSwFntCache( false );
|
||||
|
||||
// special treatments for some attributes
|
||||
SwAttrSet* pChgSet = (SwAttrSet*)&rFmt.aSet;
|
||||
SwAttrSet* pChgSet = const_cast<SwAttrSet*>(&rFmt.aSet);
|
||||
|
||||
if( !bReplace ) // refresh only those that are not set?
|
||||
{
|
||||
if( pChgSet == (SwAttrSet*)&rFmt.aSet )
|
||||
if( pChgSet == &rFmt.aSet )
|
||||
pChgSet = new SwAttrSet( rFmt.aSet );
|
||||
pChgSet->Differentiate( aSet );
|
||||
}
|
||||
@ -215,7 +215,7 @@ void SwFmt::CopyAttrs( const SwFmt& rFmt, bool bReplace )
|
||||
}
|
||||
}
|
||||
|
||||
if( pChgSet != (SwAttrSet*)&rFmt.aSet ) // was a Set created?
|
||||
if( pChgSet != &rFmt.aSet ) // was a Set created?
|
||||
delete pChgSet;
|
||||
}
|
||||
|
||||
|
@ -831,7 +831,7 @@ SwField* SwCrsrShell::GetFieldAtCrsr(
|
||||
: 1;
|
||||
if ( ( pCrsr->End()->nContent.GetIndex() - pCrsr->Start()->nContent.GetIndex() ) <= nTxtFldLength )
|
||||
{
|
||||
pFieldAtCrsr = (SwField*)pTxtFld->GetFmtFld().GetField();
|
||||
pFieldAtCrsr = const_cast<SwField*>(pTxtFld->GetFmtFld().GetField());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1783,7 +1783,7 @@ bool SwCrsrShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
|
||||
SwCrsrSaveState aSaveState( *pCrsr );
|
||||
|
||||
pCrsr->GetPoint()->nNode = *rAttr.GetpTxtNode();
|
||||
pCrsr->GetPoint()->nContent.Assign( (SwTxtNode*)rAttr.GetpTxtNode(),
|
||||
pCrsr->GetPoint()->nContent.Assign( const_cast<SwTxtNode*>(rAttr.GetpTxtNode()),
|
||||
rAttr.GetStart() );
|
||||
bRet = !pCrsr->IsSelOvr();
|
||||
if( bRet )
|
||||
|
@ -52,7 +52,7 @@ int SwFindParaFmtColl::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion
|
||||
nRet = FIND_NOT_FOUND;
|
||||
else if( pReplColl )
|
||||
{
|
||||
pCrsr->GetDoc()->SetTxtFmtColl( *pCrsr, (SwTxtFmtColl*)pReplColl );
|
||||
pCrsr->GetDoc()->SetTxtFmtColl( *pCrsr, const_cast<SwTxtFmtColl*>(pReplColl) );
|
||||
nRet = FIND_NO_RING;
|
||||
}
|
||||
return nRet;
|
||||
|
@ -520,7 +520,7 @@ SwPaM* SwPaM::MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg )
|
||||
}
|
||||
else
|
||||
{
|
||||
pPam = new SwPaM( *(SwPaM*)pOrigRg ); // given search area
|
||||
pPam = new SwPaM( *const_cast<SwPaM*>(pOrigRg) ); // given search area
|
||||
// make sure that SPoint is on the "real" start position
|
||||
// FORWARD: SPoint always smaller than GetMark
|
||||
// BACKWARD: SPoint always bigger than GetMark
|
||||
|
@ -366,7 +366,7 @@ bool SwCursor::IsSelOvr( int eFlags )
|
||||
}
|
||||
}
|
||||
|
||||
SwCntntNode* pCNd = (pFrm != NULL) ? (SwCntntNode*)pFrm->GetNode() : NULL;
|
||||
SwCntntNode* pCNd = (pFrm != NULL) ? const_cast<SwCntntNode*>(pFrm->GetNode()) : NULL;
|
||||
if ( pCNd != NULL )
|
||||
{
|
||||
// set this CntntNode as new position
|
||||
@ -2250,7 +2250,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
|
||||
|
||||
void SwTableCursor::InsertBox( const SwTableBox& rTblBox )
|
||||
{
|
||||
SwTableBox* pBox = (SwTableBox*)&rTblBox;
|
||||
SwTableBox* pBox = const_cast<SwTableBox*>(&rTblBox);
|
||||
m_SelectedBoxes.insert(pBox);
|
||||
m_bChanged = true;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ SwLayoutFrm* GetCurrColumn( const SwLayoutFrm* pLayFrm )
|
||||
{
|
||||
while( pLayFrm && !pLayFrm->IsColumnFrm() )
|
||||
pLayFrm = pLayFrm->GetUpper();
|
||||
return (SwLayoutFrm*)pLayFrm;
|
||||
return const_cast<SwLayoutFrm*>(pLayFrm);
|
||||
}
|
||||
|
||||
SwLayoutFrm* GetNextColumn( const SwLayoutFrm* pLayFrm )
|
||||
@ -46,7 +46,7 @@ SwLayoutFrm* GetPrevColumn( const SwLayoutFrm* pLayFrm )
|
||||
|
||||
SwCntntFrm* GetColumnStt( const SwLayoutFrm* pColFrm )
|
||||
{
|
||||
return pColFrm ? (SwCntntFrm*)pColFrm->ContainsCntnt() : 0;
|
||||
return pColFrm ? const_cast<SwCntntFrm*>(pColFrm->ContainsCntnt()) : 0;
|
||||
}
|
||||
|
||||
SwCntntFrm* GetColumnEnd( const SwLayoutFrm* pColFrm )
|
||||
|
@ -423,7 +423,7 @@ void SwSelPaintRects::HighlightInputFld()
|
||||
}
|
||||
else
|
||||
{
|
||||
SdrView* pView = (SdrView*)GetShell()->GetDrawView();
|
||||
SdrView* pView = const_cast<SdrView*>(GetShell()->GetDrawView());
|
||||
SdrPaintWindow* pCandidate = pView->GetPaintWindow(0);
|
||||
rtl::Reference<sdr::overlay::OverlayManager> xTargetOverlay = pCandidate->GetOverlayManager();
|
||||
|
||||
|
@ -2289,7 +2289,7 @@ bool DocumentContentOperationsManager::MoveAndJoin( SwPaM& rPaM, SwPosition& rPo
|
||||
|
||||
bool DocumentContentOperationsManager::Overwrite( const SwPaM &rRg, const OUString &rStr )
|
||||
{
|
||||
SwPosition& rPt = *(SwPosition*)rRg.GetPoint();
|
||||
SwPosition& rPt = *const_cast<SwPosition*>(rRg.GetPoint());
|
||||
if( m_rDoc.GetAutoCorrExceptWord() ) // Add to AutoCorrect
|
||||
{
|
||||
if( 1 == rStr.getLength() )
|
||||
|
@ -475,7 +475,7 @@ bool DocumentFieldsManager::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
|
||||
|
||||
bool bTblSelBreak = false;
|
||||
|
||||
SwFmtFld * pDstFmtFld = (SwFmtFld*)&pDstTxtFld->GetFmtFld();
|
||||
SwFmtFld * pDstFmtFld = const_cast<SwFmtFld*>(&pDstTxtFld->GetFmtFld());
|
||||
SwField * pDstFld = pDstFmtFld->GetField();
|
||||
sal_uInt16 nFldWhich = rSrcFld.GetTyp()->Which();
|
||||
SwNodeIndex aTblNdIdx(pDstTxtFld->GetTxtNode());
|
||||
@ -906,7 +906,7 @@ void DocumentFieldsManager::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds
|
||||
int nShownSections = 0;
|
||||
for( _SetGetExpFlds::const_iterator it = mpUpdtFlds->GetSortLst()->begin(); it != mpUpdtFlds->GetSortLst()->end(); ++it )
|
||||
{
|
||||
SwSection* pSect = (SwSection*)(*it)->GetSection();
|
||||
SwSection* pSect = const_cast<SwSection*>((*it)->GetSection());
|
||||
if ( pSect && !pSect->IsCondHidden())
|
||||
nShownSections++;
|
||||
}
|
||||
@ -914,7 +914,7 @@ void DocumentFieldsManager::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds
|
||||
OUString aNew;
|
||||
for( _SetGetExpFlds::const_iterator it = mpUpdtFlds->GetSortLst()->begin(); it != mpUpdtFlds->GetSortLst()->end(); ++it )
|
||||
{
|
||||
SwSection* pSect = (SwSection*)(*it)->GetSection();
|
||||
SwSection* pSect = const_cast<SwSection*>((*it)->GetSection());
|
||||
if( pSect )
|
||||
{
|
||||
|
||||
@ -947,14 +947,14 @@ void DocumentFieldsManager::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds
|
||||
continue;
|
||||
}
|
||||
|
||||
SwTxtFld* pTxtFld = (SwTxtFld*)(*it)->GetTxtFld();
|
||||
SwTxtFld* pTxtFld = const_cast<SwTxtFld*>((*it)->GetTxtFld());
|
||||
if( !pTxtFld )
|
||||
{
|
||||
OSL_ENSURE( false, "what's wrong now'" );
|
||||
continue;
|
||||
}
|
||||
|
||||
SwFmtFld* pFmtFld = (SwFmtFld*)&pTxtFld->GetFmtFld();
|
||||
SwFmtFld* pFmtFld = const_cast<SwFmtFld*>(&pTxtFld->GetFmtFld());
|
||||
const SwField* pFld = pFmtFld->GetField();
|
||||
|
||||
switch( nWhich = pFld->GetTyp()->Which() )
|
||||
|
@ -340,7 +340,7 @@ SwFrmFmt *DocumentLayoutManager::CopyLayoutFmt(
|
||||
const bool bDraw = RES_DRAWFRMFMT == rSource.Which();
|
||||
OSL_ENSURE( bFly || bDraw, "this method only works for fly or draw" );
|
||||
|
||||
SwDoc* pSrcDoc = (SwDoc*)rSource.GetDoc();
|
||||
SwDoc* pSrcDoc = const_cast<SwDoc*>(rSource.GetDoc());
|
||||
|
||||
// May we copy this object?
|
||||
// We may, unless it's 1) it's a control (and therfore a draw)
|
||||
|
@ -154,8 +154,8 @@ namespace
|
||||
&pTableFmt->GetDoc()->GetNodes() == &pFBox->GetSttNd()->GetNodes() )
|
||||
{
|
||||
// a table in the normal NodesArr
|
||||
pItem->pTblNd = (SwTableNode*)
|
||||
pFBox->GetSttNd()->FindTableNode();
|
||||
pItem->pTblNd = const_cast<SwTableNode*>(
|
||||
pFBox->GetSttNd()->FindTableNode());
|
||||
return false;
|
||||
}
|
||||
// If the name is already correct, but not the rest then we don't have them.
|
||||
@ -471,7 +471,7 @@ bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr,
|
||||
SwNode* pNd;
|
||||
const SwFlyFrmFmt* pFlyFmt = m_rDoc.FindFlyByName( sName );
|
||||
if( pFlyFmt &&
|
||||
0 != ( pIdx = (SwNodeIndex*)pFlyFmt->GetCntnt().GetCntntIdx() ) &&
|
||||
0 != ( pIdx = const_cast<SwNodeIndex*>(pFlyFmt->GetCntnt().GetCntntIdx()) ) &&
|
||||
!( pNd = &pIdx->GetNode())->IsNoTxtNode() )
|
||||
{
|
||||
rpRange = new SwNodeRange( *pNd, 1, *pNd->EndOfSectionNode() );
|
||||
|
@ -162,7 +162,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve
|
||||
case EVENT_OBJECT_URLITEM:
|
||||
case EVENT_OBJECT_IMAGE:
|
||||
{
|
||||
const SwFrmFmt* pFmt = (SwFrmFmt*)rCallEvent.PTR.pFmt;
|
||||
const SwFrmFmt* pFmt = rCallEvent.PTR.pFmt;
|
||||
if( bCheckPtr )
|
||||
{
|
||||
if ( GetSpzFrmFmts()->Contains( pFmt ) )
|
||||
@ -178,7 +178,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve
|
||||
const IMapObject* pIMapObj = rCallEvent.PTR.IMAP.pIMapObj;
|
||||
if( bCheckPtr )
|
||||
{
|
||||
const SwFrmFmt* pFmt = (SwFrmFmt*)rCallEvent.PTR.IMAP.pFmt;
|
||||
const SwFrmFmt* pFmt = rCallEvent.PTR.IMAP.pFmt;
|
||||
const ImageMap* pIMap;
|
||||
if( GetSpzFrmFmts()->Contains( pFmt ) &&
|
||||
0 != (pIMap = pFmt->GetURL().GetMap()) )
|
||||
|
@ -1291,7 +1291,7 @@ bool SwCompareLine::ChangesInLine( const SwCompareLine& rLine,
|
||||
if( ND_TEXTNODE == rNode.GetNodeType() &&
|
||||
ND_TEXTNODE == rLine.GetNode().GetNodeType() )
|
||||
{
|
||||
SwTxtNode& rDstNd = *(SwTxtNode*)rNode.GetTxtNode();
|
||||
SwTxtNode& rDstNd = *const_cast<SwTxtNode*>(rNode.GetTxtNode());
|
||||
const SwTxtNode& rSrcNd = *rLine.GetNode().GetTxtNode();
|
||||
SwDoc* pDstDoc = rDstNd.GetDoc();
|
||||
|
||||
|
@ -299,7 +299,7 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, const SwFmtHeader &rHead,
|
||||
}
|
||||
else
|
||||
::lcl_DescSetAttr( *pRight,
|
||||
*(SwFrmFmt*)rFmtHead.GetHeaderFmt(), false );
|
||||
*const_cast<SwFrmFmt*>(rFmtHead.GetHeaderFmt()), false );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -371,7 +371,7 @@ void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, const SwFmtFooter &rFoot,
|
||||
}
|
||||
else
|
||||
::lcl_DescSetAttr( *pRight,
|
||||
*(SwFrmFmt*)rFmtFoot.GetFooterFmt(), false );
|
||||
*const_cast<SwFrmFmt*>(rFmtFoot.GetFooterFmt()), false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ _SaveRedlEndPosForRestore::_SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx
|
||||
pSavArr = new std::vector<SwPosition*>;
|
||||
pSavIdx = new SwNodeIndex( rInsIdx, -1 );
|
||||
}
|
||||
pSavArr->push_back( (SwPosition*)pEnd );
|
||||
pSavArr->push_back( const_cast<SwPosition*>(pEnd) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -532,7 +532,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
|
||||
nStat = nPageNr - *pPageSt + 1;
|
||||
else
|
||||
nStat = nPageNr + *pPageCnt - *pPageSt + 1;
|
||||
::SetProgressState( nStat, (SwDocShell*)GetDocShell() );
|
||||
::SetProgressState( nStat, const_cast<SwDocShell*>(GetDocShell()) );
|
||||
}
|
||||
//Spell() changes the pSpellArgs in case an error is found
|
||||
sal_Int32 nBeginGrammarCheck = 0;
|
||||
|
@ -242,7 +242,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
|
||||
const std::set<sal_uInt16> &rAttrs,
|
||||
const bool bSendDataChangedEvents )
|
||||
{
|
||||
SwPaM* pPam = (SwPaM*)&rRg;
|
||||
SwPaM* pPam = const_cast<SwPaM*>(&rRg);
|
||||
if( !bTxtAttr && !rAttrs.empty() && RES_TXTATR_END > *(rAttrs.begin()) )
|
||||
bTxtAttr = true;
|
||||
|
||||
@ -1119,7 +1119,7 @@ SwFmt* SwDoc::CopyFmt( const SwFmt& rFmt,
|
||||
}
|
||||
|
||||
// Search for the "parent" first
|
||||
SwFmt* pParent = (SwFmt*)&rDfltFmt;
|
||||
SwFmt* pParent = const_cast<SwFmt*>(&rDfltFmt);
|
||||
if( rFmt.DerivedFrom() && pParent != rFmt.DerivedFrom() )
|
||||
pParent = CopyFmt( *rFmt.DerivedFrom(), rFmtArr,
|
||||
fnCopyFmt, rDfltFmt );
|
||||
|
@ -161,7 +161,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
|
||||
return false;
|
||||
|
||||
sal_uInt16 nOutl = 0;
|
||||
SwOutlineNodes* pOutlNds = (SwOutlineNodes*)&GetNodes().GetOutLineNds();
|
||||
SwOutlineNodes* pOutlNds = const_cast<SwOutlineNodes*>(&GetNodes().GetOutLineNds());
|
||||
boost::scoped_ptr<SwOutlineNodes> xTmpOutlNds;
|
||||
SwNodePtr pStartNd;
|
||||
|
||||
|
@ -172,8 +172,8 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry,
|
||||
do {
|
||||
|
||||
SwPosition& rInsPos = *_pStartCrsr->GetPoint();
|
||||
SwStartNode* pBoxSttNd = (SwStartNode*)rInsPos.nNode.GetNode().
|
||||
FindTableBoxStartNode();
|
||||
SwStartNode* pBoxSttNd = const_cast<SwStartNode*>(rInsPos.nNode.GetNode().
|
||||
FindTableBoxStartNode());
|
||||
|
||||
if( pBoxSttNd && 2 == pBoxSttNd->EndOfSectionIndex() -
|
||||
pBoxSttNd->GetIndex() &&
|
||||
|
@ -384,8 +384,8 @@ SwFlyFrmFmt* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
|
||||
// original one and move (copy and delete) the selected boxes.
|
||||
// The size is corrected on a percentage basis.
|
||||
|
||||
SwTableNode* pTblNd = (SwTableNode*)(*pSelBoxes)[0]->
|
||||
GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>((*pSelBoxes)[0]->
|
||||
GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
break;
|
||||
|
||||
@ -1113,7 +1113,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
OSL_ENSURE( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
|
||||
"Missing FlyInCnt-Hint." );
|
||||
OSL_ENSURE( pHnt && const_cast<SwFmtFlyCnt&>(pHnt->GetFlyCnt()).
|
||||
OSL_ENSURE( pHnt && pHnt->GetFlyCnt().
|
||||
GetFrmFmt() == (SwFrmFmt*)pOldFmt,
|
||||
"Wrong TxtFlyCnt-Hint." );
|
||||
#endif
|
||||
|
@ -1452,7 +1452,7 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext,
|
||||
static_cast<sal_uInt8>(pNd->GetActualListLevel()) ))
|
||||
{
|
||||
rPos.nNode = aIdx;
|
||||
rPos.nContent.Assign( (SwTxtNode*)pNd, 0 );
|
||||
rPos.nContent.Assign( const_cast<SwTxtNode*>(pNd), 0 );
|
||||
bRet = true;
|
||||
break;
|
||||
}
|
||||
@ -1482,7 +1482,7 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext,
|
||||
else
|
||||
{
|
||||
rPos.nNode.Assign( *pLast );
|
||||
rPos.nContent.Assign( (SwTxtNode*)pLast, 0 );
|
||||
rPos.nContent.Assign( const_cast<SwTxtNode*>(pLast), 0 );
|
||||
}
|
||||
bRet = true;
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
|
||||
{
|
||||
// Via SwDoc for Undo!
|
||||
OSL_ENSURE( !rBoxes.empty(), "no valid Box list" );
|
||||
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
|
||||
|
@ -141,7 +141,7 @@ sal_uInt16 SwDoc::GetCurTOXMark( const SwPosition& rPos,
|
||||
// the attributes are sorted by Start!
|
||||
break;
|
||||
|
||||
SwTOXMark* pTMark = (SwTOXMark*) &pHt->GetTOXMark();
|
||||
SwTOXMark* pTMark = const_cast<SwTOXMark*>(&pHt->GetTOXMark());
|
||||
rArr.push_back( pTMark );
|
||||
}
|
||||
return rArr.size();
|
||||
@ -773,7 +773,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
|
||||
maMSTOCExpression.clear();
|
||||
}
|
||||
|
||||
SwDoc* pDoc = (SwDoc*)pSectNd->GetDoc();
|
||||
SwDoc* pDoc = const_cast<SwDoc*>(pSectNd->GetDoc());
|
||||
|
||||
assert(pDoc); //Where is the document?
|
||||
|
||||
@ -853,7 +853,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
|
||||
: 0;
|
||||
|
||||
SwNode2Layout aN2L( *pSectNd );
|
||||
((SwSectionNode*)pSectNd)->DelFrms();
|
||||
const_cast<SwSectionNode*>(pSectNd)->DelFrms();
|
||||
|
||||
// remove old content an insert one empty textnode (to hold the layout!)
|
||||
SwTxtNode* pFirstEmptyNd;
|
||||
@ -1649,7 +1649,7 @@ void SwTOXBaseSection::UpdatePageNum()
|
||||
const SwTxtNode* pTxtNd = pBase->pTOXNd->GetTxtNode();
|
||||
OSL_ENSURE( pTxtNd, "no TextNode, wrong TOC" );
|
||||
|
||||
_UpdatePageNum( (SwTxtNode*)pTxtNd, aNums, aDescs, pMainNums,
|
||||
_UpdatePageNum( const_cast<SwTxtNode*>(pTxtNd), aNums, aDescs, pMainNums,
|
||||
aIntl );
|
||||
}
|
||||
DELETEZ(pMainNums);
|
||||
|
@ -500,7 +500,7 @@ SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
|
||||
}
|
||||
|
||||
SwCollCondition::SwCollCondition( const SwCollCondition& rCopy )
|
||||
: SwClient( (SwModify*)rCopy.GetRegisteredIn() ), nCondition( rCopy.nCondition )
|
||||
: SwClient( const_cast<SwModify*>(rCopy.GetRegisteredIn()) ), nCondition( rCopy.nCondition )
|
||||
{
|
||||
if( USRFLD_EXPRESSION & rCopy.nCondition )
|
||||
aSubCondition.pFldExpression = new OUString( *rCopy.GetFldExpression() );
|
||||
|
@ -163,7 +163,7 @@ void SwFtnIdxs::UpdateAllFtn()
|
||||
return;
|
||||
|
||||
// Get the NodesArray via the StartIndex of the first Footnote
|
||||
SwDoc* pDoc = (SwDoc*) (*this)[ 0 ]->GetTxtNode().GetDoc();
|
||||
SwDoc* pDoc = const_cast<SwDoc*>((*this)[ 0 ]->GetTxtNode().GetDoc());
|
||||
SwTxtFtn* pTxtFtn;
|
||||
const SwEndNoteInfo& rEndInfo = pDoc->GetEndNoteInfo();
|
||||
const SwFtnInfo& rFtnInfo = pDoc->GetFtnInfo();
|
||||
|
@ -87,7 +87,7 @@ static void lcl_GCBorder_GetLastBox_B( const SwTableBox* pBox, SwTableBoxes* pPa
|
||||
lcl_GCBorder_GetLastBox_L( pLine, pPara );
|
||||
}
|
||||
else
|
||||
pPara->push_back( (SwTableBox*)pBox );
|
||||
pPara->push_back( const_cast<SwTableBox*>(pBox) );
|
||||
}
|
||||
|
||||
// Find the "end" of the passed BorderLine. Returns the "Layout"Pos!
|
||||
@ -126,7 +126,7 @@ static void lcl_GCBorder_DelBorder( const SwCollectTblLineBoxes& rCollTLB,
|
||||
sal_uInt16 nEndPos,
|
||||
SwShareBoxFmts* pShareFmts )
|
||||
{
|
||||
SwTableBox* pBox = (SwTableBox*)&rCollTLB.GetBox( rStt );
|
||||
SwTableBox* pBox = const_cast<SwTableBox*>(&rCollTLB.GetBox( rStt ));
|
||||
sal_uInt16 nNextPos;
|
||||
const SvxBorderLine* pLn = &rLine;
|
||||
|
||||
@ -148,7 +148,7 @@ static void lcl_GCBorder_DelBorder( const SwCollectTblLineBoxes& rCollTLB,
|
||||
if( ++rStt >= rCollTLB.Count() )
|
||||
break;
|
||||
|
||||
pBox = (SwTableBox*)&rCollTLB.GetBox( rStt, &nNextPos );
|
||||
pBox = const_cast<SwTableBox*>(&rCollTLB.GetBox( rStt, &nNextPos ));
|
||||
if( nNextPos > nEndPos )
|
||||
break;
|
||||
|
||||
|
@ -1669,14 +1669,14 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail,
|
||||
// are altered again.
|
||||
// Also, we need to preserve a percent setting if it exists.
|
||||
SwFrmFmt *pFrmFmt = pSwTable->GetFrmFmt();
|
||||
((SwTable *)pSwTable)->LockModify();
|
||||
const_cast<SwTable *>(pSwTable)->LockModify();
|
||||
SwFmtFrmSize aFrmSize( pFrmFmt->GetFrmSize() );
|
||||
aFrmSize.SetWidth( nRelTabWidth );
|
||||
bool bRel = bUseRelWidth &&
|
||||
text::HoriOrientation::FULL!=pFrmFmt->GetHoriOrient().GetHoriOrient();
|
||||
aFrmSize.SetWidthPercent( (sal_uInt8)(bRel ? nWidthOption : 0) );
|
||||
pFrmFmt->SetFmtAttr( aFrmSize );
|
||||
((SwTable *)pSwTable)->UnlockModify();
|
||||
const_cast<SwTable *>(pSwTable)->UnlockModify();
|
||||
|
||||
// If the table is located in a frame, we also need to adapt the
|
||||
// frame's width.
|
||||
|
@ -116,7 +116,7 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText,
|
||||
bool bVisited = false;
|
||||
if ( rURL.GetMap() )
|
||||
{
|
||||
ImageMap *pMap = (ImageMap*)rURL.GetMap();
|
||||
ImageMap *pMap = const_cast<ImageMap*>(rURL.GetMap());
|
||||
for( size_t i = 0; i < pMap->GetIMapObjectCount(); ++i )
|
||||
{
|
||||
IMapObject *pObj = pMap->GetIMapObject( i );
|
||||
@ -533,7 +533,7 @@ bool SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos,
|
||||
bool SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& ,
|
||||
SwCrsrMoveState*, bool ) const
|
||||
{
|
||||
SwCntntNode* pCNd = (SwCntntNode*)GetNode();
|
||||
SwCntntNode* pCNd = const_cast<SwCntntNode*>(GetNode());
|
||||
pPos->nNode = *pCNd;
|
||||
pPos->nContent.Assign( pCNd, 0 );
|
||||
return true;
|
||||
|
@ -301,7 +301,7 @@ void SwNumFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
}
|
||||
|
||||
if( pFmt && !pFmt->GetDoc()->IsInDtor() )
|
||||
UpdateNumNodes( (SwDoc*)pFmt->GetDoc() );
|
||||
UpdateNumNodes( const_cast<SwDoc*>(pFmt->GetDoc()) );
|
||||
else
|
||||
CheckRegistration( pOld, pNew );
|
||||
}
|
||||
|
@ -734,7 +734,7 @@ void SwTableAutoFmt::UpdateFromSet( sal_uInt8 nPos,
|
||||
if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMAT, true,
|
||||
reinterpret_cast<const SfxPoolItem**>(&pNumFmtItem) ) && pNFmtr &&
|
||||
0 != (pNumFormat = pNFmtr->GetEntry( pNumFmtItem->GetValue() )) )
|
||||
pFmt->SetValueFormat( const_cast<SvNumberformat*>(pNumFormat)->GetFormatstring(),
|
||||
pFmt->SetValueFormat( pNumFormat->GetFormatstring(),
|
||||
pNumFormat->GetLanguage(),
|
||||
::GetAppLanguage());
|
||||
else
|
||||
|
@ -777,7 +777,7 @@ bool SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
|
||||
if( 0 == ( pTmp = pMyBox->FindNextBox( *this, pMyBox, false )))
|
||||
bDelCntnt = false; // No space left?
|
||||
else
|
||||
pMyBox = (SwTableBox*)pTmp;
|
||||
pMyBox = const_cast<SwTableBox*>(pTmp);
|
||||
|
||||
} while( true );
|
||||
|
||||
@ -1040,7 +1040,7 @@ static void _FndCntntBox( const SwTableBox* pBox, SwSelBoxes* pPara )
|
||||
_FndCntntLine( pLine, pPara );
|
||||
}
|
||||
else
|
||||
pPara->insert( (SwTableBox*)pBox );
|
||||
pPara->insert( const_cast<SwTableBox*>(pBox) );
|
||||
}
|
||||
|
||||
static void _FndCntntLine( const SwTableLine* pLine, SwSelBoxes* pPara )
|
||||
@ -1053,7 +1053,7 @@ static void _FndCntntLine( const SwTableLine* pLine, SwSelBoxes* pPara )
|
||||
SwSelBoxes& SwTable::SelLineFromBox( const SwTableBox* pBox,
|
||||
SwSelBoxes& rBoxes, bool bToTop ) const
|
||||
{
|
||||
SwTableLine* pLine = (SwTableLine*)pBox->GetUpper();
|
||||
SwTableLine* pLine = const_cast<SwTableLine*>(pBox->GetUpper());
|
||||
if( bToTop )
|
||||
while( pLine->GetUpper() )
|
||||
pLine = pLine->GetUpper()->GetUpper();
|
||||
|
@ -498,7 +498,7 @@ SwRowFrm* GetRowFrm( SwTableLine& rLine )
|
||||
bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind )
|
||||
{
|
||||
OSL_ENSURE( !rBoxes.empty() && nCnt, "No valid Box List" );
|
||||
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
|
||||
@ -554,7 +554,7 @@ bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
|
||||
sal_uInt16 nCnt, bool bBehind )
|
||||
{
|
||||
OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "No valid Box List" );
|
||||
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
|
||||
@ -757,7 +757,7 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
|
||||
}
|
||||
|
||||
// Delete the Box first, then the Nodes!
|
||||
SwStartNode* pSttNd = (SwStartNode*)pBox->GetSttNd();
|
||||
SwStartNode* pSttNd = const_cast<SwStartNode*>(pBox->GetSttNd());
|
||||
if( pShareFmts )
|
||||
pShareFmts->RemoveFormat( *rTblBoxes[ nDelPos ]->GetFrmFmt() );
|
||||
|
||||
@ -977,7 +977,7 @@ bool SwTable::DeleteSel(
|
||||
SwTableNode* pTblNd = 0;
|
||||
if( !rBoxes.empty() )
|
||||
{
|
||||
pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
}
|
||||
@ -1045,7 +1045,7 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
|
||||
bool bSameHeight )
|
||||
{
|
||||
OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "No valid values" );
|
||||
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
|
||||
@ -1187,7 +1187,7 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
|
||||
bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
|
||||
{
|
||||
OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "No valid values" );
|
||||
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
|
||||
@ -1551,7 +1551,7 @@ bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
|
||||
SwTableBox* pMergeBox, SwUndoTblMerge* pUndo )
|
||||
{
|
||||
OSL_ENSURE( !rBoxes.empty() && pMergeBox, "no valid values" );
|
||||
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
|
||||
@ -2066,10 +2066,10 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
|
||||
pInsDoc->CopyTxtColl( *pSrcDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool( RES_POOLCOLL_TABLE_HDLN ) );
|
||||
}
|
||||
|
||||
SwTable* pNewTbl = (SwTable*)pInsDoc->InsertTable(
|
||||
SwTable* pNewTbl = const_cast<SwTable*>(pInsDoc->InsertTable(
|
||||
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ),
|
||||
rPos, 1, 1, GetFrmFmt()->GetHoriOrient().GetHoriOrient(),
|
||||
0, 0, false, IsNewModel() );
|
||||
0, 0, false, IsNewModel() ));
|
||||
if( !pNewTbl )
|
||||
return false;
|
||||
|
||||
@ -2299,7 +2299,7 @@ SwTableBox* SwTableBox::FindNextBox( const SwTable& rTbl,
|
||||
const SwTableBox* pSrchBox, bool bOvrTblLns ) const
|
||||
{
|
||||
if( !pSrchBox && GetTabLines().empty() )
|
||||
return (SwTableBox*)this;
|
||||
return const_cast<SwTableBox*>(this);
|
||||
return GetUpper()->FindNextBox( rTbl, pSrchBox ? pSrchBox : this,
|
||||
bOvrTblLns );
|
||||
|
||||
@ -2310,7 +2310,7 @@ SwTableBox* SwTableBox::FindPreviousBox( const SwTable& rTbl,
|
||||
const SwTableBox* pSrchBox, bool bOvrTblLns ) const
|
||||
{
|
||||
if( !pSrchBox && GetTabLines().empty() )
|
||||
return (SwTableBox*)this;
|
||||
return const_cast<SwTableBox*>(this);
|
||||
return GetUpper()->FindPreviousBox( rTbl, pSrchBox ? pSrchBox : this,
|
||||
bOvrTblLns );
|
||||
}
|
||||
@ -3399,7 +3399,7 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
|
||||
SwTwips nDistStt = 0;
|
||||
CR_SetBoxWidth aParam( eType, nRelDiff, nDist, rSz.GetWidth(),
|
||||
bLeft ? nDist : rSz.GetWidth() - nDist,
|
||||
(SwTableNode*)rAktBox.GetSttNd()->FindTableNode() );
|
||||
const_cast<SwTableNode*>(rAktBox.GetSttNd()->FindTableNode()) );
|
||||
bBigger = aParam.bBigger;
|
||||
|
||||
FN_lcl_SetBoxWidth fnSelBox, fnOtherBox;
|
||||
@ -4131,7 +4131,7 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
|
||||
sal_uLong nBoxIdx = rAktBox.GetSttIdx();
|
||||
|
||||
CR_SetLineHeight aParam( eType,
|
||||
(SwTableNode*)rAktBox.GetSttNd()->FindTableNode() );
|
||||
const_cast<SwTableNode*>(rAktBox.GetSttNd()->FindTableNode()) );
|
||||
bBigger = aParam.bBigger;
|
||||
|
||||
FN_lcl_SetLineHeight fnSelLine, fnOtherLine = lcl_SetOtherLineHeight;
|
||||
|
@ -58,7 +58,7 @@ SwCntntNode* SwTxtNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
|
||||
// node with the collection and hard attributes. Normally is the same
|
||||
// node, but if insert a glossary without formatting, then the Attrnode
|
||||
// is the prev node of the destionation position in dest. document.
|
||||
SwTxtNode* pCpyTxtNd = (SwTxtNode*)this;
|
||||
SwTxtNode* pCpyTxtNd = const_cast<SwTxtNode*>(this);
|
||||
SwTxtNode* pCpyAttrNd = pCpyTxtNd;
|
||||
|
||||
// Copy the formats to the other document
|
||||
|
@ -172,8 +172,8 @@ const tools::PolyPolygon *SwNoTxtNode::HasContour() const
|
||||
}
|
||||
}
|
||||
}
|
||||
((SwNoTxtNode *)this)->bContourMapModeValid = true;
|
||||
((SwNoTxtNode *)this)->bPixelContour = false;
|
||||
const_cast<SwNoTxtNode *>(this)->bContourMapModeValid = true;
|
||||
const_cast<SwNoTxtNode *>(this)->bPixelContour = false;
|
||||
}
|
||||
|
||||
return pContour;
|
||||
|
@ -78,7 +78,7 @@ void SwNodes::UpdtOutlineIdx( const SwNode& rNd )
|
||||
if( pOutlineNds->empty() ) // no OutlineNodes present ?
|
||||
return;
|
||||
|
||||
const SwNodePtr pSrch = (SwNodePtr)&rNd;
|
||||
const SwNodePtr pSrch = const_cast<SwNodePtr>(&rNd);
|
||||
|
||||
sal_uInt16 nPos;
|
||||
if (!pOutlineNds->Seek_Entry(pSrch, &nPos))
|
||||
|
@ -203,8 +203,8 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
|
||||
|
||||
if( rRange.HasMark() )
|
||||
{
|
||||
SwPosition *pSttPos = (SwPosition*)rRange.Start(),
|
||||
*pEndPos = (SwPosition*)rRange.End();
|
||||
SwPosition *pSttPos = const_cast<SwPosition*>(rRange.Start()),
|
||||
*pEndPos = const_cast<SwPosition*>(rRange.End());
|
||||
if( pPrvNd && 3 == nRegionRet )
|
||||
{
|
||||
OSL_ENSURE( pPrvNd, "The SectionNode is missing" );
|
||||
@ -502,7 +502,7 @@ SwSection* SwDoc::GetCurrSection( const SwPosition& rPos ) const
|
||||
{
|
||||
const SwSectionNode* pSectNd = rPos.nNode.GetNode().FindSectionNode();
|
||||
if( pSectNd )
|
||||
return (SwSection*)&pSectNd->GetSection();
|
||||
return const_cast<SwSection*>(&pSectNd->GetSection());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1680,7 +1680,7 @@ bool SwDoc::InsertCol( const SwCursor& rCursor, sal_uInt16 nCnt, bool bBehind )
|
||||
bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind )
|
||||
{
|
||||
OSL_ENSURE( !rBoxes.empty(), "No valid Box list" );
|
||||
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
|
||||
@ -1742,7 +1742,7 @@ bool SwDoc::InsertRow( const SwCursor& rCursor, sal_uInt16 nCnt, bool bBehind )
|
||||
bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind )
|
||||
{
|
||||
OSL_ENSURE( !rBoxes.empty(), "No valid Box list" );
|
||||
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
|
||||
@ -1927,7 +1927,7 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
|
||||
return false;
|
||||
|
||||
OSL_ENSURE( !rBoxes.empty(), "No valid Box list" );
|
||||
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
|
||||
@ -2132,7 +2132,7 @@ bool SwDoc::SplitTbl( const SwSelBoxes& rBoxes, bool bVert, sal_uInt16 nCnt,
|
||||
bool bSameHeight )
|
||||
{
|
||||
OSL_ENSURE( !rBoxes.empty() && nCnt, "No valid Box list" );
|
||||
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
|
||||
@ -2912,7 +2912,7 @@ void SwCollectTblLineBoxes::AddToUndoHistory( const SwCntntNode& rNd )
|
||||
void SwCollectTblLineBoxes::AddBox( const SwTableBox& rBox )
|
||||
{
|
||||
aPosArr.push_back(nWidth);
|
||||
SwTableBox* p = (SwTableBox*)&rBox;
|
||||
SwTableBox* p = const_cast<SwTableBox*>(&rBox);
|
||||
m_Boxes.push_back(p);
|
||||
nWidth = nWidth + (sal_uInt16)rBox.GetFrmFmt()->GetFrmSize().GetWidth();
|
||||
}
|
||||
@ -2986,12 +2986,12 @@ bool sw_Line_CollectBox( const SwTableLine*& rpLine, void* pPara )
|
||||
{
|
||||
SwCollectTblLineBoxes* pSplPara = (SwCollectTblLineBoxes*)pPara;
|
||||
if( pSplPara->IsGetValues() )
|
||||
for( SwTableBoxes::iterator it = ((SwTableLine*)rpLine)->GetTabBoxes().begin();
|
||||
it != ((SwTableLine*)rpLine)->GetTabBoxes().end(); ++it)
|
||||
for( SwTableBoxes::iterator it = const_cast<SwTableLine*>(rpLine)->GetTabBoxes().begin();
|
||||
it != const_cast<SwTableLine*>(rpLine)->GetTabBoxes().end(); ++it)
|
||||
sw_Box_CollectBox(*it, pSplPara );
|
||||
else
|
||||
for( SwTableBoxes::iterator it = ((SwTableLine*)rpLine)->GetTabBoxes().begin();
|
||||
it != ((SwTableLine*)rpLine)->GetTabBoxes().end(); ++it)
|
||||
for( SwTableBoxes::iterator it = const_cast<SwTableLine*>(rpLine)->GetTabBoxes().begin();
|
||||
it != const_cast<SwTableLine*>(rpLine)->GetTabBoxes().end(); ++it)
|
||||
sw_BoxSetSplitBoxFmts(*it, pSplPara );
|
||||
return true;
|
||||
}
|
||||
@ -3699,7 +3699,7 @@ static bool lcl_SetAFmtBox( _FndBox & rBox, _SetAFmtTabPara *pSetPara )
|
||||
bool SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew )
|
||||
{
|
||||
OSL_ENSURE( !rBoxes.empty(), "No valid Box list" );
|
||||
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
|
||||
@ -3786,7 +3786,7 @@ bool SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNe
|
||||
bool SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
|
||||
{
|
||||
OSL_ENSURE( !rBoxes.empty(), "No valid Box list" );
|
||||
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
|
||||
if( !pTblNd )
|
||||
return false;
|
||||
|
||||
@ -3930,7 +3930,7 @@ SwTableFmt* SwDoc::FindTblFmtByName( const OUString& rName, bool bAll ) const
|
||||
bool SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
|
||||
SwTwips nAbsDiff, SwTwips nRelDiff )
|
||||
{
|
||||
SwTableNode* pTblNd = (SwTableNode*)rAktBox.GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(rAktBox.GetSttNd()->FindTableNode());
|
||||
SwUndo* pUndo = 0;
|
||||
|
||||
if( nsTblChgWidthHeightType::WH_FLAG_INSDEL & eType && pTblNd->GetTable().ISA( SwDDETable ))
|
||||
@ -4292,7 +4292,7 @@ bool SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
|
||||
GetIDocumentUndoRedo().DoUndo(false);
|
||||
}
|
||||
|
||||
SwDoc* pCpyDoc = (SwDoc*)pSrcTblNd->GetDoc();
|
||||
SwDoc* pCpyDoc = const_cast<SwDoc*>(pSrcTblNd->GetDoc());
|
||||
bool bDelCpyDoc = pCpyDoc == this;
|
||||
|
||||
if( bDelCpyDoc )
|
||||
@ -4480,7 +4480,7 @@ bool SwDoc::UnProtectTbls( const SwPaM& rPam )
|
||||
GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
|
||||
|
||||
bool bChgd = false, bHasSel = rPam.HasMark() ||
|
||||
rPam.GetNext() != (SwPaM*)&rPam;
|
||||
rPam.GetNext() != &rPam;
|
||||
SwFrmFmts& rFmts = *GetTblFrmFmts();
|
||||
SwTable* pTbl;
|
||||
const SwTableNode* pTblNd;
|
||||
@ -4495,7 +4495,7 @@ bool SwDoc::UnProtectTbls( const SwPaM& rPam )
|
||||
if( bHasSel )
|
||||
{
|
||||
bool bFound = false;
|
||||
SwPaM* pTmp = (SwPaM*)&rPam;
|
||||
SwPaM* pTmp = const_cast<SwPaM*>(&rPam);
|
||||
do {
|
||||
const SwPosition *pStt = pTmp->Start(),
|
||||
*pEnd = pTmp->End();
|
||||
|
@ -133,8 +133,8 @@ static bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes,
|
||||
const SwNode* pNd = pCurPam->GetNode().FindTableBoxStartNode();
|
||||
if( pNd )
|
||||
{
|
||||
SwTableBox* pBox = (SwTableBox*)pNd->FindTableNode()->GetTable().
|
||||
GetTblBox( pNd->GetIndex() );
|
||||
SwTableBox* pBox = const_cast<SwTableBox*>(pNd->FindTableNode()->GetTable().
|
||||
GetTblBox( pNd->GetIndex() ));
|
||||
rBoxes.insert( pBox );
|
||||
}
|
||||
} while( bAllCrsr &&
|
||||
@ -775,7 +775,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
|
||||
aBox.SetDistance( pSetBox->GetDistance( *pBrd ), *pBrd );
|
||||
}
|
||||
|
||||
SwTableBox *pBox = (SwTableBox*)pCell->GetTabBox();
|
||||
SwTableBox *pBox = const_cast<SwTableBox*>(pCell->GetTabBox());
|
||||
SwFrmFmt *pNewFmt;
|
||||
if ( 0 != (pNewFmt = SwTblFmtCmp::FindNewFmt( aFmtCmp, pBox->GetFrmFmt(), nType )))
|
||||
pBox->ChgFrmFmt( static_cast<SwTableBoxFmt*>(pNewFmt) );
|
||||
@ -872,16 +872,16 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
|
||||
else
|
||||
{
|
||||
if ( aBox.GetTop() )
|
||||
::lcl_SetLineStyle( (SvxBorderLine*)aBox.GetTop(),
|
||||
::lcl_SetLineStyle( const_cast<SvxBorderLine*>(aBox.GetTop()),
|
||||
pColor, pBorderLine );
|
||||
if ( aBox.GetBottom() )
|
||||
::lcl_SetLineStyle( (SvxBorderLine*)aBox.GetBottom(),
|
||||
::lcl_SetLineStyle( const_cast<SvxBorderLine*>(aBox.GetBottom()),
|
||||
pColor, pBorderLine );
|
||||
if ( aBox.GetLeft() )
|
||||
::lcl_SetLineStyle( (SvxBorderLine*)aBox.GetLeft(),
|
||||
::lcl_SetLineStyle( const_cast<SvxBorderLine*>(aBox.GetLeft()),
|
||||
pColor, pBorderLine );
|
||||
if ( aBox.GetRight() )
|
||||
::lcl_SetLineStyle( (SvxBorderLine*)aBox.GetRight(),
|
||||
::lcl_SetLineStyle( const_cast<SvxBorderLine*>(aBox.GetRight()),
|
||||
pColor, pBorderLine );
|
||||
}
|
||||
pFmt->SetFmtAttr( aBox );
|
||||
@ -941,7 +941,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
|
||||
|
||||
std::vector<SwCellFrm*> aCellArr;
|
||||
aCellArr.reserve(255);
|
||||
::lcl_CollectCells( aCellArr, rUnion, (SwTabFrm*)pTab );
|
||||
::lcl_CollectCells( aCellArr, rUnion, const_cast<SwTabFrm*>(pTab) );
|
||||
|
||||
for ( sal_uInt16 j = 0; j < aCellArr.size(); ++j )
|
||||
{
|
||||
@ -1474,7 +1474,7 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, bool bBalance )
|
||||
// It's more robust if we calculate the minimum values for the whole Table
|
||||
const SwTabFrm *pTab = pStart->ImplFindTabFrm();
|
||||
pStart = (SwLayoutFrm*)pTab->FirstCell();
|
||||
pEnd = (SwLayoutFrm*)pTab->FindLastCntnt()->GetUpper();
|
||||
pEnd = const_cast<SwLayoutFrm*>(pTab->FindLastCntnt()->GetUpper());
|
||||
while( !pEnd->IsCellFrm() )
|
||||
pEnd = pEnd->GetUpper();
|
||||
::lcl_CalcColValues( aMins, aTabCols, pStart, pEnd, false );
|
||||
|
@ -740,8 +740,8 @@ SwTableBox* SwNode::GetTblBox() const
|
||||
SwTableBox* pBox = 0;
|
||||
const SwNode* pSttNd = FindTableBoxStartNode();
|
||||
if( pSttNd )
|
||||
pBox = (SwTableBox*)pSttNd->FindTableNode()->GetTable().GetTblBox(
|
||||
pSttNd->GetIndex() );
|
||||
pBox = const_cast<SwTableBox*>(pSttNd->FindTableNode()->GetTable().GetTblBox(
|
||||
pSttNd->GetIndex() ));
|
||||
return pBox;
|
||||
}
|
||||
|
||||
@ -761,7 +761,7 @@ const SwTxtNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const
|
||||
if( MAXLEVEL > nLvl && !rONds.empty() )
|
||||
{
|
||||
sal_uInt16 nPos;
|
||||
SwNode* pNd = (SwNode*)this;
|
||||
SwNode* pNd = const_cast<SwNode*>(this);
|
||||
bool bCheckFirst = false;
|
||||
if( !rONds.Seek_Entry( pNd, &nPos ))
|
||||
{
|
||||
@ -1877,7 +1877,7 @@ bool SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
|
||||
const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds();
|
||||
if( !rOutlNds.empty() )
|
||||
{
|
||||
if( !rOutlNds.Seek_Entry( (SwCntntNode*)this, &nPos ) && nPos )
|
||||
if( !rOutlNds.Seek_Entry( const_cast<SwCntntNode*>(this), &nPos ) && nPos )
|
||||
--nPos;
|
||||
if( nPos < rOutlNds.size() &&
|
||||
rOutlNds[ nPos ]->GetIndex() < GetIndex() )
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
|
||||
inline SwSectionNode* GetSectNode()
|
||||
{
|
||||
const SwNode* pSectNd( const_cast<SwIntrnlSectRefLink*>(this)->GetAnchor() );
|
||||
const SwNode* pSectNd( GetAnchor() );
|
||||
return const_cast<SwSectionNode*>( dynamic_cast<const SwSectionNode*>( pSectNd ) );
|
||||
}
|
||||
};
|
||||
@ -718,7 +718,7 @@ void SwSectionFmt::DelFrms()
|
||||
if( pCNd )
|
||||
{
|
||||
const SfxPoolItem& rItem = pCNd->GetSwAttrSet().Get( RES_PAGEDESC );
|
||||
pCNd->ModifyNotification( (SfxPoolItem*)&rItem, (SfxPoolItem*)&rItem );
|
||||
pCNd->ModifyNotification( &rItem, &rItem );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -752,7 +752,7 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
if( SfxItemState::SET == pNewSet->GetItemState(
|
||||
RES_PROTECT, false, &pItem ))
|
||||
{
|
||||
ModifyBroadcast( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem );
|
||||
ModifyBroadcast( pItem, pItem );
|
||||
pNewSet->ClearItem( RES_PROTECT );
|
||||
pOldSet->ClearItem( RES_PROTECT );
|
||||
}
|
||||
@ -761,7 +761,7 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
if( SfxItemState::SET == pNewSet->GetItemState(
|
||||
RES_EDIT_IN_READONLY, false, &pItem ) )
|
||||
{
|
||||
ModifyBroadcast( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem );
|
||||
ModifyBroadcast( pItem, pItem );
|
||||
pNewSet->ClearItem( RES_EDIT_IN_READONLY );
|
||||
pOldSet->ClearItem( RES_EDIT_IN_READONLY );
|
||||
}
|
||||
@ -769,14 +769,14 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
if( SfxItemState::SET == pNewSet->GetItemState(
|
||||
RES_FTN_AT_TXTEND, false, &pItem ))
|
||||
{
|
||||
ModifyBroadcast( (SfxPoolItem*)&pOldSet->Get( RES_FTN_AT_TXTEND ), (SfxPoolItem*)pItem );
|
||||
ModifyBroadcast( &pOldSet->Get( RES_FTN_AT_TXTEND ), pItem );
|
||||
pNewSet->ClearItem( RES_FTN_AT_TXTEND );
|
||||
pOldSet->ClearItem( RES_FTN_AT_TXTEND );
|
||||
}
|
||||
if( SfxItemState::SET == pNewSet->GetItemState(
|
||||
RES_END_AT_TXTEND, false, &pItem ))
|
||||
{
|
||||
ModifyBroadcast( (SfxPoolItem*)&pOldSet->Get( RES_END_AT_TXTEND ), (SfxPoolItem*)pItem );
|
||||
ModifyBroadcast( &pOldSet->Get( RES_END_AT_TXTEND ), pItem );
|
||||
pNewSet->ClearItem( RES_END_AT_TXTEND );
|
||||
pOldSet->ClearItem( RES_END_AT_TXTEND );
|
||||
}
|
||||
|
@ -418,7 +418,7 @@ const SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( const SdrObject* _pSdr
|
||||
"<SwFlyDrawContact::GetAnchoredObj(..)> - no object provided" );
|
||||
OSL_ENSURE( _pSdrObj->ISA(SwVirtFlyDrawObj),
|
||||
"<SwFlyDrawContact::GetAnchoredObj(..)> - wrong object type object provided" );
|
||||
OSL_ENSURE( GetUserCall( _pSdrObj ) == const_cast<SwFlyDrawContact*>(this),
|
||||
OSL_ENSURE( GetUserCall( _pSdrObj ) == this,
|
||||
"<SwFlyDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" );
|
||||
|
||||
const SwAnchoredObject* pRetAnchoredObj = 0L;
|
||||
@ -684,7 +684,7 @@ const SwAnchoredObject* SwDrawContact::GetAnchoredObj( const SdrObject* _pSdrObj
|
||||
OSL_ENSURE( _pSdrObj->ISA(SwDrawVirtObj) ||
|
||||
( !_pSdrObj->ISA(SdrVirtObj) && !_pSdrObj->ISA(SwDrawVirtObj) ),
|
||||
"<SwDrawContact::GetAnchoredObj(..)> - wrong object type object provided" );
|
||||
OSL_ENSURE( GetUserCall( _pSdrObj ) == const_cast<SwDrawContact*>(this) ||
|
||||
OSL_ENSURE( GetUserCall( _pSdrObj ) == this ||
|
||||
_pSdrObj == GetMaster(),
|
||||
"<SwDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" );
|
||||
|
||||
|
@ -318,7 +318,7 @@ void SwEditShell::UpdateFlds( SwField &rFld )
|
||||
|
||||
if( 0 != (pTxtFld = GetTxtFldAtPos( pCurStt, true )) )
|
||||
{
|
||||
pFmtFld = (SwFmtFld*)&pTxtFld->GetFmtFld();
|
||||
pFmtFld = const_cast<SwFmtFld*>(&pTxtFld->GetFmtFld());
|
||||
SwField *pCurFld = pFmtFld->GetField();
|
||||
|
||||
// if there are mixed field types
|
||||
|
@ -293,7 +293,7 @@ bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
|
||||
|
||||
case GLBLDOC_SECTION:
|
||||
{
|
||||
SwSectionFmt* pSectFmt = (SwSectionFmt*)rDelPos.GetSection()->GetFmt();
|
||||
SwSectionFmt* pSectFmt = const_cast<SwSectionFmt*>(rDelPos.GetSection()->GetFmt());
|
||||
pMyDoc->DelSectionFmt( pSectFmt, true );
|
||||
}
|
||||
break;
|
||||
|
@ -188,8 +188,8 @@ bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
|
||||
SwTableNode* pTblNd;
|
||||
SwSelBoxes aBoxes;
|
||||
GetTblSel( *this, aBoxes );
|
||||
if( !aBoxes.empty() && 0 != (pTblNd = (SwTableNode*)aBoxes[0]
|
||||
->GetSttNd()->FindTableNode() ))
|
||||
if( !aBoxes.empty() && 0 != (pTblNd = const_cast<SwTableNode*>(aBoxes[0]
|
||||
->GetSttNd()->FindTableNode()) ))
|
||||
{
|
||||
// check if the table name can be copied
|
||||
bool bCpyTblNm = aBoxes.size() == pTblNd->GetTable().GetTabSortBoxes().size();
|
||||
|
@ -321,7 +321,7 @@ void SwEditShell::SetGraphicPolygon( const tools::PolyPolygon *pPoly )
|
||||
pNd->SetContour( pPoly );
|
||||
SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pNd->getLayoutFrm(GetLayout())->GetUpper());
|
||||
const SwFmtSurround &rSur = pFly->GetFmt()->GetSurround();
|
||||
pFly->GetFmt()->NotifyClients( (SwFmtSurround*)&rSur, (SwFmtSurround*)&rSur );
|
||||
pFly->GetFmt()->NotifyClients( const_cast<SwFmtSurround*>(&rSur), const_cast<SwFmtSurround*>(&rSur) );
|
||||
GetDoc()->getIDocumentState().SetModified();
|
||||
EndAllAction();
|
||||
}
|
||||
@ -336,7 +336,7 @@ void SwEditShell::ClearAutomaticContour()
|
||||
pNd->SetContour( NULL, false );
|
||||
SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pNd->getLayoutFrm(GetLayout())->GetUpper());
|
||||
const SwFmtSurround &rSur = pFly->GetFmt()->GetSurround();
|
||||
pFly->GetFmt()->NotifyClients( (SwFmtSurround*)&rSur, (SwFmtSurround*)&rSur );
|
||||
pFly->GetFmt()->NotifyClients( const_cast<SwFmtSurround*>(&rSur), const_cast<SwFmtSurround*>(&rSur) );
|
||||
GetDoc()->getIDocumentState().SetModified();
|
||||
EndAllAction();
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ void SwHyphIter::Start( SwEditShell *pShell, SwDocPositions eStart, SwDocPositio
|
||||
|
||||
// nothing to do (at least not in the way as in the "else" part)
|
||||
bOldIdle = pShell->GetViewOptions()->IsIdle();
|
||||
const_cast<SwViewOption*>(pShell->GetViewOptions())->SetIdle( false );
|
||||
pShell->GetViewOptions()->SetIdle( false );
|
||||
_Start( pShell, eStart, eEnd );
|
||||
}
|
||||
|
||||
@ -450,7 +450,7 @@ void SwHyphIter::End()
|
||||
{
|
||||
if( !GetSh() )
|
||||
return;
|
||||
const_cast<SwViewOption*>(GetSh()->GetViewOptions())->SetIdle( bOldIdle );
|
||||
GetSh()->GetViewOptions()->SetIdle( bOldIdle );
|
||||
_End();
|
||||
}
|
||||
|
||||
|
@ -561,7 +561,7 @@ bool SwEditShell::IsProtectedOutlinePara() const
|
||||
if( rNd.IsTxtNode() )
|
||||
{
|
||||
const SwOutlineNodes& rOutlNd = GetDoc()->GetNodes().GetOutLineNds();
|
||||
SwNodePtr pNd = (SwNodePtr)&rNd;
|
||||
SwNodePtr pNd = const_cast<SwNodePtr>(&rNd);
|
||||
bool bFirst = true;
|
||||
sal_uInt16 nPos;
|
||||
int nLvl(0);
|
||||
|
@ -142,7 +142,7 @@ bool SwEditShell::IsAnySectionInDoc( bool bChkReadOnly, bool bChkHidden, bool bC
|
||||
|
||||
sal_uInt16 SwEditShell::GetSectionFmtPos( const SwSectionFmt& rFmt ) const
|
||||
{
|
||||
SwSectionFmt* pFmt = (SwSectionFmt*)&rFmt;
|
||||
SwSectionFmt* pFmt = const_cast<SwSectionFmt*>(&rFmt);
|
||||
return GetDoc()->GetSections().GetPos( pFmt );
|
||||
}
|
||||
|
||||
|
@ -230,11 +230,11 @@ void SwEditShell::InsertDDETable( const SwInsertTableOptions& rInsTblOpts,
|
||||
|
||||
const SwInsertTableOptions aInsTblOpts( rInsTblOpts.mnInsMode | tabopts::DEFAULT_BORDER,
|
||||
rInsTblOpts.mnRowsToRepeat );
|
||||
SwTable* pTbl = (SwTable*)GetDoc()->InsertTable( aInsTblOpts, *pPos,
|
||||
nRows, nCols, eAdj );
|
||||
SwTable* pTbl = const_cast<SwTable*>(GetDoc()->InsertTable( aInsTblOpts, *pPos,
|
||||
nRows, nCols, eAdj ));
|
||||
|
||||
SwTableNode* pTblNode = (SwTableNode*)pTbl->GetTabSortBoxes()[ 0 ]->
|
||||
GetSttNd()->FindTableNode();
|
||||
SwTableNode* pTblNode = const_cast<SwTableNode*>(pTbl->GetTabSortBoxes()[ 0 ]->
|
||||
GetSttNd()->FindTableNode());
|
||||
SwDDETable* pDDETbl = new SwDDETable( *pTbl, pDDEType );
|
||||
pTblNode->SetNewTable( pDDETbl ); // setze die DDE-Tabelle
|
||||
|
||||
@ -256,7 +256,7 @@ void SwEditShell::UpdateTable()
|
||||
if( DoesUndo() )
|
||||
StartUndo();
|
||||
EndAllTblBoxEdit();
|
||||
SwTableFmlUpdate aTblUpdate( (SwTable*)&pTblNd->GetTable() );
|
||||
SwTableFmlUpdate aTblUpdate( &pTblNd->GetTable() );
|
||||
GetDoc()->getIDocumentFieldsAccess().UpdateTblFlds( &aTblUpdate );
|
||||
if( DoesUndo() )
|
||||
EndUndo();
|
||||
@ -321,7 +321,7 @@ bool SwEditShell::GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const
|
||||
// Convert formulae into external presentation
|
||||
const SwTable& rTbl = pSelBox->GetSttNd()->FindTableNode()->GetTable();
|
||||
|
||||
SwTableFmlUpdate aTblUpdate( (SwTable*)&rTbl );
|
||||
SwTableFmlUpdate aTblUpdate( &rTbl );
|
||||
aTblUpdate.eFlags = TBL_BOXNAME;
|
||||
static_cast<SwDoc*>(GetDoc())->getIDocumentFieldsAccess().UpdateTblFlds( &aTblUpdate );
|
||||
|
||||
|
@ -284,7 +284,7 @@ sal_uInt16 SwAuthorityFieldType::GetSequencePos(sal_IntPtr nHandle)
|
||||
}
|
||||
const SwTxtNode& rFldTxtNode = pTxtFld->GetTxtNode();
|
||||
SwPosition aFldPos(rFldTxtNode);
|
||||
SwDoc& rDoc = *(SwDoc*)rFldTxtNode.GetDoc();
|
||||
SwDoc& rDoc = *const_cast<SwDoc*>(rFldTxtNode.GetDoc());
|
||||
SwCntntFrm *pFrm = rFldTxtNode.getLayoutFrm( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() );
|
||||
const SwTxtNode* pTxtNode = 0;
|
||||
if(pFrm && !pFrm->IsInDocBody())
|
||||
|
@ -90,7 +90,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
|
||||
rCalcPara.SetLastTblBox( this );
|
||||
|
||||
// Does it create a recursion?
|
||||
SwTableBox* pBox = (SwTableBox*)this;
|
||||
SwTableBox* pBox = const_cast<SwTableBox*>(this);
|
||||
if( rCalcPara.pBoxStk->find( pBox ) != rCalcPara.pBoxStk->end() )
|
||||
return nRet; // already on the stack: error
|
||||
|
||||
@ -271,7 +271,7 @@ bool SwTblCalcPara::CalcWithStackOverflow()
|
||||
sal_uInt16 nCnt = 0;
|
||||
SwTableBoxes aStackOverflows;
|
||||
do {
|
||||
SwTableBox* pBox = (SwTableBox*)pLastTblBox;
|
||||
SwTableBox* pBox = const_cast<SwTableBox*>(pLastTblBox);
|
||||
nStackCnt = 0;
|
||||
rCalc.SetCalcError( CALC_NOERR );
|
||||
aStackOverflows.insert( aStackOverflows.begin() + nCnt++, pBox );
|
||||
@ -381,7 +381,7 @@ void SwTableFormula::RelNmsToBoxNms( const SwTable& rTbl, OUString& rNewStr,
|
||||
// relative name w.r.t. box name (external presentation)
|
||||
SwNode* pNd = (SwNode*)pPara;
|
||||
OSL_ENSURE( pNd, "Feld steht in keinem TextNode" );
|
||||
const SwTableBox *pBox = (SwTableBox *)rTbl.GetTblBox(
|
||||
const SwTableBox *pBox = rTbl.GetTblBox(
|
||||
pNd->FindTableBoxStartNode()->GetIndex() );
|
||||
|
||||
rNewStr += OUString(rFirstBox[0]); // get label for the box
|
||||
@ -414,7 +414,7 @@ void SwTableFormula::RelBoxNmsToPtr( const SwTable& rTbl, OUString& rNewStr,
|
||||
// relative name w.r.t. box name (internal presentation)
|
||||
SwNode* pNd = (SwNode*)pPara;
|
||||
OSL_ENSURE( pNd, "Field not placed in any Node" );
|
||||
const SwTableBox *pBox = (SwTableBox*)rTbl.GetTblBox(
|
||||
const SwTableBox *pBox = rTbl.GetTblBox(
|
||||
pNd->FindTableBoxStartNode()->GetIndex() );
|
||||
|
||||
rNewStr += OUString(rFirstBox[0]); // get label for the box
|
||||
@ -762,12 +762,12 @@ static const SwTableBox* lcl_RelToBox( const SwTable& rTbl,
|
||||
|
||||
sGetName = sGetName.copy( 1 );
|
||||
|
||||
const SwTableLines* pLines = (SwTableLines*)&rTbl.GetTabLines();
|
||||
const SwTableLines* pLines = &rTbl.GetTabLines();
|
||||
const SwTableBoxes* pBoxes;
|
||||
const SwTableLine* pLine;
|
||||
|
||||
// determine starting values of the box,...
|
||||
pBox = (SwTableBox*)pRefBox;
|
||||
pBox = pRefBox;
|
||||
pLine = pBox->GetUpper();
|
||||
while( pLine->GetUpper() )
|
||||
{
|
||||
@ -995,18 +995,18 @@ void SwTableFormula::_HasValidBoxes( const SwTable& rTbl, OUString& ,
|
||||
{
|
||||
const SwNode* pNd = GetNodeOfFormula();
|
||||
const SwTableBox* pBox = !pNd ? 0
|
||||
: (SwTableBox *)rTbl.GetTblBox(
|
||||
pNd->FindTableBoxStartNode()->GetIndex() );
|
||||
: const_cast<SwTableBox *>(rTbl.GetTblBox(
|
||||
pNd->FindTableBoxStartNode()->GetIndex() ));
|
||||
if( pLastBox )
|
||||
pEndBox = (SwTableBox*)lcl_RelToBox( rTbl, pBox, *pLastBox );
|
||||
pSttBox = (SwTableBox*)lcl_RelToBox( rTbl, pBox, rFirstBox );
|
||||
pEndBox = const_cast<SwTableBox*>(lcl_RelToBox( rTbl, pBox, *pLastBox ));
|
||||
pSttBox = const_cast<SwTableBox*>(lcl_RelToBox( rTbl, pBox, rFirstBox ));
|
||||
}
|
||||
break;
|
||||
|
||||
case EXTRNL_NAME:
|
||||
if( pLastBox )
|
||||
pEndBox = (SwTableBox*)rTbl.GetTblBox( *pLastBox );
|
||||
pSttBox = (SwTableBox*)rTbl.GetTblBox( rFirstBox );
|
||||
pEndBox = const_cast<SwTableBox*>(rTbl.GetTblBox( *pLastBox ));
|
||||
pSttBox = const_cast<SwTableBox*>(rTbl.GetTblBox( rFirstBox ));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1104,15 +1104,15 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, OUString& rNewStr,
|
||||
const SwTableBox* pBox = pNd ? pTbl->GetTblBox(
|
||||
pNd->FindTableBoxStartNode()->GetIndex() ) : 0;
|
||||
if( pLastBox )
|
||||
pEndBox = (SwTableBox*)lcl_RelToBox( *pTbl, pBox, *pLastBox );
|
||||
pSttBox = (SwTableBox*)lcl_RelToBox( *pTbl, pBox, rFirstBox );
|
||||
pEndBox = const_cast<SwTableBox*>(lcl_RelToBox( *pTbl, pBox, *pLastBox ));
|
||||
pSttBox = const_cast<SwTableBox*>(lcl_RelToBox( *pTbl, pBox, rFirstBox ));
|
||||
}
|
||||
break;
|
||||
|
||||
case EXTRNL_NAME:
|
||||
if( pLastBox )
|
||||
pEndBox = (SwTableBox*)pTbl->GetTblBox( *pLastBox );
|
||||
pSttBox = (SwTableBox*)pTbl->GetTblBox( rFirstBox );
|
||||
pEndBox = const_cast<SwTableBox*>(pTbl->GetTblBox( *pLastBox ));
|
||||
pSttBox = const_cast<SwTableBox*>(pTbl->GetTblBox( rFirstBox ));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ void SwChapterField::ChangeExpansion(const SwFrm* pFrm,
|
||||
bool bSrchNum )
|
||||
{
|
||||
OSL_ENSURE( pFrm, "In which frame am I?" );
|
||||
SwDoc* pDoc = (SwDoc*)pCntntNode->GetDoc();
|
||||
SwDoc* pDoc = const_cast<SwDoc*>(pCntntNode->GetDoc());
|
||||
|
||||
const SwTxtNode* pTxtNode = dynamic_cast<const SwTxtNode*>(pCntntNode);
|
||||
if ( !pTxtNode || !pFrm->IsInDocBody() )
|
||||
@ -125,7 +125,7 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, bool bSrchNum)
|
||||
sPost.clear();
|
||||
sPre.clear();
|
||||
|
||||
SwDoc* pDoc = (SwDoc*)rTxtNd.GetDoc();
|
||||
SwDoc* pDoc = const_cast<SwDoc*>(rTxtNd.GetDoc());
|
||||
const SwTxtNode *pTxtNd = rTxtNd.FindOutlineNodeOfLevel( nLevel );
|
||||
if( pTxtNd )
|
||||
{
|
||||
|
@ -2211,7 +2211,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm,
|
||||
|
||||
// create index for determination of the TextNode
|
||||
SwPosition aPos( SwNodeIndex( pDoc->GetNodes() ) );
|
||||
SwTxtNode* pTxtNode = (SwTxtNode*) GetBodyTxtNode( *pDoc, aPos, *pFrm );
|
||||
SwTxtNode* pTxtNode = const_cast<SwTxtNode*>(GetBodyTxtNode( *pDoc, aPos, *pFrm ));
|
||||
|
||||
// If no layout exists, ChangeExpansion is called for header and
|
||||
// footer lines via layout formatting without existing TxtNode.
|
||||
|
@ -163,7 +163,7 @@ SwTxtNode* GetFirstTxtNode( const SwDoc& rDoc, SwPosition& rPos,
|
||||
const SwTxtNode* GetBodyTxtNode( const SwDoc& rDoc, SwPosition& rPos,
|
||||
const SwFrm& rFrm )
|
||||
{
|
||||
const SwLayoutFrm* pLayout = (SwLayoutFrm*)rFrm.GetUpper();
|
||||
const SwLayoutFrm* pLayout = rFrm.GetUpper();
|
||||
const SwTxtNode* pTxtNode = 0;
|
||||
|
||||
while( pLayout )
|
||||
@ -328,7 +328,7 @@ void SwGetExpField::ChangeExpansion( const SwFrm& rFrm, const SwTxtFld& rFld )
|
||||
|
||||
// determine document (or is there an easier way?)
|
||||
const SwTxtNode* pTxtNode = &rFld.GetTxtNode();
|
||||
SwDoc& rDoc = *(SwDoc*)pTxtNode->GetDoc();
|
||||
SwDoc& rDoc = *const_cast<SwDoc*>(pTxtNode->GetDoc());
|
||||
|
||||
// create index for determination of the TextNode
|
||||
SwPosition aPos( SwNodeIndex( rDoc.GetNodes() ) );
|
||||
|
@ -93,7 +93,7 @@ SwField* SwInputFieldList::GetField(size_t nId)
|
||||
{
|
||||
const SwTxtFld* pTxtFld = (*pSrtLst)[ nId ]->GetTxtFld();
|
||||
OSL_ENSURE( pTxtFld, "no TextFld" );
|
||||
return (SwField*)pTxtFld->GetFmtFld().GetField();
|
||||
return const_cast<SwField*>(pTxtFld->GetFmtFld().GetField());
|
||||
}
|
||||
|
||||
/// save cursor
|
||||
|
@ -97,9 +97,9 @@ bool IsFrameBehind( const SwTxtNode& rMyNd, sal_Int32 nMySttPos,
|
||||
*pFrm = static_cast<SwTxtFrm*>(rBehindNd.getLayoutFrm( rBehindNd.GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), 0, 0, false) );
|
||||
|
||||
while( pFrm && !pFrm->IsInside( nSttPos ) )
|
||||
pFrm = (SwTxtFrm*)pFrm->GetFollow();
|
||||
pFrm = pFrm->GetFollow();
|
||||
while( pMyFrm && !pMyFrm->IsInside( nMySttPos ) )
|
||||
pMyFrm = (SwTxtFrm*)pMyFrm->GetFollow();
|
||||
pMyFrm = pMyFrm->GetFollow();
|
||||
|
||||
if( !pFrm || !pMyFrm || pFrm == pMyFrm )
|
||||
return false;
|
||||
@ -421,7 +421,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
|
||||
const SwTxtFrm* pFrm = static_cast<SwTxtFrm*>(pTxtNd->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout(), 0, 0, false)),
|
||||
*pSave = pFrm;
|
||||
while( pFrm && !pFrm->IsInside( nNumStart ) )
|
||||
pFrm = (SwTxtFrm*)pFrm->GetFollow();
|
||||
pFrm = pFrm->GetFollow();
|
||||
|
||||
if( pFrm || 0 != ( pFrm = pSave ))
|
||||
{
|
||||
@ -826,7 +826,7 @@ SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark,
|
||||
const SwFmtRefMark *pRef = pDoc->GetRefMark( rRefMark );
|
||||
if( pRef && pRef->GetTxtRefMark() )
|
||||
{
|
||||
pTxtNd = (SwTxtNode*)&pRef->GetTxtRefMark()->GetTxtNode();
|
||||
pTxtNd = const_cast<SwTxtNode*>(&pRef->GetTxtRefMark()->GetTxtNode());
|
||||
*pStt = pRef->GetTxtRefMark()->GetStart();
|
||||
if( pEnd )
|
||||
*pEnd = *pRef->GetTxtRefMark()->GetAnyEnd();
|
||||
|
@ -154,7 +154,7 @@ bool SwTblField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
|
||||
case FIELD_PROP_PAR2:
|
||||
{
|
||||
sal_uInt16 nOldSubType = nSubType;
|
||||
SwTblField* pThis = (SwTblField*)this;
|
||||
SwTblField* pThis = const_cast<SwTblField*>(this);
|
||||
pThis->nSubType |= nsSwExtendedSubType::SUB_CMD;
|
||||
rAny <<= Expand();
|
||||
pThis->nSubType = nOldSubType;
|
||||
|
@ -209,7 +209,7 @@ bool sw_ChkAndSetNewAnchor(
|
||||
if( nOld == nNew )
|
||||
return false;
|
||||
|
||||
SwDoc* pDoc = (SwDoc*)rFmt.GetDoc();
|
||||
SwDoc* pDoc = const_cast<SwDoc*>(rFmt.GetDoc());
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
OSL_ENSURE( !(nNew == FLY_AT_PAGE &&
|
||||
@ -1468,7 +1468,7 @@ const SwFrmFmt* SwFEShell::IsURLGrfAtPos( const Point& rPt, OUString* pURL,
|
||||
SdrObject* pObj;
|
||||
SdrPageView* pPV;
|
||||
const SwFrmFmt* pRet = 0;
|
||||
SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView();
|
||||
SwDrawView *pDView = const_cast<SwDrawView*>(Imp()->GetDrawView());
|
||||
|
||||
sal_uInt16 nOld = pDView->GetHitTolerancePixel();
|
||||
pDView->SetHitTolerancePixel( 2 );
|
||||
@ -1539,7 +1539,7 @@ const Graphic *SwFEShell::GetGrfAtPos( const Point &rPt,
|
||||
|
||||
SdrObject* pObj;
|
||||
SdrPageView* pPV;
|
||||
SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView();
|
||||
SwDrawView *pDView = const_cast<SwDrawView*>(Imp()->GetDrawView());
|
||||
|
||||
if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPV ) && pObj->ISA(SwVirtFlyDrawObj) )
|
||||
{
|
||||
@ -1577,7 +1577,7 @@ const SwFrmFmt* SwFEShell::GetFmtFromObj( const Point& rPt, SwRect** pRectToFill
|
||||
SdrObject* pObj;
|
||||
SdrPageView* pPView;
|
||||
|
||||
SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView();
|
||||
SwDrawView *pDView = const_cast<SwDrawView*>(Imp()->GetDrawView());
|
||||
|
||||
sal_uInt16 nOld = pDView->GetHitTolerancePixel();
|
||||
// tolerance for Drawing-SS
|
||||
@ -1701,7 +1701,7 @@ ObjCntType SwFEShell::GetObjCntType( const Point &rPt, SdrObject *&rpObj ) const
|
||||
SdrObject* pObj;
|
||||
SdrPageView* pPView;
|
||||
|
||||
SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView();
|
||||
SwDrawView *pDView = const_cast<SwDrawView*>(Imp()->GetDrawView());
|
||||
|
||||
sal_uInt16 nOld = pDView->GetHitTolerancePixel();
|
||||
// tolerance for Drawing-SS
|
||||
|
@ -1393,13 +1393,13 @@ bool SwFEShell::GotoObj( bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType )
|
||||
{
|
||||
const SwVirtFlyDrawObj *pO = static_cast<const SwVirtFlyDrawObj*>(pBest);
|
||||
const SwRect& rFrm = pO->GetFlyFrm()->Frm();
|
||||
SelectObj( rFrm.Pos(), 0, (SdrObject*)pBest );
|
||||
SelectObj( rFrm.Pos(), 0, const_cast<SdrObject*>(pBest) );
|
||||
if( !ActionPend() )
|
||||
MakeVisible( rFrm );
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectObj( Point(), 0, (SdrObject*)pBest );
|
||||
SelectObj( Point(), 0, const_cast<SdrObject*>(pBest) );
|
||||
if( !ActionPend() )
|
||||
MakeVisible( pBest->GetCurrentBoundRect() );
|
||||
}
|
||||
@ -2511,7 +2511,7 @@ SwChainRet SwFEShell::Chainable( SwRect &rRect, const SwFrmFmt &rSource,
|
||||
{
|
||||
SdrObject* pObj;
|
||||
SdrPageView* pPView;
|
||||
SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView();
|
||||
SwDrawView *pDView = const_cast<SwDrawView*>(Imp()->GetDrawView());
|
||||
const sal_uInt16 nOld = pDView->GetHitTolerancePixel();
|
||||
pDView->SetHitTolerancePixel( 0 );
|
||||
if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE ) &&
|
||||
|
@ -1171,7 +1171,7 @@ bool SwFEShell::IsAdjustCellWidthAllowed( bool bBalance ) const
|
||||
// AutoFormat for the table/table selection
|
||||
bool SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew )
|
||||
{
|
||||
SwTableNode *pTblNd = (SwTableNode*)IsCrsrInTbl();
|
||||
SwTableNode *pTblNd = const_cast<SwTableNode*>(IsCrsrInTbl());
|
||||
if( !pTblNd || pTblNd->GetTable().IsTblComplex() )
|
||||
return false;
|
||||
|
||||
@ -2332,7 +2332,7 @@ bool SwFEShell::IsTableRightToLeft() const
|
||||
|
||||
bool SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const
|
||||
{
|
||||
SwFrm *pFrm = (SwFrm *)GetBox( rPt );
|
||||
SwFrm *pFrm = const_cast<SwFrm *>(GetBox( rPt ));
|
||||
const SwTabFrm* pTabFrm = pFrm ? pFrm->ImplFindTabFrm() : 0;
|
||||
OSL_ENSURE( pTabFrm, "Table not found" );
|
||||
return pTabFrm && pTabFrm->IsRightToLeft();
|
||||
|
@ -339,7 +339,7 @@ void SwFEShell::SetNewPageOffset( sal_uInt16 nOffset )
|
||||
{
|
||||
GetLayout()->SetVirtPageNum( true );
|
||||
const SwPageFrm *pPage = GetCurrFrm( false )->FindPageFrm();
|
||||
lcl_SetAPageOffset( nOffset, (SwPageFrm*)pPage, this );
|
||||
lcl_SetAPageOffset( nOffset, const_cast<SwPageFrm*>(pPage), this );
|
||||
}
|
||||
|
||||
void SwFEShell::SetPageOffset( sal_uInt16 nOffset )
|
||||
@ -357,7 +357,7 @@ void SwFEShell::SetPageOffset( sal_uInt16 nOffset )
|
||||
if ( rPgDesc.GetNumOffset() )
|
||||
{
|
||||
pDocLayout->SetVirtPageNum( true );
|
||||
lcl_SetAPageOffset( nOffset, (SwPageFrm*)pPage, this );
|
||||
lcl_SetAPageOffset( nOffset, const_cast<SwPageFrm*>(pPage), this );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -658,7 +658,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
|
||||
bool bWrapThrough = false;
|
||||
if ( pFly )
|
||||
{
|
||||
SwFlyFrmFmt* pFmt = (SwFlyFrmFmt*)pFly->GetFmt();
|
||||
SwFlyFrmFmt* pFmt = const_cast<SwFlyFrmFmt*>(pFly->GetFmt());
|
||||
const SwFmtSurround& rSurround = pFmt->GetSurround();
|
||||
bWrapThrough = rSurround.GetSurround() == SURROUND_THROUGHT;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes )
|
||||
|
||||
if (rTblCrsr.IsChgd() || !rTblCrsr.GetSelectedBoxesCount())
|
||||
{
|
||||
SwTableCursor* pTCrsr = (SwTableCursor*)&rTblCrsr;
|
||||
SwTableCursor* pTCrsr = const_cast<SwTableCursor*>(&rTblCrsr);
|
||||
pTCrsr->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->MakeTblCrsrs( *pTCrsr );
|
||||
}
|
||||
|
||||
@ -308,8 +308,8 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
|
||||
OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" );
|
||||
if( ::IsFrmInTblSel( pUnion->GetUnion(), pCell ) )
|
||||
{
|
||||
SwTableBox* pBox = (SwTableBox*)
|
||||
static_cast<const SwCellFrm*>(pCell)->GetTabBox();
|
||||
SwTableBox* pBox = const_cast<SwTableBox*>(
|
||||
static_cast<const SwCellFrm*>(pCell)->GetTabBox());
|
||||
// check for cell protection??
|
||||
if( !bChkProtected ||
|
||||
!pBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
|
||||
@ -924,9 +924,9 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
|
||||
return;
|
||||
|
||||
const SwTable *pTable = aUnions.front().GetTable()->GetTable();
|
||||
SwDoc* pDoc = (SwDoc*)pStart->GetFmt()->GetDoc();
|
||||
SwTableNode* pTblNd = (SwTableNode*)pTable->GetTabSortBoxes()[ 0 ]->
|
||||
GetSttNd()->FindTableNode();
|
||||
SwDoc* pDoc = const_cast<SwDoc*>(pStart->GetFmt()->GetDoc());
|
||||
SwTableNode* pTblNd = const_cast<SwTableNode*>(pTable->GetTabSortBoxes()[ 0 ]->
|
||||
GetSttNd()->FindTableNode());
|
||||
|
||||
_MergePos aPosArr; // Sort-Array with the frame positions
|
||||
long nWidth;
|
||||
@ -1922,7 +1922,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
|
||||
|
||||
if( (aUnion.*fnRect->fnGetWidth)() )
|
||||
{
|
||||
SwSelUnion *pTmp = new SwSelUnion( aUnion, (SwTabFrm*)pTable );
|
||||
SwSelUnion *pTmp = new SwSelUnion( aUnion, const_cast<SwTabFrm*>(pTable) );
|
||||
rUnions.push_back( pTmp );
|
||||
}
|
||||
|
||||
|
@ -947,7 +947,7 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
|
||||
|
||||
SwGrfNode* pGrfNd = pDoc->GetNodes().MakeGrfNode( rIdx, sFile, sFilter,
|
||||
&aTmpGrf, pColl,
|
||||
(SwAttrSet*)GetpSwAttrSet() );
|
||||
const_cast<SwAttrSet*>(GetpSwAttrSet()) );
|
||||
pGrfNd->SetTitle( GetTitle() );
|
||||
pGrfNd->SetDescription( GetDescription() );
|
||||
pGrfNd->SetContour( HasContour(), HasAutomaticContour() );
|
||||
|
@ -112,7 +112,7 @@ inline SwCntntFrm* SwCntntFrm::GetNextCntntFrm() const
|
||||
if ( GetNext() && GetNext()->IsCntntFrm() )
|
||||
return const_cast<SwCntntFrm*>(static_cast<const SwCntntFrm*>(GetNext()));
|
||||
else
|
||||
return (SwCntntFrm*)ImplGetNextCntntFrm( true );
|
||||
return const_cast<SwCntntFrm*>(ImplGetNextCntntFrm( true ));
|
||||
}
|
||||
|
||||
inline SwCntntFrm* SwCntntFrm::GetPrevCntntFrm() const
|
||||
@ -120,7 +120,7 @@ inline SwCntntFrm* SwCntntFrm::GetPrevCntntFrm() const
|
||||
if ( GetPrev() && GetPrev()->IsCntntFrm() )
|
||||
return const_cast<SwCntntFrm*>(static_cast<const SwCntntFrm*>(GetPrev()));
|
||||
else
|
||||
return (SwCntntFrm*)ImplGetNextCntntFrm( false );
|
||||
return const_cast<SwCntntFrm*>(ImplGetNextCntntFrm( false ));
|
||||
}
|
||||
|
||||
inline SwCntntNode *SwCntntFrm::GetNode()
|
||||
|
@ -935,11 +935,11 @@ inline void SwFrm::ResetRetouche() const
|
||||
|
||||
inline SwLayoutFrm *SwFrm::GetNextLayoutLeaf()
|
||||
{
|
||||
return (SwLayoutFrm*)static_cast<const SwFrm*>(this)->GetNextLayoutLeaf();
|
||||
return const_cast<SwLayoutFrm*>(static_cast<const SwFrm*>(this)->GetNextLayoutLeaf());
|
||||
}
|
||||
inline SwLayoutFrm *SwFrm::GetPrevLayoutLeaf()
|
||||
{
|
||||
return (SwLayoutFrm*)static_cast<const SwFrm*>(this)->GetPrevLayoutLeaf();
|
||||
return const_cast<SwLayoutFrm*>(static_cast<const SwFrm*>(this)->GetPrevLayoutLeaf());
|
||||
}
|
||||
inline const SwLayoutFrm *SwFrm::GetNextLayoutLeaf() const
|
||||
{
|
||||
|
@ -196,17 +196,17 @@ public:
|
||||
*/
|
||||
inline SwCntntFrm* SwLayoutFrm::ContainsCntnt()
|
||||
{
|
||||
return (SwCntntFrm*)(static_cast<const SwLayoutFrm*>(this)->ContainsCntnt());
|
||||
return const_cast<SwCntntFrm*>(static_cast<const SwLayoutFrm*>(this)->ContainsCntnt());
|
||||
}
|
||||
|
||||
inline SwCellFrm* SwLayoutFrm::FirstCell()
|
||||
{
|
||||
return (SwCellFrm*)(static_cast<const SwLayoutFrm*>(this)->FirstCell());
|
||||
return const_cast<SwCellFrm*>(static_cast<const SwLayoutFrm*>(this)->FirstCell());
|
||||
}
|
||||
|
||||
inline SwFrm* SwLayoutFrm::ContainsAny( const bool _bInvestigateFtnForSections )
|
||||
{
|
||||
return (SwFrm*)(static_cast<const SwLayoutFrm*>(this)->ContainsAny( _bInvestigateFtnForSections ));
|
||||
return const_cast<SwFrm*>(static_cast<const SwLayoutFrm*>(this)->ContainsAny( _bInvestigateFtnForSections ));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -397,7 +397,7 @@ public:
|
||||
inline void ResetBlinkPor() const;
|
||||
inline bool HasBlinkPor() const { return bBlinkPor; }
|
||||
inline void SetAnimation() const
|
||||
{ ( (SwTxtFrm*)this )->bHasAnimation = true; }
|
||||
{ const_cast<SwTxtFrm*>(this)->bHasAnimation = true; }
|
||||
inline bool HasAnimation() const { return bHasAnimation; }
|
||||
|
||||
inline bool IsSwapped() const { return bIsSwapped; }
|
||||
|
@ -451,7 +451,7 @@ SwFmtHeader::SwFmtHeader( SwFrmFmt *pHeaderFmt )
|
||||
|
||||
SwFmtHeader::SwFmtHeader( const SwFmtHeader &rCpy )
|
||||
: SfxPoolItem( RES_HEADER ),
|
||||
SwClient( (SwModify*)rCpy.GetRegisteredIn() ),
|
||||
SwClient( const_cast<SwModify*>(rCpy.GetRegisteredIn()) ),
|
||||
bActive( rCpy.IsActive() )
|
||||
{
|
||||
}
|
||||
@ -496,7 +496,7 @@ SwFmtFooter::SwFmtFooter( SwFrmFmt *pFooterFmt )
|
||||
|
||||
SwFmtFooter::SwFmtFooter( const SwFmtFooter &rCpy )
|
||||
: SfxPoolItem( RES_FOOTER ),
|
||||
SwClient( (SwModify*)rCpy.GetRegisteredIn() ),
|
||||
SwClient( const_cast<SwModify*>(rCpy.GetRegisteredIn()) ),
|
||||
bActive( rCpy.IsActive() )
|
||||
{
|
||||
}
|
||||
@ -582,7 +582,7 @@ void SwFmtCntnt::dumpAsXml(xmlTextWriterPtr pWriter) const
|
||||
// Partially implemented inline in hxx
|
||||
SwFmtPageDesc::SwFmtPageDesc( const SwFmtPageDesc &rCpy )
|
||||
: SfxPoolItem( RES_PAGEDESC ),
|
||||
SwClient( (SwPageDesc*)rCpy.GetPageDesc() ),
|
||||
SwClient( const_cast<SwPageDesc*>(rCpy.GetPageDesc()) ),
|
||||
oNumOffset( rCpy.oNumOffset ),
|
||||
nDescNameIdx( rCpy.nDescNameIdx ),
|
||||
pDefinedIn( 0 )
|
||||
@ -591,7 +591,7 @@ SwFmtPageDesc::SwFmtPageDesc( const SwFmtPageDesc &rCpy )
|
||||
|
||||
SwFmtPageDesc::SwFmtPageDesc( const SwPageDesc *pDesc )
|
||||
: SfxPoolItem( RES_PAGEDESC ),
|
||||
SwClient( (SwPageDesc*)pDesc ),
|
||||
SwClient( const_cast<SwPageDesc*>(pDesc) ),
|
||||
nDescNameIdx( 0xFFFF ), // IDX_NO_VALUE
|
||||
pDefinedIn( 0 )
|
||||
{
|
||||
@ -2583,9 +2583,9 @@ void SwFrmFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
}
|
||||
}
|
||||
else if( RES_HEADER == nWhich )
|
||||
pH = const_cast<SwFmtHeader*>(static_cast<const SwFmtHeader*>(pNew));
|
||||
pH = static_cast<const SwFmtHeader*>(pNew);
|
||||
else if( RES_FOOTER == nWhich )
|
||||
pF = const_cast<SwFmtFooter*>(static_cast<const SwFmtFooter*>(pNew));
|
||||
pF = static_cast<const SwFmtFooter*>(pNew);
|
||||
|
||||
if( pH && pH->IsActive() && !pH->GetHeaderFmt() )
|
||||
{ //If he doesn't have one, I'll add one
|
||||
|
@ -916,7 +916,7 @@ bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
|
||||
// At the FixSize, the surrounding Frame enforces the size;
|
||||
// the borders are simply subtracted.
|
||||
const long nLeft = rAttrs.CalcLeft( this );
|
||||
const long nRight = const_cast<SwBorderAttrs&>(rAttrs).CalcRight( this );
|
||||
const long nRight = rAttrs.CalcRight( this );
|
||||
(this->*fnRect->fnSetXMargins)( nLeft, nRight );
|
||||
|
||||
SwViewShell *pSh = getRootFrm()->GetCurrShell();
|
||||
|
@ -823,7 +823,7 @@ bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
|
||||
SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( this );
|
||||
if ( !pFlow || !pFlow->IsFollow() )
|
||||
{
|
||||
pDesc = (SwPageDesc*)rFmtDesc.GetPageDesc();
|
||||
pDesc = const_cast<SwPageDesc*>(rFmtDesc.GetPageDesc());
|
||||
if( pDesc )
|
||||
{
|
||||
if( !pDesc->GetRightFmt() )
|
||||
|
@ -690,8 +690,8 @@ void SwFlyFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
|
||||
SwAttrSetChg aNewSet( *static_cast<const SwAttrSetChg*>(pNew) );
|
||||
while( true )
|
||||
{
|
||||
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
|
||||
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
|
||||
_UpdateAttr( aOIter.GetCurItem(),
|
||||
aNIter.GetCurItem(), nInvFlags,
|
||||
&aOldSet, &aNewSet );
|
||||
if( aNIter.IsAtEnd() )
|
||||
break;
|
||||
|
@ -730,7 +730,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
|
||||
{
|
||||
if ( !static_cast<const SwLayoutFrm*>(pLay)->Lower() )
|
||||
{
|
||||
SwFrm *pDel = (SwFrm*)pLay;
|
||||
SwFrm *pDel = const_cast<SwFrm*>(pLay);
|
||||
pDel->Cut();
|
||||
delete pDel;
|
||||
return pPre;
|
||||
@ -839,7 +839,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
|
||||
}
|
||||
if ( pLay->IsFtnContFrm() && !static_cast<const SwLayoutFrm*>(pLay)->Lower() )
|
||||
{
|
||||
SwFrm *pDel = (SwFrm*)pLay;
|
||||
SwFrm *pDel = const_cast<SwFrm*>(pLay);
|
||||
pDel->Cut();
|
||||
delete pDel;
|
||||
return 0;
|
||||
@ -1175,7 +1175,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
|
||||
|
||||
if( ( GetAnchorFrm()->IsVertical() && !GetAnchorFrm()->IsVertLR() ) || GetAnchorFrm()->IsRightToLeft() )
|
||||
aNew.setX(aNew.getX() + Frm().Width());
|
||||
SwCntntFrm *pCnt = (SwCntntFrm*)::FindAnchor( GetAnchorFrm(), aNew );
|
||||
SwCntntFrm *pCnt = const_cast<SwCntntFrm*>(::FindAnchor( GetAnchorFrm(), aNew ));
|
||||
if( pCnt->IsProtected() )
|
||||
pCnt = const_cast<SwCntntFrm*>(static_cast<const SwCntntFrm*>(GetAnchorFrm()));
|
||||
|
||||
|
@ -559,7 +559,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
|
||||
|
||||
SdrObject* pObj = pNew->GetVirtDrawObj();
|
||||
OSL_ENSURE( pNew->GetAnchorFrm(), "Fly without Anchor" );
|
||||
SwFlyFrm* pFly = (SwFlyFrm*)pNew->GetAnchorFrm()->FindFlyFrm();
|
||||
SwFlyFrm* pFly = const_cast<SwFlyFrm*>(pNew->GetAnchorFrm()->FindFlyFrm());
|
||||
if ( pFly && pObj->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() )
|
||||
{
|
||||
//#i119945# set pFly's OrdNum to _rNewObj's. So when pFly is removed by Undo, the original OrdNum will not be changed.
|
||||
@ -796,7 +796,7 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
|
||||
}
|
||||
|
||||
OSL_ENSURE( _rNewObj.GetAnchorFrm(), "anchored draw object without anchor" );
|
||||
SwFlyFrm* pFlyFrm = (SwFlyFrm*)_rNewObj.GetAnchorFrm()->FindFlyFrm();
|
||||
SwFlyFrm* pFlyFrm = const_cast<SwFlyFrm*>(_rNewObj.GetAnchorFrm()->FindFlyFrm());
|
||||
if ( pFlyFrm &&
|
||||
_rNewObj.GetDrawObj()->GetOrdNum() < pFlyFrm->GetVirtDrawObj()->GetOrdNum() )
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ bool SwPosFlyFrmCmp::operator()(const SwPosFlyFrmPtr& rA, const SwPosFlyFrmPtr&
|
||||
|
||||
SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrmFmt* pFmt,
|
||||
sal_uInt16 nArrPos )
|
||||
: pFrmFmt( pFmt ), pNdIdx( (SwNodeIndex*) &rIdx )
|
||||
: pFrmFmt( pFmt ), pNdIdx( const_cast<SwNodeIndex*>(&rIdx) )
|
||||
{
|
||||
bool bFnd = false;
|
||||
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
|
||||
|
@ -2715,7 +2715,7 @@ SwPageFrm * InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
|
||||
|
||||
static void lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch )
|
||||
{
|
||||
SwSortedObjs *pObjs = (SwSortedObjs*)pAnch->GetDrawObjs();
|
||||
SwSortedObjs *pObjs = const_cast<SwSortedObjs*>(pAnch->GetDrawObjs());
|
||||
for ( size_t i = 0; i < pObjs->size(); ++i )
|
||||
{
|
||||
SwAnchoredObject* pObj = (*pObjs)[i];
|
||||
@ -3086,7 +3086,7 @@ const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos )
|
||||
}
|
||||
else
|
||||
{
|
||||
SwFlyFrm* pTmp = (SwFlyFrm*)pFrm->FindFlyFrm();
|
||||
SwFlyFrm* pTmp = const_cast<SwFlyFrm*>(pFrm->FindFlyFrm());
|
||||
while( pTmp )
|
||||
{
|
||||
if( pTmp->Frm().IsInside( rPos ) )
|
||||
|
@ -42,7 +42,7 @@ static sal_uLong lcl_FindFtnPos( const SwDoc *pDoc, const SwTxtFtn *pAttr )
|
||||
{
|
||||
const SwFtnIdxs &rFtnIdxs = pDoc->GetFtnIdxs();
|
||||
|
||||
SwTxtFtn* pBla = (SwTxtFtn*)pAttr;
|
||||
SwTxtFtn* pBla = const_cast<SwTxtFtn*>(pAttr);
|
||||
SwFtnIdxs::const_iterator it = rFtnIdxs.find( pBla );
|
||||
if ( it != rFtnIdxs.end() )
|
||||
{
|
||||
@ -1085,7 +1085,7 @@ const SwFtnFrm *SwFtnBossFrm::FindFirstFtn( SwCntntFrm *pCnt ) const
|
||||
if ( pRet->GetNext() )
|
||||
pRet = static_cast<const SwFtnFrm*>(pRet->GetNext());
|
||||
else
|
||||
{ SwFtnBossFrm *pBoss = (SwFtnBossFrm*)pRet->FindFtnBossFrm();
|
||||
{ SwFtnBossFrm *pBoss = const_cast<SwFtnBossFrm*>(pRet->FindFtnBossFrm());
|
||||
SwPageFrm *pPage = pBoss->FindPageFrm();
|
||||
lcl_NextFtnBoss( pBoss, pPage, false ); // next FtnBoss
|
||||
SwFtnContFrm *pCont = pBoss ? pBoss->FindNearestFtnCont() : 0;
|
||||
@ -2346,7 +2346,7 @@ void SwPageFrm::UpdateFtnNum()
|
||||
pCntnt = static_cast<SwSectionFrm*>(pBoss->GetUpper())->FindLastCntnt();
|
||||
else
|
||||
{
|
||||
SwFtnFrm* pFtn = (SwFtnFrm*)pBoss->FindFirstFtn( pCntnt );
|
||||
SwFtnFrm* pFtn = const_cast<SwFtnFrm*>(pBoss->FindFirstFtn( pCntnt ));
|
||||
while( pFtn )
|
||||
{
|
||||
SwTxtFtn* pTxtFtn = pFtn->GetAttr();
|
||||
@ -2803,7 +2803,7 @@ SwCntntFrm* SwFtnFrm::GetRef()
|
||||
|
||||
const SwCntntFrm* SwFtnFrm::GetRefFromAttr() const
|
||||
{
|
||||
SwFtnFrm* pThis = (SwFtnFrm*)this;
|
||||
SwFtnFrm* pThis = const_cast<SwFtnFrm*>(this);
|
||||
return pThis->GetRefFromAttr();
|
||||
}
|
||||
|
||||
|
@ -679,7 +679,7 @@ void SwPageFrm::PrepareHeader()
|
||||
{ //Implant header, but remove first, if already present
|
||||
OSL_ENSURE( rH.GetHeaderFmt(), "FrmFmt for Header not found." );
|
||||
|
||||
if ( pLay->GetFmt() == (SwFrmFmt*)rH.GetHeaderFmt() )
|
||||
if ( pLay->GetFmt() == rH.GetHeaderFmt() )
|
||||
return; // Header is already the correct one.
|
||||
|
||||
if ( pLay->IsHeaderFrm() )
|
||||
@ -690,7 +690,7 @@ void SwPageFrm::PrepareHeader()
|
||||
delete pDel;
|
||||
}
|
||||
OSL_ENSURE( pLay, "Where to with the Header?" );
|
||||
SwHeaderFrm *pH = new SwHeaderFrm( (SwFrmFmt*)rH.GetHeaderFmt(), this );
|
||||
SwHeaderFrm *pH = new SwHeaderFrm( const_cast<SwFrmFmt*>(rH.GetHeaderFmt()), this );
|
||||
pH->Paste( this, pLay );
|
||||
if ( GetUpper() )
|
||||
::RegistFlys( this, pH );
|
||||
@ -721,7 +721,7 @@ void SwPageFrm::PrepareFooter()
|
||||
{ //Implant footer, but remove first, if already present
|
||||
OSL_ENSURE( rF.GetFooterFmt(), "FrmFmt for Footer not found." );
|
||||
|
||||
if ( pLay->GetFmt() == (SwFrmFmt*)rF.GetFooterFmt() )
|
||||
if ( pLay->GetFmt() == rF.GetFooterFmt() )
|
||||
return; // Footer is already the correct one.
|
||||
|
||||
if ( pLay->IsFooterFrm() )
|
||||
@ -729,7 +729,7 @@ void SwPageFrm::PrepareFooter()
|
||||
pLay->Cut();
|
||||
delete pLay;
|
||||
}
|
||||
SwFooterFrm *pF = new SwFooterFrm( (SwFrmFmt*)rF.GetFooterFmt(), this );
|
||||
SwFooterFrm *pF = new SwFooterFrm( const_cast<SwFrmFmt*>(rF.GetFooterFmt()), this );
|
||||
pF->Paste( this );
|
||||
if ( GetUpper() )
|
||||
::RegistFlys( this, pF );
|
||||
|
@ -1156,7 +1156,7 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
|
||||
if ( pTmp->GetPhyPageNum() < prPage->GetPhyPageNum() &&
|
||||
pTmp->IsInvalid() )
|
||||
{
|
||||
prPage = (SwPageFrm*)pTmp;
|
||||
prPage = const_cast<SwPageFrm*>(pTmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -522,7 +522,7 @@ void SwRootFrm::Init( SwFrmFmt* pFmt )
|
||||
if ( pTblNd )
|
||||
{
|
||||
const SwFmtPageDesc &rDesc = pTblNd->GetTable().GetFrmFmt()->GetPageDesc();
|
||||
pDesc = (SwPageDesc*)rDesc.GetPageDesc();
|
||||
pDesc = const_cast<SwPageDesc*>(rDesc.GetPageDesc());
|
||||
//#19104# respect the page number offset!!
|
||||
oPgNum = rDesc.GetNumOffset();
|
||||
if (oPgNum)
|
||||
@ -531,7 +531,7 @@ void SwRootFrm::Init( SwFrmFmt* pFmt )
|
||||
else if ( pNode )
|
||||
{
|
||||
const SwFmtPageDesc &rDesc = pNode->GetSwAttrSet().GetPageDesc();
|
||||
pDesc = (SwPageDesc*)rDesc.GetPageDesc();
|
||||
pDesc = const_cast<SwPageDesc*>(rDesc.GetPageDesc());
|
||||
//#19104# respect the page number offset!!
|
||||
oPgNum = rDesc.GetNumOffset();
|
||||
if (oPgNum)
|
||||
|
@ -493,8 +493,8 @@ void SwPageFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
|
||||
SwAttrSetChg aNewSet( *static_cast<const SwAttrSetChg*>(pNew) );
|
||||
while( true )
|
||||
{
|
||||
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
|
||||
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
|
||||
_UpdateAttr( aOIter.GetCurItem(),
|
||||
aNIter.GetCurItem(), nInvFlags,
|
||||
&aOldSet, &aNewSet );
|
||||
if( aNIter.IsAtEnd() )
|
||||
break;
|
||||
@ -724,7 +724,7 @@ SwPageDesc *SwPageFrm::FindPageDesc()
|
||||
SwFrm *pFlow = pFrm;
|
||||
if ( pFlow->IsInTab() )
|
||||
pFlow = pFlow->FindTabFrm();
|
||||
pRet = (SwPageDesc*)pFlow->GetAttrSet()->GetPageDesc().GetPageDesc();
|
||||
pRet = const_cast<SwPageDesc*>(pFlow->GetAttrSet()->GetPageDesc().GetPageDesc());
|
||||
}
|
||||
if ( !pRet )
|
||||
pRet = &GetFmt()->GetDoc()->GetPageDesc( 0 );
|
||||
@ -740,7 +740,7 @@ SwPageDesc *SwPageFrm::FindPageDesc()
|
||||
{
|
||||
SwFlowFrm *pTmp = SwFlowFrm::CastFlowFrm( pFlow );
|
||||
if ( !pTmp->IsFollow() )
|
||||
pRet = (SwPageDesc*)pFlow->GetAttrSet()->GetPageDesc().GetPageDesc();
|
||||
pRet = const_cast<SwPageDesc*>(pFlow->GetAttrSet()->GetPageDesc().GetPageDesc());
|
||||
}
|
||||
|
||||
//3. und 3.1
|
||||
@ -1479,7 +1479,7 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
|
||||
nCnt != pPage->GetSortedObjs()->size(),
|
||||
"Object couldn't be reattached!" );
|
||||
#else
|
||||
rFmt.NotifyClients( 0, (SwFmtAnchor*)&rAnch );
|
||||
rFmt.NotifyClients( 0, const_cast<SwFmtAnchor*>(&rAnch) );
|
||||
#endif
|
||||
// Do not increment index, in this case
|
||||
continue;
|
||||
|
@ -64,7 +64,7 @@ SwPageDesc::SwPageDesc( const SwPageDesc &rCpy ) :
|
||||
aLeft( rCpy.GetLeft() ),
|
||||
m_FirstMaster( rCpy.GetFirstMaster() ),
|
||||
m_FirstLeft( rCpy.GetFirstLeft() ),
|
||||
aDepend( this, (SwModify*)rCpy.aDepend.GetRegisteredIn() ),
|
||||
aDepend( this, const_cast<SwModify*>(rCpy.aDepend.GetRegisteredIn()) ),
|
||||
pFollow( rCpy.pFollow ),
|
||||
nRegHeight( rCpy.GetRegHeight() ),
|
||||
nRegAscent( rCpy.GetRegAscent() ),
|
||||
|
@ -1840,7 +1840,7 @@ static void lcl_DrawGraphic( const SvxBrushItem& rBrush, OutputDevice *pOut,
|
||||
|
||||
// No Link here, we want to load the graphic synchronously!
|
||||
const_cast<SvxBrushItem&>(rBrush).SetDoneLink( Link() );
|
||||
GraphicObject *pGrf = (GraphicObject*)rBrush.GetGraphicObject();
|
||||
GraphicObject *pGrf = const_cast<GraphicObject*>(rBrush.GetGraphicObject());
|
||||
|
||||
// Outsource drawing of background with a background color
|
||||
::lcl_DrawGraphicBackgrd( rBrush, pOut, aAlignedGrfRect, *pGrf, bGrfNum, properties, bBackgrdAlreadyDrawn );
|
||||
@ -1965,7 +1965,7 @@ void DrawGraphic(
|
||||
if ( (rSh).GetViewOptions()->IsPDFExport() ||
|
||||
rSh.GetOut()->GetOutDevType() == OUTDEV_PRINTER )
|
||||
{
|
||||
const_cast<SvxBrushItem*>(pBrush)->PurgeMedium();
|
||||
pBrush->PurgeMedium();
|
||||
const_cast<SvxBrushItem*>(pBrush)->SetDoneLink( Link() );
|
||||
}
|
||||
else
|
||||
@ -2140,7 +2140,7 @@ void DrawGraphic(
|
||||
(ePos != GPOS_TILED) && (ePos != GPOS_AREA)
|
||||
)
|
||||
{
|
||||
GraphicObject *pGrf = (GraphicObject*)pBrush->GetGraphicObject();
|
||||
GraphicObject *pGrf = const_cast<GraphicObject*>(pBrush->GetGraphicObject());
|
||||
if ( bConsiderBackgroundTransparency )
|
||||
{
|
||||
GraphicAttr pGrfAttr = pGrf->GetAttr();
|
||||
@ -3214,12 +3214,12 @@ void SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) c
|
||||
if ( bPerformLayoutAction )
|
||||
{
|
||||
const_cast<SwRootFrm*>(this)->ResetTurbo();
|
||||
SwLayAction aAction( (SwRootFrm*)this, pSh->Imp() );
|
||||
SwLayAction aAction( const_cast<SwRootFrm*>(this), pSh->Imp() );
|
||||
aAction.SetPaint( false );
|
||||
aAction.SetComplete( false );
|
||||
aAction.SetReschedule( gProp.pSProgress != nullptr );
|
||||
aAction.Action();
|
||||
const_cast<SwRootFrm*>(this)->ResetTurboFlag();
|
||||
ResetTurboFlag();
|
||||
if ( !pSh->ActionPend() )
|
||||
pSh->Imp()->DelRegion();
|
||||
}
|
||||
@ -6413,7 +6413,7 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
|
||||
pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
|
||||
pOut->SetLineColor();
|
||||
|
||||
SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)this );
|
||||
SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );
|
||||
const SwBorderAttrs &rAttrs = *aAccess.Get();
|
||||
|
||||
// OD 20.11.2002 #104598# - take care of page margin area
|
||||
@ -6671,7 +6671,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
|
||||
aFrmRect = pFrm->PaintArea();
|
||||
if ( aFrmRect.IsOver( aBorderRect ) )
|
||||
{
|
||||
SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)pFrm );
|
||||
SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm );
|
||||
const SwBorderAttrs &rTmpAttrs = *aAccess.Get();
|
||||
if ( ( pFrm->IsLayoutFrm() && bLowerBorder ) ||
|
||||
aFrmRect.IsOver( aRect ) )
|
||||
@ -7255,7 +7255,7 @@ void SwLayoutFrm::RefreshExtraData( const SwRect &rRect ) const
|
||||
pCnt->Frm().Top() <= rRect.Bottom() &&
|
||||
pCnt->Frm().Bottom() >= rRect.Top() )
|
||||
{
|
||||
const_cast<SwTxtFrm*>(static_cast<const SwTxtFrm*>(pCnt))->PaintExtraData( rRect );
|
||||
static_cast<const SwTxtFrm*>(pCnt)->PaintExtraData( rRect );
|
||||
}
|
||||
if ( bLineInFly && pCnt->GetDrawObjs() )
|
||||
for ( size_t i = 0; i < pCnt->GetDrawObjs()->size(); ++i )
|
||||
|
@ -2258,8 +2258,8 @@ void SwSectionFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
|
||||
SwAttrSetChg aNewSet( *static_cast<const SwAttrSetChg*>(pNew) );
|
||||
while( true )
|
||||
{
|
||||
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
|
||||
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
|
||||
_UpdateAttr( aOIter.GetCurItem(),
|
||||
aNIter.GetCurItem(), nInvFlags,
|
||||
&aOldSet, &aNewSet );
|
||||
if( aNIter.IsAtEnd() )
|
||||
break;
|
||||
|
@ -213,7 +213,7 @@ void SwFrm::CheckDirChange()
|
||||
MIN_VERT_CELL_HEIGHT = 1135
|
||||
};
|
||||
|
||||
SwTableLine* pLine = (SwTableLine*)static_cast<SwCellFrm*>(this)->GetTabBox()->GetUpper();
|
||||
SwTableLine* pLine = const_cast<SwTableLine*>(static_cast<SwCellFrm*>(this)->GetTabBox()->GetUpper());
|
||||
SwFrmFmt* pFrmFmt = pLine->GetFrmFmt();
|
||||
SwFmtFrmSize aNew( pFrmFmt->GetFrmSize() );
|
||||
if ( ATT_FIX_SIZE != aNew.GetHeightSizeType() )
|
||||
|
@ -3000,8 +3000,8 @@ void SwTabFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
|
||||
SwAttrSetChg aNewSet( *static_cast<const SwAttrSetChg*>(pNew) );
|
||||
while( true )
|
||||
{
|
||||
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
|
||||
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
|
||||
_UpdateAttr( aOIter.GetCurItem(),
|
||||
aNIter.GetCurItem(), nInvFlags,
|
||||
&aOldSet, &aNewSet );
|
||||
if( aNIter.IsAtEnd() )
|
||||
break;
|
||||
@ -3836,7 +3836,7 @@ static sal_uInt16 lcl_GetTopSpace( const SwRowFrm& rRow )
|
||||
nTmpTopSpace = lcl_GetTopSpace( *static_cast<const SwRowFrm*>(pCurrLower->Lower()) );
|
||||
else
|
||||
{
|
||||
const SwAttrSet& rSet = ((SwCellFrm*)pCurrLower)->GetFmt()->GetAttrSet();
|
||||
const SwAttrSet& rSet = const_cast<SwCellFrm*>(pCurrLower)->GetFmt()->GetAttrSet();
|
||||
const SvxBoxItem& rBoxItem = rSet.GetBox();
|
||||
nTmpTopSpace = rBoxItem.CalcLineSpace( BOX_LINE_TOP, true );
|
||||
}
|
||||
@ -3857,7 +3857,7 @@ static sal_uInt16 lcl_GetTopLineDist( const SwRowFrm& rRow )
|
||||
nTmpTopLineDist = lcl_GetTopLineDist( *static_cast<const SwRowFrm*>(pCurrLower->Lower()) );
|
||||
else
|
||||
{
|
||||
const SwAttrSet& rSet = ((SwCellFrm*)pCurrLower)->GetFmt()->GetAttrSet();
|
||||
const SwAttrSet& rSet = const_cast<SwCellFrm*>(pCurrLower)->GetFmt()->GetAttrSet();
|
||||
const SvxBoxItem& rBoxItem = rSet.GetBox();
|
||||
nTmpTopLineDist = rBoxItem.GetDistance( BOX_LINE_TOP );
|
||||
}
|
||||
@ -3881,7 +3881,7 @@ static sal_uInt16 lcl_GetBottomLineSize( const SwRowFrm& rRow )
|
||||
}
|
||||
else
|
||||
{
|
||||
const SwAttrSet& rSet = ((SwCellFrm*)pCurrLower)->GetFmt()->GetAttrSet();
|
||||
const SwAttrSet& rSet = const_cast<SwCellFrm*>(pCurrLower)->GetFmt()->GetAttrSet();
|
||||
const SvxBoxItem& rBoxItem = rSet.GetBox();
|
||||
nTmpBottomLineSize = rBoxItem.CalcLineSpace( BOX_LINE_BOTTOM, true ) -
|
||||
rBoxItem.GetDistance( BOX_LINE_BOTTOM );
|
||||
@ -3906,7 +3906,7 @@ static sal_uInt16 lcl_GetBottomLineDist( const SwRowFrm& rRow )
|
||||
}
|
||||
else
|
||||
{
|
||||
const SwAttrSet& rSet = ((SwCellFrm*)pCurrLower)->GetFmt()->GetAttrSet();
|
||||
const SwAttrSet& rSet = const_cast<SwCellFrm*>(pCurrLower)->GetFmt()->GetAttrSet();
|
||||
const SvxBoxItem& rBoxItem = rSet.GetBox();
|
||||
nTmpBottomLineDist = rBoxItem.GetDistance( BOX_LINE_BOTTOM );
|
||||
}
|
||||
@ -5321,7 +5321,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
|
||||
else if ( 0 != nFirstLineHeight )
|
||||
{
|
||||
const bool bOldJoinLock = IsJoinLocked();
|
||||
((SwTabFrm*)this)->LockJoin();
|
||||
const_cast<SwTabFrm*>(this)->LockJoin();
|
||||
const SwTwips nHeightOfFirstContentLine = lcl_CalcHeightOfFirstContentLine( *(SwRowFrm*)pFirstRow );
|
||||
|
||||
// Consider minimum row height:
|
||||
@ -5332,7 +5332,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
|
||||
nTmpHeight += std::max( nHeightOfFirstContentLine, nMinRowHeight );
|
||||
|
||||
if ( !bOldJoinLock )
|
||||
((SwTabFrm*)this)->UnlockJoin();
|
||||
const_cast<SwTabFrm*>(this)->UnlockJoin();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -606,7 +606,7 @@ bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
|
||||
/** Layout dependent cursor travelling */
|
||||
bool SwCntntFrm::LeftMargin(SwPaM *pPam) const
|
||||
{
|
||||
if( &pPam->GetNode() != (SwCntntNode*)GetNode() )
|
||||
if( &pPam->GetNode() != GetNode() )
|
||||
return false;
|
||||
const_cast<SwCntntNode*>(GetNode())->
|
||||
MakeStartIndex((SwIndex *) &pPam->GetPoint()->nContent);
|
||||
@ -615,7 +615,7 @@ bool SwCntntFrm::LeftMargin(SwPaM *pPam) const
|
||||
|
||||
bool SwCntntFrm::RightMargin(SwPaM *pPam, bool) const
|
||||
{
|
||||
if( &pPam->GetNode() != (SwCntntNode*)GetNode() )
|
||||
if( &pPam->GetNode() != GetNode() )
|
||||
return false;
|
||||
const_cast<SwCntntNode*>(GetNode())->
|
||||
MakeEndIndex((SwIndex *) &pPam->GetPoint()->nContent);
|
||||
@ -681,7 +681,7 @@ static const SwCntntFrm * lcl_MissProtectedFrames( const SwCntntFrm *pCnt,
|
||||
static bool lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
|
||||
GetNxtPrvCnt fnNxtPrv, bool bInReadOnly )
|
||||
{
|
||||
OSL_ENSURE( &pPam->GetNode() == (SwCntntNode*)pStart->GetNode(),
|
||||
OSL_ENSURE( &pPam->GetNode() == pStart->GetNode(),
|
||||
"lcl_UpDown doesn't work for others." );
|
||||
|
||||
const SwCntntFrm *pCnt = 0;
|
||||
@ -930,7 +930,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
|
||||
|
||||
if( pCnt )
|
||||
{ // set the Point on the Content-Node
|
||||
SwCntntNode *pCNd = (SwCntntNode*)pCnt->GetNode();
|
||||
SwCntntNode *pCNd = const_cast<SwCntntNode*>(pCnt->GetNode());
|
||||
pPam->GetPoint()->nNode = *pCNd;
|
||||
if ( fnNxtPrv == lcl_GetPrvCnt )
|
||||
pCNd->MakeEndIndex( (SwIndex*)&pPam->GetPoint()->nContent );
|
||||
@ -1010,7 +1010,7 @@ sal_uInt16 SwRootFrm::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum )
|
||||
pCntnt = pCntnt->GetNextCntntFrm();
|
||||
if ( pCntnt )
|
||||
{
|
||||
SwCntntNode* pCNd = (SwCntntNode*)pCntnt->GetNode();
|
||||
SwCntntNode* pCNd = const_cast<SwCntntNode*>(pCntnt->GetNode());
|
||||
pToSet->GetPoint()->nNode = *pCNd;
|
||||
pCNd->MakeStartIndex( (SwIndex*)&pToSet->GetPoint()->nContent );
|
||||
pToSet->GetPoint()->nContent = static_cast<const SwTxtFrm*>(pCntnt)->GetOfst();
|
||||
@ -1051,7 +1051,7 @@ SwLayoutFrm *GetNextFrm( const SwLayoutFrm *pFrm )
|
||||
|
||||
SwLayoutFrm *GetThisFrm( const SwLayoutFrm *pFrm )
|
||||
{
|
||||
return (SwLayoutFrm*)pFrm;
|
||||
return const_cast<SwLayoutFrm*>(pFrm);
|
||||
}
|
||||
|
||||
SwLayoutFrm *GetPrevFrm( const SwLayoutFrm *pFrm )
|
||||
@ -1115,7 +1115,7 @@ bool GetFrmInPage( const SwCntntFrm *pCnt, SwWhichPage fnWhichPage,
|
||||
}
|
||||
}
|
||||
|
||||
SwCntntNode *pCNd = (SwCntntNode*)pCnt->GetNode();
|
||||
SwCntntNode *pCNd = const_cast<SwCntntNode*>(pCnt->GetNode());
|
||||
pPam->GetPoint()->nNode = *pCNd;
|
||||
sal_Int32 nIdx;
|
||||
if( fnPosPage == GetFirstSub )
|
||||
@ -1447,7 +1447,7 @@ void SwPageFrm::GetCntntPosition( const Point &rPt, SwPosition &rPos ) const
|
||||
if( !pAct->IsValid() )
|
||||
{
|
||||
// CntntFrm not formatted -> always on node-beginning
|
||||
SwCntntNode* pCNd = (SwCntntNode*)pAct->GetNode();
|
||||
SwCntntNode* pCNd = const_cast<SwCntntNode*>(pAct->GetNode());
|
||||
OSL_ENSURE( pCNd, "Where is my CntntNode?" );
|
||||
rPos.nNode = *pCNd;
|
||||
rPos.nContent.Assign( pCNd, 0 );
|
||||
@ -1923,8 +1923,8 @@ bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
|
||||
(bReadOnlyAvailable ||
|
||||
!pCell->GetFmt()->GetProtect().IsCntntProtected()))
|
||||
{
|
||||
SwTableBox* pInsBox = (SwTableBox*)
|
||||
static_cast<const SwCellFrm*>(pCell)->GetTabBox();
|
||||
SwTableBox* pInsBox = const_cast<SwTableBox*>(
|
||||
static_cast<const SwCellFrm*>(pCell)->GetTabBox());
|
||||
aNew.insert( pInsBox );
|
||||
}
|
||||
if ( pCell->GetNext() )
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user