summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/lineinfo.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-06-13 15:22:56 +0200
committerMathias Bauer <mba@openoffice.org>2010-06-13 15:22:56 +0200
commitebc5777548dea42ed966a16c66d879b1485bbfb4 (patch)
treebbba6f44a8ddd5c25683de28f8c56331589a3bc1 /sw/source/core/doc/lineinfo.cxx
parenta572c2e12be5c2c40088269f3dc96e75e5912398 (diff)
CWS swlayoutrefactoring: #i81480#: enable sw code to use multiple layouts
Diffstat (limited to 'sw/source/core/doc/lineinfo.cxx')
-rw-r--r--sw/source/core/doc/lineinfo.cxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx
index c0c3e296f7b1..7e2d6164c637 100644
--- a/sw/source/core/doc/lineinfo.cxx
+++ b/sw/source/core/doc/lineinfo.cxx
@@ -36,19 +36,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();
}
@@ -143,11 +146,13 @@ void SwLineNumberInfo::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
SwClient::Modify( 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();
}
}