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

            Bug ID: 152446
           Summary: Not able to "cat" the text contents of .xls or .ods
                    files to stdout.
           Product: LibreOffice
           Version: 7.5.0.0 alpha1+
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: minor
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]

SUMMARY

    Not able to "cat" the text contents of .xls or .ods files to stdout.

STEPS TO REPRODUCE:

    Installed the LibreOffice dev 7.5 version

    Downloaded test files from https://bugs.kde.org

    baloo_test_Libreoffice_7.4.2.3.doc
        https://bugs.kde.org/attachment.cgi?id=153915
    baloo_test_libreoffice.ppt
        https://bugs.kde.org/attachment.cgi?id=153918
    baloo_test_libreoffice.xls
        https://bugs.kde.org/attachment.cgi?id=153919

    And try to stream the contents the file to stdout, in this case
    comparing the behaviour of .doc and .xls:

    $ libreofficedev7.5 --cat baloo_test_Libreoffice_7.4.2.3.doc
    $ libreofficedev7.5 --cat baloo_test_libreoffice.xls

OBSERVED RESULTS:

    $ libreofficedev7.5 --cat baloo_test_Libreoffice_7.4.2.3.doc
    This worked, the text contents were displayed.

    $ libreofficedev7.5 --cat baloo_test_libreoffice.xls
    Failed with:
        javaldx: Could not find a Java Runtime Environment!
        Warning: failed to read path from javaldx
        warn:sc:3407:3407:sc/source/filter/excel/xlroot.cxx:160:
XclRootData::XclRootData - cannot get output device info
com.sun.star.uno.RuntimeException message: "invalid attempt to assign an empty
interface of type com.sun.star.frame.XFrame! at
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/include/com/sun/star/uno/Reference.hxx:105"
        warn:sfx.doc:3407:3407:sfx2/source/doc/sfxbasemodel.cxx:3166: Storing
has failed, no error is set!
        Error: Please verify input parameters... (SfxBaseModel::impl_store
<file:///tmp/lu3407b9ahr.tmp/lu3407b9ahs.tmp> failed: 0xc10(Error Area:Io
Class:Write Code:16) at
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/sfx2/source/doc/sfxbasemodel.cxx:3215
at
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/sfx2/source/doc/sfxbasemodel.cxx:1789)

    The test also failed after the .xls was saved as an .ods

EXPECTED RESULTS:

    It's possible to "cat" an .xls or .ols file to stdout in the same way as
    a .doc or .odt file

    It is not expected that spreadsheet formatting is preserved; it is
    "streaming text" and not streaming a converted CSV format.

VERSION:

    $ libreofficedev7.5 --version
    LibreOfficeDev 7.5.0.0.alpha1 8f34b0d40e149b7274a1aa4ce0b33ddbf825ee52

    The dev version was tried after reading Bug 150846, don't know
    whether this is a long established bug or a recent regression

ADDITIONAL INFORMATION

    Trying to convert the.xls/.ods to a text file also fails:

        $ libreofficedev7.5 --headless --convert-to "txt:Text (encoded):UTF8"
baloo_test_libreoffice.xls
        javaldx: Could not find a Java Runtime Environment!
        Warning: failed to read path from javaldx
        warn:sc:4110:4110:sc/source/filter/excel/xlroot.cxx:160:
XclRootData::XclRootData - cannot get output device info
com.sun.star.uno.RuntimeException message: "invalid attempt to assign an empty
interface of type com.sun.star.frame.XFrame! at
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/include/com/sun/star/uno/Reference.hxx:105"
        convert /home/test/Downloads/baloo_test_libreoffice.xls ->
/home/test/Downloads/baloo_test_libreoffice.txt using filter : Text
(encoded):UTF8
        warn:sfx.doc:4110:4110:sfx2/source/doc/sfxbasemodel.cxx:3166: Storing
has failed, no error is set!
        Error: Please verify input parameters... (SfxBaseModel::impl_store
<file:///home/test/Downloads/baloo_test_libreoffice.txt> failed: 0xc10(Error
Area:Io Class:Write Code:16) at
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/sfx2/source/doc/sfxbasemodel.cxx:3215
at
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/sfx2/source/doc/sfxbasemodel.cxx:1789)

    Whereas trying to convert to a .csv file works, albeit with a
    "cannot get output device" warning:

        $ libreofficedev7.5 --headless --convert-to "csv"
baloo_test_libreoffice.xls
        javaldx: Could not find a Java Runtime Environment!
        Warning: failed to read path from javaldx
        warn:sc:3707:3707:sc/source/filter/excel/xlroot.cxx:160:
XclRootData::XclRootData - cannot get output device info
com.sun.star.uno.RuntimeException message: "invalid attempt to assign an empty
interface of type com.sun.star.frame.XFrame! at
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/include/com/sun/star/uno/Reference.hxx:105"
        convert /home/test/Downloads/baloo_test_libreoffice.xls ->
/home/test/Downloads/baloo_test_libreoffice.csv using filter : Text - txt - csv
(StarCalc)

    Converting to a .pdf also works with the same warning:

        $ libreofficedev7.5 --headless --convert-to "pdf"
baloo_test_libreoffice.xls
        javaldx: Could not find a Java Runtime Environment!
        Warning: failed to read path from javaldx
        warn:sc:1302:1302:sc/source/filter/excel/xlroot.cxx:160:
XclRootData::XclRootData - cannot get output device info
com.sun.star.uno.RuntimeException message: "invalid attempt to assign an empty
interface of type com.sun.star.frame.XFrame! at
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/include/com/sun/star/uno/Reference.hxx:105"
        convert /home/test/Downloads/baloo_test_libreoffice.xls ->
/home/test/Downloads/baloo_test_libreoffice.pdf using filter : calc_pdf_Export

    The error messages look similar to those reported in Bug 150846.
~

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to