diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-12-30 18:21:58 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-12-31 00:07:47 +0100 |
commit | 0d3c9d26e83bbfebade5d696e80ef10f4a63de8c (patch) | |
tree | 0daa68df96d43dd304dc4a803e591b66fa5223a7 /vcl/source | |
parent | dc3e13a83271423302beee1e4060dbc7a1178858 (diff) |
pdf: move Mode out of PDFWriterImpl class and convert to enum class
Change-Id: I92e7ca9fb16ef932b61cef09762c42068498764d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86032
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 65437464de72..9599ca737822 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -7338,7 +7338,7 @@ void PDFWriterImpl::beginRedirect( SvStream* pStream, const tools::Rectangle& rT clearClipRegion(); // this is needed to point m_aCurrentPDFState at the pushed state // ... but it's pointless to actually write into the "outer" stream here! - updateGraphicsState(NOWRITE); + updateGraphicsState(Mode::NOWRITE); m_aOutputStreams.push_front( StreamRedirect() ); m_aOutputStreams.front().m_pStream = pStream; @@ -7380,7 +7380,7 @@ SvStream* PDFWriterImpl::endRedirect() m_aCurrentPDFState.m_aFillColor = COL_TRANSPARENT; // needed after pop() to set m_aCurrentPDFState - updateGraphicsState(NOWRITE); + updateGraphicsState(Mode::NOWRITE); return pStream; } @@ -9818,7 +9818,7 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode) // everything is up to date now m_aCurrentPDFState = m_aGraphicsStack.front(); - if ((mode != NOWRITE) && !aLine.isEmpty()) + if ((mode != Mode::NOWRITE) && !aLine.isEmpty()) writeBuffer( aLine.getStr(), aLine.getLength() ); } diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 59fc55aea458..ac580202a35b 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -589,6 +589,8 @@ struct GraphicsState {} }; +enum class Mode { DEFAULT, NOWRITE }; + } class PDFWriterImpl : public VirtualDevice @@ -776,12 +778,10 @@ i12626 void drawRelief( SalLayout& rLayout, const OUString& rText, bool bTextLines ); void drawShadow( SalLayout& rLayout, const OUString& rText, bool bTextLines ); - enum Mode { DEFAULT, NOWRITE }; - /* writes differences between graphics stack and current real PDF * state to the file */ - void updateGraphicsState(Mode mode = DEFAULT); + void updateGraphicsState(Mode mode = Mode::DEFAULT); /* writes a transparency group object */ void writeTransparentObject( TransparencyEmit& rObject ); |