summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-11-03 22:03:47 +0100
committerJulien Nabet <serval2412@yahoo.fr>2013-11-03 22:46:45 +0100
commit8378d3a7da3de3459870f10612e75f11915aa023 (patch)
treea45a7264c94b57c543b7061faa083a990e2cd8c9 /sfx2
parent75761f0fbb1765cf5f5ab241c84c7af984689f95 (diff)
cppcheck: Reduce scope
Change-Id: I341c2b7112f32a0ab0e1a6dfac0ab4679310202c
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 1ac1784538d1..f712e148465a 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -313,7 +313,6 @@ SfxToolBoxControl* SfxToolBoxControl::CreateControl( sal_uInt16 nSlotId, sal_uIn
{
SolarMutexGuard aGuard;
- SfxToolBoxControl *pCtrl;
SfxApplication *pApp = SFX_APP();
SfxSlotPool *pSlotPool;
@@ -324,6 +323,7 @@ SfxToolBoxControl* SfxToolBoxControl::CreateControl( sal_uInt16 nSlotId, sal_uIn
TypeId aSlotType = pSlotPool->GetSlotType( nSlotId );
if ( aSlotType )
{
+ SfxToolBoxControl *pCtrl;
if ( pMod )
{
SfxTbxCtrlFactArr_Impl *pFactories = pMod->GetTbxCtrlFactories_Impl();
@@ -841,7 +841,6 @@ void SfxToolBoxControl::createAndPositionSubToolBar( const OUString& rSubToolBar
}
pImpl->mxUIElement = xUIElement;
- Window* pParentTbxWindow( pImpl->pBox );
Window* pTbxWindow = VCLUnoHelper::GetWindow( xSubToolBar );
ToolBox* pToolBar( 0 );
if ( pTbxWindow && pTbxWindow->GetType() == WINDOW_TOOLBOX )
@@ -849,6 +848,7 @@ void SfxToolBoxControl::createAndPositionSubToolBar( const OUString& rSubToolBar
if ( pToolBar )
{
+ Window* pParentTbxWindow( pImpl->pBox );
pToolBar->SetParent( pParentTbxWindow );
::Size aSize = getPersistentFloatingSize( xFrame, rSubToolBarResName );
if ( aSize.Width() == 0 || aSize.Height() == 0 )