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