Adding Simple Feature to Gnumeric



Hi Gnumericers,

I am a long-time user of Gnumeric (10+ years)  so first let me issue a long-overdue 'THANK YOU!' for such a great piece of software.

I have recently become interested in building gnumeric from source and to experiment with adding a feature I would like to use. I have two related questions to that effort

1. BUILD TROUBLE: I cloned the Gnumeric repo from github but I am having some minor build problems. I believe that I have all the necessary packages installed on my Arch Linux distribution to build but am getting problems with libgoffice versions, particularly when running ./configure I get

Package 'libgoffice-0.10' has version '0.10.45', required version is '>= 0.10.46'

I have the most up-to-date version available in the Arch repos 
> pacman -Ss goffice
extra/goffice 0.10.45-1 [installed]
    A GLib/GTK+ set of document-centric objects and charting library

but perhaps there is a fresher version elsewhere. I poked around the Github repo for libgoffice briefly but only saw version 0.10.45 mentioned.

I tried tweaking the requirement in configure.ac from 0.10.46 down to 0.10.45; this allowed me to get a ./configure script that completed (mostly) but on beginning the build with 'make' a number of errors were reported about missing functions which are likely in the newer version of libgoffice such as

stf-parse.c: In function ‘do_check_date’:
stf-parse.c:1843:13: error: implicit declaration of function ‘go_format_has_year’; did you mean ‘go_format_has_hour’? [-Werror=implicit-function-declaration]
 1843 |  has_all = (go_format_has_year (fmt) &&
      |             ^~~~~~~~~~~~~~~~~~
      |             go_format_has_hour

This makes me think I likely need a newer version of libgoffice. Any advice folks could offer me about about how to build properly would be appreciated.

2. FEATURE ADVICE: The feature I would like to add is as follows
  - Select a cell range with the mouse
  - Select a menu item titled something like 'Replace Blank Cells'
  - A dialog prompts for text that will be filled into all of the empty cells in the range
  - Cells with contents already will not be affected
I am a teacher and do grade calculations on student grades; often when I download the grades, items that they skipped come in as blank cells. While I could mangle some CSV files for this, it would be handy to have a 'Replace Blank Cells' feature.

If there is a way to do this already in Gnumeric, please let me know. I experimented with the Search/Replace options but couldn't get anything to stick for blank cells.

I have been examining the Plugins architecture for Gnumeric and am considering writing the feature as a plugin as it can be 'optionally' enabled.  The provided demo plugin 'uihello' provides a good line of attack on how to add items to menus and trigger code to run.  However, I would very much like advice on whether this is an appropriate mechanism or if a better one exists. 

I have not yet done a deep dive into code to single out the APIs as I'd like to be able to build the code first but I'll likely have some follow-up questions once I get over the immediate hurdles.

Thanks again for any help and for the outstanding work you've all done over the years.
Cheers,
Chris Kauffman


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