diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-08 11:25:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-09 07:00:12 +0100 |
commit | 9edefc2d441d6879cc64d6b18fabd5682d9e464c (patch) | |
tree | ddc9b08388d9cac0226232f0177427d1e5c4ef4a | |
parent | dae818cf81763dedad573c86b352f1cfedcfeb64 (diff) |
use less UNO in AnnotationManagerImpl
use the "real" underlying objects instead of the UNO wrapper objects
Change-Id: I70b7c5b90da5ca07a2c73af2121f5399ae411bb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159176
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationmanagerimpl.hxx | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 81d6b3c0176b..5ec59e703452 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -893,7 +893,7 @@ void AnnotationManagerImpl::onSelectionChanged() try { - Reference< XAnnotationAccess > xPage( mxView->getCurrentPage(), UNO_QUERY ); + rtl::Reference< SdPage > xPage = mrBase.GetMainViewShell()->getCurrentPage(); if( xPage != mxCurrentPage ) { @@ -954,10 +954,8 @@ void AnnotationManagerImpl::CreateTags() rtl::Reference< AnnotationTag > xSelectedTag; - Reference< XAnnotationEnumeration > xEnum( mxCurrentPage->createAnnotationEnumeration() ); - while( xEnum->hasMoreElements() ) + for (const css::uno::Reference< css::office::XAnnotation > & xAnnotation : mxCurrentPage->getAnnotations() ) { - Reference< XAnnotation > xAnnotation( xEnum->nextElement() ); Color aColor( GetColorLight( mpDoc->GetAnnotationAuthorIndex( xAnnotation->getAuthor() ) ) ); rtl::Reference< AnnotationTag > xTag( new AnnotationTag( *this, *xViewShell->GetView(), xAnnotation, aColor, nIndex++, maFont ) ); maTagVector.push_back(xTag); diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx index c5871d90c75a..b5fa42001b11 100644 --- a/sd/source/ui/annotations/annotationmanagerimpl.hxx +++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx @@ -120,7 +120,7 @@ private: std::vector< rtl::Reference< AnnotationTag > > maTagVector; css::uno::Reference< css::drawing::XDrawView > mxView; - css::uno::Reference< css::office::XAnnotationAccess > mxCurrentPage; + rtl::Reference< SdPage > mxCurrentPage; css::uno::Reference< css::office::XAnnotation > mxSelectedAnnotation; bool mbShowAnnotations; |