Files
loongoffice/include/svx/annotation/ObjectAnnotationData.hxx
Tomaž Vajngerl 7485d2378c tdf#164529 support annotation selection with edit (trigger pop-up)
In some instances we want to select the annotation and edit them
at the same time - trigger pop-up. This change adds back support
for that.

Also properly close the pop-ups when the view shell and window
are destroyed.

Change-Id: I17abeb39a7500001b148b8923eb9028d297a40a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179664
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179870
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2025-01-07 12:12:39 +01:00

47 lines
1.2 KiB
C++

/* -*- 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>
#include <svx/annotation/Annotation.hxx>
#include <svx/annotation/IAnnotationPopup.hxx>
namespace sdr::annotation
{
/** Contains the annotation data specific for a SdrObject (which represents an annotation) */
class ObjectAnnotationData
{
public:
~ObjectAnnotationData() { closePopup(); }
/// The annotation
rtl::Reference<sdr::annotation::Annotation> mxAnnotation;
/// Object handling the pop-up window
std::unique_ptr<sdr::annotation::IAnnotationPopup> mpAnnotationPopup;
/// Open popup for the annotation
void openPopup()
{
if (mpAnnotationPopup)
mpAnnotationPopup->openPopup();
}
/// Close popup for the annotation
void closePopup()
{
if (mpAnnotationPopup)
mpAnnotationPopup->closePopup();
}
};
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */