Re: File corruption if stream contains vector properties

2018-12-10 Thread Morten Welinder
Please file a bug at https://gitlab.gnome.org/GNOME/libgsf/issues

Attaching a complete sample program and the corrupted stream you get
would be helpful.

Morten
___
gnumeric-list mailing list
gnumeric-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnumeric-list


Re: Fwd: File corruption if stream contains vector properties

2018-12-10 Thread Артём К . via gnumeric-list



>Понедельник, 10 декабря 2018, 20:05 +03:00 от Артём К. via gnumeric-list 
>:
>
>unsubscribe
>
>
> Пересылаемое сообщение 
>От кого: Sagi Lowenhardt via gnumeric-list < gnumeric-list@gnome.org >
>Кому:  gnumeric-list@gnome.org
>Дата: Понедельник, 10 декабря 2018, 19:48 +03:00
>Тема: File corruption if stream contains vector properties
>
>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
>gnumeric-list@gnome.org
>https://mail.gnome.org/mailman/listinfo/gnumeric-list
>
>--
>
>
>
>___
>gnumeric-list mailing list
>gnumeric-list@gnome.org
>https://mail.gnome.org/mailman/listinfo/gnumeric-list




___
gnumeric-list mailing list
gnumeric-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnumeric-list


Fwd: File corruption if stream contains vector properties

2018-12-10 Thread Артём К . via gnumeric-list
unsubscribe


 Пересылаемое сообщение 
От кого: Sagi Lowenhardt via gnumeric-list 
Кому: gnumeric-list@gnome.org
Дата: Понедельник, 10 декабря 2018, 19:48 +03:00
Тема: File corruption if stream contains vector properties

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
gnumeric-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnumeric-list

--



___
gnumeric-list mailing list
gnumeric-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnumeric-list


File corruption if stream contains vector properties

2018-12-10 Thread Sagi Lowenhardt via gnumeric-list
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
gnumeric-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnumeric-list