summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-13 11:47:08 +0000
committerTor Lillqvist <tml@collabora.com>2014-01-13 22:04:25 +0200
commitb43f0dfc864862172cad73941dd1cfb4000b8c25 (patch)
treec3a240e8a7c9e7e1222f57178050cce1eb1005e1
parent13e3c545d545ae84c1127ea877d9da998da8130c (diff)
longparas: weed out xub_StrLen in pdf writer
Change-Id: I3570f653ec44edcf0a215ffcac2017b9a5a3544a
-rw-r--r--include/vcl/pdfwriter.hxx8
-rw-r--r--vcl/source/gdi/pdfwriter.cxx10
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx18
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx6
4 files changed, 21 insertions, 21 deletions
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 07d0f47827c1..9971ebdaca10 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -771,12 +771,12 @@ The following structure describes the permissions used in PDF security
FontUnderline eOverline,
sal_Bool bUnderlineAbove = sal_False );
void DrawTextArray( const Point& rStartPt, const OUString& rStr,
- const sal_Int32* pDXAry = NULL,
- xub_StrLen nIndex = 0,
- xub_StrLen nLen = STRING_LEN );
+ const sal_Int32* pDXAry,
+ sal_Int32 nIndex,
+ sal_Int32 nLen );
void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
const OUString& rStr,
- xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN );
+ sal_Int32 nIndex, sal_Int32 nLen );
void DrawText( const Rectangle& rRect,
const OUString& rStr, sal_uInt16 nStyle = 0 );
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index fba8f18779cc..610bfd5db6fa 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -65,7 +65,7 @@ void PDFWriter::SetFont( const Font& rFont )
void PDFWriter::DrawText( const Point& rPos, const OUString& rText )
{
- pImplementation->drawText( rPos, rText );
+ pImplementation->drawText( rPos, rText, 0, rText.getLength() );
}
void PDFWriter::DrawTextLine(
@@ -83,8 +83,8 @@ void PDFWriter::DrawTextArray(
const Point& rStartPt,
const OUString& rStr,
const sal_Int32* pDXAry,
- xub_StrLen nIndex,
- xub_StrLen nLen )
+ sal_Int32 nIndex,
+ sal_Int32 nLen )
{
pImplementation->drawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen );
}
@@ -93,8 +93,8 @@ void PDFWriter::DrawStretchText(
const Point& rStartPt,
sal_uLong nWidth,
const OUString& rStr,
- xub_StrLen nIndex,
- xub_StrLen nLen )
+ sal_Int32 nIndex,
+ sal_Int32 nLen )
{
pImplementation->drawStretchText( rStartPt, nWidth, rStr, nIndex, nLen );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 6e4a42017fd9..8259cbf506cc 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -7830,7 +7830,7 @@ void PDFWriterImpl::drawEmphasisMark( long nX, long nY,
}
}
-void PDFWriterImpl::drawText( const Point& rPos, const OUString& rText, xub_StrLen nIndex, xub_StrLen nLen, bool bTextLines )
+void PDFWriterImpl::drawText( const Point& rPos, const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines )
{
MARK( "drawText" );
@@ -7846,7 +7846,7 @@ void PDFWriterImpl::drawText( const Point& rPos, const OUString& rText, xub_StrL
}
}
-void PDFWriterImpl::drawTextArray( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, xub_StrLen nIndex, xub_StrLen nLen, bool bTextLines )
+void PDFWriterImpl::drawTextArray( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines )
{
MARK( "drawText with array" );
@@ -7862,7 +7862,7 @@ void PDFWriterImpl::drawTextArray( const Point& rPos, const OUString& rText, con
}
}
-void PDFWriterImpl::drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& rText, xub_StrLen nIndex, xub_StrLen nLen, bool bTextLines )
+void PDFWriterImpl::drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines )
{
MARK( "drawStretchText" );
@@ -7914,15 +7914,15 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const OUString& rOrigStr,
OUString aLastLine;
ImplMultiTextLineInfo aMultiLineInfo;
ImplTextLineInfo* pLineInfo;
- xub_StrLen i;
- xub_StrLen nLines;
- xub_StrLen nFormatLines;
+ sal_Int32 i;
+ sal_Int32 nLines;
+ sal_Int32 nFormatLines;
if ( nTextHeight )
{
::vcl::DefaultTextLayout aLayout( *m_pReferenceDevice );
OutputDevice::ImplGetTextLines( aMultiLineInfo, nWidth, aStr, nStyle, aLayout );
- nLines = (xub_StrLen)(nHeight/nTextHeight);
+ nLines = nHeight/nTextHeight;
nFormatLines = aMultiLineInfo.Count();
if ( !nLines )
nLines = 1;
@@ -7957,8 +7957,8 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const OUString& rOrigStr,
aPos.X() += nWidth-pLineInfo->GetWidth();
else if ( nStyle & TEXT_DRAW_CENTER )
aPos.X() += (nWidth-pLineInfo->GetWidth())/2;
- xub_StrLen nIndex = pLineInfo->GetIndex();
- xub_StrLen nLineLen = pLineInfo->GetLen();
+ sal_Int32 nIndex = pLineInfo->GetIndex();
+ sal_Int32 nLineLen = pLineInfo->GetLen();
drawText( aPos, aStr, nIndex, nLineLen, bTextLines );
// mnemonics should not appear in documents,
// if the need arises, put them in here
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 46020446fd48..8357e529cab4 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -1195,10 +1195,10 @@ public:
}
/* actual drawing functions */
- void drawText( const Point& rPos, const OUString& rText, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, bool bTextLines = true );
- void drawTextArray( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray = NULL, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, bool bTextLines = true );
+ void drawText( const Point& rPos, const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines = true );
+ void drawTextArray( const Point& rPos, const OUString& rText, const sal_Int32* pDXArray, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines = true );
void drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& rText,
- xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN,
+ sal_Int32 nIndex, sal_Int32 nLen,
bool bTextLines = true );
void drawText( const Rectangle& rRect, const OUString& rOrigStr, sal_uInt16 nStyle, bool bTextLines = true );
void drawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, bool bUnderlineAbove );