I thought I would help out performing some of the simple tasks that the wiki
said needed to be done. I went through one folder of code and tried to
clean the comments up, as well as code that has been there commented out
for years.
I wasn't sure if this is what I was supposed to be doing, so I only did
that one folder. I'd like to be helping out LibreOffice any way I can!
---
sw/source/core/view/pagepreviewlayout.cxx | 191 ++----------
sw/source/core/view/printdata.cxx | 4 +-
sw/source/core/view/vdraw.cxx | 115 +-------
sw/source/core/view/viewimp.cxx | 144 +--------
sw/source/core/view/viewpg.cxx | 16 -
sw/source/core/view/viewsh.cxx | 508 ++---------------------------
sw/source/core/view/vnew.cxx | 110 ++-----
sw/source/core/view/vprint.cxx | 150 ++-------
8 files changed, 96 insertions(+), 1142 deletions(-)
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index 7b53831..a3505b5 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -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
+ // no paint if <superfluous> flag is set at layout
if ( mrLayoutRootFrm.IsSuperfluous() )
{
return true;
@@ -1074,7 +994,6 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
// environment and parameter ok
- // OD 07.11.2003 #i22014#
if ( mbInPaint )
{
return false;
@@ -1137,8 +1056,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 +1074,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,7 +1083,6 @@ 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
{
SwRect aPageBorderRect;
@@ -1175,10 +1092,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.
+ // stop painting, because new print preview layout is created during paint.
if ( mbNewLayoutDuringPaint )
{
break;
@@ -1192,8 +1107,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.
+ // no update of accessible preview, if a new print preview layout is created during paint.
if ( !mbNewLayoutDuringPaint )
{
// update at accessiblilty interface
@@ -1207,19 +1121,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 +1172,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 +1197,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 +1224,6 @@ 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
-*/
void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage )
{
sal_uInt16 nOldSelectedPageNum = mnSelectedPageNum;
@@ -1340,7 +1233,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 +1267,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 +1290,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 +1306,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 +1335,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 +1348,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 +1361,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 +1383,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 )
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index d67b820..e07dc66 100755
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -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 );
+ delete m_pPostItShell;
delete m_pPostItFields;
m_pPostItDoc = 0;
m_pPostItShell = 0;
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 20e12f2..d97bd46 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -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();
}
}
-/*************************************************************************
-|*
-|* 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,6 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
if ( aSz.Width() || aSz.Height() )
pObj->Move( aSz );
- //Notanker: Grosse Objekte nicht nach oben verschwinden lassen.
aSz.Width() = aSz.Height() = 0;
if ( aBound.Bottom() < aRect.Top() )
aSz.Width() = (aBound.Bottom() - aRect.Top()) - MINFLY;
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index ada913c..d4317ea 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -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,9 @@
#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.
SwRootFrm *pRoot = pSh->getIDocumentLayoutAccess()->GetRootFrm();
if ( !pSdrPageView )
{
@@ -80,8 +69,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 +98,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 +109,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 +133,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 +150,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 +163,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 +173,10 @@ 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.
pFirstVisPage = (SwPageFrm*)pSh->GetLayout()->Lower();
while ( pFirstVisPage && pFirstVisPage->GetNext() )
pFirstVisPage = (SwPageFrm*)pFirstVisPage->GetNext();
@@ -301,15 +206,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 +230,6 @@ void SwViewImp::MakeDrawView()
if(!pOutDevForDrawView)
{
- // pOutDevForDrawView =
(OutputDevice*)GetShell()->getIDocumentDeviceAccess()->getPrinter( false );
pOutDevForDrawView = GetShell()->GetOut();
}
@@ -345,8 +240,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.
+ // 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 +262,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 +280,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 +382,6 @@ void SwViewImp::InvalidateAccessibleRelationSet( const SwFlyFrm *pMaster,
} while ( pTmp != pVSh );
}
- /** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
-
- OD 2005-12-01 #i27138#
-
- @author OD
-*/
void SwViewImp::_InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
const SwTxtFrm* _pToTxtFrm )
{
@@ -539,12 +412,6 @@ void SwViewImp::_InvalidateAccessibleParaFlowRelation( const SwTxtFrm*
_pFromTxt
} while ( pTmp != pVSh );
}
-/** invalidate text selection for paragraphs
-
- OD 2005-12-12 #i27301#
-
- @author OD
-*/
void SwViewImp::_InvalidateAccessibleParaTextSelection()
{
ViewShell* pVSh = GetShell();
@@ -560,12 +427,6 @@ void SwViewImp::_InvalidateAccessibleParaTextSelection()
} while ( pTmp != pVSh );
}
-/** invalidate attributes for paragraphs
-
- OD 2009-01-06 #i88069#
-
- @author OD
-*/
void SwViewImp::_InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
{
ViewShell* pVSh = GetShell();
@@ -581,7 +442,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,
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index 91f8929..3ee46ef 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -62,7 +62,6 @@
using namespace ::com::sun::star;
-// OD 12.12.2002 #103492#
SwPagePreviewLayout* ViewShell::PagePreviewLayout()
{
return Imp()->PagePreviewLayout();
@@ -73,10 +72,6 @@ void ViewShell::ShowPreViewSelection( sal_uInt16 nSelPage )
Imp()->InvalidateAccessiblePreViewSelection( nSelPage );
}
-/** adjust view options for page preview
-
- OD 09.01.2003 #i6467#
-*/
void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions )
{
if ( !IsPreView() )
@@ -91,9 +86,6 @@ 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.
void ViewShell::PrintProspect(
OutputDevice *pOutDev,
const SwPrintData &rPrintData,
@@ -114,14 +106,11 @@ 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
ViewShell aShell( *this, 0, pPrinter );
SET_CURR_SHELL( &aShell );
@@ -151,8 +140,6 @@ void ViewShell::PrintProspect(
pNxtPage = aIt->second;
}
- // OD 05.05.2003 #i14016# - consider empty pages on calculation
- // of page size, used for calculation of scaling.
Size aSttPageSize;
if ( pStPage )
{
@@ -200,7 +187,6 @@ void ViewShell::PrintProspect(
nMaxRowSz = Max( aNxtPageSize.Height(), aSttPageSize.Height() );
}
- // den MapMode einstellen
aMapMode.SetOrigin( Point() );
{
Fraction aScX( aPrtSize.Width(), nMaxColSz );
@@ -209,8 +195,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 )
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 8ade4ae..9c0e401 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -39,9 +39,6 @@
#include <svx/srchdlg.hxx>
#include <svx/svdobj.hxx>
#include <sfx2/viewsh.hxx>
-#ifndef _SHL_HXX
-//#include <tools/shl.hxx>
-#endif
#include <swwait.hxx>
#include <swmodule.hxx>
#include <fesh.hxx>
@@ -79,12 +76,10 @@
#ifndef _COMCORE_HRC
#include <comcore.hrc>
#endif
-// OD 14.01.2003 #103492#
+
#include <pagepreviewlayout.hxx>
-// --> OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
#include <anchoredobject.hxx>
-// <--
#include "../../ui/inc/view.hxx"
#include <PostItMgr.hxx>
@@ -92,7 +87,6 @@
#include <vcl/svapp.hxx>
-// #i74769#
#include <svx/sdrpaintwindow.hxx>
BOOL ViewShell::bLstAct = FALSE;
@@ -177,17 +171,8 @@ void ViewShell::DLPostPaint2(bool bPaintFormLayer)
//////////////////////////////////////////////////////////////////////////////
-/******************************************************************************
-|*
-|* ViewShell::ImplEndAction()
-|*
-|* Letzte Aenderung MA 04. Sep. 96
-|*
-******************************************************************************/
-
void ViewShell::ImplEndAction( const BOOL bIdleEnd )
{
- //Fuer den Drucker gibt es hier nichts zu tun.
if ( !GetWin() || IsPreView() )
{
bPaintWorks = TRUE;
@@ -197,12 +182,13 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
bInEndAction = TRUE;
- //Laeuft hiermit das EndAction der Letzten Shell im Ring?
ViewShell::bLstAct = TRUE;
ViewShell *pSh = (ViewShell*)this->GetNext();
while ( pSh != this )
- { if ( pSh->ActionPend() )
- { ViewShell::bLstAct = FALSE;
+ {
+ if ( pSh->ActionPend() )
+ {
+ ViewShell::bLstAct = FALSE;
pSh = this;
}
else
@@ -233,9 +219,6 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
if ( bIsShellForCheckViewLayout )
GetLayout()->CheckViewLayout( GetViewOptions(), &aVisArea );
- //Wenn wir selbst keine Paints erzeugen, so warten wir auf das Paint
- //vom System. Dann ist das Clipping korrekt gesetzt; Beispiel: verschieben
- //eines DrawObjektes.
if ( Imp()->GetRegion() ||
aInvalidRect.HasArea() ||
bExtraData )
@@ -256,12 +239,6 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
SwRegionRects *pRegion = Imp()->GetRegion();
- //JP 27.11.97: wer die Selection hided, muss sie aber auch
- // wieder Showen. Sonst gibt es Paintfehler!
- // z.B.: addional Mode, Seite vertikal hab zu sehen, in der
- // Mitte eine Selektion und mit einem anderen Cursor an linken
- // rechten Rand springen. Ohne ShowCrsr verschwindet die
- // Selektion
BOOL bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) );
if( bShowCrsr )
((SwCrsrShell*)this)->HideCrsrs();
@@ -272,7 +249,6 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
Imp()->pRegion = NULL;
- //Erst Invert dann Compress, niemals andersherum!
pRegion->Invert();
pRegion->Compress();
@@ -286,7 +262,6 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
BOOL bPaint = TRUE;
if ( IsEndActionByVirDev() )
{
- //virtuelles device erzeugen und einstellen.
if ( !pVout )
pVout = new VirtualDevice( *GetOut() );
MapMode aMapMode( GetOut()->GetMapMode() );
@@ -316,11 +291,8 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
{
bPaint = FALSE;
- // --> OD 2007-07-26 #i79947#
- // #i72754# start Pre/PostPaint encapsulation before pOut is changed
to the buffering VDev
const Region aRepaintRegion(aRect.SVRect());
DLPrePaint2(aRepaintRegion);
- // <--
OutputDevice *pOld = GetOut();
pVout->SetLineColor( pOld->GetLineColor() );
@@ -344,23 +316,15 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
}
if ( bPaint )
{
- // #i75172# begin DrawingLayer paint
- // need to do begin/end DrawingLayer preparation for each single rectangle
of the
- // repaint region. I already tried to prepare only once for the whole
Region. This
- // seems to work (and does technically) but fails with transparent
objects. Since the
- // region given to BeginDarwLayers() defines the clip region for
DrawingLayer paint,
- // transparent objects in the single rectangles will indeed be painted
multiple times.
DLPrePaint2(Region(aRect.SVRect()));
if ( bPaintsFromSystem )
PaintDesktop( aRect );
pLayout->Paint( aRect );
- // #i75172# end DrawingLayer paint
DLPostPaint2(true);
}
- // --> OD 2009-12-03 #i107365#
// Direct paint has been performed. Thus, take care of
// transparent child windows.
if ( GetWin() )
@@ -413,10 +377,6 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
Imp()->EndAction();
- //Damit sich die automatischen Scrollbars auch richtig anordnen k?nnen
- //muessen wir die Aktion hier kuenstlich beenden (EndAction loesst ein
- //Notify aus, und das muss Start-/EndAction rufen um die Scrollbars
- //klarzubekommen.
--nStartAction;
UISizeNotify();
++nStartAction;
@@ -425,35 +385,16 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
Imp()->FireAccessibleEvents();
}
-/******************************************************************************
-|*
-|* ViewShell::ImplStartAction()
-|*
-|* Ersterstellung MA 25. Jul. 94
-|* Letzte Aenderung MA 25. Jul. 94
-|*
-******************************************************************************/
-
void ViewShell::ImplStartAction()
{
bPaintWorks = FALSE;
Imp()->StartAction();
}
-
-/******************************************************************************
-|*
-|* ViewShell::ImplLockPaint(), ImplUnlockPaint()
-|*
-|* Ersterstellung MA 11. Jun. 96
-|* Letzte Aenderung MA 11. Jun. 96
-|*
-******************************************************************************/
-
void ViewShell::ImplLockPaint()
{
if ( GetWin() && GetWin()->IsVisible() )
- GetWin()->EnablePaint( FALSE ); //Auch die Controls abklemmen.
+ GetWin()->EnablePaint( FALSE );
Imp()->LockPaint();
}
@@ -465,7 +406,6 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
{
if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() )
{
- //Refresh mit virtuellem Device um das Flackern zu verhindern.
VirtualDevice *pVout = new VirtualDevice( *pOut );
pVout->SetMapMode( pOut->GetMapMode() );
Size aSize( VisArea().SSize() );
@@ -480,7 +420,7 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
pVout->SetLineColor( pOut->GetLineColor() );
pVout->SetFillColor( pOut->GetFillColor() );
- // #i72754# start Pre/PostPaint encapsulation before pOut is changed to the
buffering VDev
+ // start Pre/PostPaint encapsulation before pOut is changed to the buffering VDev
const Region aRepaintRegion(VisArea().SVRect());
DLPrePaint2(aRepaintRegion);
@@ -491,7 +431,7 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
pOut->DrawOutDev( VisArea().Pos(), aSize,
VisArea().Pos(), aSize, *pVout );
- // #i72754# end Pre/PostPaint encapsulation when pOut is back and content is
painted
+ // end Pre/PostPaint encapsulation when pOut is back and content is painted
DLPostPaint2(true);
}
else
@@ -513,15 +453,6 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
Imp()->UnlockPaint();
}
-/******************************************************************************
-|*
-|* ViewShell::AddPaintRect()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 09. Feb. 97
-|*
-******************************************************************************/
-
BOOL ViewShell::AddPaintRect( const SwRect & rRect )
{
BOOL bRet = FALSE;
@@ -529,7 +460,6 @@ BOOL ViewShell::AddPaintRect( const SwRect & rRect )
do
{
if ( pSh->IsPreView() && pSh->GetWin() )
-// pSh->GetWin()->Invalidate();
::RepaintPagePreview( pSh, rRect );
else
bRet |= pSh->Imp()->AddPaintRect( rRect );
@@ -539,15 +469,6 @@ BOOL ViewShell::AddPaintRect( const SwRect & rRect )
return bRet;
}
-/******************************************************************************
-|*
-|* ViewShell::InvalidateWindows()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 09. Feb. 97
-|*
-******************************************************************************/
-
void ViewShell::InvalidateWindows( const SwRect &rRect )
{
if ( !Imp()->IsCalcLayoutProgress() )
@@ -558,7 +479,6 @@ void ViewShell::InvalidateWindows( const SwRect &rRect )
if ( pSh->GetWin() )
{
if ( pSh->IsPreView() )
-// pSh->GetWin()->Invalidate();
::RepaintPagePreview( pSh, rRect );
else if ( pSh->VisArea().IsOver( rRect ) )
pSh->GetWin()->Invalidate( rRect.SVRect() );
@@ -569,15 +489,6 @@ void ViewShell::InvalidateWindows( const SwRect &rRect )
}
}
-/******************************************************************************
-|*
-|* ViewShell::MakeVisible()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung AMA 10. Okt. 95
-|*
-******************************************************************************/
-
void ViewShell::MakeVisible( const SwRect &rRect )
{
if ( !VisArea().IsInside( rRect ) || IsScrollMDI( this, rRect ) || GetCareWin(*this) )
@@ -599,7 +510,6 @@ void ViewShell::MakeVisible( const SwRect &rRect )
#ifdef DBG_UTIL
else
{
- //MA: 04. Nov. 94, braucht doch keiner oder??
ASSERT( !this, "MakeVisible fuer Drucker wird doch gebraucht?" );
}
@@ -608,15 +518,6 @@ void ViewShell::MakeVisible( const SwRect &rRect )
}
}
-/******************************************************************************
-|*
-|* ViewShell::CareChildWindow()
-|*
-|* Ersterstellung AMA 10. Okt. 95
-|* Letzte Aenderung AMA 10. Okt. 95
-|*
-******************************************************************************/
-
Window* ViewShell::CareChildWin(ViewShell& rVSh)
{
if(rVSh.pSfxViewShell)
@@ -631,33 +532,13 @@ Window* ViewShell::CareChildWin(ViewShell& rVSh)
return NULL;
}
-/******************************************************************************
-|*
-|* ViewShell::GetPagePos()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 04. Aug. 93
-|*
-******************************************************************************/
-
Point ViewShell::GetPagePos( USHORT nPageNum ) const
{
return GetLayout()->GetPagePos( nPageNum );
}
-/******************************************************************************
-|*
-|* ViewShell::GetNumPages()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 20. Apr. 94
-|*
-******************************************************************************/
-
USHORT ViewShell::GetNumPages()
{
- //Es kann sein, das noch kein Layout existiert weil die Methode vom
- //Root-Ctor gerufen wird.
return GetLayout() ? GetLayout()->GetPageNum() : 0;
}
@@ -666,18 +547,6 @@ sal_Bool ViewShell::IsDummyPage( USHORT nPageNum ) const
return GetLayout() ? GetLayout()->IsDummyPage( nPageNum ) : 0;
}
-/*************************************************************************
-|*
-|* ViewShell::UpdateFlds()
-|*
-|* Ersterstellung BP 04.05.92
-|* Beschreibung erzwingt ein Update fuer jedes Feld
-|*
-|* UpdateFlds benachrichtigt alle Felder mit pNewHt.
-|* Wenn pNewHt == 0 ist (default), wird der Feldtyp verschickt.
-|*
-*************************************************************************/
-
void ViewShell::UpdateFlds(BOOL bCloseDB)
{
SET_CURR_SHELL( this );
@@ -723,26 +592,16 @@ BOOL ViewShell::HasCharts() const
return bRet;
}
-/*************************************************************************
-|*
-|* ViewShell::LayoutIdle()
-|*
-|* Ersterstellung MA 26. May. 92
-|* Letzte Aenderung OG 19. Mar. 96
-|*
-*************************************************************************/
-
void ViewShell::LayoutIdle()
{
#ifdef TCOVER
- //fuer TCV-Version: Ende der Startphase des Programmes
TCovCall::Idle();
#endif
if( !pOpt->IsIdle() || !GetWin() ||
( Imp()->HasDrawView() && Imp()->GetDrawView()->IsDragObj() ) )
return;
- //Kein Idle wenn gerade gedruckt wird.
+
ViewShell *pSh = this;
do
{ if ( !pSh->GetWin() )
@@ -754,7 +613,6 @@ void ViewShell::LayoutIdle()
SET_CURR_SHELL( this );
#ifdef DBG_UTIL
- // Wenn Test5 gedrueckt ist, wird der IdleFormatierer abgeknipst.
if( pOpt->IsTest5() )
return;
#endif
@@ -762,12 +620,8 @@ void ViewShell::LayoutIdle()
{
DBG_PROFSTART( LayoutIdle );
- //Cache vorbereiten und restaurieren, damit er nicht versaut wird.
SwSaveSetLRUOfst aSave( *SwTxtFrm::GetTxtCache(),
SwTxtFrm::GetTxtCache()->GetCurMax() - 50 );
- // #125243# there are lots of stacktraces indicating that Imp() returns NULL
- // this ViewShell seems to be invalid - but it's not clear why
- // this return is only a workaround!
DBG_ASSERT(Imp(), "ViewShell already deleted?");
if(!Imp())
return;
@@ -798,14 +652,6 @@ void lcl_InvalidateAllCntnt( ViewShell& rSh, BYTE nInv )
rSh.GetDoc()->SetModified();
}
-/** local method to invalidate/re-calculate positions of floating screen
- objects (Writer fly frame and drawing objects), which are anchored
- to paragraph or to character.
-
- OD 2004-03-16 #i11860#
-
- @author OD
-*/
void lcl_InvalidateAllObjPos( ViewShell &_rSh )
{
const bool bIsCrsrShell = _rSh.ISA(SwCrsrShell);
@@ -887,8 +733,6 @@ void ViewShell::SetUseVirDev( bool bNewVirtual )
}
}
-// OD 2004-02-16 #106629# - control, if paragraph and table spacing is added
-// at bottom of table cells
void ViewShell::SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -901,8 +745,6 @@ void ViewShell::SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells
}
}
-// OD 06.01.2004 #i11859# - control, if former formatting of text lines with
-// proportional line spacing is used or not.
void ViewShell::SetUseFormerLineSpacing( bool _bUseFormerLineSpacing )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -915,7 +757,6 @@ void ViewShell::SetUseFormerLineSpacing( bool _bUseFormerLineSpacing )
}
}
-// OD 2004-03-12 #i11860# - control, if former object positioning is used or not.
void ViewShell::SetUseFormerObjectPositioning( bool _bUseFormerObjPos )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -927,7 +768,6 @@ void ViewShell::SetUseFormerObjectPositioning( bool _bUseFormerObjPos )
}
}
-// OD 2004-05-05 #i28701#
void ViewShell::SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -939,7 +779,6 @@ void ViewShell::SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos )
}
}
-// --> FME #108724#
void ViewShell::SetUseFormerTextWrapping( bool _bUseFormerTextWrapping )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -951,9 +790,7 @@ void ViewShell::SetUseFormerTextWrapping( bool _bUseFormerTextWrapping )
lcl_InvalidateAllCntnt( *this, nInv );
}
}
-// <--
-// -> PB 2007-06-11 #i45491#
void ViewShell::SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
@@ -965,25 +802,11 @@ void ViewShell::SetDoNotJustifyLinesWithManualBreak( bool
_bDoNotJustifyLinesWit
lcl_InvalidateAllCntnt( *this, nInv );
}
}
-// <--
-
-/******************************************************************************
-|*
-|* ViewShell::Reformat
-|*
-|* Ersterstellung BP ???
-|* Letzte Aenderung MA 13. Feb. 98
-|*
-******************************************************************************/
void ViewShell::Reformat()
{
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
- // 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.
#ifdef FNTMET
aFntMetList.Flush();
#else
@@ -1007,26 +830,14 @@ void ViewShell::Reformat()
Reformat();
}
-/******************************************************************************
-|*
-|* ViewShell::CalcLayout()
-|* Vollstaendige Formatierung von Layout und Inhalt.
-|*
-|* Ersterstellung MA 31. Jan. 94
-|* Letzte Aenderung MA 08. Oct. 96
-|*
-******************************************************************************/
-
void ViewShell::CalcLayout()
{
SET_CURR_SHELL( this );
SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
- //Cache vorbereiten und restaurieren, damit er nicht versaut wird.
SwSaveSetLRUOfst aSaveLRU( *SwTxtFrm::GetTxtCache(),
SwTxtFrm::GetTxtCache()->GetCurMax() - 50 );
- //Progress einschalten wenn noch keiner Lauft.
const BOOL bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
if ( bEndProgress )
{
@@ -1044,8 +855,6 @@ void ViewShell::CalcLayout()
aAction.Action();
GetDoc()->UnlockExpFlds();
- //Das SetNewFldLst() am Doc wurde unterbunden und muss nachgeholt
- //werden (siehe flowfrm.cxx, txtfld.cxx)
if ( aAction.IsExpFlds() )
{
aAction.Reset();
@@ -1066,15 +875,6 @@ void ViewShell::CalcLayout()
::EndProgress( GetDoc()->GetDocShell() );
}
-/******************************************************************************
-|*
-|* ViewShell::SetFirstVisPageInvalid()
-|*
-|* Ersterstellung MA 19. May. 94
-|* Letzte Aenderung MA 19. May. 94
-|*
-******************************************************************************/
-
void ViewShell::SetFirstVisPageInvalid()
{
ViewShell *pSh = this;
@@ -1085,15 +885,6 @@ void ViewShell::SetFirstVisPageInvalid()
} while ( pSh != this );
}
-/******************************************************************************
-|*
-|* ViewShell::SizeChgNotify()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 17. Sep. 96
-|*
-******************************************************************************/
-
void ViewShell::SizeChgNotify()
{
if ( !pWin )
@@ -1122,15 +913,6 @@ void ViewShell::SizeChgNotify()
}
}
-/******************************************************************************
-|*
-|* ViewShell::VisPortChgd()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 22. Jul. 96
-|*
-******************************************************************************/
-
void ViewShell::VisPortChgd( const SwRect &rRect)
{
ASSERT( GetWin(), "VisPortChgd ohne Window." );
@@ -1141,13 +923,10 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
#ifdef DBG_UTIL
if ( bInEndAction )
{
- //Da Rescheduled doch schon wieder irgendwo einer?
ASSERT( !this, "Scroll waehrend einer EndAction." );
}
#endif
- //Ersteinmal die alte sichtbare Seite holen, dann braucht nacher nicht
- //lange gesucht werden.
const SwFrm *pOldPage = Imp()->GetFirstVisPage();
const SwRect aPrevArea( VisArea() );
@@ -1155,9 +934,6 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
aVisArea = rRect;
SetFirstVisPageInvalid();
- //Wenn noch eine PaintRegion herumsteht und sich die VisArea geaendert hat,
- //so ist die PaintRegion spaetestens jetzt obsolete. Die PaintRegion kann
- //vom RootFrm::Paint erzeugt worden sein.
if ( !bInEndAction &&
Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() )
Imp()->DelRegion();
@@ -1172,16 +948,12 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
GetWin()->Invalidate();
else
{
- // Betrag ausrechnen, um den gescrolled werden muss.
const long nXDiff = aPrevArea.Left() - VisArea().Left();
const long nYDiff = aPrevArea.Top() - VisArea().Top();
if( !nXDiff && !getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
(!Imp()->HasDrawView() || !Imp()->GetDrawView()->IsGridVisible() ) )
{
- //Falls moeglich die Wiese nicht mit Scrollen.
- //Also linke und rechte Kante des Scrollbereiches auf die
- //Seiten begrenzen.
const SwPageFrm *pPage = (SwPageFrm*)GetDoc()->GetRootFrm()->Lower();
if ( pPage->Frm().Top() > pOldPage->Frm().Top() )
pPage = (SwPageFrm*)pOldPage;
@@ -1207,8 +979,6 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
if ( aPageRect.IsOver( aBoth ) )
{
- // OD 12.02.2003 #i9719#, #105645# - consider new border
- // and shadow width
const SwTwips nBorderWidth =
GetOut()->PixelToLogic( Size( pPage->BorderPxWidth(), 0 ) ).Width();
const SwTwips nShadowWidth =
@@ -1238,9 +1008,6 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
nMinLeft = nPageLeft;
if( nPageRight > nMaxRight )
nMaxRight = nPageRight;
- //Zus. auf die Zeichenobjekte abgleichen.
- //Einen Ofst beruecksichtigen, weil die Objekte u.U.
- //selektiert sind und die Henkel dann hinausstehen.
if ( pPage->GetSortedObjs() )
{
const long nOfst = GetOut()->PixelToLogic(
@@ -1250,7 +1017,6 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
{
SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
const Rectangle &rBound = pObj->GetObjRect().SVRect();
- // OD 03.03.2003 #107927# - use correct datatype
const SwTwips nL = Max( 0L, rBound.Left() - nOfst );
if ( nL < nMinLeft )
nMinLeft = nL;
@@ -1275,7 +1041,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
else
GetWin()->Invalidate( aRect );
}
- else if ( !nLockPaint ) //Wird im UnLock erledigt
+ else if ( !nLockPaint )
{
if( VisArea().IsOver( aPrevArea ) )
{
@@ -1302,14 +1068,12 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
}
GetWin()->Update();
- // --> OD 2010-02-11 #i88070#
if ( pPostItMgr )
{
pPostItMgr->Rescale();
pPostItMgr->CalcRects();
pPostItMgr->LayoutPostIts();
}
- // <--
if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() )
pPostItMgr->CorrectPositions();
@@ -1319,15 +1083,6 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
}
-/******************************************************************************
-|*
-|* ViewShell::SmoothScroll()
-|*
-|* Ersterstellung MA 04. Jul. 96
-|* Letzte Aenderung MA 25. Mar. 97
-|*
-******************************************************************************/
-
BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
{
const ULONG nColCnt = pOut->GetColorCount();
@@ -1348,10 +1103,8 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle
*pRect )
lMult = 12;
}
- // #i75172# isolated static conditions
const bool bOnlyYScroll(!lXDiff && Abs(lYDiff) != 0 && Abs(lYDiff) < lMax);
const bool
bAllowedWithChildWindows(GetWin()->GetWindowClipRegionPixel(WINDOW_GETCLIPREGION_NOCHILDREN|WINDOW_GETCLIPREGION_NULL).IsNull());
-// --> OD 2009-08-12 #i98766# - disable smooth scrolling for Mac port builds
#ifdef QUARTZ
const bool bSmoothScrollAllowed(false);
(void) bOnlyYScroll;
@@ -1359,14 +1112,12 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle
*pRect )
#else
const bool bSmoothScrollAllowed(bOnlyYScroll && bEnableSmooth &&
GetViewOptions()->IsSmoothScroll() && bAllowedWithChildWindows);
#endif
-// <-
+
const bool bIAmCursorShell(ISA(SwCrsrShell));
(void) bIAmCursorShell;
- // #i75172# with selection on overlay, smooth scroll should be allowed with it
const bool bAllowedForSelection(true || (bIAmCursorShell &&
!((SwCrsrShell*)this)->HasSelection()));
- // #i75172# with cursors on overlay, smooth scroll should be allowed with it
const bool bAllowedForMultipleCursors(true || (bIAmCursorShell &&
((SwCrsrShell*)this)->GetCrsrCnt() < 2));
if(bSmoothScrollAllowed && bAllowedForSelection && bAllowedForMultipleCursors)
@@ -1375,7 +1126,6 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle
*pRect )
const SwRect aOldVis( VisArea() );
- //Virtuelles Device erzeugen und einstellen.
const Size aPixSz = GetWin()->PixelToLogic(Size(1,1));
VirtualDevice *pVout = new VirtualDevice( *GetWin() );
pVout->SetLineColor( GetWin()->GetLineColor() );
@@ -1389,7 +1139,6 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle
*pRect )
{
nLockPaint++;
- //Ersteinmal alles neue in das VirDev Painten.
SwRect aRect( VisArea() );
aRect.Height( aSize.Height() );
if ( pRect )
@@ -1459,13 +1208,6 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle
*pRect )
pOut = pOld;
aVisArea = aOldVis;
- //Jetzt Stueckchenweise schieben und die neuen Pixel aus dem
- //VirDev kopieren.
-
- // ??????????????????????
- // or is it better to get the scrollfactor from the User
- // as option?
- // ??????????????????????
long lMaDelta = aPixSz.Height();
if ( Abs(lYDiff) > ( aVisArea.Height() / 3 ) )
lMaDelta *= 6;
@@ -1633,24 +1375,10 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle
*pRect )
return FALSE;
}
-/******************************************************************************
-|*
-|* ViewShell::PaintDesktop()
-|*
-|* Ersterstellung MA 16. Dec. 93
-|* Letzte Aenderung MA 30. Nov. 95
-|*
-******************************************************************************/
-
void ViewShell::PaintDesktop( const SwRect &rRect )
{
if ( !GetWin() && !GetOut()->GetConnectMetaFile() )
- return; //Fuer den Drucker tun wir hier nix
-
- //Sonderfaelle abfangen, damit es nicht gar so ueberraschend aussieht.
- //Kann z.B. waehrend des Idle'ns zwischenzeitlich auftreten.
- //Die Rechtecke neben den Seiten muessen wir leider auf jedenfall Painten,
- //den diese werden spaeter beim VisPortChgd ausgespart.
+ return;
BOOL bBorderOnly = FALSE;
const SwRootFrm *pRoot = GetDoc()->GetRootFrm();
if ( rRect.Top() > pRoot->Frm().Bottom() )
@@ -1666,7 +1394,6 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
SwRegionRects aRegion( rRect );
- //mod #i6193: remove sidebar area to avoid flickering
const SwPostItMgr* pPostItMgr = GetPostItMgr();
const SwTwips nSidebarWidth = pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ?
pPostItMgr->GetSidebarWidth() +
pPostItMgr->GetSidebarBorderWidth() :
@@ -1698,9 +1425,9 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
{
const SwFrm *pPage = Imp()->GetFirstVisPage();
const SwTwips nBottom = rRect.Bottom();
- //const SwTwips nRight = rRect.Right();
+
while ( pPage && aRegion.Count() &&
- (pPage->Frm().Top() <= nBottom) ) // PAGES01 && (pPage->Frm().Left() <= nRight))
+ (pPage->Frm().Top() <= nBottom) )
{
SwRect aPageRect( pPage->Frm() );
if ( bBookMode )
@@ -1724,11 +1451,8 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
_PaintDesktop( aRegion );
}
-
-// PaintDesktop gesplittet, dieser Teil wird auch von PreViewPage benutzt
void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
{
- // OD 2004-04-23 #116347#
GetOut()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
GetOut()->SetLineColor();
@@ -1777,15 +1501,6 @@ void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
GetOut()->Pop();
}
-/******************************************************************************
-|*
-|* ViewShell::CheckInvalidForPaint()
-|*
-|* Ersterstellung MA 19. May. 94
-|* Letzte Aenderung MA 09. Jun. 94
-|*
-******************************************************************************/
-
BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
{
if ( !GetWin() )
@@ -1805,10 +1520,6 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
if ( bRet )
{
- //Start/EndAction wuerden hier leider nix helfen, weil das Paint vom
- //GUI 'reinkam und somit ein Clipping gesetzt ist gegen das wir nicht
- //nicht ankommen.
- //Ergo: Alles selbst machen (siehe ImplEndAction())
if ( Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea())
Imp()->DelRegion();
@@ -1826,8 +1537,6 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
SwRegionRects *pRegion = Imp()->GetRegion();
if ( pRegion && aAction.IsBrowseActionStop() )
{
- //Nur dann interessant, wenn sich im sichtbaren Bereich etwas
- //veraendert hat.
BOOL bStop = TRUE;
for ( USHORT i = 0; i < pRegion->Count(); ++i )
{
@@ -1844,7 +1553,6 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
if ( pRegion )
{
- //Erst Invert dann Compress, niemals andersherum!
pRegion->Invert();
pRegion->Compress();
bRet = FALSE;
@@ -1869,10 +1577,6 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
if ( rRect != VisArea() )
{
- //rRect == VisArea ist der spezialfall fuer neu bzw.
- //Shift-Ctrl-R, dafuer sollte es nicht notwendig sein
- //das Rechteck nocheinmal in Dokumentkoordinaten v
- //vorzuhalten.
if ( aInvalidRect.IsEmpty() )
aInvalidRect = rRect;
else
@@ -1890,15 +1594,6 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
return bRet;
}
-/******************************************************************************
-|*
-|* ViewShell::Paint()
-|*
-|* Ersterstellung MA ??
-|* Letzte Aenderung MA 17. Sep. 96
-|*
-******************************************************************************/
-
void ViewShell::Paint(const Rectangle &rRect)
{
if ( nLockPaint )
@@ -1920,21 +1615,16 @@ void ViewShell::Paint(const Rectangle &rRect)
if ( SwRootFrm::IsInPaint() )
{
- //Waehrend der Ausgabe einer Seite beim Druckvorgang wird das
- //Paint gepuffert.
SwPaintQueue::Add( this, SwRect( rRect ) );
return;
}
- //MA 30. Jul. 95: fix(16787): mit !nStartAction versuche ich mal mich gegen
- //fehlerhaften Code an anderen Stellen zu wehren. Hoffentlich fuehrt das
- //nicht zu Problemen!?
if ( bPaintWorks && !nStartAction )
{
if( GetWin() && GetWin()->IsVisible() )
{
SwRect aRect( rRect );
- if ( bPaintInProgress ) //Schutz gegen doppelte Paints!
+ if ( bPaintInProgress )
{
GetWin()->Invalidate( rRect );
return;
@@ -1944,19 +1634,11 @@ void ViewShell::Paint(const Rectangle &rRect)
SET_CURR_SHELL( this );
SwRootFrm::SetNoVirDev( TRUE );
- //Wir wollen nicht staendig hin und her Clippen, wir verlassen
- //uns darauf, das sich alle auf das Rechteck beschraeken und
- //brauchen das Clipping hier nur einmalig einkalkulieren. Das
- //ClipRect wird hier einmal entfernt und nicht Restauriert, denn
- //von aussen braucht es sowieso keiner mehr.
- //Nicht wenn wir ein MetaFile aufzeichnen.
if( !GetOut()->GetConnectMetaFile() && GetOut()->IsClipRegion())
GetOut()->SetClipRegion();
if ( IsPreView() )
{
- //Falls sinnvoll gleich das alte InvalidRect verarbeiten bzw.
- //vernichten.
if ( aRect.IsInside( aInvalidRect ) )
ResetInvalidRect();
ViewShell::bLstAct = TRUE;
@@ -1965,34 +1647,21 @@ void ViewShell::Paint(const Rectangle &rRect)
}
else
{
- //SwSaveHdl *pSaveHdl = 0;
- //if ( Imp()->HasDrawView() )
- // pSaveHdl = new SwSaveHdl( Imp() );
-
- //Wenn eine der sichtbaren Seiten noch irgendetwas zum Repaint
- //angemeldet hat, so muessen Repaints ausgeloest werden.
if ( !CheckInvalidForPaint( aRect ) )
{
- // --> OD 2009-08-12 #i101192#
- // start Pre/PostPaint encapsulation to avoid screen blinking
const Region aRepaintRegion(aRect.SVRect());
DLPrePaint2(aRepaintRegion);
- // <--
+
PaintDesktop( aRect );
- //Falls sinnvoll gleich das alte InvalidRect verarbeiten bzw.
- //vernichten.
+
if ( aRect.IsInside( aInvalidRect ) )
ResetInvalidRect();
ViewShell::bLstAct = TRUE;
GetLayout()->Paint( aRect );
ViewShell::bLstAct = FALSE;
- // --> OD 2009-08-12 #i101192#
- // end Pre/PostPaint encapsulation
DLPostPaint2(true);
- // <--
- }
- //delete pSaveHdl;
+ }
}
SwRootFrm::SetNoVirDev( FALSE );
bPaintInProgress = FALSE;
@@ -2018,32 +1687,20 @@ void ViewShell::Paint(const Rectangle &rRect)
else if ( SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) &&
GetOut() == GetWin() )
{
- // #i68597#
const Region aDLRegion(rRect);
DLPrePaint2(aDLRegion);
- // OD 2004-04-23 #116347#
pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
pOut->SetFillColor( Imp()->GetRetoucheColor() );
pOut->SetLineColor();
pOut->DrawRect( rRect );
pOut->Pop();
- // #i68597#
DLPostPaint2(true);
}
}
}
-/******************************************************************************
-|*
-|* ViewShell::SetBrowseBorder()
-|*
-|* Ersterstellung AMA 20. Aug. 96
-|* Letzte Aenderung AMA 20. Aug. 96
-|*
-******************************************************************************/
-
void ViewShell::SetBrowseBorder( const Size& rNew )
{
if( rNew != aBrowseBorder )
@@ -2073,15 +1730,6 @@ sal_Int32 ViewShell::GetBrowseWidth() const
return aVisArea.Width() - 2 * GetOut()->PixelToLogic(aBrowseBorder).Width();
}
-/******************************************************************************
-|*
-|* ViewShell::CheckBrowseView()
-|*
-|* Ersterstellung MA 04. Mar. 96
-|* Letzte Aenderung MA 04. Jul. 96
-|*
-******************************************************************************/
-
void ViewShell::CheckBrowseView( BOOL bBrowseChgd )
{
if ( !bBrowseChgd &&
@@ -2092,12 +1740,6 @@ void ViewShell::CheckBrowseView( BOOL bBrowseChgd )
ASSERT( GetLayout(), "Layout not ready" );
- // Wenn das Layout noch nicht einmal eine Hoehe hat,
- // ist sowieso nichts formatiert.
- // Dann eruebrigt sich die Invalidierung
- // Falsch, z.B. beim Anlegen einer neuen View wird der Inhalt eingef?gt
- // und formatiert (trotz einer leeren VisArea). Hier muessen deshalb
- // die Seiten zur Formatierung angeregt werden.
if( !GetLayout()->Frm().Height() )
{
SwFrm* pPage = GetLayout()->Lower();
@@ -2125,11 +1767,7 @@ void ViewShell::CheckBrowseView( BOOL bBrowseChgd )
pPg = (SwPageFrm*)pPg->GetNext();
} while ( pPg );
- // Wenn sich die Groessenverhaeltnise im BrowseModus aendern,
- // muss die Position und PrtArea der Cntnt- und Tab-Frames invalidiert werden.
BYTE nInv = INV_PRTAREA | INV_TABLE | INV_POS;
- // Beim BrowseModus-Wechsel benoetigen die CntntFrms
- // wg. der Drucker/Bildschirmformatierung eine Size-Invalidierung
if( bBrowseChgd )
nInv |= INV_SIZE | INV_DIRECTION;
@@ -2141,16 +1779,6 @@ void ViewShell::CheckBrowseView( BOOL bBrowseChgd )
UnlockPaint();
}
-/*************************************************************************
-|*
-|* ViewShell::GetLayout()
-|* ViewShell::GetNodes()
-|*
-|* Ersterstellung OK 26. May. 92
-|* Letzte Aenderung MA 16. Sep. 93
-|*
-*************************************************************************/
-
SwRootFrm *ViewShell::GetLayout() const
{
return GetDoc()->GetRootFrm();
@@ -2198,15 +1826,6 @@ SfxItemPool& ViewShell::GetAttrPool()
return GetDoc()->GetAttrPool();
}
-/******************************************************************************
-|*
-|* ViewShell::ApplyViewOptions(), ImplApplyViewOptions()
-|*
-|* Ersterstellung ??
-|* Letzte Aenderung MA 03. Mar. 98
-|*
-******************************************************************************/
-
void ViewShell::ApplyViewOptions( const SwViewOption &rOpt )
{
@@ -2218,7 +1837,6 @@ void ViewShell::ApplyViewOptions( const SwViewOption &rOpt )
ImplApplyViewOptions( rOpt );
- //Einige Aenderungen muessen synchronisiert werden.
pSh = (ViewShell*)this->GetNext();
while ( pSh != this )
{
@@ -2281,13 +1899,8 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
bReformat = GetDoc()->ContainsHiddenChars();
}
- // bReformat wird TRUE, wenn ...
- // - Feldnamen anzeigen oder nicht ...
- // ( - SwEndPortion muessen _nicht_ mehr generiert werden. )
- // - Das Window ist natuerlich was ganz anderes als der Drucker...
bReformat = bReformat || pOpt->IsFldName() != rOpt.IsFldName();
- // Der Mapmode wird veraendert, Minima/Maxima werden von der UI beachtet
if( pOpt->GetZoom() != rOpt.GetZoom() && !IsPreView() )
{
MapMode aMode( pMyWin->GetMapMode() );
@@ -2295,9 +1908,7 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
aMode.SetScaleX( aNewFactor );
aMode.SetScaleY( aNewFactor );
pMyWin->SetMapMode( aMode );
- // Wenn kein ReferenzDevice (Drucker) zum Formatieren benutzt wird,
- // sondern der Bildschirm, muss bei Zoomfaktoraenderung neu formatiert
- // werden.
+
if( getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
bReformat = TRUE;
}
@@ -2342,7 +1953,7 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
BOOL bOnlineSpellChgd = pOpt->IsOnlineSpell() != rOpt.IsOnlineSpell();
- *pOpt = rOpt; // Erst jetzt werden die Options uebernommen.
+ *pOpt = rOpt;
pOpt->SetUIOptions(rOpt);
pDoc->set(IDocumentSettingAccess::HTML_MODE, 0 != ::GetHtmlMode(pDoc->GetDocShell()));
@@ -2350,8 +1961,6 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
pMyWin->Invalidate();
if ( bReformat )
{
- // Es hilft alles nichts, wir muessen an alle CntntFrms ein
- // Prepare verschicken, wir formatieren neu:
StartAction();
Reformat();
EndAction();
@@ -2372,15 +1981,6 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
}
-/******************************************************************************
-|*
-|* ViewShell::SetUIOptions()
-|*
-|* Ersterstellung OS 29.07.96
-|* Letzte Aenderung OS 29.07.96
-|*
-******************************************************************************/
-
void ViewShell::SetUIOptions( const SwViewOption &rOpt )
{
pOpt->SetUIOptions(rOpt);
@@ -2392,24 +1992,10 @@ void ViewShell::SetUIOptions( const SwViewOption &rOpt )
pOpt->SetSymbolFont(rOpt.GetSymbolFont());
}
-/******************************************************************************
-|*
-|* ViewShell::SetReadonly()
-|*
-|* Ersterstellung OS 05.09.96
-|* Letzte Aenderung MA 12. Feb. 97
-|*
-******************************************************************************/
-
void ViewShell::SetReadonlyOption(BOOL bSet)
{
- //JP 01.02.99: bei ReadOnly Flag richtig abfragen und ggfs. neu
- // formatieren; Bug 61335
-
- // Schalten wir gerade von Readonly auf Bearbeiten um?
if( bSet != pOpt->IsReadonly() )
{
- // damit die Flags richtig erfragt werden koennen.
pOpt->SetReadonly( FALSE );
BOOL bReformat = pOpt->IsFldName();
@@ -2430,9 +2016,7 @@ void ViewShell::SetReadonlyOption(BOOL bSet)
Imp()->InvalidateAccessibleEditableState( sal_False );
}
}
-/* -----------------28.08.2003 15:45-----------------
- --------------------------------------------------*/
void ViewShell::SetPDFExportOption(sal_Bool bSet)
{
if( bSet != pOpt->IsPDFExport() )
@@ -2443,9 +2027,7 @@ void ViewShell::SetPDFExportOption(sal_Bool bSet)
pOpt->SetPDFExport(bSet);
}
}
-/* -----------------------------2002/07/31 17:06------------------------------
- ---------------------------------------------------------------------------*/
void ViewShell::SetReadonlySelectionOption(sal_Bool bSet)
{
if( bSet != pOpt->IsSelectionInReadonly() )
@@ -2453,30 +2035,12 @@ void ViewShell::SetReadonlySelectionOption(sal_Bool bSet)
pOpt->SetSelectionInReadonly(bSet);
}
}
-/******************************************************************************
-|*
-|* ViewShell::SetPrtFormatOption()
-|*
-|* Ersterstellung AMA 10. Sep. 97
-|* Letzte Aenderung AMA 10. Sep. 97
-|*
-******************************************************************************/
void ViewShell::SetPrtFormatOption( BOOL bSet )
{
pOpt->SetPrtFormat( bSet );
}
-/******************************************************************************
-|*
-|* ViewShell::UISizeNotify()
-|*
-|* Ersterstellung MA 14. Jan. 97
-|* Letzte Aenderung MA 14. Jan. 97
-|*
-******************************************************************************/
-
-
void ViewShell::UISizeNotify()
{
if ( bDocSizeChgd )
@@ -2531,10 +2095,8 @@ ViewShell::CreateAccessiblePreview()
ASSERT( pDoc->GetRootFrm(), "no layout, no access" );
ASSERT( GetWin(), "no window, no access" );
- // OD 15.01.2003 #103492# - add condition <IsPreView()>
if ( IsPreView() && pDoc->GetRootFrm() && GetWin() )
{
- // OD 14.01.2003 #103492# - adjustment for new method signature
return Imp()->GetAccessibleMap().GetDocumentPreview(
PagePreviewLayout()->maPrevwPages,
GetWin()->GetMapMode().GetScaleX(),
@@ -2550,12 +2112,6 @@ void ViewShell::InvalidateAccessibleFocus()
Imp()->GetAccessibleMap().InvalidateFocus();
}
-/** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
-
- OD 2005-12-01 #i27138#
-
- @author OD
-*/
void ViewShell::InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
const SwTxtFrm* _pToTxtFrm )
{
@@ -2565,12 +2121,6 @@ void ViewShell::InvalidateAccessibleParaFlowRelation( const SwTxtFrm*
_pFromTxtF
}
}
-/** invalidate text selection for paragraphs
-
- OD 2005-12-12 #i27301#
-
- @author OD
-*/
void ViewShell::InvalidateAccessibleParaTextSelection()
{
if ( GetLayout() && GetLayout()->IsAnyShellAccessible() )
@@ -2579,12 +2129,6 @@ void ViewShell::InvalidateAccessibleParaTextSelection()
}
}
-/** invalidate attributes for paragraphs
-
- OD 2009-01-06 #i88069#
-
- @author OD
-*/
void ViewShell::InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
{
if ( GetLayout() && GetLayout()->IsAnyShellAccessible() )
@@ -2602,9 +2146,6 @@ SwAccessibleMap* ViewShell::GetAccessibleMap()
return 0;
}
-/* -----------------------------06.05.2002 13:23------------------------------
-
- ---------------------------------------------------------------------------*/
void ViewShell::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions)
{
if(pOpt->IsPagePreview() && !rAccessibilityOptions.GetIsForPagePreviews())
@@ -2636,17 +2177,14 @@ void ViewShell::SetCareWin( Window* pNew )
}
-// --> FME 2004-06-15 #i12836# enhanced pdf export
sal_Int32 ViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const
{
ASSERT( GetLayout(), "GetPageNumAndSetOffsetForPDF assumes presence of layout" )
sal_Int32 nRet = -1;
- // --> FME 2005-01-07 #i40059# Position out of bounds:
SwRect aRect( rRect );
aRect.Pos().X() = Max( aRect.Left(), GetLayout()->Frm().Left() );
- // <--
const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aRect.Center() );
if ( pPage )
@@ -2666,9 +2204,7 @@ sal_Int32 ViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const
SwR
return nRet;
}
-// <--
-// --> PB 2007-05-30 #146850#
const BitmapEx& ViewShell::GetReplacementBitmap( bool bIsErrorState )
{
BitmapEx** ppRet;
@@ -2701,7 +2237,6 @@ void ViewShell::DeleteReplacementBitmaps()
DELETEZ( pErrorBmp );
DELETEZ( pReplaceBmp );
}
-// <--
SwPostItMgr* ViewShell::GetPostItMgr()
{
@@ -2732,7 +2267,7 @@ IDocumentContentOperations* ViewShell::getIDocumentContentOperations() {
return
IDocumentStylePoolAccess* ViewShell::getIDocumentStylePoolAccess() { return pDoc; }
const IDocumentStatistics* ViewShell::getIDocumentStatistics() const { return pDoc; }
IDocumentUndoRedo* ViewShell::getIDocumentUndoRedoAccess() { return pDoc; }
-// --> OD 2007-11-14 #i83479#
+
const IDocumentListItems* ViewShell::getIDocumentListItemsAccess() const
{
return pDoc;
@@ -2741,4 +2276,3 @@ const IDocumentOutlineNodes* ViewShell::getIDocumentOutlineNodesAccess() const
{
return pDoc;
}
-// <--
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index 71e90b0..620fcd3 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -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,23 @@ 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#
OutputDevice* pPDFOut = 0;
+
if ( pOut && pOut->GetPDFWriter() )
pPDFOut = pOut;
- // <--
-
- // --> FME 2005-01-21 #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)
if ( !bBrowseMode )
{
pDoc->CheckDefaultPageFmt();
}
- // <--
RTL_LOGFILE_CONTEXT_TRACE( aLog, "View::Init - after InitPrt" );
@@ -135,14 +106,12 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
GetWin()->SetLineColor();
}
- //Layout erzeugen wenn es noch nicht vorhanden ist.
SwRootFrm* pRoot = GetDoc()->GetRootFrm();
if( !pRoot )
GetDoc()->SetRootFrm( pRoot = new SwRootFrm( pDoc->GetDfltFrmFmt(), this ) );
SizeChgNotify();
- // --> #i31958#
// XForms mode: initialize XForms mode, based on design mode (draw view)
// MakeDrawView() requires layout
if( GetDoc()->isXForms() )
@@ -151,17 +120,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 +136,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
+ // in order to suppress event handling in
// <SwDrawContact::Changed> during contruction of <ViewShell> instance
mbInConstructor = true;
@@ -196,20 +156,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.
+ // 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 +175,19 @@ 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#
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#
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 +201,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
+ // in order to suppress event handling in
// <SwDrawContact::Changed> during contruction of <ViewShell> instance
mbInConstructor = true;
@@ -276,7 +220,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 +230,31 @@ 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#
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
+ // 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 +286,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 +299,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." );
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index c37036e..a5ea336 100755
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -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:
@@ -150,8 +148,6 @@ void SwPaintQueue::Repaint()
{
if ( pSh->GetWin() )
{
- //Fuer PreView aussenherum, weil im PaintHdl (UI) die
- //Zeilen/Spalten bekannt sind.
pSh->GetWin()->Invalidate();
pSh->GetWin()->Update();
}
@@ -193,13 +189,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?" );
@@ -224,11 +213,6 @@ void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, BOOL /*bPDFExport*/ )
void ViewShell::InitPrt( OutputDevice *pOutDev )
{
- //Fuer den Printer merken wir uns einen negativen Offset, der
- //genau dem Offset de OutputSize entspricht. Das ist notwendig,
- //weil unser Ursprung der linken ober Ecke der physikalischen
- //Seite ist, die Ausgaben (SV) aber den Outputoffset als Urstprung
- //betrachten.
if ( pOutDev )
{
aPrtOffst = Point();
@@ -247,13 +231,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 +254,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 +267,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 +307,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 +325,9 @@ void ViewShell::CalcPagesForPrint( USHORT nMax )
aAction.Action();
- aVisArea = aOldVis; //Zuruecksetzen wg. der Paints!
+ aVisArea = aOldVis;
Imp()->SetFirstVisPageInvalid();
-// SwPaintQueue::Repaint();
+
}
pLayout->EndAllAction();
}
@@ -373,7 +338,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 +350,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 +387,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 +419,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 +432,8 @@ 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
if (pPrt)
pPrtDoc->setPrinter( new SfxPrinter(*pPrt), true, true );
@@ -492,19 +443,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 +480,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 +511,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 +527,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 +539,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 +560,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
{
pOutDevDoc = CreatePrtDoc( aDocShellRef );
- // eine ViewShell darauf
pShell = new ViewShell( *pOutDevDoc, 0, pOpt, pOutDev );
pOutDevDoc->SetRefForDocShell( 0 );
}
@@ -641,12 +576,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 +615,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 +634,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
pStPage->GetUpper()->Paint( pStPage->Frm(), &rPrintData );
SwPaintQueue::Repaint();
- } //Zus. Scope wg. CurShell!
+ }
delete pShell;
@@ -718,21 +651,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 +684,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 +703,7 @@ BOOL ViewShell::IsAnyFieldInDoc() const
{
const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
- //#i101026# mod: 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 +711,6 @@ BOOL ViewShell::IsAnyFieldInDoc() const
return FALSE;
}
-
-
-/******************************************************************************
- * SwDrawViewSave
- *
- * Saves some settings at the draw view
- ******************************************************************************/
-
SwDrawViewSave::SwDrawViewSave( SdrView* pSdrView )
: pDV( pSdrView )
{
@@ -829,10 +730,8 @@ SwDrawViewSave::~SwDrawViewSave()
}
-// OD 09.01.2003 #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 +744,6 @@ 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
if ( !IsPreView() )
{
pDrawView->SetLayerPrintable( sLayerNm, rOptions.bPrintControl );
--
1.7.3
Context
- [Libreoffice] [PATCH] Cleaned up the comments and code in the following files. · Nick Savage
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.