[gnumeric] Try to retain the image names while round tripping through ODF



commit fbbff099204de079a2fa7c0f8c18a8de481174bf
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Sat Apr 11 16:32:33 2015 -0600

    Try to retain the image names while round tripping through ODF
    
    2015-04-11  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * src/sheet-object-image.c (gnm_soi_assign_to_sheet): if there is no
        sheet object name, try the image name.

 ChangeLog                |    5 +++++
 src/sheet-object-image.c |    5 ++++-
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index dd5d618..a193931 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-11  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * src/sheet-object-image.c (gnm_soi_assign_to_sheet): if there is no
+       sheet object name, try the image name.
+
 2015-04-11  Morten Welinder  <terra gnome org>
 
        * src/sf-dpq.c (dnorm): Improve accuracy in certain far-tail cases.
diff --git a/src/sheet-object-image.c b/src/sheet-object-image.c
index 258c973..c92a0f5 100644
--- a/src/sheet-object-image.c
+++ b/src/sheet-object-image.c
@@ -494,7 +494,10 @@ gnm_soi_assign_to_sheet (SheetObject *so, Sheet *sheet)
 
        if (soi->image/* && !go_image_get_name (soi->image)*/) {
                GODoc *doc = GO_DOC (sheet->workbook);
-               GOImage *image = go_doc_add_image (doc, soi->name, soi->image);
+               GOImage *image = go_doc_add_image 
+                       (doc, 
+                        (soi->name != NULL) ? soi->name : go_image_get_name (soi->image),
+                        soi->image);
                if (soi->image != image) {
                        g_object_unref (soi->image);
                        soi->image = g_object_ref (image);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]