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
diff --git a/sfx2/qa/uitest/doc/objserv.py b/sfx2/qa/uitest/doc/objserv.py
index af00590..692d0fb 100644
--- a/sfx2/qa/uitest/doc/objserv.py
+++ b/sfx2/qa/uitest/doc/objserv.py
@@ -8,9 +8,11 @@ from uitest.framework import UITestCase
import org.libreoffice.unotest
import pathlib
def get_url_for_data_file(file_name):
return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
# Test for sfx2/source/doc/objserv.cxx.
class Test(UITestCase):
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 6400198..304ae01 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: */