GnuCash  5.6-150-g038405b370+
Macros | Functions | Variables
gnc-imp-settings-csv.cpp File Reference

CSV Import Settings. More...

#include "gnc-imp-settings-csv.hpp"
#include <sstream>
#include <config.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include "Account.h"
#include "gnc-state.h"
#include "gnc-ui-util.h"
#include <algorithm>
#include <iostream>
#include <string>

Go to the source code of this file.

Macros

#define CSV_NAME   "Name"
 
#define CSV_FORMAT   "CsvFormat"
 
#define CSV_SKIP_ALT   "SkipAltLines"
 
#define CSV_SKIP_START   "SkipStartLines"
 
#define CSV_SKIP_END   "SkipEndLines"
 
#define CSV_SEP   "Separators"
 
#define CSV_CUSTOM   "Custom"
 
#define CSV_CUSTOM_ENTRY   "CustomEntry"
 
#define CSV_DATE   "DateFormat"
 
#define CSV_CURRENCY   "CurrencyFormat"
 
#define CSV_ENCODING   "Encoding"
 
#define CSV_COL_WIDTHS   "ColumnWidths"
 

Functions

bool handle_load_error (GError **key_error, const std::string &group)
 
bool preset_is_reserved_name (const std::string &name)
 Check whether name can be used as a preset name. More...
 
std::string get_no_settings (void)
 
std::string get_gnc_exp (void)
 
std::string get_gnc_exp_4 (void)
 

Variables

const std::string csv_group_prefix {"CSV-"}
 
const std::string no_settings {N_("No Settings")}
 
const std::string gnc_exp {N_("GnuCash Export Format")}
 
const std::string gnc_exp_4 {N_("GnuCash Export Format (4.x and older)")}
 

Detailed Description

CSV Import Settings.

Author
Copyright (c) 2014 Robert Fewell
Copyright (c) 2016 Geert Janssens

Definition in file gnc-imp-settings-csv.cpp.

Function Documentation

◆ preset_is_reserved_name()

bool preset_is_reserved_name ( const std::string &  name)

Check whether name can be used as a preset name.

The names of the internal presets are considered reserved. A preset with such a name should not be saved or deleted.

Definition at line 93 of file gnc-imp-settings-csv.cpp.

94 {
95  return ((name == no_settings) ||
96  (name == _(no_settings.c_str())) ||
97  (name == gnc_exp) ||
98  (name == _(gnc_exp.c_str())));
99 }