File corruption if stream contains vector properties

Sagi Lowenhardt via gnumeric-list <[email protected]>
Newsgroups gmane.comp.gnome.apps.gnumeric
Message-ID <CALM0EdDmDd=Wk4Zjbkmp6BjHmcfpm-s4yMAAGH6zea8BjJQfDg@mail.gmail.com>
Hi

I’m opening an existing stream with existing Vector properties.

Then I try to remove and insert some properties.

As I commit (‘gsf_doc_meta_data_write_to_msole’) the file structure gets
corrupted.

Is this a known issue?



Here is the relevant cpde:

for (const auto& key : keysToRemove) {

    gsf_doc_meta_data_remove(mDocumentSummaryInformation.get(),
key.c_str());

  }



  for (const auto& property : propertiesToAdd) {

    const auto& name = property.second->GetGsfName();

    UniqueGvalue gvalue = property.second->GetGsfValue();



    gsf_doc_meta_data_insert(mDocumentSummaryInformation.get(),
g_strdup(name.c_str()), gvalue.release());

  }



  const bool doc_not_component = type !=
OlePropertyStorageType::SUMMARY_INFO;

  const auto rc =
gsf_doc_meta_data_write_to_msole(mDocumentSummaryInformation.get(), out,
doc_not_component);

  MIPLOG(TRACE) << "Write metadata rc=" << rc;



Thank you

_______________________________________________
gnumeric-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gnumeric-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.