20#include <config_wasm_strip.h>
30#include <svx/svxids.hrc>
54 : aUpdateIdle(
"svx GraphCtrl Update")
60 , mbInIdleUpdate(false)
79#if !ENABLE_WASM_STRIP_ACCESSIBILITY
124 pModel->GetItemPool().FreezeIdRanges();
126 pModel->SetDefaultFontHeight( 500 );
131 pPage->SetBorder( 0, 0, 0, 0 );
132 pModel->InsertPage( pPage.get() );
133 pModel->SetChanged(
false );
138 pView->EnableExtendedMouseEventDispatcher(
true );
139 pView->ShowSdrPage(
pView->GetModel().GetPage(0));
140 pView->SetFrameDragSingles();
142 pView->SetEditMode();
145 pView->SetPageDecorationAllowed(
false);
146 pView->SetMasterPageVisualizationAllowed(
false);
147 pView->SetBufferedOutputAllowed(
true);
148 pView->SetBufferedOverlayAllowed(
true);
150#if !ENABLE_WASM_STRIP_ACCESSIBILITY
160 xVD->SetOutputSizePixel(
Size(0, 0));
203 double fWinWH =
static_cast<double>(nWidth) / nHeight;
206 if ( fGrfWH < fWinWH)
217 aNewPos.
setX( ( nWidth - aNewSize.
Width() ) >> 1 );
218 aNewPos.
setY( ( nHeight - aNewSize.
Height() ) >> 1 );
226 xVD->SetMapMode( aDisplayMap );
258 pView->DoCompleteRedraw(*pPaintWindow, aRepaintRegion);
259 pView->EndCompleteRedraw(*pPaintWindow,
true);
299 pView->DeleteMarked();
309 if (
pView->IsAction() )
314 else if (
pView->AreObjectsMarked() )
316 pView->UnmarkAllObj();
330 bool bForward = !aCode.
IsShift();
332 if ( !
pView->MarkNextObj( bForward ))
336 pView->UnmarkAllObj();
337 pView->MarkNextObj (bForward);
345 bool bForward(!aCode.
IsShift());
347 const_cast<SdrHdlList&
>(rHdlList).TravelFocusHdl(bForward);
361 pView->UnmarkAllObj();
362 pView->MarkNextObj();
373 pView->UnmarkAllObj();
374 pView->MarkNextObj(
true);
420 nX *= aLogicSizeOnePixel.
Width();
421 nY *= aLogicSizeOnePixel.
Height();
442 aMarkRect.
Move(nX, nY);
446 if(aMarkRect.
Left() < rWorkArea.
Left())
448 nX += rWorkArea.
Left() - aMarkRect.
Left();
456 if(aMarkRect.
Top() < rWorkArea.
Top())
458 nY += rWorkArea.
Top() - aMarkRect.
Top();
469 if(0 != nX || 0 != nY)
485 pView->BegDragObj(aStartPoint,
nullptr, pHdl, 0);
487 if(
pView->IsDragObj())
489 bool bWasNoSnap = rDragStat.
IsNoSnap();
490 bool bWasSnapEnabled =
pView->IsSnapEnabled();
496 pView->SetSnapEnabled(
false);
498 pView->MovAction(aEndPoint);
503 const_cast<SdrDragStat&
>(rDragStat).SetNoSnap(bWasNoSnap);
505 pView->SetSnapEnabled(bWasSnapEnabled);
528 if(
pView->IsPointMarked(*pHdl))
532 pView->UnmarkPoint(*pHdl);
539 pView->UnmarkAllPoints();
542 pView->MarkPoint(*pHdl);
548 SdrHdl* pNewOne =
nullptr;
565 const_cast<SdrHdlList&
>(rHdlList).SetFocusHdl(pNewOne);
610 pView->MouseButtonDown( rMEvt, &rDevice );
613 pView->MouseButtonDown( rMEvt, &rDevice );
639 pView->MouseMove( rMEvt, &rDevice );
641 if( ( SID_BEZIER_INSERT ==
nPolyEdit ) &&
642 !
pView->PickHandle( aLogPos ) &&
643 !
pView->IsInsObjPoint() )
674 if (
pView->IsInsObjPoint() )
677 pView->MouseButtonUp( rMEvt, &rDevice );
750 mbInIdleUpdate =
true;
751 aUpdateLink.Call(
this );
752 mbInIdleUpdate =
false;
769 : OverlayManager(rDevice)
770 , m_rGraphCtrl(rGraphCtrl)
778 m_rGraphCtrl.Invalidate(aInvalidateRectangle);
790 return xOverlayManager;
822 for (sal_uInt32 nWinNum(0); nWinNum < nWindowCount; nWinNum++)
831 int x,
y, width, height;
839#if !ENABLE_WASM_STRIP_ACCESSIBILITY
const StyleSettings & GetStyleSettings() const
static OutputDevice * GetDefaultDevice()
static const AllSettings & GetSettings()
virtual void Changed(const SdrObject &rObj, SdrUserCallType eType, const tools::Rectangle &rOldBoundRect) override
virtual void InvalidateOneWin(OutputDevice &rWin) override
If the View should not call Invalidate() on the windows, override the following 2 methods and do some...
virtual rtl::Reference< sdr::overlay::OverlayManager > CreateOverlayManager(OutputDevice &rDevice) const override
virtual ~GraphCtrlView() override
SdrObject * GetSelectedSdrObject() const
ScopedVclPtrInstance< VirtualDevice > xVD
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
friend class GraphCtrlUserCall
std::unique_ptr< GraphCtrlUserCall > pUserCall
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
virtual void Resize() override
virtual bool KeyInput(const KeyEvent &rKEvt) override
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
void SetPolyEditMode(const sal_uInt16 nPolyEdit)
virtual ~GraphCtrl() override
std::unique_ptr< SdrView > pView
Point GetPositionInDialog() const
GraphCtrl(weld::Dialog *pDialog)
std::unique_ptr< SdrModel > pModel
void SetEditMode(const bool bEditMode)
virtual void MarkListHasChanged()
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
virtual void SdrObjChanged(const SdrObject &rObj)
Link< GraphCtrl *, void > aMousePosLink
void SetGraphic(const Graphic &rGraphic, bool bNewModel=true)
Link< GraphCtrl *, void > aGraphSizeLink
virtual bool MouseMove(const MouseEvent &rMEvt) override
void SetObjKind(const SdrObjKind eObjKind)
virtual void InitSdrModel()
rtl::Reference< SvxGraphCtrlAccessibleContext > mpAccContext
virtual void SdrObjCreated(const SdrObject &rObj)
friend class GraphCtrlView
GraphicType GetType() const
MapMode GetPrefMapMode() const
void Draw(OutputDevice &rOutDev, const Point &rDestPt) const
virtual void Start(bool bStartTimer=true) override
const vcl::KeyCode & GetKeyCode() const
void SetOrigin(const Point &rOrigin)
void SetScaleY(const Fraction &rScaleY)
MapUnit GetMapUnit() const
void SetScaleX(const Fraction &rScaleX)
sal_uInt16 GetClicks() const
const Point & GetPosPixel() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
const Wallpaper & GetBackground() const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
SAL_DLLPRIVATE void DrawOutDev(const Point &, const Size &, const Point &, const Size &, const Printer &)=delete
OutDevType GetOutDevType() const
void setX(tools::Long nX)
void setY(tools::Long nY)
size_t GetHdlCount() const
SdrHdl * GetFocusHdl() const
SdrHdl * GetHdl(size_t nNum) const
SdrHdlKind GetKind() const
sal_uInt32 GetPolyNum() const
const Point & GetPos() const
sal_uInt32 GetPointNum() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
SdrObject * GetMarkedSdrObj() const
SdrObjUserCall * GetUserCall() const
void SetUserCall(SdrObjUserCall *pUser)
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
SdrPaintWindow * GetPaintWindow(sal_uInt32 nIndex) const
virtual rtl::Reference< sdr::overlay::OverlayManager > CreateOverlayManager(OutputDevice &rDevice) const
virtual void InvalidateOneWin(OutputDevice &rWin)
If the View should not call Invalidate() on the windows, override the following 2 methods and do some...
sal_uInt32 PaintWindowCount() const
static void InitOverlayManager(rtl::Reference< sdr::overlay::OverlayManager > xOverlayManager)
OutputDevice & GetTargetOutputDevice()
void SetOutputToWindow(bool bOutputToWindow)
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetWindowColor() const
void SetPriority(TaskPriority ePriority)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
tools::Rectangle RangeToInvalidateRectangle(const basegfx::B2DRange &rRange) const
virtual void invalidateRange(const basegfx::B2DRange &rRange)
sal_uInt16 GetCode() const
virtual OutputDevice & get_ref_device()=0
IMPL_LINK_NOARG(GraphCtrl, UpdateHdl, Timer *, void)
constexpr sal_uInt16 KEY_ESCAPE
constexpr sal_uInt16 KEY_HOME
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DELETE
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SPACE
constexpr sal_uInt16 KEY_F11
constexpr sal_uInt16 KEY_BACKSPACE
constexpr sal_uInt16 KEY_END
#define LINK(Instance, Class, Member)