diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-04 14:51:52 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-07 05:56:59 +0000 |
commit | 37a6bafea8416541d7d250d66a9e951400b197a3 (patch) | |
tree | 7569e0394e9efae6ee610c6406f8b684ded9cabf /vcl | |
parent | 5f6e5cb695ff4ab1e17653661d8243d836436a7e (diff) |
loplugin:unuseddefaultparam in various
Change-Id: I03d7381aad055cbe9bd905e4082586073f4112e0
Reviewed-on: https://gerrit.libreoffice.org/22900
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/outdev/text.cxx | 12 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 5 |
2 files changed, 7 insertions, 10 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 3a94f8d63cf3..711196f6db85 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1092,8 +1092,7 @@ long OutputDevice::GetTextArray( const OUString& rStr, long* pDXAry, } bool OutputDevice::GetCaretPositions( const OUString& rStr, long* pCaretXArray, - sal_Int32 nIndex, sal_Int32 nLen, - long* pDXAry ) const + sal_Int32 nIndex, sal_Int32 nLen ) const { if( nIndex >= rStr.getLength() ) @@ -1102,8 +1101,7 @@ bool OutputDevice::GetCaretPositions( const OUString& rStr, long* pCaretXArray, nLen = rStr.getLength() - nIndex; // layout complex text - SalLayout* pSalLayout = ImplLayout( rStr, nIndex, nLen, - Point(0,0), 0, pDXAry ); + SalLayout* pSalLayout = ImplLayout( rStr, nIndex, nLen, Point(0,0) ); if( !pSalLayout ) return false; @@ -2282,10 +2280,10 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr, mpAlphaVDev->DrawCtrlText( rPos, rStr, nIndex, nLen, nStyle, pVector, pDisplayText ); } -long OutputDevice::GetCtrlTextWidth( const OUString& rStr, - sal_Int32 nIndex ) const +long OutputDevice::GetCtrlTextWidth( const OUString& rStr ) const { - sal_Int32 nLen = rStr.getLength() - nIndex; + sal_Int32 nLen = rStr.getLength(); + sal_Int32 nIndex = 0; sal_Int32 nMnemonicPos; OUString aStr = GetNonMnemonicString( rStr, nMnemonicPos ); diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 95f3f4a426ad..8d5bb2aa6760 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -527,8 +527,7 @@ void Menu::InsertItem( const ResId& rResId ) mpLayoutData = nullptr; } -void Menu::InsertItem(const OUString& rCommand, const css::uno::Reference<css::frame::XFrame>& rFrame, - MenuItemBits nBits) +void Menu::InsertItem(const OUString& rCommand, const css::uno::Reference<css::frame::XFrame>& rFrame) { OUString aLabel(CommandInfoProvider::Instance().GetPopupLabelForCommand(rCommand, rFrame)); OUString aTooltip(CommandInfoProvider::Instance().GetTooltipForCommand(rCommand, rFrame)); @@ -536,7 +535,7 @@ void Menu::InsertItem(const OUString& rCommand, const css::uno::Reference<css::f sal_uInt16 nItemId = GetItemCount() + 1; - InsertItem(nItemId, aLabel, aImage, nBits, OString()); + InsertItem(nItemId, aLabel, aImage, MenuItemBits::NONE, OString()); SetItemCommand(nItemId, rCommand); SetHelpText(nItemId, aTooltip); } |