sd/source/ui/dlg/sdtreelb.cxx | 8 +++----- sd/source/ui/inc/sdtreelb.hxx | 5 ----- 2 files changed, 3 insertions(+), 10 deletions(-)
New commits: commit 356396632029f56a45ef98925050fb168dfea518 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Sep 20 11:50:08 2025 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Sep 20 14:12:34 2025 +0200 Simplify GetListBoxDropFormatId using function-local static Change-Id: I13b9a3339193171346bc075e32c991227e3f5246 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191226 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index caebcba126e0..0ff5a7bd271b 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -76,8 +76,6 @@ sd::DrawViewShell* lcl_getDrawViewShell(const SdDrawDocument* pDoc) } -SotClipboardFormatId SdPageObjsTLV::SdPageObjsTransferable::mnListBoxDropFormatId = static_cast<SotClipboardFormatId>(SAL_MAX_UINT32); - SdPageObjsTLV::SdPageObjsTransferable::SdPageObjsTransferable( INetBookmark aBookmark, ::sd::DrawDocShell& rDocShell, @@ -129,9 +127,9 @@ SdPageObjsTLV::SdPageObjsTransferable* SdPageObjsTLV::SdPageObjsTransferable::ge SotClipboardFormatId SdPageObjsTLV::SdPageObjsTransferable::GetListBoxDropFormatId() { - if (mnListBoxDropFormatId == static_cast<SotClipboardFormatId>(SAL_MAX_UINT32)) - mnListBoxDropFormatId = SotExchange::RegisterFormatMimeType(u"application/x-openoffice-treelistbox-moveonly;windows_formatname=\"SV_LBOX_DD_FORMAT_MOVE\""_ustr); - return mnListBoxDropFormatId; + // Temporary flavor id that is used internally in the navigator + static const SotClipboardFormatId id = SotExchange::RegisterFormatMimeType(u"application/x-openoffice-treelistbox-moveonly;windows_formatname=\"SV_LBOX_DD_FORMAT_MOVE\""_ustr); + return id; } /** diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index efe735f0c5b2..74b0666aa78e 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -418,11 +418,6 @@ public: static SotClipboardFormatId GetListBoxDropFormatId(); private: - /** Temporary drop flavor id that is used internally in the - navigator. - */ - static SotClipboardFormatId mnListBoxDropFormatId; - INetBookmark const maBookmark; ::sd::DrawDocShell& mrDocShell; NavigatorDragType const meDragType;