summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore
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/unocore
parenta572c2e12be5c2c40088269f3dc96e75e5912398 (diff)
CWS swlayoutrefactoring: #i81480#: enable sw code to use multiple layouts
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx2
-rw-r--r--sw/source/core/unocore/unodraw.cxx12
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx2
-rw-r--r--sw/source/core/unocore/unoobj2.cxx12
4 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 92a33da130fe..0379f9bdc82d 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -782,7 +782,7 @@ void getNumberingProperty(SwPaM& rPam, PropertyState& eState, Any * pAny )
* --------------------------------------------------*/
void GetCurPageStyle(SwPaM& rPaM, String &rString)
{
- const SwPageFrm* pPage = rPaM.GetCntntNode()->GetFrm()->FindPageFrm();
+ const SwPageFrm* pPage = rPaM.GetCntntNode()->getLayoutFrm(rPaM.GetDoc()->GetCurrentLayout())->FindPageFrm();
if(pPage)
SwStyleNameMapper::FillProgName( pPage->GetPageDesc()->GetName(), rString, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, sal_True );
}
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 8ae8f948900f..80ee39740c01 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -789,11 +789,11 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
else
throw uno::RuntimeException();
}
- else if ((aAnchor.GetAnchorId() != FLY_AT_PAGE) && pDoc->GetRootFrm())
+ else if ((aAnchor.GetAnchorId() != FLY_AT_PAGE) && pDoc->GetCurrentLayout())
{
SwCrsrMoveState aState( MV_SETONLYTEXT );
Point aTmp(MM100_TO_TWIP(aMM100Pos.X), MM100_TO_TWIP(aMM100Pos.Y));
- pDoc->GetRootFrm()->GetCrsrOfst( pPam->GetPoint(), aTmp, &aState );
+ pDoc->GetCurrentLayout()->GetCrsrOfst( pPam->GetPoint(), aTmp, &aState ); //swmod 080218
aAnchor.SetAnchor( pPam->GetPoint() );
// --> OD 2004-08-18 #i32349# - adjustment of vertical positioning
@@ -1346,7 +1346,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
pFmt->SetPositionLayoutDir( nPositionLayoutDir );
}
// <--
- else if( pDoc->GetRootFrm() )
+ else if( pDoc->GetCurrentLayout()) //swmod 080218
{
UnoActionContext aCtx(pDoc);
if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORTYPE == pEntry->nMemberId)
@@ -1411,11 +1411,11 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
//if the fly has been anchored at page then it needs to be connected
//to the content position
SwPaM aPam(pDoc->GetNodes().GetEndOfContent());
- if( pDoc->GetRootFrm() )
+ if( pDoc->GetCurrentLayout() )
{
SwCrsrMoveState aState( MV_SETONLYTEXT );
Point aTmp( pObj->GetSnapRect().TopLeft() );
- pDoc->GetRootFrm()->GetCrsrOfst( aPam.GetPoint(), aTmp, &aState );
+ pDoc->GetCurrentLayout()->GetCrsrOfst( aPam.GetPoint(), aTmp, &aState );
}
else
{
@@ -1530,7 +1530,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
aKeepedPosition = getPosition();
}
// <--
- if( pFmt && pFmt->GetDoc()->GetRootFrm() )
+ if( pFmt && pFmt->GetDoc()->GetCurrentViewShell() ) //swmod 071108//swmod 071225
{
UnoActionContext aCtx(pFmt->GetDoc());
xPrSet->setPropertyValue(rPropertyName, aValue);
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index 2923b4e46317..f349cbb40027 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -388,7 +388,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara()
if ( !pCurrentPage && !pStopPage )
{
pStopPage = pStartPage;
- pCurrentPage = static_cast<SwPageFrm*>(mpDoc->GetRootFrm()->Lower());
+ pCurrentPage = static_cast<SwPageFrm*>(pViewShell->GetLayout()->Lower());
}
}
}
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index d9334e97c841..355857385903 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -212,9 +212,9 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
? FLY_AT_CHAR : FLY_AT_PARA);
const SwCntntFrm* pCFrm;
const SwCntntNode* pCNd;
- if( pDoc->GetRootFrm() &&
+ if( pDoc->GetCurrentViewShell() && //swmod 071108//swmod 071225
0 != (pCNd = rIdx.GetNode().GetCntntNode()) &&
- 0 != (pCFrm = pCNd->GetFrm()) )
+ 0 != (pCFrm = pCNd->getLayoutFrm( pDoc->GetCurrentLayout())) )
{
const SwSortedObjs *pObjs = pCFrm->GetDrawObjs();
if( pObjs )
@@ -272,7 +272,7 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
UnoActionContext::UnoActionContext(SwDoc *const pDoc)
: m_pDoc(pDoc)
{
- SwRootFrm *const pRootFrm = m_pDoc->GetRootFrm();
+ SwRootFrm *const pRootFrm = m_pDoc->GetCurrentLayout();
if (pRootFrm)
{
pRootFrm->StartAllAction();
@@ -287,7 +287,7 @@ UnoActionContext::~UnoActionContext()
// Doc may already have been removed here
if (m_pDoc)
{
- SwRootFrm *const pRootFrm = m_pDoc->GetRootFrm();
+ SwRootFrm *const pRootFrm = m_pDoc->GetCurrentLayout();
if (pRootFrm)
{
pRootFrm->EndAllAction();
@@ -301,7 +301,7 @@ UnoActionContext::~UnoActionContext()
UnoActionRemoveContext::UnoActionRemoveContext(SwDoc *const pDoc)
: m_pDoc(pDoc)
{
- SwRootFrm *const pRootFrm = m_pDoc->GetRootFrm();
+ SwRootFrm *const pRootFrm = m_pDoc->GetCurrentLayout();
if (pRootFrm)
{
pRootFrm->UnoRemoveAllActions();
@@ -313,7 +313,7 @@ UnoActionRemoveContext::UnoActionRemoveContext(SwDoc *const pDoc)
* --------------------------------------------------*/
UnoActionRemoveContext::~UnoActionRemoveContext()
{
- SwRootFrm *const pRootFrm = m_pDoc->GetRootFrm();
+ SwRootFrm *const pRootFrm = m_pDoc->GetCurrentLayout();
if (pRootFrm)
{
pRootFrm->UnoRestoreAllActions();