/* -*- 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 . */ #ifndef INCLUDED_SVX_SVDDRGMT_HXX #define INCLUDED_SVX_SVDDRGMT_HXX #include #include #include #include class SdrDragView; class SdrDragStat; class SAL_DLLPUBLIC_RTTI SdrDragEntry { private: bool mbAddToTransparent : 1; protected: // access for derived classes void setAddToTransparent(bool bNew) { mbAddToTransparent = bNew; } public: SdrDragEntry(); virtual ~SdrDragEntry(); virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod, bool IsDragSizeValid=true) = 0; // data read access bool getAddToTransparent() const { return mbAddToTransparent; } }; class SVXCORE_DLLPUBLIC SdrDragEntryPolyPolygon final : public SdrDragEntry { private: basegfx::B2DPolyPolygon maOriginalPolyPolygon; public: SdrDragEntryPolyPolygon(basegfx::B2DPolyPolygon aOriginalPolyPolygon); virtual ~SdrDragEntryPolyPolygon() override; virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod, bool IsDragSizeValid=true) override; }; class SdrDragEntrySdrObject final : public SdrDragEntry { private: const SdrObject& maOriginal; rtl::Reference mxClone; bool mbModify; public: SdrDragEntrySdrObject( const SdrObject& rOriginal, bool bModify); virtual ~SdrDragEntrySdrObject() override; // #i54102# Split createPrimitive2DSequenceInCurrentState in prepareCurrentState and processing, // added accessors to original and clone void prepareCurrentState(SdrDragMethod& rDragMethod); const SdrObject& getOriginal() const { return maOriginal; } SdrObject* getClone() { return mxClone.get(); } virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod, bool IsDragSizeValid=true) override; }; class SdrDragEntryPrimitive2DSequence final : public SdrDragEntry { private: drawinglayer::primitive2d::Primitive2DContainer maPrimitive2DSequence; public: SdrDragEntryPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DContainer&& rSequence); virtual ~SdrDragEntryPrimitive2DSequence() override; virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod, bool IsDragSizeValid=true) override; }; class SdrDragEntryPointGlueDrag final : public SdrDragEntry { private: std::vector< basegfx::B2DPoint > maPositions; bool mbIsPointDrag; public: SdrDragEntryPointGlueDrag(std::vector< basegfx::B2DPoint >&& rPositions, bool bIsPointDrag); virtual ~SdrDragEntryPointGlueDrag() override; virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod, bool IsDragSizeValid=true) override; }; class SVXCORE_DLLPUBLIC SdrDragMethod { private: std::vector< std::unique_ptr > maSdrDragEntries; sdr::overlay::OverlayObjectList maOverlayObjectList; SdrDragView& mrSdrDragView; bool mbMoveOnly : 1; bool mbSolidDraggingActive : 1; bool mbShiftPressed : 1; protected: // access for derivated classes to maSdrDragEntries SAL_DLLPRIVATE void clearSdrDragEntries(); void addSdrDragEntry(std::unique_ptr pNew); virtual void createSdrDragEntries(); virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal); // Helper to support inserting a new OverlayObject. It will do all // necessary stuff involved with that: // - add GridOffset for non-linear ViewToDevice transformation (calc) // - add to OverlayManager // - add to local OverlayObjectList - ownership change (!) // It is centralized here (and protected) to avoid that new usages/ // implementations forget one of these needed steps. void insertNewlyCreatedOverlayObjectForSdrDragMethod( std::unique_ptr pOverlayObject, const sdr::contact::ObjectContact& rObjectContact, sdr::overlay::OverlayManager& rOverlayManager); // access for derivated classes to mrSdrDragView SdrDragView& getSdrDragView() { return mrSdrDragView; } const SdrDragView& getSdrDragView() const { return mrSdrDragView; } // access for derivated classes for bools void setMoveOnly(bool bNew) { mbMoveOnly = bNew; } void setSolidDraggingActive(bool bNew) { mbSolidDraggingActive = bNew; } // internal helpers for creation of standard drag entries SAL_DLLPRIVATE void createSdrDragEntries_SolidDrag(); SAL_DLLPRIVATE void createSdrDragEntries_PolygonDrag(); SAL_DLLPRIVATE void createSdrDragEntries_PointDrag(); SAL_DLLPRIVATE void createSdrDragEntries_GlueDrag(); // old call forwarders to the SdrDragView SAL_DLLPRIVATE OUString ImpGetDescriptionStr(TranslateId pStrCacheID) const; SdrHdl* GetDragHdl() const { return getSdrDragView().mpDragHdl; } SdrHdlKind GetDragHdlKind() const { return getSdrDragView().meDragHdl; } SdrDragStat& DragStat() { return getSdrDragView().maDragStat; } const SdrDragStat& DragStat() const { return getSdrDragView().maDragStat; } Point& Ref1() const { return mrSdrDragView.maRef1; } Point& Ref2() const { return mrSdrDragView.maRef2; } const SdrHdlList& GetHdlList() const { return getSdrDragView().GetHdlList(); } void AddUndo(std::unique_ptr pUndo) { getSdrDragView().AddUndo(std::move(pUndo)); } bool IsDragLimit() { return getSdrDragView().mbDragLimit; } const tools::Rectangle& GetDragLimitRect() { return getSdrDragView().maDragLimit; } const SdrMarkList& GetMarkedObjectList() { return getSdrDragView().GetMarkedObjectList(); } Point GetSnapPos(const Point& rPt) const { return getSdrDragView().GetSnapPos(rPt,getSdrDragView().mpMarkedPV); } SdrSnap SnapPos(Point& rPt) const { return getSdrDragView().SnapPos(rPt,getSdrDragView().mpMarkedPV); } inline const tools::Rectangle& GetMarkedRect() const; SAL_DLLPRIVATE SdrPageView* GetDragPV() const; SdrObject* GetDragObj() const; bool IsDraggingPoints() const { return getSdrDragView().IsDraggingPoints(); } bool IsDraggingGluePoints() const { return getSdrDragView().IsDraggingGluePoints(); } SAL_DLLPRIVATE bool DoAddConnectorOverlays(); SAL_DLLPRIVATE drawinglayer::primitive2d::Primitive2DContainer AddConnectorOverlays(); public: SAL_DLLPRIVATE void resetSdrDragEntries(); SAL_DLLPRIVATE basegfx::B2DRange getCurrentRange() const; // #i58950# also moved constructor implementation to cxx SdrDragMethod(SdrDragView& rNewView); // #i58950# virtual destructor was missing virtual ~SdrDragMethod(); void Show(bool IsValidSize=true); void Hide(); bool IsShiftPressed() const { return mbShiftPressed; } void SetShiftPressed(bool bShiftPressed) { mbShiftPressed = bShiftPressed; } virtual OUString GetSdrDragComment() const=0; virtual bool BeginSdrDrag()=0; virtual void MoveSdrDrag(const Point& rPnt)=0; virtual bool EndSdrDrag(bool bCopy)=0; virtual void CancelSdrDrag(); virtual PointerStyle GetSdrDragPointer() const=0; virtual void CreateOverlayGeometry( sdr::overlay::OverlayManager& rOverlayManager, const sdr::contact::ObjectContact& rObjectContact, bool bIsGeometrySizeValid=true); SAL_DLLPRIVATE void destroyOverlayGeometry(); virtual basegfx::B2DHomMatrix getCurrentTransformation() const; virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget); virtual void applyCurrentTransformationToPolyPolygon(basegfx::B2DPolyPolygon& rTarget); // data read access bool getMoveOnly() const { return mbMoveOnly; } bool getSolidDraggingActive() const { return mbSolidDraggingActive; } }; inline const tools::Rectangle& SdrDragMethod::GetMarkedRect() const { return getSdrDragView().meDragHdl==SdrHdlKind::Poly ? getSdrDragView().GetMarkedPointsRect() : getSdrDragView().meDragHdl==SdrHdlKind::Glue ? getSdrDragView().GetMarkedGluePointsRect() : getSdrDragView().GetMarkedObjRect(); } // SdrDragMove class SVXCORE_DLLPUBLIC SdrDragMove : public SdrDragMethod { private: tools::Long nBestXSnap; tools::Long nBestYSnap; bool bXSnapped; bool bYSnapped; void ImpCheckSnap(const Point& rPt); protected: virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal) override; public: SdrDragMove(SdrDragView& rNewView); virtual OUString GetSdrDragComment() const override; virtual bool BeginSdrDrag() override; virtual void MoveSdrDrag(const Point& rPnt) override; virtual bool EndSdrDrag(bool bCopy) override; virtual PointerStyle GetSdrDragPointer() const override; virtual basegfx::B2DHomMatrix getCurrentTransformation() const override; virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget) override; }; // SdrDragResize class SVXCORE_DLLPUBLIC SdrDragResize : public SdrDragMethod { protected: Fraction aXFact; Fraction aYFact; public: SdrDragResize(SdrDragView& rNewView); virtual OUString GetSdrDragComment() const override; virtual bool BeginSdrDrag() override; virtual void MoveSdrDrag(const Point& rPnt) override; virtual bool EndSdrDrag(bool bCopy) override; virtual PointerStyle GetSdrDragPointer() const override; virtual basegfx::B2DHomMatrix getCurrentTransformation() const override; virtual void applyCurrentTransformationToSdrObject(SdrObject& rTarget) override; }; // SdrDragObjOwn class SVXCORE_DLLPUBLIC SdrDragObjOwn : public SdrDragMethod { private: // SdrDragObjOwn always works on a clone since it has no transformation // mechanism to modify wireframe visualisations, but uses the // SdrObject::applySpecialDrag() method to change a clone of the // SdrObject rtl::Reference mxClone; protected: virtual void createSdrDragEntries() override; public: SdrDragObjOwn(SdrDragView& rNewView); virtual ~SdrDragObjOwn() override; virtual OUString GetSdrDragComment() const override; virtual bool BeginSdrDrag() override; virtual void MoveSdrDrag(const Point& rPnt) override; virtual bool EndSdrDrag(bool bCopy) override; virtual PointerStyle GetSdrDragPointer() const override; }; #endif // INCLUDED_SVX_SVDDRGMT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ art-style-experiment-markus'>feature/chart-style-experiment-markus LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-08tdf#152887 Add status bar icons for Accessibility CheckRizal Muttaqin
Change-Id: Ied2b876938824c3504231988943851bd97265e44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148466 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-03-07Resolves tdf#153344 - Resize Save icon in statusbar to 16pxHeiko Tietze
16px instead 18px to comply with the other icons Change-Id: Ic7e3531c30f1af75b38416a94acc2e7ea16c3ded Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148350 Tested-by: Jenkins Tested-by: Rizal Muttaqin <rizmut@libreoffice.org> Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-03-04Related tdf#153344 - Resize Selection Mode icon in statusbar to 16pxHeiko Tietze
Also removed the "_10x22" from the icons Change-Id: Iccdd5b784f43f1588aa1b5e72d01dd220209cc21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148120 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-03-01Related tdf#153344 - Resize Save icon in statusbar to 18pxHeiko Tietze
Also removed the "_14" from the yes/no icons Change-Id: Ic43219fe0e4555416b78831d45f9edc8060f73cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148063 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-02-23Revert "Resolves tdf#152947 - Accessibility for save status icon"Heiko Tietze
This reverts commit 9844064f252e8ec383d3c5bf24830acd868bb764. Reason for revert: Rectangle makes the small icons even more tiny. Looking for a better solution. Change-Id: I3161d488346305ee814884758f1d8679d64db07b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147451 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-01-25Resolves tdf#152947 - Accessibility for save status iconHeiko Tietze
Added a rectangle around the *yes variants Change-Id: Ia60a5e4f6f7b0e04d0f0e7e8c5fd7bd0f8fa5492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146136 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-12-12remove erroneously added icons with space in filenameChristian Lohmaier
Change-Id: I8e1a5ed47af74e8b26e542c7df7757368446f87a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143913 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-10-17tdf#151527 Breeze: Add missing icons in Fontwork dialogRizal Muttaqin
Change-Id: I983713fa415b82dc4f526fd28e4e8f179f0f06d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141451 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2022-05-26Breeze & Sifr tdf#136916 add dark underlines variant iconsRizal Muttaqin
Change-Id: Ic15b8e56959606d8dbacb073d6e80d5188dc7502 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134975 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2021-10-04Breeze: tdf#144637 update & fix table cell borderRizal Muttaqin
Change-Id: I84c5ff88298794b3ccbb883af1664fa93fcc9532 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123034 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2021-08-24Breeze: tdf#143300 add criss-cross borderRizal Muttaqin
Change-Id: Ie08e9b2eae2cf07a926767e144a69d5f4bba07e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120931 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2021-07-14Breeze: tdf#143300 add diagonal border line iconsRizal Muttaqin
Change-Id: I8792557346406db4c66b2ad7d76fdb9303188f1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118880 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2021-03-28Breeze: tdf#141285 new icons for status bar selection typeRizal Muttaqin
Change-Id: I01afb5e1e1c42a4e4e852836512bf3d3b8ad44a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113241 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2021-01-31Breeze & elementary: tdf#140026 new List View iconRizal Muttaqin
Change-Id: I56edc2ab3d44ba6e0d19d1322cc5e061621a4fe2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110193 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2020-09-12Breeze,Colibre,elementary,KJ,Sukapura: tdf#136593 icon for new Distribution ↵Rizal Muttaqin
uno commands Change-Id: If100523cdfd1a5bf82c81959100099ee39d0cb87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102434 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2020-07-13Icon themes: Fix for tdf#134768Rizal Muttaqin
Fix Line Arrangement Presets in "Borders" tab on "Format Cells" dialog Change-Id: If94df20905f56305f3b3d1faa63e2296cc1dad07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98675 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-06-12Breeze: tdf#133753: base point, Calc left to right imagesRizal Muttaqin
Change-Id: Id3325fbafb4c5e7591f0b28b17aef5b3ba454570 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96190 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2020-06-09Icon theme: tdf#133582 missing checkbox and radio button in gen envRizal Muttaqin
Change-Id: I2f756fe6920099bb37fd6b3f83df7f1e21504290 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95893 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2020-03-29Breeze: Update MIME types, Gallery view type iconsRizal Muttaqin
- Add QR Code icons Change-Id: I6db18910797c6174529ccdf8a9dd2095f2804a27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91325 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2020-02-23Breeze: FIx for tdf#130879 (missing spacing char icons)rizmut
Change-Id: I06cec9c95dd803e4816ca7ef2f280802250e0511 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89294 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2020-01-28Breeze Dark: Fix for invisible icons (tdf#130205)rizmut
Change-Id: Id2d7496cc34d538611bb5285009530be797e6a5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87613 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2020-01-20tdf#128849: Added svg version of the breeze dark icon set.Luca Carlon
Change-Id: I045d8acd5b42473b220f7c9bb96e2a87d6141727 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86590 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id> Tested-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>