summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2024-06-05 11:39:48 +0900
committerTomaž Vajngerl <quikee@gmail.com>2024-06-05 15:00:38 +0200
commitad9f15a0b9b7b481e03f66bfb9564deefcfd13af (patch)
tree41c4b27e9de516fbf9abb2760288c96dace6e05b /sd
parent11ee53f9f14191453c12189d20423eb2fad008f9 (diff)
sd: simplify NotifyDocumentEvent, remove duplication
Change-Id: I4f16925c1271261d37e3b9146bc2458581798924 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168421 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 92a112242bbd..da1c4ca806e6 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -3802,26 +3802,25 @@ rtl::Reference< SdXImpressDocument > SdXImpressDocument::GetModel( SdDrawDocumen
return xRet;
}
-void NotifyDocumentEvent( SdDrawDocument const & rDocument, const OUString& rEventName )
+void NotifyDocumentEvent(SdDrawDocument const & rDocument, const OUString& rEventName)
{
- rtl::Reference< SdXImpressDocument > xModel( SdXImpressDocument::GetModel( rDocument ) );
+ rtl::Reference<SdXImpressDocument> xModel(SdXImpressDocument::GetModel(rDocument));
- if( xModel.is() )
+ if (xModel.is())
{
- uno::Reference< uno::XInterface > xSource( static_cast<uno::XWeak*>( xModel.get() ) );
- css::document::EventObject aEvent( xSource, rEventName );
- xModel->notifyEvent(aEvent );
+ uno::Reference<uno::XInterface> xSource(static_cast<uno::XWeak*>(xModel.get()));
+ NotifyDocumentEvent(rDocument, rEventName, xSource);
}
}
-void NotifyDocumentEvent( SdDrawDocument const & rDocument, const OUString& rEventName, const uno::Reference< uno::XInterface >& xSource )
+void NotifyDocumentEvent(SdDrawDocument const & rDocument, const OUString& rEventName, const uno::Reference<uno::XInterface>& xSource)
{
- rtl::Reference< SdXImpressDocument > xModel( SdXImpressDocument::GetModel( rDocument ) );
+ rtl::Reference<SdXImpressDocument> xModel(SdXImpressDocument::GetModel(rDocument));
- if( xModel.is() )
+ if (xModel.is())
{
- css::document::EventObject aEvent( xSource, rEventName );
- xModel->notifyEvent(aEvent );
+ css::document::EventObject aEvent(xSource, rEventName);
+ xModel->notifyEvent(aEvent);
}
}