diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-22 15:18:45 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-23 09:05:02 +0100 |
commit | a54787669b9283efdfdd18b0cbafc3184cdde58f (patch) | |
tree | c64aac62a0c2d2e7baf1b5eddaba396270ec09d4 /sw | |
parent | 75f5d70d5d9f58a76e42d151f187c50bad50378c (diff) |
EPUB export, fixed layout: add chapter names to the navigation document
Extend vcl::PDFExtOutDevData so that it's possible to use it outside the
PDF export; this way the EPUB export can know which chapters start on
which page.
This means fixed and reflowable layout has the same table of contents,
instead of just Page <N> in the fixed layout case.
Change-Id: I935fb23c66ec747431b91e83b0e677d4e5f704b9
Reviewed-on: https://gerrit.libreoffice.org/48332
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index c03857e128b6..9d2ccc5cdd11 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -2893,7 +2893,8 @@ void SAL_CALL SwXTextDocument::render( if (0 > nRenderer) throw IllegalArgumentException(); - const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" ); + const bool bHasPDFExtOutDevData = lcl_SeqHasProperty( rxOptions, "HasPDFExtOutDevData" ); + const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" ) || bHasPDFExtOutDevData; bool bIsSwSrcView = false; SfxViewShell *pView = GetRenderView( bIsSwSrcView, rxOptions, bIsPDFExport ); @@ -2976,7 +2977,7 @@ void SAL_CALL SwXTextDocument::render( SwPrintData const& rSwPrtOptions = *m_pRenderData->GetSwPrtOptions(); - if (bIsPDFExport && bFirstPage && pWrtShell) + if (bIsPDFExport && (bFirstPage || bHasPDFExtOutDevData) && pWrtShell) { SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, false, rSwPrtOptions ); } |