[Libreoffice-commits] core.git: sfx2/source sw/source

ekuiitr jhaekansh80 at gmail.com
Sat Oct 14 07:53:53 UTC 2017


 sfx2/source/dialog/versdlg.cxx |   12 ++++--------
 sw/source/ui/vba/vbarow.cxx    |    8 +++-----
 2 files changed, 7 insertions(+), 13 deletions(-)

New commits:
commit 2b5b8fd39c93166d9e6e696c010482413b155f78
Author: ekuiitr <jhaekansh80 at gmail.com>
Date:   Fri Oct 13 16:45:29 2017 +0530

    tdf#112689 - Replace chained O(U)StringBuffer::append() with operator+
    
    changed sfx2 module file, converted OUStringBuffer::append() with operator+
    
    Change-Id: Ie85542358875324f9ddadffa01395aebccda9be9
    Reviewed-on: https://gerrit.libreoffice.org/43357
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 17e61ffe3fca..ce9e44fc6aa1 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -236,10 +236,8 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersion
     OUString sHeader1(get<FixedText>("datetime")->GetText());
     OUString sHeader2(get<FixedText>("savedby")->GetText());
     OUString sHeader3(get<FixedText>("comments")->GetText());
-    OUStringBuffer sHeader;
-    sHeader.append(sHeader1).append("\t").append(sHeader2)
-        .append("\t ").append(sHeader3);
-    m_pVersionBox->InsertHeaderEntry(sHeader.makeStringAndClear());
+    OUString sHeader = sHeader1 + "\t" + sHeader2 + "\t" + sHeader3;
+    m_pVersionBox->InsertHeaderEntry(sHeader);
 
     HeaderBar &rBar = m_pVersionBox->GetTheHeaderBar();
     HeaderBarItemBits nBits = rBar.GetItemBits(1) | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::FIXED;
@@ -556,10 +554,8 @@ SfxCmisVersionsDialog::SfxCmisVersionsDialog ( SfxViewFrame* pVwFrame )
     OUString sHeader1(get<FixedText>("datetime")->GetText());
     OUString sHeader2(get<FixedText>("savedby")->GetText());
     OUString sHeader3(get<FixedText>("comments")->GetText());
-    OUStringBuffer sHeader;
-    sHeader.append(sHeader1).append("\t").append(sHeader2)
-        .append("\t ").append(sHeader3);
-    m_pVersionBox->InsertHeaderEntry(sHeader.makeStringAndClear());
+    OUString sHeader = sHeader1 + "\t" + sHeader2 + "\t" + sHeader3;
+    m_pVersionBox->InsertHeaderEntry(sHeader);
 
     HeaderBar &rBar = m_pVersionBox->GetTheHeaderBar();
     HeaderBarItemBits nBits = rBar.GetItemBits(1) | HeaderBarItemBits::FIXEDPOS | HeaderBarItemBits::FIXED;
diff --git a/sw/source/ui/vba/vbarow.cxx b/sw/source/ui/vba/vbarow.cxx
index 67f905a65719..088ecfbfaa53 100644
--- a/sw/source/ui/vba/vbarow.cxx
+++ b/sw/source/ui/vba/vbarow.cxx
@@ -82,18 +82,16 @@ SwVbaRow::Select( )
 
 void SwVbaRow::SelectRow( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XTextTable >& xTextTable, sal_Int32 nStartRow, sal_Int32 nEndRow )
 {
-    OUStringBuffer aRangeName;
-    aRangeName.append('A').append(sal_Int32( nStartRow + 1 ) );
+    OUString aRangeName = "A" + OUString::number(nStartRow + 1);
     SwVbaTableHelper aTableHelper( xTextTable );
     sal_Int32 nColCount = aTableHelper.getTabColumnsCount( nEndRow );
     // FIXME: the column count > 26
     //sal_Char cCol = 'A' + nColCount - 1;
     OUString sCol = SwVbaTableHelper::getColumnStr( nColCount - 1);
-    aRangeName.append(':').append( sCol ).append( sal_Int32( nEndRow + 1 ) );
+    aRangeName += ":" +sCol + OUString::number(nEndRow + 1);
 
     uno::Reference< table::XCellRange > xCellRange( xTextTable, uno::UNO_QUERY_THROW );
-    OUString sSelRange = aRangeName.makeStringAndClear();
-    uno::Reference< table::XCellRange > xSelRange = xCellRange->getCellRangeByName( sSelRange );
+    uno::Reference< table::XCellRange > xSelRange = xCellRange->getCellRangeByName( aRangeName );
 
     uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
     xSelection->select( uno::makeAny( xSelRange ) );


More information about the Libreoffice-commits mailing list