/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ #pragma once
class SwDocShell; class SwScrollbar; class SwViewShell; class SwPagePreview; class SwRect; class CommandEvent; class SwPagePreviewLayout;
/// Provides the VCL widget that is used for the main area of the File -> Print Preview window. class SAL_DLLPUBLIC_RTTI SwPagePreviewWin final : public vcl::Window
{
SwViewShell* mpViewShell;
sal_uInt16 mnSttPage;
sal_Int16 mnRow;
sal_Int16 mnCol;
Size maPxWinSize;
Fraction maScale;
SwPagePreview& mrView; bool mbCalcScaleForPreviewLayout;
tools::Rectangle maPaintedPreviewDocRect;
SwPagePreviewLayout* mpPgPreviewLayout;
@return selected page number
*/
sal_uInt16 SelectedPage() const;
/** set selected page number in document preview
@param _nSelectedPageNum input parameter - physical page number of page that will be the selected one.
*/ void SetSelectedPage( sal_uInt16 _nSelectedPageNum );
// If we only have one column we do not have a oth page
sal_uInt16 GetDefSttPage() const { return 1 == mnCol ? 1 : 0; }
// Create the status bar's string
OUString GetStatusStr( sal_uInt16 nPageCount ) const;
void RepaintCoreRect( const SwRect& rRect );
/** Method to adjust preview to a new zoom factor paint of preview is prepared for a new zoom factor Zoom type has also been considered. Thus, add new parameter <_eZoomType>
*/ void AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor, const SvxZoomType _eZoomType );
/** Method to enable/disable book preview @param _bBookPreview input parameter - boolean indicating, if book preview mode has to switch on <true> or of <false>
@return boolean indicating, if book preview mode has changed.
*/ bool SetBookPreviewMode( constbool _bBookPreview );
/** * View of a document
*/ class SW_DLLPUBLIC SwPagePreview final : public SfxViewShell
{ // ViewWindow and handle to core // current dispatcher shell
VclPtr<SwPagePreviewWin> m_pViewWin; //viewdata of the previous SwView and the new cursor position
OUString m_sSwViewData; //and the new cursor position if the user double click in the PagePreview
OUString m_sNewCursorPosition; // to support keyboard the number of the page to go to can be set too
sal_uInt16 m_nNewPage; // visible range
OUString m_sPageStr;
Size m_aDocSize;
tools::Rectangle m_aVisArea;
// MDI control elements
VclPtr<SwScrollbar> m_pHScrollbar;
VclPtr<SwScrollbar> m_pVScrollbar; bool mbHScrollbarEnabled : 1; bool mbVScrollbarEnabled : 1;
sal_uInt16 mnPageCount; bool m_bNormalPrint;
// New members to reset design mode at draw view for form shell on switching // back from writer page preview to normal view. bool mbResetFormDesignMode:1; bool mbFormDesignModeToReset:1;
SAL_DLLPRIVATE void Init();
SAL_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
// Inline method to request values of new members // <mbResetFormDesignMode> and <mbFormDesignModeToReset> bool ResetFormDesignMode() const
{ return mbResetFormDesignMode;
}
Currently used, if the complete preview layout rows fit into to the given window, if a new page is selected and this page is visible.
@param _nNewThumbPos input parameter - new position, which will be assigned to the vertical scrollbar.
*/ void SetVScrollbarThumbPos( const sal_uInt16 _nNewThumbPos );
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.