diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2025-09-20 11:50:08 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2025-09-20 14:12:34 +0200 |
commit | 356396632029f56a45ef98925050fb168dfea518 (patch) | |
tree | c572a15aadcf2090cf8ae5d551bba0d43c819871 /sd | |
parent | d4e291460fe801f82f405cdf648d96ed06a8113a (diff) |
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.kaganski@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/sdtreelb.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/inc/sdtreelb.hxx | 5 |
2 files changed, 3 insertions, 10 deletions
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; |