diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-25 09:59:16 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-26 10:55:58 +0000 |
commit | e8fd5a07eca70912ddee45aaa34d434809b59fb7 (patch) | |
tree | d5dc890d12987cad73f5e64301f823ba23a97f2d /sdext/source | |
parent | e6adb3e8b4de3c0f78d249b83de19b849ef65b59 (diff) |
update loplugin stylepolice to check local pointers vars
are actually pointer vars.
Also convert from regex to normal code, so we can enable this
plugin all the time.
Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
Reviewed-on: https://gerrit.libreoffice.org/24391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sdext/source')
-rw-r--r-- | sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 20e762cbc4ed..4282999db6e0 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -86,34 +86,34 @@ namespace std::vector<char> lcl_escapeLineFeeds(const char* const i_pStr) { size_t nLength(strlen(i_pStr)); - std::vector<char> pBuffer; - pBuffer.reserve(2*nLength+1); + std::vector<char> aBuffer; + aBuffer.reserve(2*nLength+1); const char* pRead = i_pStr; while( nLength-- ) { if( *pRead == '\r' ) { - pBuffer.push_back('\\'); - pBuffer.push_back('r'); + aBuffer.push_back('\\'); + aBuffer.push_back('r'); } else if( *pRead == '\n' ) { - pBuffer.push_back('\\'); - pBuffer.push_back('n'); + aBuffer.push_back('\\'); + aBuffer.push_back('n'); } else if( *pRead == '\\' ) { - pBuffer.push_back('\\'); - pBuffer.push_back('\\'); + aBuffer.push_back('\\'); + aBuffer.push_back('\\'); } else - pBuffer.push_back(*pRead); + aBuffer.push_back(*pRead); pRead++; } - pBuffer.push_back(0); + aBuffer.push_back(0); - return pBuffer; + return aBuffer; } } @@ -572,14 +572,14 @@ void PDFOutDev::processLink(Link* link, Catalog*) { const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->getCString(); - std::vector<char> pEsc( lcl_escapeLineFeeds(pURI) ); + std::vector<char> aEsc( lcl_escapeLineFeeds(pURI) ); printf( "drawLink %f %f %f %f %s\n", normalize(x1), normalize(y1), normalize(x2), normalize(y2), - pEsc.data() ); + aEsc.data() ); } } @@ -765,7 +765,7 @@ void PDFOutDev::updateFont(GfxState *state) aFont = it->second; - std::vector<char> pEsc( lcl_escapeLineFeeds(aFont.familyName.getCString()) ); + std::vector<char> aEsc( lcl_escapeLineFeeds(aFont.familyName.getCString()) ); printf( " %d %d %d %d %f %d %s", aFont.isEmbedded, aFont.isBold, @@ -773,7 +773,7 @@ void PDFOutDev::updateFont(GfxState *state) aFont.isUnderline, normalize(state->getTransformedFontSize()), nEmbedSize, - pEsc.data() ); + aEsc.data() ); } printf( "\n" ); @@ -918,8 +918,8 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y, for( int i=0; i<uLen; ++i ) { buf[ m_pUtf8Map->mapUnicode(u[i], buf, sizeof(buf)-1) ] = 0; - std::vector<char> pEsc( lcl_escapeLineFeeds(buf) ); - printf( "%s", pEsc.data() ); + std::vector<char> aEsc( lcl_escapeLineFeeds(buf) ); + printf( "%s", aEsc.data() ); } printf( "\n" ); |