/* -*- 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 .
*/ #ifndef INCLUDED_SW_SOURCE_CORE_INC_PAGEFRM_HXX #define INCLUDED_SW_SOURCE_CORE_INC_PAGEFRM_HXX
class SwFlyFrame; class SwFlyFrameFormat; class SwPageDesc; class SwContentFrame; struct SwPosition; class SwAttrSetChg; namespace vcl { class Font; } class SwSortedObjs; class SwAnchoredObject; namespace sw { class VirtPageNumHint;
}
/// A page of the document layout. Upper frame is expected to be an SwRootFrame /// instance. At least an SwBodyFrame lower is expected. class SW_DLLPUBLIC SwPageFrame final: public SwFootnoteBossFrame
{ friendclass SwFrame;
std::unique_ptr<SwSortedObjs> m_pSortedObjs;
SwPageDesc *m_pDesc; //PageDesc that describes the Page
/// Physical page number: index into list of SwRootFrame lowers
sal_uInt16 m_nPhyPageNum;
bool m_bInvalidContent :1; bool m_bInvalidLayout :1; bool m_bInvalidFlyContent :1; bool m_bInvalidFlyLayout :1; bool m_bInvalidFlyInCnt :1; bool m_bFootnotePage :1; // This Page is for document end footnotes bool m_bEmptyPage :1; // This Page is an explicitly empty page bool m_bEndNotePage :1; // 'Footnote page' for end notes bool m_bInvalidSpelling :1; // We need online spelling bool m_bInvalidSmartTags :1; // We need checking for smarttags bool m_bInvalidAutoCmplWrds :1; // Update auto complete word list bool m_bInvalidWordCount :1; bool m_bHasGrid :1; // Grid for Asian layout
/// Adapt the max. footnote height in each single column void SetColMaxFootnoteHeight();
/** determine rectangle for horizontal page shadow
#i9719#
@param _rPageRect input parameter - constant instance reference of the page rectangle. Generally, it's the frame area of the page, but for empty pages in print preview, this parameter is useful.
@param _pViewShell input parameter - instance of the view shell, for which the rectangle has to be generated.
@param _orBottomShadowRect output parameter - instance reference of the bottom shadow rectangle for the given page rectangle
*/
/// Make this public, so that the SwViewShell can access it when switching from browse mode /// Add/remove header/footer void PrepareHeader(); void PrepareFooter();
/// Always call after Paste /// Creates the page-bound frames and formats the generic content void PreparePage( bool bFootnote );
// Sends a Prepare() to all ContentFrames caused by a changed register template void PrepareRegisterChg();
// Appends a fly frame - the given one or a new one - at the page frame. // Needed for <Modify> and <MakeFrames> // - return value not needed any more // - second parameter is of type <SwFlyFrameFormat*> // - third parameter only needed for assertion, but calling method assures // this assertion. Thus, delete it. void PlaceFly( SwFlyFrame* pFly, SwFlyFrameFormat* pFormat );
determine the color, that is respectively will be drawn as background for the page frame.
@return reference to an instance of class Color
*/
Color GetDrawBackgroundColor() const;
/** paint margin area of a page
implement paint of margin area; margin area will be painted for a view shell with a window and if the document is not in online layout.
@param _rOutputRect input parameter - constant instance reference of the rectangle, for which an output has to be generated.
@param _pViewShell input parameter - instance of the view shell, on which the output has to be generated.
*/ void PaintMarginArea( const SwRect& _rOutputRect,
SwViewShell const * _pViewShell ) const;
/** paint page border and shadow
@param _rPageRect input parameter - constant instance reference of the page rectangle. Generally, it's the frame area of the page, but for empty pages in print preview, this parameter is useful.
@param _pViewShell input parameter - instance of the view shell, on which the output has to be generated.
@param bPaintRightShadow Should we paint shadow on the right or not (used in book mode)
@param bFullBottomShadow Should we have a bottom shadow of the same size as the pages or not (for right pages in book mode in a LTR environment).
@param bRightSidebar Is the note sidebar on the right or not (used to adjust the shadow with & position).
*/ staticvoid PaintBorderAndShadow( const SwRect& _rPageRect, const SwViewShell* _pViewShell, bool bPaintLeftShadow, bool bPaintRightShadow, bool bRightSidebar );
/** get bound rectangle of border and shadow for repaints
@param _rPageRect input parameter - constant instance reference of the page rectangle. Generally, it's the frame area of the page, but for empty pages in print preview, this parameter is useful.
@param _pViewShell input parameter - instance of the view shell, for which the rectangle has to be generated.
@param _orBorderAndShadowBoundRect output parameter - instance reference of the bounded border and shadow rectangle for the given page rectangle
*/ staticvoid GetBorderAndShadowBoundRect( const SwRect& _rPageRect, const SwViewShell* _pViewShell,
OutputDevice const * pRenderContext,
SwRect& _orBorderAndShadowBoundRect, constbool bLeftShadow, constbool bRightShadow, constbool bRightSidebar
);
staticvoid PaintNotesSidebar(const SwRect& _rPageRect, SwViewShell* _pViewShell, sal_uInt16 nPageNum, bool bRight); staticvoid PaintNotesSidebarArrows(const Point &rMiddleFirst, const Point &rMiddleSecond, SwViewShell const* _pViewShell, const Color& rColorUp, const Color& rColorDown); /** asks the page on which side a margin should be shown, e.g for notes returns true for left side, false for right side
*/
sw::sidebarwindows::SidebarPosition SidebarPosition() const;
// in case this is an empty page, this function returns the 'reference' page const SwPageFrame& GetFormatPage() const;
/// If in header or footer area, it also indicates the exact area in rControl. /// Header or footer must be active, otherwise returns false. bool IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rControl ) const;
// return font used to paint the "empty page" string staticconst vcl::Font& GetEmptyPageFont();
/// Is bottom-of-page-frame - bottom-of-text-frame difference valid in case whitespace is hidden? /// If false is returned, then the caller should handle negative difference as (at least) zero difference instead. bool CheckPageHeightValidForHideWhitespace(SwTwips nDiff);
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.