include/svx/sdr/view/DropMarkerOverlay.hxx | 42 ++++++++++++ include/svx/sdr/view/Enums.hxx | 66 ++++++++++++++++++++ include/svx/sdr/view/ViewChangeHint.hxx | 30 +++++++++ include/svx/sdr/view/ViewEvent.hxx | 82 +++++++++++++++++++++++++ include/svx/svdpntv.hxx | 29 +------- include/svx/svdview.hxx | 95 ----------------------------- sc/source/ui/inc/drawview.hxx | 1 sd/source/ui/inc/View.hxx | 1 svx/Library_svxcore.mk | 1 svx/source/svdraw/svdpntv.cxx | 6 - svx/source/svdraw/svdview.cxx | 93 ---------------------------- svx/source/view/DropMarkerOverlay.cxx | 84 +++++++++++++++++++++++++ sw/source/core/frmedt/feshview.cxx | 1 sw/source/core/frmedt/fews.cxx | 1 sw/source/uibase/docvw/edtdd.cxx | 1 sw/source/uibase/docvw/edtwin.cxx | 1 16 files changed, 321 insertions(+), 213 deletions(-)
New commits: commit 35279245d0db3523e7662004bba7330eb70eb5db Author: Tomaž Vajngerl <[email protected]> AuthorDate: Tue Jun 28 22:27:37 2022 +0200 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Tue Jun 28 22:27:37 2022 +0200 svx: move SdrDropMarkerOverlay into it's own file Change-Id: Ia09dcba2b7b469912f4f3b72a3cc60ded05a03ca diff --git a/include/svx/sdr/view/DropMarkerOverlay.hxx b/include/svx/sdr/view/DropMarkerOverlay.hxx new file mode 100644 index 000000000000..03f1419c7413 --- /dev/null +++ b/include/svx/sdr/view/DropMarkerOverlay.hxx @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <svx/svxdllapi.h> +#include <basegfx/polygon/b2dpolypolygon.hxx> +#include <svx/svdview.hxx> +#include <svx/sdr/overlay/overlaymanager.hxx> + +// helper class for all D&D overlays +class SVXCORE_DLLPUBLIC SdrDropMarkerOverlay +{ + // The OverlayObjects + sdr::overlay::OverlayObjectList maObjects; + + void ImplCreateOverlays(const SdrView& rView, const basegfx::B2DPolyPolygon& rLinePolyPolygon); + +public: + SdrDropMarkerOverlay(const SdrView& rView, const SdrObject& rObject); + SdrDropMarkerOverlay(const SdrView& rView, const tools::Rectangle& rRectangle); + SdrDropMarkerOverlay(const SdrView& rView, const Point& rStart, const Point& rEnd); + ~SdrDropMarkerOverlay(); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx index 03afde95b00e..1e2627dc8807 100644 --- a/include/svx/svdview.hxx +++ b/include/svx/svdview.hxx @@ -52,24 +52,6 @@ namespace sdr::contact { class ObjectContact; } -// helper class for all D&D overlays -class SVXCORE_DLLPUBLIC SdrDropMarkerOverlay -{ - // The OverlayObjects - sdr::overlay::OverlayObjectList maObjects; - - void ImplCreateOverlays( - const SdrView& rView, - const basegfx::B2DPolyPolygon& rLinePolyPolygon); - -public: - SdrDropMarkerOverlay(const SdrView& rView, const SdrObject& rObject); - SdrDropMarkerOverlay(const SdrView& rView, const tools::Rectangle& rRectangle); - SdrDropMarkerOverlay(const SdrView& rView, const Point& rStart, const Point& rEnd); - ~SdrDropMarkerOverlay(); -}; - - class SVXCORE_DLLPUBLIC SdrView : public SdrCreateView, public tools::WeakBase { friend class SdrPageView; diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx index 816a3428aacf..669f12969ba6 100644 --- a/sc/source/ui/inc/drawview.hxx +++ b/sc/source/ui/inc/drawview.hxx @@ -22,6 +22,7 @@ #include <svx/fmview.hxx> #include <global.hxx> +#include <svx/sdr/view/DropMarkerOverlay.hxx> namespace com::sun::star::datatransfer { class XTransferable; } diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx index 4e530e3f9227..d26c5b261c38 100644 --- a/sd/source/ui/inc/View.hxx +++ b/sd/source/ui/inc/View.hxx @@ -26,6 +26,7 @@ #include <svx/fmview.hxx> #include <svx/svdpage.hxx> #include <vcl/idle.hxx> +#include <svx/sdr/view/DropMarkerOverlay.hxx> #include "smarttag.hxx" #include "fusearch.hxx" diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk index 5cacdf82ebcc..440ef4dc69aa 100644 --- a/svx/Library_svxcore.mk +++ b/svx/Library_svxcore.mk @@ -463,6 +463,7 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\ svx/source/unodraw/unoshtxt \ svx/source/unodraw/unottabl \ svx/source/unodraw/XPropertyTable \ + svx/source/view/DropMarkerOverlay \ svx/source/xml/xmleohlp \ svx/source/xml/xmlexport \ svx/source/xml/xmlgrhlp \ diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 7dc8ae174fc5..48850c6974c2 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -38,8 +38,6 @@ #include <svx/svddrgmt.hxx> #include <svx/svdotable.hxx> #include <tools/debug.hxx> -#include <svx/sdr/overlay/overlaypolypolygon.hxx> -#include <svx/sdr/overlay/overlaymanager.hxx> #include <svx/sdrpaintwindow.hxx> #include <svx/sdrpagewindow.hxx> #include <svx/sdrhittesthelper.hxx> @@ -51,70 +49,7 @@ #include <vcl/ptrstyle.hxx> #include <vcl/window.hxx> #include <comphelper/lok.hxx> - -// helper class for all D&D overlays - -void SdrDropMarkerOverlay::ImplCreateOverlays( - const SdrView& rView, - const basegfx::B2DPolyPolygon& rLinePolyPolygon) -{ - for(sal_uInt32 a(0); a < rView.PaintWindowCount(); a++) - { - SdrPaintWindow* pCandidate = rView.GetPaintWindow(a); - const rtl::Reference< sdr::overlay::OverlayManager >& xTargetOverlay = pCandidate->GetOverlayManager(); - - if (xTargetOverlay.is()) - { - std::unique_ptr<sdr::overlay::OverlayPolyPolygonStripedAndFilled> pNew(new sdr::overlay::OverlayPolyPolygonStripedAndFilled( - rLinePolyPolygon)); - - xTargetOverlay->add(*pNew); - maObjects.append(std::move(pNew)); - } - } -} - -SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const SdrObject& rObject) -{ - ImplCreateOverlays( - rView, - rObject.TakeXorPoly()); -} - -SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const tools::Rectangle& rRectangle) -{ - basegfx::B2DPolygon aB2DPolygon; - - aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Left(), rRectangle.Top())); - aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Right(), rRectangle.Top())); - aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Right(), rRectangle.Bottom())); - aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Left(), rRectangle.Bottom())); - aB2DPolygon.setClosed(true); - - ImplCreateOverlays( - rView, - basegfx::B2DPolyPolygon(aB2DPolygon)); -} - -SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const Point& rStart, const Point& rEnd) -{ - basegfx::B2DPolygon aB2DPolygon; - - aB2DPolygon.append(basegfx::B2DPoint(rStart.X(), rStart.Y())); - aB2DPolygon.append(basegfx::B2DPoint(rEnd.X(), rEnd.Y())); - aB2DPolygon.setClosed(true); - - ImplCreateOverlays( - rView, - basegfx::B2DPolyPolygon(aB2DPolygon)); -} - -SdrDropMarkerOverlay::~SdrDropMarkerOverlay() -{ - // The OverlayObjects are cleared using the destructor of OverlayObjectList. - // That destructor calls clear() at the list which removes all objects from the - // OverlayManager and deletes them. -} +#include <svx/sdr/view/DropMarkerOverlay.hxx> SdrView::SdrView( SdrModel& rSdrModel, diff --git a/svx/source/view/DropMarkerOverlay.cxx b/svx/source/view/DropMarkerOverlay.cxx new file mode 100644 index 000000000000..3b0c7ee873b9 --- /dev/null +++ b/svx/source/view/DropMarkerOverlay.cxx @@ -0,0 +1,84 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include <svx/sdr/view/DropMarkerOverlay.hxx> +#include <svx/svdobj.hxx> +#include <svx/sdr/overlay/overlaypolypolygon.hxx> +#include <svx/sdrpaintwindow.hxx> + +// helper class for all D&D overlays + +void SdrDropMarkerOverlay::ImplCreateOverlays(const SdrView& rView, + const basegfx::B2DPolyPolygon& rLinePolyPolygon) +{ + for (sal_uInt32 a(0); a < rView.PaintWindowCount(); a++) + { + SdrPaintWindow* pCandidate = rView.GetPaintWindow(a); + const rtl::Reference<sdr::overlay::OverlayManager>& xTargetOverlay + = pCandidate->GetOverlayManager(); + + if (xTargetOverlay.is()) + { + std::unique_ptr<sdr::overlay::OverlayPolyPolygonStripedAndFilled> pNew( + new sdr::overlay::OverlayPolyPolygonStripedAndFilled(rLinePolyPolygon)); + + xTargetOverlay->add(*pNew); + maObjects.append(std::move(pNew)); + } + } +} + +SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const SdrObject& rObject) +{ + ImplCreateOverlays(rView, rObject.TakeXorPoly()); +} + +SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const tools::Rectangle& rRectangle) +{ + basegfx::B2DPolygon aB2DPolygon; + + aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Left(), rRectangle.Top())); + aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Right(), rRectangle.Top())); + aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Right(), rRectangle.Bottom())); + aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Left(), rRectangle.Bottom())); + aB2DPolygon.setClosed(true); + + ImplCreateOverlays(rView, basegfx::B2DPolyPolygon(aB2DPolygon)); +} + +SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const Point& rStart, + const Point& rEnd) +{ + basegfx::B2DPolygon aB2DPolygon; + + aB2DPolygon.append(basegfx::B2DPoint(rStart.X(), rStart.Y())); + aB2DPolygon.append(basegfx::B2DPoint(rEnd.X(), rEnd.Y())); + aB2DPolygon.setClosed(true); + + ImplCreateOverlays(rView, basegfx::B2DPolyPolygon(aB2DPolygon)); +} + +SdrDropMarkerOverlay::~SdrDropMarkerOverlay() +{ + // The OverlayObjects are cleared using the destructor of OverlayObjectList. + // That destructor calls clear() at the list which removes all objects from the + // OverlayManager and deletes them. +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 464cd46412b6..8d026bf173eb 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -43,6 +43,7 @@ #include <svx/svdpage.hxx> #include <svx/svdpagv.hxx> #include <svx/dialmgr.hxx> +#include <svx/sdr/view/DropMarkerOverlay.hxx> #include <tools/globname.hxx> #include <sot/exchange.hxx> #include <IDocumentDrawModelAccess.hxx> diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 0e9a0a2ca18e..130b4b0b0291 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -18,6 +18,7 @@ */ #include <svx/svdobj.hxx> +#include <svx/sdr/view/DropMarkerOverlay.hxx> #include <osl/diagnose.h> #include <comphelper/lok.hxx> #include <init.hxx> diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index 8f86aa1d310a..d697a65334b6 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -18,6 +18,7 @@ */ #include <svx/svdview.hxx> +#include <svx/sdr/view/DropMarkerOverlay.hxx> #include <editeng/outliner.hxx> #include <svx/svdobj.hxx> #include <sot/exchange.hxx> diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index a0effc7db82a..5f9a17110c58 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -58,6 +58,7 @@ #include <svx/svdview.hxx> #include <svx/svdhdl.hxx> #include <svx/svdoutl.hxx> +#include <svx/sdr/view/DropMarkerOverlay.hxx> #include <editeng/editeng.hxx> #include <editeng/editview.hxx> #include <editeng/svxacorr.hxx> commit 82d711a7a4d8ace695159177953269ed75f3c58c Author: Tomaž Vajngerl <[email protected]> AuthorDate: Tue Jun 28 21:34:57 2022 +0200 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Tue Jun 28 21:34:57 2022 +0200 svx: extract SdrViewEvent into own header file Change-Id: Id1b1a8adef4ae779b5fb456dcb46783e0cbb9d08 diff --git a/include/svx/sdr/view/ViewEvent.hxx b/include/svx/sdr/view/ViewEvent.hxx new file mode 100644 index 000000000000..dbc408a8d639 --- /dev/null +++ b/include/svx/sdr/view/ViewEvent.hxx @@ -0,0 +1,82 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <svx/sdr/view/Enums.hxx> +#include <vcl/event.hxx> +#include <svx/svdmrkv.hxx> + +class SvxURLField; + +// helper class SdrViewEvent +struct SVXCORE_DLLPUBLIC SdrViewEvent +{ + SdrHdl* mpHdl; + SdrObject* mpObj; + SdrObject* mpRootObj; // mark this when SdrBeginTextEdit is executed + SdrPageView* mpPV; + const SvxURLField* mpURLField; + + Point maLogicPos; + SdrHitKind meHit; + SdrEventKind meEvent; + + sal_uInt16 mnMouseClicks; + MouseEventModifiers mnMouseMode; + sal_uInt16 mnMouseCode; + sal_uInt16 mnHlplIdx; + sal_uInt16 mnGlueId; + + bool mbMouseDown : 1; + bool mbMouseUp : 1; + bool mbIsAction : 1; // Action is active + bool mbIsTextEdit : 1; // TextEdit runs currently + bool mbAddMark : 1; + bool mbUnmark : 1; + bool mbPrevNextMark : 1; + bool mbMarkPrev : 1; + +public: + SdrViewEvent() + : mpHdl(nullptr) + , mpObj(nullptr) + , mpRootObj(nullptr) + , mpPV(nullptr) + , mpURLField(nullptr) + , meHit(SdrHitKind::NONE) + , meEvent(SdrEventKind::NONE) + , mnMouseClicks(0) + , mnMouseMode(MouseEventModifiers::NONE) + , mnMouseCode(0) + , mnHlplIdx(0) + , mnGlueId(0) + , mbMouseDown(false) + , mbMouseUp(false) + , mbIsAction(false) + , mbIsTextEdit(false) + , mbAddMark(false) + , mbUnmark(false) + , mbPrevNextMark(false) + , mbMarkPrev(false) + { + } +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx index ae555aaab03d..03afde95b00e 100644 --- a/include/svx/svdview.hxx +++ b/include/svx/svdview.hxx @@ -26,6 +26,7 @@ #include <svtools/accessibilityoptions.hxx> #include <svx/svxdllapi.h> #include <svx/sdr/view/Enums.hxx> +#include <svx/sdr/view/ViewEvent.hxx> #include <svx/svdcrtv.hxx> #include <vcl/event.hxx> #include <unotools/options.hxx> @@ -49,41 +50,8 @@ // SdrCreateView CrtV Action // SdrView View -class SvxURLField; namespace sdr::contact { class ObjectContact; } -// helper class SdrViewEvent -struct SVXCORE_DLLPUBLIC SdrViewEvent -{ - SdrHdl* mpHdl; - SdrObject* mpObj; - SdrObject* mpRootObj; // mark this when SdrBeginTextEdit is executed - SdrPageView* mpPV; - const SvxURLField* mpURLField; - - Point maLogicPos; - SdrHitKind meHit; - SdrEventKind meEvent; - - sal_uInt16 mnMouseClicks; - MouseEventModifiers mnMouseMode; - sal_uInt16 mnMouseCode; - sal_uInt16 mnHlplIdx; - sal_uInt16 mnGlueId; - - bool mbMouseDown : 1; - bool mbMouseUp : 1; - bool mbIsAction : 1; // Action is active - bool mbIsTextEdit : 1; // TextEdit runs currently - bool mbAddMark : 1; - bool mbUnmark : 1; - bool mbPrevNextMark : 1; - bool mbMarkPrev : 1; - -public: - SdrViewEvent(); -}; - // helper class for all D&D overlays class SVXCORE_DLLPUBLIC SdrDropMarkerOverlay { diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 6179451b9596..7dc8ae174fc5 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -46,36 +46,12 @@ #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> #include <drawinglayer/primitive2d/texthierarchyprimitive2d.hxx> #include <svx/sdr/contact/objectcontactofpageview.hxx> +#include <svx/sdr/view/ViewEvent.hxx> #include <sal/log.hxx> #include <vcl/ptrstyle.hxx> #include <vcl/window.hxx> #include <comphelper/lok.hxx> - -SdrViewEvent::SdrViewEvent() - : mpHdl(nullptr), - mpObj(nullptr), - mpRootObj(nullptr), - mpPV(nullptr), - mpURLField(nullptr), - meHit(SdrHitKind::NONE), - meEvent(SdrEventKind::NONE), - mnMouseClicks(0), - mnMouseMode(MouseEventModifiers::NONE), - mnMouseCode(0), - mnHlplIdx(0), - mnGlueId(0), - mbMouseDown(false), - mbMouseUp(false), - mbIsAction(false), - mbIsTextEdit(false), - mbAddMark(false), - mbUnmark(false), - mbPrevNextMark(false), - mbMarkPrev(false) -{ -} - // helper class for all D&D overlays void SdrDropMarkerOverlay::ImplCreateOverlays( commit 40507f2192b742d9031896975130199a68d48bcc Author: Tomaž Vajngerl <[email protected]> AuthorDate: Tue Jun 28 20:32:15 2022 +0200 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Tue Jun 28 20:32:15 2022 +0200 svx: extract common view enums into Enum.hxx Change-Id: Ic365a45de77aee5659a5869777b27cb8faa53f6d diff --git a/include/svx/sdr/view/Enums.hxx b/include/svx/sdr/view/Enums.hxx new file mode 100644 index 000000000000..778e7176d5ae --- /dev/null +++ b/include/svx/sdr/view/Enums.hxx @@ -0,0 +1,66 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +enum class SdrViewContext +{ + Standard, + PointEdit, + GluePointEdit, + Graphic, + Media, + Table +}; + +enum class SdrEventKind +{ + NONE, + TextEdit, + MoveAction, + EndAction, + BackAction, + EndCreate, + EndDrag, + MarkObj, + MarkPoint, + MarkGluePoint, + BeginMark, + BeginInsertObjPoint, + EndInsertObjPoint, + BeginInsertGluePoint, + BeginDragHelpline, + BeginDragObj, + BeginCreateObj, + BeginMacroObj, + BeginTextEdit, + EndMark, + BrkMark, + ExecuteUrl +}; + +/* for PickAnything() */ +enum class SdrMouseEventKind +{ + BUTTONDOWN = 1, + MOVE = 2, + BUTTONUP = 3, +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx index 166990985830..ae555aaab03d 100644 --- a/include/svx/svdview.hxx +++ b/include/svx/svdview.hxx @@ -25,6 +25,7 @@ #include <tools/weakbase.h> #include <svtools/accessibilityoptions.hxx> #include <svx/svxdllapi.h> +#include <svx/sdr/view/Enums.hxx> #include <svx/svdcrtv.hxx> #include <vcl/event.hxx> #include <unotools/options.hxx> @@ -51,48 +52,6 @@ class SvxURLField; namespace sdr::contact { class ObjectContact; } -enum class SdrViewContext { - Standard, - PointEdit, - GluePointEdit, - Graphic, - Media, - Table -}; - -enum class SdrEventKind { - NONE, - TextEdit, - MoveAction, - EndAction, - BackAction, - EndCreate, - EndDrag, - MarkObj, - MarkPoint, - MarkGluePoint, - BeginMark, - BeginInsertObjPoint, - EndInsertObjPoint, - BeginInsertGluePoint, - BeginDragHelpline, - BeginDragObj, - BeginCreateObj, - BeginMacroObj, - BeginTextEdit, - EndMark, - BrkMark, - ExecuteUrl -}; - -/* for PickAnything() */ -enum class SdrMouseEventKind -{ - BUTTONDOWN = 1, - MOVE = 2, - BUTTONUP = 3, -}; - // helper class SdrViewEvent struct SVXCORE_DLLPUBLIC SdrViewEvent { commit 710de4dc137112f88df6f979a26267a5e2958c64 Author: Tomaž Vajngerl <[email protected]> AuthorDate: Tue Jun 28 17:06:19 2022 +0200 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Tue Jun 28 17:15:19 2022 +0200 svx: rearrange forward imports Change-Id: I03360d17019bdc2959dbe80f128839d068312670 diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index dc36e3a4f66a..c82f58ca998e 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -38,9 +38,7 @@ // Pre defines class SdrPageWindow; -namespace com::sun::star::awt { - class XControlContainer; -} +namespace com::sun::star::awt { class XControlContainer; } namespace sdr::overlay { class OverlayManager; } class SdrPage; @@ -51,10 +49,10 @@ class SdrOle2Obj; class SdrModel; class SdrObject; enum class GraphicManagerDrawFlags; - -namespace sdr::contact { - class ViewObjectContactRedirector; -} +class SdrPaintView; +namespace sdr::contact { class ViewObjectContactRedirector; } +namespace vcl { class Window; } +class SdrPaintWindow; // Defines for AnimationMode enum class SdrAnimationMode @@ -63,15 +61,6 @@ enum class SdrAnimationMode Disable }; -class SdrPaintView; -namespace sdr::contact { class ViewObjectContactRedirector; } - -namespace vcl { - class Window; -} - -class SdrPaintWindow; - /** * Helper to convert any GDIMetaFile to a good quality BitmapEx, * using default parameters and graphic::XPrimitive2DRenderer commit ad2b8a41c61d84195f0c7efd05f5eb07f0402c79 Author: Tomaž Vajngerl <[email protected]> AuthorDate: Mon Jun 13 22:36:24 2022 +0200 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Tue Jun 28 17:13:36 2022 +0200 sdr: move SvxViewChangeHint into its own class Change-Id: I104a9d4410b2197c8c9bb88e5b8dfd3c104c2def diff --git a/include/svx/sdr/view/ViewChangeHint.hxx b/include/svx/sdr/view/ViewChangeHint.hxx new file mode 100644 index 000000000000..d746523a6802 --- /dev/null +++ b/include/svx/sdr/view/ViewChangeHint.hxx @@ -0,0 +1,30 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <svl/hint.hxx> + +class SvxViewChangedHint final : public SfxHint +{ +public: + explicit SvxViewChangedHint() = default; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index 7370c5f1c7ed..dc36e3a4f66a 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -24,6 +24,7 @@ #include <svl/undo.hxx> #include <svx/svddrag.hxx> #include <svx/svdlayer.hxx> +#include <svx/sdr/view/ViewChangeHint.hxx> #include <svtools/colorcfg.hxx> #include <svl/itemset.hxx> #include <svx/svxdllapi.h> @@ -69,13 +70,6 @@ namespace vcl { class Window; } - -class SvxViewChangedHint final : public SfxHint -{ -public: - explicit SvxViewChangedHint(); -}; - class SdrPaintWindow; /** diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index f403ddd578ac..3cba91579eb2 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -98,12 +98,6 @@ OutputDevice* SdrPaintView::GetFirstOutputDevice() const return nullptr; } - -SvxViewChangedHint::SvxViewChangedHint() -{ -} - - BitmapEx convertMetafileToBitmapEx( const GDIMetaFile& rMtf, const basegfx::B2DRange& rTargetRange,
