summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/bitmap/BitmapTools.cxx8
-rw-r--r--vcl/source/control/button.cxx69
-rw-r--r--vcl/source/control/edit.cxx13
-rw-r--r--vcl/source/control/field.cxx8
-rw-r--r--vcl/source/control/fixed.cxx38
-rw-r--r--vcl/source/gdi/alpha.cxx4
-rw-r--r--vcl/source/gdi/bitmapex.cxx8
-rw-r--r--vcl/source/gdi/gdimtf.cxx28
-rw-r--r--vcl/source/helper/commandinfoprovider.cxx11
-rw-r--r--vcl/source/window/cursor.cxx4
-rw-r--r--vcl/source/window/decoview.cxx25
11 files changed, 78 insertions, 138 deletions
diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx
index a82b95ca924c..f476ca0065e7 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -29,7 +29,7 @@ using drawinglayer::primitive2d::Primitive2DReference;
namespace vcl
{
-void BitmapTools::loadFromSvg(SvStream& rStream, const OUString& sPath, BitmapEx& rBitmapEx, double fScalingFactor, const Size& aSize)
+void BitmapTools::loadFromSvg(SvStream& rStream, const OUString& sPath, BitmapEx& rBitmapEx, double fScalingFactor)
{
uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
const uno::Reference<graphic::XSvgParser> xSvgParser = graphic::SvgTools::create(xContext);
@@ -62,12 +62,10 @@ void BitmapTools::loadFromSvg(SvStream& rStream, const OUString& sPath, BitmapEx
}
}
- bool bIsSizeEmpty = (aSize.Width() == 0 && aSize.Height() == 0);
-
aRealRect.X1 = 0;
aRealRect.Y1 = 0;
- aRealRect.X2 = bIsSizeEmpty ? (aSize.Width() * 2540 / 90) : aRange.getMaxX() - aRange.getMinX();
- aRealRect.Y2 = bIsSizeEmpty ? (aSize.Height() * 2540 / 90) : aRange.getMaxY() - aRange.getMinY();
+ aRealRect.X2 = aRange.getMaxX() - aRange.getMinX();
+ aRealRect.Y2 = aRange.getMaxY() - aRange.getMinY();
double nDPI = 90 * fScalingFactor;
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 68b36953e2c6..97808a3da623 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -571,9 +571,9 @@ void Button::ImplSetSymbolAlign( SymbolAlign eAlign )
}
}
-void Button::SetSmallSymbol(bool bSmall)
+void Button::SetSmallSymbol()
{
- mpButtonData->mbSmallSymbol = bSmall;
+ mpButtonData->mbSmallSymbol = true;
}
void Button::EnableImageDisplay( bool bEnable )
@@ -938,10 +938,9 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
pDev->Pop(); // restore clipregion
}
-void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLayout)
+void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
{
- if (!bLayout)
- HideFocus();
+ HideFocus();
DrawButtonFlags nButtonStyle = ImplGetButtonState();
Point aPoint;
@@ -1088,7 +1087,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLa
// draw content using the same aInRect as non-native VCL would do
ImplDrawPushButtonContent(&rRenderContext, (nState&ControlState::ROLLOVER) ? DrawFlags::NoRollover : DrawFlags::NONE,
- aInRect, bLayout, bDrawMenuSep);
+ aInRect, false/*bLayout*/, bDrawMenuSep);
if (HasFocus())
ShowFocus(ImplGetFocusRect());
@@ -1100,7 +1099,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLa
if (GetStyle() & WB_FLATBUTTON)
{
Rectangle aTempRect(aInRect);
- if (!bLayout && bRollOver)
+ if (bRollOver)
ImplDrawPushButtonFrame(rRenderContext, aTempRect, nButtonStyle);
aInRect.Left() += 2;
aInRect.Top() += 2;
@@ -1109,14 +1108,13 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLa
}
else
{
- if (!bLayout)
- ImplDrawPushButtonFrame(rRenderContext, aInRect, nButtonStyle);
+ ImplDrawPushButtonFrame(rRenderContext, aInRect, nButtonStyle);
}
// draw content
- ImplDrawPushButtonContent(&rRenderContext, DrawFlags::NONE, aInRect, bLayout, bDrawMenuSep);
+ ImplDrawPushButtonContent(&rRenderContext, DrawFlags::NONE, aInRect, false/*bLayout*/, bDrawMenuSep);
- if (!bLayout && HasFocus())
+ if (HasFocus())
{
ShowFocus(ImplGetFocusRect());
}
@@ -1634,7 +1632,7 @@ void PushButton::EndSelection()
}
}
-Size PushButton::CalcMinimumSize( long nMaxWidth ) const
+Size PushButton::CalcMinimumSize() const
{
Size aSize;
@@ -1654,7 +1652,7 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const
}
if ( !PushButton::GetText().isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText) )
{
- Size textSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
+ Size textSize = GetTextRect( Rectangle( Point(), Size( 0x7fffffff, 0x7fffffff ) ),
PushButton::GetText(), ImplGetTextStyle( DrawFlags::NONE ) ).GetSize();
aSize.Width() += textSize.Width();
aSize.Height() = std::max( aSize.Height(), long( textSize.Height() * 1.15 ) );
@@ -2152,10 +2150,9 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
pDev->Pop();
}
-void RadioButton::ImplDrawRadioButton(vcl::RenderContext& rRenderContext, bool bLayout)
+void RadioButton::ImplDrawRadioButton(vcl::RenderContext& rRenderContext)
{
- if (!bLayout)
- HideFocus();
+ HideFocus();
Size aImageSize;
if (!maImage)
@@ -2168,15 +2165,12 @@ void RadioButton::ImplDrawRadioButton(vcl::RenderContext& rRenderContext, bool b
// Draw control text
ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel(),
- aImageSize, maStateRect, maMouseRect, bLayout);
+ aImageSize, maStateRect, maMouseRect);
- if (!bLayout || rRenderContext.IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL))
- {
- if (!maImage && HasFocus())
- ShowFocus(ImplGetFocusRect());
+ if (!maImage && HasFocus())
+ ShowFocus(ImplGetFocusRect());
- ImplDrawRadioButtonState(rRenderContext);
- }
+ ImplDrawRadioButtonState(rRenderContext);
}
void RadioButton::group(RadioButton &rOther)
@@ -2887,7 +2881,7 @@ void RadioButton::ImplSetMinimumNWFSize()
Pop();
}
-Size RadioButton::CalcMinimumSize( long nMaxWidth ) const
+Size RadioButton::CalcMinimumSize() const
{
Size aSize;
if ( !maImage )
@@ -2904,16 +2898,7 @@ Size RadioButton::CalcMinimumSize( long nMaxWidth ) const
{
bool bTopImage = (GetStyle() & WB_TOP) != 0;
- if (!bTopImage)
- {
- nMaxWidth -= aSize.Width();
- nMaxWidth -= ImplGetImageToTextDistance();
- }
-
- // subtract what will be added later
- nMaxWidth-=2;
-
- Size aTextSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth > 0 ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
+ Size aTextSize = GetTextRect( Rectangle( Point(), Size( 0x7fffffff, 0x7fffffff ) ),
aText, FixedText::ImplGetTextStyle( GetStyle() ) ).GetSize();
aSize.Width()+=2; // for focus rect
@@ -3191,24 +3176,20 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
pDev->Pop();
}
-void CheckBox::ImplDrawCheckBox(vcl::RenderContext& rRenderContext, bool bLayout)
+void CheckBox::ImplDrawCheckBox(vcl::RenderContext& rRenderContext)
{
Size aImageSize = ImplGetCheckImageSize();
aImageSize.Width() = CalcZoom( aImageSize.Width() );
aImageSize.Height() = CalcZoom( aImageSize.Height() );
- if (!bLayout)
- HideFocus();
+ HideFocus();
ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel(),
- aImageSize, maStateRect, maMouseRect, bLayout);
+ aImageSize, maStateRect, maMouseRect, false/*bLayout*/);
- if (!bLayout)
- {
- ImplDrawCheckBoxState(rRenderContext);
- if (HasFocus())
- ShowFocus(ImplGetFocusRect());
- }
+ ImplDrawCheckBoxState(rRenderContext);
+ if (HasFocus())
+ ShowFocus(ImplGetFocusRect());
}
void CheckBox::ImplCheck()
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 5af9723e181c..d59d2b5b281f 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -491,7 +491,7 @@ long Edit::ImplGetTextYPosition() const
return ( GetOutputSizePixel().Height() - GetTextHeight() ) / 2;
}
-void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRectangle, bool bLayout)
+void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRectangle)
{
if (!IsReallyVisible())
return;
@@ -519,17 +519,6 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRec
long nTH = GetTextHeight();
Point aPos(mnXOffset, ImplGetTextYPosition());
- if (bLayout)
- {
- aPos.X() = mnXOffset + ImplGetExtraXOffset();
-
- MetricVector* pVector = &mpControlData->mpLayoutData->m_aUnicodeBoundRects;
- OUString* pDisplayText = &mpControlData->mpLayoutData->m_aDisplayText;
-
- rRenderContext.DrawText(aPos, aText, 0, nLen, pVector, pDisplayText);
- return;
- }
-
vcl::Cursor* pCursor = GetCursor();
bool bVisCursor = pCursor && pCursor->IsVisible();
if (pCursor)
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 99ac514401ec..75565c5be564 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1560,11 +1560,11 @@ void MetricFormatter::SetBaseValue( sal_Int64 nNewBase, FieldUnit eInUnit )
eInUnit, meUnit );
}
-sal_Int64 MetricFormatter::GetBaseValue( FieldUnit eOutUnit ) const
+sal_Int64 MetricFormatter::GetBaseValue() const
{
// convert to requested units
return MetricField::ConvertValue( mnBaseValue, mnBaseValue, GetDecimalDigits(),
- meUnit, eOutUnit );
+ meUnit, FUNIT_NONE );
}
void MetricFormatter::Reformat()
@@ -1889,7 +1889,7 @@ void MetricBox::InsertValue( sal_Int64 nValue, FieldUnit eInUnit, sal_Int32 nPos
ComboBox::InsertEntry( CreateFieldText( nValue ), nPos );
}
-sal_Int64 MetricBox::GetValue( sal_Int32 nPos, FieldUnit eOutUnit ) const
+sal_Int64 MetricBox::GetValue( sal_Int32 nPos ) const
{
double nValue = 0;
ImplMetricGetValue( ComboBox::GetEntry( nPos ), nValue, mnBaseValue,
@@ -1897,7 +1897,7 @@ sal_Int64 MetricBox::GetValue( sal_Int32 nPos, FieldUnit eOutUnit ) const
// convert to previously configured units
sal_Int64 nRetValue = MetricField::ConvertValue( (sal_Int64)nValue, mnBaseValue, GetDecimalDigits(),
- meUnit, eOutUnit );
+ meUnit, FUNIT_NONE );
return nRetValue;
}
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 2c0a62a0ac87..98532d8c4771 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -513,7 +513,7 @@ const Color& FixedLine::GetCanonicalTextColor( const StyleSettings& _rStyle ) co
return _rStyle.GetGroupTextColor();
}
-void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
+void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext)
{
// we need to measure according to the window, not according to the
// RenderContext we paint to
@@ -521,24 +521,19 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
OUString aText = GetText();
WinBits nWinStyle = GetStyle();
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
DecorationView aDecoView(&rRenderContext);
if (aText.isEmpty())
{
- if (!pVector)
+ if (nWinStyle & WB_VERT)
{
- if (nWinStyle & WB_VERT)
- {
- long nX = (aOutSize.Width() - 1) / 2;
- aDecoView.DrawSeparator(Point(nX, 0), Point(nX, aOutSize.Height() - 1));
- }
- else
- {
- long nY = (aOutSize.Height() - 1) / 2;
- aDecoView.DrawSeparator(Point(0, nY), Point(aOutSize.Width() - 1, nY), false);
- }
+ long nX = (aOutSize.Width() - 1) / 2;
+ aDecoView.DrawSeparator(Point(nX, 0), Point(nX, aOutSize.Height() - 1));
+ }
+ else
+ {
+ long nY = (aOutSize.Height() - 1) / 2;
+ aDecoView.DrawSeparator(Point(0, nY), Point(aOutSize.Width() - 1, nY), false);
}
}
else if (nWinStyle & WB_VERT)
@@ -553,7 +548,7 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
aStartPt.Y() -= (aOutSize.Height() - nWidth) / 2;
Point aTextPt(aStartPt);
aTextPt.X() -= GetTextHeight() / 2;
- rRenderContext.DrawText(aTextPt, aText, 0, aText.getLength(), pVector, pDisplayText);
+ rRenderContext.DrawText(aTextPt, aText, 0, aText.getLength());
rRenderContext.Pop();
if (aOutSize.Height() - aStartPt.Y() > FIXEDLINE_TEXT_BORDER)
aDecoView.DrawSeparator(Point(aStartPt.X(), aOutSize.Height() - 1),
@@ -577,15 +572,12 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
if (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono)
nStyle |= DrawTextFlags::Mono;
- DrawControlText(*this, aRect, aText, nStyle, pVector, pDisplayText);
+ DrawControlText(*this, aRect, aText, nStyle, nullptr, nullptr);
- if (!pVector)
- {
- long nTop = aRect.Top() + ((aRect.GetHeight() - 1) / 2);
- aDecoView.DrawSeparator(Point(aRect.Right() + FIXEDLINE_TEXT_BORDER, nTop), Point(aOutSize.Width() - 1, nTop), false);
- if (aRect.Left() > FIXEDLINE_TEXT_BORDER)
- aDecoView.DrawSeparator(Point(0, nTop), Point(aRect.Left() - FIXEDLINE_TEXT_BORDER, nTop), false);
- }
+ long nTop = aRect.Top() + ((aRect.GetHeight() - 1) / 2);
+ aDecoView.DrawSeparator(Point(aRect.Right() + FIXEDLINE_TEXT_BORDER, nTop), Point(aOutSize.Width() - 1, nTop), false);
+ if (aRect.Left() > FIXEDLINE_TEXT_BORDER)
+ aDecoView.DrawSeparator(Point(0, nTop), Point(aRect.Left() - FIXEDLINE_TEXT_BORDER, nTop), false);
}
}
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index f3217b295f84..614eb404705f 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -106,13 +106,11 @@ bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency )
return bRet;
}
-bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency, sal_uLong nTol )
+bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency )
{
BitmapWriteAccess* pAcc = AcquireWriteAccess();
bool bRet = false;
- DBG_ASSERT( !nTol, "AlphaMask::Replace: nTol not used yet" );
-
if( pAcc && pAcc->GetBitCount() == 8 )
{
const long nWidth = pAcc->Width(), nHeight = pAcc->Height();
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index c98acddcac0f..cef43f7627d0 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -616,14 +616,14 @@ bool BitmapEx::Erase( const Color& rFillColor )
return bRet;
}
-bool BitmapEx::Dither( BmpDitherFlags nDitherFlags )
+bool BitmapEx::Dither()
{
- return !!aBitmap && aBitmap.Dither( nDitherFlags );
+ return !!aBitmap && aBitmap.Dither();
}
-bool BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol )
+bool BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor )
{
- return !!aBitmap && aBitmap.Replace( rSearchColor, rReplaceColor, nTol );
+ return !!aBitmap && aBitmap.Replace( rSearchColor, rReplaceColor );
}
bool BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, const sal_uLong* pTols )
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 4c586872fedd..0fea0d01f669 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -306,7 +306,7 @@ void GDIMetaFile::Record( OutputDevice* pOut )
Linker( pOut, true );
}
-void GDIMetaFile::Play( GDIMetaFile& rMtf, size_t nPos )
+void GDIMetaFile::Play( GDIMetaFile& rMtf )
{
if ( !bRecord && !rMtf.bRecord )
{
@@ -315,10 +315,7 @@ void GDIMetaFile::Play( GDIMetaFile& rMtf, size_t nPos )
rMtf.UseCanvas( rMtf.GetUseCanvas() || bUseCanvas );
- if( nPos > nObjCount )
- nPos = nObjCount;
-
- for( size_t nCurPos = nCurrentActionElement; nCurPos < nPos; nCurPos++ )
+ for( size_t nCurPos = nCurrentActionElement; nCurPos < nObjCount; nCurPos++ )
{
if( pAction )
{
@@ -525,7 +522,7 @@ void GDIMetaFile::ImplDelegate2PluggableRenderer( const MetaCommentAction* pAct,
}
void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
- const Size& rSize, size_t nPos )
+ const Size& rSize )
{
vcl::Region aDrawClipRegion;
MapMode aDrawMap( GetPrefMapMode() );
@@ -582,7 +579,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
pOut->SetLayoutMode( TEXT_LAYOUT_DEFAULT );
pOut->SetDigitLanguage( 0 );
- Play( pOut, nPos );
+ Play( pOut );
pOut->Pop();
}
@@ -2284,7 +2281,7 @@ void GDIMetaFile::Convert( MtfConversion eConversion )
}
}
-void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, sal_uLong* pTols )
+void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount )
{
ImplColReplaceParam aColParam;
ImplBmpReplaceParam aBmpParam;
@@ -2298,20 +2295,19 @@ void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pRepla
for( sal_uLong i = 0; i < nColorCount; i++ )
{
- const long nTol = pTols ? ( pTols[ i ] * 255 ) / 100 : 0;
long nVal;
nVal = pSearchColors[ i ].GetRed();
- aColParam.pMinR[ i ] = (sal_uLong) std::max( nVal - nTol, 0L );
- aColParam.pMaxR[ i ] = (sal_uLong) std::min( nVal + nTol, 255L );
+ aColParam.pMinR[ i ] = (sal_uLong) std::max( nVal, 0L );
+ aColParam.pMaxR[ i ] = (sal_uLong) std::min( nVal, 255L );
nVal = pSearchColors[ i ].GetGreen();
- aColParam.pMinG[ i ] = (sal_uLong) std::max( nVal - nTol, 0L );
- aColParam.pMaxG[ i ] = (sal_uLong) std::min( nVal + nTol, 255L );
+ aColParam.pMinG[ i ] = (sal_uLong) std::max( nVal, 0L );
+ aColParam.pMaxG[ i ] = (sal_uLong) std::min( nVal, 255L );
nVal = pSearchColors[ i ].GetBlue();
- aColParam.pMinB[ i ] = (sal_uLong) std::max( nVal - nTol, 0L );
- aColParam.pMaxB[ i ] = (sal_uLong) std::min( nVal + nTol, 255L );
+ aColParam.pMinB[ i ] = (sal_uLong) std::max( nVal, 0L );
+ aColParam.pMaxB[ i ] = (sal_uLong) std::min( nVal, 255L );
}
aColParam.pDstCols = pReplaceColors;
@@ -2320,7 +2316,7 @@ void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pRepla
aBmpParam.pSrcCols = pSearchColors;
aBmpParam.pDstCols = pReplaceColors;
aBmpParam.nCount = nColorCount;
- aBmpParam.pTols = pTols;
+ aBmpParam.pTols = nullptr;
ImplExchangeColors( ImplColReplaceFnc, &aColParam, ImplBmpReplaceFnc, &aBmpParam );
diff --git a/vcl/source/helper/commandinfoprovider.cxx b/vcl/source/helper/commandinfoprovider.cxx
index 95f252a2f1da..6cf0adf4cb53 100644
--- a/vcl/source/helper/commandinfoprovider.cxx
+++ b/vcl/source/helper/commandinfoprovider.cxx
@@ -158,8 +158,7 @@ OUString CommandInfoProvider::GetPopupLabelForCommand (
OUString CommandInfoProvider::GetTooltipForCommand (
const OUString& rsCommandName,
- const Reference<frame::XFrame>& rxFrame,
- bool bIncludeShortcut)
+ const Reference<frame::XFrame>& rxFrame)
{
SetFrame(rxFrame);
@@ -167,11 +166,9 @@ OUString CommandInfoProvider::GetTooltipForCommand (
if (sLabel.isEmpty())
sLabel = GetCommandProperty("Name", rsCommandName);
- if (bIncludeShortcut) {
- const OUString sShortCut(GetCommandShortcut(rsCommandName, rxFrame));
- if (!sShortCut.isEmpty())
- return sLabel + " (" + sShortCut + ")";
- }
+ const OUString sShortCut(GetCommandShortcut(rsCommandName, rxFrame));
+ if (!sShortCut.isEmpty())
+ return sLabel + " (" + sShortCut + ")";
return sLabel;
}
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 738ff0d3418c..0e8a6771c3ae 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -222,9 +222,9 @@ bool vcl::Cursor::ImplDoHide( bool bSuspend )
return bWasCurVisible;
}
-void vcl::Cursor::ImplShow( bool bDrawDirect )
+void vcl::Cursor::ImplShow()
{
- ImplDoShow( bDrawDirect, false );
+ ImplDoShow( true/*bDrawDirect*/, false );
}
void vcl::Cursor::ImplHide( bool i_bStopTimer )
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index d7d6b23cee85..6741171bec6c 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -1092,7 +1092,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
mpOutDev->Pop();
}
-void DecorationView::DrawHandle(const Rectangle& rRect, bool bVertical)
+void DecorationView::DrawHandle(const Rectangle& rRect)
{
const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
@@ -1104,31 +1104,20 @@ void DecorationView::DrawHandle(const Rectangle& rRect, bool bVertical)
const sal_Int32 nNumberOfPoints = 3;
long nHalfWidth = aOutputSize.Width() / 2.0f;
- long nHalfHeight = aOutputSize.Height() / 2.0f;
- float fDistance = bVertical ? aOutputSize.Height() : aOutputSize.Width();
+ float fDistance = aOutputSize.Height();
fDistance /= (nNumberOfPoints + 1);
- long nRadius = bVertical ? aOutputSize.Width() : aOutputSize.Height();
+ long nRadius = aOutputSize.Width();
nRadius /= (nNumberOfPoints + 2);
for (long i = 1; i <= nNumberOfPoints; i++)
{
Rectangle aLocation;
- if (bVertical)
- {
- aLocation = Rectangle(nHalfWidth - nRadius,
- round(fDistance * i) - nRadius,
- nHalfWidth + nRadius,
- round(fDistance * i) + nRadius);
- }
- else
- {
- aLocation = Rectangle(round(fDistance * i) - nRadius,
- nHalfHeight - nRadius,
- round(fDistance * i) + nRadius,
- nHalfHeight + nRadius);
- }
+ aLocation = Rectangle(nHalfWidth - nRadius,
+ round(fDistance * i) - nRadius,
+ nHalfWidth + nRadius,
+ round(fDistance * i) + nRadius);
mpOutDev->DrawEllipse(aLocation);
}
}