sc/source/ui/inc/tabview.hxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
New commits: commit eb6c840922b4af0b30bf6e0d691afddb467177b7 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Mar 9 16:40:33 2018 +0100 Use std::array ...so standard libraries in debug mode can catch out-of-bounds element acces Change-Id: I519795f5fcb51f243312e5d0247998eff6ceb151 Reviewed-on: https://gerrit.libreoffice.org/51008 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index e50d488c1d12..e9034d248057 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -19,6 +19,9 @@ #ifndef INCLUDED_SC_SOURCE_UI_INC_TABVIEW_HXX #define INCLUDED_SC_SOURCE_UI_INC_TABVIEW_HXX +#include <sal/config.h> + +#include <array> #include <memory> #include <vcl/scrbar.hxx> #include <vcl/help.hxx> @@ -92,7 +95,7 @@ private: enum ModifierTagType { Adder, Remover }; public: - ScExtraEditViewManager(ScTabViewShell* pThisViewShell, VclPtr<ScGridWindow>* pGridWin) + ScExtraEditViewManager(ScTabViewShell* pThisViewShell, std::array<VclPtr<ScGridWindow>, 4> const & pGridWin) : mpThisViewShell(pThisViewShell) , mpGridWin(pGridWin) , mpOtherEditView(nullptr) @@ -120,7 +123,7 @@ private: private: ScTabViewShell* mpThisViewShell; - VclPtr<ScGridWindow>* mpGridWin; + std::array<VclPtr<ScGridWindow>, 4> const & mpGridWin; EditView* mpOtherEditView; int nTotalWindows; }; @@ -147,11 +150,11 @@ private: FuPoor* pDrawActual; FuPoor* pDrawOld; - VclPtr<ScGridWindow> pGridWin[4]; - VclPtr<ScColBar> pColBar[2]; - VclPtr<ScRowBar> pRowBar[2]; - VclPtr<ScOutlineWindow> pColOutline[2]; - VclPtr<ScOutlineWindow> pRowOutline[2]; + std::array<VclPtr<ScGridWindow>, 4> pGridWin; + std::array<VclPtr<ScColBar>, 2> pColBar; + std::array<VclPtr<ScRowBar>, 2> pRowBar; + std::array<VclPtr<ScOutlineWindow>, 2> pColOutline; + std::array<VclPtr<ScOutlineWindow>, 2> pRowOutline; VclPtr<ScTabSplitter> pHSplitter; VclPtr<ScTabSplitter> pVSplitter; VclPtr<ScTabControl> pTabControl; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits