Kaydet (Commit) a0e7d661 authored tarafından Matteo Casalin's avatar Matteo Casalin

Removed unused variable

üst 22dc17dc
...@@ -339,7 +339,6 @@ void ValueSet::Format() ...@@ -339,7 +339,6 @@ void ValueSet::Format()
WinBits nStyle = GetStyle(); WinBits nStyle = GetStyle();
long nTxtHeight = GetTextHeight(); long nTxtHeight = GetTextHeight();
long nOff; long nOff;
long nSpace;
long nNoneHeight; long nNoneHeight;
long nNoneSpace; long nNoneSpace;
ScrollBar* pDelScrBar = NULL; ScrollBar* pDelScrBar = NULL;
...@@ -367,7 +366,6 @@ void ValueSet::Format() ...@@ -367,7 +366,6 @@ void ValueSet::Format()
} }
else else
nOff = 0; nOff = 0;
nSpace = mnSpacing;
// consider size, if NameField does exist // consider size, if NameField does exist
if ( nStyle & WB_NAMEFIELD ) if ( nStyle & WB_NAMEFIELD )
...@@ -388,7 +386,7 @@ void ValueSet::Format() ...@@ -388,7 +386,7 @@ void ValueSet::Format()
if ( nStyle & WB_NONEFIELD ) if ( nStyle & WB_NONEFIELD )
{ {
nNoneHeight = nTxtHeight+nOff; nNoneHeight = nTxtHeight+nOff;
nNoneSpace = nSpace; nNoneSpace = mnSpacing;
if ( nStyle & WB_RADIOSEL ) if ( nStyle & WB_RADIOSEL )
nNoneHeight += 8; nNoneHeight += 8;
} }
...@@ -414,7 +412,7 @@ void ValueSet::Format() ...@@ -414,7 +412,7 @@ void ValueSet::Format()
{ {
if ( mnUserItemWidth ) if ( mnUserItemWidth )
{ {
mnCols = (sal_uInt16)((aWinSize.Width()-nScrBarWidth+nSpace) / (mnUserItemWidth+nSpace)); mnCols = (sal_uInt16)((aWinSize.Width()-nScrBarWidth+mnSpacing) / (mnUserItemWidth+mnSpacing));
if ( !mnCols ) if ( !mnCols )
mnCols = 1; mnCols = 1;
} }
...@@ -437,7 +435,7 @@ void ValueSet::Format() ...@@ -437,7 +435,7 @@ void ValueSet::Format()
mnVisLines = mnUserVisLines; mnVisLines = mnUserVisLines;
else if ( mnUserItemHeight ) else if ( mnUserItemHeight )
{ {
mnVisLines = (nCalcHeight-nNoneSpace+nSpace) / (mnUserItemHeight+nSpace); mnVisLines = (nCalcHeight-nNoneSpace+mnSpacing) / (mnUserItemHeight+mnSpacing);
if ( !mnVisLines ) if ( !mnVisLines )
mnVisLines = 1; mnVisLines = 1;
} }
...@@ -454,8 +452,8 @@ void ValueSet::Format() ...@@ -454,8 +452,8 @@ void ValueSet::Format()
} }
// calculate item size // calculate item size
long nColSpace = (mnCols-1)*nSpace; long nColSpace = (mnCols-1)*mnSpacing;
long nLineSpace = ((mnVisLines-1)*nSpace)+nNoneSpace; long nLineSpace = ((mnVisLines-1)*mnSpacing)+nNoneSpace;
long nItemWidth; long nItemWidth;
long nItemHeight; long nItemHeight;
if ( mnUserItemWidth && !mnUserCols ) if ( mnUserItemWidth && !mnUserCols )
...@@ -583,7 +581,7 @@ void ValueSet::Format() ...@@ -583,7 +581,7 @@ void ValueSet::Format()
// If want also draw parts of items in the last line, // If want also draw parts of items in the last line,
// then we add one more line if parts of these line are // then we add one more line if parts of these line are
// visible // visible
if ( y+(mnVisLines*(nItemHeight+nSpace)) < aWinSize.Height() ) if ( y+(mnVisLines*(nItemHeight+mnSpacing)) < aWinSize.Height() )
nLastItem += mnCols; nLastItem += mnCols;
} }
for ( size_t i = 0; i < nItemCount; i++ ) for ( size_t i = 0; i < nItemCount; i++ )
...@@ -612,10 +610,10 @@ void ValueSet::Format() ...@@ -612,10 +610,10 @@ void ValueSet::Format()
if ( !((i+1) % mnCols) ) if ( !((i+1) % mnCols) )
{ {
x = nStartX; x = nStartX;
y += nItemHeight+nSpace; y += nItemHeight+mnSpacing;
} }
else else
x += nItemWidth+nSpace; x += nItemWidth+mnSpacing;
} }
else else
{ {
...@@ -640,7 +638,7 @@ void ValueSet::Format() ...@@ -640,7 +638,7 @@ void ValueSet::Format()
if ( nStyle & WB_NONEFIELD ) if ( nStyle & WB_NONEFIELD )
{ {
aPos.Y() = nStartY+nNoneHeight+1; aPos.Y() = nStartY+nNoneHeight+1;
aSize.Height() = ((nItemHeight+nSpace)*mnVisLines)-2-nSpace; aSize.Height() = ((nItemHeight+mnSpacing)*mnVisLines)-2-mnSpacing;
} }
mpScrBar->SetPosSizePixel( aPos, aSize ); mpScrBar->SetPosSizePixel( aPos, aSize );
mpScrBar->SetRangeMax( mnLines ); mpScrBar->SetRangeMax( mnLines );
...@@ -2380,7 +2378,6 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol ...@@ -2380,7 +2378,6 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol
Size aSize( rItemSize.Width()*nCalcCols, rItemSize.Height()*nCalcLines ); Size aSize( rItemSize.Width()*nCalcCols, rItemSize.Height()*nCalcLines );
WinBits nStyle = GetStyle(); WinBits nStyle = GetStyle();
long nTxtHeight = GetTextHeight(); long nTxtHeight = GetTextHeight();
long nSpace;
long n; long n;
if ( nStyle & WB_ITEMBORDER ) if ( nStyle & WB_ITEMBORDER )
...@@ -2398,12 +2395,9 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol ...@@ -2398,12 +2395,9 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol
if ( mnSpacing ) if ( mnSpacing )
{ {
nSpace = mnSpacing;
aSize.Width() += mnSpacing*(nCalcCols-1); aSize.Width() += mnSpacing*(nCalcCols-1);
aSize.Height() += mnSpacing*(nCalcLines-1); aSize.Height() += mnSpacing*(nCalcLines-1);
} }
else
nSpace = 0;
if ( nStyle & WB_NAMEFIELD ) if ( nStyle & WB_NAMEFIELD )
{ {
...@@ -2414,7 +2408,7 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol ...@@ -2414,7 +2408,7 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol
if ( nStyle & WB_NONEFIELD ) if ( nStyle & WB_NONEFIELD )
{ {
aSize.Height() += nTxtHeight + n + nSpace; aSize.Height() += nTxtHeight + n + mnSpacing;
if ( nStyle & WB_RADIOSEL ) if ( nStyle & WB_RADIOSEL )
aSize.Height() += 8; aSize.Height() += 8;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment