diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-08 15:00:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-09 10:03:52 +0000 |
commit | 76e0f23171d899ef567b04b555a748b60f99353c (patch) | |
tree | a2366554dcccff464d8f9033619e5c19c6a5deef /vcl | |
parent | a25b1ff25a3be97d688d66b12353b4217fd239a5 (diff) |
convert DestAreaType to scoped enum
and drop read-only enumerators
Change-Id: Ibc4c2a99448a83fc179e2779f8f3e5c8f034ae7b
Reviewed-on: https://gerrit.libreoffice.org/34059
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/pdfextoutdevdata.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 52 |
2 files changed, 5 insertions, 49 deletions
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index f70604b01620..89f570345e9d 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -616,7 +616,7 @@ sal_Int32 PDFExtOutDevData::CreateNamedDest(const OUString& sDestName, const Re mpGlobalSyncData->mParaRects.push_back( rRect ); mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() ); mpGlobalSyncData->mParaInts.push_back( nPageNr == -1 ? mnPage : nPageNr ); - mpGlobalSyncData->mParaDestAreaTypes.push_back( PDFWriter::XYZ ); + mpGlobalSyncData->mParaDestAreaTypes.push_back( PDFWriter::DestAreaType::XYZ ); return mpGlobalSyncData->mCurId++; } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 646c79a20313..308c0d75bf28 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3714,7 +3714,7 @@ bool PDFWriterImpl::appendDest( sal_Int32 nDestID, OStringBuffer& rBuffer ) switch( rDest.m_eType ) { - case PDFWriter::XYZ: + case PDFWriter::DestAreaType::XYZ: default: rBuffer.append( "/XYZ " ); appendFixedInt( rDest.m_aRect.Left(), rBuffer ); @@ -3722,10 +3722,7 @@ bool PDFWriterImpl::appendDest( sal_Int32 nDestID, OStringBuffer& rBuffer ) appendFixedInt( rDest.m_aRect.Bottom(), rBuffer ); rBuffer.append( " 0" ); break; - case PDFWriter::Fit: - rBuffer.append( "/Fit" ); - break; - case PDFWriter::FitRectangle: + case PDFWriter::DestAreaType::FitRectangle: rBuffer.append( "/FitR " ); appendFixedInt( rDest.m_aRect.Left(), rBuffer ); rBuffer.append( ' ' ); @@ -3735,25 +3732,6 @@ bool PDFWriterImpl::appendDest( sal_Int32 nDestID, OStringBuffer& rBuffer ) rBuffer.append( ' ' ); appendFixedInt( rDest.m_aRect.Bottom(), rBuffer ); break; - case PDFWriter::FitHorizontal: - rBuffer.append( "/FitH " ); - appendFixedInt( rDest.m_aRect.Bottom(), rBuffer ); - break; - case PDFWriter::FitVertical: - rBuffer.append( "/FitV " ); - appendFixedInt( rDest.m_aRect.Left(), rBuffer ); - break; - case PDFWriter::FitPageBoundingBox: - rBuffer.append( "/FitB" ); - break; - case PDFWriter::FitPageBoundingBoxHorizontal: - rBuffer.append( "/FitBH " ); - appendFixedInt( rDest.m_aRect.Bottom(), rBuffer ); - break; - case PDFWriter::FitPageBoundingBoxVertical: - rBuffer.append( "/FitBV " ); - appendFixedInt( rDest.m_aRect.Left(), rBuffer ); - break; } rBuffer.append( ']' ); @@ -7477,7 +7455,7 @@ sal_Int32 PDFWriterImpl::emitNamedDestinations() switch( rDest.m_eType ) { - case PDFWriter::XYZ: + case PDFWriter::DestAreaType::XYZ: default: aLine.append( "/XYZ " ); appendFixedInt( rDest.m_aRect.Left(), aLine ); @@ -7485,10 +7463,7 @@ sal_Int32 PDFWriterImpl::emitNamedDestinations() appendFixedInt( rDest.m_aRect.Bottom(), aLine ); aLine.append( " 0" ); break; - case PDFWriter::Fit: - aLine.append( "/Fit" ); - break; - case PDFWriter::FitRectangle: + case PDFWriter::DestAreaType::FitRectangle: aLine.append( "/FitR " ); appendFixedInt( rDest.m_aRect.Left(), aLine ); aLine.append( ' ' ); @@ -7498,25 +7473,6 @@ sal_Int32 PDFWriterImpl::emitNamedDestinations() aLine.append( ' ' ); appendFixedInt( rDest.m_aRect.Bottom(), aLine ); break; - case PDFWriter::FitHorizontal: - aLine.append( "/FitH " ); - appendFixedInt( rDest.m_aRect.Bottom(), aLine ); - break; - case PDFWriter::FitVertical: - aLine.append( "/FitV " ); - appendFixedInt( rDest.m_aRect.Left(), aLine ); - break; - case PDFWriter::FitPageBoundingBox: - aLine.append( "/FitB" ); - break; - case PDFWriter::FitPageBoundingBoxHorizontal: - aLine.append( "/FitBH " ); - appendFixedInt( rDest.m_aRect.Bottom(), aLine ); - break; - case PDFWriter::FitPageBoundingBoxVertical: - aLine.append( "/FitBV " ); - appendFixedInt( rDest.m_aRect.Left(), aLine ); - break; } aLine.append( "]\n" ); } |