diff --git a/app-office/calligra/calligra-3.2.1.recipe b/app-office/calligra/calligra-3.2.1.recipe index 914f36751..1ea452f1a 100644 --- a/app-office/calligra/calligra-3.2.1.recipe +++ b/app-office/calligra/calligra-3.2.1.recipe @@ -6,7 +6,7 @@ HOMEPAGE="https://www.calligra.org/" COPYRIGHT="2010-2020 KDE Organisation" LICENSE="GNU LGPL v2 GNU GPL v2" -REVISION="5" +REVISION="6" SOURCE_URI="https://download.kde.org/stable/calligra/$portVersion/calligra-$portVersion.tar.xz" CHECKSUM_SHA256="b1f8a6eb8208543a2f908caa83d089075fcd1e530d00e19f5362b2f9cc371147" SOURCE_FILENAME="calligra-$portVersion.tar.xz" @@ -151,7 +151,7 @@ REQUIRES_okular_plugins=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel - extra_cmake_modules$secondaryArchSuffix >= 5.77 + extra_cmake_modules$secondaryArchSuffix >= 5.93 devel:eigen$secondaryArchSuffix devel:libboost_system$secondaryArchSuffix >= 1.70.0 devel:libetonyek_0.1$secondaryArchSuffix @@ -216,10 +216,10 @@ BUILD_REQUIRES=" devel:libOpenEXR_3_0$secondaryArchSuffix devel:libOpenEXRUtil_3_0$secondaryArchSuffix devel:libphonon4qt5$secondaryArchSuffix - devel:libpoppler$secondaryArchSuffix >= 104 - devel:libpoppler_qt5$secondaryArchSuffix >= 1.26 + devel:libpoppler$secondaryArchSuffix >= 117 + devel:libpoppler_qt5$secondaryArchSuffix >= 1.30 devel:libqca$secondaryArchSuffix >= 2 - devel:libQt5Core$secondaryArchSuffix >= 5.15 + devel:libQt5Core$secondaryArchSuffix devel:libQt5WebKitWidgets$secondaryArchSuffix devel:librevenge_0.0$secondaryArchSuffix devel:libvisio_0.1$secondaryArchSuffix @@ -235,7 +235,7 @@ BUILD_PREREQUIRES=" cmd:make cmd:perl cmd:pkg_config$secondaryArchSuffix - cmd:python + cmd:python2 " PATCH() @@ -249,6 +249,7 @@ BUILD() cd build cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$appsDir/Calligra \ -DCMAKE_INSTALL_BINDIR=$appsDir/Calligra \ -DCMAKE_INSTALL_LIBDIR=$libDir \ diff --git a/app-office/calligra/patches/calligra-3.2.1.patchset b/app-office/calligra/patches/calligra-3.2.1.patchset index 8ffca0b1a..b3bd0ab64 100644 --- a/app-office/calligra/patches/calligra-3.2.1.patchset +++ b/app-office/calligra/patches/calligra-3.2.1.patchset @@ -1,4 +1,4 @@ -From 7317abc82caa3aceab44b75a93173c71e7f94359 Mon Sep 17 00:00:00 2001 +From d52c8603b3f71e66f268b6af62376ba10604968c Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Mon, 4 May 2020 15:43:23 +1000 Subject: Fix build for Haiku @@ -171,10 +171,10 @@ index 3007f91..9a42e4f 100644 #include #include -- -2.28.0 +2.30.2 -From 2a3dcdabc66733e3b1e0d46120fe6b6f00f0cc0c Mon Sep 17 00:00:00 2001 +From 5c51fdba74e5847fd225579571f5a82f7b4128ea Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Tue, 29 Dec 2020 22:44:06 +1000 Subject: Disable doctools for Haiku @@ -193,5 +193,804 @@ index 10d3b43..23b6370 100644 kdoctools_install(po) endif() -- -2.28.0 +2.30.2 + + +From cfe3c1090d623067df53ba766e2455725cb4d862 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Wed, 11 May 2022 14:37:02 +1000 +Subject: Disable X11 + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 23b6370..639e134 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -327,7 +327,7 @@ if (GHNS) + endif () + + find_package(X11) +-if(X11_FOUND) ++if(X11_FOUND AND NOT HAIKU) + find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED + COMPONENTS + X11Extras +-- +2.30.2 + + +From d4ffe633e4e0cb88b88dd18e3fd2464bdaf49d76 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Wed, 11 May 2022 14:40:58 +1000 +Subject: Avoid automagic CXXFLAG detection courtesy of dev-libs/vc. + Gentoo-bug: 584118 + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 639e134..a0fc59c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -601,10 +601,6 @@ if (BUILD_VC) + endif() + endmacro() + +- if (NOT PACKAGERS_BUILD) +- # Optimize the whole Calligra for current architecture +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Vc_DEFINITIONS}") +- endif () + endif() + set(CMAKE_MODULE_PATH ${OLD_CMAKE_MODULE_PATH} ) + +-- +2.30.2 + + +From 96888343f28132ad0b6355e138ce1f45b919a3ca Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=96mer=20Fad=C4=B1l=20Usta?= +Date: Tue, 8 Jun 2021 05:13:23 +0000 +Subject: 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 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a0fc59c..0f072d6 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 +@@ -643,8 +639,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 16d7e06..429afe7 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() + + +-- +2.30.2 + + +From ac81b55819225f2ec3814d345c750fb8a56102b2 Mon Sep 17 00:00:00 2001 +From: Pierre Ducroquet +Date: Sun, 28 Feb 2021 23:23:02 +0100 +Subject: Fix some more warnings + + +diff --git a/filters/libmsooxml/MsooXmlDiagramReader_p.cpp b/filters/libmsooxml/MsooXmlDiagramReader_p.cpp +index 14b0853..14fc6ab 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 89fb716..1008d18 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 ab59222..7fa5633 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 6274746..0132d39 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 cacf4f8..c5ff433 100644 +--- a/filters/sheets/gnumeric/gnumericexport.cc ++++ b/filters/sheets/gnumeric/gnumericexport.cc +@@ -1294,15 +1294,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()) { +@@ -1343,6 +1341,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 2d116e0..bf41a6f 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 8d0698a..4f8caf2 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 8d8b670..e58827d 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 e67151c..e9c7203 100644 +--- a/filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp ++++ b/filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp +@@ -874,7 +874,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 6a1f323..ebff9fd 100644 +--- a/filters/stage/pptx/PptxXmlDocumentReader.cpp ++++ b/filters/stage/pptx/PptxXmlDocumentReader.cpp +@@ -318,7 +318,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 e167d86..89ef678 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::SharedPtrm_type = UNSUPPORTED; +diff --git a/filters/words/msword-odf/wv2/src/parser9x.cpp b/filters/words/msword-odf/wv2/src/parser9x.cpp +index 9a6d160..e5d7d14 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, SharedPtrtell(); // 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 ba02def..41c8278 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 201bf36..1be5561 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 92c6dfd..068501c 100644 +--- a/libs/pageapp/KoPAOdfPageSaveHelper.cpp ++++ b/libs/pageapp/KoPAOdfPageSaveHelper.cpp +@@ -49,7 +49,7 @@ KoPAOdfPageSaveHelper::KoPAOdfPageSaveHelper( KoPADocument * doc, QList( 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 b9056ac..ecd696e 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 73751ec..76ee8e2 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 62c4de8..67d5917 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 6fd05fd..5b872d5 100644 +--- a/plugins/vectorshape/VectorShape.cpp ++++ b/plugins/vectorshape/VectorShape.cpp +@@ -295,6 +295,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 9f59fe2..6157b09 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 5d25c85..3caed36 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 679bfe1..9412d8f 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 b3f1e35..6354d79 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); + +-- +2.30.2 + + +From 2b8b952afad3aa38e53eacaeaf851d0812496cb6 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Fri, 7 Jan 2022 14:00:05 +0100 +Subject: Fix build with >=app-text/poppler-22.01.0 + +Signed-off-by: Andreas Sturmlechner + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0f072d6..1a1502d 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.30.2 + + +From 7753275bb6bd0c24c42220e09a837685cfc5b497 Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Sat, 24 Apr 2021 11:19:52 +0200 +Subject: Support building with OpenEXR 3 + +Try to find OpenEXR 3 first using the upstream cmake config, and fall back to using our FindOpenEXR + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1a1502d..f9a8576 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -388,8 +388,13 @@ endif () + ## Check for OpenEXR + ## + +-macro_optional_find_package(OpenEXR) +-macro_bool_to_01(OPENEXR_FOUND HAVE_OPENEXR) ++macro_optional_find_package(OpenEXR 3.0 CONFIG QUIET) ++if(TARGET OpenEXR::OpenEXR) ++ set(OPENEXR_LIBRARIES OpenEXR::OpenEXR) ++else() ++ macro_optional_find_package(OpenEXR) ++endif() ++macro_bool_to_01(OpenEXR_FOUND HAVE_OPENEXR) + + ## + ## Test for GNU Scientific Library +diff --git a/libs/pigment/CMakeLists.txt b/libs/pigment/CMakeLists.txt +index a039251..6eb6a8e 100644 +--- a/libs/pigment/CMakeLists.txt ++++ b/libs/pigment/CMakeLists.txt +@@ -12,7 +12,7 @@ include_directories( ${PIGMENT_INCLUDES} ${Boost_INCLUDE_DIR}) + + set(FILE_OPENEXR_SOURCES) + set(LINK_OPENEXR_LIB) +-if(OPENEXR_FOUND) ++if(OpenEXR_FOUND) + include_directories(${OPENEXR_INCLUDE_DIR}) + set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES}) + add_definitions(${OPENEXR_DEFINITIONS}) +diff --git a/plugins/colorengines/lcms2/CMakeLists.txt b/plugins/colorengines/lcms2/CMakeLists.txt +index 77807ff..920adbe 100644 +--- a/plugins/colorengines/lcms2/CMakeLists.txt ++++ b/plugins/colorengines/lcms2/CMakeLists.txt +@@ -31,7 +31,7 @@ include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/colorprofiles + ) + +-if (HAVE_LCMS24 AND OPENEXR_FOUND) ++if (HAVE_LCMS24 AND OpenEXR_FOUND) + include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/colorspaces/gray_f16 + ${CMAKE_CURRENT_SOURCE_DIR}/colorspaces/rgb_f16 +@@ -41,7 +41,7 @@ endif () + + set(FILE_OPENEXR_SOURCES) + set(LINK_OPENEXR_LIB) +-if(OPENEXR_FOUND) ++if(OpenEXR_FOUND) + include_directories(${OPENEXR_INCLUDE_DIR}) + set(LINK_OPENEXR_LIB ${OPENEXR_LIBRARIES}) + add_definitions(${OPENEXR_DEFINITIONS}) +@@ -80,7 +80,7 @@ set ( lcmsengine_SRCS + LcmsEnginePlugin.cpp + ) + +-if (HAVE_LCMS24 AND OPENEXR_FOUND) ++if (HAVE_LCMS24 AND OpenEXR_FOUND) + set ( lcmsengine_SRCS + ${lcmsengine_SRCS} + colorspaces/gray_f16/GrayF16ColorSpace.cpp +diff --git a/plugins/colorengines/lcms2/tests/CMakeLists.txt b/plugins/colorengines/lcms2/tests/CMakeLists.txt +index a46619d..633fbf5 100644 +--- a/plugins/colorengines/lcms2/tests/CMakeLists.txt ++++ b/plugins/colorengines/lcms2/tests/CMakeLists.txt +@@ -12,7 +12,7 @@ include_directories( ../colorspaces/cmyk_u16 + ../colorprofiles + .. + ) +-if(OPENEXR_FOUND) ++if(OpenEXR_FOUND) + include_directories(${OPENEXR_INCLUDE_DIR}) + endif() + include_directories( ${PIGMENT_INCLUDES} ${LCMS2_INCLUDE_DIR} ) +-- +2.30.2 + + +From 89223df142e3ed07fdb6acbd373131447c372ff0 Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Tue, 3 Aug 2021 10:41:09 +0200 +Subject: Only link to Imath when OpenEXR version is >= 3.0 + +Since OpenEXR 3.0, Imath is in a separate, independently released library. Since that's the only library that Calligra needs, there's no need to link to the full OpenEXR + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f9a8576..a0df920 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -388,9 +388,9 @@ endif () + ## Check for OpenEXR + ## + +-macro_optional_find_package(OpenEXR 3.0 CONFIG QUIET) +-if(TARGET OpenEXR::OpenEXR) +- set(OPENEXR_LIBRARIES OpenEXR::OpenEXR) ++macro_optional_find_package(Imath 3.0 CONFIG QUIET) ++if(TARGET Imath::Imath) ++ set(OPENEXR_LIBRARIES Imath::Imath) + else() + macro_optional_find_package(OpenEXR) + endif() +-- +2.30.2 + + +From bc3e209c0594674acfe267e11e481df211ce7c2c Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Mon, 20 Dec 2021 18:46:33 +0100 +Subject: Fixup Imath 3.0 support + +OpenEXR_FOUND needs to be set to true in order to compile it. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a0df920..071ea58 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -391,6 +391,7 @@ endif () + macro_optional_find_package(Imath 3.0 CONFIG QUIET) + if(TARGET Imath::Imath) + set(OPENEXR_LIBRARIES Imath::Imath) ++ set(OpenEXR_FOUND TRUE) + else() + macro_optional_find_package(OpenEXR) + endif() +-- +2.30.2 + + +From e4c60f60538536ef101104ce1ec93e919a1993ca Mon Sep 17 00:00:00 2001 +From: foutrelis +Date: Wed, 2 Mar 2022 10:28:24 +0000 +Subject: Fix build with poppler 22.03.0 + + +diff --git a/filters/karbon/pdf/CMakeLists.txt b/filters/karbon/pdf/CMakeLists.txt +index 94d4071..428d173 100644 +--- a/filters/karbon/pdf/CMakeLists.txt ++++ b/filters/karbon/pdf/CMakeLists.txt +@@ -14,6 +14,10 @@ if(Poppler_VERSION VERSION_LESS "0.83.0") + add_definitions("-DHAVE_POPPLER_PRE_0_83") + endif() + ++if(Poppler_VERSION VERSION_LESS "22.3.0") ++ add_definitions("-DHAVE_POPPLER_PRE_22_3") ++endif() ++ + set(pdf2svg_PART_SRCS PdfImportDebug.cpp PdfImport.cpp SvgOutputDev.cpp ) + + add_library(calligra_filter_pdf2svg MODULE ${pdf2svg_PART_SRCS}) +diff --git a/filters/karbon/pdf/Pdf2OdgImport.cpp b/filters/karbon/pdf/Pdf2OdgImport.cpp +index 745239c..f52b47a 100644 +--- a/filters/karbon/pdf/Pdf2OdgImport.cpp ++++ b/filters/karbon/pdf/Pdf2OdgImport.cpp +@@ -86,8 +86,12 @@ KoFilter::ConversionStatus Pdf2OdgImport::convert(const QByteArray& from, const + if (! globalParams) + return KoFilter::NotImplemented; + ++#ifdef HAVE_POPPLER_PRE_22_3 + GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); + PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); ++#else ++ PDFDoc * pdfDoc = new PDFDoc(std::make_unique(QFile::encodeName(m_chain->inputFile()).data())); ++#endif + if (! pdfDoc) { + #ifdef HAVE_POPPLER_PRE_0_83 + delete globalParams; +diff --git a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp +index 286f5fa..5a5c7e0 100644 +--- a/filters/karbon/pdf/PdfImport.cpp ++++ b/filters/karbon/pdf/PdfImport.cpp +@@ -73,8 +73,12 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt + if (! globalParams) + return KoFilter::NotImplemented; + ++#ifdef HAVE_POPPLER_PRE_22_3 + GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); + PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); ++#else ++ PDFDoc * pdfDoc = new PDFDoc(std::make_unique(QFile::encodeName(m_chain->inputFile()).data())); ++#endif + if (! pdfDoc) { + #ifdef HAVE_POPPLER_PRE_0_83 + delete globalParams; +-- +2.30.2 + + +From 36d15b7e975e0f4c86c3d772a2bb26e42d961b3b Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Wed, 11 May 2022 14:59:48 +1000 +Subject: Disable X11 for kowidgets + + +diff --git a/libs/widgets/CMakeLists.txt b/libs/widgets/CMakeLists.txt +index dad5d91..9029917 100644 +--- a/libs/widgets/CMakeLists.txt ++++ b/libs/widgets/CMakeLists.txt +@@ -133,7 +133,7 @@ if(GHNS) + target_link_libraries(kowidgets PRIVATE KF5::NewStuff) + endif () + +-if(X11_FOUND) ++if(X11_FOUND AND NOT HAIKU) + target_link_libraries(kowidgets PRIVATE Qt5::X11Extras ${X11_LIBRARIES}) + endif() + +-- +2.30.2