From 01673b7cf6bb0abbd35ff79b50dc15b14bacad70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lef=C3=A8vre?= Date: Mon, 21 Sep 2015 15:11:57 +0200 Subject: [PATCH 156/398] CppCheck : reduce variables scope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://gerrit.libreoffice.org/18753 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 92c8d74c543aa94cd512369072975dca7006d5b3) Change-Id: Ief402017b693a4337f330fb07bb7a6dc6e749f72 --- desktop/source/lib/init.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 64a6c00ffba6..1b06c4220564 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -566,7 +566,6 @@ static void doc_iniUnoCommands () }; util::URL aCommandURL; - const SfxSlot* pSlot = NULL; SfxViewShell* pViewShell = SfxViewShell::Current(); SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): NULL; @@ -582,6 +581,8 @@ static void doc_iniUnoCommands () for (sal_uInt32 nIterator = 0; nIterator < SAL_N_ELEMENTS(sUnoCommands); nIterator++) { + const SfxSlot* pSlot = NULL; + aCommandURL.Complete = sUnoCommands[nIterator]; xParser->parseStrict(aCommandURL); pSlot = rSlotPool.GetUnoSlot(aCommandURL.Path); -- 2.12.0