summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/menu.cxx7
-rw-r--r--vcl/source/window/settings.cxx3
-rw-r--r--vcl/source/window/splitwin.cxx29
3 files changed, 15 insertions, 24 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 34804c1a3555..4f63cb6120e2 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2607,13 +2607,10 @@ bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
bool MenuBar::ImplHandleCmdEvent( const CommandEvent& rCEvent )
{
- bool bDone = false;
- const CommandModKeyData* pCData;
-
// No keyboard processing when system handles the menu or our menubar is invisible
if( !IsDisplayable() ||
( ImplGetSalMenu() && ImplGetSalMenu()->VisibleMenuBar() ) )
- return bDone;
+ return false;
// check for enabled, if this method is called from another window...
MenuBarWindow* pWin = static_cast<MenuBarWindow*>(ImplGetWindow());
@@ -2621,7 +2618,7 @@ bool MenuBar::ImplHandleCmdEvent( const CommandEvent& rCEvent )
{
if (rCEvent.GetCommand() == CommandEventId::ModKeyChange)
{
- pCData = rCEvent.GetModKeyData ();
+ const CommandModKeyData* pCData = rCEvent.GetModKeyData ();
if (pWin->nHighlightedItem == ITEMPOS_INVALID)
{
if (pCData && pCData->IsMod2())
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx
index 96ab2407085d..4e0e4ed86b71 100644
--- a/vcl/source/window/settings.cxx
+++ b/vcl/source/window/settings.cxx
@@ -241,13 +241,14 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl )
// (see above) then accept that
if( !rSettings.GetStyleSettings().GetHighContrastMode() )
{
- bool bTmp = false, bAutoHCMode = true;
+ bool bAutoHCMode = true;
utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithComponentContext(
comphelper::getProcessComponentContext(),
OUString("org.openoffice.Office.Common/Accessibility") ); // note: case sensitive !
if ( aNode.isValid() )
{
::com::sun::star::uno::Any aValue = aNode.getNodeValue( OUString("AutoDetectSystemHC") );
+ bool bTmp = false;
if( aValue >>= bTmp )
bAutoHCMode = bTmp;
}
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 8e643d1db371..572a9a4b6966 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -475,16 +475,8 @@ static void ImplCalcSet( ImplSplitSet* pSet,
sal_uInt16 nVisItems;
sal_uInt16 nAbsItems;
long nCalcSize;
- long nSizeDelta;
- long nSizeWinSize;
- long nNewSizeWinSize;
- long nTemp;
- long nTempErr;
- long nErrorSum;
- long nCurSizeDelta;
long nPos;
long nMaxPos;
- long* pSize;
ImplSplitItems& pItems = pSet->mpItems;
bool bEmpty;
@@ -502,7 +494,6 @@ static void ImplCalcSet( ImplSplitSet* pSet,
else
nCalcSize = nSetWidth;
nCalcSize -= (nVisItems-1)*pSet->mnSplitSize;
- long nCurSize = 0;
if ( pSet->mbCalcPix || (pSet->mnLastSize != nCalcSize) )
{
long nPercentFactor = 10;
@@ -510,6 +501,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
long nPercent = 0;
long nRelPercent = 0;
long nAbsSize = 0;
+ long nCurSize = 0;
for ( i = 0; i < nItems; i++ )
{
if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) )
@@ -542,7 +534,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
}
if ( !nPercent )
nPercent = 1;
- nSizeDelta = nCalcSize-nAbsSize;
+ long nSizeDelta = nCalcSize-nAbsSize;
for ( i = 0; i < nItems; i++ )
{
if ( pItems[i]->mnBits & SplitWindowItemFlags::Invisible )
@@ -574,8 +566,8 @@ static void ImplCalcSet( ImplSplitSet* pSet,
if ( nSizeDelta )
{
nAbsItems = 0;
- nSizeWinSize = 0;
- nNewSizeWinSize = 0;
+ long nSizeWinSize = 0;
+ long nNewSizeWinSize = 0;
// first resize absolute items relative
for ( i = 0; i < nItems; i++ )
@@ -646,8 +638,8 @@ static void ImplCalcSet( ImplSplitSet* pSet,
}
// subtract size of individual items
- nErrorSum = nSizeDelta % nCalcItems;
- nCurSizeDelta = nSizeDelta / nCalcItems;
+ long nErrorSum = nSizeDelta % nCalcItems;
+ long nCurSizeDelta = nSizeDelta / nCalcItems;
nMins = 0;
for ( i = 0; i < nItems; i++ )
{
@@ -655,7 +647,8 @@ static void ImplCalcSet( ImplSplitSet* pSet,
nMins++;
else if ( pItems[i]->mbSubSize )
{
- pSize = &(pItems[i]->mnPixSize);
+ long* pSize = &(pItems[i]->mnPixSize);
+ long nTempErr;
if ( nErrorSum )
{
@@ -669,7 +662,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
if ( (*pSize+nCurSizeDelta+nTempErr) <= 0 )
{
- nTemp = *pSize;
+ long nTemp = *pSize;
if ( nTemp )
{
*pSize -= nTemp;
@@ -1468,7 +1461,6 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
// the size is determined according to MainSet
if ( mnWinStyle & WB_SIZEABLE )
{
- long nCurSize;
long nCalcSize = 0;
sal_uInt16 i;
@@ -1484,6 +1476,7 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
{
long nDelta = 0;
Point aPos = GetPosPixel();
+ long nCurSize;
if ( mbHorz )
nCurSize = aNewSize.Height()-mnTopBorder-mnBottomBorder;
@@ -1533,7 +1526,6 @@ void SplitWindow::ImplCalcLayout()
// the size is determined according to MainSet
if ( mnWinStyle & WB_SIZEABLE )
{
- long nCurSize;
long nCalcSize = 0;
sal_uInt16 i;
@@ -1547,6 +1539,7 @@ void SplitWindow::ImplCalcLayout()
if ( i == mpMainSet->mpItems.size() )
{
+ long nCurSize;
if ( mbHorz )
nCurSize = mnDY-mnTopBorder-mnBottomBorder;
else