summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/paintfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/paintfrm.cxx')
-rw-r--r--sw/source/core/layout/paintfrm.cxx55
1 files changed, 22 insertions, 33 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index e0f4914da529..3a7b31e101fa 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -29,7 +29,7 @@
#include "precompiled_sw.hxx"
#include <com/sun/star/text/HoriOrientation.hpp>
-
+#include <hintids.hxx>
#include <vcl/sound.hxx>
#include <tools/poly.hxx>
#define _SVSTDARR_LONGS
@@ -41,14 +41,12 @@
#include <editeng/prntitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/shaditem.hxx>
-// --> collapsing borders FME 2005-05-27 #i29550#
#include <svx/framelink.hxx>
-// <--
#include <vcl/graph.hxx>
#include <svx/svdpagv.hxx>
-
#include <hintids.hxx>
#include <tgrditem.hxx>
+#include <switerator.hxx>
#include <fmtsrnd.hxx>
#include <fmtclds.hxx>
#include <tools/shl.hxx>
@@ -83,28 +81,20 @@
#include <lineinfo.hxx>
#include <dbg_lay.hxx>
#include <accessibilityoptions.hxx>
-// OD 20.12.2002 #94627#
#include <docsh.hxx>
-// OD 28.02.2003 #b4779636#, #107692#
#include <swtable.hxx>
-// OD 02.07.2003 #108784#
#include <svx/svdogrp.hxx>
-// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
-
-// --> FME 2004-06-08 #i12836# enhanced pdf export
#include <EnhancedPDFExportHelper.hxx>
-// <--
-
#include <ndole.hxx>
#include <svtools/chartprettypainter.hxx>
-
#include <PostItMgr.hxx>
#include <tools/color.hxx>
+#include <vcl/svapp.hxx>
+
#define COL_NOTES_SIDEPANE RGB_COLORDATA(230,230,230)
#define COL_NOTES_SIDEPANE_BORDER RGB_COLORDATA(200,200,200)
#define COL_NOTES_SIDEPANE_SCROLLAREA RGB_COLORDATA(230,230,220)
-#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
@@ -3098,14 +3088,14 @@ void SwRootFrm::HackPrepareLongTblPaint( int nMode )
case HACK_TABLEMODE_INIT : ASSERT( !pLines, "HackPrepare: already prepared" );
pLines = new SwLineRects;
ASSERT( !pGlobalShell, "old GlobalShell lost" );
- pGlobalShell = GetShell();
+ pGlobalShell = GetCurrShell();
bTableHack = sal_True;
break;
case HACK_TABLEMODE_LOCKLINES : pLines->LockLines( sal_True ); break;
case HACK_TABLEMODE_PAINTLINES : pLines->PaintLines( GetShell()->GetOut() );
break;
case HACK_TABLEMODE_UNLOCKLINES: pLines->LockLines( sal_False ); break;
- case HACK_TABLEMODE_EXIT : pLines->PaintLines( GetShell()->GetOut() );
+ case HACK_TABLEMODE_EXIT : pLines->PaintLines( GetCurrShell()->GetOut() );
DELETEZ( pLines );
pGlobalShell = 0;
bTableHack = sal_False;
@@ -3186,7 +3176,7 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
- ViewShell *pSh = GetShell();
+ ViewShell *pSh = getRootFrm()->GetCurrShell();
// --> FME 2004-06-24 #i16816# tagged pdf support
Frm_Info aFrmInfo( *this );
@@ -3629,8 +3619,8 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
// for painting the graphic/OLE. Thus, the clip region is
// also applied for the PDF export.
// if ( !pOut->GetConnectMetaFile() || pOut->GetOutDevType() == OUTDEV_PRINTER )
- ViewShell *pSh = GetShell();
- if ( !pOut->GetConnectMetaFile() || !pSh->GetWin() )
+ ViewShell *pSh = getRootFrm()->GetCurrShell();
+ if ( !pOut->GetConnectMetaFile() || !pSh || !pSh->GetWin() )
// <--
{
pOut->SetClipRegion( aPoly );
@@ -4290,7 +4280,7 @@ void lcl_PaintLeftRightLine( const sal_Bool _bLeft,
// OD 29.04.2003 #107169# - paint SwAligned-rectangle
{
SwRect aPaintRect( aRect );
- ::SwAlignRect( aPaintRect, _rFrm.GetShell() );
+ ::SwAlignRect( aPaintRect, _rFrm.getRootFrm()->GetCurrShell() );
// if <SwAlignRect> reveals rectangle with no width, adjust rectangle
// to the prior left postion with width of one twip.
if ( (aPaintRect.*_rRectFn->fnGetWidth)() == 0 )
@@ -4330,7 +4320,7 @@ void lcl_PaintLeftRightLine( const sal_Bool _bLeft,
// OD 29.04.2003 #107169# - paint SwAligned-rectangle
{
SwRect aPaintRect( aRect );
- ::SwAlignRect( aPaintRect, _rFrm.GetShell() );
+ ::SwAlignRect( aPaintRect, _rFrm.getRootFrm()->GetCurrShell() );
// if <SwAlignRect> reveals rectangle with no width, adjust
// rectangle to the prior left postion with width of one twip.
if ( (aPaintRect.*_rRectFn->fnGetWidth)() == 0 )
@@ -4394,7 +4384,7 @@ void lcl_PaintTopBottomLine( const sal_Bool _bTop,
// OD 29.04.2003 #107169# - paint SwAligned-rectangle
{
SwRect aPaintRect( aRect );
- ::SwAlignRect( aPaintRect, _rFrm.GetShell() );
+ ::SwAlignRect( aPaintRect, _rFrm.getRootFrm()->GetCurrShell() );
// if <SwAlignRect> reveals rectangle with no width, adjust rectangle
// to the prior top postion with width of one twip.
if ( (aPaintRect.*_rRectFn->fnGetHeight)() == 0 )
@@ -4433,7 +4423,7 @@ void lcl_PaintTopBottomLine( const sal_Bool _bTop,
// OD 29.04.2003 #107169# - paint SwAligned-rectangle
{
SwRect aPaintRect( aRect );
- ::SwAlignRect( aPaintRect, _rFrm.GetShell() );
+ ::SwAlignRect( aPaintRect, _rFrm.getRootFrm()->GetCurrShell() );
// if <SwAlignRect> reveals rectangle with no width, adjust
// rectangle to the prior top postion with width of one twip.
if ( (aPaintRect.*_rRectFn->fnGetHeight)() == 0 )
@@ -5252,7 +5242,7 @@ void SwPageFrm::PaintMarginArea( const SwRect& _rOutputRect,
ViewShell* _pViewShell ) const
{
if ( _pViewShell->GetWin() &&
- !_pViewShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
+ !_pViewShell->GetViewOptions()->getBrowseMode() )
{
SwRect aPgPrtRect( Prt() );
aPgPrtRect.Pos() += Frm().Pos();
@@ -5740,8 +5730,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
{
if ( bBack || bPageFrm || !bLowerMode )
{
- const sal_Bool bBrowse = pSh->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
-
+ const sal_Bool bBrowse = pSh->GetViewOptions()->getBrowseMode();
SwRect aRect;
if ( (bPageFrm && bBrowse) ||
(IsTxtFrm() && Prt().SSize() == Frm().SSize()) )
@@ -6393,7 +6382,7 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
return;
ASSERT( GetUpper(), "Retoucheversuch ohne Upper." );
- ASSERT( GetShell() && pGlobalShell->GetWin(), "Retouche auf dem Drucker?" );
+ ASSERT( getRootFrm()->GetCurrShell() && pGlobalShell->GetWin(), "Retouche auf dem Drucker?" );
SwRect aRetouche( GetUpper()->PaintArea() );
aRetouche.Top( Frm().Top() + Frm().Height() );
@@ -6405,7 +6394,7 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
//zum ausstanzen.
SwRegionRects aRegion( aRetouche );
aRegion -= rRect;
- ViewShell *pSh = GetShell();
+ ViewShell *pSh = getRootFrm()->GetCurrShell();
// --> FME 2004-06-24 #i16816# tagged pdf support
SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pSh->GetOut() );
@@ -6502,7 +6491,7 @@ sal_Bool SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
sal_Bool bLowerMode ) const
{
const SwFrm *pFrm = this;
- ViewShell *pSh = GetShell();
+ ViewShell *pSh = getRootFrm()->GetCurrShell();
const SwViewOption *pOpt = pSh->GetViewOptions();
rpBrush = 0;
rpCol = NULL;
@@ -6558,7 +6547,7 @@ sal_Bool SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
{
rpBrush = &rBack;
if ( pFrm->IsPageFrm() &&
- pSh->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
+ pSh->GetViewOptions()->getBrowseMode() )
rOrigRect = pFrm->Frm();
else
{
@@ -6620,10 +6609,10 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
{
Graphic aRet;
//irgendeinen Fly suchen!
- SwClientIter aIter( *this );
- SwClient *pFirst = aIter.First( TYPE(SwFrm) );
+ SwIterator<SwFrm,SwFmt> aIter( *this );
+ SwFrm *pFirst = aIter.First();
ViewShell *pSh;
- if ( pFirst && 0 != ( pSh = ((SwFrm*)pFirst)->GetShell()) )
+ if ( pFirst && 0 != ( pSh = pFirst->getRootFrm()->GetCurrShell()) )
{
ViewShell *pOldGlobal = pGlobalShell;
pGlobalShell = pSh;