- Add special symbology-specific escape sequences (Code 128 only)

for manual Code Set switching via `input_mode` flag
  `EXTRA_ESCAPE_MODE` (CLI `--extraesc`) (ticket #204)
- GUI: disable "Reset" colour if default; add "Unset" to Printing
  Scale dialog (allows unsetting of X-dim/resolution settings
  without having to zap)
- library: guard against out-of-bounds rows (negative)
- test suite: fix some clang-tidy warnings; slight coverage
  improvements
This commit is contained in:
gitlost
2023-01-15 00:22:43 +00:00
parent 5669addf01
commit 6f7cdd660c
30 changed files with 649 additions and 285 deletions

View File

@ -1,7 +1,7 @@
/***************************************************************************
* Copyright (C) 2008 by BogDan Vatra *
* bogdan@licentia.eu *
* Copyright (C) 2010-2022 Robin Stuart *
* Copyright (C) 2010-2023 Robin Stuart *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@ -1163,6 +1163,7 @@ namespace Zint {
}
arg_bool(cmd, "--esc", inputMode() & ESCAPE_MODE);
arg_bool(cmd, "--extraesc", inputMode() & EXTRA_ESCAPE_MODE);
arg_bool(cmd, "--fast", inputMode() & FAST_MODE);
if (fgColor() != Qt::black) {

View File

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2021-2022 by Robin Stuart <rstuart114@gmail.com> *
* Copyright (C) 2021-2023 by Robin Stuart <rstuart114@gmail.com> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@ -608,6 +608,19 @@ private slots:
" --rotate=90 --verbose --vers=7"
<< "" << "" << "" << "";
QTest::newRow("BARCODE_CODE128") << false << 0.0f << ""
<< BARCODE_CODE128 << (UNICODE_MODE | EXTRA_ESCAPE_MODE) // symbology-inputMode
<< "1234\\^A56" << "" // text-primary
<< 0.0f << -1 << 0 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
<< false << false << true << false << true << 0 // showText-rotateAngle
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 20 -d '1234\\^A56' --extraesc --notext --quietzones"
<< "zint.exe -b 20 -d \"1234\\^A56\" --extraesc --notext --quietzones"
<< "" << "" << "" << "";
QTest::newRow("BARCODE_GS1_128_CC") << false << 0.0f << ""
<< BARCODE_GS1_128_CC << UNICODE_MODE // symbology-inputMode
<< "[01]12345678901231[15]121212" << "[11]901222[99]ABCDE" // text-primary