diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-06-16 18:05:50 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-06-16 18:53:01 +0200 |
commit | c43e62f26f8d51c2ad97f6c93877ce9d3ae9639e (patch) | |
tree | a2658b8635c34241c732b5993a165fddb0468904 /vcl | |
parent | cec1d2cb8eb17a28bf418625ea6ea522d6c1c580 (diff) |
vcl: namespace PDFWriterImpl consistently
We had a mix of 'using namespace vcl;' and 'namespace vcl {',
standardize on the later.
Change-Id: I088bb0e0c03f712242427bf6a0b31dd17755b9dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96475
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 6400198890a5..304ae011ee72 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -93,7 +93,6 @@ #include <libeot/libeot.h> #endif -using namespace vcl; using namespace::com::sun::star; static bool g_bDebugDisableCompression = getenv("VCL_DEBUG_DISABLE_PDFCOMPRESSION"); @@ -121,12 +120,6 @@ static const double fDivisor = 1000.0; static double pixelToPoint( double px ) { return px/fDivisor; } static sal_Int32 pointToPixel( double pt ) { return sal_Int32(pt*fDivisor); } -const sal_uInt8 PDFWriterImpl::s_nPadString[32] = -{ - 0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41, 0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08, - 0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80, 0x2F, 0x0C, 0xA9, 0xFE, 0x64, 0x53, 0x69, 0x7A -}; - static void appendHex( sal_Int8 nInt, OStringBuffer& rBuffer ) { static const char pHexDigits[] = { '0', '1', '2', '3', '4', '5', '6', '7', @@ -270,6 +263,29 @@ static void appendDestinationName( const OUString& rString, OStringBuffer& rBuff } } +namespace vcl +{ +const sal_uInt8 PDFWriterImpl::s_nPadString[32] = +{ + 0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41, 0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08, + 0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80, 0x2F, 0x0C, 0xA9, 0xFE, 0x64, 0x53, 0x69, 0x7A +}; + +template < class GEOMETRY > +static GEOMETRY lcl_convert( const MapMode& _rSource, const MapMode& _rDest, OutputDevice* _pPixelConversion, const GEOMETRY& _rObject ) +{ + GEOMETRY aPoint; + if ( MapUnit::MapPixel == _rSource.GetMapUnit() ) + { + aPoint = _pPixelConversion->PixelToLogic( _rObject, _rDest ); + } + else + { + aPoint = OutputDevice::LogicToLogic( _rObject, _rSource, _rDest ); + } + return aPoint; +} + void PDFWriter::AppendUnicodeTextString(const OUString& rString, OStringBuffer& rBuffer) { rBuffer.append( "FEFF" ); @@ -777,24 +793,6 @@ bool PDFPage::emit(sal_Int32 nParentObject ) return m_pWriter->writeBuffer( aLine.getStr(), aLine.getLength() ); } -namespace vcl -{ -template < class GEOMETRY > -static GEOMETRY lcl_convert( const MapMode& _rSource, const MapMode& _rDest, OutputDevice* _pPixelConversion, const GEOMETRY& _rObject ) -{ - GEOMETRY aPoint; - if ( MapUnit::MapPixel == _rSource.GetMapUnit() ) - { - aPoint = _pPixelConversion->PixelToLogic( _rObject, _rDest ); - } - else - { - aPoint = OutputDevice::LogicToLogic( _rObject, _rSource, _rDest ); - } - return aPoint; -} -} - void PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rBuffer ) const { Point aPoint( lcl_convert( m_pWriter->m_aGraphicsStack.front().m_aMapMode, @@ -5440,7 +5438,6 @@ void PDFWriterImpl::sortWidgets() // FIXME: implement tab order in structure tree for PDF 1.5 } -namespace vcl { class PDFStreamIf : public cppu::WeakImplHelper< css::io::XOutputStream > { @@ -5453,7 +5450,6 @@ class PDFStreamIf : virtual void SAL_CALL flush() override; virtual void SAL_CALL closeOutput() override; }; -} void SAL_CALL PDFStreamIf::writeBytes( const css::uno::Sequence< sal_Int8 >& aData ) { @@ -11220,5 +11216,6 @@ sal_Int32 ReferenceXObjectEmit::getObject() const else return m_nBitmapObject; } +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |