[Libreoffice-bugs] [Bug 138209] FORMS: Changing a form created with LO 7.0.3.1 with an older version leads to lost of the form

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Dec 19 22:13:22 UTC 2020


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

--- Comment #14 from Michael Stahl (CIB) <michael.stahl at cib.de> ---
the problem is that manifest.xml contains:

 <manifest:file-entry manifest:full-path="forms/Obj11/" manifest:version="1.3"
manifest:media-type="application/vnd.oasis.opendocument.text"/>

but forms/Obj11/*.xml contain:

 office:version="1.2"

somehow the version of the form wasn't reset.

... if i try the same thing with a Writer document and embedded spreadsheet,
saving in 6.4 results in a consistent manifest.xml and content.xml versions.

on storing the file with embedded object it's set here:

#1  OStorage::setPropertyValue(rtl::OUString const&, com::sun::star::uno::Any
const&) (this=0x7fddc70, aPropertyName="Version", aValue=uno::Any("string":
"1.2")) at libreoffice-6-4/package/source/xstor/xstorage.cxx:4381
#2  0x00007f9a89cf8518 in
SfxObjectShell::SetupStorage(com::sun::star::uno::Reference<com::sun::star::embed::XStorage>
const&, int, bool) const () at libreoffice-6-4/instdir/program/libsfxlo.so
#3  0x00007f9a89d37686 in
SfxBaseModel::storeToStorage(com::sun::star::uno::Reference<com::sun::star::embed::XStorage>
const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) () at libreoffice-6-4/instdir/program/libsfxlo.so
#4  0x00007f9a681d29d9 in
OCommonEmbeddedObject::StoreDocToStorage_Impl(com::sun::star::uno::Reference<com::sun::star::embed::XStorage>
const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&, int, rtl::OUString const&, bool) () at
libreoffice-6-4/instdir/program/../program/libembobj.so
#5  0x00007f9a681d55d0 in
OCommonEmbeddedObject::storeAsEntry(com::sun::star::uno::Reference<com::sun::star::embed::XStorage>
const&, rtl::OUString const&,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ()
at instdir/program/../program/libembobj.so
#6  0x00007f9a8a653498 in
comphelper::EmbeddedObjectContainer::StoreAsChildren(bool, bool,
com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) () at
libreoffice-6-4/instdir/program/libcomphelper.so
#7  0x00007f9a89cfa39c in SfxObjectShell::SaveAsChildren(SfxMedium&) () at
/home/ms/lo/libreoffice-6-4/instdir/program/libsfxlo.so
#8  0x00007f9a69abecaa in SwDocShell::SaveAs(SfxMedium&) (this=0x688af50,
rMedium=...) at sw/source/uibase/app/docsh.cxx:516
#9  0x00007f9a89cfa680 in SfxObjectShell::SaveAsOwnFormat(SfxMedium&) () at
/home/ms/lo/libreoffice-6-4/instdir/program/libsfxlo.so
#10 0x00007f9a89cfc9dc in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet
const*) () at libreoffice-6-4/instdir/program/libsfxlo.so
#11 0x00007f9a89cfdf3e in SfxObjectShell::DoSave_Impl(SfxItemSet const*) () at
libreoffice-6-4/instdir/program/libsfxlo.so
#12 0x00007f9a89d30396 in
SfxBaseModel::storeSelf(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) () at instdir/program/libsfxlo.so

oh, it works on master because of:

commit 519d96fd8b83ef4c61576d87b58f97b7e6e6e3c6
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Fri Jul 10 14:30:34 2020 +0200

    tdf#134582 sfx2: when storing, set Version on embedded object storage

    This previously wasn't needed because there was only one version for
    which it was checked (1.2) but since commit
    a541cd91951eca15e40764244b34c72b347f9f26 there's a second version so
    when loading an existing embedded object in one version and storing it
    in another, the Version must be updated so the attribute in
    META-INF/manifest.xml matches the one in content.xml.


... sorry, i didn't notice that this would be needed in 6.4 as well, so it's
only in 7.1/7.0.
(because 6.4 doesn't support version 1.3 anyway, but the Storage's version is a
string,
not some integer constant, so it can round-trip whatever is in the file...)

yep, a backport of this would fix it, but i guess it's too late now...

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201219/89f883b7/attachment.htm>


More information about the Libreoffice-bugs mailing list