summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorOliver Düsterhoff <od@openoffice.org>2002-11-15 10:07:52 +0000
committerOliver Düsterhoff <od@openoffice.org>2002-11-15 10:07:52 +0000
commitef6790486f1e73a0ae2c33ebd6617813c8115b75 (patch)
tree3770645d5184b8a0f4000af904fa5b3c3b3e6dbb /sw/source
parent06978dd59686efd2e0c6e838721b147d1ed8a85a (diff)
#104684# use <SwSectionFrm::Init()> to initialize new section frame
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/docnode/ndsect.cxx11
-rw-r--r--sw/source/core/docnode/node2lay.cxx7
-rw-r--r--sw/source/core/layout/ftnfrm.cxx6
-rw-r--r--sw/source/core/layout/laycache.cxx17
4 files changed, 20 insertions, 21 deletions
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index a6f99fe6e54d..5a812a85ee1e 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ndsect.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: od $ $Date: 2002-10-10 09:17:22 $
+ * last change: $Author: od $ $Date: 2002-11-15 11:07:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1119,9 +1119,14 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx )
SwSectionNode *pS = rIdx.GetNode().FindSectionNode();
// if the node is in a section, the sectionframe now
// has to be created..
+ // OD 14.11.2002 #104684# - boolean to control <Init()> of a new
+ // section frame.
+ bool bInitNewSect = false;
if( pS )
{
SwSectionFrm *pSct = new SwSectionFrm( pS->GetSection() );
+ // OD 14.11.2002 #104684# - prepare <Init()> of new section frame.
+ bInitNewSect = true;
SwLayoutFrm* pUp = pSct;
while( pUp->Lower() ) // for columned sections
{
@@ -1139,6 +1144,8 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx )
else
// der neue liegt hinter mir
pNew->Paste( pFrm->GetUpper(), pFrm->GetNext() );
+ if ( bInitNewSect )
+ static_cast<SwSectionFrm*>(pNew)->Init();
}
}
}
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index 24d8d0934f6e..c99e2aea3351 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: node2lay.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-19 00:08:17 $
+ * last change: $Author: od $ $Date: 2002-11-15 11:06:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -285,9 +285,10 @@ SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode )
rpFrm = bMaster ? NULL : ((SwLayoutFrm*)pFrm)->Lower();
return ((SwLayoutFrm*)pFrm);
}
- pUpper =new SwSectionFrm(((SwSectionNode*)pNode)->GetSection());
+ pUpper = new SwSectionFrm(((SwSectionNode*)pNode)->GetSection());
pUpper->Paste( rpFrm->GetUpper(),
bMaster ? rpFrm : rpFrm->GetNext() );
+ static_cast<SwSectionFrm*>(pUpper)->Init();
rpFrm = NULL;
return pUpper;
}
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index cfd6537d8f87..dbf70f60a10a 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ftnfrm.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: od $ $Date: 2002-11-01 11:39:38 $
+ * last change: $Author: od $ $Date: 2002-11-15 11:02:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2945,7 +2945,7 @@ BOOL SwCntntFrm::MoveFtnCntFwd( BOOL bMakePage, SwFtnBossFrm *pOldBoss )
{
pNewUp = new SwSectionFrm( *pSect, FALSE );
pNewUp->InsertBefore( pTmpFtn, pTmpFtn->Lower() );
- ((SwSectionFrm*)pNewUp)->Init();
+ static_cast<SwSectionFrm*>(pNewUp)->Init();
pNewUp->Frm().Pos() = pTmpFtn->Frm().Pos();
pNewUp->Frm().Pos().Y() += 1; //wg. Benachrichtigungen.
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 5ee937c85ce3..149f249a932c 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: laycache.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: ama $ $Date: 2001-11-29 16:38:49 $
+ * last change: $Author: od $ $Date: 2002-11-15 11:04:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -924,9 +924,7 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
//Hatte der SectionFrm ueberhaupt Inhalt? Wenn
//nicht kann er gleich umgehaengt werden.
SwSectionFrm *pSct;
-#ifdef VERTICAL_LAYOUT
- BOOL bInit = FALSE;
-#endif
+ bool bInit = false;
if ( !rpActualSection->GetSectionFrm()->ContainsCntnt())
{
pSct = rpActualSection->GetSectionFrm();
@@ -937,19 +935,12 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
pSct = new SwSectionFrm(
*rpActualSection->GetSectionFrm(), FALSE );
rpActualSection->GetSectionFrm()->SimpleFormat();
-#ifdef VERTICAL_LAYOUT
- bInit = TRUE;
-#else
- pSct->Frm().Width( rpLay->Prt().Width() );
- pSct->Prt().Width( rpLay->Prt().Width() );
-#endif
+ bInit = true;
}
rpActualSection->SetSectionFrm( pSct );
pSct->InsertBehind( rpLay, 0 );
-#ifdef VERTICAL_LAYOUT
if( bInit )
pSct->Init();
-#endif
pSct->Frm().Pos() = rpLay->Frm().Pos();
pSct->Frm().Pos().Y() += 1; //wg. Benachrichtigungen.