[Libreoffice-commits] core.git: Changes to 'refs/changes/00/2300/1'

2014-09-29 Thread Andrew Branch

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/00/2300/2'

2014-09-29 Thread Andrew Branch

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-02-21 Thread Andrew Branch
 sw/source/core/access/accmap.cxx  |4 +---
 sw/source/core/access/accportions.cxx |   20 +++-
 sw/source/core/access/acctable.cxx|   26 +-
 3 files changed, 13 insertions(+), 37 deletions(-)

New commits:
commit 868cb16417f7a4c9bdbb55b6262eddad3db6dc14
Author: Andrew Branch 
Date:   Wed Feb 20 20:43:58 2013 +

fdo#57950: Remove some chained appends in filter in sw/access

Change-Id: I9f3b44d6ea154d628dd59e31d9403097809a2853
Reviewed-on: https://gerrit.libreoffice.org/2300
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 4f737a8..513c195 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -175,9 +175,7 @@ void SwDrawModellListener_Impl::Notify( SfxBroadcaster& 
/*rBC*/,
 {
 (void)r;
 #if OSL_DEBUG_LEVEL > 0
-rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM("Runtime 
exception caught while notifying shape.:\n"));
-aError.append(rtl::OUStringToOString(r.Message, 
RTL_TEXTENCODING_ASCII_US));
-OSL_FAIL( aError.getStr() );
+  OSL_FAIL( "Runtime exception caught while notifying shape.:\n" + 
OUStringToOString(r.Message, RTL_TEXTENCODING_ASCII_US) );
 #endif
 }
 }
diff --git a/sw/source/core/access/accportions.cxx 
b/sw/source/core/access/accportions.cxx
index 8e1e2ff..5b2e0ac 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -141,40 +141,34 @@ void SwAccessiblePortionData::Special(
 
 // construct string with representation; either directly from
 // rText, or use resources for special case portions
-String sDisplay;
+OUString sDisplay;
 switch( nType )
 {
 case POR_POSTITS:
 case POR_FLYCNT:
 case POR_GRFNUM:
-sDisplay = rtl::OUString(sal_Unicode(0xfffc));
+sDisplay = OUString(sal_Unicode(0xfffc));
 
 break;
 case POR_NUMBER:
 {
-OUStringBuffer aTmpBuffer( rText.Len() + 1 );
-aTmpBuffer.append( rText );
-aTmpBuffer.append( sal_Unicode(' ') );
-sDisplay = aTmpBuffer.makeStringAndClear();
+sDisplay = OUString( rText ) + " ";
 break;
 }
 // #i111768# - apply patch from kstribley:
 // Include the control characters.
 case POR_CONTROLCHAR:
 {
-OUStringBuffer aTmpBuffer( rText.Len() + 1 );
-aTmpBuffer.append( rText );
-aTmpBuffer.append( pTxtNode->GetTxt()[nModelPosition] );
-sDisplay = aTmpBuffer.makeStringAndClear();
+sDisplay = OUString( rText ) + OUString( 
pTxtNode->GetTxt()[nModelPosition] );
 break;
 }
 default:
-sDisplay = rText;
+sDisplay = OUString( rText );
 break;
 }
 
 // ignore zero/zero portions (except for terminators)
-if( (nLength == 0) && (sDisplay.Len() == 0) && (nType != POR_TERMINATE) )
+if( (nLength == 0) && (sDisplay.getLength() == 0) && (nType != 
POR_TERMINATE) )
 return;
 
 // special treatment for zero length portion at the beginning:
@@ -194,7 +188,7 @@ void SwAccessiblePortionData::Special(
 aPortionAttrs.push_back( nAttr );
 
 // update buffer + nModelPosition
-aBuffer.append( OUString(sDisplay) );
+aBuffer.append( sDisplay );
 nModelPosition += nLength;
 
 // remember 'last' special portion (unless it's our own 'closing'
diff --git a/sw/source/core/access/acctable.cxx 
b/sw/source/core/access/acctable.cxx
index 1db6a38..d50c806 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -692,12 +692,7 @@ SwAccessibleTable::SwAccessibleTable(
 const_cast< SwFrmFmt * >( pFrmFmt )->Add( this );
 const String& rName = pFrmFmt->GetName();
 
-OUStringBuffer aBuffer( rName.Len() + 4 );
-aBuffer.append( OUString(rName) );
-aBuffer.append( static_cast( '-' ) );
-aBuffer.append( static_cast( pTabFrm->GetPhyPageNum() ) );
-
-SetName( aBuffer.makeStringAndClear() );
+SetName( OUString( rName ) + "-" + OUString::number( 
pTabFrm->GetPhyPageNum() ) );
 
 OUString sArg1( static_cast< const SwTabFrm * >( GetFrm() )
 ->GetFmt()->GetName() );
@@ -728,12 +723,9 @@ void SwAccessibleTable::Modify( const SfxPoolItem* pOld, 
const SfxPoolItem *pNew
 OUString sOldName( GetName() );
 
 const String& rNewTabName = pFrmFmt->GetName();
-OUStringBuffer aBuffer( rNewTabName.Len() + 4 );
-aBuffer.append( OUString(rNewTabName) );
-aBuffer.append( static_cast( '-&#

License Statement

2013-02-19 Thread Andrew Branch
Hi,

All of my past & future contributions to LibreOffice may be licensed
under the MPL/LGPLv3+ dual license.

Thanks,

Andrew Branch.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice