- Use a more logical grouping for setting up liststores and columns
- Use one common store for all the header line's combo box entries
- Store column number in each combo box entry for later retrieval
- prefer c++ data types (auto, bool, int, std::string)
- iterate over vectors instead of accessing via the [] operator
- use boost::{u32}regex instead of directly manipulating a c-string
This required moving around a few other parameters
- currency_format and date_format will now be passed directly to the function that needs it
- Account is converted into a trans_prop just like all the other columns the user had selected
As per recommendation 10 in Meyer's Effective Modern C++
This also means the string array with column type names
can no longer be shared between c and c++ code, so
set up a separate one in c++
- use iterators to loop and std::find
This allows us to use 'continue' on the loop in case
of errors instead of using an ever more indenting if/else
- Use auto where possible
- Use constant iterators where possible
This base class takes care of the common things like
file opening and character set conversion.
The actual interpretation of the contents will be
delegated to specialized child classes.
Effective c++ note: explicitly declare special member functions
The Character Encoding menu imported from goffice comes with many such strings.
I still need to find a nice way to copy the existing translations for them
from goffice directly to gnucash.
The dependency on goffice can't be eliminated completely yet at this point.
The stf library we're currently using to parse csv files depends on it. This
will be fixed in a future commit.
We're using only a tiny fraction of that library.
Adding it directly in the gnucash source saves a large dependency chain.
Note this is a verbatim copy of these files from
https://github.com/GNOME/goffice/tree/GOFFICE_0_8_17
to preserve a clean link with it's origin.
It will only build correctly after the next commit.
The previous logic failed because GMOCK_SRC_DIR is cached. On
subsequent cmake runs FIND_PATH is not invoked again and hence
the first test for GMOCK_SRC_DIR will always succeed and
src is always appended to it to obtain GMOCK_SRC_MAIN_DIR.
This is not what we want, so I have chosen to force a rerun
of FIND_PATH by clearing the cached value of GMOCK_SRC_DIR.