diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-20 21:36:09 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-21 09:29:09 +0100 |
commit | 3e4269deb560f2f3f8156edd530bae96a8c7dbb1 (patch) | |
tree | 4a4e9c854292e7083759b5333d4a78fbd5099fd3 | |
parent | 89493bd815436638b1da3852362d75bdac3d43ae (diff) |
ByteString::CreateFromInt32->rtl::OStringBuffer::append
-rw-r--r-- | svtools/source/svhtml/htmlout.cxx | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index b1b428d8fd3b..f1d56f7f6fc5 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -658,11 +658,16 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, (const IMapRectangleObject *)pObj; pShape = OOO_STRING_SVTOOLS_HTML_SH_rect; Rectangle aRect( pRectObj->GetRectangle() ); - ((((((aCoords = - ByteString::CreateFromInt32(aRect.Left())) += ',') - += ByteString::CreateFromInt32(aRect.Top())) += ',') - += ByteString::CreateFromInt32(aRect.Right())) += ',') - += ByteString::CreateFromInt32(aRect.Bottom()); + + aCoords = rtl::OStringBuffer() + .append(static_cast<sal_Int32>(aRect.Left())) + .append(',') + .append(static_cast<sal_Int32>(aRect.Top())) + .append(',') + .append(static_cast<sal_Int32>(aRect.Right())) + .append(',') + .append(static_cast<sal_Int32>(aRect.Bottom())) + .makeStringAndClear(); } break; case( IMAP_OBJ_CIRCLE ): @@ -672,10 +677,14 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, pShape= OOO_STRING_SVTOOLS_HTML_SH_circ; Point aCenter( pCirc->GetCenter() ); long nOff = pCirc->GetRadius(); - ((((aCoords = - ByteString::CreateFromInt32(aCenter.X())) += ',') - += ByteString::CreateFromInt32(aCenter.Y())) += ',') - += ByteString::CreateFromInt32(nOff); + + aCoords = rtl::OStringBuffer() + .append(static_cast<sal_Int32>(aCenter.X())) + .append(',') + .append(static_cast<sal_Int32>(aCenter.Y())) + .append(',') + .append(static_cast<sal_Int32>(nOff)) + .makeStringAndClear(); } break; case( IMAP_OBJ_POLYGON ): @@ -685,20 +694,23 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, pShape= OOO_STRING_SVTOOLS_HTML_SH_poly; Polygon aPoly( pPolyObj->GetPolygon() ); sal_uInt16 nCount = aPoly.GetSize(); + rtl::OStringBuffer aTmpBuf; if( nCount>0 ) { const Point& rPoint = aPoly[0]; - ((aCoords = - ByteString::CreateFromInt32(rPoint.X())) += ',') - += ByteString::CreateFromInt32(rPoint.Y()); + aTmpBuf.append(static_cast<sal_Int32>(rPoint.X())) + .append(',') + .append(static_cast<sal_Int32>(rPoint.Y())); } for( sal_uInt16 j=1; j<nCount; j++ ) { const Point& rPoint = aPoly[j]; - (((aCoords += ',') - += ByteString::CreateFromInt32(rPoint.X())) += ',') - += ByteString::CreateFromInt32(rPoint.Y()); + aTmpBuf.append(',') + .append(static_cast<sal_Int32>(rPoint.X())) + .append(',') + .append(static_cast<sal_Int32>(rPoint.Y())); } + aCoords = aTmpBuf.makeStringAndClear(); } break; default: |