summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/pdfwriter_impl.cxx
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-01 11:01:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-01 12:19:27 +0200
commitcc2b7c1f930bc05253153f3c8381fb4fb352f3ca (patch)
tree0a285ec4c67933a58fcf4ca991bfc745e715e059 /vcl/source/gdi/pdfwriter_impl.cxx
parent5ed9f4638e1ff12b3246a66ffee8dd9dd74b9693 (diff)
loplugin:reducevarscope in vcl
Change-Id: I768aa9bd87913bc20351fb631a6326fe01f777b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103748 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/gdi/pdfwriter_impl.cxx')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index b8c9614359c7..b21c9ad14407 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6579,18 +6579,17 @@ void PDFWriterImpl::drawText( const tools::Rectangle& rRect, const OUString& rOr
// multiline text
if ( nStyle & DrawTextFlags::MultiLine )
{
- OUString aLastLine;
ImplMultiTextLineInfo aMultiLineInfo;
ImplTextLineInfo* pLineInfo;
sal_Int32 i;
- sal_Int32 nLines;
sal_Int32 nFormatLines;
if ( nTextHeight )
{
vcl::DefaultTextLayout aLayout( *this );
+ OUString aLastLine;
OutputDevice::ImplGetTextLines( aMultiLineInfo, nWidth, aStr, nStyle, aLayout );
- nLines = nHeight/nTextHeight;
+ sal_Int32 nLines = nHeight/nTextHeight;
nFormatLines = aMultiLineInfo.Count();
if ( !nLines )
nLines = 1;