1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-09-16 01:08:53 +00:00

AZTEC: add manual FNC1 support:

improve P/S vs P/L choice when have ECI;
  add ZINT_DEBUG_TEST dump
AUSPOST: allow variable length data input
DATAMATRIX: do `EXTRA_ESCAPE_MODE` processing up front & check have
  non-zero length afterwards;
  disallow `READER_INIT` and `EXTRA_ESCAPE_MODE`;
general: add new `z_zero_fill()` func & use;
  add new `z_extra_escape_position_fnc1()` helper;
  in `z_ct_set_seg_extra_escapes_eci` check position FNC1 whether
  or not have ECI
library: escape_char_process: note escaped backslash followed by
  caret by passes `EXTRA_ESCAPE_MODE` check
test suite: BWIPP: update to latest; support AUSPOST variants;
  process `EXTRA_ESCAPE_MODE` escaping up front
This commit is contained in:
gitlost
2026-04-27 01:02:25 +01:00
parent b40393723f
commit 0a3ffc1dc2
31 changed files with 1968 additions and 905 deletions
+12
View File
@@ -369,6 +369,18 @@ the data with a slash &quot;/&quot;</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QRadioButton" name="radAztecExtraEsc">
<property name="text">
<string>Manual FN&amp;C1s (Extra Escape)</string>
</property>
<property name="toolTip">
<string>Process special escape sequence &quot;\^1&quot;
allowing manual FNC1s
(literal &quot;\^&quot; may be escaped with &quot;\^^&quot;)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
+12 -5
View File
@@ -1856,6 +1856,7 @@ void MainWindow::change_options()
connect(get_widget(QSL("radAztecStand")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("radAztecGS1")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("radAztecHIBC")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("radAztecExtraEsc")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("chkAztecFull")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("chkAztecFast")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("cmbAztecStructAppCount")), SIGNAL(currentIndexChanged(int)), SLOT(update_preview()));
@@ -2026,9 +2027,9 @@ void MainWindow::change_options()
dm_startmode_ui_set();
tabMain->insertTab(1, m_optionWidget, tr("D&ata Matrix"));
connect(get_widget(QSL("radDMStand")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("radDMExtraEsc")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("radDMGS1")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("radDMHIBC")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("radDMExtraEsc")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("cmbDMSize")), SIGNAL(currentIndexChanged(int)), SLOT(update_preview()));
connect(get_widget(QSL("chkDMRectangle")), SIGNAL(toggled(bool)), SLOT(update_preview()));
connect(get_widget(QSL("chkDMRE")), SIGNAL(toggled(bool)), SLOT(update_preview()));
@@ -2952,10 +2953,14 @@ void MainWindow::update_preview()
break;
case BARCODE_AZTEC:
if (get_rad_val(QSL("radAztecHIBC")))
if (get_rad_val(QSL("radAztecHIBC"))) {
m_bc.bc.setSymbol(BARCODE_HIBC_AZTEC);
else
} else {
m_bc.bc.setSymbol(BARCODE_AZTEC);
if (get_rad_val(QSL("radAztecExtraEsc"))) {
m_bc.bc.setInputMode(m_bc.bc.inputMode() | EXTRA_ESCAPE_MODE);
}
}
if (get_rad_val(QSL("radAztecSize"))) {
m_bc.bc.setOption2(get_cmb_index(QSL("cmbAztecSize")) + 1);
@@ -4458,7 +4463,8 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
settings.setValue(QSL("studio/bc/aztec/size"), m_aztecSizeIndex);
settings.setValue(QSL("studio/bc/aztec/ecc"), m_aztecECCIndex);
settings.setValue(QSL("studio/bc/aztec/encoding_mode"), get_rad_grp_index(
QStringList() << QSL("radAztecStand") << QSL("radAztecGS1") << QSL("radAztecHIBC")));
QStringList() << QSL("radAztecStand") << QSL("radAztecGS1") << QSL("radAztecHIBC")
<< QSL("radAztecExtraEsc")));
settings.setValue(QSL("studio/bc/aztec/structapp_count"), get_cmb_index(QSL("cmbAztecStructAppCount")));
settings.setValue(QSL("studio/bc/aztec/chk_full"), get_chk_val(QSL("chkAztecFull")));
settings.setValue(QSL("studio/bc/aztec/chk_fast"), get_chk_val(QSL("chkAztecFast")));
@@ -4933,7 +4939,8 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
}
set_cmb_from_setting(settings, QSL("studio/bc/aztec/ecc"), QSL("cmbAztecECC"));
set_rad_from_setting(settings, QSL("studio/bc/aztec/encoding_mode"),
QStringList() << QSL("radAztecStand") << QSL("radAztecGS1") << QSL("radAztecHIBC"));
QStringList() << QSL("radAztecStand") << QSL("radAztecGS1") << QSL("radAztecHIBC")
<< QSL("radAztecExtraEsc"));
set_chk_from_setting(settings, QSL("studio/bc/aztec/chk_full"), QSL("chkAztecFull"));
set_chk_from_setting(settings, QSL("studio/bc/aztec/chk_fast"), QSL("chkAztecFast"));
set_cmb_from_setting(settings, QSL("studio/bc/aztec/structapp_count"), QSL("cmbAztecStructAppCount"));