[Libreoffice-commits] core.git: vcl/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 30 23:08:20 UTC 2019
vcl/source/gdi/pdfwriter_impl.cxx | 6 +++---
vcl/source/gdi/pdfwriter_impl.hxx | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 0d3c9d26e83bbfebade5d696e80ef10f4a63de8c
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Dec 30 18:21:58 2019 +0100
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Dec 31 00:07:47 2019 +0100
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 at gmail.com>
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 );
More information about the Libreoffice-commits
mailing list