1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SW_SOURCE_CORE_INC_NOTXTFRM_HXX
20 #define INCLUDED_SW_SOURCE_CORE_INC_NOTXTFRM_HXX
25 #include <svx/sdr/contact/viewcontact.hxx>
30 struct SwCursorMoveState
;
32 class SwNoTextFrame final
: public SwContentFrame
35 friend void FrameFinit();
36 const Size
& GetSize() const;
38 void Format ( vcl::RenderContext
* pRenderContext
, const SwBorderAttrs
*pAttrs
= nullptr ) override
;
39 void PaintPicture( vcl::RenderContext
*, const SwRect
& ) const;
41 virtual void DestroyImpl() override
;
42 virtual ~SwNoTextFrame() override
;
44 // RotateFlyFrame3 add TransformableSwFrame
45 std::unique_ptr
< TransformableSwFrame
> mpTransformableSwFrame
;
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;
56 std::unique_ptr
<sdr::contact::ViewContact
> mpViewContact
;
57 sdr::contact::ViewContact
& GetViewContact() const;
58 void OnGraphicArrived();
60 virtual void MakeAll(vcl::RenderContext
* pRenderContext
) override
;
61 virtual void SwClientNotify(const SwModify
&, const SfxHint
&) override
;
63 void ImplPaintPictureGraphic( vcl::RenderContext
* pOut
,
64 SwGrfNode
* pGrfNd
, bool bPrn
,
65 const SwRect
& rAlignedGrfArea
, SwViewShell
* pShell
, SwNoTextNode
& rNoTNd
) const;
66 void ImplPaintPictureBitmap( vcl::RenderContext
* pOut
,
67 SwOLENode
* pOLENd
, bool bIsChart
, bool bPrn
,
68 const SwRect
& rAlignedGrfArea
, SwViewShell
* pShell
) const;
69 void ImplPaintPictureAnimate(vcl::RenderContext
* pOut
, SwViewShell
* pShell
,
70 SwGrfNode
* pGrfNd
, const SwRect
& rAlignedGrfArea
) const;
71 void ImplPaintPictureReplacement(const GraphicObject
& rGrfObj
, SwGrfNode
* pGrfNd
,
72 const SwRect
& rAlignedGrfArea
, SwViewShell
* pShell
) const;
75 SwNoTextFrame( SwNoTextNode
* const, SwFrame
* );
77 const SwContentNode
*GetNode() const
78 { return static_cast<SwContentNode
const*>(GetDep()); }
79 SwContentNode
*GetNode()
80 { return static_cast<SwContentNode
*>(GetDep()); }
82 virtual bool LeftMargin(SwPaM
*) const override
;
83 virtual bool RightMargin(SwPaM
*, bool bAPI
= false) const override
;
85 virtual void PaintSwFrame( vcl::RenderContext
& rRenderContext
, SwRect
const&,
86 SwPrintData
const*const pPrintData
= nullptr ) const override
;
87 virtual bool GetCharRect( SwRect
&, const SwPosition
&,
88 SwCursorMoveState
* = nullptr, bool bAllowFarAway
= true ) const override
;
89 virtual bool GetModelPositionForViewPoint(SwPosition
* pPos
, Point
& aPoint
,
90 SwCursorMoveState
* = nullptr, bool bTestBackground
= false) const override
;
92 void GetGrfArea( SwRect
&rRect
, SwRect
* ) const;
94 bool IsTransparent() const;
96 void StopAnimation( const OutputDevice
* = nullptr ) const;
97 bool HasAnimation() const;
99 // RotateFlyFrame3 - Support for Transformations
100 bool isTransformableSwFrame() const { return bool(mpTransformableSwFrame
); }
101 TransformableSwFrame
* getTransformableSwFrame() { return mpTransformableSwFrame
.get(); }
102 const TransformableSwFrame
* getTransformableSwFrame() const { return mpTransformableSwFrame
.get(); }
104 // RotateFlyFrame3 - Support for Transformations
105 virtual basegfx::B2DHomMatrix
getFrameAreaTransformation() const override
;
106 virtual basegfx::B2DHomMatrix
getFramePrintAreaTransformation() const override
;
108 // RotateFlyFrame3 - Support for Transformations
109 virtual void transform_translate(const Point
& rOffset
) override
;
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */