summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-26 09:36:26 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-26 08:24:32 +0000
commit911ae0aeca443fb4b5e400ae0f939567b580e443 (patch)
tree1b7ef72f8f4c50c9ab7a552743a95b329912a0bc /vcl/source/outdev
parent63e2aec922ec8c0a9011b98dbfd3dac295f473af (diff)
loplugin:unuseddefaultparams in /include/vcl
Change-Id: I36daccd90bfa6ba0ee8b9e76bff2bd8494155a04 Reviewed-on: https://gerrit.libreoffice.org/22710 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/text.cxx33
1 files changed, 10 insertions, 23 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 3f134f4931c0..6ad7eb603715 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1093,8 +1093,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, long nLayoutWidth,
- bool bCellBreaking ) const
+ long* pDXAry, long nLayoutWidth ) const
{
if( nIndex >= rStr.getLength() )
@@ -1147,12 +1146,6 @@ bool OutputDevice::GetCaretPositions( const OUString& rStr, long* pCaretXArray,
pCaretXArray[i] /= nWidthFactor;
}
- // if requested move caret position to cell limits
- if( bCellBreaking )
- {
- ; // FIXME
- }
-
return true;
}
@@ -2290,8 +2283,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr,
}
long OutputDevice::GetCtrlTextWidth( const OUString& rStr,
- sal_Int32 nIndex, sal_Int32 nLen,
- DrawTextFlags nStyle ) const
+ sal_Int32 nIndex, sal_Int32 nLen ) const
{
if(nLen == 0x0FFFF)
{
@@ -2304,21 +2296,16 @@ long OutputDevice::GetCtrlTextWidth( const OUString& rStr,
nLen = rStr.getLength() - nIndex;
}
- if ( nStyle & DrawTextFlags::Mnemonic )
+ sal_Int32 nMnemonicPos;
+ OUString aStr = GetNonMnemonicString( rStr, nMnemonicPos );
+ if ( nMnemonicPos != -1 )
{
- sal_Int32 nMnemonicPos;
- OUString aStr = GetNonMnemonicString( rStr, nMnemonicPos );
- if ( nMnemonicPos != -1 )
- {
- if ( nMnemonicPos < nIndex )
- nIndex--;
- else if ( (nMnemonicPos >= nIndex) && ((sal_uLong)nMnemonicPos < (sal_uLong)(nIndex+nLen)) )
- nLen--;
- }
- return GetTextWidth( aStr, nIndex, nLen );
+ if ( nMnemonicPos < nIndex )
+ nIndex--;
+ else if ( (nMnemonicPos >= nIndex) && ((sal_uLong)nMnemonicPos < (sal_uLong)(nIndex+nLen)) )
+ nLen--;
}
- else
- return GetTextWidth( rStr, nIndex, nLen );
+ return GetTextWidth( aStr, nIndex, nLen );
}
OUString OutputDevice::GetNonMnemonicString( const OUString& rStr, sal_Int32& rMnemonicPos )