summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-13 17:01:32 +0200
committerNoel Grandin <noel@peralex.com>2013-09-17 09:05:05 +0200
commit9d2016516b384e79fc0a80639ea4ae8356e5d98a (patch)
tree2be4a17bb3d638aa7912573b1a58ee72d697ac83 /filter
parentda57d51f12e6f9c0e1eba262bfe727c414c5d7c9 (diff)
convert filter/source/flash/swfwriter.hxx from String to OUString
Change-Id: I161a63399522cc92f833361195c2c86fdce18204
Diffstat (limited to 'filter')
-rw-r--r--filter/source/flash/swfwriter.hxx4
-rw-r--r--filter/source/flash/swfwriter1.cxx16
2 files changed, 9 insertions, 11 deletions
diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx
index 1bd30aff9429..e615c4d75ad2 100644
--- a/filter/source/flash/swfwriter.hxx
+++ b/filter/source/flash/swfwriter.hxx
@@ -360,8 +360,8 @@ private:
void Impl_writePolygon( const Polygon& rPoly, sal_Bool bFilled, const Color& rFillColor, const Color& rLineColor );
void Impl_writePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bFilled, sal_uInt8 nTransparence = 0);
void Impl_writePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bFilled, const Color& rFillColor, const Color& rLineColor );
- void Impl_writeText( const Point& rPos, const String& rText, const sal_Int32* pDXArray, long nWidth );
- void Impl_writeText( const Point& rPos, const String& rText, const sal_Int32* pDXArray, long nWidth, Color aTextColor );
+ void Impl_writeText( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, long nWidth );
+ void Impl_writeText( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, long nWidth, Color aTextColor );
void Impl_writeGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
void Impl_writeLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL );
void Impl_writeRect( const Rectangle& rRect, long nRadX, long nRadY );
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index f19f69826e52..34ef03344d01 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -407,7 +407,7 @@ FlashFont& Writer::Impl_getFont( const Font& rFont )
// -----------------------------------------------------------------------------
-void Writer::Impl_writeText( const Point& rPos, const String& rText, const sal_Int32* pDXArray, long nWidth )
+void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, long nWidth )
{
const FontMetric aMetric( mpVDev->GetFontMetric() );
@@ -495,9 +495,9 @@ void Writer::Impl_writeText( const Point& rPos, const String& rText, const sal_I
}
}
-void Writer::Impl_writeText( const Point& rPos, const String& rText, const sal_Int32* pDXArray, long nWidth, Color aTextColor )
+void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, long nWidth, Color aTextColor )
{
- sal_uInt32 nLen = rText.Len();
+ sal_Int32 nLen = rText.getLength();
if( !nLen )
return;
@@ -547,14 +547,13 @@ void Writer::Impl_writeText( const Point& rPos, const String& rText, const sal_I
if( nLen > 1 )
{
- aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( OUString(rText.GetChar((sal_uInt16) nLen - 1)) );
+ aNormSize.Width() = pDX[ nLen - 2 ] + mpVDev->GetTextWidth( OUString(rText[nLen - 1]) );
if( nWidth && aNormSize.Width() && ( nWidth != aNormSize.Width() ) )
{
const double fFactor = (double) nWidth / aNormSize.Width();
- sal_uInt32 i;
- for( i = 0; i < ( nLen - 1 ); i++ )
+ for( sal_Int32 i = 0; i < ( nLen - 1 ); i++ )
pDX[ i ] = FRound( pDX[ i ] * fFactor );
}
}
@@ -656,8 +655,7 @@ void Writer::Impl_writeText( const Point& rPos, const String& rText, const sal_I
sal_Int32 nLastDX = 0;
sal_Int32 nAdvance;
- sal_uInt32 i;
- for( i = 0; i < nLen; i++ )
+ for( sal_Int32 i = 0; i < nLen; i++ )
{
if( i < (nLen-1) )
{
@@ -669,7 +667,7 @@ void Writer::Impl_writeText( const Point& rPos, const String& rText, const sal_I
nAdvance = 0;
}
- aBits.writeUB( rFlashFont.getGlyph(rText.GetChar(_uInt16(i)),mpVDev), nGlyphBits );
+ aBits.writeUB( rFlashFont.getGlyph(rText[i],mpVDev), nGlyphBits );
aBits.writeSB( _Int16(map( Size( (long)( nAdvance / scale ), 0 ) ).Width() ), nAdvanceBits );
}