20 #include <config_wasm_strip.h>
41 #include <osl/diagnose.h>
61 #include <strings.hrc>
63 #define ShellClass_SwPagePreview
65 #include <swslots.hxx>
86 GetStaticInterface()->RegisterPopupMenu(
"preview");
88 SfxVisibilityFlags::Standard|SfxVisibilityFlags::Client|SfxVisibilityFlags::FullScreen|SfxVisibilityFlags::ReadonlyDoc,
89 ToolbarId::PView_Toolbox);
93 #define SWVIEWFLAGS SfxViewShellFlags::HAS_PRINTOPTIONS
95 #define MIN_PREVIEW_ZOOM 25
96 #define MAX_PREVIEW_ZOOM 600
100 static const sal_uInt16 aZoomArr[] =
102 25, 50, 75, 100, 150, 200, 400, 600
104 const int nZoomArrSize =
static_cast<int>(
SAL_N_ELEMENTS(aZoomArr));
107 for(sal_uInt16
i : aZoomArr)
115 for(
int i = nZoomArrSize - 1;
i >= 0; --
i)
117 if(nCurrentZoom > aZoomArr[
i] || !
i)
126 static sal_uInt16
const aInval[] =
140 std::unique_ptr<weld::SpinButton> m_xRowEdit;
141 std::unique_ptr<weld::SpinButton> m_xColEdit;
145 : GenericDialogController(rParent.
GetFrameWeld(),
"modules/swriter/ui/previewzoomdialog.ui",
"PreviewZoomDialog")
147 , m_xRowEdit(m_xBuilder->weld_spin_button(
"rows"))
148 , m_xColEdit(m_xBuilder->weld_spin_button(
"cols"))
150 m_xRowEdit->set_value(rParent.
GetRow());
151 m_xColEdit->set_value(rParent.
GetCol());
168 , mpViewShell(nullptr)
170 , mbCalcScaleForPreviewLayout(true)
172 , mpPgPreviewLayout(nullptr)
243 if( (1 == nOldCol) != (1 == mnCol) )
248 static sal_uInt16 aInval[] =
250 SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN,
273 bool bPaintPageAtFirstCol =
true;
280 const sal_uInt16 nNewAbsSttPage = nRelSttPage - nPages > 0 ?
283 nNewSttPage = nNewAbsSttPage;
286 const sal_uInt16 nNewRelSelPage = nRelSelPage - nPages > 0 ?
287 nRelSelPage - nPages :
297 nNewSttPage =
std::min(nNewAbsSttPage, nPageCount);
306 nNewSttPage = nDefSttPg;
311 nNewSttPage = nPageCount;
320 bPaintPageAtFirstCol =
false;
327 bPaintPageAtFirstCol =
false;
337 if( nNewSttPage > nPageCount )
338 nNewSttPage = nPageCount;
356 static sal_uInt16 aInval[] =
404 if( nVirtPageNum && nVirtPageNum != nPageNum )
406 aStatusStr = OUString::number(nVirtPageNum) +
" " ;
408 return aStatusStr + OUString::number(nPageNum) +
" / " + OUString::number(nPageCnt);
414 bool bHandled =
false;
417 sal_uInt16 nSlot = 0;
420 case KEY_ADD : nSlot = SID_ZOOM_OUT;
break;
428 nSlot, SfxCallMode::ASYNCHRON );
432 Window::KeyInput( rKEvt );
437 bool bCallBase =
true;
440 case CommandEventId::ContextMenu:
445 case CommandEventId::Wheel:
446 case CommandEventId::StartAutoScroll:
447 case CommandEventId::AutoScroll:
466 Window::Command( rCEvt );
477 bool bPosInEmptyPage;
478 sal_uInt16 nNewSelectedPage;
481 aDocPos, bPosInEmptyPage, nNewSelectedPage );
482 if ( bIsDocPos && rMEvt.
GetClicks() == 2 )
486 OUString sNewCursorPos = OUString::number( aDocPos.X() ) +
";" +
487 OUString::number( aDocPos.Y() ) +
";";
492 SfxCallMode::ASYNCHRON );
494 else if ( bIsDocPos || bPosInEmptyPage )
505 static sal_uInt16 aInval[] =
553 Window::DataChanged( rDCEvt );
557 case DataChangedEventType::SETTINGS:
562 if( rDCEvt.
GetFlags() & AllSettingsFlags::STYLE )
568 case DataChangedEventType::PRINTER:
569 case DataChangedEventType::DISPLAY:
570 case DataChangedEventType::FONTS:
571 case DataChangedEventType::FONTSUBSTITUTION:
592 const int eMvMode = _bPgUp ?
601 sal_uInt16 nNewSelectedPageNum = 0;
611 nNewSelectedPageNum = 1;
633 if ( nNewSelectedPageNum != 0 )
639 static sal_uInt16 aInval[] =
659 bool bRefresh =
true;
663 case SID_REFRESH_VIEW:
671 if( pArgs && pArgs->
Count() >= 2 )
701 static sal_uInt16 aInval[] =
732 SvxZoomEnableFlags::N50|
733 SvxZoomEnableFlags::N75|
734 SvxZoomEnableFlags::N100|
735 SvxZoomEnableFlags::N150|
736 SvxZoomEnableFlags::N200|
737 SvxZoomEnableFlags::WHOLEPAGE);
738 aCoreSet.
Put( aZoom );
750 sal_uInt16 nZoomFactor = USHRT_MAX;
753 eType = pZoomItem->GetType();
754 nZoomFactor = pZoomItem->GetValue();
757 nZoomFactor = pPreviewItem->GetValue();
758 if(USHRT_MAX != nZoomFactor)
763 case SID_ATTR_ZOOMSLIDER :
768 if ( pArgs && (pItem = pArgs->
GetItemIfSet(SID_ATTR_ZOOMSLIDER ) ) )
770 const sal_uInt16 nCurrentZoom = pItem->GetValue();
771 SetZoom( SvxZoomType::PERCENT, nCurrentZoom );
789 sal_uInt16 nNewSelectedPage;
790 sal_uInt16 nNewStartPage;
792 sal_Int16 nHoriMove = 0;
793 sal_Int16 nVertMove = 0;
802 nNewSelectedPage, nNewStartPage, aNewStartPos );
820 static sal_uInt16 aInval[] =
843 if( pArgs && pArgs->
Count())
862 case FN_END_OF_DOCUMENT:
865 bool bRet =
ChgPage( eMvMode );
881 if((pPrinter->GetOrientation() == Orientation::Landscape)
883 pPrinter->SetOrientation(pPPVPD->
GetLandscape() ? Orientation::Landscape : Orientation::Portrait);
892 case SID_PRINTDOCDIRECT:
899 case SID_PRINTPREVIEW:
905 case FN_INSERT_BREAK:
915 SfxCallMode::ASYNCHRON );
919 OSL_ENSURE(
false,
"wrong dispatcher");
931 OSL_ENSURE(nWhich,
"empty set");
938 case SID_BROWSER_MODE:
948 case FN_END_OF_DOCUMENT:
984 SvxZoomEnableFlags::N50|
985 SvxZoomEnableFlags::N75|
986 SvxZoomEnableFlags::N100|
987 SvxZoomEnableFlags::N150|
988 SvxZoomEnableFlags::N200);
992 case SID_ATTR_ZOOMSLIDER :
995 const sal_uInt16 nCurrentZoom = pVOpt->
GetZoom();
998 rSet.
Put( aZoomSliderItem );
1039 if( SfxItemState::DISABLED == aSet.GetItemState( SID_PRINTDOC,
false ))
1041 else if( SfxItemState::SET == aSet.GetItemState( SID_PRINTDOC,
1050 case SID_PRINTPREVIEW:
1055 case SID_PRINTDOCDIRECT:
1095 bool bIsModified = pESh !=
nullptr && pESh->
IsModified();
1123 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
1134 if( !bIsModified && pESh !=
nullptr )
1141 m_nNewPage(USHRT_MAX),
1142 m_sPageStr(
SwResId(STR_PAGE)),
1143 m_pHScrollbar(nullptr),
1144 m_pVScrollbar(nullptr),
1147 mbResetFormDesignMode(
false ),
1148 mbFormDesignModeToReset(
false )
1161 if (
auto& pBar = pCurrent->GetWindow().GetSystemWindow()->GetNotebookBar())
1162 pBar->ControlListenerForCurrentController(
false);
1169 if ( pF == pViewFrame )
1177 if (
SwPagePreview* pPagePreview = dynamic_cast<SwPagePreview*>(pOldSh))
1178 pVS = pPagePreview->GetViewShell();
1181 if (
SwView* pView = dynamic_cast<SwView *>(pOldSh))
1183 pVS = pView->GetWrtShellPtr();
1192 sal_uInt16 nPhysPg, nVirtPg;
1193 static_cast<SwCursorShell*
>(pVS)->GetPageNum( nPhysPg, nVirtPg,
true,
false );
1212 *static_cast<SwDocShell*>(pViewFrame->
GetObjectShell())->GetDoc(),
1224 pVShell->
SetWin(
nullptr);
1229 if (
auto& pBar = pCurrent->GetWindow().GetSystemWindow()->GetNotebookBar())
1230 pBar->ControlListenerForCurrentController(
true);
1246 assert(!ppScrollbar);
1273 if( bUpdateScrollbar )
1277 static sal_uInt16 aInval[] =
1300 rToFill.
Right() = nTmp;
1399 pScrollbar->
GetType() == ScrollType::Drag &&
1401 GetViewShell()->PagePreviewLayout()->DoesPreviewLayoutRowsFitIntoWindow())
1404 OUString sStateStr(m_sPageStr);
1406 if( 1 == m_pViewWin->GetCol() || !nThmbPos )
1408 sStateStr += OUString::number( nThmbPos );
1415 aRect.
SetTop( aPos.Y() );
1419 QuickHelpFlags::Right|QuickHelpFlags::VCenter);
1423 EndScrollHdl( pScrollbar );
1433 bool bInvalidateWin =
true;
1439 if ( GetViewShell()->PagePreviewLayout()->DoesPreviewLayoutRowsFitIntoWindow() )
1442 const sal_uInt16 nThmbPos = o3tl::narrowing<sal_uInt16>(pScrollbar->
GetThumbPos());
1444 if( nThmbPos != m_pViewWin->SelectedPage() )
1453 bInvalidateWin =
false;
1461 m_pViewWin->SetSttPage( nThmbPos );
1462 m_pViewWin->SetSelectedPage( nThmbPos );
1470 const sal_Int16 nPageDiff = nThmbPos - m_pViewWin->SelectedPage();
1471 const sal_uInt16 nVisPages = m_pViewWin->GetRow() * m_pViewWin->GetCol();
1472 sal_Int16 nWinPagesToScroll = nPageDiff / nVisPages;
1473 if ( nPageDiff % nVisPages )
1476 nPageDiff < 0 ? --nWinPagesToScroll : ++nWinPagesToScroll;
1478 m_pViewWin->SetSelectedPage( nThmbPos );
1483 GetViewShell()->ShowPreviewSelection( nThmbPos );
1488 bInvalidateWin =
false;
1494 m_pViewWin->Scroll(0, nThmbPos - m_pViewWin->GetPaintedPreviewDocRect().Top());
1500 m_pViewWin->Scroll(nThmbPos - m_pViewWin->GetPaintedPreviewDocRect().Left(), 0);
1503 static sal_uInt16 aInval[] =
1508 SfxBindings& rBindings = GetViewFrame()->GetBindings();
1511 if ( bInvalidateWin )
1513 m_pViewWin->Invalidate();
1548 bool bShowVScrollbar =
false, bShowHScrollbar =
false;
1552 if(
GetViewShell()->PagePreviewLayout()->DoesPreviewLayoutRowsFitIntoWindow())
1575 ++aScrollbarRange.
Max();
1577 aScrollbarRange.
Max() += ( nVisPages - 1 );
1585 const Size& rPreviewSize =
1594 bShowVScrollbar =
true;
1598 bShowVScrollbar =
false;
1605 const Size& rPreviewSize =
1611 bShowHScrollbar =
true;
1625 bShowHScrollbar =
false;
1647 if ( pOld && pOld->IsPrinting() )
1651 if( ( SfxPrinterChangeFlags::PRINTER | SfxPrinterChangeFlags::JOBSETUP ) & nDiffFlags )
1654 if( nDiffFlags & SfxPrinterChangeFlags::PRINTER )
1657 if ( ( nDiffFlags & SfxPrinterChangeFlags::OPTIONS ) == SfxPrinterChangeFlags::OPTIONS )
1660 const bool bChgOri = bool(nDiffFlags & SfxPrinterChangeFlags::CHG_ORIENTATION);
1661 const bool bChgSize = bool(nDiffFlags & SfxPrinterChangeFlags::CHG_SIZE);
1662 if ( bChgOri || bChgSize )
1677 static sal_uInt16 aInval[] =
1679 SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
1680 SID_RULER_BORDERS, SID_RULER_PAGE_POS, 0
1682 #if OSL_DEBUG_LEVEL > 0
1684 const sal_uInt16* pPtr = aInval + 1;
1686 OSL_ENSURE( *(pPtr - 1) < *pPtr,
"wrong sorting!" );
1734 if ( _eZoomType == SvxZoomType::WHOLEPAGE )
1745 else if ( _nZoomFactor != 0 )
1748 Fraction aNewScale( _nZoomFactor, 100 );
1756 Point aNewPaintStartPos =
1787 if( pWData && CommandWheelMode::ZOOM == pWData->
GetMode() )
1793 const sal_uInt16 nOffset = 10;
1806 SetZoom(SvxZoomType::PERCENT, nFactor);
1815 uno::Reference< css::accessibility::XAccessible >
1819 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
1820 OSL_ENSURE(
GetViewShell() !=
nullptr,
"We need a view shell" );
1821 css::uno::Reference< css::accessibility::XAccessible > xAcc =
GetAccessible(
false );
1875 if ( aOpt.GetZoom() != nFactor ||
1876 aOpt.GetZoomType() != eType )
1879 aOpt.SetZoomType(eType);
virtual Point GetPosPixel() const
const SfxPoolItem * ExecuteSlot(SfxRequest &rReq, const SfxInterface *pIF=nullptr)
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
const Fraction & GetScaleX() const
void SetLineBreak(bool b)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
void setOutputToWindow(bool bOutputToWindow)
void SetNewCursorPos(const OUString &rStr)
bool SetBookPreviewMode(const bool _bEnableBookPreview, sal_uInt16 &_onStartPageNum, tools::Rectangle &_orDocPreviewPaintRect)
enable/disable book preview
#define FN_CLOSE_PAGEPREVIEW
void MarkNewSelectedPage(const sal_uInt16 _nSelectedPage)
paint to mark new selected page
Point GetPointerPosPixel()
SwViewShell * GetViewShell() const
virtual void ApplyViewOptions(const SwViewOption &rOpt)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
#define FN_SHOW_MULTIPLE_PAGES
void ShowPreviewSelection(sal_uInt16 nSelPage)
#define SFX_IMPL_INTERFACE(Class, SuperClass)
Point GetPreviewStartPosForNewScale(const Fraction &_aNewScale, const Fraction &_aOldScale, const Size &_aNewWinSize) const
calculate start position for new scale
Provides the VCL widget that is used for the main area of the File -> Print Preview window...
sal_uInt16 GetVirtPageNumByPageNum(sal_uInt16 _nPageNum) const
get virtual page number by its physical page number
void SetZoom(sal_uInt16 n)
void SetState(const SfxItemSet &rSet)
void ShowHScrollbar(bool bShow)
virtual void CalcLayout()
virtual void InnerResizePixel(const Point &rOfs, const Size &rSize, bool inplaceEditModeChange) override
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
SwPagePreviewWin(vcl::Window *pParent, SwPagePreview &rView)
VclPtr< SwPagePreviewWin > m_pViewWin
std::unique_ptr< sal_Int32[]> pData
virtual ~SwPagePreview() override
void SetSelectedPage(sal_uInt16 _nSelectedPageNum)
set selected page number in document preview
SfxDispatcher * GetDispatcher()
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
static SvxAbstractDialogFactory * Create()
void AdjustOptionsForPagePreview(SwPrintData const &rPrintOptions)
adjust view options for page preview
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
const tools::Rectangle & GetPaintedPreviewDocRect() const
bool IsDesignMode() const
bool IsModified() const
Changes in document?
void Scroll(tools::Long nXMove, tools::Long nYMove, ScrollFlags nFlags=ScrollFlags::NONE) override
pixel scrolling - horizontally always or vertically when less than the desired number of rows fits in...
bool IsPreviewPosInDocPreviewPage(const Point &rPreviewPos, Point &_orDocPos, bool &_obPosInEmptyPage, sal_uInt16 &_onPageNum) const
checks, if given position is inside a shown document page
void SetPagePreview(sal_uInt8 nRow, sal_uInt8 nCol)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
const MapMode & GetMapMode() const
static void StateUndo(SfxItemSet &)
sal_uInt16 GetCode() const
void Execute(SfxRequest &)
DataChangedEventType GetType() const
void Done(bool bRemove=false)
void Pos(const Point &rNew)
virtual SfxBindings & GetBindings() override
void SetHelpId(const OString &)
const CommandWheelData * GetWheelData() const
Of course Writer needs its own rectangles.
sal_uInt16 ConvertRelativeToAbsolutePageNum(sal_uInt16 _nRelPageNum) const
Convert relative to absolute page numbers (see PrintEmptyPages)
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
void SetHardBlank(bool b)
bool mbCalcScaleForPreviewLayout
SwNodeOffset abs(const SwNodeOffset &a)
void SetAnimationEnabled(bool bEnable=true)
constexpr sal_uInt16 KEY_ADD
virtual SfxObjectShell * GetObjectShell() override
void SetShowHiddenChar(bool b)
bool HandleScrollCommand(const CommandEvent &rCmd, ScrollBar *pHScrl, ScrollBar *pVScrl)
virtual const SfxItemSet * GetOutputItemSet() const =0
#define FN_SHOW_SINGLE_PAGE
void SetBorderPixel(const SvBorder &rBorder)
void SetColumnBreak(bool b)
void ExecutePopup(const OUString &rResName, vcl::Window *pWin=nullptr, const Point *pPos=nullptr)
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
void SetPagePrevRow(sal_uInt8 n)
SvxZoomType GetZoomType() const
void SetAppPrintOptions(SwViewShell *pSh, bool bWeb)
OUString SwResId(TranslateId aId)
constexpr tools::Long Width() const
bool PreviewLayoutValid() const
sal_uInt16 GetClicks() const
void disposeAndReset(reference_type *pBody)
void AddSnappingPoint(sal_Int32 nNew)
vcl::Window & GetWindow() const
void SetSlot(sal_uInt16 nNewSlot)
virtual void WriteUserData(OUString &, bool bBrowse=false)
void SetZoom(SvxZoomType eSet, sal_uInt16 nFactor)
void SetSelectedPage(sal_uInt16 _nSelectedPageNum)
set selected page number
bool mbFormDesignModeToReset
sal_uInt16 GetButtons() const
#define SFX_PRINTERROR_BUSY
void SetParagraph(bool b)
css::uno::Reference< css::accessibility::XAccessible > GetAccessible(bool bCreate=true)
void InvalidateLayout(bool bSizeChanged)
SAL_DLLPRIVATE void CreateScrollbar(bool bHori)
bool IsMouseEvent() const
AllSettingsFlags GetFlags() const
std::unique_ptr< SfxTabPage > CreatePrintOptionsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rOptions, bool bPreview)
void ApplyAccessibilityOptions(SvtAccessibilityOptions const &rAccessibilityOptions)
#define SID_JUMP_TO_SPECIFIC_PAGE
bool IsViewVScrollBar() const
sal_uInt16 GetModifier() const
virtual void DataChanged(const DataChangedEvent &) override
void SetAccessible(const css::uno::Reference< css::accessibility::XAccessible > &)
void EnableHScrollbar(bool bEnable)
void DocSzChgd(const Size &rNewSize)
bool Execute(sal_uInt16 nSlot, const SfxPoolItem **pArgs=nullptr, SfxCallMode nCall=SfxCallMode::SLOT)
SwPagePreviewLayout * PagePreviewLayout()
void SetShowHiddenPara(bool b)
SwDocShell * GetDocShell()
bool SetContextBroadcasterEnabled(const bool bIsEnabled)
bool IsDeltaPixel() const
SfxItemPool & GetPool() const
bool DoesPreviewLayoutRowsFitIntoWindow() const
tools::Rectangle m_aVisArea
#define SAL_N_ELEMENTS(arr)
void SetHideWhitespaceMode(bool bMode)
void ApplyAccessibilityOptions(SvtAccessibilityOptions const &rAccessibilityOptions)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
const SwPagePreviewPrtData * GetPreviewPrtData() const
SAL_DLLPRIVATE Point AlignToPixel(const Point &rPt) const
bool Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rOutRect) const
paint prepared preview
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
void ChgAllPageOrientation(Orientation eOri)
sal_Int32 GetScrollBarSize() const
void RepaintCoreRect(const SwRect &rRect)
virtual SAL_DLLPRIVATE std::unique_ptr< SfxTabPage > CreatePrintOptionsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rOptions) override
sal_uInt16 SelectedPage() const
get selected page number of document preview
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.
void SetScaleX(const Fraction &rScaleX)
page preview functionality in the writer
bool mbResetFormDesignMode
Point LogicToPixel(const Point &rLogicPt) const
VclPtr< vcl::Window > m_pScrollFill
VclPtr< SwScrollbar > m_pHScrollbar
void SetPagePrevCol(sal_uInt8 n)
void SetWindow(vcl::Window *pViewPort)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
SAL_DLLPRIVATE bool ChgPage(int eMvMode, bool bUpdateScrollbar=true)
const SfxPoolItem * GetSlotState(sal_uInt16 nSlotId, const SfxInterface *pIF=nullptr, SfxItemSet *pStateSet=nullptr)
void SetOnlineSpell(bool b)
#define FN_PRINT_PAGEPREVIEW
const MapMode & GetMapMode() const
tools::Long GetNotchDelta() const
static bool IsQuickHelpEnabled()
void SetShowHiddenField(bool b)
SfxBindings & GetBindings()
CommandWheelMode GetMode() const
void Repaint(const tools::Rectangle &rInvalidCoreRect) const
repaint pages on page preview
void SetSttPage(sal_uInt16 n)
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Size GetPreviewDocSize() const
Size GetOutputSize() const
void SetPagePreview(bool bSet)
sal_uInt16 GetPageCount() const
void SetVisArea(const tools::Rectangle &)
SAL_DLLPRIVATE void ExecPgUpAndPgDown(const bool _bPgUp, SfxRequest *_pReq)
Helper method to execute SfxRequest FN_PAGE_UP and FN_PAGE_DOWN.
void SetSfxViewShell(SfxViewShell *pNew)
static SfxViewFrame * GetNext(const SfxViewFrame &rPrev, const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
css::uno::Reference< css::accessibility::XAccessible > CreateAccessiblePreview()
bool HandleWheelCommands(const CommandEvent &)
const AllSettings & GetSettings() const
CommandEventId GetCommand() const
void ShowVScrollbar(bool bShow)
sal_uInt16 GetModifier() const
virtual void Command(const CommandEvent &rCEvt) override
void SetVScrollbarThumbPos(const sal_uInt16 _nNewThumbPos)
Adjust position of vertical scrollbar.
virtual SAL_DLLPRIVATE sal_uInt16 SetPrinter(SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags=SFX_PRINTER_ALL) override
void SetScaleY(const Fraction &rScaleY)
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
void SetWinSize(const Size &rNewSize)
OUString GetStatusStr(sal_uInt16 nPageCount) const
sal_uInt16 SelectedPage()
get selected page number
void SetViewHRuler(bool b)
bool MovePage(int eMoveMode)
static Size GetPaperSize(Paper ePaper, MapUnit eUnit=MapUnit::MapTwip)
bool IsPagePrevBookview() const
void SetName(const OUString &rName)
Point PixelToLogic(const Point &rDevicePt) const
void SSize(const Size &rNew)
sal_uInt16 GetModifier() const
virtual void KeyInput(const KeyEvent &) override
bool GetLandscape() const
#define COMMAND_WHEEL_PAGESCROLL
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
static void ShowQuickHelp(vcl::Window *pParent, const tools::Rectangle &rScreenRect, const OUString &rHelpText, QuickHelpFlags nStyle=QuickHelpFlags::NONE)
#define SFX_VIEW_REGISTRATION(DocClass)
vcl::Window * GetParent() const
SfxItemPool * GetPool() const
SwViewShell * mpViewShell
virtual void setPrinter(SfxPrinter *pP, bool bDeleteOld, bool bCallPrtDataChanged)=0
Set the printer at the document.
SfxViewShell * GetViewShell() const
void SetFieldName(bool b)
SwPagePreviewLayout * mpPgPreviewLayout
#define SFX_OBJECTBAR_OBJECT
virtual void OuterResizePixel(const Point &rOfs, const Size &rSize) override
SwViewShell & GetParentViewShell()
static void lcl_InvalidateZoomSlots(SfxBindings &rBindings)
sal_uInt8 GetPagePrevRow() const
SAL_DLLPRIVATE void CalcAndSetBorderPixel(SvBorder &rToFill)
const Point & GetMousePosPixel() const
virtual void SetLimits(sal_uInt16 nMin, sal_uInt16 nMax)=0
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
void SetReturnValue(const SfxPoolItem &)
virtual ~SwPagePreviewWin() override
void Update(sal_uInt16 nId)
WinBits const WB_SIZEABLE
virtual SAL_DLLPRIVATE SfxPrinter * GetPrinter(bool bCreate=false) override
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
sal_uInt16 GetNumPages() const
const vcl::KeyCode & GetKeyCode() const
sal_uInt16 GetSlot() const
static const OUString & GetContextName(const Context eContext)
void ChgAllPageSize(Size const &rSz)
static SfxViewFrame * Current()
constexpr sal_uInt16 KEY_SUBTRACT
void DisableItem(sal_uInt16 nWhich)
#define FN_START_OF_DOCUMENT
weld::Window * GetFrameWeld() const
void SetViewShell(SwViewShell *pShell)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
SAL_DLLPRIVATE void Init()
constexpr tools::Long Height() const
void SetValueSet(SvxZoomEnableFlags nValues)
void SetPageBreak(bool b)
const SwViewOption * GetViewOptions() const
void CalcWish(sal_uInt8 nNewRow, sal_uInt8 nNewCol)
constexpr sal_uInt16 KEY_ESCAPE
vcl::Window * GetWin() const
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
constexpr OStringLiteral HID_PAGEPREVIEW
::OutputDevice const * GetOutDev() const
sal_uInt16 GetDefSttPage() const
IMPL_LINK(SwPagePreview, ScrollHdl, ScrollBar *, p, void)
#define VSHELLFLAG_ISPREVIEW
static VclPtr< reference_type > Create(Arg &&...arg)
SwTwips GetWinPagesScrollAmount(const sal_Int16 _nWinPagesToScroll) const
determine preview window page scroll amount
static sal_uInt16 lcl_GetNextZoomStep(sal_uInt16 nCurrentZoom, bool bZoomIn)
void GetState(SfxItemSet &)
sal_uInt16 GetZoom() const
const Point & GetPosPixel() const
void ViewResizePixel(const vcl::RenderContext &rRef, const Point &rOfst, const Size &rSize, const Size &rEditSz, SwScrollbar &rVScrollbar, SwScrollbar &rHScrollbar, vcl::Window &rScrollBarBox, SvxRuler *pVRuler=nullptr, SvxRuler *pHRuler=nullptr, bool bVRulerRight=false)
SwPagePreview(SfxViewFrame *pFrame, SfxViewShell *)
SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreview,"PrintPreview")
void SetWin(vcl::Window *win)
Size GetOutputSizePixel() const
void AdjustPreviewToNewZoom(const sal_uInt16 _nZoomFactor, const SvxZoomType _eZoomType)
Method to adjust preview to a new zoom factor paint of preview is prepared for a new zoom factor Zoom...
virtual SfxInterface * GetInterface() const
const std::u16string_view aStringList[]
tools::Long GetDelta() const
virtual bool KeyInput(const KeyEvent &rKeyEvent)
const MiscSettings & GetMiscSettings() const
void SetOutDevViewType(OutDevViewType eOutDevViewType)
static SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
void SetViewVRuler(bool b)
bool GetEnableATToolSupport() const
Point OutputToScreenPixel(const Point &rPos) const
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
virtual SAL_DLLPRIVATE bool HasPrintOptionsPage() const override
void SetGridVisible(bool b)
sal_uInt16 GetSttPage() const
#define FN_SHOW_TWO_PAGES
void StartAllAction()
For all views of this document.
void BroadcastContextForActivation(const bool bIsActivated)
const Wallpaper & GetBackground() const
SwRootFrame * GetLayout() const
void Init(const sal_uInt16 _nCols, const sal_uInt16 _nRows, const Size &_rPxWinSize)
init page preview layout
bool IsViewHScrollBar() const
bool DoesPreviewLayoutColsFitIntoWindow() const
void SetShowBookmarks(bool const b)
bool SetBookPreviewMode(const bool _bBookPreview)
Method to enable/disable book preview.
WinBits const WB_CLIPCHILDREN
sal_uInt8 GetPagePrevCol() const
void SetContextName(const OUString &rsContextName)
sal_uInt16 ConvertAbsoluteToRelativePageNum(sal_uInt16 _nAbsPageNum) const
Convert absolute to relative page numbers (see PrintEmptyPages)
tools::Rectangle maPaintedPreviewDocRect
virtual VclPtr< AbstractSvxZoomDialog > CreateSvxZoomDialog(weld::Window *pParent, const SfxItemSet &rCoreSet)=0
SwViewShell * GetViewShell() const
VclPtr< SwScrollbar > m_pVScrollbar
void EnableVScrollbar(bool bEnable)
bool m_bDetectedRangeSegmentation false
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)