diff options
Diffstat (limited to 'user/calligra')
-rw-r--r-- | user/calligra/APKBUILD | 58 | ||||
-rw-r--r-- | user/calligra/braindump.patch | 21 | ||||
-rw-r--r-- | user/calligra/c99-math.patch | 18 | ||||
-rw-r--r-- | user/calligra/cxx17.patch | 474 | ||||
-rw-r--r-- | user/calligra/fontconfig.patch | 86 | ||||
-rw-r--r-- | user/calligra/poppler-73.patch | 45 | ||||
-rw-r--r-- | user/calligra/poppler.patch | 236 | ||||
-rw-r--r-- | user/calligra/poppler2.patch | 114 | ||||
-rw-r--r-- | user/calligra/poppler3.patch | 92 | ||||
-rw-r--r-- | user/calligra/poppler4.patch | 76 | ||||
-rw-r--r-- | user/calligra/ridiculous-typo.patch | 11 |
11 files changed, 785 insertions, 446 deletions
diff --git a/user/calligra/APKBUILD b/user/calligra/APKBUILD index fdaf6e4fe..3a064428b 100644 --- a/user/calligra/APKBUILD +++ b/user/calligra/APKBUILD @@ -1,8 +1,8 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=calligra -pkgver=3.1.0 -pkgrel=3 +pkgver=3.2.1 +pkgrel=1 pkgdesc="KDE Office suite" url="https://www.calligra.org/" arch="all" @@ -23,33 +23,19 @@ makedepends="cmake extra-cmake-modules qt5-qtbase-dev qt5-qtscript-dev boost-dev eigen-dev fontconfig-dev freetype-dev gsl-dev lcms2-dev libetonyek-dev libgit2-dev libodfgen-dev librevenge-dev libvisio-dev libwpd-dev libwpg-dev libwps-dev marble-dev poppler-dev poppler-qt5-dev - qca-dev + qca-dev okular - kcalcore-dev kcontacts-dev kdiagram-dev" + kcalendarcore-dev kcontacts-dev kdiagram-dev" subpackages="$pkgname-dev $pkgname-lang" source="https://download.kde.org/stable/calligra/$pkgver/calligra-$pkgver.tar.xz - https://download.kde.org/stable/calligra/$pkgver/calligraplan-$pkgver.tar.xz - c99-math.patch + braindump.patch + ridiculous-typo.patch + fontconfig.patch + cxx17.patch poppler.patch - poppler2.patch - poppler3.patch - poppler4.patch - poppler-73.patch " -prepare() { - default_prepare - - cd "$builddir" - mv ../calligraplan-$pkgver plan - sed -e "/add_subdirectory(plan)/s/#//" \ - -e "/^calligra_disable_product(APP_PLAN/s/^/#/" \ - -i CMakeLists.txt - mkdir build -} - build() { - cd "$builddir"/build if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi @@ -61,28 +47,26 @@ build() { -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" \ -DEIGEN3_INCLUDE_DIR=/usr/include/eigen3 \ - -DPRODUCTSET="KARBON PLAN SHEETS STAGE WORDS" \ + -DPRODUCTSET=desktop \ + -DQt5WebKitWidgets_FOUND=True \ + -DAPP_BRAINDUMP=True \ -DBUILD_UNMAINTAINED=True \ ${CMAKE_CROSSOPTS} \ - .. - make + -Bbuild + make -C build } check() { - cd "$builddir"/build - CTEST_OUTPUT_ON_FAILURE=TRUE ctest + CTEST_OUTPUT_ON_FAILURE=TRUE make -C build test } package() { - cd "$builddir"/build - make DESTDIR="$pkgdir" install + make DESTDIR="$pkgdir" -C build install } -sha512sums="ad1b689a5b36deafcf6985d4a0a1e8148d10e19fb4a0be8343c6e1d24146b9a8ffa0890ab5bbb21816b3134d21150b57f6159db1a30cc54c0fde5bf7bdf4537b calligra-3.1.0.tar.xz -a8ccc6ee2f0381b811926a296122464bdb79aad7c75ff0f7a554e4596165ff7fd7ef62c9af9232ea36542d6b538446c8920fe77cbbe7ffacdf6e6b99a1b68156 calligraplan-3.1.0.tar.xz -b03d2f33a0233638be06b4219328404eac4a77c508619c4037b3b53556b257fc4888cd690bb3755562040a198cbd51a323d13553fed3f2082398556a49482c6e c99-math.patch -960614eb2d367443810cc356d004d43867a4fa4085b054ffd1522b94ef09e9338e723117c91148383d33d54104729750a199ab1b75569aaa7164a908afd3cd4c poppler.patch -53296af0b1ad39c523bc93a0040f1316dfb52e2077d277a83841a741c5cb48d81efb1f6328b2af2c8f1dc92db12c4d771a9a65028498d7802b2c30dd702b9455 poppler2.patch -a22b78d9664284ee5de7a4299907ec37a7835cb6ae3af8e7c1ee0202cea8c1e544fbad7395e56115fb5fe13ec06aeff22e381431e20c6c151c93003cf8a45446 poppler3.patch -df0e592f8c314581b1811776f8aa1c3dd32f05f966f23ef4dd023c41dad759aea8b674b32e2bd7bee36efe4ba0ce0bdd08f3fc30d10115330605d09d46883a28 poppler4.patch -8440f1c36aba9cb54efa36fae73d605f57e78d055225c776791b14554d6be6f081f8cdc3fa65fb9c0b600a3b030d7776b45f631b9bc00d495ab16bfc35bd66f4 poppler-73.patch" +sha512sums="e53a939aa1b277c2291cfd626868c77085fc9cc7774df160b5b1afceb33314b4381fa8ffe03636cbde6e35cc2abd170a51e7f9c1a99191339313b9c9c3b1526f calligra-3.2.1.tar.xz +cdb50c21581e753926e1d73eb1dd090e7ef243bfd54ddac6df2d22dafd496c7f4d543dc2818d1ddae98e2bbcef0de403a10cc162c03da548ced8d872d8348594 braindump.patch +3fa0700f471202eb8b76ded3928b884f43aa1c52e3fa6fc33b7fb62d5b1dcff1df2823723963a40f383e466eb7bebb1a66db14f2bd076a41f25b74f1a5f7f8d5 ridiculous-typo.patch +8dd6498dd5b225a630f69da37e5e53f513c9d4bc764e3ddedfb06b6403faca298358340264366972953ca5cc4ec3c2eb59fe76fb7fc0d924653a5c885f2a5e4f fontconfig.patch +5e85e59edd36df81f51d2fc046bbff5628d9255a3a992ce4ec1ea7bf14f5b5415bb81578c4e87a2a78cfe3a0af2800bb57b3642e47afe71b62501100832ca417 cxx17.patch +717a2e04195e686906e8af2b0d04f76e4ab8e9b77a224a1e85cab27de8d6afbb699200ffb76771b0ac0973d7c5e0ffc4a183f2486ff9c1a5fafb75aaee94457d poppler.patch" diff --git a/user/calligra/braindump.patch b/user/calligra/braindump.patch new file mode 100644 index 000000000..933fe7c9f --- /dev/null +++ b/user/calligra/braindump.patch @@ -0,0 +1,21 @@ +--- calligra-3.2.1/CMakeLists.txt.old 2020-05-14 06:53:49.000000000 +0000 ++++ calligra-3.2.1/CMakeLists.txt 2020-07-29 23:07:48.255879433 +0000 +@@ -1068,7 +1068,7 @@ + # e.g.: + # calligra_disable_product(APP_FOO "isn't buildable at the moment") + +-calligra_disable_product(APP_BRAINDUMP "Disabled, will (probably) be removed from Calligra") ++#calligra_disable_product(APP_BRAINDUMP "Disabled, will (probably) be removed from Calligra") + + ############################################# + #### Calculate buildable products #### +--- calligra-3.2.1/braindump/src/MainWindow.h.old 2020-05-14 01:51:30.000000000 -0500 ++++ calligra-3.2.1/braindump/src/MainWindow.h 2022-11-19 04:34:25.337849680 -0600 +@@ -22,6 +22,7 @@ + + #include <kxmlguiwindow.h> + #include <KoCanvasSupervisor.h> ++#include <QMap> + + class DockerManager; + class RootSection; diff --git a/user/calligra/c99-math.patch b/user/calligra/c99-math.patch deleted file mode 100644 index 4326dd7fa..000000000 --- a/user/calligra/c99-math.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- calligra-3.1.0/filters/words/msword-odf/wv2/CMakeLists.txt.old 2018-01-26 09:24:44.000000000 +0000 -+++ calligra-3.1.0/filters/words/msword-odf/wv2/CMakeLists.txt 2018-10-24 23:22:43.440000000 +0000 -@@ -64,12 +64,12 @@ - set( CMAKE_REQUIRED_INCLUDES math.h ) - endif() - --check_function_exists( isinf HAVE_FUNC_ISINF ) --check_function_exists( isnan HAVE_FUNC_ISNAN ) -+check_symbol_exists( isinf math.h HAVE_FUNC_ISINF ) -+check_symbol_exists( isnan math.h HAVE_FUNC_ISNAN ) - if(MINGW) - add_definitions( -DHAVE_FUNC_ISFINITE ) - endif() --check_function_exists( finite HAVE_FUNC_FINITE ) -+check_symbol_exists( finite math.h HAVE_FUNC_FINITE ) - check_function_exists( _finite HAVE_FUNC__FINITE ) - - # diff --git a/user/calligra/cxx17.patch b/user/calligra/cxx17.patch new file mode 100644 index 000000000..d3fe6dca3 --- /dev/null +++ b/user/calligra/cxx17.patch @@ -0,0 +1,474 @@ +From 175b92c26637a08be4093c9579128f2f89253090 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Fri, 7 Jan 2022 14:00:05 +0100 +Subject: [PATCH] Fix build with >=app-text/poppler-22.01.0 + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 71272ffef2d..bdd9ed74406 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -104,12 +104,7 @@ if(NOT DEFINED RELEASE_BUILD) + endif() + message(STATUS "Release build: ${RELEASE_BUILD}") + +-# use CPP-11 +-if (CMAKE_VERSION VERSION_LESS "3.1") +- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +-else () +- set (CMAKE_CXX_STANDARD 11) +-endif () ++set (CMAKE_CXX_STANDARD 17) # required for >=poppler-22.01 + + ############ + ############# +-- +2.34.1 + +From 068cd9aec11052733e393976142516d2190e4564 Mon Sep 17 00:00:00 2001 +From: Pierre Ducroquet <pinaraf@pinaraf.info> +Date: Sun, 28 Feb 2021 23:23:02 +0100 +Subject: [PATCH] Fix some more warnings + +--- + filters/libmsooxml/MsooXmlDiagramReader_p.cpp | 1 + + filters/sheets/csv/csvimport.cc | 2 +- + filters/sheets/excel/sidewinder/excel.cpp | 1 + + filters/sheets/excel/sidewinder/formulas.cpp | 2 +- + filters/sheets/gnumeric/gnumericexport.cc | 5 ++--- + filters/sheets/html/htmlexport.cc | 2 -- + filters/sheets/latex/export/latexexport.cc | 1 - + filters/sheets/latex/export/table.cc | 1 + + filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp | 1 - + filters/stage/pptx/PptxXmlDocumentReader.cpp | 2 +- + filters/words/msword-odf/texthandler.cpp | 2 ++ + filters/words/msword-odf/wv2/src/parser9x.cpp | 4 +++- + filters/words/msword-odf/wv2/src/styles.cpp | 4 +--- + filters/words/msword-odf/wv2/src/styles.h | 11 ++++++++--- + gemini/lib/GeminiMainWindow.cpp | 2 ++ + libs/pageapp/KoPAOdfPageSaveHelper.cpp | 2 +- + plugins/spacenavigator/SpaceNavigatorDevice.h | 6 ++---- + plugins/spacenavigator/SpaceNavigatorEvent.h | 2 +- + plugins/spacenavigator/SpaceNavigatorPollingThread.h | 3 +-- + plugins/vectorshape/VectorShape.cpp | 1 + + sheets/functions/datetime.cpp | 1 + + sheets/part/Digest.cpp | 8 ++++---- + sheets/shape/TableToolFactory.h | 2 +- + sheets/tests/TestSort.cpp | 4 ++-- + 24 files changed, 38 insertions(+), 32 deletions(-) + +diff --git a/filters/libmsooxml/MsooXmlDiagramReader_p.cpp b/filters/libmsooxml/MsooXmlDiagramReader_p.cpp +index 14b08531262..14fc6ab9a71 100644 +--- a/filters/libmsooxml/MsooXmlDiagramReader_p.cpp ++++ b/filters/libmsooxml/MsooXmlDiagramReader_p.cpp +@@ -872,6 +872,7 @@ void LayoutNodeAtom::finishBuild(Context* context) { + case AlgorithmAtom::UnknownAlg: + warnMsooXml << "Layout with name=" << m_name << "defines an unknown algorithm."; + // fall through and use the composite-algorithm ++ // fall through + case AlgorithmAtom::CompositeAlg: m_algorithmImpl = new CompositeAlgorithm; break; + case AlgorithmAtom::ConnectorAlg: m_algorithmImpl = new ConnectorAlgorithm; break; + case AlgorithmAtom::CycleAlg: m_algorithmImpl = new CycleAlgorithm; break; +diff --git a/filters/sheets/csv/csvimport.cc b/filters/sheets/csv/csvimport.cc +index 89fb7162e00..1008d186f18 100644 +--- a/filters/sheets/csv/csvimport.cc ++++ b/filters/sheets/csv/csvimport.cc +@@ -97,8 +97,8 @@ KoFilter::ConversionStatus CSVFilter::convert(const QByteArray& from, const QByt + return KoFilter::FileNotFound; + } + +- QString csv_delimiter; + // ###### FIXME: disabled for now ++ //QString csv_delimiter; + //if (!config.isNull()) + // csv_delimiter = config[0]; + +diff --git a/filters/sheets/excel/sidewinder/excel.cpp b/filters/sheets/excel/sidewinder/excel.cpp +index ab592225ca6..7fa5633d433 100644 +--- a/filters/sheets/excel/sidewinder/excel.cpp ++++ b/filters/sheets/excel/sidewinder/excel.cpp +@@ -2449,6 +2449,7 @@ bool ExcelReader::load(Workbook* workbook, const char* filename) + } else { + bytes_read = combObjStream->read( buffer, markerOrLength ); + QString ansiString = readByteString(buffer, markerOrLength); ++ Q_UNUSED(ansiString); + //TODO... + //printf( "markerOrLength=%i ansiString=%s\n",markerOrLength,ansiString.ascii() ); + } +diff --git a/filters/sheets/excel/sidewinder/formulas.cpp b/filters/sheets/excel/sidewinder/formulas.cpp +index 62747469a49..0132d39e024 100644 +--- a/filters/sheets/excel/sidewinder/formulas.cpp ++++ b/filters/sheets/excel/sidewinder/formulas.cpp +@@ -1513,7 +1513,7 @@ static void mergeTokens(UStringStack* stack, unsigned count, const QString &merg + if (!stack) return; + if (stack->size() < count) return; + +- QString s1, s2; ++ QString s1; + + while (count) { + count--; +diff --git a/filters/sheets/gnumeric/gnumericexport.cc b/filters/sheets/gnumeric/gnumericexport.cc +index 1256c68bc74..2468548edb3 100644 +--- a/filters/sheets/gnumeric/gnumericexport.cc ++++ b/filters/sheets/gnumeric/gnumericexport.cc +@@ -1293,15 +1293,13 @@ KoFilter::ConversionStatus GNUMERICExport::convert(const QByteArray& from, const + i = 0; + } + +- QString line; + for (int currentcolumn = 1; currentcolumn <= iMaxColumn; currentcolumn++) { + QDomElement cell_contents; + Cell cell(table, currentcolumn, currentrow); + +- QString text, style; ++ QString text; + QDomDocument domLink; + QDomElement domRoot; +- QDomNode domNode; + QDomNodeList childNodes; + + if (!cell.isDefault() && !cell.isEmpty()) { +@@ -1342,6 +1340,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert(const QByteArray& from, const + text = domNode.toElement().text(); + + while (!domNode.isNull()) { ++ QString style; + style = domNode.toElement().tagName(); + + if (style == "b") +diff --git a/filters/sheets/html/htmlexport.cc b/filters/sheets/html/htmlexport.cc +index 2d116e0608c..bf41a6f743e 100644 +--- a/filters/sheets/html/htmlexport.cc ++++ b/filters/sheets/html/htmlexport.cc +@@ -242,7 +242,6 @@ void HTMLExport::convertSheet(Sheet *sheet, QString &str, int iMaxUsedRow, int i + i = 0; + } + +- QString separators; + QString line; + unsigned int nonempty_cells = 0; + +@@ -435,7 +434,6 @@ void HTMLExport::detectFilledCells(Sheet *sheet, int &rows, int &columns) + int iUsedColumn = 0; + for (int currentcolumn = 1 ; currentcolumn <= iMaxColumn ; currentcolumn++) { + cell = Cell(sheet, currentcolumn, currentrow); +- QString text; + if (!cell.isDefault() && !cell.isEmpty()) { + iUsedColumn = currentcolumn; + } +diff --git a/filters/sheets/latex/export/latexexport.cc b/filters/sheets/latex/export/latexexport.cc +index 8d0698a3420..4f8caf235d9 100644 +--- a/filters/sheets/latex/export/latexexport.cc ++++ b/filters/sheets/latex/export/latexexport.cc +@@ -38,7 +38,6 @@ LATEXExport::LATEXExport(QObject* parent, const QVariantList&) : + + KoFilter::ConversionStatus LATEXExport::convert(const QByteArray& from, const QByteArray& to) + { +- QString config; + + if (to != "text/x-tex" || from != "application/x-kspread") + return KoFilter::NotImplemented; +diff --git a/filters/sheets/latex/export/table.cc b/filters/sheets/latex/export/table.cc +index 8d8b6701a39..e58827dfbc7 100644 +--- a/filters/sheets/latex/export/table.cc ++++ b/filters/sheets/latex/export/table.cc +@@ -118,6 +118,7 @@ void Table::analyzePaper(const QDomNode node) + + /* borders */ + QDomNode border = getChild(node, "borders"); ++ Q_UNUSED(border); + setBorderRight(getAttr(node, "right").toLong()); + setBorderLeft(getAttr(node, "left").toLong()); + setBorderBottom(getAttr(node, "bottom").toLong()); +diff --git a/filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp b/filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp +index 782a5914729..eda8ffc6b47 100644 +--- a/filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp ++++ b/filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp +@@ -872,7 +872,6 @@ KoFilter::ConversionStatus XlsxXmlWorksheetReader::read_conditionalFormatting() + while (index < m_conditionalIndices.size()) { + QString conditionalArea; + Condition examinedCondition = m_conditionalIndices.at(index); +- QString sqrefOriginal = sqref; + int areaIndex = 0; + Condition previousCond; + +diff --git a/filters/stage/pptx/PptxXmlDocumentReader.cpp b/filters/stage/pptx/PptxXmlDocumentReader.cpp +index 4cf86aea8c8..11b5ad266b9 100644 +--- a/filters/stage/pptx/PptxXmlDocumentReader.cpp ++++ b/filters/stage/pptx/PptxXmlDocumentReader.cpp +@@ -316,7 +316,7 @@ KoFilter::ConversionStatus PptxXmlDocumentReader::read_sldId() + + QString slideMasterPath, slideMasterFile; + MSOOXML::Utils::splitPathAndFile(m_context->relationships->targetForType(slidePath, slideFile, QLatin1String(MSOOXML::Schemas::officeDocument::relationships) + "/slideLayout"), &slideMasterPath, &slideMasterFile); +- const QString slideMasterPathAndFile = m_context->relationships->targetForType(slideMasterPath, slideMasterFile, QLatin1String(MSOOXML::Schemas::officeDocument::relationships) + "/slideMaster"); ++ // const QString slideMasterPathAndFile = m_context->relationships->targetForType(slideMasterPath, slideMasterFile, QLatin1String(MSOOXML::Schemas::officeDocument::relationships) + "/slideMaster"); + + // Delay the reading of a tableStyle until we find a table as we need the + // clrMap from the master slide +diff --git a/filters/words/msword-odf/texthandler.cpp b/filters/words/msword-odf/texthandler.cpp +index e167d86e028..89ef678961a 100644 +--- a/filters/words/msword-odf/texthandler.cpp ++++ b/filters/words/msword-odf/texthandler.cpp +@@ -408,6 +408,7 @@ void WordsTextHandler::footnoteFound(wvWare::FootnoteData data, + } + case msonfcUCLetter: + letter = 'A'; ++ // fall through + case msonfcLCLetter: + { + while (noteNumber / 25 > 0) { +@@ -1064,6 +1065,7 @@ void WordsTextHandler::fieldStart(const wvWare::FLD* fld, wvWare::SharedPtr<cons + break; + case UNSUPPORTED: + warnMsDoc << "Warning: Fld data missing, ignoring!"; ++ // fall through + default: + warnMsDoc << "Warning: unrecognized field type, ignoring!"; + m_fld->m_type = UNSUPPORTED; +diff --git a/filters/words/msword-odf/wv2/src/parser9x.cpp b/filters/words/msword-odf/wv2/src/parser9x.cpp +index 9a6d1606ce9..e5d7d14691c 100644 +--- a/filters/words/msword-odf/wv2/src/parser9x.cpp ++++ b/filters/words/msword-odf/wv2/src/parser9x.cpp +@@ -581,7 +581,8 @@ void Parser9x::processPiece( String* string, U32 fc, U32 limit, const Position& + // same ASCII code as TTP_MARK (0x0007), NOTE: table depth == 1 + case CELL_MARK: + m_cellMarkFound = true; +- // Fall-through intended. A row/cell end is also a paragraph end. ++ // A row/cell end is also a paragraph end. ++ // fall through + case PARAGRAPH_MARK: + { + // No "index - start + 1" here, as we don't want to copy the +@@ -1064,6 +1065,7 @@ void Parser9x::emitSpecialCharacter( UChar character, U32 globalCP, SharedPtr<co + if (m_subDocument == Main) { + emitAnnotation( UString(character), globalCP, chp ); + } ++ break; + } + case TextHandler::FieldEscapeChar: + wvlog << "Found an escape character ++++++++++++++++++++?" << endl; +diff --git a/filters/words/msword-odf/wv2/src/styles.cpp b/filters/words/msword-odf/wv2/src/styles.cpp +index f47c3dd8d51..d2c96e3d92b 100644 +--- a/filters/words/msword-odf/wv2/src/styles.cpp ++++ b/filters/words/msword-odf/wv2/src/styles.cpp +@@ -42,7 +42,6 @@ STD::STD() + } + + STD::STD( U16 baseSize, U16 totalSize, OLEStreamReader* stream, bool preservePos ) +-throw(InvalidFormatException) + { + clearInternal(); + if (!read( baseSize, totalSize, stream, preservePos )) { +@@ -112,7 +111,6 @@ STD& STD::operator=( const STD& rhs ) + } + + bool STD::read( const U16 cbStd, const U16 stdfSize, OLEStreamReader* stream, bool preservePos ) +-throw(InvalidFormatException) + { + U16 shifterU16; + S32 startOffset=stream->tell(); // address where the STD starts +@@ -938,7 +936,7 @@ void Style::mergeUpechpx( const Style* parentStyle, WordVersion version ) + } + + +-StyleSheet::StyleSheet( OLEStreamReader* tableStream, U32 fcStshf, U32 lcbStshf ) throw(InvalidFormatException) ++StyleSheet::StyleSheet( OLEStreamReader* tableStream, U32 fcStshf, U32 lcbStshf ) + : m_udsNum(0) + { + WordVersion version = Word8; +diff --git a/filters/words/msword-odf/wv2/src/styles.h b/filters/words/msword-odf/wv2/src/styles.h +index ba02def6845..41c8278dd21 100644 +--- a/filters/words/msword-odf/wv2/src/styles.h ++++ b/filters/words/msword-odf/wv2/src/styles.h +@@ -58,8 +58,9 @@ struct STD + STD(); + /** + * Simply calls read(...) ++ * @throw InvalidFormatException + */ +- STD( U16 stdfSize, U16 totalSize, OLEStreamReader* stream, bool preservePos = false ) throw(InvalidFormatException); ++ STD( U16 stdfSize, U16 totalSize, OLEStreamReader* stream, bool preservePos = false ); + /** + * Attention: This struct allocates memory on the heap + */ +@@ -74,8 +75,9 @@ struct STD + * false the state of stream will be changed! + * + * @return true - success, false - failed ++ * @throw InvalidFormatException + */ +- bool read( const U16 cbStd, const U16 stdfSize, OLEStreamReader* stream, bool preservePos = false ) throw(InvalidFormatException); ++ bool read( const U16 cbStd, const U16 stdfSize, OLEStreamReader* stream, bool preservePos = false ); + + /** + * Same as reading :) +@@ -365,7 +367,10 @@ private: + class WV2_EXPORT StyleSheet + { + public: +- StyleSheet( OLEStreamReader* tableStream, U32 fcStshf, U32 lcbStshf ) throw(InvalidFormatException); ++ /** ++ * @throw InvalidFormatException ++ */ ++ StyleSheet( OLEStreamReader* tableStream, U32 fcStshf, U32 lcbStshf ); + ~StyleSheet(); + + /** +diff --git a/gemini/lib/GeminiMainWindow.cpp b/gemini/lib/GeminiMainWindow.cpp +index 3d05f6461e0..eb5f120c0f7 100644 +--- a/gemini/lib/GeminiMainWindow.cpp ++++ b/gemini/lib/GeminiMainWindow.cpp +@@ -136,8 +136,10 @@ void GeminiMainWindow::setFullScreen(bool newState) + } + + ++ + void GeminiMainWindow::changeState(GeminiMainWindow::GeminiState newState, bool lockNewState) + { ++ Q_UNUSED(lockNewState); + d->syncObject = new GeminiModeSynchronisationObject; + + if(centralWidget()) { +diff --git a/libs/pageapp/KoPAOdfPageSaveHelper.cpp b/libs/pageapp/KoPAOdfPageSaveHelper.cpp +index 92c6dfd4cb4..068501c8af1 100644 +--- a/libs/pageapp/KoPAOdfPageSaveHelper.cpp ++++ b/libs/pageapp/KoPAOdfPageSaveHelper.cpp +@@ -49,7 +49,7 @@ KoPAOdfPageSaveHelper::KoPAOdfPageSaveHelper( KoPADocument * doc, QList<KoPAPage + KoPAPage * p = static_cast<KoPAPage *>( page ); + masterPages.insert( p->masterPage() ); + } +- m_masterPages = masterPages.toList(); ++ m_masterPages = masterPages.values(); + } + } + +diff --git a/plugins/spacenavigator/SpaceNavigatorDevice.h b/plugins/spacenavigator/SpaceNavigatorDevice.h +index b9056ac98c1..ecd696e415f 100644 +--- a/plugins/spacenavigator/SpaceNavigatorDevice.h ++++ b/plugins/spacenavigator/SpaceNavigatorDevice.h +@@ -31,10 +31,8 @@ public: + explicit SpaceNavigatorDevice(QObject *parent); + virtual ~SpaceNavigatorDevice(); + +- /// reimplemented from KoInputDeviceHandler +- virtual bool start(); +- /// reimplemented from KoInputDeviceHandler +- virtual bool stop(); ++ virtual bool start() override; ++ virtual bool stop() override; + private Q_SLOTS: + void slotMoveEvent( int x, int y, int z, int rx, int ry, int rz, Qt::MouseButtons ); + void slotButtonEvent( int x, int y, int z, int rx, int ry, int rz, Qt::MouseButtons, Qt::MouseButton, int type ); +diff --git a/plugins/spacenavigator/SpaceNavigatorEvent.h b/plugins/spacenavigator/SpaceNavigatorEvent.h +index 73751ec88ff..76ee8e2f880 100644 +--- a/plugins/spacenavigator/SpaceNavigatorEvent.h ++++ b/plugins/spacenavigator/SpaceNavigatorEvent.h +@@ -33,7 +33,7 @@ public: + void setPosition( int x, int y, int z ); + void setRotation( int rx, int ry, int rz ); + +- virtual KoPointerEvent * pointerEvent(); ++ virtual KoPointerEvent * pointerEvent() override; + + private: + int m_x, m_y, m_z; +diff --git a/plugins/spacenavigator/SpaceNavigatorPollingThread.h b/plugins/spacenavigator/SpaceNavigatorPollingThread.h +index 62c4de8ab73..67d59177021 100644 +--- a/plugins/spacenavigator/SpaceNavigatorPollingThread.h ++++ b/plugins/spacenavigator/SpaceNavigatorPollingThread.h +@@ -39,8 +39,7 @@ Q_SIGNALS: + + protected: + +- /// reimplemented from QThread +- virtual void run(); ++ virtual void run() override; + + private: + bool m_stopped; +diff --git a/plugins/vectorshape/VectorShape.cpp b/plugins/vectorshape/VectorShape.cpp +index a25ab3fc561..9acbd251c94 100644 +--- a/plugins/vectorshape/VectorShape.cpp ++++ b/plugins/vectorshape/VectorShape.cpp +@@ -294,6 +294,7 @@ void VectorShape::saveOdf(KoShapeSavingContext & context) const + break; + case VectorTypeSvg: + mimeType = "image/svg+xml"; ++ break; + default: + // FIXME: What here? + mimeType = "application/x-what"; +diff --git a/sheets/functions/datetime.cpp b/sheets/functions/datetime.cpp +index 9f59fe2cf75..6157b0996c1 100644 +--- a/sheets/functions/datetime.cpp ++++ b/sheets/functions/datetime.cpp +@@ -597,6 +597,7 @@ Value func_currentDate(valVector, ValueCalc * calc, FuncExtra *) + // Function: CURRENTTIME + Value func_currentTime(valVector, ValueCalc * calc, FuncExtra *) + { ++ Q_UNUSED(calc); + return Value(QTime::currentTime()); + } + +diff --git a/sheets/part/Digest.cpp b/sheets/part/Digest.cpp +index 8cd972db989..e9246ce6e7d 100644 +--- a/sheets/part/Digest.cpp ++++ b/sheets/part/Digest.cpp +@@ -596,10 +596,10 @@ static void __rtl_digest_endSHA(DigestContextSHA *ctx) + } + + switch (ctx->m_nDatLen & 0x03) { +- case 0: X[i] = ((sal_uInt32)(*(p++))) << 0L; +- case 1: X[i] |= ((sal_uInt32)(*(p++))) << 8L; +- case 2: X[i] |= ((sal_uInt32)(*(p++))) << 16L; +- case 3: X[i] |= ((sal_uInt32)(*(p++))) << 24L; ++ case 0: X[i] = ((sal_uInt32)(*(p++))) << 0L; /* fall through */ ++ case 1: X[i] |= ((sal_uInt32)(*(p++))) << 8L; /* fall through */ ++ case 2: X[i] |= ((sal_uInt32)(*(p++))) << 16L; /* fall through */ ++ case 3: X[i] |= ((sal_uInt32)(*(p++))) << 24L; /* fall through */ + } + + __rtl_digest_swapLong(X, i + 1); +diff --git a/sheets/shape/TableToolFactory.h b/sheets/shape/TableToolFactory.h +index 679bfe14b8e..9412d8ffdc5 100644 +--- a/sheets/shape/TableToolFactory.h ++++ b/sheets/shape/TableToolFactory.h +@@ -34,7 +34,7 @@ public: + TableToolFactory(); + ~TableToolFactory(); + +- KoToolBase* createTool(KoCanvasBase* canvas); ++ KoToolBase* createTool(KoCanvasBase* canvas) override; + }; + + } // namespace Sheets +diff --git a/sheets/tests/TestSort.cpp b/sheets/tests/TestSort.cpp +index b3f1e35169d..6354d79abc5 100644 +--- a/sheets/tests/TestSort.cpp ++++ b/sheets/tests/TestSort.cpp +@@ -68,7 +68,7 @@ void TestSort::AscendingOrder() + command->setSheet(sheet); + + // Parameters. +- command->setSortRows(Qt::Vertical); ++ command->setSortRows(true); + command->setSkipFirst(false); + command->setCopyFormat(false); + +@@ -121,7 +121,7 @@ void TestSort::DescendingOrder() + command->setSheet(sheet); + + // Parameters. +- command->setSortRows(Qt::Vertical); ++ command->setSortRows(true); + command->setSkipFirst(false); + command->setCopyFormat(false); + +-- +GitLab + diff --git a/user/calligra/fontconfig.patch b/user/calligra/fontconfig.patch new file mode 100644 index 000000000..7e1fd9d41 --- /dev/null +++ b/user/calligra/fontconfig.patch @@ -0,0 +1,86 @@ +From c7636fb343c848000300a9429410b74d17a4d54d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=96mer=20Fad=C4=B1l=20Usta?= <omerusta@gmail.com> +Date: Tue, 8 Jun 2021 05:13:23 +0000 +Subject: [PATCH] Partial update of Commit 62f51070 to make it compileable + again + +Cmake to 3.16 +Fix Fontconfig's FOUND variable +Fix Fontconfig's include_dirs variable +Use Correct Target to link FontConfig and Freetype +--- + CMakeLists.txt | 14 +++++--------- + libs/text/CMakeLists.txt | 4 ++-- + 2 files changed, 7 insertions(+), 11 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1ce210ebe01..71272ffef2d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.8.12) ++cmake_minimum_required(VERSION 3.16) + + project(calligra) + +@@ -168,6 +168,8 @@ calligra_set_productset(${PRODUCTSET}) + ## Look for ECM, Qt, KF5 ## + ########################### + ########################## ++set(REQUIRED_KF5_VERSION "5.7.0") ++set(REQUIRED_QT_VERSION "5.3.0") + + find_package(ECM 5.19 REQUIRED NO_MODULE) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) +@@ -199,9 +201,6 @@ include(MacroOptionalFindPackage) + include(MacroEnsureVersion) + include(MacroDesktopToJson) + +- +-set(REQUIRED_KF5_VERSION "5.7.0") +- + find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED + COMPONENTS + Archive +@@ -251,9 +250,6 @@ if(${KF5_VERSION} VERSION_LESS "5.16.0") + set(CALLIGRA_OLD_PLUGIN_METADATA TRUE) + endif() + +- +-set(REQUIRED_QT_VERSION "5.3.0") +- + find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED + COMPONENTS + Core +@@ -641,8 +637,8 @@ if(NOT WIN32 AND NOT APPLE) + ) + endif() + +-if(NOT FONTCONFIG_FOUND OR NOT FREETYPE_FOUND) +- set(FONTCONFIG_INCLUDE_DIR "") ++if(NOT Fontconfig_FOUND OR NOT FREETYPE_FOUND) ++ set(Fontconfig_INCLUDE_DIRS "") + set(FREETYPE_INCLUDE_DIRS "") + else() + add_definitions( -DSHOULD_BUILD_FONT_CONVERSION ) +diff --git a/libs/text/CMakeLists.txt b/libs/text/CMakeLists.txt +index 16d7e066fa2..429afe79704 100644 +--- a/libs/text/CMakeLists.txt ++++ b/libs/text/CMakeLists.txt +@@ -152,11 +152,11 @@ if( SHOULD_BUILD_FEATURE_RDF ) + endif() + + if( FONTCONFIG_FOUND ) +- target_link_libraries(kotext PRIVATE ${FONTCONFIG_LIBRARIES}) ++ target_link_libraries(kotext PRIVATE Fontconfig::Fontconfig) + endif() + + if( FREETYPE_FOUND ) +- target_link_libraries(kotext PRIVATE ${FREETYPE_LIBRARIES}) ++ target_link_libraries(kotext PRIVATE Freetype::Freetype) + endif() + + +-- +GitLab + diff --git a/user/calligra/poppler-73.patch b/user/calligra/poppler-73.patch deleted file mode 100644 index aa71e20b4..000000000 --- a/user/calligra/poppler-73.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- calligra-3.1.0/filters/karbon/pdf/SvgOutputDev.cpp.old 2019-01-14 18:40:55.580000000 +0000 -+++ calligra-3.1.0/filters/karbon/pdf/SvgOutputDev.cpp 2019-01-14 18:53:05.000000000 +0000 -@@ -402,7 +402,7 @@ - - QString str; - -- const char * p = s->getCString(); -+ const char * p = s->c_str(); - int len = s->getLength(); - CharCode code; - Unicode *u = nullptr; -@@ -451,11 +451,11 @@ - *d->body << " y=\"" << y << "px\""; - - if (font && font->getFamily()) { -- *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->getCString()) << "\""; -- //debugPdf << "font family:" << QString::fromLatin1( font->getFamily()->getCString() ); -+ *d->body << " font-family=\"" << QString::fromLatin1(font->getFamily()->c_str()) << "\""; -+ //debugPdf << "font family:" << QString::fromLatin1( font->getFamily()->c_str() ); - } else if (font && font->getName()) { -- *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->getCString()) << "\""; -- //debugPdf << "font name:" << QString::fromLatin1( font->getName()->getCString() ); -+ *d->body << " font-family=\"" << QString::fromLatin1(font->getName()->c_str()) << "\""; -+ //debugPdf << "font name:" << QString::fromLatin1( font->getName()->c_str() ); - } - *d->body << " font-size=\"" << qMax(state->getFontSize(), state->getTransformedFontSize()) << "px\""; - -@@ -488,7 +488,7 @@ - if (maskColors) { - for (int y = 0; y < height; y++) { - dest = (unsigned int *)(buffer + y * 4 * width); -- Guchar * pix = imgStr->getLine(); -+ unsigned char * pix = imgStr->getLine(); - colorMap->getRGBLine(pix, dest, width); - - for (int x = 0; x < width; x++) { -@@ -507,7 +507,7 @@ - } else { - for (int y = 0; y < height; y++) { - dest = (unsigned int *)(buffer + y * 4 * width); -- Guchar * pix = imgStr->getLine(); -+ unsigned char * pix = imgStr->getLine(); - colorMap->getRGBLine(pix, dest, width); - } - diff --git a/user/calligra/poppler.patch b/user/calligra/poppler.patch index 458a31514..f59d995fe 100644 --- a/user/calligra/poppler.patch +++ b/user/calligra/poppler.patch @@ -1,84 +1,192 @@ -From a615718222f8ad3bba4b88fad640382e517f7dd9 Mon Sep 17 00:00:00 2001 -From: Antonio Rojas <arojas@archlinux.org> -Date: Wed, 24 Oct 2018 08:28:00 +0200 -Subject: Fix build with poppler>=0.69 +From 63ae4ecc780ba42901e6934302b75bd18d3bc5eb Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid <aacid@kde.org> +Date: Wed, 13 Apr 2022 01:25:44 +0200 +Subject: [PATCH 1/3] PdfImport: Fix compile with newer poppler -Remove no longer available Object::memCheck usage (which didn't do anything anyway since DEBUG_MEM was not set); add some const's - -Differential Revision: https://phabricator.kde.org/D16388 +Brings a dependency on poppler-qt5 to be able to include the version +header, honestly it's not strictly needed, one could do a +check_cxx_source_compiles, but I don't care about Calligra enough to +spend more time making it compile while it's using poppler the wrong +way. --- - filters/karbon/pdf/PdfImport.cpp | 3 --- - filters/karbon/pdf/SvgOutputDev.cpp | 8 ++++---- - filters/karbon/pdf/SvgOutputDev.h | 2 +- - 3 files changed, 5 insertions(+), 8 deletions(-) + CMakeLists.txt | 1 + + filters/karbon/pdf/CMakeLists.txt | 2 +- + filters/karbon/pdf/PdfImport.cpp | 9 +++++++++ + 3 files changed, 11 insertions(+), 1 deletion(-) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bdd9ed74406..d8c86810b54 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -998,6 +998,7 @@ calligra_drop_product_on_bad_condition( FILTER_WPG_TO_ODG + calligra_drop_product_on_bad_condition( FILTER_PDF_TO_SVG + NOT_WIN "not supported on Windows" + PopplerXPDFHeaders_FOUND "poppler xpdf headers not found" ++ Poppler_FOUND "poppler qt5 headers not found" + ) + + calligra_drop_product_on_bad_condition( FILTER_HTML_TO_ODS +diff --git a/filters/karbon/pdf/CMakeLists.txt b/filters/karbon/pdf/CMakeLists.txt +index 94d4071da3d..ef360f44359 100644 +--- a/filters/karbon/pdf/CMakeLists.txt ++++ b/filters/karbon/pdf/CMakeLists.txt +@@ -19,7 +19,7 @@ set(pdf2svg_PART_SRCS PdfImportDebug.cpp PdfImport.cpp SvgOutputDev.cpp ) + add_library(calligra_filter_pdf2svg MODULE ${pdf2svg_PART_SRCS}) + calligra_filter_desktop_to_json(calligra_filter_pdf2svg calligra_filter_pdf2svg.desktop) + +-target_link_libraries(calligra_filter_pdf2svg komain Poppler::Core) ++target_link_libraries(calligra_filter_pdf2svg komain Poppler::Core Poppler::Qt5) + + install(TARGETS calligra_filter_pdf2svg DESTINATION ${PLUGIN_INSTALL_DIR}/calligra/formatfilters) + diff --git a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp -index c3e96b0..48b08df 100644 +index 286f5fa78bc..c171c754116 100644 --- a/filters/karbon/pdf/PdfImport.cpp +++ b/filters/karbon/pdf/PdfImport.cpp -@@ -102,9 +102,6 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt - delete globalParams; - globalParams = 0; +@@ -30,6 +30,10 @@ + + #include <kpluginfactory.h> + ++#include <poppler-version.h> ++ ++#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO)) ++ + // Don't show this warning: it's an issue in poppler + #ifdef __GNUC__ + #pragma GCC diagnostic ignored "-Wunused-parameter" +@@ -73,8 +77,13 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt + if (! globalParams) + return KoFilter::NotImplemented; + ++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0) + GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); + PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); ++#else ++ std::unique_ptr<GooString> fname = std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data()); ++ PDFDoc * pdfDoc = new PDFDoc(std::move(fname)); ++#endif + if (! pdfDoc) { + #ifdef HAVE_POPPLER_PRE_0_83 + delete globalParams; +-- +2.35.1 + +From feb28e5fbd4e3b41c74da1220bc14826bcf9b3c7 Mon Sep 17 00:00:00 2001 +From: Dag Andersen <dag.andersen@kdemail.net> +Date: Wed, 13 Apr 2022 14:45:33 +0200 +Subject: [PATCH 2/3] PdfImport: Fix compile with newer poppler + +Also fixes odg2pdf filter. + +Same solution as commit 236bacbe13739414e919de868283b0caf2df5d8a +by accid@kde.org. +--- + filters/karbon/pdf/CMakeLists.txt | 2 +- + filters/karbon/pdf/Pdf2OdgImport.cpp | 9 +++++++++ + filters/karbon/pdf/SvgOutputDev.cpp | 9 +++++++++ + 3 files changed, 19 insertions(+), 1 deletion(-) + +diff --git a/filters/karbon/pdf/CMakeLists.txt b/filters/karbon/pdf/CMakeLists.txt +index ef360f44359..849baa70f12 100644 +--- a/filters/karbon/pdf/CMakeLists.txt ++++ b/filters/karbon/pdf/CMakeLists.txt +@@ -29,6 +29,6 @@ set(pdf2odg_PART_SRCS PdfImportDebug.cpp Pdf2OdgImport.cpp SvgOutputDev.cpp) + add_library(calligra_filter_pdf2odg MODULE ${pdf2odg_PART_SRCS}) + calligra_filter_desktop_to_json(calligra_filter_pdf2odg calligra_filter_pdf2odg.desktop) + +-target_link_libraries(calligra_filter_pdf2odg kopageapp karbonui Poppler::Core) ++target_link_libraries(calligra_filter_pdf2odg kopageapp karbonui Poppler::Core Poppler::Qt5) -- // check for memory leaks -- Object::memCheck(stderr); -- - return KoFilter::OK; - } + install(TARGETS calligra_filter_pdf2odg DESTINATION ${PLUGIN_INSTALL_DIR}/calligra/formatfilters) +diff --git a/filters/karbon/pdf/Pdf2OdgImport.cpp b/filters/karbon/pdf/Pdf2OdgImport.cpp +index 745239c9c21..b5f3722b320 100644 +--- a/filters/karbon/pdf/Pdf2OdgImport.cpp ++++ b/filters/karbon/pdf/Pdf2OdgImport.cpp +@@ -40,6 +40,8 @@ + #include <kpluginfactory.h> + ++#include <poppler-version.h> ++ + // Don't show this warning: it's an issue in poppler + #ifdef __GNUC__ + #pragma GCC diagnostic ignored "-Wunused-parameter" +@@ -49,6 +51,8 @@ + #include <PDFDoc.h> + #include <GlobalParams.h> + ++#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO)) ++ + K_PLUGIN_FACTORY_WITH_JSON(Pdf2OdgImportFactory, "calligra_filter_pdf2odg.json", + registerPlugin<Pdf2OdgImport>();) + +@@ -86,8 +90,13 @@ KoFilter::ConversionStatus Pdf2OdgImport::convert(const QByteArray& from, const + if (! globalParams) + return KoFilter::NotImplemented; + ++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0) + GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); + PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); ++#else ++ std::unique_ptr<GooString> fname = std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data()); ++ PDFDoc * pdfDoc = new PDFDoc(std::move(fname)); ++#endif + if (! pdfDoc) { + #ifdef HAVE_POPPLER_PRE_0_83 + delete globalParams; diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp -index 931917a..7901317 100644 +index b980fdf60f6..76b909e3b69 100644 --- a/filters/karbon/pdf/SvgOutputDev.cpp +++ b/filters/karbon/pdf/SvgOutputDev.cpp -@@ -212,7 +212,7 @@ QString SvgOutputDev::convertMatrix(const QMatrix &matrix) - .arg(matrix.dx()) .arg(matrix.dy()); - } +@@ -35,6 +35,10 @@ + #include <QPen> + #include <QImage> --QString SvgOutputDev::convertMatrix(double * matrix) -+QString SvgOutputDev::convertMatrix(const double * matrix) ++#include <poppler-version.h> ++ ++#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO)) ++ + class SvgOutputDev::Private { - return QString("matrix(%1 %2 %3 %4 %5 %6)") - .arg(matrix[0]).arg(matrix[1]) -@@ -402,7 +402,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s) + public: +@@ -410,7 +414,12 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) + if (s->getLength() == 0) + return; + ++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0) + GfxFont * font = state->getFont(); ++#else ++ std::shared_ptr<GfxFont> font = state->getFont(); ++#endif ++ QString str; -- char * p = s->getCString(); -+ const char * p = s->getCString(); - int len = s->getLength(); - CharCode code; - Unicode *u = nullptr; -@@ -429,7 +429,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s) - double x = state->getCurX(); - double y = state->getCurY(); - -- double * ctm = state->getCTM(); -+ const double * ctm = state->getCTM(); - QMatrix transform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); - - QMatrix mirror; -@@ -522,7 +522,7 @@ void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, +-- +2.35.1 + +From 2dd2c02094ab9dfd964b2363039527d414db3b28 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid <aacid@kde.org> +Date: Wed, 13 Apr 2022 21:30:14 +0200 +Subject: [PATCH 3/3] SvgOutputDev: Fix ifdef version for getFont API change + +--- + filters/karbon/pdf/SvgOutputDev.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp +index 76b909e3b69..588cda8ecbe 100644 +--- a/filters/karbon/pdf/SvgOutputDev.cpp ++++ b/filters/karbon/pdf/SvgOutputDev.cpp +@@ -414,7 +414,7 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) + if (s->getLength() == 0) return; - } - -- double * ctm = state->getCTM(); -+ const double * ctm = state->getCTM(); - QMatrix m; - m.setMatrix(ctm[0] / width, ctm[1] / width, -ctm[2] / height, -ctm[3] / height, ctm[2] + ctm[4], ctm[3] + ctm[5]); - -diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h -index 85fe55d..2a44908 100644 ---- a/filters/karbon/pdf/SvgOutputDev.h -+++ b/filters/karbon/pdf/SvgOutputDev.h -@@ -84,7 +84,7 @@ public: - private: - QString convertPath(GfxPath *path); - QString convertMatrix(const QMatrix &matrix); -- QString convertMatrix(double * matrix); -+ QString convertMatrix(const double * matrix); - QString printFill(); - QString printStroke(); +-#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0) ++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 04, 0) + GfxFont * font = state->getFont(); + #else + std::shared_ptr<GfxFont> font = state->getFont(); -- -cgit v0.11.2 +2.35.1 diff --git a/user/calligra/poppler2.patch b/user/calligra/poppler2.patch deleted file mode 100644 index 6f18c070f..000000000 --- a/user/calligra/poppler2.patch +++ /dev/null @@ -1,114 +0,0 @@ -From fa4c2961b8280456d4c1484565b973d312e0bd1c Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid <aacid@kde.org> -Date: Thu, 25 Oct 2018 23:04:39 +0200 -Subject: Mark the functions as override - -So when poppler API breaks (as it often does) it stops compiling and -someone has to fix it ---- - filters/karbon/pdf/SvgOutputDev.cpp | 13 +++-------- - filters/karbon/pdf/SvgOutputDev.h | 43 +++++++++++++++++-------------------- - 2 files changed, 23 insertions(+), 33 deletions(-) - -diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp -index 5692824..1d07f16 100644 ---- a/filters/karbon/pdf/SvgOutputDev.cpp -+++ b/filters/karbon/pdf/SvgOutputDev.cpp -@@ -387,7 +387,7 @@ QString SvgOutputDev::printStroke() - return stroke; - } - --void SvgOutputDev::drawString(GfxState * state, GooString * s) -+void SvgOutputDev::drawString(GfxState * state, const GooString * s) - { - int render = state->getRender(); - // check for invisible text -- this is used by Acrobat Capture -@@ -478,9 +478,9 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s) - *d->body << "</text>" << endl; - } - --void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, -+void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, -- int *maskColors, GBool /*inlineImg*/) -+ GBool /*interpolate*/, int *maskColors, GBool inlineImg) - { - ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); - imgStr->reset(); -@@ -547,10 +547,3 @@ void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, - delete imgStr; - } - --void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, -- int width, int height, GfxImageColorMap *colorMap, -- GBool /*interpolate*/, int *maskColors, GBool inlineImg) --{ -- drawImage(state, ref, str, width, height, colorMap, maskColors, inlineImg); --} -- -diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h -index 2a44908..422027c 100644 ---- a/filters/karbon/pdf/SvgOutputDev.h -+++ b/filters/karbon/pdf/SvgOutputDev.h -@@ -46,38 +46,35 @@ public: - - GBool isOk(); - -- virtual GBool upsideDown(); -- virtual GBool useDrawChar(); -- virtual GBool interpretType3Chars(); -- virtual void startPage(int pageNum, GfxState *state, XRef *xref); -- virtual void endPage(); -+ GBool upsideDown() override; -+ GBool useDrawChar() override; -+ GBool interpretType3Chars() override; -+ void startPage(int pageNum, GfxState *state, XRef *xref) override; -+ void endPage() override; - - // path painting -- virtual void stroke(GfxState * state); -- virtual void fill(GfxState * state); -- virtual void eoFill(GfxState *state); -+ void stroke(GfxState * state) override; -+ void fill(GfxState * state) override; -+ void eoFill(GfxState *state) override; - - // text -- virtual void drawString(GfxState * state, GooString * s); -+ void drawString(GfxState * state, const GooString * s) override; - - // images -- virtual void drawImage(GfxState *state, Object *ref, Stream *str, -+ void drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, -- int *maskColors, GBool inlineImg); -- virtual void drawImage(GfxState *state, Object *ref, Stream *str, -- int width, int height, GfxImageColorMap *colorMap, -- GBool interpolate, int *maskColors, GBool inlineImg); -+ GBool interpolate, int *maskColors, GBool inlineImg) override; - - // styles -- virtual void updateAll(GfxState *state); -- virtual void updateFillColor(GfxState *state); -- virtual void updateStrokeColor(GfxState *state); -- virtual void updateFillOpacity(GfxState *state); -- virtual void updateStrokeOpacity(GfxState *state); -- virtual void updateLineJoin(GfxState *state); -- virtual void updateLineCap(GfxState *state); -- virtual void updateMiterLimit(GfxState *state); -- virtual void updateLineWidth(GfxState *state); -+ void updateAll(GfxState *state) override; -+ void updateFillColor(GfxState *state) override; -+ void updateStrokeColor(GfxState *state) override; -+ void updateFillOpacity(GfxState *state) override; -+ void updateStrokeOpacity(GfxState *state) override; -+ void updateLineJoin(GfxState *state) override; -+ void updateLineCap(GfxState *state) override; -+ void updateMiterLimit(GfxState *state) override; -+ void updateLineWidth(GfxState *state) override; - - /// Dumps content to svg file - void dumpContent(); --- -cgit v1.1 - diff --git a/user/calligra/poppler3.patch b/user/calligra/poppler3.patch deleted file mode 100644 index 54702b515..000000000 --- a/user/calligra/poppler3.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 82d68cebf870ac97fd27b626a08c3fb4dd94ea3e Mon Sep 17 00:00:00 2001 -From: Albert Astals Cid <aacid@kde.org> -Date: Thu, 25 Oct 2018 23:06:34 +0200 -Subject: GBool -> bool - -It was just a typedef in poppler and it'll die in next versions ---- - filters/karbon/pdf/SvgOutputDev.cpp | 12 ++++++------ - filters/karbon/pdf/SvgOutputDev.h | 10 +++++----- - 2 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp -index 1d07f16..870a940 100644 ---- a/filters/karbon/pdf/SvgOutputDev.cpp -+++ b/filters/karbon/pdf/SvgOutputDev.cpp -@@ -52,7 +52,7 @@ public: - QString defsData; - QTextStream * defs; - QTextStream * body; -- GBool state; -+ bool state; - QSizeF pageSize; - QPen pen; - QBrush brush; -@@ -75,22 +75,22 @@ SvgOutputDev::~SvgOutputDev() - delete d; - } - --GBool SvgOutputDev::isOk() -+bool SvgOutputDev::isOk() - { - return d->state; - } - --GBool SvgOutputDev::upsideDown() -+bool SvgOutputDev::upsideDown() - { - return gTrue; - } - --GBool SvgOutputDev::useDrawChar() -+bool SvgOutputDev::useDrawChar() - { - return gFalse; - } - --GBool SvgOutputDev::interpretType3Chars() -+bool SvgOutputDev::interpretType3Chars() - { - return gFalse; - } -@@ -480,7 +480,7 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) - - void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, -- GBool /*interpolate*/, int *maskColors, GBool inlineImg) -+ bool /*interpolate*/, int *maskColors, bool inlineImg) - { - ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); - imgStr->reset(); -diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h -index 422027c..df2805c 100644 ---- a/filters/karbon/pdf/SvgOutputDev.h -+++ b/filters/karbon/pdf/SvgOutputDev.h -@@ -44,11 +44,11 @@ public: - explicit SvgOutputDev(const QString &fileName); - virtual ~SvgOutputDev(); - -- GBool isOk(); -+ bool isOk(); - -- GBool upsideDown() override; -- GBool useDrawChar() override; -- GBool interpretType3Chars() override; -+ bool upsideDown() override; -+ bool useDrawChar() override; -+ bool interpretType3Chars() override; - void startPage(int pageNum, GfxState *state, XRef *xref) override; - void endPage() override; - -@@ -63,7 +63,7 @@ public: - // images - void drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, -- GBool interpolate, int *maskColors, GBool inlineImg) override; -+ bool interpolate, int *maskColors, bool inlineImg) override; - - // styles - void updateAll(GfxState *state) override; --- -cgit v1.1 - diff --git a/user/calligra/poppler4.patch b/user/calligra/poppler4.patch deleted file mode 100644 index 9a13bcdec..000000000 --- a/user/calligra/poppler4.patch +++ /dev/null @@ -1,76 +0,0 @@ -From f099b8e143bbeb1de3c7e89f4764006c3de61ae4 Mon Sep 17 00:00:00 2001 -From: Antonio Rojas <arojas@archlinux.org> -Date: Fri, 2 Nov 2018 21:23:13 +0100 -Subject: Fix build with poppler 0.71 - -Port away from removed API - -Differential Revision: https://phabricator.kde.org/D16607 ---- - filters/karbon/pdf/PdfImport.cpp | 6 +++--- - filters/karbon/pdf/SvgOutputDev.cpp | 10 +++++----- - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp -index 48b08df..e910dae 100644 ---- a/filters/karbon/pdf/PdfImport.cpp -+++ b/filters/karbon/pdf/PdfImport.cpp -@@ -88,9 +88,9 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt - SvgOutputDev * dev = new SvgOutputDev(m_chain->outputFile()); - if (dev->isOk()) { - int rotate = 0; -- GBool useMediaBox = gTrue; -- GBool crop = gFalse; -- GBool printing = gFalse; -+ bool useMediaBox = true; -+ bool crop = false; -+ bool printing = false; - pdfDoc->displayPages(dev, firstPage, lastPage, hDPI, vDPI, rotate, useMediaBox, crop, printing); - dev->dumpContent(); - } -diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp -index 9063e69..80f01a5 100644 ---- a/filters/karbon/pdf/SvgOutputDev.cpp -+++ b/filters/karbon/pdf/SvgOutputDev.cpp -@@ -39,7 +39,7 @@ class SvgOutputDev::Private - { - public: - Private(const QString &fname) -- : svgFile(fname), defs(0), body(0), state(gTrue) -+ : svgFile(fname), defs(0), body(0), state(true) - , brush(Qt::SolidPattern) {} - - ~Private() { -@@ -62,7 +62,7 @@ SvgOutputDev::SvgOutputDev(const QString &fileName) - : d(new Private(fileName)) - { - if (! d->svgFile.open(QIODevice::WriteOnly)) { -- d->state = gFalse; -+ d->state = false; - return; - } - -@@ -82,17 +82,17 @@ bool SvgOutputDev::isOk() - - bool SvgOutputDev::upsideDown() - { -- return gTrue; -+ return true; - } - - bool SvgOutputDev::useDrawChar() - { -- return gFalse; -+ return false; - } - - bool SvgOutputDev::interpretType3Chars() - { -- return gFalse; -+ return false; - } - - void SvgOutputDev::startPage(int pageNum, GfxState *state, XRef */*xref*/) --- -cgit v1.1 - diff --git a/user/calligra/ridiculous-typo.patch b/user/calligra/ridiculous-typo.patch new file mode 100644 index 000000000..9d81e899e --- /dev/null +++ b/user/calligra/ridiculous-typo.patch @@ -0,0 +1,11 @@ +--- calligra-3.2.1/braindump/src/layouts/ColumnLayout.cpp.old 2020-05-14 06:51:30.000000000 +0000 ++++ calligra-3.2.1/braindump/src/layouts/ColumnLayout.cpp 2020-07-30 00:37:08.634435315 +0000 +@@ -94,7 +94,7 @@ + qDebug() << _shape << _shape->absolutePosition(KoFlake::TopLeftCorner).y() << " " << _shape->position().y(); + } + qDebug() << "</moh>"; +- std:sort(m_shapes.begin(), m_shapes.end(), shapeIsLessThan); ++ std::sort(m_shapes.begin(), m_shapes.end(), shapeIsLessThan); + // Update position + qreal y = 0; + qDebug() << "<Updating>"; |