30 #include <drawdoc.hxx>
34 #include <viewimp.hxx>
44 #include <osl/diagnose.h>
55 if (
auto pFEShell = dynamic_cast<SwFEShell*>(
m_pShell) )
56 pFEShell->HideChainMarker();
65 if (
auto pFEShell = dynamic_cast<SwFEShell*>(
m_pShell) )
66 pFEShell->SetChainMarker();
93 const Color* _pPageBackgrdColor,
94 const bool _bIsPageRightToLeft,
105 (!
GetShell()->IsPreview()||
SW_MOD()->GetAccessibilityOptions().GetIsForPagePreviews()))
107 pOutDev->
SetDrawMode( nOldDrawMode | DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill |
108 DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient );
115 Color aOldOutlinerBackgrdColor;
120 if ( (_nLayerID == rIDDMA.
GetHellId()) ||
123 OSL_ENSURE( _pPageBackgrdColor,
124 "incorrect usage of SwViewShellImp::PaintLayer: pPageBackgrdColor have to be set for painting layer <hell> or <heaven>");
125 if ( _pPageBackgrdColor )
127 aOldOutlinerBackgrdColor =
135 _bIsPageRightToLeft ? EEHorizontalTextDirection::R2L : EEHorizontalTextDirection::L2R;
139 pOutDev->
Push( PushFlags::LINECOLOR );
151 if ( (_nLayerID == rIDDMA.
GetHellId()) ||
162 #define FUZZY_EDGE 400
204 bool bCheckDrawObjs =
false;
205 if ( aDocRect != rOldWork )
208 bCheckDrawObjs =
true;
211 if ( !bCheckDrawObjs )
217 for(
size_t nObj = 0; nObj < nObjs; ++nObj )
220 if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) ==
nullptr )
229 auto pDrawContact =
dynamic_cast<const SwDrawContact*
>( pCont);
233 const SwFrame *pAnchor = pDrawContact->GetAnchorFrame();
246 if (!pPageFrame || pPageFrame->
IsInvalid() ) {
247 SAL_WARN(
"sw.core",
"Trying to move anchor from invalid page - fix layouting!" );
259 if ( !aDocRect.
IsInside( aObjBound ) )
262 if ( aObjBound.Left() > aDocRect.
Right() )
264 if ( aObjBound.Top() > aDocRect.
Bottom() )
272 if ( aObjBound.Right() < aDocRect.
Left() )
274 if ( aObjBound.Bottom() < aDocRect.
Top() )
SdrOutliner & GetDrawOutliner(const SdrTextObj *pObj=nullptr) const
vcl::RenderContext * GetOut() const
SwFrame * FindFooterOrHeader()
Base class of the Writer layout elements.
size_t GetMarkCount() const
virtual void SetSize(const Size &aSiz)
virtual const tools::Rectangle & GetCurrentBoundRect() const
SwRect & Union(const SwRect &rRect)
void setWidth(tools::Long nWidth)
static const AllSettings & GetSettings()
virtual SdrLayerID GetHeavenId() const =0
size_t GetObjCount() const
void NotifySizeChg(const Size &rNewSz)
SdrMark * GetMark(size_t nNum) const
bool CalcClipRect(const SdrObject *pSdrObj, SwRect &rRect, bool bMove=true)
calculate rectangle in that the object can be moved or rather be resized
Of course Writer needs its own rectangles.
bool isFrameAreaDefinitionValid() const
void AddTop(const tools::Long nAdd)
void SetDrawMode(DrawModeFlags nDrawMode)
constexpr tools::Long Width() const
const SwRect & getFrameArea() const
void PaintLayer(const SdrLayerID _nLayerID, SwPrintData const *const pPrintData, SwPageFrame const &rPageFrame, const SwRect &_rRect, const Color *_pPageBackgrdColor, const bool _bIsPageRightToLeft, sdr::contact::ViewObjectContactRedirector *pRedirector)
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
const SwViewShell * GetShell() const
Only for SwViewShell::Init()
bool m_bResetHdlHiddenPaint
void AddBottom(const tools::Long nAdd)
SwPageFrame * FindPageFrame()
const SdrMarkList & GetMarkedObjectList() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
SwLayoutFrame * GetUpper()
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
EEHorizontalTextDirection
virtual void Move(const Size &rSiz)
void AddRight(const tools::Long nAdd)
DrawModeFlags GetDrawMode() const
A page of the document layout.
virtual SdrLayerID GetHellId() const =0
void AddLeft(const tools::Long nAdd)
tools::Rectangle SVRect() const
SwDrawView * GetDrawView()
constexpr tools::Long Height() const
SdrPage * GetPage() const
bool IsInside(const Point &rPOINT) const
void SetWorkArea(const tools::Rectangle &rRect)
void DrawLayer(SdrLayerID nID, OutputDevice *pGivenTarget, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr, const tools::Rectangle &rRect=tools::Rectangle(), basegfx::B2IRectangle const *pPageFrame=nullptr)
bool areMarkHandlesHidden() const
bool HasDrawView() const
New Interface for StarView Drawing.
void setHideDraw(bool bNew)
void setHeight(tools::Long nHeight)
#define SAL_WARN(area, stream)
SwRootFrame * GetLayout() const
void Push(PushFlags nFlags=PushFlags::ALL)
SdrModel * GetModel() const
bool IsDragPossible(const Point &rPoint)
Is passed to the DrawEngine as a Link and decides what is painted or not and in what way...
const tools::Rectangle & GetWorkArea() const
SdrPageView * GetPageView()