https://bugs.documentfoundation.org/show_bug.cgi?id=105679

            Bug ID: 105679
           Summary: PDF Filter: does not respect last value of
                    ExportOnlyNotesPages setting
           Product: LibreOffice
           Version: 5.2.0.0.alpha1
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: minor
          Priority: medium
         Component: filters and storage
          Assignee: [email protected]
          Reporter: [email protected]

Description:
When exporting with the pdf filter, the most recent settings should be honored
(e.g. when exporting on the command line).  However, the "ExportOnlyNotesPage"
setting is not.

Steps to Reproduce:
1. Export a presentation to PDF using the GUI, selecting "Export Notes Pages"
and "Export Only Notes Pages". Your export should have only notes pages.
2. Run a command-line export of that same spreadsheet to pdf (`soffice
--convert-to pdf in.pptx --outdir /tmp`).

Actual Results:  
The command-line exported pdf will have slide pages and note pages (as if
ExportOnlyNotesPages is false).

Expected Results:
The command-line exported pdf should have only notes pages (matching the most
recent GUI output).


Reproducible: Always

User Profile Reset: No

Additional Info:
I think this is due to a simple omission at
LibreOffice/core/filter/source/pdf/pdffilter.cxx:74:

"""
/* we don't get FilterData if we are exporting directly
       to pdf, but we have to use the last user settings (especially for the
CompressMode) */
    if ( !aFilterData.getLength() )
    {
        FilterConfigItem aCfgItem( "Office.Common/Filter/PDF/Export/" );
        ...
        aCfgItem.ReadBool(  "ExportNotesPages", false );
        aCfgItem.ReadBool(  "UseTransitionEffects", true );
        ...
    }
"""

A simple fix is to add `aCfgItem.ReadBool(  "ExportOnlyNotesPages", false );`. 
More comprehensive/better
would be to re-write the configuration code so that the expected settings (and
their types and default values)
are defined in a single place in such a way as to make
creating/updating/merging a "configuration" possible without
enumerating all the necessary fields.


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/55.0.2883.87 Safari/537.36

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to