summaryrefslogtreecommitdiff
path: root/sw/source/core/text/porrst.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/porrst.cxx')
-rw-r--r--sw/source/core/text/porrst.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 3bc8e566b335..2e51fa45411b 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -53,6 +53,7 @@
#include <redlnitr.hxx> // SwRedlineItr
#include <porfly.hxx> // SwFlyPortion
#include <atrhndl.hxx>
+#include "rootfrm.hxx"
#include <IDocumentRedlineAccess.hxx>
#include <IDocumentSettingAccess.hxx>
@@ -233,7 +234,7 @@ SwTwips SwTxtFrm::EmptyHeight() const
SwFont *pFnt;
const SwTxtNode& rTxtNode = *GetTxtNode();
const IDocumentSettingAccess* pIDSA = rTxtNode.getIDocumentSettingAccess();
- ViewShell *pSh = GetShell();
+ ViewShell *pSh = getRootFrm()->GetCurrShell();
if ( rTxtNode.HasSwAttrSet() )
{
const SwAttrSet *pAttrSet = &( rTxtNode.GetSwAttrSet() );
@@ -250,8 +251,8 @@ SwTwips SwTxtFrm::EmptyHeight() const
pFnt->SetVertical( 2700 );
OutputDevice* pOut = pSh ? pSh->GetOut() : 0;
- if ( !pOut || !pIDSA->get(IDocumentSettingAccess::BROWSE_MODE) ||
- ( pSh->GetViewOptions()->IsPrtFormat() ) )
+ if ( !pOut || !pSh->GetViewOptions()->getBrowseMode() ||
+ pSh->GetViewOptions()->IsPrtFormat() )
{
pOut = rTxtNode.getIDocumentDeviceAccess()->getReferenceDevice(true);
}
@@ -393,13 +394,13 @@ sal_Bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff )
}
else
{
- ViewShell *pSh = GetShell();
+ ViewShell *pSh = getRootFrm()->GetCurrShell();
SwFontAccess aFontAccess( pFmt, pSh );
SwFont aFnt( *aFontAccess.Get()->GetFont() );
OutputDevice *pOut = 0;
- if( !GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ||
- (pSh && pSh->GetViewOptions()->IsPrtFormat()) )
+ if( !pSh || !pSh->GetViewOptions()->getBrowseMode() ||
+ pSh->GetViewOptions()->IsPrtFormat() )
pOut = GetTxtNode()->getIDocumentDeviceAccess()->getReferenceDevice( true );
if( pSh && !pOut )