Comments cleanup in layout codeOF

This commit is contained in:
Nick Savage
2010-10-01 21:57:36 +02:00
committed by Cédric Bosdonnat
parent c1369970be
commit ede5f05cba
8 changed files with 147 additions and 1068 deletions

View File

@@ -43,15 +43,13 @@
#ifndef _COMCORE_HRC
#include <comcore.hrc>
#endif
// OD 19.02.2003 #107369# - method <SwAlignRect(..)>
#include <frmtool.hxx>
// OD 24.09.2003 #i19975#
#include <svx/zoomitem.hxx>
#include <printdata.hxx>
#include <IDocumentDeviceAccess.hxx>
// OD 20.02.2003 #107369# - method to update statics for paint
// method to update statics for paint
// Note: method defined in '/sw/source/core/layout/paintfrm.cxx'
extern void SwCalcPixStatics( OutputDevice *pOut );
@@ -67,7 +65,6 @@ SwPagePreviewLayout::SwPagePreviewLayout( ViewShell& _rParentViewShell,
{
_Clear();
// OD 2004-03-05 #i18143#
mbBookPreview = false;
mbBookPreviewModeToggled = false;
@@ -104,7 +101,6 @@ void SwPagePreviewLayout::_Clear()
mnSelectedPageNum = 0;
_ClearPrevwPageData();
// OD 07.11.2003 #i22014#
mbInPaint = false;
mbNewLayoutDuringPaint = false;
}
@@ -132,12 +128,6 @@ void SwPagePreviewLayout::_ClearPrevwPageData()
maPrevwPages.clear();
}
/** calculate page preview layout sizes
OD 18.12.2002 #103492#
@author OD
*/
void SwPagePreviewLayout::_CalcPrevwLayoutSizes()
{
// calculate maximal page size; calculate also number of pages
@@ -176,7 +166,6 @@ void SwPagePreviewLayout::_CalcPrevwLayoutSizes()
// document height
// determine number of rows needed for <nPages> in preview layout
// OD 19.02.2003 #107369# - use method <GetRowOfPage(..)>.
sal_uInt16 nDocRows = GetRowOfPage( mnPages );
aDocSize.Height() = nDocRows * maMaxPageSize.Height() +
(nDocRows+1) * mnYFree;
@@ -187,14 +176,12 @@ void SwPagePreviewLayout::_CalcPrevwLayoutSizes()
/** init page preview layout
OD 11.12.2002 #103492#
initialize the page preview settings for a given layout.
side effects:
(1) If parameter <_bCalcScale> is true, mapping mode with calculated
scaling is set at the output device and the zoom at the view options of
the given view shell is set with the calculated scaling.
@author OD
*/
bool SwPagePreviewLayout::Init( const sal_uInt16 _nCols,
const sal_uInt16 _nRows,
@@ -253,7 +240,6 @@ bool SwPagePreviewLayout::Init( const sal_uInt16 _nCols,
aMapMode.SetScaleX( aYScale );
// set created mapping mode with calculated scaling at output device.
mrParentViewShell.GetOut()->SetMapMode( aMapMode );
// OD 20.02.2003 #107369# - update statics for paint.
::SwCalcPixStatics( mrParentViewShell.GetOut() );
}
@@ -265,12 +251,6 @@ bool SwPagePreviewLayout::Init( const sal_uInt16 _nCols,
return true;
}
/** apply new zoom at given view shell
OD 11.12.2002 #103492# - implementation of <_ApplyNewZoomAtViewShell>
@author OD
*/
void SwPagePreviewLayout::_ApplyNewZoomAtViewShell( sal_uInt8 _aNewZoom )
{
SwViewOption aNewViewOptions = *(mrParentViewShell.GetViewOptions());
@@ -284,12 +264,6 @@ void SwPagePreviewLayout::_ApplyNewZoomAtViewShell( sal_uInt8 _aNewZoom )
}
}
/** method to adjust page preview layout to document changes
OD 18.12.2002 #103492#
@author OD
*/
bool SwPagePreviewLayout::ReInit()
{
// check environment and parameters
@@ -310,13 +284,8 @@ bool SwPagePreviewLayout::ReInit()
// =============================================================================
// methods to prepare paint of page preview
// =============================================================================
/** prepare paint of page preview
OD 12.12.2002 #103492#
OD 21.03.2003 #108282# - delete parameter _onStartPageVirtNum
@author OD, _nProposedStartPageNum, _onStartPageNum are absolute
*/
// _nProposedStartPageNum, _onStartPageNum are absolute
bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
const Point _aProposedStartPos,
const Size& _rPxWinSize,
@@ -374,8 +343,7 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
// determine start page
if ( _bStartWithPageAtFirstCol )
{
// OD 19.02.2003 #107369# - leaving left-top-corner blank is
// controlled by <mbBookPreview>.
// leaving left-top-corner blank is controlled by <mbBookPreview>.
if ( mbBookPreview &&
( nProposedStartPageNum == 1 || nRowOfProposed == 1 )
)
@@ -414,16 +382,14 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
sal_uInt16 nRowOfProposed =
static_cast<sal_uInt16>(_aProposedStartPos.Y() / mnRowHeight) + 1;
// determine start page == page at proposed start position
// OD 19.02.2003 #107369# - leaving left-top-corner blank is
// controlled by <mbBookPreview>.
// leaving left-top-corner blank is controlled by <mbBookPreview>.
if ( mbBookPreview &&
( nRowOfProposed == 1 && nColOfProposed == 1 )
)
mnPaintPhyStartPageNum = 1;
else
{
// OD 19.02.2003 #107369# - leaving left-top-corner blank is
// controlled by <mbBookPreview>.
// leaving left-top-corner blank is controlled by <mbBookPreview>.
mnPaintPhyStartPageNum = (nRowOfProposed-1) * mnCols + nColOfProposed;
if ( mbBookPreview )
--mnPaintPhyStartPageNum;
@@ -454,8 +420,7 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
_CalcDocPrevwPaintRect();
_orDocPreviewPaintRect = maPaintedPrevwDocRect;
// OD 20.01.2003 #103492# - shift visible preview document area to the left,
// if on the right is an area left blank.
// shift visible preview document area to the left,if on the right is an area left blank.
if ( !mbDoesLayoutColsFitIntoWindow &&
maPaintedPrevwDocRect.GetWidth() < maWinSize.Width() )
{
@@ -465,9 +430,7 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
_rPxWinSize, _onStartPageNum,
_orDocPreviewPaintRect, _bStartWithPageAtFirstCol );
}
// OD 20.01.2003 #103492# - shift visible preview document area to the top,
// if on the botton is an area left blank.
// shift visible preview document area to the left,if on the right is an area left blank.
if ( mbBookPreviewModeToggled &&
maPaintedPrevwDocRect.Bottom() == maPreviewDocRect.Bottom() &&
maPaintedPrevwDocRect.GetHeight() < maWinSize.Height() )
@@ -497,7 +460,7 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
// accessible pages with needed data.
_CalcPreviewPages();
// OD 07.11.2003 #i22014# - indicate new layout, if print preview is in paint
// indicate new layout, if print preview is in paint
if ( mbInPaint )
{
mbNewLayoutDuringPaint = true;
@@ -512,12 +475,6 @@ bool SwPagePreviewLayout::Prepare( const sal_uInt16 _nProposedStartPageNum,
return true;
}
/** calculate additional paint offset
OD 12.12.2002 #103492#
@author OD
*/
void SwPagePreviewLayout::_CalcAdditionalPaintOffset()
{
if ( mnPrevwLayoutWidth <= maWinSize.Width() &&
@@ -545,12 +502,6 @@ void SwPagePreviewLayout::_CalcAdditionalPaintOffset()
}
}
/** calculate painted preview document rectangle
OD 12.12.2002 #103492#
@author OD
*/
void SwPagePreviewLayout::_CalcDocPrevwPaintRect()
{
Point aTopLeftPos = maPaintPreviewDocOffset;
@@ -558,14 +509,12 @@ void SwPagePreviewLayout::_CalcDocPrevwPaintRect()
Size aSize;
if ( mbDoesLayoutColsFitIntoWindow )
//aSize.Width() = mnPrevwLayoutWidth;
aSize.Width() = Min( mnPrevwLayoutWidth,
maPreviewDocRect.GetWidth() - aTopLeftPos.X() );
else
aSize.Width() = Min( maPreviewDocRect.GetWidth() - aTopLeftPos.X(),
maWinSize.Width() - maAdditionalPaintOffset.X() );
if ( mbDoesLayoutRowsFitIntoWindow )
//aSize.Height() = mnPrevwLayoutHeight;
aSize.Height() = Min( mnPrevwLayoutHeight,
maPreviewDocRect.GetHeight() - aTopLeftPos.Y() );
else
@@ -574,12 +523,6 @@ void SwPagePreviewLayout::_CalcDocPrevwPaintRect()
maPaintedPrevwDocRect.SetSize( aSize );
}
/** calculate preview pages
OD 12.12.2002 #103492#
@author OD
*/
void SwPagePreviewLayout::_CalcPreviewPages()
{
_ClearPrevwPageData();
@@ -634,8 +577,7 @@ void SwPagePreviewLayout::_CalcPreviewPages()
}
if ( aCurrPaintOffset.X() < maWinSize.Width() )
{
// OD 19.02.2003 #107369# - leaving left-top-corner blank is
// controlled by <mbBookPreview>.
// leaving left-top-corner blank is controlled by <mbBookPreview>.
if ( mbBookPreview && pPage->GetPhyPageNum() == 1 && mnCols != 1 && nCurrCol == 1
)
{
@@ -676,12 +618,6 @@ void SwPagePreviewLayout::_CalcPreviewPages()
}
}
/** determines preview data for a given page and a given preview offset
OD 13.12.2002 #103492#
@author OD
*/
bool SwPagePreviewLayout::_CalcPreviewDataForPage( const SwPageFrm& _rPage,
const Point& _rPrevwOffset,
PrevwPage* _opPrevwPage )
@@ -720,12 +656,6 @@ bool SwPagePreviewLayout::_CalcPreviewDataForPage( const SwPageFrm& _rPage,
return true;
}
/** enable/disable book preview
OD 2004-03-04 #i18143#
@author OD
*/
bool SwPagePreviewLayout::SetBookPreviewMode( const bool _bEnableBookPreview,
sal_uInt16& _onStartPageNum,
Rectangle& _orDocPreviewPaintRect )
@@ -763,12 +693,7 @@ bool SwPagePreviewLayout::SetBookPreviewMode( const bool _bEnableBookPreview,
// methods to determine new data for changing the current shown part of the
// document preview.
// =============================================================================
/** calculate start position for new scale
OD 12.12.2002 #103492#
@author OD
*/
Point SwPagePreviewLayout::GetPreviewStartPosForNewScale(
const Fraction& _aNewScale,
const Fraction& _aOldScale,
@@ -1046,12 +971,7 @@ SwTwips SwPagePreviewLayout::GetWinPagesScrollAmount(
// =============================================================================
// methods to paint page preview layout
// =============================================================================
/** paint prepared preview
OD 12.12.2002 #103492#
@author OD
*/
bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
{
// check environment and parameters
@@ -1066,7 +986,7 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
return false;
}
// OD 17.11.2003 #i22014# - no paint, if <superfluous> flag is set at layout
// #i22014# no paint if <superfluous> flag is set at layout
if ( mrLayoutRootFrm.IsSuperfluous() )
{
return true;
@@ -1074,7 +994,7 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
// environment and parameter ok
// OD 07.11.2003 #i22014#
// #i22014#
if ( mbInPaint )
{
return false;
@@ -1137,8 +1057,8 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
const Color aRetouche( mrParentViewShell.Imp()->GetRetoucheColor() );
if( pOutputDev->GetFillColor() != aRetouche )
pOutputDev->SetFillColor( aRetouche );
pOutputDev->SetLineColor(); // OD 20.02.2003 #107369# - no line color
// OD 20.02.2003 #107369# - use aligned page rectangle
pOutputDev->SetLineColor(); // no line color
// use aligned page rectangle
{
SwRect aTmpPageRect( aPageRect );
::SwAlignRect( aTmpPageRect, &mrParentViewShell);
@@ -1155,8 +1075,7 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
TEXT_DRAW_CLIP );
pOutputDev->SetFont( aOldFont );
// paint shadow and border for empty page
// OD 19.02.2003 #107369# - use new method to paint page border and
// shadow
// use new method to paint page border and shadow
SwPageFrm::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, true );
}
else
@@ -1165,8 +1084,7 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
aPxPaintRect.Intersection( aPxOutRect );
Rectangle aPaintRect = pOutputDev->PixelToLogic( aPxPaintRect );
mrParentViewShell.Paint( aPaintRect );
// --> OD 2007-08-15 #i80691#
// paint page border and shadow
// #i80691# paint page border and shadow
{
SwRect aPageBorderRect;
SwPageFrm::GetBorderAndShadowBoundRect( SwRect( aPageRect ), &mrParentViewShell, aPageBorderRect, true );
@@ -1175,10 +1093,8 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
SwPageFrm::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, true );
mrParentViewShell.DLPostPaint2(true);
}
// <--
}
// OD 07.11.2003 #i22014# - stop painting, because new print
// preview layout is created during paint.
// #i22014# stop painting, because new print preview layout is created during paint.
if ( mbNewLayoutDuringPaint )
{
break;
@@ -1192,8 +1108,7 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
}
}
// OD 17.11.2003 #i22014# - no update of accessible preview, if a new
// print preview layout is created during paint.
// #i22014# no update of accessible preview, if a new print preview layout is created during paint.
if ( !mbNewLayoutDuringPaint )
{
// update at accessiblilty interface
@@ -1207,19 +1122,12 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
pOutputDev->SetMapMode( aSavedMapMode );
mrParentViewShell.aVisArea.Clear();
// OD 07.11.2003 #i22014#
mbInPaint = false;
mbNewLayoutDuringPaint = false;
return true;
}
/** repaint pages on page preview
OD 18.12.2002 #103492#
@author OD
*/
void SwPagePreviewLayout::Repaint( const Rectangle _aInvalidCoreRect ) const
{
// check environment and parameters
@@ -1265,12 +1173,6 @@ void SwPagePreviewLayout::Repaint( const Rectangle _aInvalidCoreRect ) const
}
}
/** paint selection mark at page
OD 17.12.2002 #103492#
@author OD
*/
void SwPagePreviewLayout::_PaintSelectMarkAtPage(
const PrevwPage* _aSelectedPrevwPage ) const
{
@@ -1296,20 +1198,20 @@ void SwPagePreviewLayout::_PaintSelectMarkAtPage(
// calculate page rectangle in pixel coordinates
SwRect aPageRect( _aSelectedPrevwPage->aLogicPos,
_aSelectedPrevwPage->aPageSize );
// OD 19.02.2003 #107369# - use aligned page rectangle, as it is used for
// use aligned page rectangle, as it is used for
// page border and shadow paint - see <SwPageFrm::PaintBorderAndShadow(..)>
::SwAlignRect( aPageRect, &mrParentViewShell);
Rectangle aPxPageRect = pOutputDev->LogicToPixel( aPageRect.SVRect() );
// draw two rectangle
// OD 19.02.2003 #107369# - adjust position of select mark rectangle
// adjust position of select mark rectangle
Rectangle aRect( aPxPageRect.Left(), aPxPageRect.Top(),
aPxPageRect.Right(), aPxPageRect.Bottom() );
aRect = pOutputDev->PixelToLogic( aRect );
pOutputDev->SetFillColor(); // OD 20.02.2003 #107369# - no fill color
pOutputDev->SetFillColor(); // no fill color
pOutputDev->SetLineColor( aSelPgLineColor );
pOutputDev->DrawRect( aRect );
// OD 19.02.2003 #107369# - adjust position of select mark rectangle
// adjust position of select mark rectangle
aRect = Rectangle( aPxPageRect.Left()+1, aPxPageRect.Top()+1,
aPxPageRect.Right()-1, aPxPageRect.Bottom()-1 );
aRect = pOutputDev->PixelToLogic( aRect );
@@ -1323,14 +1225,8 @@ void SwPagePreviewLayout::_PaintSelectMarkAtPage(
pOutputDev->SetMapMode( aSavedMapMode );
}
/** paint to mark new selected page
OD 17.12.2002 #103492#
Perform paint for current selected page in order to unmark it.
Set new selected page and perform paint to mark this page.
@author OD, _nSelectedPage, mnSelectedPage are absolut
*/
// Perform paint for current selected page in order to unmark it.
// Set new selected page and perform paint to mark this page.
void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage )
{
sal_uInt16 nOldSelectedPageNum = mnSelectedPageNum;
@@ -1340,7 +1236,7 @@ void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage )
const PrevwPage* pOldSelectedPrevwPage = _GetPrevwPageByPageNum( nOldSelectedPageNum );
if ( pOldSelectedPrevwPage && pOldSelectedPrevwPage->bVisible )
{
// OD 20.02.2003 #107369# - invalidate only areas of selection mark.
// invalidate only areas of selection mark.
SwRect aPageRect( pOldSelectedPrevwPage->aPrevwWinPos,
pOldSelectedPrevwPage->aPageSize );
::SwAlignRect( aPageRect, &mrParentViewShell);
@@ -1374,12 +1270,7 @@ void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage )
// =============================================================================
// helper methods
// =============================================================================
/** get preview page by physical page number
OD 17.12.2002 #103492#
@author OD
*/
struct EqualsPageNumPred
{
const sal_uInt16 mnPageNum;
@@ -1402,16 +1293,9 @@ const PrevwPage* SwPagePreviewLayout::_GetPrevwPageByPageNum( const sal_uInt16 _
return (*aFoundPrevwPageIter);
}
/** determine row the page with the given number is in
OD 17.01.2003 #103492#
@author OD, _nPageNum is relative
*/
sal_uInt16 SwPagePreviewLayout::GetRowOfPage( sal_uInt16 _nPageNum ) const
{
// OD 19.02.2003 #107369# - leaving left-top-corner blank is controlled
// by <mbBookPreview>.
// leaving left-top-corner blank is controlled by <mbBookPreview>.
if ( mbBookPreview )
{
// Note: increase given physical page number by one, because left-top-corner
@@ -1425,17 +1309,9 @@ sal_uInt16 SwPagePreviewLayout::GetRowOfPage( sal_uInt16 _nPageNum ) const
return nRow;
}
/** determine column the page with the given number is in
OD 17.01.2003 #103492#
@author OD, _nPageNum is relative
*/
sal_uInt16 SwPagePreviewLayout::GetColOfPage( sal_uInt16 _nPageNum ) const
{
// OD 19.02.2003 #107369# - leaving left-top-corner blank is controlled
// by <mbBookPreview>.
// leaving left-top-corner blank is controlled by <mbBookPreview>.
if ( mbBookPreview )
{
// Note: increase given physical page number by one, because left-top-corner
@@ -1462,12 +1338,6 @@ Size SwPagePreviewLayout::GetPrevwDocSize() const
return maPreviewDocRect.GetSize();
}
/** get size of a preview page by its physical page number
OD 15.01.2003 #103492#
@author OD
*/
Size SwPagePreviewLayout::GetPrevwPageSizeByPageNum( sal_uInt16 _nPageNum ) const
{
const PrevwPage* pPrevwPage = _GetPrevwPageByPageNum( _nPageNum );
@@ -1481,12 +1351,6 @@ Size SwPagePreviewLayout::GetPrevwPageSizeByPageNum( sal_uInt16 _nPageNum ) cons
}
}
/** get virtual page number by its physical page number
OD 21.03.2003 #108282#
@author OD
*/
sal_uInt16 SwPagePreviewLayout::GetVirtPageNumByPageNum( sal_uInt16 _nPageNum ) const
{
const PrevwPage* pPrevwPage = _GetPrevwPageByPageNum( _nPageNum );
@@ -1500,10 +1364,6 @@ sal_uInt16 SwPagePreviewLayout::GetVirtPageNumByPageNum( sal_uInt16 _nPageNum )
}
}
/** Convert absolute to relative page numbers (see PrintEmptyPages)
@author FME
*/
sal_uInt16 SwPagePreviewLayout::ConvertAbsoluteToRelativePageNum( sal_uInt16 _nAbsPageNum ) const
{
if ( mbBookPreview || mbPrintEmptyPages || !_nAbsPageNum )
@@ -1526,10 +1386,6 @@ sal_uInt16 SwPagePreviewLayout::ConvertAbsoluteToRelativePageNum( sal_uInt16 _nA
return nRet;
}
/** Convert relative to absolute page numbers (see PrintEmptyPages)
@author FME
*/
sal_uInt16 SwPagePreviewLayout::ConvertRelativeToAbsolutePageNum( sal_uInt16 _nRelPageNum ) const
{
if ( mbBookPreview || mbPrintEmptyPages || !_nRelPageNum )

View File

@@ -102,8 +102,8 @@ void SwRenderData::DeletePostItData()
{
if (HasPostItData())
{
m_pPostItDoc->setPrinter( 0, false, false ); //damit am echten DOC der Drucker bleibt
delete m_pPostItShell; //Nimmt das PostItDoc mit ins Grab.
m_pPostItDoc->setPrinter( 0, false, false ); // So that the printer remains at the real DOC
delete m_pPostItShell;
delete m_pPostItFields;
m_pPostItDoc = 0;
m_pPostItShell = 0;

View File

@@ -38,8 +38,6 @@
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
/// OD 29.08.2002 #102450#
/// include <svx/svdoutl.hxx>
#include <svx/svdoutl.hxx>
#ifdef DBG_UTIL
@@ -61,123 +59,45 @@
#include <IDocumentDrawModelAccess.hxx>
/*************************************************************************
|*
|* SwSaveHdl
|*
|* Ersterstellung MA 14. Feb. 95
|* Letzte Aenderung MA 02. Jun. 98
|*
|*************************************************************************/
//SwSaveHdl::SwSaveHdl( SwViewImp *pI ) :
// pImp( pI ),
// bXorVis( FALSE )
//{
//if ( pImp->HasDrawView() )
//{
// bXorVis = pImp->GetDrawView()->IsShownXorVisible( pImp->GetShell()->GetOut());
// if ( bXorVis )
// pImp->GetDrawView()->HideShownXor( pImp->GetShell()->GetOut() );
//}
//}
//SwSaveHdl::~SwSaveHdl()
//{
//if ( bXorVis )
// pImp->GetDrawView()->ShowShownXor( pImp->GetShell()->GetOut() );
//}
/*************************************************************************
|*
|* SwViewImp::StartAction(), EndAction()
|*
|* Ersterstellung MA 14. Feb. 95
|* Letzte Aenderung MA 14. Sep. 98
|*
|*************************************************************************/
void SwViewImp::StartAction()
{
if ( HasDrawView() )
{
SET_CURR_SHELL( GetShell() );
if ( pSh->ISA(SwFEShell) )
((SwFEShell*)pSh)->HideChainMarker(); //Kann sich geaendert haben
//bResetXorVisibility = GetDrawView()->IsShownXorVisible( GetShell()->GetOut());
//GetDrawView()->HideShownXor( GetShell()->GetOut() );
((SwFEShell*)pSh)->HideChainMarker();
}
}
void SwViewImp::EndAction()
{
if ( HasDrawView() )
{
SET_CURR_SHELL( GetShell() );
//if ( bResetXorVisibility )
// GetDrawView()->ShowShownXor( GetShell()->GetOut() );
if ( pSh->ISA(SwFEShell) )
((SwFEShell*)pSh)->SetChainMarker(); //Kann sich geaendert haben
((SwFEShell*)pSh)->SetChainMarker(); // May have changed
}
}
/*************************************************************************
|*
|* SwViewImp::LockPaint(), UnlockPaint()
|*
|* Ersterstellung MA 11. Jun. 96
|* Letzte Aenderung MA 11. Jun. 96
|*
|*************************************************************************/
void SwViewImp::LockPaint()
{
if ( HasDrawView() )
{
//HMHbShowHdlPaint = GetDrawView()->IsMarkHdlShown();
//HMHif ( bShowHdlPaint )
//HMH GetDrawView()->HideMarkHdl();
bResetHdlHiddenPaint = !GetDrawView()->areMarkHandlesHidden();
GetDrawView()->hideMarkHandles();
}
else
{
//HMHbShowHdlPaint = FALSE;
bResetHdlHiddenPaint = FALSE;
}
}
void SwViewImp::UnlockPaint()
{
if ( bResetHdlHiddenPaint )
GetDrawView()->showMarkHandles();
//HMHif ( bShowHdlPaint )
//HMH GetDrawView()->ShowMarkHdl();
}
/*************************************************************************
|*
|* SwViewImp::PaintLayer(), PaintDispatcher()
|*
|* Ersterstellung MA 20. Dec. 94
|* Letzte Aenderung AMA 04. Jun. 98
|*
|*************************************************************************/
// OD 29.08.2002 #102450#
// add 3rd paramter <const Color* pPageBackgrdColor> for setting this
// color as the background color at the outliner of the draw view.
// OD 09.12.2002 #103045# - add 4th parameter for the horizontal text direction
// of the page in order to set the default horizontal text direction at the
// outliner of the draw view for painting layers <hell> and <heaven>.
// OD 25.06.2003 #108784# - correct type of 1st parameter
void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
const SwPrtOptions * _pPrintData,
const SwRect& ,
@@ -196,14 +116,11 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
pOutDev->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL |
DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT );
}
// OD 29.08.2002 #102450#
// For correct handling of accessibility, high contrast, the page background
// color is set as the background color at the outliner of the draw view.
// Only necessary for the layers hell and heaven
Color aOldOutlinerBackgrdColor;
// OD 09.12.2002 #103045# - set default horizontal text direction on
// painting <hell> or <heaven>.
// set default horizontal text direction on painting <hell> or <heaven>.
EEHorizontalTextDirection aOldEEHoriTextDir = EE_HTEXTDIR_L2R;
const IDocumentDrawModelAccess* pIDDMA = GetShell()->getIDocumentDrawModelAccess();
if ( (_nLayerID == pIDDMA->GetHellId()) ||
@@ -235,9 +152,8 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
GetPageView()->DrawLayer(_nLayerID, pOutDev);
pOutDev->Pop();
// OD 29.08.2002 #102450#
// reset background color of the outliner
// OD 09.12.2002 #103045# - reset default horizontal text direction
// reset default horizontal text direction
if ( (_nLayerID == pIDDMA->GetHellId()) ||
(_nLayerID == pIDDMA->GetHeavenId()) )
{
@@ -249,14 +165,6 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
}
}
/*************************************************************************
|*
|* SwViewImp::IsDragPossible()
|*
|* Ersterstellung MA 19. Jan. 93
|* Letzte Aenderung MA 16. Jan. 95
|*
|*************************************************************************/
#define WIEDUWILLST 400
BOOL SwViewImp::IsDragPossible( const Point &rPoint )
@@ -288,15 +196,6 @@ BOOL SwViewImp::IsDragPossible( const Point &rPoint )
return aRect.IsInside( rPoint );
}
/*************************************************************************
|*
|* SwViewImp::NotifySizeChg()
|*
|* Ersterstellung MA 23. Jun. 93
|* Letzte Aenderung MA 05. Oct. 98
|*
|*************************************************************************/
void SwViewImp::NotifySizeChg( const Size &rNewSz )
{
if ( !HasDrawView() )
@@ -305,7 +204,6 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
if ( GetPageView() )
GetPageView()->GetPage()->SetSize( rNewSz );
//Begrenzung des Arbeitsbereiches.
const Rectangle aRect( Point( DOCUMENTBORDER, DOCUMENTBORDER ), rNewSz );
const Rectangle &rOldWork = GetDrawView()->GetWorkArea();
BOOL bCheckDrawObjs = FALSE;
@@ -326,8 +224,6 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
SdrObject *pObj = pPage->GetObj( nObj );
if( !pObj->ISA(SwVirtFlyDrawObj) )
{
//Teilfix(26793): Objekte, die in Rahmen verankert sind, brauchen
//nicht angepasst werden.
const SwContact *pCont = (SwContact*)GetUserCall(pObj);
//JP - 16.3.00 Bug 73920: this function might be called by the
// InsertDocument, when a PageDesc-Attribute is
@@ -344,7 +240,7 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
continue;
}
// OD 19.06.2003 #108784# - no move for drawing objects in header/footer
// no move for drawing objects in header/footer
if ( pAnchor->FindFooterOrHeader() )
{
continue;
@@ -361,7 +257,7 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
if ( aSz.Width() || aSz.Height() )
pObj->Move( aSz );
//Notanker: Grosse Objekte nicht nach oben verschwinden lassen.
//Note anchor: Large objects can not disappear from the top.
aSz.Width() = aSz.Height() = 0;
if ( aBound.Bottom() < aRect.Top() )
aSz.Width() = (aBound.Bottom() - aRect.Top()) - MINFLY;

View File

@@ -46,7 +46,6 @@
#include <svx/svdpage.hxx>
#include <accmap.hxx>
// OD 12.12.2002 #103492#
#include <pagepreviewlayout.hxx>
#include <comcore.hrc>
@@ -56,19 +55,10 @@
#include <IDocumentDeviceAccess.hxx>
#include <IDocumentSettingAccess.hxx>
/*************************************************************************
|*
|* SwViewImp::Init()
|*
|* Ersterstellung MA 25. Jul. 94
|* Letzte Aenderung MA 03. Nov. 95
|*
|*************************************************************************/
void SwViewImp::Init( const SwViewOption *pNewOpt )
{
ASSERT( pDrawView, "SwViewImp::Init without DrawView" );
//Jetzt die PageView erzeugen wenn sie noch nicht existiert.
//Now create the page view if it does not exist.
SwRootFrm *pRoot = pSh->getIDocumentLayoutAccess()->GetRootFrm();
if ( !pSdrPageView )
{
@@ -80,8 +70,7 @@ void SwViewImp::Init( const SwViewOption *pNewOpt )
pRoot->GetDrawPage()->SetSize( pRoot->Frm().SSize() );
pSdrPageView = pDrawView->ShowSdrPage( pRoot->GetDrawPage());
// OD 26.06.2003 #108784# - notify drawing page view about invisible
// layers.
// notify drawing page view about invisible layers.
pIDDMA->NotifyInvisibleLayers( *pSdrPageView );
}
pDrawView->SetDragStripes( pNewOpt->IsCrossHair() );
@@ -110,15 +99,6 @@ void SwViewImp::Init( const SwViewOption *pNewOpt )
pDrawView->SetMarkHdlSizePixel(pNewOpt->IsBigMarkHdl() ? 9 : 7);
}
/*************************************************************************
|*
|* SwViewImp::SwViewImp() CTor fuer die Core-Internas
|*
|* Ersterstellung MA 25. Jul. 94
|* Letzte Aenderung MA 06. Sep. 96
|*
|*************************************************************************/
SwViewImp::SwViewImp( ViewShell *pParent ) :
pSh( pParent ),
pDrawView( 0 ),
@@ -130,33 +110,19 @@ SwViewImp::SwViewImp( ViewShell *pParent ) :
pAccMap( 0 ),
pSdrObjCached(NULL),
nRestoreActions( 0 ),
// OD 12.12.2002 #103492#
mpPgPrevwLayout( 0 )
{
//bResetXorVisibility =
//HMHbShowHdlPaint =
bResetHdlHiddenPaint =
bSmoothUpdate = bStopSmooth = bStopPrt = FALSE;
bFirstPageInvalid = TRUE;
}
/******************************************************************************
|*
|* SwViewImp::~SwViewImp()
|*
|* Ersterstellung MA 25. Jul. 94
|* Letzte Aenderung MA 16. Dec. 94
|*
******************************************************************************/
SwViewImp::~SwViewImp()
{
delete pAccMap;
// OD 12.12.2002 #103492#
delete mpPgPrevwLayout;
//JP 29.03.96: nach ShowSdrPage muss auch HideSdrPage gemacht werden!!!
if( pDrawView )
pDrawView->HideSdrPage();
@@ -168,29 +134,11 @@ SwViewImp::~SwViewImp()
ASSERT( !pIdleAct,"Be idle for the rest of your life." );
}
/******************************************************************************
|*
|* SwViewImp::DelRegions()
|*
|* Ersterstellung MA 14. Apr. 94
|* Letzte Aenderung MA 14. Apr. 94
|*
******************************************************************************/
void SwViewImp::DelRegion()
{
DELETEZ(pRegion);
}
/******************************************************************************
|*
|* SwViewImp::AddPaintRect()
|*
|* Ersterstellung MA ??
|* Letzte Aenderung MA 27. Jul. 94
|*
******************************************************************************/
BOOL SwViewImp::AddPaintRect( const SwRect &rRect )
{
if ( rRect.IsOver( pSh->VisArea() ) )
@@ -203,31 +151,12 @@ BOOL SwViewImp::AddPaintRect( const SwRect &rRect )
return FALSE;
}
/******************************************************************************
|*
|* ViewImp::CheckWaitCrsr()
|*
|* Ersterstellung MA 10. Aug. 94
|* Letzte Aenderung MA 10. Aug. 94
|*
******************************************************************************/
void SwViewImp::CheckWaitCrsr()
{
if ( pLayAct )
pLayAct->CheckWaitCrsr();
}
/******************************************************************************
|*
|* ViewImp::IsCalcLayoutProgress()
|*
|* Ersterstellung MA 12. Aug. 94
|* Letzte Aenderung MA 12. Aug. 94
|*
******************************************************************************/
BOOL SwViewImp::IsCalcLayoutProgress() const
{
if ( pLayAct )
@@ -235,15 +164,6 @@ BOOL SwViewImp::IsCalcLayoutProgress() const
return FALSE;
}
/******************************************************************************
|*
|* ViewImp::IsUpdateExpFlds()
|*
|* Ersterstellung MA 28. Mar. 96
|* Letzte Aenderung MA 28. Mar. 96
|*
******************************************************************************/
BOOL SwViewImp::IsUpdateExpFlds()
{
if ( pLayAct && pLayAct->IsCalcLayout() )
@@ -254,24 +174,12 @@ BOOL SwViewImp::IsUpdateExpFlds()
return FALSE;
}
/******************************************************************************
|*
|* SwViewImp::SetFirstVisPage(), ImplGetFirstVisPage();
|*
|* Ersterstellung MA 21. Sep. 93
|* Letzte Aenderung MA 08. Mar. 94
|*
******************************************************************************/
void SwViewImp::SetFirstVisPage()
{
if ( pSh->bDocSizeChgd && pSh->VisArea().Top() > pSh->GetLayout()->Frm().Height() )
{
//Wir stecken in einer Action und die VisArea sitzt wegen
//Loeschoperationen hinter der erste sichtbaren Seite.
//Damit nicht zu heftig Formatiert wird, liefern wir die letzte Seite
//zurueck.
//We are in an "Action", and the VisArea is behind the first visible page due
//to delete operations. To prevent expensive formatting, return the last page
pFirstVisPage = (SwPageFrm*)pSh->GetLayout()->Lower();
while ( pFirstVisPage && pFirstVisPage->GetNext() )
pFirstVisPage = (SwPageFrm*)pFirstVisPage->GetNext();
@@ -301,15 +209,6 @@ void SwViewImp::SetFirstVisPage()
bFirstPageInvalid = FALSE;
}
/******************************************************************************
|*
|* SwViewImp::MakeDrawView();
|*
|* Ersterstellung AMA 01. Nov. 95
|* Letzte Aenderung AMA 01. Nov. 95
|*
******************************************************************************/
void SwViewImp::MakeDrawView()
{
IDocumentDrawModelAccess* pIDDMA = GetShell()->getIDocumentDrawModelAccess();
@@ -334,7 +233,6 @@ void SwViewImp::MakeDrawView()
if(!pOutDevForDrawView)
{
// pOutDevForDrawView = (OutputDevice*)GetShell()->getIDocumentDeviceAccess()->getPrinter( false );
pOutDevForDrawView = GetShell()->GetOut();
}
@@ -345,8 +243,7 @@ void SwViewImp::MakeDrawView()
const SwViewOption* pSwViewOption = GetShell()->GetViewOptions();
Init(pSwViewOption);
// #i68597# If document is read-only, we will not profit from overlay,
// so switch it off.
// #i68597# If document is read-only, we will not profit from overlay, so switch it off.
if(pDrawView && pDrawView->IsBufferedOverlayAllowed())
{
bool bIsReadOnly(pSwViewOption->IsReadonly());
@@ -368,15 +265,6 @@ void SwViewImp::MakeDrawView()
}
}
/******************************************************************************
|*
|* SwViewImp::GetRetoucheColor()
|*
|* Ersterstellung MA 24. Jun. 98
|* Letzte Aenderung MA 24. Jun. 98
|*
******************************************************************************/
Color SwViewImp::GetRetoucheColor() const
{
Color aRet( COL_TRANSPARENT );
@@ -395,12 +283,6 @@ Color SwViewImp::GetRetoucheColor() const
return aRet;
}
/** create page preview layout
OD 12.12.2002 #103492#
@author OD
*/
void SwViewImp::InitPagePreviewLayout()
{
ASSERT( pSh->GetLayout(), "no layout - page preview layout can not be created.");
@@ -503,12 +385,7 @@ void SwViewImp::InvalidateAccessibleRelationSet( const SwFlyFrm *pMaster,
} while ( pTmp != pVSh );
}
/** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
OD 2005-12-01 #i27138#
@author OD
*/
// #i27138# invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
void SwViewImp::_InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
const SwTxtFrm* _pToTxtFrm )
{
@@ -539,12 +416,7 @@ void SwViewImp::_InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxt
} while ( pTmp != pVSh );
}
/** invalidate text selection for paragraphs
OD 2005-12-12 #i27301#
@author OD
*/
//#i27301# invalidate text selection for paragraphs
void SwViewImp::_InvalidateAccessibleParaTextSelection()
{
ViewShell* pVSh = GetShell();
@@ -560,12 +432,7 @@ void SwViewImp::_InvalidateAccessibleParaTextSelection()
} while ( pTmp != pVSh );
}
/** invalidate attributes for paragraphs
OD 2009-01-06 #i88069#
@author OD
*/
//#i88069# invalidate attributes for paragraphs
void SwViewImp::_InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
{
ViewShell* pVSh = GetShell();
@@ -581,7 +448,6 @@ void SwViewImp::_InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
} while ( pTmp != pVSh );
}
// OD 15.01.2003 #103492# - method signature change due to new page preview functionality
void SwViewImp::UpdateAccessiblePreview( const std::vector<PrevwPage*>& _rPrevwPages,
const Fraction& _rScale,
const SwPageFrm* _pSelectedPageFrm,

View File

@@ -62,7 +62,6 @@
using namespace ::com::sun::star;
// OD 12.12.2002 #103492#
SwPagePreviewLayout* ViewShell::PagePreviewLayout()
{
return Imp()->PagePreviewLayout();
@@ -73,10 +72,7 @@ void ViewShell::ShowPreViewSelection( sal_uInt16 nSelPage )
Imp()->InvalidateAccessiblePreViewSelection( nSelPage );
}
/** adjust view options for page preview
OD 09.01.2003 #i6467#
*/
//#i6467# adjust view options for page preview
void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions )
{
if ( !IsPreView() )
@@ -91,9 +87,7 @@ void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions
}
// print brochure
// OD 05.05.2003 #i14016# - consider empty pages on calculation of the scaling
// for a page to be printed.
//#i14016# - consider empty pages on calculation of the scaling for a page to be printed.
void ViewShell::PrintProspect(
OutputDevice *pOutDev,
const SwPrintData &rPrintData,
@@ -114,14 +108,12 @@ void ViewShell::PrintProspect(
std::pair< sal_Int32, sal_Int32 > rPagesToPrint =
rPrintData.GetRenderData().GetPagePairsForProspectPrinting()[ nRenderer ];
// const USHORT nPageMax = static_cast< USHORT >(rPagesToPrint.first > rPagesToPrint.second ?
// rPagesToPrint.first : rPagesToPrint.second);
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT( rPagesToPrint.first == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.first ) == 1, "first Page not valid" );
DBG_ASSERT( rPagesToPrint.second == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.second ) == 1, "second Page not valid" );
#endif
// eine neue Shell fuer den Printer erzeugen
// create a new shell for the Printer
ViewShell aShell( *this, 0, pPrinter );
SET_CURR_SHELL( &aShell );
@@ -151,8 +143,7 @@ void ViewShell::PrintProspect(
pNxtPage = aIt->second;
}
// OD 05.05.2003 #i14016# - consider empty pages on calculation
// of page size, used for calculation of scaling.
//#i14016# - consider empty pages on calculation of page size, used for calculation of scaling.
Size aSttPageSize;
if ( pStPage )
{
@@ -200,7 +191,6 @@ void ViewShell::PrintProspect(
nMaxRowSz = Max( aNxtPageSize.Height(), aSttPageSize.Height() );
}
// den MapMode einstellen
aMapMode.SetOrigin( Point() );
{
Fraction aScX( aPrtSize.Width(), nMaxColSz );
@@ -209,8 +199,6 @@ void ViewShell::PrintProspect(
aScY = aScX;
{
// fuer Drawing, damit diese ihre Objecte vernuenftig Painten
// koennen, auf "glatte" Prozentwerte setzen
aScY *= Fraction( 1000, 1 );
long nTmp = (long)aScY;
if( 1 < nTmp )

File diff suppressed because it is too large Load Diff

View File

@@ -39,48 +39,31 @@
#include <rootfrm.hxx>
#include <viewimp.hxx>
#include <viewopt.hxx>
#include <txtfrm.hxx> // Zugriff auf TxtCache
#include <txtfrm.hxx>
#include <notxtfrm.hxx>
#include <fntcache.hxx>
#include <docufld.hxx>
#include <ptqueue.hxx>
#include <dview.hxx> // SdrView
#include <dview.hxx>
#include <ndgrf.hxx>
#include <ndindex.hxx>
#include <accessibilityoptions.hxx>
/*************************************************************************
|*
|* ViewShell::Init()
|*
|* Letzte Aenderung MA 14. Jun. 96
|*
|*************************************************************************/
void ViewShell::Init( const SwViewOption *pNewOpt )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "ViewShell::Init" );
bDocSizeChgd = FALSE;
// Wir gehen auf Nummer sicher:
// Wir muessen die alten Fontinformationen wegschmeissen,
// wenn die Druckeraufloesung oder der Zoomfaktor sich aendert.
// Init() und Reformat() sind die sichersten Stellen.
pFntCache->Flush( );
// ViewOptions werden dynamisch angelegt
if( !pOpt )
{
pOpt = new SwViewOption;
// Ein ApplyViewOptions braucht nicht gerufen zu werden
if( pNewOpt )
{
*pOpt = *pNewOpt;
// Der Zoomfaktor muss eingestellt werden, weil in der CTOR-
// phase aus Performancegruenden kein ApplyViewOptions gerufen wird.
if( GetWin() && 100 != pOpt->GetZoom() )
{
MapMode aMode( pWin->GetMapMode() );
@@ -95,35 +78,27 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
SwDocShell* pDShell = pDoc->GetDocShell();
pDoc->set(IDocumentSettingAccess::HTML_MODE, 0 != ::GetHtmlMode( pDShell ) );
// JP 02.02.99: Bug 61335 - Readonly-Flag an den ViewOptions setzen,
// bevor das Layout angelegt wird. Ansonsten muesste man
// nochmals durchformatieren!!
if( pDShell && pDShell->IsReadOnly() )
pOpt->SetReadonly( TRUE );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "View::Init - before InitPrt" );
// --> FME 2007-11-06 #i82967#
// #i82967#
OutputDevice* pPDFOut = 0;
if ( pOut && pOut->GetPDFWriter() )
pPDFOut = pOut;
// <--
// --> FME 2005-01-21 #i41075#
// Only setup the printer if we need one:
// #i41075# Only setup the printer if we need one:
const IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
const bool bBrowseMode = pIDSA->get(IDocumentSettingAccess::BROWSE_MODE);
if( pPDFOut )
InitPrt( pPDFOut );
// <--
// --> FME 2005-03-16 #i44963# Good occasion to check if page sizes in
// page descriptions are still set to (LONG_MAX, LONG_MAX) (html import)
// #i44963# Good occasion to check if page sizes in page descriptions
// are still set to (LONG_MAX, LONG_MAX) (html import)
if ( !bBrowseMode )
{
pDoc->CheckDefaultPageFmt();
}
// <--
RTL_LOGFILE_CONTEXT_TRACE( aLog, "View::Init - after InitPrt" );
@@ -142,7 +117,7 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
SizeChgNotify();
// --> #i31958#
// #i31958#
// XForms mode: initialize XForms mode, based on design mode (draw view)
// MakeDrawView() requires layout
if( GetDoc()->isXForms() )
@@ -151,17 +126,8 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
MakeDrawView();
pOpt->SetFormView( ! GetDrawView()->IsDesignMode() );
}
// <-- #i31958#
}
/*************************************************************************
|*
|* ViewShell::ViewShell() CTor fuer die erste Shell.
|*
|* Letzte Aenderung MA 29. Aug. 95
|*
|*************************************************************************/
ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
const SwViewOption *pNewOpt, OutputDevice *pOutput,
long nFlags )
@@ -176,18 +142,18 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
mpTmpRef( 0 ),
pOpt( 0 ),
pAccOptions( new SwAccessibilityOptions ),
mpTargetPaintWindow(0), // #i74769#
mpBufferedOut(0), // #i74769#
mpTargetPaintWindow(0),
mpBufferedOut(0),
pDoc( &rDocument ),
nStartAction( 0 ),
nLockPaint( 0 ),
mnPrePostPaintCount(0L), // #i72754#
mpPrePostOutDev(0), // #i72754#
mnPrePostPaintCount(0L),
mpPrePostOutDev(0),
maPrePostMapMode()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "ViewShell::SwViewShell" );
// OD 2004-06-01 #i26791# - in order to suppress event handling in
// #i26791# in order to suppress event handling in
// <SwDrawContact::Changed> during contruction of <ViewShell> instance
mbInConstructor = true;
@@ -196,20 +162,17 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
bPaintWorks = bEnableSmooth = TRUE;
bPreView = 0 !=( VSHELLFLAG_ISPREVIEW & nFlags );
// --> OD 2005-02-11 #i38810# - Do not reset modified state of document,
// if it's already been modified.
// #i38810# Do not reset modified state of document, if it's already been modified.
const bool bIsDocModified( pDoc->IsModified() );
// <--
pDoc->acquire();
pOutput = pOut;
Init( pNewOpt ); //verstellt ggf. das Outdev (InitPrt())
Init( pNewOpt );
pOut = pOutput;
// OD 28.03.2003 #108470# - initialize print preview layout after layout
// is created in <ViewShell::Init(..)> - called above.
// initialize print preview layout after layout is created in <ViewShell::Init(..)> - called above.
if ( bPreView )
{
// OD 12.12.2002 #103492# - init page preview layout
pImp->InitPagePreviewLayout();
}
@@ -218,32 +181,21 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
SetHiddenFlag( !pOpt->IsShowHiddenField() );
//In Init wird ein Standard-FrmFmt angelegt.
// --> OD 2005-02-11 #i38810#
// #i38810#
if ( !pDoc->IsUndoNoResetModified() && !bIsDocModified )
// <--
{
pDoc->ResetModified();
}
//Format-Cache erweitern.
if ( SwTxtFrm::GetTxtCache()->GetCurMax() < 2550 )
SwTxtFrm::GetTxtCache()->IncreaseMax( 100 );
if( pOpt->IsGridVisible() || getIDocumentDrawModelAccess()->GetDrawModel() )
Imp()->MakeDrawView();
// OD 2004-06-01 #i26791#
// #i26791#
mbInConstructor = false;
}
/*************************************************************************
|*
|* ViewShell::ViewShell() CTor fuer weitere Shells auf ein Dokument.
|*
|* Letzte Aenderung MA 29. Aug. 95
|*
|*************************************************************************/
ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
OutputDevice *pOutput, long nFlags ) :
Ring( &rShell ),
@@ -257,18 +209,18 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
mpTmpRef( 0 ),
pOpt( 0 ),
pAccOptions( new SwAccessibilityOptions ),
mpTargetPaintWindow(0), // #i74769#
mpBufferedOut(0), // #i74769#
mpTargetPaintWindow(0),
mpBufferedOut(0),
pDoc( rShell.GetDoc() ),
nStartAction( 0 ),
nLockPaint( 0 ),
mnPrePostPaintCount(0L), // #i72754#
mpPrePostOutDev(0), // #i72754#
mnPrePostPaintCount(0L),
mpPrePostOutDev(0),
maPrePostMapMode()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "ViewShell::SwViewShell" );
// OD 2004-06-01 #i26791# - in order to suppress event handling in
// #i26791# in order to suppress event handling in
// <SwDrawContact::Changed> during contruction of <ViewShell> instance
mbInConstructor = true;
@@ -276,7 +228,7 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
bPaintInProgress = bViewLocked = bInEndAction = bFrameView =
bEndActionByVirDev = FALSE;
bPreView = 0 !=( VSHELLFLAG_ISPREVIEW & nFlags );
// OD 12.12.2002 #103492#
if ( bPreView )
pImp->InitPagePreviewLayout();
@@ -286,43 +238,32 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
BOOL bModified = pDoc->IsModified();
pOutput = pOut;
Init( rShell.GetViewOptions() ); //verstellt ggf. das Outdev (InitPrt())
Init( rShell.GetViewOptions() );
pOut = pOutput;
((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
SetHiddenFlag( !pOpt->IsShowHiddenField() );
// in Init wird ein Standard-FrmFmt angelegt
if( !bModified && !pDoc->IsUndoNoResetModified() )
pDoc->ResetModified();
//Format-Cache erweitern.
if ( SwTxtFrm::GetTxtCache()->GetCurMax() < 2550 )
SwTxtFrm::GetTxtCache()->IncreaseMax( 100 );
if( pOpt->IsGridVisible() || getIDocumentDrawModelAccess()->GetDrawModel() )
Imp()->MakeDrawView();
// OD 2004-06-01 #i26791#
// #i26791#
mbInConstructor = false;
}
/******************************************************************************
|*
|* ViewShell::~ViewShell()
|*
|* Ersterstellung MA ??
|* Letzte Aenderung MA 10. May. 95
|*
******************************************************************************/
ViewShell::~ViewShell()
{
{
SET_CURR_SHELL( this );
bPaintWorks = FALSE;
// FME 2004-06-21 #i9684# Stopping the animated graphics is not
// #i9684#Stopping the animated graphics is not
// necessary during printing or pdf export, because the animation
// has not been started in this case.
if( pDoc && GetWin() )
@@ -354,7 +295,7 @@ ViewShell::~ViewShell()
GetDoc()->StopNumRuleAnimations( pOut );
}
delete pImp; //Erst loeschen, damit die LayoutViews vernichtet werden.
delete pImp;
pImp = 0; // Set to zero, because ~SwFrm relies on it.
if ( pDoc )
@@ -367,11 +308,9 @@ ViewShell::~ViewShell()
delete pOpt;
//Format-Cache zurueckschrauben.
if ( SwTxtFrm::GetTxtCache()->GetCurMax() > 250 )
SwTxtFrm::GetTxtCache()->DecreaseMax( 100 );
//Ggf. aus der PaintQueue entfernen lassen
SwPaintQueue::Remove( this );
ASSERT( !nStartAction, "EndAction() pending." );

View File

@@ -73,21 +73,19 @@
#include <viewopt.hxx>
#include <swprtopt.hxx> // SwPrtOptions
#include <pagedesc.hxx>
#include <poolfmt.hxx> // fuer RES_POOLPAGE_JAKET
#include <mdiexp.hxx> // Ansteuern der Statusleiste
#include <statstr.hrc> // -- " --
#include <poolfmt.hxx>
#include <mdiexp.hxx>
#include <statstr.hrc>
#include <ptqueue.hxx>
#include <tabfrm.hxx>
#include <txtfrm.hxx> // MinPrtLine
#include <viscrs.hxx> // SwShellCrsr
#include <txtfrm.hxx> // MinPrtLine
#include <viscrs.hxx> // SwShellCrsr
#include <fmtpdsc.hxx> // SwFmtPageDesc
#include <globals.hrc>
using namespace ::com::sun::star;
//--------------------------------------------------------------------
//Klasse zum Puffern von Paints
class SwQueuedPaint
{
public:
@@ -193,13 +191,6 @@ void SwPaintQueue::Remove( ViewShell *pSh )
}
}
/******************************************************************************
* Methode : void SetSwVisArea( ViewShell *pSh, Point aPrtOffset, ...
* Beschreibung:
* Erstellt : OK 04.11.94 16:27
* Aenderung :
******************************************************************************/
void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, BOOL /*bPDFExport*/ )
{
ASSERT( !pSh->GetWin(), "Drucken mit Window?" );
@@ -247,13 +238,6 @@ void ViewShell::InitPrt( OutputDevice *pOutDev )
pOut = pOutDev; //Oder was sonst?
}
/******************************************************************************
* Methode : void ViewShell::ChgAllPageOrientation
* Erstellt : MA 08. Aug. 95
* Aenderung :
******************************************************************************/
void ViewShell::ChgAllPageOrientation( USHORT eOri )
{
ASSERT( nStartAction, "missing an Action" );
@@ -277,10 +261,6 @@ void ViewShell::ChgAllPageOrientation( USHORT eOri )
aNew.SetLandscape( bNewOri );
SwFrmFmt& rFmt = aNew.GetMaster();
SwFmtFrmSize aSz( rFmt.GetFrmSize() );
// Groesse anpassen.
// PORTRAIT -> Hoeher als Breit
// LANDSCAPE -> Breiter als Hoch
// Hoehe ist die VarSize, Breite ist die FixSize (per Def.)
if( bNewOri ? aSz.GetHeight() > aSz.GetWidth()
: aSz.GetHeight() < aSz.GetWidth() )
{
@@ -294,13 +274,6 @@ void ViewShell::ChgAllPageOrientation( USHORT eOri )
}
}
/******************************************************************************
* Methode : void ViewShell::ChgAllPageOrientation
* Erstellt : MA 08. Aug. 95
* Aenderung :
******************************************************************************/
void ViewShell::ChgAllPageSize( Size &rSz )
{
ASSERT( nStartAction, "missing an Action" );
@@ -341,7 +314,6 @@ void ViewShell::CalcPagesForPrint( USHORT nMax )
SET_CURR_SHELL( this );
SwRootFrm* pLayout = GetLayout();
// ULONG nStatMax = pLayout->GetPageNum();
const SwFrm *pPage = pLayout->Lower();
SwLayAction aAction( pLayout, Imp() );
@@ -360,9 +332,9 @@ void ViewShell::CalcPagesForPrint( USHORT nMax )
aAction.Action();
aVisArea = aOldVis; //Zuruecksetzen wg. der Paints!
aVisArea = aOldVis;
Imp()->SetFirstVisPageInvalid();
// SwPaintQueue::Repaint();
}
pLayout->EndAllAction();
}
@@ -373,7 +345,7 @@ SwDoc * ViewShell::CreatePrtDoc( SfxObjectShellRef &rDocShellRef)
{
ASSERT( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
SwFEShell* pFESh = (SwFEShell*)this;
// Wir bauen uns ein neues Dokument
SwDoc *pPrtDoc = new SwDoc;
pPrtDoc->acquire();
pPrtDoc->SetRefForDocShell( (SfxObjectShellRef*)&(long&)rDocShellRef );
@@ -385,13 +357,11 @@ SwDoc * ViewShell::CreatePrtDoc( SfxObjectShellRef &rDocShellRef)
if( 0 != ( pCpyItem = rPool.GetPoolDefaultItem( nWh ) ) )
pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem );
// JP 29.07.99 - Bug 67951 - set all Styles from the SourceDoc into
// the PrintDoc - will be replaced!
pPrtDoc->ReplaceStyles( *GetDoc() );
SwShellCrsr *pActCrsr = pFESh->_GetCrsr();
SwShellCrsr *pFirstCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetNext());
if( !pActCrsr->HasMark() ) // bei Multiselektion kann der aktuelle Cursor leer sein
if( !pActCrsr->HasMark() )
{
pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev());
}
@@ -424,26 +394,22 @@ SwDoc * ViewShell::CreatePrtDoc( SfxObjectShellRef &rDocShellRef)
pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 );
if( !pFESh->IsTableMode() && pActCrsr->HasMark() )
{ // Am letzten Absatz die Absatzattribute richten:
{
SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
SwTxtNode* pTxtNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx )->GetTxtNode();
SwCntntNode *pLastNd =
pActCrsr->GetCntntNode( (*pActCrsr->GetMark()) <= (*pActCrsr->GetPoint()) );
// Hier werden die Absatzattribute des ersten Absatzes uebertragen
if( pLastNd && pLastNd->IsTxtNode() )
((SwTxtNode*)pLastNd)->CopyCollFmt( *pTxtNd );
}
// es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
// if( aDocShellRef.Is() )
// SwDataExchange::InitOle( aDocShellRef, pPrtDoc );
// und fuellen es mit dem selektierten Bereich
pFESh->Copy( pPrtDoc );
//Jetzt noch am ersten Absatz die Seitenvorlage setzen
{
SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); // gehe zum 1. ContentNode
SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx );
if( pFESh->IsTableMode() )
{
SwTableNode* pTNd = pCNd->FindTableNode();
@@ -460,7 +426,6 @@ SwDoc * ViewShell::CreatePrtDoc( SfxObjectShellRef &rDocShellRef)
{
SwCntntNode *pFirstNd =
pFirstCrsr->GetCntntNode( (*pFirstCrsr->GetMark()) > (*pFirstCrsr->GetPoint()) );
// Hier werden die Absatzattribute des ersten Absatzes uebertragen
if( pFirstNd && pFirstNd->IsTxtNode() )
((SwTxtNode*)pFirstNd)->CopyCollFmt( *pTxtNd );
}
@@ -474,15 +439,10 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
{
ASSERT( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
SwFEShell* pFESh = (SwFEShell*)this;
// Wir bauen uns ein neues Dokument
// SwDoc *pPrtDoc = new SwDoc;
// pPrtDoc->acquire();
// pPrtDoc->SetRefForDocShell( (SvEmbeddedObjectRef*)&(long&)rDocShellRef );
pPrtDoc->LockExpFlds();
// Der Drucker wird uebernommen
//! Make a copy of it since it gets destroyed with the temporary document
//! used for PDF export
// Make a copy of it since it gets destroyed with the temporary document
// used for PDF export
if (pPrt)
pPrtDoc->setPrinter( new SfxPrinter(*pPrt), true, true );
@@ -492,19 +452,15 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
if( 0 != ( pCpyItem = rPool.GetPoolDefaultItem( nWh ) ) )
pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem );
// JP 29.07.99 - Bug 67951 - set all Styles from the SourceDoc into
// the PrintDoc - will be replaced!
pPrtDoc->ReplaceStyles( *GetDoc() );
SwShellCrsr *pActCrsr = pFESh->_GetCrsr();
SwShellCrsr *pFirstCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetNext());
if( !pActCrsr->HasMark() ) // bei Multiselektion kann der aktuelle Cursor leer sein
if( !pActCrsr->HasMark() )
{
pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev());
}
// Die Y-Position der ersten Selektion
// Die Y-Position der ersten Selektion
Point aSelPoint;
if( pFESh->IsTableMode() )
{
@@ -533,26 +489,21 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 );
if( !pFESh->IsTableMode() && pActCrsr->HasMark() )
{ // Am letzten Absatz die Absatzattribute richten:
{
SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
SwTxtNode* pTxtNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx )->GetTxtNode();
SwCntntNode *pLastNd =
pActCrsr->GetCntntNode( (*pActCrsr->GetMark()) <= (*pActCrsr->GetPoint()) );
// Hier werden die Absatzattribute des ersten Absatzes uebertragen
if( pLastNd && pLastNd->IsTxtNode() )
((SwTxtNode*)pLastNd)->CopyCollFmt( *pTxtNd );
}
// es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
// if( aDocShellRef.Is() )
// SwDataExchange::InitOle( aDocShellRef, pPrtDoc );
// und fuellen es mit dem selektierten Bereich
pFESh->Copy( pPrtDoc );
//Jetzt noch am ersten Absatz die Seitenvorlage setzen
{
SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); // gehe zum 1. ContentNode
SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx );
if( pFESh->IsTableMode() )
{
SwTableNode* pTNd = pCNd->FindTableNode();
@@ -569,7 +520,7 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
{
SwCntntNode *pFirstNd =
pFirstCrsr->GetCntntNode( (*pFirstCrsr->GetMark()) > (*pFirstCrsr->GetPoint()) );
// Hier werden die Absatzattribute des ersten Absatzes uebertragen
if( pFirstNd && pFirstNd->IsTxtNode() )
((SwTxtNode*)pFirstNd)->CopyCollFmt( *pTxtNd );
}
@@ -585,9 +536,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
const SwPrtOptions &rPrintData,
sal_Int32 nRenderer /* the index in the vector of pages to be printed */ )
{
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//Immer die Druckroutinen in viewpg.cxx (PrintProspect) mitpflegen!!
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
const sal_Int32 nMaxRenderer = rPrintData.GetRenderData().GetPagesToPrint().size() - 1;
#if OSL_DEBUG_LEVEL > 1
@@ -600,12 +548,9 @@ sal_Bool ViewShell::PrintOrPDFExport(
// output device is now provided by a call from outside the Writer)
pOutDev->Push();
// eine neue Shell fuer den Printer erzeugen
ViewShell *pShell;
SwDoc *pOutDevDoc;
//!! muss warum auch immer hier in diesem scope existieren !!
//!! (h?ngt mit OLE Objekten im Dokument zusammen.)
SfxObjectShellRef aDocShellRef;
//! Note: Since for PDF export of (multi-)selection a temporary
@@ -624,7 +569,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
{
pOutDevDoc = CreatePrtDoc( aDocShellRef );
// eine ViewShell darauf
pShell = new ViewShell( *pOutDevDoc, 0, pOpt, pOutDev );
pOutDevDoc->SetRefForDocShell( 0 );
}
@@ -641,12 +585,10 @@ sal_Bool ViewShell::PrintOrPDFExport(
pDrawView->SetBufferedOverlayAllowed( false );
}
{ //Zusaetzlicher Scope, damit die CurrShell vor dem zerstoeren der
//Shell zurueckgesetzt wird.
{
SET_CURR_SHELL( pShell );
//JP 01.02.99: das ReadOnly Flag wird NIE mitkopiert; Bug 61335
if( pOpt->IsReadonly() )
pShell->pOpt->SetReadonly( TRUE );
@@ -682,7 +624,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
rPrintData.GetRenderData().m_pPostItShell : pShell;
::SetSwVisArea( pViewSh2, pStPage->Frm() );
// wenn wir einen Umschlag drucken wird ein Offset beachtet
if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET )
{
Point aNewOrigin = pOutDev->GetMapMode().GetOrigin();
@@ -701,7 +643,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
pStPage->GetUpper()->Paint( pStPage->Frm(), &rPrintData );
SwPaintQueue::Repaint();
} //Zus. Scope wg. CurShell!
}
delete pShell;
@@ -718,21 +660,9 @@ sal_Bool ViewShell::PrintOrPDFExport(
return sal_True;
}
/******************************************************************************
* Methode : PrtOle2()
* Beschreibung:
* Erstellt : PK 07.12.94
* Aenderung : MA 16. Feb. 95
******************************************************************************/
void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
OutputDevice* pOleOut, const Rectangle& rRect )
{
//Wir brauchen eine Shell fuer das Drucken. Entweder hat das Doc schon
//eine, dann legen wir uns eine neue Sicht an, oder das Doc hat noch
//keine, dann erzeugen wir die erste Sicht.
ViewShell *pSh;
if( pDoc->GetRootFrm() && pDoc->GetRootFrm()->GetCurrShell() )
pSh = new ViewShell( *pDoc->GetRootFrm()->GetCurrShell(), 0, pOleOut );
@@ -763,28 +693,16 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
// Seiten fuers Drucken formatieren
// pSh->CalcPagesForPrint( SHRT_MAX );
// <--
//#39275# jetzt will der Meyer doch ein Clipping
pOleOut->Push( PUSH_CLIPREGION );
pOleOut->IntersectClipRegion( aSwRect.SVRect() );
pSh->GetLayout()->Paint( aSwRect );
// SFX_APP()->SpoilDemoOutput( *pOleOut, rRect );
pOleOut->Pop();
// erst muss das CurrShell Object zerstoert werden!!
}
delete pSh;
}
/******************************************************************************
* Methode : IsAnyFieldInDoc()
* Beschreibung: Stellt fest, ob im DocNodesArray Felder verankert sind
* Erstellt : JP 27.07.95
* Aenderung : JP 10.12.97
******************************************************************************/
BOOL ViewShell::IsAnyFieldInDoc() const
{
const SfxPoolItem* pItem;
@@ -794,7 +712,7 @@ BOOL ViewShell::IsAnyFieldInDoc() const
{
const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
//#i101026# mod: do not include postits in field check
//#i101026# do not include postits in field check
const SwField* pFld = pFmtFld->GetFld();
if( pTxtFld && pTxtFld->GetTxtNode().GetNodes().IsDocNodes() && (pFld->Which() != RES_POSTITFLD))
return TRUE;
@@ -802,14 +720,6 @@ BOOL ViewShell::IsAnyFieldInDoc() const
return FALSE;
}
/******************************************************************************
* SwDrawViewSave
*
* Saves some settings at the draw view
******************************************************************************/
SwDrawViewSave::SwDrawViewSave( SdrView* pSdrView )
: pDV( pSdrView )
{
@@ -829,10 +739,9 @@ SwDrawViewSave::~SwDrawViewSave()
}
// OD 09.01.2003 #i6467# - method also called for page preview
// #i6467# - method also called for page preview
void ViewShell::PrepareForPrint( const SwPrintData &rOptions )
{
// Viewoptions fuer den Drucker setzen
pOpt->SetGraphic ( TRUE == rOptions.bPrintGraphic );
pOpt->SetTable ( TRUE == rOptions.bPrintTable );
pOpt->SetDraw ( TRUE == rOptions.bPrintDraw );
@@ -845,7 +754,7 @@ void ViewShell::PrepareForPrint( const SwPrintData &rOptions )
SdrView *pDrawView = GetDrawView();
String sLayerNm;
sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("Controls" ));
// OD 09.01.2003 #i6467# - consider, if view shell belongs to page preview
// #i6467# - consider, if view shell belongs to page preview
if ( !IsPreView() )
{
pDrawView->SetLayerPrintable( sLayerNm, rOptions.bPrintControl );