From 14177c5ddb2e6c74ab0e2c1046d6038b20506f42 Mon Sep 17 00:00:00 2001 From: Laszlo Valko Date: Wed, 3 Jul 2024 03:39:34 +0200 Subject: [PATCH] Added Qt patch for scribus. --- patches/app-office/scribus/scribus-qt.patch | 52 +++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 patches/app-office/scribus/scribus-qt.patch diff --git a/patches/app-office/scribus/scribus-qt.patch b/patches/app-office/scribus/scribus-qt.patch new file mode 100644 index 0000000..bff9223 --- /dev/null +++ b/patches/app-office/scribus/scribus-qt.patch @@ -0,0 +1,52 @@ +--- a/scribus/plugins/gettext/htmlim/htmlreader.cpp 2024-01-07 18:06:59.000000000 +0100 ++++ b/scribus/plugins/gettext/htmlim/htmlreader.cpp 2024-07-03 00:07:19.308537750 +0200 +@@ -248,7 +248,7 @@ + bool lcis = (chr.length() > 0 && chr[0].isSpace()); + if (inPre) + { +- if (tmp.at(0) == "\n") ++ if (tmp.at(0) == '\n') + tmp = tmp.right(tmp.length() - 2); + } + else +--- a/scribus/plugins/gettext/sxwim/stylereader.cpp 2024-01-07 18:06:59.000000000 +0100 ++++ b/scribus/plugins/gettext/sxwim/stylereader.cpp 2024-07-03 00:08:30.136347003 +0200 +@@ -276,11 +276,11 @@ + currentStyle->getFont()->setHscale(static_cast(getSize(attrValue, -1.0))); + else if ((attrName == "style:text-position") && + (((attrValue).indexOf("sub") != -1) || +- (((attrValue).at(0) == "-") && ((attrValue).at(0) != "0")))) ++ (((attrValue).at(0) == '-') && ((attrValue).at(0) != '0')))) + currentStyle->getFont()->toggleEffect(SUBSCRIPT); + else if ((attrName == "style:text-position") && + (((attrValue).indexOf("super") != -1) || +- (((attrValue).at(0) != "-") && ((attrValue).at(0) != "0")))) ++ (((attrValue).at(0) != '-') && ((attrValue).at(0) != '0')))) + currentStyle->getFont()->toggleEffect(SUPERSCRIPT); + else if ((attrName == "fo:margin-top") && (pstyle != nullptr)) + pstyle->setSpaceAbove(getSize(attrValue)); +@@ -666,11 +666,11 @@ + style->getFont()->setHscale(static_cast(getSize(value, -1.0))); + else if ((key == "style:text-position") && + ((value.indexOf("sub") != -1) || +- ((value.at(0) == "-") && (value.at(0) != "0")))) ++ ((value.at(0) == '-') && (value.at(0) != '0')))) + style->getFont()->toggleEffect(SUBSCRIPT); + else if ((key == "style:text-position") && + ((value.indexOf("super") != -1) || +- ((value.at(0) != "-") && (value.at(0) != "0")))) ++ ((value.at(0) != '-') && (value.at(0) != '0')))) + style->getFont()->toggleEffect(SUPERSCRIPT); + else if ((key == "fo:margin-top") && (pstyle != nullptr)) + pstyle->setSpaceAbove(getSize(value)); +--- a/scribus/scribusapp.cpp 2024-01-07 18:07:07.000000000 +0100 ++++ b/scribus/scribusapp.cpp 2024-07-03 00:06:56.659238354 +0200 +@@ -282,7 +282,7 @@ + } + else + { //argument is not a known option, but either positional parameter or invalid. +- if (arg.at(0) == "-") ++ if (arg.at(0) == '-') + { + std::cout << tr("Invalid argument: %1").arg(arg).toLocal8Bit().data() << std::endl; + std::exit(EXIT_FAILURE);