[Libreoffice-commits] core.git: 2 commits - sw/source vcl/source
Caolán McNamara
caolanm at redhat.com
Tue Oct 7 13:05:42 PDT 2014
sw/source/ui/frmdlg/column.cxx | 7 ++++---
vcl/source/outdev/text.cxx | 3 ++-
2 files changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 4289c346de432cc94f05aab78a9464350334b11f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 7 17:41:32 2014 +0100
Resolves: fdo#53029 1~ instead of ~1 and 10~ instead of 1~0
regression from 3351ebde48a31173c2fea9f7270224017e1f4412
Date: Sat Mar 29 22:22:42 2014 +0100
OUString: remove temporaries and repeated expressions
but understandable as it was unreadable goo originally
Change-Id: I3ce161bd2628f3a49b14df886ee8d684b248db1c
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 647536a..b1d201e 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -897,16 +897,17 @@ void SwColumnPage::UpdateCols()
void SwColumnPage::SetLabels( sal_uInt16 nVis )
{
+ //insert ~ before the last character, e.g. 1 -> ~1, 10 -> 1~0
const OUString sLbl( '~' );
const OUString sLbl1(OUString::number( nVis + 1 ));
- m_pLbl1->SetText(sLbl1 + sLbl);
+ m_pLbl1->SetText(sLbl1.replaceAt(sLbl1.getLength()-1, 0, sLbl));
const OUString sLbl2(OUString::number( nVis + 2 ));
- m_pLbl2->SetText(sLbl2 + sLbl);
+ m_pLbl2->SetText(sLbl2.replaceAt(sLbl2.getLength()-1, 0, sLbl));
const OUString sLbl3(OUString::number( nVis + 3 ));
- m_pLbl3->SetText(sLbl3 + sLbl);
+ m_pLbl3->SetText(sLbl3.replaceAt(sLbl3.getLength()-1, 0, sLbl));
const OUString sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
aEd1.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl1));
commit 31d2f8ab0f572a11482e9aec096d51b984ec36d9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 7 15:00:48 2014 +0100
coverity#1000506 Unchecked return value
Change-Id: I71e824e7f0e279582f12d5cb9443a4177551a705
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index defb3b9..6919746 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1409,7 +1409,8 @@ bool OutputDevice::GetTextIsRTL( const OUString& rString, sal_Int32 nIndex, sal_
ImplLayoutArgs aArgs = ImplPrepareLayoutArgs( aStr, nIndex, nLen, 0, NULL );
bool bRTL = false;
int nCharPos = -1;
- aArgs.GetNextPos( &nCharPos, &bRTL );
+ if (!aArgs.GetNextPos(&nCharPos, &bRTL))
+ return false;
return (nCharPos != nIndex);
}
More information about the Libreoffice-commits
mailing list