summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/lineinfo.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/lineinfo.cxx')
-rw-r--r--sw/source/core/doc/lineinfo.cxx29
1 files changed, 17 insertions, 12 deletions
diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx
index 8addb27cf01e..3fa6e2e0867d 100644
--- a/sw/source/core/doc/lineinfo.cxx
+++ b/sw/source/core/doc/lineinfo.cxx
@@ -35,19 +35,22 @@
#include "poolfmt.hxx"
#include "rootfrm.hxx"
#include "viewsh.hxx"
-
+#include <set>
void SwDoc::SetLineNumberInfo( const SwLineNumberInfo &rNew )
{
- if ( GetRootFrm() &&
+ SwRootFrm* pTmpRoot = GetCurrentLayout();//swmod 080219
+ if ( pTmpRoot &&
(rNew.IsCountBlankLines() != pLineNumberInfo->IsCountBlankLines() ||
rNew.IsRestartEachPage() != pLineNumberInfo->IsRestartEachPage()) )
{
- GetRootFrm()->StartAllAction();
+ std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();//swmod 080225
+ pTmpRoot->StartAllAction();
// FME 2007-08-14 #i80120# Invalidate size, because ChgThisLines()
// is only (onny may only be) called by the formatting routines
- GetRootFrm()->InvalidateAllCntnt( INV_LINENUM | INV_SIZE );
- GetRootFrm()->EndAllAction();
- }
+ //pTmpRoot->InvalidateAllCntnt( INV_LINENUM | INV_SIZE );
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::InvalidateAllCntnt), INV_LINENUM | INV_SIZE));//swmod 080226
+ pTmpRoot->EndAllAction();
+ } //swmod 080219
*pLineNumberInfo = rNew;
SetModified();
}
@@ -90,7 +93,7 @@ SwLineNumberInfo& SwLineNumberInfo::operator=(const SwLineNumberInfo &rCpy)
if ( rCpy.GetRegisteredIn() )
((SwModify*)rCpy.GetRegisteredIn())->Add( this );
else if ( GetRegisteredIn() )
- pRegisteredIn->Remove( this );
+ GetRegisteredInNonConst()->Remove( this );
aType = rCpy.GetNumType();
aDivider = rCpy.GetDivider();
@@ -138,15 +141,17 @@ void SwLineNumberInfo::SetCharFmt( SwCharFmt *pChFmt )
pChFmt->Add( this );
}
-void SwLineNumberInfo::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
+void SwLineNumberInfo::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
- SwClient::Modify( pOld, pNew );
+ CheckRegistration( pOld, pNew );
SwDoc *pDoc = ((SwCharFmt*)GetRegisteredIn())->GetDoc();
- SwRootFrm* pRoot = pDoc->GetRootFrm();
- if( pRoot && pRoot->GetCurrShell() )
+ SwRootFrm* pRoot = pDoc->GetCurrentLayout();
+ if( pRoot )
{
pRoot->StartAllAction();
- pRoot->GetCurrShell()->AddPaintRect( pRoot->Frm() );
+ std::set<SwRootFrm*> aAllLayouts = pDoc->GetAllLayouts();
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::mem_fun(&SwRootFrm::AllAddPaintRect));//swmod 080305
+ //pRoot->GetCurrShell()->AddPaintRect( pRoot->Frm() );
pRoot->EndAllAction();
}
}