LibreOffice Module sw (master) 1
notxtfrm.hxx
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 http://mozilla.org/MPL/2.0/.
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 http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#ifndef INCLUDED_SW_SOURCE_CORE_INC_NOTXTFRM_HXX
20#define INCLUDED_SW_SOURCE_CORE_INC_NOTXTFRM_HXX
21
22#include "cntfrm.hxx"
23#include <node.hxx>
24// MM02
26
27class SwNoTextNode;
28class OutputDevice;
29class SwBorderAttrs;
31
32class SwNoTextFrame final : public SwContentFrame
33{
34private:
35 friend void FrameFinit();
36 const Size& GetSize() const;
37
38 void Format ( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
39 void PaintPicture( vcl::RenderContext*, const SwRect& ) const;
40
41 virtual void DestroyImpl() override;
42 virtual ~SwNoTextFrame() override;
43
44 // RotateFlyFrame3 add TransformableSwFrame
45 std::unique_ptr< TransformableSwFrame > mpTransformableSwFrame;
46
47 // RotateFlyFrame3 - Support for inner frame of a SwGrfNode.
48 // Only for local data extraction. To uniquely access information
49 // for local transformation, use getFrameArea(Print)Transformation.
50 friend double getLocalFrameRotation_from_SwNoTextFrame(const SwNoTextFrame& rNoTextFrame);
51 double getLocalFrameRotation() const;
52
53 void ClearCache();
54
55 // MM02
56 std::unique_ptr<sdr::contact::ViewContact> mpViewContact;
58 void OnGraphicArrived();
59
60 virtual void MakeAll(vcl::RenderContext* pRenderContext) override;
61 virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
62
63public:
65
66 const SwContentNode *GetNode() const
67 { return static_cast<SwContentNode const*>(GetDep()); }
69 { return static_cast<SwContentNode *>(GetDep()); }
70
71 virtual bool LeftMargin(SwPaM *) const override;
72 virtual bool RightMargin(SwPaM *, bool bAPI = false) const override;
73
74 virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&,
75 SwPrintData const*const pPrintData = nullptr ) const override;
76 virtual bool GetCharRect( SwRect &, const SwPosition&,
77 SwCursorMoveState* = nullptr, bool bAllowFarAway = true ) const override;
78 virtual bool GetModelPositionForViewPoint(SwPosition* pPos, Point& aPoint,
79 SwCursorMoveState* = nullptr, bool bTestBackground = false) const override;
80
81 void GetGrfArea( SwRect &rRect, SwRect * ) const;
82
83 bool IsTransparent() const;
84
85 void StopAnimation( const OutputDevice* = nullptr ) const;
86 bool HasAnimation() const;
87
88 // RotateFlyFrame3 - Support for Transformations
89 bool isTransformableSwFrame() const { return bool(mpTransformableSwFrame); }
92
93 // RotateFlyFrame3 - Support for Transformations
96
97 // RotateFlyFrame3 - Support for Transformations
98 virtual void transform_translate(const Point& rOffset) override;
99};
100
101#endif
102
103/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:58
Base class of the Writer layout elements.
Definition: frame.hxx:315
sw::BroadcastingModify * GetDep()
use these so we can grep for SwFrame's GetRegisteredIn accesses beware that SwTextFrame may return sw...
Definition: frame.hxx:476
SwContentNode * GetNode()
Definition: notxtfrm.hxx:68
friend double getLocalFrameRotation_from_SwNoTextFrame(const SwNoTextFrame &rNoTextFrame)
Definition: flylay.cxx:415
virtual void PaintSwFrame(vcl::RenderContext &rRenderContext, SwRect const &, SwPrintData const *const pPrintData=nullptr) const override
Definition: notxtfrm.cxx:214
virtual void DestroyImpl() override
Definition: notxtfrm.cxx:158
TransformableSwFrame * getTransformableSwFrame()
Definition: notxtfrm.hxx:90
bool HasAnimation() const
Definition: notxtfrm.cxx:1471
std::unique_ptr< TransformableSwFrame > mpTransformableSwFrame
Definition: notxtfrm.hxx:45
virtual void transform_translate(const Point &rOffset) override
Definition: notxtfrm.cxx:609
bool isTransformableSwFrame() const
Definition: notxtfrm.hxx:89
void GetGrfArea(SwRect &rRect, SwRect *) const
Calculate the Bitmap's position and the size within the passed rectangle.
Definition: notxtfrm.cxx:347
void OnGraphicArrived()
Definition: notxtfrm.cxx:718
std::unique_ptr< sdr::contact::ViewContact > mpViewContact
Definition: notxtfrm.hxx:56
const SwContentNode * GetNode() const
Definition: notxtfrm.hxx:66
virtual basegfx::B2DHomMatrix getFramePrintAreaTransformation() const override
Definition: notxtfrm.cxx:596
void StopAnimation(const OutputDevice *=nullptr) const
Definition: notxtfrm.cxx:1460
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
Definition: notxtfrm.cxx:733
const TransformableSwFrame * getTransformableSwFrame() const
Definition: notxtfrm.hxx:91
SwNoTextFrame(SwNoTextNode *const, SwFrame *)
Definition: notxtfrm.cxx:147
virtual bool RightMargin(SwPaM *, bool bAPI=false) const override
Definition: trvlfrm.cxx:626
const Size & GetSize() const
By returning the surrounding Fly's size which equals the graphic's size.
Definition: notxtfrm.cxx:469
virtual bool LeftMargin(SwPaM *) const override
Layout dependent cursor travelling.
Definition: trvlfrm.cxx:617
void PaintPicture(vcl::RenderContext *, const SwRect &) const
Paint the graphic.
Definition: notxtfrm.cxx:1103
sdr::contact::ViewContact & GetViewContact() const
Definition: notxtfrm.cxx:1085
virtual bool GetCharRect(SwRect &, const SwPosition &, SwCursorMoveState *=nullptr, bool bAllowFarAway=true) const override
Definition: notxtfrm.cxx:666
virtual void MakeAll(vcl::RenderContext *pRenderContext) override
Definition: notxtfrm.cxx:478
friend void FrameFinit()
Definition: newfrm.cxx:306
bool IsTransparent() const
Definition: notxtfrm.cxx:1414
void ClearCache()
Definition: notxtfrm.cxx:708
void Format(vcl::RenderContext *pRenderContext, const SwBorderAttrs *pAttrs=nullptr) override
Calculate the Bitmap's site, if needed.
Definition: notxtfrm.cxx:652
virtual basegfx::B2DHomMatrix getFrameAreaTransformation() const override
Definition: notxtfrm.cxx:584
virtual ~SwNoTextFrame() override
Definition: notxtfrm.cxx:165
double getLocalFrameRotation() const
Definition: notxtfrm.cxx:629
virtual bool GetModelPositionForViewPoint(SwPosition *pPos, Point &aPoint, SwCursorMoveState *=nullptr, bool bTestBackground=false) const override
Definition: notxtfrm.cxx:699
Layout frame for SwNoTextNode, i.e. graphics and OLE nodes (including charts).
Definition: ndnotxt.hxx:30
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:138
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
RotateFlyFrame3: Helper class when you want to make your SwFrame derivate transformable.
Definition: frame.hxx:236
Marks a position in the document model.
Definition: pam.hxx:37