20#ifndef INCLUDED_SW_INC_PAGEPREVIEWLAYOUT_HXX
21#define INCLUDED_SW_INC_PAGEPREVIEWLAYOUT_HXX
165 const Point& _rPreviewOffset,
234 void Init(
const sal_uInt16 _nCols,
235 const sal_uInt16 _nRows,
236 const Size& _rPxWinSize
279 bool Prepare(
const sal_uInt16 _nProposedStartPageNum,
280 const Point& rProposedStartPos,
281 const Size& _rPxWinSize,
282 sal_uInt16& _onStartPageNum,
284 const bool _bStartWithPageAtFirstCol =
true
336 const Size& _aNewWinSize )
const;
369 const sal_Int16 _nVertMove,
370 sal_uInt16& _orNewSelectedPage,
371 sal_uInt16& _orNewStartPage,
372 Point& _orNewStartPos )
const;
398 bool& _obPosInEmptyPage,
399 sal_uInt16& _onPageNum )
const;
472 sal_uInt16& _onStartPageNum,
A page of the document layout.
page preview functionality in the writer
sal_uInt16 SelectedPage()
get selected page number
~SwPagePreviewLayout()
destructor of <SwPagePreviewLayout>
sal_uInt16 GetRowOfPage(sal_uInt16 _nPageNum) const
determine row the page with the given number is in
static constexpr SwTwips gnXFree
number of horizontal and vertical twips for spacing between the pages.
bool mbLayoutSizesValid
boolean indicating, if the calculated print preview layout sizes ( windows size in twips,...
static constexpr SwTwips gnYFree
void CalcPreviewDataForPage(const SwPageFrame &_rPage, const Point &_rPreviewOffset, PreviewPage *_opPreviewPage)
determines preview data for a given page and a given preview offset
void MarkNewSelectedPage(const sal_uInt16 _nSelectedPage)
paint to mark new selected page
SwViewShell & mrParentViewShell
view shell the print preview is generated for.
tools::Rectangle maPaintedPreviewDocRect
bool Prepare(const sal_uInt16 _nProposedStartPageNum, const Point &rProposedStartPos, const Size &_rPxWinSize, sal_uInt16 &_onStartPageNum, tools::Rectangle &_orDocPreviewPaintRect, const bool _bStartWithPageAtFirstCol=true)
prepare paint of page preview
void Repaint(const tools::Rectangle &rInvalidCoreRect) const
repaint pages on page preview
void CalcDocPreviewPaintRect()
calculate painted preview document rectangle
void CalcStartValuesForSelectedPageMove(const sal_Int16 _nHoriMove, const sal_Int16 _nVertMove, sal_uInt16 &_orNewSelectedPage, sal_uInt16 &_orNewStartPage, Point &_orNewStartPos) const
calculate data to bring new selected page into view.
bool mbDoesLayoutColsFitIntoWindow
SwViewShell & GetParentViewShell()
void CalcAdditionalPaintOffset()
calculate additional paint offset
bool mbPaintInfoValid
boolean indicating, if the paint information ( physical number of start page, start column and row,...
void ClearPreviewLayoutSizes()
helper method to clear preview page layout sizes
bool mbDoesLayoutRowsFitIntoWindow
sal_uInt16 GetColOfPage(sal_uInt16 _nPageNum) const
determine column the page with the given number is in
Size GetPreviewDocSize() const
void SetSelectedPage(sal_uInt16 _nSelectedPageNum)
set selected page number
bool mbBookPreviewModeToggled
void ReInit()
method to adjust page preview layout to document changes
void CalcPreviewPages()
calculate preview pages
void Clear_()
clear internal data about current page preview
bool SetBookPreviewMode(const bool _bEnableBookPreview, sal_uInt16 &_onStartPageNum, tools::Rectangle &_orDocPreviewPaintRect)
enable/disable book preview
SwTwips GetWinPagesScrollAmount(const sal_Int16 _nWinPagesToScroll) const
determine preview window page scroll amount
void PaintSelectMarkAtPage(vcl::RenderContext &rRenderContext, const PreviewPage *_aSelectedPreviewPage) const
paint selection mark at page
void Init(const sal_uInt16 _nCols, const sal_uInt16 _nRows, const Size &_rPxWinSize)
init page preview layout
bool IsPageVisible(const sal_uInt16 _nPageNum) const
determines, if page with given page number is visible in preview
bool Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rOutRect) const
paint prepared preview
sal_uInt16 mnPaintStartCol
Size GetPreviewPageSizeByPageNum(sal_uInt16 _nPageNum) const
get size of a preview page by its physical page number
SwPagePreviewLayout(SwViewShell &_rParentViewShell, const SwRootFrame &_rLayoutRootFrame)
constructor of <SwPagePreviewLayout>
sal_uInt16 ConvertRelativeToAbsolutePageNum(sal_uInt16 _nRelPageNum) const
Convert relative to absolute page numbers (see PrintEmptyPages)
const SwRootFrame & mrLayoutRootFrame
top layout frame of the layout for accessing the pages
Point maAdditionalPaintOffset
bool DoesPreviewLayoutRowsFitIntoWindow() const
bool mbLayoutInfoValid
boolean indicating, if the layout information (number of columns and rows) are valid.
bool IsPreviewPosInDocPreviewPage(const Point &rPreviewPos, Point &_orDocPos, bool &_obPosInEmptyPage, sal_uInt16 &_onPageNum) const
checks, if given position is inside a shown document page
sal_uInt16 mnPaintStartRow
sal_uInt16 mnPaintPhyStartPageNum
sal_uInt16 ConvertAbsoluteToRelativePageNum(sal_uInt16 _nAbsPageNum) const
Convert absolute to relative page numbers (see PrintEmptyPages)
SwTwips mnPreviewLayoutWidth
sal_uInt16 GetVirtPageNumByPageNum(sal_uInt16 _nPageNum) const
get virtual page number by its physical page number
bool mbNewLayoutDuringPaint
Point maPaintPreviewDocOffset
bool PreviewLayoutValid() const
tools::Rectangle maPreviewDocRect
Point GetPreviewStartPosForNewScale(const Fraction &_aNewScale, const Fraction &_aOldScale, const Size &_aNewWinSize) const
calculate start position for new scale
void ApplyNewZoomAtViewShell(sal_uInt8 _aNewZoom)
apply new zoom at given view shell
std::vector< std::unique_ptr< PreviewPage > > maPreviewPages
Point maPaintStartPageOffset
const PreviewPage * GetPreviewPageByPageNum(const sal_uInt16 _nPageNum) const
get preview page by physical page number
sal_uInt16 mnSelectedPageNum
SwTwips mnPreviewLayoutHeight
bool DoesPreviewLayoutColsFitIntoWindow() const
void CalcPreviewLayoutSizes()
calculate page preview layout sizes
void ClearPreviewPageData()
helper method to clear data in preview page vectors
bool mbInPaint
#i22014# - internal booleans to indicate, that a new print preview layout has been created during a p...
The root element of a Writer document layout.
data structure for a preview page in the current preview layout