include/svx/svdmodel.hxx | 2 +- sd/source/ui/unoidl/unomodel.cxx | 5 +---- svx/source/gallery2/galobj.cxx | 2 +- svx/source/svdraw/svdmodel.cxx | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-)
New commits: commit b883e3d58db404a92bee044091b6cfd3892311c2 Author: Arkadiy Illarionov <qar...@gmail.com> AuthorDate: Wed Sep 18 20:54:55 2019 +0300 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Sep 18 21:53:27 2019 +0200 tdf#39593 use isUnoTunnelId in sd Rename SdrModel::getUnoTunnelImplementationId() Change-Id: I364a05efe8ddc04b2b2ca393416c9b974ded43df Reviewed-on: https://gerrit.libreoffice.org/79108 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index f7ffa515a0e0..d5c14c0baa57 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -585,7 +585,7 @@ public: bool IsInDestruction() const { return mbInDestruction;} - static const css::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId(); + static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); /** enables (true) or disables (false) recording of undo actions If undo actions are added while undo is disabled, they are deleted. diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 878db5a6175f..cf31dfa902e7 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -343,11 +343,8 @@ sal_Int64 SAL_CALL SdXImpressDocument::getSomething( const css::uno::Sequence< s if( isUnoTunnelId<SdXImpressDocument>(rIdentifier) ) return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); - if( (rIdentifier.getLength() == 16) && - (0 == memcmp( SdrModel::getUnoTunnelImplementationId().getConstArray(), rIdentifier.getConstArray(), 16 ))) - { + if( isUnoTunnelId<SdrModel>(rIdentifier) ) return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(mpDoc)); - } return SfxBaseModel::getSomething( rIdentifier ); } diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index c08b84809cfe..23b1e3cda851 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -405,7 +405,7 @@ SvxGalleryDrawModel::SvxGalleryDrawModel() if( xTunnel.is() ) { mpFormModel = dynamic_cast< FmFormModel* >( - reinterpret_cast<SdrModel*>(xTunnel->getSomething(SdrModel::getUnoTunnelImplementationId()))); + reinterpret_cast<SdrModel*>(xTunnel->getSomething(SdrModel::getUnoTunnelId()))); if( mpFormModel ) { mpFormModel->InsertPage( mpFormModel->AllocPage( false ) ); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index a833a85baec7..eec87abcdf73 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -2004,7 +2004,7 @@ namespace class theSdrModelUnoTunnelImplementationId : public rtl::Static< UnoTunnelIdInit, theSdrModelUnoTunnelImplementationId > {}; } -const css::uno::Sequence< sal_Int8 >& SdrModel::getUnoTunnelImplementationId() +const css::uno::Sequence< sal_Int8 >& SdrModel::getUnoTunnelId() { return theSdrModelUnoTunnelImplementationId::get().getSeq(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits