diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-15 10:08:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-17 15:08:07 +0200 |
commit | 470752f50c146b449b1c9bdccc36ed031535663c (patch) | |
tree | 92e5af3b31e63e6cffdcc51717d1bd6584c59729 /sd/source/ui/inc | |
parent | 561a02ec72cf963d7cd59cfb9a183c1032f0861b (diff) |
create o3tl::array_view
A very basic implementation of the proposed std::array_view, similar to
clang's llvm::ArrayRef.
Mostly cribbed from the string_view implementation :-)
Use it for the SfxDispatcher::setSlotFilter function
Change-Id: Ife7e4971741b41827e145787899872c9b2bea82b
Reviewed-on: https://gerrit.libreoffice.org/38817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/inc')
-rw-r--r-- | sd/source/ui/inc/DrawDocShell.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index a4e3deeb5901..3dad521b119f 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -20,6 +20,7 @@ #ifndef INCLUDED_SD_SOURCE_UI_INC_DRAWDOCSHELL_HXX #define INCLUDED_SD_SOURCE_UI_INC_DRAWDOCSHELL_HXX +#include <o3tl/array_view.hxx> #include <sfx2/docfac.hxx> #include <sfx2/objsh.hxx> @@ -152,7 +153,7 @@ public: */ bool CheckPageName(vcl::Window* pWin, OUString& rName ); - void SetSlotFilter(bool bEnable = false, sal_uInt16 nCount = 0, const sal_uInt16* pSIDs = nullptr) { mbFilterEnable = bEnable; mnFilterCount = nCount; mpFilterSIDs = pSIDs; } + void SetSlotFilter(bool bEnable = false, o3tl::array_view<sal_uInt16> pSIDs = o3tl::array_view<sal_uInt16>()) { mbFilterEnable = bEnable; mpFilterSIDs = pSIDs; } void ApplySlotFilter() const; SfxStyleFamily GetStyleFamily() const { return mnStyleFamily; } @@ -218,8 +219,8 @@ protected: rtl::Reference<FuPoor> mxDocShellFunction; DocumentType meDocType; SfxStyleFamily mnStyleFamily; - const sal_uInt16* mpFilterSIDs; - sal_uInt16 mnFilterCount; + o3tl::array_view<sal_uInt16> + mpFilterSIDs; bool mbFilterEnable; bool mbSdDataObj; bool mbInDestruction; |