include/svx/annotation/ObjectAnnotationData.hxx | 25 ---------- include/svx/svdobj.hxx | 9 --- svx/source/svdraw/svdobj.cxx | 58 ++++++++---------------- 3 files changed, 21 insertions(+), 71 deletions(-)
New commits: commit ab3fbc70aa5d0cf606b79617e775e60353ea62ac Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Tue Jun 11 19:59:38 2024 +0900 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Tue Jun 11 14:45:05 2024 +0200 Revert "annot: prepare SdrObject to represent an annotation" Will not be needed in LibreOffice release 24-8. This reverts commit 4cd2737d829e8a3413ad3d60a17dded4dcc8938c. Change-Id: I2d4d89787d6ec9fdb1f33d11203a5bf4776af37c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168670 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/svx/annotation/ObjectAnnotationData.hxx b/include/svx/annotation/ObjectAnnotationData.hxx deleted file mode 100644 index bdba8ab5a5b9..000000000000 --- a/include/svx/annotation/ObjectAnnotationData.hxx +++ /dev/null @@ -1,25 +0,0 @@ -/* -*- 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/. - */ - -#pragma once - -#include <svx/svxdllapi.h> - -namespace sdr::annotation -{ -/** Contains the annotation data for a SdrObject */ -class ObjectAnnotationData -{ -public: - bool mbIsAnnotation : 1 = false; - rtl::Reference<sdr::annotation::Annotation> mxAnnotation; -}; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 1dd8dd52eb59..4e03abf18da3 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -87,7 +87,7 @@ namespace basegfx namespace sdr { class ObjectUser; } namespace sdr::properties { class BaseProperties; } namespace sdr::contact { class ViewContact; } -namespace sdr::annotation { class ObjectAnnotationData; } + namespace com::sun::star::drawing { class XShape; } namespace svx::diagram { class IDiagramHelper; } @@ -359,11 +359,6 @@ public: virtual void SetDecorative(bool isDecorative); virtual bool IsDecorative() const; - // Object representing an annotation - bool isAnnotationObject() const; - void setAsAnnotationObject(bool bSetAnnotation); - std::unique_ptr<sdr::annotation::ObjectAnnotationData>& getAnnotationData(); - // for group objects bool IsGroupObject() const; virtual SdrObjList* GetSubList() const; @@ -900,8 +895,6 @@ protected: // #i25616# bool mbSupportTextIndentingOnLineWidthChange : 1; - std::unique_ptr<sdr::annotation::ObjectAnnotationData> mpAnnotationData; - virtual ~SdrObject() override; virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() = 0; diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 9da8c5662f12..b5cd832c096b 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -54,7 +54,6 @@ #include <sdr/contact/objectcontactofobjlistpainter.hxx> #include <svx/sdr/contact/viewcontactofsdrobj.hxx> #include <sdr/properties/emptyproperties.hxx> -#include <svx/annotation/ObjectAnnotationData.hxx> #include <svx/sdrhittesthelper.hxx> #include <svx/sdrobjectuser.hxx> #include <svx/sdrobjectfilter.hxx> @@ -337,17 +336,16 @@ void impRemoveIncarnatedSdrObjectToSdrModel(SdrObject& rSdrObject, SdrModel& rSd #endif SdrObject::SdrObject(SdrModel& rSdrModel) - : mpFillGeometryDefiningShape(nullptr) - , mrSdrModelFromSdrObject(rSdrModel) - , m_pUserCall(nullptr) - , mpAnnotationData(new sdr::annotation::ObjectAnnotationData) - , mpImpl(new Impl) - , mpParentOfSdrObject(nullptr) - , m_nOrdNum(0) - , mnNavigationPosition(SAL_MAX_UINT32) - , mnLayerID(0) - , mpSvxShape( nullptr ) - , mbDoNotInsertIntoPageAutomatically(false) +: mpFillGeometryDefiningShape(nullptr) + ,mrSdrModelFromSdrObject(rSdrModel) + ,m_pUserCall(nullptr) + ,mpImpl(new Impl) + ,mpParentOfSdrObject(nullptr) + ,m_nOrdNum(0) + ,mnNavigationPosition(SAL_MAX_UINT32) + ,mnLayerID(0) + ,mpSvxShape( nullptr ) + ,mbDoNotInsertIntoPageAutomatically(false) { m_bVirtObj =false; m_bSnapRectDirty =true; @@ -376,17 +374,16 @@ SdrObject::SdrObject(SdrModel& rSdrModel) } SdrObject::SdrObject(SdrModel& rSdrModel, SdrObject const & rSource) - : mpFillGeometryDefiningShape(nullptr) - , mrSdrModelFromSdrObject(rSdrModel) - , m_pUserCall(nullptr) - , mpAnnotationData(new sdr::annotation::ObjectAnnotationData) - , mpImpl(new Impl) - , mpParentOfSdrObject(nullptr) - , m_nOrdNum(0) - , mnNavigationPosition(SAL_MAX_UINT32) - , mnLayerID(0) - , mpSvxShape( nullptr ) - , mbDoNotInsertIntoPageAutomatically(false) +: mpFillGeometryDefiningShape(nullptr) + ,mrSdrModelFromSdrObject(rSdrModel) + ,m_pUserCall(nullptr) + ,mpImpl(new Impl) + ,mpParentOfSdrObject(nullptr) + ,m_nOrdNum(0) + ,mnNavigationPosition(SAL_MAX_UINT32) + ,mnLayerID(0) + ,mpSvxShape( nullptr ) + ,mbDoNotInsertIntoPageAutomatically(false) { m_bVirtObj =false; m_bSnapRectDirty =true; @@ -892,21 +889,6 @@ bool SdrObject::IsDecorative() const return m_pPlusData == nullptr ? false : m_pPlusData->isDecorative; } -bool SdrObject::isAnnotationObject() const -{ - return mpAnnotationData->mbIsAnnotation; -} - -void SdrObject::setAsAnnotationObject(bool bSetAnnotation) -{ - mpAnnotationData->mbIsAnnotation = bSetAnnotation; -} - -std::unique_ptr<sdr::annotation::ObjectAnnotationData>& SdrObject::getAnnotationData() -{ - return mpAnnotationData; -} - sal_uInt32 SdrObject::GetOrdNum() const { if (SdrObjList* pParentList = getParentSdrObjListFromSdrObject())