LibreOffice Module sw (master)  1
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at .
18  */
23 #include "layfrm.hxx"
25 class SwTableBox;
26 struct SwCursorMoveState;
27 class SwBorderAttrs;
30 class SwCellFrame final : public SwLayoutFrame
31 {
34  virtual void DestroyImpl() override;
35  virtual ~SwCellFrame() override;
37  virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
38  virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
39  virtual const SwCellFrame* DynCastCellFrame() const override { return this; }
41 public:
42  SwCellFrame( const SwTableBox &, SwFrame*, bool bInsertContent );
44  virtual bool GetModelPositionForViewPoint( SwPosition *, Point&, SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override;
45  virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&,
46  SwPrintData const*const pPrintData = nullptr ) const override;
47  virtual void CheckDirection( bool bVert ) override;
49  // #i103961#
50  virtual void Cut() override;
52  const SwTableBox *GetTabBox() const { return m_pTabBox; }
54  // used for breaking table rows:
55  SwCellFrame* GetFollowCell() const;
58  virtual bool IsLeaveUpperAllowed() const override;
59  virtual bool IsCoveredCell() const override;
61  // used for rowspan stuff:
62  const SwCellFrame& FindStartEndOfRowSpanCell( bool bStart ) const;
66  const SwCellFrame* GetCoveredCellInRow(const SwRowFrame& rRow) const;
69  std::vector<const SwCellFrame*> GetCoveredCells() const;
71  void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override;
72 };
74 #endif
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:315
std::vector< const SwCellFrame * > GetCoveredCells() const
If this is a vertically merged cell, then looks up its covered cells.
Definition: tabfrm.cxx:5655
Marks a position in the document model.
Definition: pam.hxx:36
long Long
virtual void CheckDirection(bool bVert) override
Definition: wsfrm.cxx:450
const SwCellFrame & FindStartEndOfRowSpanCell(bool bStart) const
Definition: findfrm.cxx:1716
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
virtual void Format(vcl::RenderContext *pRenderContext, const SwBorderAttrs *pAttrs=nullptr) override
"Formats" the Frame; Frame and PrtArea.
Definition: tabfrm.cxx:5193
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
Definition: tabfrm.cxx:5481
SwCellFrame(const SwTableBox &, SwFrame *, bool bInsertContent)
Definition: tabfrm.cxx:4907
const SwTableBox * GetTabBox() const
Definition: cellfrm.hxx:52
SwCellFrame * GetPreviousCell() const
Definition: findfrm.cxx:1675
virtual void Cut() override
Definition: tabfrm.cxx:5711
virtual bool IsLeaveUpperAllowed() const override
Definition: tabfrm.cxx:6092
virtual void DestroyImpl() override
Definition: tabfrm.cxx:4936
const SwCellFrame * GetCoveredCellInRow(const SwRowFrame &rRow) const
If this is a vertically merged cell, then looks up its covered cell in rRow.
Definition: tabfrm.cxx:5616
tools::Long GetLayoutRowSpan() const
Definition: tabfrm.cxx:5601
void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override
Definition: tabfrm.cxx:5700
virtual bool IsCoveredCell() const override
Definition: tabfrm.cxx:6102
virtual ~SwCellFrame() override
Definition: tabfrm.cxx:4960
SwCellFrame * GetFollowCell() const
Definition: findfrm.cxx:1625
virtual void PaintSwFrame(vcl::RenderContext &rRenderContext, SwRect const &, SwPrintData const *const pPrintData=nullptr) const override
Definition: paintfrm.cxx:4004
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:419
struct _xmlTextWriter * xmlTextWriterPtr
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame...
Definition: layfrm.hxx:35
const SwTableBox * m_pTabBox
Definition: cellfrm.hxx:32
virtual const SwCellFrame * DynCastCellFrame() const override
Definition: cellfrm.hxx:39
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const override
If this is about a Content-carrying cell the Cursor will be force inserted into one of the ContentFra...
Definition: trvlfrm.cxx:472
SwCellFrame is one table cell in the document layout.
Definition: cellfrm.hxx:30
SwRowFrame is one table row in the document layout.
Definition: rowfrm.hxx:28