/* -*- 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_SECTFRM_HXX #define INCLUDED_SW_SOURCE_CORE_INC_SECTFRM_HXX
#include"layfrm.hxx" #include"flowfrm.hxx"
#include <svl/listener.hxx>
class SwSection; class SwSectionFormat; class SwAttrSetChg; class SwFootnoteContFrame; class SwLayouter;
class SAL_DLLPUBLIC_RTTI SwSectionFrame final: public SwLayoutFrame, public SwFlowFrame
, public SvtListener // TODO?
{
SwSection* m_pSection; bool m_bFootnoteAtEnd; // footnotes at the end of section bool m_bEndnAtEnd; // endnotes at the end of section /// If this is a section for endnotes, then the SwSection is not backed by an SwSectionNode. bool m_bEndNoteSection = false; bool m_bContentLock; // content locked bool m_bOwnFootnoteNum; // special numbering of footnotes bool m_bFootnoteLock; // ftn, don't leave this section bwd
void UpdateAttr_( const SfxPoolItem*, const SfxPoolItem*, SwSectionFrameInvFlags &,
SwAttrSetChg *pa = nullptr, SwAttrSetChg *pb = nullptr ); void UpdateAttrForFormatChange( SwSectionFrameInvFlags & ); void Cut_( bool bRemove ); // Is there a FootnoteContainer? // An empty sectionfrm without FootnoteCont is superfluous bool IsSuperfluous() const { return !ContainsAny() && !ContainsFootnoteCont(); } void CalcFootnoteAtEndFlag(); void CalcEndAtEndFlag(); const SwSectionFormat* GetEndSectFormat_() const; bool IsEndnoteAtMyEnd() const;
/** * Splits the SectionFrame surrounding the pFrame up in two parts: * pFrame and the start of the 2nd part
*/
SwSectionFrame* SplitSect( SwFrame* pFrameStartAfter, SwFrame* pFramePutAfter ); void DelEmpty( bool bRemove ); // Like Cut(), except for that Follow chaining is maintained
SwFootnoteContFrame* ContainsFootnoteCont( const SwFootnoteContFrame* pCont = nullptr ) const; bool Growable() const;
SwTwips Shrink_( SwTwips, bool bTst );
SwTwips Grow_(SwTwips, SwResizeLimitReason&, bool bTst);
/** * A sectionfrm has to maximize, if he has a follow or a ftncontainer at * the end of the page. A superfluous follow will be ignored, * if bCheckFollow is set.
*/ bool ToMaximize( bool bCheckFollow ) const; bool ToMaximize_() const { if( !m_pSection ) returnfalse; return ToMaximize( false );
} bool MoveAllowed( const SwFrame* ) const; bool CalcMinDiff( SwTwips& rMinDiff ) const;
/** * Returns the size delta that the section would like to be * greater if it has undersized TextFrames in it. * * The return value is > 0 for undersized Frames, or 0 otherwise. * * If necessary the undersized-flag is corrected. * We need this in the FormatWidthCols to "deflate" columns there.
*/
SwTwips Undersize();
SwTwips CalcUndersize() const;
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.