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/docshell/docshell.cxx | |
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/docshell/docshell.cxx')
-rw-r--r-- | sd/source/ui/docshell/docshell.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index 799c2cfaa907..77d7cf641c8b 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -124,7 +124,6 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, mpViewShell(nullptr), mpFontList(nullptr), meDocType(eDocumentType), - mpFilterSIDs(nullptr), mbSdDataObj(bDataObject), mbOwnPrinter(false), mbNewDocument( true ) @@ -140,7 +139,6 @@ DrawDocShell::DrawDocShell( SfxModelFlags nModelCreationFlags, bool bDataObject, mpViewShell(nullptr), mpFontList(nullptr), meDocType(eDocumentType), - mpFilterSIDs(nullptr), mbSdDataObj(bDataObject), mbOwnPrinter(false), mbNewDocument( true ) @@ -158,7 +156,6 @@ DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode, mpViewShell(nullptr), mpFontList(nullptr), meDocType(eDocumentType), - mpFilterSIDs(nullptr), mbSdDataObj(bDataObject), mbOwnPrinter(false), mbNewDocument( true ) @@ -405,8 +402,8 @@ void DrawDocShell::ApplySlotFilter() const { SfxDispatcher* pDispatcher = pTestViewShell->GetViewFrame()->GetDispatcher(); - if( mpFilterSIDs ) - pDispatcher->SetSlotFilter( mbFilterEnable ? SfxSlotFilterState::ENABLED : SfxSlotFilterState::DISABLED, mnFilterCount, mpFilterSIDs ); + if( !mpFilterSIDs.empty() ) + pDispatcher->SetSlotFilter( mbFilterEnable ? SfxSlotFilterState::ENABLED : SfxSlotFilterState::DISABLED, mpFilterSIDs ); else pDispatcher->SetSlotFilter(); |