From 470752f50c146b449b1c9bdccc36ed031535663c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 15 Jun 2017 10:08:20 +0200 Subject: 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 Reviewed-by: Noel Grandin --- sw/source/uibase/uiview/view.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sw') diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 08f69fe9c533..752cdca79381 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -588,7 +588,7 @@ void SwView::CheckReadonlyState() } if ( SfxItemState::DISABLED == eStateRO ) { - rDis.SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, SAL_N_ELEMENTS(aROIds), aROIds ); + rDis.SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, aROIds ); bChgd = true; } } @@ -603,9 +603,7 @@ void SwView::CheckReadonlyState() qsort( static_cast(aAllProtIds), SAL_N_ELEMENTS(aAllProtIds), sizeof(sal_uInt16), lcl_CmpIds ); bAllProtFirst = false; } - rDis.SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, - SAL_N_ELEMENTS(aAllProtIds), - aAllProtIds ); + rDis.SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, aAllProtIds ); bChgd = true; } } -- cgit