Added Qt patch for scribus.

This commit is contained in:
László Valkó 2024-07-03 03:39:34 +02:00
parent 2a0ba6a789
commit 14177c5ddb

View file

@ -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<int>(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<int>(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);