35 Commits
rocko ... sumo

Author SHA1 Message Date
Andreas Müller
7652f30ee9 libreoffice: Use system lpsolve
This fixes;
| libreoffice-5.0.6.3-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary: '/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-mortsgna-linux-gnueabi/libreoffice/5.0.6.3-r0/packages-split/libreoffice/usr/lib/libreoffice/program/liblpsolve55.so' [ldflags]

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-10-31 23:43:05 +01:00
Andreas Müller
1ae0cc7b4c lpsolve: initial add 5.5.2.5
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-10-31 23:25:04 +01:00
Andreas Müller
fa7d3cf224 libreoffice: Do not bundle mysql connectors - use available ones
This also fixes package QA:
| ERROR: libreoffice-5.0.6.3-r0 do_package: QA Issue: File '/usr/lib/libreoffice/share/extensions/mysql-connector-ooo/libmysqlclient_r.so' from libreoffice was already stripped, this will prevent future debugging! [already-stripped]

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-10-31 12:23:29 +01:00
Andreas Müller
7d6dd97b4c libreoffice: Fix language pack warning
| WARNING: libreoffice-5.0.6.3-r0 do_package: libreoffice language file pattern not found:  /usr/lib/libreoffice/share/template/%{1}

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-10-30 08:11:42 +01:00
Andreas Müller
152b3fedde libcmis: Was a good boy - fix upstream status
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-10-26 23:16:41 +02:00
Andreas Müller
3544bcd7c0 libcmis: Fix build with boost >= 1.68.0
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-10-26 23:01:20 +02:00
Andreas Müller
1e2f65aa5c libreoffice: Fix build with poppler 0.70.x
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-10-25 22:55:26 +02:00
Andreas Müller
7ee6b2b4b9 LAYERSERIES_COMPAT: add thud
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-10-03 23:25:56 +02:00
Andreas Müller
1531df0d49 libreoffice: fix build with gcc8
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-07-04 10:09:35 +02:00
Andreas Müller
ba31de8300 libpagemaker: Fix build with gcc8
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-07-02 19:03:28 +02:00
Andreas Müller
e9fc16ac9b libfreehand: Fix build with gcc 8
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-07-02 19:03:28 +02:00
Andreas Müller
4e0fddb8de libodfgen: upgrade 0.1.6 -> 0.1.7
Fixes build with gcc8

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-07-02 19:03:28 +02:00
Andreas Müller
e193c463a1 libwps: upgrade 0.4.8 -> 0.4.9
Fixes build with gcc8

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-07-02 19:03:28 +02:00
Andreas Müller
c4df0505dc libmwaw: upgrade 0.3.13 -> 0.3.14
Fixes build with gcc8

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-07-02 19:03:28 +02:00
Andreas Müller
86b04b47cf librevenge: fix build with gcc8
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-07-02 19:03:28 +02:00
Andreas Müller
db02a6066e librevenge: upgrade 0.0.2 -> 0.0.4
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-07-02 19:03:28 +02:00
Andreas Müller
a6c4d6f476 libreoffice: fix build with poppler 0.64
This fixes

commit 99310e2a62
Author: Andreas Müller <schnitzeltony@gmail.com>
Date:   Fri Jun 8 23:45:08 2018 +0200

    libreoffice: Fix build with recent icu/gcc

for all versions of poppler and the error was not caused by gcc.

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-06-28 21:05:56 +02:00
Andreas Müller
2820a09fd7 email address adaption
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-06-09 01:17:01 +02:00
Andreas Müller
99310e2a62 libreoffice: Fix build with recent icu/gcc
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-06-08 23:52:37 +02:00
Andreas Müller
4bd37fe0fc libreoffice-native: fix build with recent ICU
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-06-08 23:52:37 +02:00
Andreas Müller
6fe4ac377d layer.conf: add LAYERSERIES_COMPAT
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-04-06 23:41:16 +02:00
Andreas Müller
27d4b75ea4 libreoffice: refresh 0003-upgrade-to-ICU-58.patch
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-21 16:36:35 +01:00
Andreas Müller
30a9324aea libreoffice: fix build for upcoming poppler 0.62.0
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-18 18:03:50 +01:00
Andreas Müller
f06e832265 libgltf: remove glm workaround
Fix for glm (now in meta-oe) is under preparation.

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-16 16:22:09 +01:00
Andreas Müller
2172af9353 libwps: update 0.4.6 -> 0.4.8
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-15 15:47:50 +01:00
Andreas Müller
f228b7f566 libpagemaker: update 0.0.3 -> 0.0.4
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-15 15:47:50 +01:00
Andreas Müller
411df1dd4b libmspub: update 0.1.2 -> 0.1.4
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-15 15:47:50 +01:00
Andreas Müller
69af885ec9 libwpg: update 0.3.1 -> 0.3.2
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-15 15:47:50 +01:00
Andreas Müller
0ce06fb00d libwpd: update 0.10.1 -> 0.10.2
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-15 15:47:50 +01:00
Andreas Müller
303be653d4 libmwaw: update 0.3.11 -> 0.3.13
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-15 15:47:50 +01:00
Andreas Müller
ed31d9a656 libe-book: update 0.1.2 -> 0.1.3
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-15 15:47:50 +01:00
Andreas Müller
451ad6c3b0 liblangtag: update 0.6.0 -> 0.6.2 / enable gobject-introspection
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-15 15:47:50 +01:00
Andreas Müller
67c98b7dc9 libabw: update 0.1.1 -> 0.1.2
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-15 15:47:50 +01:00
Andreas Müller
c840e51bb5 glm: remove - a more recent version is in meta-oe
In case of failures, the patch in [1] is required.

[1] https://patchwork.openembedded.org/patch/149250/

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-15 15:47:50 +01:00
Andreas Müller
b36f1266d3 libgltf: fix build for glm >= 0.9.9
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2018-03-15 15:47:50 +01:00
39 changed files with 939 additions and 1817 deletions

2
README
View File

@@ -12,4 +12,4 @@ Send pull requests to openembedded-devel@lists.openembedded.org with '[meta-offi
When sending single patches, please using something like 'git send-email -1 --to openembedded-devel@lists.openembedded.org --subject-prefix=meta-office][PATCH'
Layer maintainer: Andreas Müller <schnitzeltony@googlemail.com>
Layer maintainer: Andreas Müller <schnitzeltony@gmail.com>

View File

@@ -6,3 +6,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "office-layer"
BBFILE_PATTERN_office-layer := "^${LAYERDIR}/"
BBFILE_PRIORITY_office-layer = "7"
LAYERSERIES_COMPAT_office-layer = "sumo thud"

View File

@@ -6,8 +6,8 @@ LIC_FILES_CHKSUM = " \
"
SRC_URI = "http://dev-www.libreoffice.org/src/${BPN}/${BPN}-${PV}.tar.xz"
SRC_URI[md5sum] = "6be55a46078b593ec20cad9bb8730c3e"
SRC_URI[sha256sum] = "cfc698c2dd4ab592138a941ae26e2e18c3dac69bc196b5167df7f5eb88fc217e"
SRC_URI[md5sum] = "201f477df7ea90d362c389c145c0f352"
SRC_URI[sha256sum] = "0b72944d5af81dda0a5c5803ee84cbac4b81441a4d767aa57029adc6744c2485"
inherit autotools pkgconfig

View File

@@ -1,58 +0,0 @@
From f443422e9f039b809bd4fcde21704b9d6503edfa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Sun, 31 Jul 2016 12:57:24 +0200
Subject: [PATCH] make nitpickickng gcc6 happy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upsatream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
src/lib/FB2Parser.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/lib/FB2Parser.cpp b/src/lib/FB2Parser.cpp
index 6442c70..1450087 100644
--- a/src/lib/FB2Parser.cpp
+++ b/src/lib/FB2Parser.cpp
@@ -103,7 +103,7 @@ private:
bool m_firstBody;
};
-class StylesheetContext : public FB2NodeContextBase
+/*class StylesheetContext : public FB2NodeContextBase
{
public:
explicit StylesheetContext(FB2ParserContext *parentContext);
@@ -112,7 +112,7 @@ private:
virtual FB2XMLParserContext *element(const FB2TokenData &name, const FB2TokenData &ns);
virtual void endOfElement();
virtual void attribute(const FB2TokenData &name, const FB2TokenData *ns, const char *value);
-};
+};*/
}
@@ -216,7 +216,7 @@ void FictionBookGathererContext::attribute(const FB2TokenData &, const FB2TokenD
{
}
-StylesheetContext::StylesheetContext(FB2ParserContext *const parentContext)
+/*StylesheetContext::StylesheetContext(FB2ParserContext *const parentContext)
: FB2NodeContextBase(parentContext)
{
}
@@ -253,7 +253,7 @@ void StylesheetContext::attribute(const FB2TokenData &name, const FB2TokenData *
break;
}
}
-}
+}*/
DocumentContext::DocumentContext(FB2ContentMap &notes, FB2ContentMap &bitmaps, librevenge::RVNGTextInterface *const document)
: FB2ParserContext(0)
--
2.5.5

View File

@@ -1,19 +0,0 @@
SUMMARY = "A library for import of reflowable e-book formats"
HOMEPAGE = "http://sourceforge.net/projects/libebook"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=815ca599c9df247a0c7f619bab123dad \
"
SRC_URI = " \
${SOURCEFORGE_MIRROR}/project/libebook/${BPN}-${PV}/${BPN}-${PV}.tar.xz \
file://0001-make-nitpickickng-gcc6-happy.patch \
"
SRC_URI[md5sum] = "19d84f4a97aab32d350d1f47ea3da0b3"
SRC_URI[sha256sum] = "7f894b1538b71c6cd96c976069c4dadb38b623612f0e35b2f6ee8a2c46bb88ec"
inherit autotools pkgconfig
DEPENDS = "icu libxml2 librevenge boost-native gperf-native"
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,16 @@
SUMMARY = "A library for import of reflowable e-book formats"
HOMEPAGE = "http://sourceforge.net/projects/libebook"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=815ca599c9df247a0c7f619bab123dad \
"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/libebook/${BPN}-${PV}/${BPN}-${PV}.tar.xz"
SRC_URI[md5sum] = "2956f1c5e7950b0018979a132165da8b"
SRC_URI[sha256sum] = "7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9"
inherit autotools pkgconfig
DEPENDS = "icu libxml2 librevenge liblangtag boost-native gperf-native"
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,32 @@
From af65e7374d6d5058e46b9173efdedfc661f451b7 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 1 Feb 2018 13:05:51 +0100
Subject: [PATCH] =?UTF-8?q?WaE:=20unnecessary=20parentheses=20in=20declara?=
=?UTF-8?q?tion=20of=20=E2=80=98padding=E2=80=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Backport
Change-Id: I6de141c5ec2520538f8232bd524d29e25710bef5
---
src/lib/FHCollector.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/FHCollector.cpp b/src/lib/FHCollector.cpp
index f39c8df..3f24118 100644
--- a/src/lib/FHCollector.cpp
+++ b/src/lib/FHCollector.cpp
@@ -1907,7 +1907,7 @@ void libfreehand::FHCollector::_outputDisplayText(const libfreehand::FHDisplayTe
textObjectProps.insert("svg:width", width);
for (int i=0; i<4; ++i) // osnola: let assume that there is no padding
{
- char const *(padding[])= {"fo:padding-left","fo:padding-right","fo:padding-top","fo:padding-bottom"};
+ char const *padding[] = {"fo:padding-left","fo:padding-right","fo:padding-top","fo:padding-bottom"};
textObjectProps.insert(padding[i],0,librevenge::RVNG_POINT);
}
if (!FH_ALMOST_ZERO(rotation))
--
2.14.4

View File

@@ -4,7 +4,10 @@ LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=815ca599c9df247a0c7f619bab123dad \
"
SRC_URI = "http://dev-www.libreoffice.org/src/${BPN}/${BPN}-${PV}.tar.xz"
SRC_URI = " \
http://dev-www.libreoffice.org/src/${BPN}/${BPN}-${PV}.tar.xz \
file://0001-WaE-unnecessary-parentheses-in-declaration-of-paddin.patch \
"
SRC_URI[md5sum] = "c3788f5686839fd097bd77d8f51c3d04"
SRC_URI[sha256sum] = "0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac"

View File

@@ -4,6 +4,8 @@ LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=9741c346eef56131163e13b9db1241b3 \
"
# Note there is a later version (0.1.0 currently) available but libreoffice
# asks for 0.0 explicitly
SRC_URI = "http://dev-www.libreoffice.org/src/${BPN}/${BPN}-${PV}.tar.bz2"
SRC_URI[md5sum] = "d63a9f47ab048f5009d90693d6aa6424"
SRC_URI[sha256sum] = "d1cc7297ed1921aa969e26413b4c4e18afc882ce4d2f5a2aa2a2905706f7206b"

View File

@@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = " \
file://COPYING.MPL;md5=815ca599c9df247a0c7f619bab123dad \
"
SRC_URI = "http://dev-www.libreoffice.org/src/${BPN}/${BPN}-${PV}.tar.xz"
SRC_URI[md5sum] = "050b8b29c2620fdbfb5d8561d4d08a11"
SRC_URI[sha256sum] = "b0baabf82d20c08ad000e80fa02154ce2f2ffde1ee60240d6e3a917c3b35560f"
SRC_URI[md5sum] = "ac6fa9c1c05ece27c58c05e11786fd3a"
SRC_URI[sha256sum] = "ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba"
inherit autotools pkgconfig

View File

@@ -1,682 +0,0 @@
From d64c828a70514147622fab3049ffad93449e7750 Mon Sep 17 00:00:00 2001
From: osnola <alonso@loria.fr>
Date: Sun, 2 Jul 2017 10:03:30 +0200
Subject: [PATCH 1/2] gcc7: try to correct some warnings...
---
autogen.sh | 2 +-
src/lib/BeagleWksDBParser.cxx | 1 +
src/lib/ClarisDrawText.cxx | 3 ++-
src/lib/ClarisWksText.cxx | 3 ++-
src/lib/HanMacWrdJParser.cxx | 4 ++--
src/lib/HanMacWrdKGraph.cxx | 1 +
src/lib/HanMacWrdKParser.cxx | 5 +++--
src/lib/MWAWCell.cxx | 2 ++
src/lib/MWAWChart.cxx | 1 +
src/lib/MWAWGraphicListener.cxx | 4 ++--
src/lib/MWAWGraphicShape.cxx | 2 +-
src/lib/MWAWPageSpan.cxx | 1 +
src/lib/MWAWPresentationListener.cxx | 4 ++--
src/lib/MWAWSpreadsheetListener.cxx | 8 ++++----
src/lib/MWAWTextListener.cxx | 10 +++++-----
src/lib/MacDraft5Parser.cxx | 2 +-
src/lib/MacDrawProParser.cxx | 4 ++--
src/lib/MacDrawProStyleManager.cxx | 4 ++--
src/lib/MarinerWrtGraph.cxx | 3 ++-
src/lib/MarinerWrtText.cxx | 2 +-
src/lib/MoreText.cxx | 1 +
src/lib/MsWksDBParser.cxx | 1 +
src/lib/MsWksGraph.cxx | 5 +++--
src/lib/MsWksSSParser.cxx | 1 +
src/lib/PowerPoint1Parser.cxx | 2 +-
src/lib/PowerPoint3Parser.cxx | 2 +-
src/lib/RagTime5Graph.cxx | 2 +-
src/lib/RagTime5Parser.cxx | 2 +-
src/lib/RagTimeSpreadsheet.cxx | 8 ++++----
src/lib/WriterPlsParser.cxx | 2 +-
src/lib/ZWrtText.cxx | 1 +
src/lib/libmwaw_internal.cxx | 7 +++++--
src/lib/libmwaw_internal.hxx | 15 +++++++++++++++
33 files changed, 74 insertions(+), 41 deletions(-)
diff --git a/autogen.sh b/autogen.sh
index aededbc..3182b42 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -21,7 +21,7 @@ for i in $TESTLIBTOOLIZE; do
done
if [ "$LIBTOOLIZEFOUND" = "0" ]; then
- echo "$0: need libtoolize tool to build lilbmwaw" >&2
+ echo "$0: need libtoolize tool to build libmwaw" >&2
exit 1
fi
diff --git a/src/lib/BeagleWksDBParser.cxx b/src/lib/BeagleWksDBParser.cxx
index 3e6ce53..efaf283 100644
--- a/src/lib/BeagleWksDBParser.cxx
+++ b/src/lib/BeagleWksDBParser.cxx
@@ -1009,6 +1009,7 @@ bool BeagleWksDBParser::readRow()
if (fSz>20) break;
val=static_cast<int>(input->readULong(2));
if (val) f << "g0=" << std::hex << val << std::dec << ",";
+ FALLTHROUGH;
case BeagleWksDBParserInternal::Cell::Memo: // memoId
case BeagleWksDBParserInternal::Cell::Picture: // pictId
case BeagleWksDBParserInternal::Cell::Number:
diff --git a/src/lib/ClarisDrawText.cxx b/src/lib/ClarisDrawText.cxx
index aef88d4..f032414 100644
--- a/src/lib/ClarisDrawText.cxx
+++ b/src/lib/ClarisDrawText.cxx
@@ -520,7 +520,7 @@ shared_ptr<ClarisWksStruct::DSET> ClarisDrawText::readDSETZone(ClarisWksStruct::
textZone->m_position = ClarisWksStruct::DSET::P_Main;
break;
}
- // fail through intended
+ FALLTHROUGH;
default:
MWAW_DEBUG_MSG(("ClarisDrawText::readDSETZone: find unknown position %d\n", (textZone->m_textType >> 4)));
f << "#position="<< (textZone->m_textType >> 4) << ",";
@@ -1358,6 +1358,7 @@ bool ClarisDrawText::sendText(ClarisDrawTextInternal::DSET const &zone, int subZ
}
MWAW_DEBUG_MSG(("ClarisDrawText::sendText: Find unexpected char 1\n"));
f << "###";
+ FALLTHROUGH;
case 0xb: // page break
MWAW_DEBUG_MSG(("ClarisDrawText::sendText: Find unexpected page break\n"));
f << "###pb";
diff --git a/src/lib/ClarisWksText.cxx b/src/lib/ClarisWksText.cxx
index 6b3eb0b..41bf87d 100644
--- a/src/lib/ClarisWksText.cxx
+++ b/src/lib/ClarisWksText.cxx
@@ -754,7 +754,7 @@ shared_ptr<ClarisWksStruct::DSET> ClarisWksText::readDSETZone(ClarisWksStruct::D
textZone->m_position = ClarisWksStruct::DSET::P_Main;
break;
}
- // fail through intended
+ FALLTHROUGH;
default:
MWAW_DEBUG_MSG(("ClarisWksText::readDSETZone: find unknown position %d\n", (textZone->m_textType >> 4)));
f << "#position="<< (textZone->m_textType >> 4) << ",";
@@ -1788,6 +1788,7 @@ bool ClarisWksText::sendText(ClarisWksTextInternal::Zone const &zone, MWAWListen
}
MWAW_DEBUG_MSG(("ClarisWksText::sendText: Find unexpected char 1\n"));
f << "###";
+ FALLTHROUGH;
case 0xb: // page break
numSectionInPage = 0;
if (main)
diff --git a/src/lib/HanMacWrdJParser.cxx b/src/lib/HanMacWrdJParser.cxx
index 166125f..2f7680d 100644
--- a/src/lib/HanMacWrdJParser.cxx
+++ b/src/lib/HanMacWrdJParser.cxx
@@ -650,8 +650,8 @@ bool HanMacWrdJParser::readPrintInfo(MWAWEntry const &entry)
MWAWVec2i paperSize = info.paper().size();
MWAWVec2i pageSize = info.page().size();
- bool useDocInfo = (dim[3]-dim[1]>margins[2]+margins[0]) &&
- (dim[2]-dim[0]>margins[2]+margins[0]);
+ bool useDocInfo = (float(dim[3]-dim[1])>margins[2]+margins[0]) &&
+ (float(dim[2]-dim[0])>margins[3]+margins[1]);
bool usePrintInfo = pageSize.x() > 0 && pageSize.y() > 0 &&
paperSize.x() > 0 && paperSize.y() > 0;
diff --git a/src/lib/HanMacWrdKGraph.cxx b/src/lib/HanMacWrdKGraph.cxx
index fa4b07d..fe4a3e2 100644
--- a/src/lib/HanMacWrdKGraph.cxx
+++ b/src/lib/HanMacWrdKGraph.cxx
@@ -1260,6 +1260,7 @@ bool HanMacWrdKGraph::sendFrame(HanMacWrdKGraphInternal::Frame const &frame, MWA
return true;
}
}
+ FALLTHROUGH;
case 10:
return sendTextBox(static_cast<HanMacWrdKGraphInternal::TextBox const &>(frame), pos);
case 6: {
diff --git a/src/lib/HanMacWrdKParser.cxx b/src/lib/HanMacWrdKParser.cxx
index 18239f1..ef9bd88 100644
--- a/src/lib/HanMacWrdKParser.cxx
+++ b/src/lib/HanMacWrdKParser.cxx
@@ -507,6 +507,7 @@ bool HanMacWrdKParser::readZone(shared_ptr<HanMacWrdKZone> zone)
case 0xc:
if (readZonec(zone))
return true;
+ FALLTHROUGH;
case 0xd:
if (m_graphParser->readPicture(zone))
return true;
@@ -586,8 +587,8 @@ bool HanMacWrdKParser::readPrintInfo(HanMacWrdKZone &zone)
MWAWVec2i paperSize = info.paper().size();
MWAWVec2i pageSize = info.page().size();
- bool useDocInfo = (dim[3]-dim[1]>margins[2]+margins[0]) &&
- (dim[2]-dim[0]>margins[2]+margins[0]);
+ bool useDocInfo = (float(dim[3]-dim[1])>margins[2]+margins[0]) &&
+ (float(dim[2]-dim[0])>margins[3]+margins[1]);
bool usePrintInfo = pageSize.x() > 0 && pageSize.y() > 0 &&
paperSize.x() > 0 && paperSize.y() > 0;
diff --git a/src/lib/MWAWCell.cxx b/src/lib/MWAWCell.cxx
index f1c5a3e..645ab18 100644
--- a/src/lib/MWAWCell.cxx
+++ b/src/lib/MWAWCell.cxx
@@ -641,6 +641,8 @@ bool MWAWCellContent::double2String(double val, MWAWCell::Format const &format,
time.tm_zone=0;
#endif
char buf[256];
+#pragma GCC diagnostic ignored "-Wformat-y2k"
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
if (mktime(&time)==-1 ||
!strftime(buf, 256, format.m_DTFormat.empty() ? "%m/%d/%y" : format.m_DTFormat.c_str(), &time))
return false;
diff --git a/src/lib/MWAWChart.cxx b/src/lib/MWAWChart.cxx
index 3ca98bd..c9b6e6d 100644
--- a/src/lib/MWAWChart.cxx
+++ b/src/lib/MWAWChart.cxx
@@ -624,6 +624,7 @@ std::ostream &operator<<(std::ostream &o, MWAWChart::TextZone const &zone)
switch (zone.m_type) {
case MWAWChart::TextZone::T_SubTitle:
o << "sub";
+ FALLTHROUGH;
case MWAWChart::TextZone::T_Title:
o << "title";
if (zone.m_contentType==MWAWChart::TextZone::C_Cell)
diff --git a/src/lib/MWAWGraphicListener.cxx b/src/lib/MWAWGraphicListener.cxx
index da8e8e1..6b723e8 100644
--- a/src/lib/MWAWGraphicListener.cxx
+++ b/src/lib/MWAWGraphicListener.cxx
@@ -1480,7 +1480,7 @@ void MWAWGraphicListener::_handleFrameParameters(librevenge::RVNGPropertyList &l
switch (pos.m_yPos) {
case MWAWPosition::YFull:
list.insert("svg:height", double(h), unit);
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::YTop:
if (origin[1] < 0 || origin[1] > 0) {
list.insert("style:vertical-pos", "from-top");
@@ -1522,7 +1522,7 @@ void MWAWGraphicListener::_handleFrameParameters(librevenge::RVNGPropertyList &l
switch (pos.m_xPos) {
case MWAWPosition::XFull:
list.insert("svg:width", double(w), unit);
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::XLeft:
if (origin[0] < 0 || origin[0] > 0) {
list.insert("style:horizontal-pos", "from-left");
diff --git a/src/lib/MWAWGraphicShape.cxx b/src/lib/MWAWGraphicShape.cxx
index 22b3c55..f1e7418 100644
--- a/src/lib/MWAWGraphicShape.cxx
+++ b/src/lib/MWAWGraphicShape.cxx
@@ -596,7 +596,7 @@ std::vector<MWAWGraphicShape::PathData> MWAWGraphicShape::getPath(bool forTransf
switch (m_type) {
case Measure:
MWAW_DEBUG_MSG(("MWAWGraphicShape::getPath: called on a measure, transform it in line\n"));
- // fall through expected
+ FALLTHROUGH;
case Line:
case Polygon: {
size_t n=m_vertices.size();
diff --git a/src/lib/MWAWPageSpan.cxx b/src/lib/MWAWPageSpan.cxx
index 79611cf..b1064c4 100644
--- a/src/lib/MWAWPageSpan.cxx
+++ b/src/lib/MWAWPageSpan.cxx
@@ -226,6 +226,7 @@ void MWAWPageSpan::setHeaderFooter(MWAWHeaderFooter const &hF)
switch (hF.m_occurrence) {
case MWAWHeaderFooter::NEVER:
removeHeaderFooter(type, MWAWHeaderFooter::ALL);
+ FALLTHROUGH;
case MWAWHeaderFooter::ALL:
removeHeaderFooter(type, MWAWHeaderFooter::ODD);
removeHeaderFooter(type, MWAWHeaderFooter::EVEN);
diff --git a/src/lib/MWAWPresentationListener.cxx b/src/lib/MWAWPresentationListener.cxx
index 705ca60..23542cd 100644
--- a/src/lib/MWAWPresentationListener.cxx
+++ b/src/lib/MWAWPresentationListener.cxx
@@ -1489,7 +1489,7 @@ void MWAWPresentationListener::_handleFrameParameters(librevenge::RVNGPropertyLi
switch (pos.m_yPos) {
case MWAWPosition::YFull:
list.insert("svg:height", double(h), unit);
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::YTop:
if (origin[1] < 0 || origin[1] > 0) {
list.insert("style:vertical-pos", "from-top");
@@ -1531,7 +1531,7 @@ void MWAWPresentationListener::_handleFrameParameters(librevenge::RVNGPropertyLi
switch (pos.m_xPos) {
case MWAWPosition::XFull:
list.insert("svg:width", double(w), unit);
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::XLeft:
if (origin[0] < 0 || origin[0] > 0) {
list.insert("style:horizontal-pos", "from-left");
diff --git a/src/lib/MWAWSpreadsheetListener.cxx b/src/lib/MWAWSpreadsheetListener.cxx
index c8c7592..f454fb8 100644
--- a/src/lib/MWAWSpreadsheetListener.cxx
+++ b/src/lib/MWAWSpreadsheetListener.cxx
@@ -1054,7 +1054,7 @@ void MWAWSpreadsheetListener::insertShape
default:
#endif
MWAW_DEBUG_MSG(("MWAWSpreadsheetListener::insertShape: UNKNOWN position, insert as char position\n"));
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::CharBaseLine:
case MWAWPosition::Char:
if (m_ps->m_isSpanOpened)
@@ -1171,7 +1171,7 @@ bool MWAWSpreadsheetListener::openFrame(MWAWPosition const &pos, MWAWGraphicStyl
break;
case MWAWPosition::Unknown:
MWAW_DEBUG_MSG(("MWAWSpreadsheetListener::openFrame: UNKNOWN position, insert as char position\n"));
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::CharBaseLine:
case MWAWPosition::Char:
if (m_ps->m_isSpanOpened)
@@ -1346,7 +1346,7 @@ void MWAWSpreadsheetListener::_handleFrameParameters
switch (pos.m_yPos) {
case MWAWPosition::YFull:
propList.insert("svg:height", double(h), unit);
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::YTop:
if (origin[1] < 0 || origin[1] > 0) {
propList.insert("style:vertical-pos", "from-top");
@@ -1388,7 +1388,7 @@ void MWAWSpreadsheetListener::_handleFrameParameters
switch (pos.m_xPos) {
case MWAWPosition::XFull:
propList.insert("svg:width", double(w), unit);
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::XLeft:
if (origin[0] < 0 || origin[0] > 0) {
propList.insert("style:horizontal-pos", "from-left");
diff --git a/src/lib/MWAWTextListener.cxx b/src/lib/MWAWTextListener.cxx
index 2294d1b..151f64a 100644
--- a/src/lib/MWAWTextListener.cxx
+++ b/src/lib/MWAWTextListener.cxx
@@ -1139,7 +1139,7 @@ void MWAWTextListener::insertShape
default:
#endif
MWAW_DEBUG_MSG(("MWAWTextListener::insertShape: UNKNOWN position, insert as char position\n"));
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::CharBaseLine:
case MWAWPosition::Char:
if (m_ps->m_isSpanOpened)
@@ -1255,7 +1255,7 @@ bool MWAWTextListener::openFrame(MWAWPosition const &pos, MWAWGraphicStyle const
break;
case MWAWPosition::Unknown:
MWAW_DEBUG_MSG(("MWAWTextListener::openFrame: UNKNOWN position, insert as char position\n"));
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::CharBaseLine:
case MWAWPosition::Char:
if (m_ps->m_isSpanOpened)
@@ -1339,7 +1339,7 @@ bool MWAWTextListener::openGroup(MWAWPosition const &pos)
default:
#endif
MWAW_DEBUG_MSG(("MWAWTextListener::openGroup: UNKNOWN position, insert as char position\n"));
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::CharBaseLine:
case MWAWPosition::Char:
if (m_ps->m_isSpanOpened)
@@ -1490,7 +1490,7 @@ void MWAWTextListener::_handleFrameParameters
switch (pos.m_yPos) {
case MWAWPosition::YFull:
propList.insert("svg:height", double(h), unit);
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::YTop:
if (origin[1] < 0 || origin[1] > 0) {
propList.insert("style:vertical-pos", "from-top");
@@ -1532,7 +1532,7 @@ void MWAWTextListener::_handleFrameParameters
switch (pos.m_xPos) {
case MWAWPosition::XFull:
propList.insert("svg:width", double(w), unit);
- // fallthrough intended
+ FALLTHROUGH;
case MWAWPosition::XLeft:
if (origin[0] < 0 || origin[0] > 0) {
propList.insert("style:horizontal-pos", "from-left");
diff --git a/src/lib/MacDraft5Parser.cxx b/src/lib/MacDraft5Parser.cxx
index 2baeed9..6c11d41 100644
--- a/src/lib/MacDraft5Parser.cxx
+++ b/src/lib/MacDraft5Parser.cxx
@@ -1473,7 +1473,7 @@ bool MacDraft5Parser::readObject(MacDraft5ParserInternal::Layout &layout)
shape->m_shape=MWAWGraphicShape::rectangle(MWAWBox2f(listPts[0], listPts[2]), corner);
break;
}
- // fall through intended
+ FALLTHROUGH;
case 0x3:
case 0x4: {
rotation=0;
diff --git a/src/lib/MacDrawProParser.cxx b/src/lib/MacDrawProParser.cxx
index e8b9b9b..91c70fa 100644
--- a/src/lib/MacDrawProParser.cxx
+++ b/src/lib/MacDrawProParser.cxx
@@ -1310,7 +1310,7 @@ int MacDrawProParser::readObject()
f << "bitmap,";
break;
}
- // fall through intended
+ FALLTHROUGH;
default:
MWAW_DEBUG_MSG(("MacDrawProParser::readObject: find unknown type %d\n", val));
f << "###type=" << std::hex << val << std::dec << ",";
@@ -2230,7 +2230,7 @@ bool MacDrawProParser::readGeometryShapeData(MacDrawProParserInternal::Shape &sh
shape.m_shape.m_path.push_back(MWAWGraphicShape::PathData('L', listVertices.back()));
break;
}
- // fall through intended
+ FALLTHROUGH;
case 9: { // spline
if (remain<=2) {
MWAW_DEBUG_MSG(("MacDrawProParser::readGeometryShapeData: can not read compute the number of point in spline\n"));
diff --git a/src/lib/MacDrawProStyleManager.cxx b/src/lib/MacDrawProStyleManager.cxx
index 88940ce..9fa242b 100644
--- a/src/lib/MacDrawProStyleManager.cxx
+++ b/src/lib/MacDrawProStyleManager.cxx
@@ -2442,7 +2442,7 @@ bool MacDrawProStyleManager::readGradientMap(MWAWEntry const &entry, int N, int
break;
case 1:
gradient.m_type = MWAWGraphicStyle::G_Radial;
- // fall through expected
+ FALLTHROUGH;
case 2: {
if (type==2) gradient.m_type = MWAWGraphicStyle::G_Rectangular;
int dim[4]; // square which defined the center rectangle
@@ -2554,7 +2554,7 @@ bool MacDrawProStyleManager::readGradientPalette(MWAWEntry const &entry, int fie
break;
case 1:
f << "concentric,";
- // fall through expected
+ FALLTHROUGH;
case 2: {
if (type==2) f << "radial,";
int dim[4]; // square which defined the center rectangle
diff --git a/src/lib/MarinerWrtGraph.cxx b/src/lib/MarinerWrtGraph.cxx
index 1444e0f..fc9ecd0 100644
--- a/src/lib/MarinerWrtGraph.cxx
+++ b/src/lib/MarinerWrtGraph.cxx
@@ -130,7 +130,7 @@ struct Token {
switch (m_pictBorderType[i]) {
case 1: // single[w=0.5]
border.m_width = 0.5;
- // fallthrough intended
+ FALLTHROUGH;
case 2:
border.m_style = MWAWBorder::Simple;
break;
@@ -1024,6 +1024,7 @@ bool MarinerWrtGraph::readTokenBlock0(MarinerWrtStruct const &data, MarinerWrtGr
case 0x18:
val = input->readLong(2);
if (val) f << "f0=" << val << ","; // fieldType?
+ FALLTHROUGH;
case 0x19:
case 0x1e:
case 0x1f:
diff --git a/src/lib/MarinerWrtText.cxx b/src/lib/MarinerWrtText.cxx
index a65e033..6d2e097 100644
--- a/src/lib/MarinerWrtText.cxx
+++ b/src/lib/MarinerWrtText.cxx
@@ -235,7 +235,7 @@ MWAWBorder Paragraph::BorderFill::getBorder(int i) const
break;
case 1: // single[w=0.5]
res.m_width = 0.5;
- // fall-through intended
+ FALLTHROUGH;
case 2:
res.m_style = MWAWBorder::Simple;
break;
diff --git a/src/lib/MoreText.cxx b/src/lib/MoreText.cxx
index 8410dbc..c70fc77 100644
--- a/src/lib/MoreText.cxx
+++ b/src/lib/MoreText.cxx
@@ -2050,6 +2050,7 @@ bool MoreText::readTabs(MWAWEntry const &entry, MoreTextInternal::Paragraph &par
break;
case 3: // more large space
f2 << "dot[large],";
+ FALLTHROUGH;
case 2:
tab.m_leaderCharacter = '.';
break;
diff --git a/src/lib/MsWksDBParser.cxx b/src/lib/MsWksDBParser.cxx
index 785162d..1e67458 100644
--- a/src/lib/MsWksDBParser.cxx
+++ b/src/lib/MsWksDBParser.cxx
@@ -1143,6 +1143,7 @@ bool MsWksDBParser::readFormTypes(MsWksDBParserInternal::Form &form)
visible = MsWksDBParserInternal::V_HEADER;
break;
}
+ FALLTHROUGH;
default:
f << "##unkn[visible]=" << hiFlag << ",";
break;
diff --git a/src/lib/MsWksGraph.cxx b/src/lib/MsWksGraph.cxx
index 9ffaf84..bb70d52 100644
--- a/src/lib/MsWksGraph.cxx
+++ b/src/lib/MsWksGraph.cxx
@@ -1227,6 +1227,7 @@ bool MsWksGraph::readPictHeader(MsWksGraphInternal::Zone &pict)
switch (lineFlags&3) {
case 2:
style.m_arrows[0]=MWAWGraphicStyle::Arrow::plain();
+ FALLTHROUGH;
case 1:
style.m_arrows[1]=MWAWGraphicStyle::Arrow::plain();
break;
@@ -1897,7 +1898,7 @@ void MsWksGraph::computePositions(int zoneId, std::vector<int> &linesH, std::vec
h+=middleH;
int p = 0;
while (p < nPages) {
- if (h < pagesH[size_t(p)]) break;
+ if (h < float(pagesH[size_t(p)])) break;
h -= float(pagesH[size_t(p++)]);
}
zone->m_page = p;
@@ -1988,7 +1989,7 @@ bool MsWksGraph::readRB(MWAWInputStreamPtr input, MWAWEntry const &entry, int ki
case 2:
if (input->readLong(1)!=3) return false;
f << "id=" << input->readLong(1) << ",";
- // no jump expected
+ FALLTHROUGH;
case 1: {
unsigned long dSz=input->readULong(4);
beginRB=input->tell();
diff --git a/src/lib/MsWksSSParser.cxx b/src/lib/MsWksSSParser.cxx
index 72efc00..271a5c7 100644
--- a/src/lib/MsWksSSParser.cxx
+++ b/src/lib/MsWksSSParser.cxx
@@ -933,6 +933,7 @@ bool MsWksSSParser::readCell(int sz, MWAWVec2i const &cellPos, MsWksSSParserInte
break;
case 3:
f << "type" << type << ",";
+ FALLTHROUGH;
case 2: //number general
format.m_format=MWAWCell::F_NUMBER;
content.m_contentType=MWAWCellContent::C_FORMULA;
diff --git a/src/lib/PowerPoint1Parser.cxx b/src/lib/PowerPoint1Parser.cxx
index d5ac56b..8796de0 100644
--- a/src/lib/PowerPoint1Parser.cxx
+++ b/src/lib/PowerPoint1Parser.cxx
@@ -2537,7 +2537,7 @@ bool PowerPoint1Parser::sendFrame(PowerPoint1ParserInternal::Frame const &frame,
if (frame.m_type==0)
shape=MWAWGraphicShape::line(fBox[0], fBox[1]);
else {
- if (frame.m_cornerSize >= fBox.size()[0] || frame.m_cornerSize >= fBox.size()[1])
+ if (float(frame.m_cornerSize) >= fBox.size()[0] || float(frame.m_cornerSize) >= fBox.size()[1])
shape=MWAWGraphicShape::circle(fBox);
else
shape=MWAWGraphicShape::rectangle(fBox, MWAWVec2f(float(frame.m_cornerSize)/2.f, float(frame.m_cornerSize)/2.f));
diff --git a/src/lib/PowerPoint3Parser.cxx b/src/lib/PowerPoint3Parser.cxx
index da2c8eb..81b15f2 100644
--- a/src/lib/PowerPoint3Parser.cxx
+++ b/src/lib/PowerPoint3Parser.cxx
@@ -2952,7 +2952,7 @@ bool PowerPoint3Parser::readParagraph(MWAWParagraph &para, PowerPoint3ParserInte
}
val &= 0xbf;
}
- // fall through expected
+ FALLTHROUGH;
default:
if (val)
f << std::hex << val << std::dec << ",";
diff --git a/src/lib/RagTime5Graph.cxx b/src/lib/RagTime5Graph.cxx
index 86da24a..4d0c838 100644
--- a/src/lib/RagTime5Graph.cxx
+++ b/src/lib/RagTime5Graph.cxx
@@ -665,7 +665,7 @@ bool RagTime5Graph::readColorPatternZone(RagTime5ClusterManager::Cluster &cluste
RagTime5ClusterManager::Link const &lnk=cluster.m_linksList[i];
shared_ptr<RagTime5Zone> data=m_mainParser.getDataZone(lnk.m_ids[0]);
if (!data || !data->m_entry.valid()) {
- if (lnk.m_N*lnk.m_fieldSize) {
+ if (lnk.m_N && lnk.m_fieldSize) {
MWAW_DEBUG_MSG(("RagTime5Graph::readColorPatternZone: can not find data zone %d\n", lnk.m_ids[0]));
}
continue;
diff --git a/src/lib/RagTime5Parser.cxx b/src/lib/RagTime5Parser.cxx
index 08f13db..9af4803 100644
--- a/src/lib/RagTime5Parser.cxx
+++ b/src/lib/RagTime5Parser.cxx
@@ -1241,7 +1241,7 @@ bool RagTime5Parser::readClusterLinkList(RagTime5Zone &zone, RagTime5ClusterMana
{
listLinks.clear();
if (!zone.m_entry.valid()) {
- if (link.m_N*link.m_fieldSize) {
+ if (link.m_N && link.m_fieldSize) {
MWAW_DEBUG_MSG(("RagTime5Parser::readClusterLinkList: can not find data zone %d\n", link.m_ids[0]));
}
return false;
diff --git a/src/lib/RagTimeSpreadsheet.cxx b/src/lib/RagTimeSpreadsheet.cxx
index c5bbbd3..2f22f2b 100644
--- a/src/lib/RagTimeSpreadsheet.cxx
+++ b/src/lib/RagTimeSpreadsheet.cxx
@@ -1415,9 +1415,9 @@ bool RagTimeSpreadsheet::readSpreadsheetCellContent(RagTimeSpreadsheetInternal::
break;
case 0x81:
f << "float81,";
- // fall through intended
+ FALLTHROUGH;
case 3:
- // fall through intended
+ FALLTHROUGH;
case 1: {
if (type==3) {
format.m_format=MWAWCell::F_DATE; // we need the format to choose between date and time
@@ -1444,7 +1444,7 @@ bool RagTimeSpreadsheet::readSpreadsheetCellContent(RagTimeSpreadsheetInternal::
}
case 0x24:
f << "text2,";
- // fall through intended
+ FALLTHROUGH;
case 4: {
format.m_format=MWAWCell::F_TEXT;
content.m_textEntry.setBegin(input->tell());
@@ -1483,7 +1483,7 @@ bool RagTimeSpreadsheet::readSpreadsheetCellContent(RagTimeSpreadsheetInternal::
}
case 0x51:
f << "long51,";
- // fall through intended
+ FALLTHROUGH;
case 0x11: // or 2 int?
if (pos+5>endPos) {
ok=false;
diff --git a/src/lib/WriterPlsParser.cxx b/src/lib/WriterPlsParser.cxx
index 264006d..4568236 100644
--- a/src/lib/WriterPlsParser.cxx
+++ b/src/lib/WriterPlsParser.cxx
@@ -1084,7 +1084,7 @@ bool WriterPlsParser::sendWindow(int zone, MWAWVec2i limits)
listener->insertBreak(MWAWTextListener::ColumnBreak);
}
}
- // fall through intended
+ FALLTHROUGH;
case 0:
case 2:
ok = readText(pInfo);
diff --git a/src/lib/ZWrtText.cxx b/src/lib/ZWrtText.cxx
index fce716d..ea26c05 100644
--- a/src/lib/ZWrtText.cxx
+++ b/src/lib/ZWrtText.cxx
@@ -791,6 +791,7 @@ bool ZWrtText::sendHeaderFooter(bool header)
break;
}
input->seek(actPos+1, librevenge::RVNG_SEEK_SET);
+ FALLTHROUGH;
default:
listener->insertCharacter(static_cast<unsigned char>(c), input, endPos);
break;
diff --git a/src/lib/libmwaw_internal.cxx b/src/lib/libmwaw_internal.cxx
index 6976def..f4d45f5 100644
--- a/src/lib/libmwaw_internal.cxx
+++ b/src/lib/libmwaw_internal.cxx
@@ -339,12 +339,14 @@ bool convertDTFormat(std::string const &dtFormat, librevenge::RVNGPropertyListVe
switch (ch) {
case 'Y':
list.insert("number:style", "long");
+ FALLTHROUGH;
case 'y':
list.insert("librevenge:value-type", "year");
propVect.append(list);
break;
case 'B':
list.insert("number:style", "long");
+ FALLTHROUGH;
case 'b':
case 'h':
list.insert("librevenge:value-type", "month");
@@ -357,13 +359,14 @@ bool convertDTFormat(std::string const &dtFormat, librevenge::RVNGPropertyListVe
break;
case 'e':
list.insert("number:style", "long");
- // fall-through intended
+ FALLTHROUGH;
case 'd':
list.insert("librevenge:value-type", "day");
propVect.append(list);
break;
case 'A':
list.insert("number:style", "long");
+ FALLTHROUGH;
case 'a':
list.insert("librevenge:value-type", "day-of-week");
propVect.append(list);
@@ -371,7 +374,7 @@ bool convertDTFormat(std::string const &dtFormat, librevenge::RVNGPropertyListVe
case 'H':
list.insert("number:style", "long");
- // fall-through intended
+ FALLTHROUGH;
case 'I':
list.insert("librevenge:value-type", "hours");
propVect.append(list);
diff --git a/src/lib/libmwaw_internal.hxx b/src/lib/libmwaw_internal.hxx
index b63c4c8..317cbfa 100644
--- a/src/lib/libmwaw_internal.hxx
+++ b/src/lib/libmwaw_internal.hxx
@@ -116,6 +116,21 @@ struct MWAW_shared_ptr_noop_deleter {
# define LIBMWAW_ATTRIBUTE_PRINTF(fmt, arg)
#endif
+#if defined(__clang__)
+# if __has_cpp_attribute(clang::fallthrough)
+# define FALLTHROUGH [[clang::fallthrough]]
+# else
+# define FALLTHROUGH
+# endif
+#elif defined(__GNUC__)
+# if __GNUC__>=7
+# define FALLTHROUGH [[fallthrough]]
+# else
+# define FALLTHROUGH
+# endif
+#else
+# define FALLTHROUGH
+#endif
/* ---------- debug --------------- */
#ifdef DEBUG
namespace libmwaw
--
2.9.4

View File

@@ -1,600 +0,0 @@
From aa17a93b9af37825009490855df9ab4f83c43ec2 Mon Sep 17 00:00:00 2001
From: osnola <alonso@loria.fr>
Date: Mon, 3 Jul 2017 12:22:52 +0200
Subject: [PATCH 2/2] Rename FALLTHROUGH in MWAW_FALLTHROUGH + simplify code...
---
src/lib/BeagleWksDBParser.cxx | 2 +-
src/lib/ClarisDrawText.cxx | 4 ++--
src/lib/ClarisWksText.cxx | 4 ++--
src/lib/HanMacWrdKGraph.cxx | 2 +-
src/lib/HanMacWrdKParser.cxx | 2 +-
src/lib/MWAWChart.cxx | 2 +-
src/lib/MWAWGraphicListener.cxx | 4 ++--
src/lib/MWAWGraphicShape.cxx | 2 +-
src/lib/MWAWPageSpan.cxx | 2 +-
src/lib/MWAWPresentationListener.cxx | 4 ++--
src/lib/MWAWSpreadsheetListener.cxx | 8 ++++----
src/lib/MWAWTextListener.cxx | 10 +++++-----
src/lib/MacDraft5Parser.cxx | 2 +-
src/lib/MacDrawProParser.cxx | 4 ++--
src/lib/MacDrawProStyleManager.cxx | 4 ++--
src/lib/MarinerWrtGraph.cxx | 4 ++--
src/lib/MarinerWrtText.cxx | 2 +-
src/lib/MoreText.cxx | 2 +-
src/lib/MsWksDBParser.cxx | 2 +-
src/lib/MsWksGraph.cxx | 4 ++--
src/lib/MsWksSSParser.cxx | 2 +-
src/lib/PowerPoint3Parser.cxx | 2 +-
src/lib/RagTimeSpreadsheet.cxx | 8 ++++----
src/lib/WriterPlsParser.cxx | 2 +-
src/lib/ZWrtText.cxx | 2 +-
src/lib/libmwaw_internal.cxx | 10 +++++-----
src/lib/libmwaw_internal.hxx | 17 ++++++++---------
27 files changed, 56 insertions(+), 57 deletions(-)
diff --git a/src/lib/BeagleWksDBParser.cxx b/src/lib/BeagleWksDBParser.cxx
index efaf283..04f9b31 100644
--- a/src/lib/BeagleWksDBParser.cxx
+++ b/src/lib/BeagleWksDBParser.cxx
@@ -1009,7 +1009,7 @@ bool BeagleWksDBParser::readRow()
if (fSz>20) break;
val=static_cast<int>(input->readULong(2));
if (val) f << "g0=" << std::hex << val << std::dec << ",";
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case BeagleWksDBParserInternal::Cell::Memo: // memoId
case BeagleWksDBParserInternal::Cell::Picture: // pictId
case BeagleWksDBParserInternal::Cell::Number:
diff --git a/src/lib/ClarisDrawText.cxx b/src/lib/ClarisDrawText.cxx
index f032414..80f9ee0 100644
--- a/src/lib/ClarisDrawText.cxx
+++ b/src/lib/ClarisDrawText.cxx
@@ -520,7 +520,7 @@ shared_ptr<ClarisWksStruct::DSET> ClarisDrawText::readDSETZone(ClarisWksStruct::
textZone->m_position = ClarisWksStruct::DSET::P_Main;
break;
}
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
default:
MWAW_DEBUG_MSG(("ClarisDrawText::readDSETZone: find unknown position %d\n", (textZone->m_textType >> 4)));
f << "#position="<< (textZone->m_textType >> 4) << ",";
@@ -1358,7 +1358,7 @@ bool ClarisDrawText::sendText(ClarisDrawTextInternal::DSET const &zone, int subZ
}
MWAW_DEBUG_MSG(("ClarisDrawText::sendText: Find unexpected char 1\n"));
f << "###";
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 0xb: // page break
MWAW_DEBUG_MSG(("ClarisDrawText::sendText: Find unexpected page break\n"));
f << "###pb";
diff --git a/src/lib/ClarisWksText.cxx b/src/lib/ClarisWksText.cxx
index 41bf87d..8a9e262 100644
--- a/src/lib/ClarisWksText.cxx
+++ b/src/lib/ClarisWksText.cxx
@@ -754,7 +754,7 @@ shared_ptr<ClarisWksStruct::DSET> ClarisWksText::readDSETZone(ClarisWksStruct::D
textZone->m_position = ClarisWksStruct::DSET::P_Main;
break;
}
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
default:
MWAW_DEBUG_MSG(("ClarisWksText::readDSETZone: find unknown position %d\n", (textZone->m_textType >> 4)));
f << "#position="<< (textZone->m_textType >> 4) << ",";
@@ -1788,7 +1788,7 @@ bool ClarisWksText::sendText(ClarisWksTextInternal::Zone const &zone, MWAWListen
}
MWAW_DEBUG_MSG(("ClarisWksText::sendText: Find unexpected char 1\n"));
f << "###";
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 0xb: // page break
numSectionInPage = 0;
if (main)
diff --git a/src/lib/HanMacWrdKGraph.cxx b/src/lib/HanMacWrdKGraph.cxx
index fe4a3e2..b9a4c56 100644
--- a/src/lib/HanMacWrdKGraph.cxx
+++ b/src/lib/HanMacWrdKGraph.cxx
@@ -1260,7 +1260,7 @@ bool HanMacWrdKGraph::sendFrame(HanMacWrdKGraphInternal::Frame const &frame, MWA
return true;
}
}
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 10:
return sendTextBox(static_cast<HanMacWrdKGraphInternal::TextBox const &>(frame), pos);
case 6: {
diff --git a/src/lib/HanMacWrdKParser.cxx b/src/lib/HanMacWrdKParser.cxx
index ef9bd88..0df5d4f 100644
--- a/src/lib/HanMacWrdKParser.cxx
+++ b/src/lib/HanMacWrdKParser.cxx
@@ -507,7 +507,7 @@ bool HanMacWrdKParser::readZone(shared_ptr<HanMacWrdKZone> zone)
case 0xc:
if (readZonec(zone))
return true;
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 0xd:
if (m_graphParser->readPicture(zone))
return true;
diff --git a/src/lib/MWAWChart.cxx b/src/lib/MWAWChart.cxx
index c9b6e6d..67bd706 100644
--- a/src/lib/MWAWChart.cxx
+++ b/src/lib/MWAWChart.cxx
@@ -624,7 +624,7 @@ std::ostream &operator<<(std::ostream &o, MWAWChart::TextZone const &zone)
switch (zone.m_type) {
case MWAWChart::TextZone::T_SubTitle:
o << "sub";
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWChart::TextZone::T_Title:
o << "title";
if (zone.m_contentType==MWAWChart::TextZone::C_Cell)
diff --git a/src/lib/MWAWGraphicListener.cxx b/src/lib/MWAWGraphicListener.cxx
index 6b723e8..50c7857 100644
--- a/src/lib/MWAWGraphicListener.cxx
+++ b/src/lib/MWAWGraphicListener.cxx
@@ -1480,7 +1480,7 @@ void MWAWGraphicListener::_handleFrameParameters(librevenge::RVNGPropertyList &l
switch (pos.m_yPos) {
case MWAWPosition::YFull:
list.insert("svg:height", double(h), unit);
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::YTop:
if (origin[1] < 0 || origin[1] > 0) {
list.insert("style:vertical-pos", "from-top");
@@ -1522,7 +1522,7 @@ void MWAWGraphicListener::_handleFrameParameters(librevenge::RVNGPropertyList &l
switch (pos.m_xPos) {
case MWAWPosition::XFull:
list.insert("svg:width", double(w), unit);
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::XLeft:
if (origin[0] < 0 || origin[0] > 0) {
list.insert("style:horizontal-pos", "from-left");
diff --git a/src/lib/MWAWGraphicShape.cxx b/src/lib/MWAWGraphicShape.cxx
index f1e7418..375899a 100644
--- a/src/lib/MWAWGraphicShape.cxx
+++ b/src/lib/MWAWGraphicShape.cxx
@@ -596,7 +596,7 @@ std::vector<MWAWGraphicShape::PathData> MWAWGraphicShape::getPath(bool forTransf
switch (m_type) {
case Measure:
MWAW_DEBUG_MSG(("MWAWGraphicShape::getPath: called on a measure, transform it in line\n"));
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case Line:
case Polygon: {
size_t n=m_vertices.size();
diff --git a/src/lib/MWAWPageSpan.cxx b/src/lib/MWAWPageSpan.cxx
index b1064c4..7302e05 100644
--- a/src/lib/MWAWPageSpan.cxx
+++ b/src/lib/MWAWPageSpan.cxx
@@ -226,7 +226,7 @@ void MWAWPageSpan::setHeaderFooter(MWAWHeaderFooter const &hF)
switch (hF.m_occurrence) {
case MWAWHeaderFooter::NEVER:
removeHeaderFooter(type, MWAWHeaderFooter::ALL);
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWHeaderFooter::ALL:
removeHeaderFooter(type, MWAWHeaderFooter::ODD);
removeHeaderFooter(type, MWAWHeaderFooter::EVEN);
diff --git a/src/lib/MWAWPresentationListener.cxx b/src/lib/MWAWPresentationListener.cxx
index 23542cd..cb0c699 100644
--- a/src/lib/MWAWPresentationListener.cxx
+++ b/src/lib/MWAWPresentationListener.cxx
@@ -1489,7 +1489,7 @@ void MWAWPresentationListener::_handleFrameParameters(librevenge::RVNGPropertyLi
switch (pos.m_yPos) {
case MWAWPosition::YFull:
list.insert("svg:height", double(h), unit);
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::YTop:
if (origin[1] < 0 || origin[1] > 0) {
list.insert("style:vertical-pos", "from-top");
@@ -1531,7 +1531,7 @@ void MWAWPresentationListener::_handleFrameParameters(librevenge::RVNGPropertyLi
switch (pos.m_xPos) {
case MWAWPosition::XFull:
list.insert("svg:width", double(w), unit);
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::XLeft:
if (origin[0] < 0 || origin[0] > 0) {
list.insert("style:horizontal-pos", "from-left");
diff --git a/src/lib/MWAWSpreadsheetListener.cxx b/src/lib/MWAWSpreadsheetListener.cxx
index f454fb8..c441434 100644
--- a/src/lib/MWAWSpreadsheetListener.cxx
+++ b/src/lib/MWAWSpreadsheetListener.cxx
@@ -1054,7 +1054,7 @@ void MWAWSpreadsheetListener::insertShape
default:
#endif
MWAW_DEBUG_MSG(("MWAWSpreadsheetListener::insertShape: UNKNOWN position, insert as char position\n"));
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::CharBaseLine:
case MWAWPosition::Char:
if (m_ps->m_isSpanOpened)
@@ -1171,7 +1171,7 @@ bool MWAWSpreadsheetListener::openFrame(MWAWPosition const &pos, MWAWGraphicStyl
break;
case MWAWPosition::Unknown:
MWAW_DEBUG_MSG(("MWAWSpreadsheetListener::openFrame: UNKNOWN position, insert as char position\n"));
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::CharBaseLine:
case MWAWPosition::Char:
if (m_ps->m_isSpanOpened)
@@ -1346,7 +1346,7 @@ void MWAWSpreadsheetListener::_handleFrameParameters
switch (pos.m_yPos) {
case MWAWPosition::YFull:
propList.insert("svg:height", double(h), unit);
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::YTop:
if (origin[1] < 0 || origin[1] > 0) {
propList.insert("style:vertical-pos", "from-top");
@@ -1388,7 +1388,7 @@ void MWAWSpreadsheetListener::_handleFrameParameters
switch (pos.m_xPos) {
case MWAWPosition::XFull:
propList.insert("svg:width", double(w), unit);
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::XLeft:
if (origin[0] < 0 || origin[0] > 0) {
propList.insert("style:horizontal-pos", "from-left");
diff --git a/src/lib/MWAWTextListener.cxx b/src/lib/MWAWTextListener.cxx
index 151f64a..40606e6 100644
--- a/src/lib/MWAWTextListener.cxx
+++ b/src/lib/MWAWTextListener.cxx
@@ -1139,7 +1139,7 @@ void MWAWTextListener::insertShape
default:
#endif
MWAW_DEBUG_MSG(("MWAWTextListener::insertShape: UNKNOWN position, insert as char position\n"));
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::CharBaseLine:
case MWAWPosition::Char:
if (m_ps->m_isSpanOpened)
@@ -1255,7 +1255,7 @@ bool MWAWTextListener::openFrame(MWAWPosition const &pos, MWAWGraphicStyle const
break;
case MWAWPosition::Unknown:
MWAW_DEBUG_MSG(("MWAWTextListener::openFrame: UNKNOWN position, insert as char position\n"));
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::CharBaseLine:
case MWAWPosition::Char:
if (m_ps->m_isSpanOpened)
@@ -1339,7 +1339,7 @@ bool MWAWTextListener::openGroup(MWAWPosition const &pos)
default:
#endif
MWAW_DEBUG_MSG(("MWAWTextListener::openGroup: UNKNOWN position, insert as char position\n"));
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::CharBaseLine:
case MWAWPosition::Char:
if (m_ps->m_isSpanOpened)
@@ -1490,7 +1490,7 @@ void MWAWTextListener::_handleFrameParameters
switch (pos.m_yPos) {
case MWAWPosition::YFull:
propList.insert("svg:height", double(h), unit);
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::YTop:
if (origin[1] < 0 || origin[1] > 0) {
propList.insert("style:vertical-pos", "from-top");
@@ -1532,7 +1532,7 @@ void MWAWTextListener::_handleFrameParameters
switch (pos.m_xPos) {
case MWAWPosition::XFull:
propList.insert("svg:width", double(w), unit);
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case MWAWPosition::XLeft:
if (origin[0] < 0 || origin[0] > 0) {
propList.insert("style:horizontal-pos", "from-left");
diff --git a/src/lib/MacDraft5Parser.cxx b/src/lib/MacDraft5Parser.cxx
index 6c11d41..e3ea4dd 100644
--- a/src/lib/MacDraft5Parser.cxx
+++ b/src/lib/MacDraft5Parser.cxx
@@ -1473,7 +1473,7 @@ bool MacDraft5Parser::readObject(MacDraft5ParserInternal::Layout &layout)
shape->m_shape=MWAWGraphicShape::rectangle(MWAWBox2f(listPts[0], listPts[2]), corner);
break;
}
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 0x3:
case 0x4: {
rotation=0;
diff --git a/src/lib/MacDrawProParser.cxx b/src/lib/MacDrawProParser.cxx
index 91c70fa..cf6e68d 100644
--- a/src/lib/MacDrawProParser.cxx
+++ b/src/lib/MacDrawProParser.cxx
@@ -1310,7 +1310,7 @@ int MacDrawProParser::readObject()
f << "bitmap,";
break;
}
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
default:
MWAW_DEBUG_MSG(("MacDrawProParser::readObject: find unknown type %d\n", val));
f << "###type=" << std::hex << val << std::dec << ",";
@@ -2230,7 +2230,7 @@ bool MacDrawProParser::readGeometryShapeData(MacDrawProParserInternal::Shape &sh
shape.m_shape.m_path.push_back(MWAWGraphicShape::PathData('L', listVertices.back()));
break;
}
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 9: { // spline
if (remain<=2) {
MWAW_DEBUG_MSG(("MacDrawProParser::readGeometryShapeData: can not read compute the number of point in spline\n"));
diff --git a/src/lib/MacDrawProStyleManager.cxx b/src/lib/MacDrawProStyleManager.cxx
index 9fa242b..f670a57 100644
--- a/src/lib/MacDrawProStyleManager.cxx
+++ b/src/lib/MacDrawProStyleManager.cxx
@@ -2442,7 +2442,7 @@ bool MacDrawProStyleManager::readGradientMap(MWAWEntry const &entry, int N, int
break;
case 1:
gradient.m_type = MWAWGraphicStyle::G_Radial;
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 2: {
if (type==2) gradient.m_type = MWAWGraphicStyle::G_Rectangular;
int dim[4]; // square which defined the center rectangle
@@ -2554,7 +2554,7 @@ bool MacDrawProStyleManager::readGradientPalette(MWAWEntry const &entry, int fie
break;
case 1:
f << "concentric,";
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 2: {
if (type==2) f << "radial,";
int dim[4]; // square which defined the center rectangle
diff --git a/src/lib/MarinerWrtGraph.cxx b/src/lib/MarinerWrtGraph.cxx
index fc9ecd0..ce26ac7 100644
--- a/src/lib/MarinerWrtGraph.cxx
+++ b/src/lib/MarinerWrtGraph.cxx
@@ -130,7 +130,7 @@ struct Token {
switch (m_pictBorderType[i]) {
case 1: // single[w=0.5]
border.m_width = 0.5;
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 2:
border.m_style = MWAWBorder::Simple;
break;
@@ -1024,7 +1024,7 @@ bool MarinerWrtGraph::readTokenBlock0(MarinerWrtStruct const &data, MarinerWrtGr
case 0x18:
val = input->readLong(2);
if (val) f << "f0=" << val << ","; // fieldType?
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 0x19:
case 0x1e:
case 0x1f:
diff --git a/src/lib/MarinerWrtText.cxx b/src/lib/MarinerWrtText.cxx
index 6d2e097..987fed7 100644
--- a/src/lib/MarinerWrtText.cxx
+++ b/src/lib/MarinerWrtText.cxx
@@ -235,7 +235,7 @@ MWAWBorder Paragraph::BorderFill::getBorder(int i) const
break;
case 1: // single[w=0.5]
res.m_width = 0.5;
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 2:
res.m_style = MWAWBorder::Simple;
break;
diff --git a/src/lib/MoreText.cxx b/src/lib/MoreText.cxx
index c70fc77..bf61ee0 100644
--- a/src/lib/MoreText.cxx
+++ b/src/lib/MoreText.cxx
@@ -2050,7 +2050,7 @@ bool MoreText::readTabs(MWAWEntry const &entry, MoreTextInternal::Paragraph &par
break;
case 3: // more large space
f2 << "dot[large],";
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 2:
tab.m_leaderCharacter = '.';
break;
diff --git a/src/lib/MsWksDBParser.cxx b/src/lib/MsWksDBParser.cxx
index 1e67458..1ff5fd6 100644
--- a/src/lib/MsWksDBParser.cxx
+++ b/src/lib/MsWksDBParser.cxx
@@ -1143,7 +1143,7 @@ bool MsWksDBParser::readFormTypes(MsWksDBParserInternal::Form &form)
visible = MsWksDBParserInternal::V_HEADER;
break;
}
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
default:
f << "##unkn[visible]=" << hiFlag << ",";
break;
diff --git a/src/lib/MsWksGraph.cxx b/src/lib/MsWksGraph.cxx
index bb70d52..76b99df 100644
--- a/src/lib/MsWksGraph.cxx
+++ b/src/lib/MsWksGraph.cxx
@@ -1227,7 +1227,7 @@ bool MsWksGraph::readPictHeader(MsWksGraphInternal::Zone &pict)
switch (lineFlags&3) {
case 2:
style.m_arrows[0]=MWAWGraphicStyle::Arrow::plain();
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 1:
style.m_arrows[1]=MWAWGraphicStyle::Arrow::plain();
break;
@@ -1989,7 +1989,7 @@ bool MsWksGraph::readRB(MWAWInputStreamPtr input, MWAWEntry const &entry, int ki
case 2:
if (input->readLong(1)!=3) return false;
f << "id=" << input->readLong(1) << ",";
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 1: {
unsigned long dSz=input->readULong(4);
beginRB=input->tell();
diff --git a/src/lib/MsWksSSParser.cxx b/src/lib/MsWksSSParser.cxx
index 271a5c7..d9aba6f 100644
--- a/src/lib/MsWksSSParser.cxx
+++ b/src/lib/MsWksSSParser.cxx
@@ -933,7 +933,7 @@ bool MsWksSSParser::readCell(int sz, MWAWVec2i const &cellPos, MsWksSSParserInte
break;
case 3:
f << "type" << type << ",";
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 2: //number general
format.m_format=MWAWCell::F_NUMBER;
content.m_contentType=MWAWCellContent::C_FORMULA;
diff --git a/src/lib/PowerPoint3Parser.cxx b/src/lib/PowerPoint3Parser.cxx
index 81b15f2..6bdfe49 100644
--- a/src/lib/PowerPoint3Parser.cxx
+++ b/src/lib/PowerPoint3Parser.cxx
@@ -2952,7 +2952,7 @@ bool PowerPoint3Parser::readParagraph(MWAWParagraph &para, PowerPoint3ParserInte
}
val &= 0xbf;
}
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
default:
if (val)
f << std::hex << val << std::dec << ",";
diff --git a/src/lib/RagTimeSpreadsheet.cxx b/src/lib/RagTimeSpreadsheet.cxx
index 2f22f2b..4210358 100644
--- a/src/lib/RagTimeSpreadsheet.cxx
+++ b/src/lib/RagTimeSpreadsheet.cxx
@@ -1415,9 +1415,9 @@ bool RagTimeSpreadsheet::readSpreadsheetCellContent(RagTimeSpreadsheetInternal::
break;
case 0x81:
f << "float81,";
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 3:
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 1: {
if (type==3) {
format.m_format=MWAWCell::F_DATE; // we need the format to choose between date and time
@@ -1444,7 +1444,7 @@ bool RagTimeSpreadsheet::readSpreadsheetCellContent(RagTimeSpreadsheetInternal::
}
case 0x24:
f << "text2,";
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 4: {
format.m_format=MWAWCell::F_TEXT;
content.m_textEntry.setBegin(input->tell());
@@ -1483,7 +1483,7 @@ bool RagTimeSpreadsheet::readSpreadsheetCellContent(RagTimeSpreadsheetInternal::
}
case 0x51:
f << "long51,";
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 0x11: // or 2 int?
if (pos+5>endPos) {
ok=false;
diff --git a/src/lib/WriterPlsParser.cxx b/src/lib/WriterPlsParser.cxx
index 4568236..4207223 100644
--- a/src/lib/WriterPlsParser.cxx
+++ b/src/lib/WriterPlsParser.cxx
@@ -1084,7 +1084,7 @@ bool WriterPlsParser::sendWindow(int zone, MWAWVec2i limits)
listener->insertBreak(MWAWTextListener::ColumnBreak);
}
}
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 0:
case 2:
ok = readText(pInfo);
diff --git a/src/lib/ZWrtText.cxx b/src/lib/ZWrtText.cxx
index ea26c05..5d910da 100644
--- a/src/lib/ZWrtText.cxx
+++ b/src/lib/ZWrtText.cxx
@@ -791,7 +791,7 @@ bool ZWrtText::sendHeaderFooter(bool header)
break;
}
input->seek(actPos+1, librevenge::RVNG_SEEK_SET);
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
default:
listener->insertCharacter(static_cast<unsigned char>(c), input, endPos);
break;
diff --git a/src/lib/libmwaw_internal.cxx b/src/lib/libmwaw_internal.cxx
index f4d45f5..2a879e3 100644
--- a/src/lib/libmwaw_internal.cxx
+++ b/src/lib/libmwaw_internal.cxx
@@ -339,14 +339,14 @@ bool convertDTFormat(std::string const &dtFormat, librevenge::RVNGPropertyListVe
switch (ch) {
case 'Y':
list.insert("number:style", "long");
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 'y':
list.insert("librevenge:value-type", "year");
propVect.append(list);
break;
case 'B':
list.insert("number:style", "long");
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 'b':
case 'h':
list.insert("librevenge:value-type", "month");
@@ -359,14 +359,14 @@ bool convertDTFormat(std::string const &dtFormat, librevenge::RVNGPropertyListVe
break;
case 'e':
list.insert("number:style", "long");
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 'd':
list.insert("librevenge:value-type", "day");
propVect.append(list);
break;
case 'A':
list.insert("number:style", "long");
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 'a':
list.insert("librevenge:value-type", "day-of-week");
propVect.append(list);
@@ -374,7 +374,7 @@ bool convertDTFormat(std::string const &dtFormat, librevenge::RVNGPropertyListVe
case 'H':
list.insert("number:style", "long");
- FALLTHROUGH;
+ MWAW_FALLTHROUGH;
case 'I':
list.insert("librevenge:value-type", "hours");
propVect.append(list);
diff --git a/src/lib/libmwaw_internal.hxx b/src/lib/libmwaw_internal.hxx
index 317cbfa..4c9580d 100644
--- a/src/lib/libmwaw_internal.hxx
+++ b/src/lib/libmwaw_internal.hxx
@@ -116,21 +116,20 @@ struct MWAW_shared_ptr_noop_deleter {
# define LIBMWAW_ATTRIBUTE_PRINTF(fmt, arg)
#endif
+/** fall through attributes */
+#define MWAW_FALLTHROUGH
#if defined(__clang__)
-# if __has_cpp_attribute(clang::fallthrough)
-# define FALLTHROUGH [[clang::fallthrough]]
-# else
-# define FALLTHROUGH
+# if defined(__has_cpp_attribute) && __has_cpp_attribute(clang::fallthrough)
+# undef MWAW_FALLTHROUGH
+# define MWAW_FALLTHROUGH [[clang::fallthrough]]
# endif
#elif defined(__GNUC__)
# if __GNUC__>=7
-# define FALLTHROUGH [[fallthrough]]
-# else
-# define FALLTHROUGH
+# undef MWAW_FALLTHROUGH
+# define MWAW_FALLTHROUGH __attribute__ ((fallthrough))
# endif
-#else
-# define FALLTHROUGH
#endif
+
/* ---------- debug --------------- */
#ifdef DEBUG
namespace libmwaw
--
2.9.4

View File

@@ -1,19 +0,0 @@
SUMMARY = "A library for import of many old Mac document formats"
HOMEPAGE = "http://sourceforge.net/projects/libmwaw"
LICENSE = " LGPLv2.1 & MPL-2.0"
LIC_FILES_CHKSUM = " \
file://COPYING.LGPL;md5=a049c5e22d3bd7bc3c9a2e9135a6d104 \
file://COPYING.MPL;md5=cce0d89a18de69e7f51f693182ac4a3e \
"
SRC_URI = " \
${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \
file://0001-gcc7-try-to-correct-some-warnings.patch \
file://0002-Rename-FALLTHROUGH-in-MWAW_FALLTHROUGH-simplify-code.patch \
"
SRC_URI[md5sum] = "d986a3405788666c4e716f130666499f"
SRC_URI[sha256sum] = "61f5435ebe5e16581d297e8e29b4c9d24d3a1a8a41d497b9fed2452146050150"
inherit autotools-brokensep pkgconfig
DEPENDS = "librevenge"

View File

@@ -0,0 +1,15 @@
SUMMARY = "A library for import of many old Mac document formats"
HOMEPAGE = "http://sourceforge.net/projects/libmwaw"
LICENSE = " LGPLv2.1 & MPL-2.0"
LIC_FILES_CHKSUM = " \
file://COPYING.LGPL;md5=a049c5e22d3bd7bc3c9a2e9135a6d104 \
file://COPYING.MPL;md5=cce0d89a18de69e7f51f693182ac4a3e \
"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2"
SRC_URI[md5sum] = "271c52cad27c92a02b0088c7d2d980db"
SRC_URI[sha256sum] = "9cf4b16ef1abf56ba5b9e2c7180c4901c34604c0160a36b6969a578ded8cbfa7"
inherit autotools-brokensep pkgconfig
DEPENDS = "librevenge"

View File

@@ -6,8 +6,8 @@ LIC_FILES_CHKSUM = " \
"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/libwpd/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.xz"
SRC_URI[md5sum] = "731fd5e5513c55ed64458a0a8c33a830"
SRC_URI[sha256sum] = "03b210ab44f05e38091508cdca6ba0ff73de3ea8a168f849b8f1c5059c20b9e9"
SRC_URI[md5sum] = "ec7ce6c69aac83f8a9e6280d919b3cad"
SRC_URI[sha256sum] = "323e491f956c8ca2abb12c998e350670930a32317bf9662b0615dd4b3922b831"
inherit autotools pkgconfig perlnative

View File

@@ -0,0 +1,43 @@
From e3f451d4340acef6872126eec84ec557ed9d21bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Mon, 2 Jul 2018 15:59:24 +0200
Subject: [PATCH] Workaround build error with gcc8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
src/lib/PMDParser.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/lib/PMDParser.cpp b/src/lib/PMDParser.cpp
index 481f6bf..50c3033 100644
--- a/src/lib/PMDParser.cpp
+++ b/src/lib/PMDParser.cpp
@@ -846,6 +846,10 @@ void PMDParser::parseHeader(uint32_t *tocOffset, uint16_t *tocLength)
{
throw PMDParseException("Endianness marker is corrupt in PMD header.");
}
+#if __GNUC__ > 7
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcatch-value"
+#endif
try
{
seek(m_input, TABLE_OF_CONTENTS_LENGTH_OFFSET);
@@ -866,6 +868,9 @@ void PMDParser::parseHeader(uint32_t *tocOffset, uint16_t *tocLength)
{
throw PMDParseException("Can't find the table of contents offset in the header.");
}
+#if __GNUC__ > 7
+#pragma GCC diagnostic pop
+#endif
}
void PMDParser::readNextRecordFromTableOfContents(ToCState &state, const bool subRecord, const uint16_t subRecordType)
--
2.14.4

View File

@@ -4,9 +4,12 @@ LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=815ca599c9df247a0c7f619bab123dad \
"
SRC_URI = "http://dev-www.libreoffice.org/src/${BPN}/${BPN}-${PV}.tar.xz"
SRC_URI[md5sum] = "9f377b0690fa6e96a94bb309509860e9"
SRC_URI[sha256sum] = "d896dc55dafd84ee3441e0ca497b810809f9eea44805a495c3843412309036d6"
SRC_URI = " \
http://dev-www.libreoffice.org/src/${BPN}/${BPN}-${PV}.tar.xz \
file://0001-Workaround-build-error-with-gcc8.patch \
"
SRC_URI[md5sum] = "8395dfc5eef11c58d5a9efe3bfe64831"
SRC_URI[sha256sum] = "66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d"
inherit autotools pkgconfig

View File

@@ -5,9 +5,9 @@ LIC_FILES_CHKSUM = " \
file://COPYING.MPL;md5=815ca599c9df247a0c7f619bab123dad \
"
SRC_URI = "http://dev-www.libreoffice.org/src/${BPN}-${PV}.tar.bz2"
SRC_URI[md5sum] = "79b56bcc349264d686a67994506ad199"
SRC_URI[sha256sum] = "efc20361d6e43f9ff74de5f4d86c2ce9c677693f5da08b0a88d603b7475a508d"
SRC_URI = "http://dev-www.libreoffice.org/src/${BPN}-${PV}.tar.xz"
SRC_URI[md5sum] = "50d575509d68c940e566c4a0581cd61a"
SRC_URI[sha256sum] = "323f68beaf4f35e5a4d7daffb4703d0566698280109210fa4eaa90dea27d6610"
inherit autotools pkgconfig perlnative

View File

@@ -5,9 +5,9 @@ LIC_FILES_CHKSUM = " \
file://COPYING.MPL;md5=815ca599c9df247a0c7f619bab123dad \
"
SRC_URI = "http://dev-www.libreoffice.org/src/${BPN}-${PV}.tar.bz2"
SRC_URI[md5sum] = "dfd066658ec9d2fb2262417039a8a1c3"
SRC_URI[sha256sum] = "29049b95895914e680390717a243b291448e76e0f82fb4d2479adee5330fbb59"
SRC_URI = "http://dev-www.libreoffice.org/src/${BPN}-${PV}.tar.xz"
SRC_URI[md5sum] = "9bd45e72071897367b5b3ba2854fa36f"
SRC_URI[sha256sum] = "57faf1ab97d63d57383ac5d7875e992a3d190436732f4083310c0471e72f8c33"
inherit autotools pkgconfig

View File

@@ -1,319 +0,0 @@
From e1b2c2f34268d14aa469c88ab89bd9f491168bd0 Mon Sep 17 00:00:00 2001
From: osnola <alonso@loria.fr>
Date: Mon, 3 Jul 2017 10:04:00 +0200
Subject: [PATCH] g++7: try to remove some warnings...
Upstream-Status: Submitted [1]
[1] https://sourceforge.net/p/libwps/code/ci/master/tree/
---
src/lib/WKS4Spreadsheet.cpp | 2 +-
src/lib/WKSContentListener.cpp | 4 ++--
src/lib/WPS4.cpp | 2 +-
src/lib/WPS4Text.cpp | 7 ++++---
src/lib/WPS8Table.cpp | 2 +-
src/lib/WPS8TextStyle.cpp | 4 +++-
src/lib/WPSCell.cpp | 11 +++++++----
src/lib/WPSContentListener.cpp | 6 +++---
src/lib/WPSGraphicShape.cpp | 1 +
src/lib/WPSPageSpan.cpp | 1 +
src/lib/libwps_internal.cpp | 1 +
src/lib/libwps_internal.h | 14 ++++++++++++++
src/lib/libwps_tools_win.cpp | 1 +
13 files changed, 40 insertions(+), 16 deletions(-)
diff --git a/src/lib/WKS4Spreadsheet.cpp b/src/lib/WKS4Spreadsheet.cpp
index 29dd98e..cf3232c 100644
--- a/src/lib/WKS4Spreadsheet.cpp
+++ b/src/lib/WKS4Spreadsheet.cpp
@@ -821,7 +821,7 @@ bool WKS4Spreadsheet::readMsWorksStyle()
break;
case 5: // center arround cell
f << ",center[between cell]";
- // fail through expected
+ WPS_FALLTHROUGH;
case 2:
style.setHAlignement(WPSCell::HALIGN_CENTER);
break;
diff --git a/src/lib/WKSContentListener.cpp b/src/lib/WKSContentListener.cpp
index 08d8209..d24b8a2 100644
--- a/src/lib/WKSContentListener.cpp
+++ b/src/lib/WKSContentListener.cpp
@@ -775,7 +775,7 @@ void WKSContentListener::_handleFrameParameters
{
case WPSPosition::YFull:
propList.insert("svg:height", double(h), unit);
- // fall-through intended
+ WPS_FALLTHROUGH;
case WPSPosition::YTop:
if (origin[1] < 0.0 || origin[1] > 0.0)
{
@@ -819,7 +819,7 @@ void WKSContentListener::_handleFrameParameters
{
case WPSPosition::XFull:
propList.insert("svg:width", double(w), unit);
- // fallthrough intended
+ WPS_FALLTHROUGH;
case WPSPosition::XLeft:
if (origin[0] < 0.0 || origin[0] > 0.0)
{
diff --git a/src/lib/WPS4.cpp b/src/lib/WPS4.cpp
index cc6493d..2629086 100644
--- a/src/lib/WPS4.cpp
+++ b/src/lib/WPS4.cpp
@@ -585,7 +585,7 @@ bool WPS4Parser::findZones()
{
case 0xda1:
apCreator = 2;
- // fall-through intended
+ WPS_FALLTHROUGH;
case 0:
case 1:
worksVersion = 1;
diff --git a/src/lib/WPS4Text.cpp b/src/lib/WPS4Text.cpp
index 76f0e5f..fe464ce 100644
--- a/src/lib/WPS4Text.cpp
+++ b/src/lib/WPS4Text.cpp
@@ -910,6 +910,7 @@ bool WPS4Text::readText(WPSEntry const &zone)
}
m_input->seek(-1, librevenge::RVNG_SEEK_CUR);
}
+ WPS_FALLTHROUGH;
default:
if (version()<=2)
{
@@ -1593,7 +1594,7 @@ bool WPS4Text::readDosLink(WPSEntry const &entry)
val = libwps::readU16(m_input); // always 4
if (val != 4) f << "g1=" << val << ",";
}
- // fall-through intended
+ WPS_FALLTHROUGH;
case 0x40: // spreadsheet range
case 0x01: // char ?
{
@@ -1999,7 +2000,7 @@ bool WPS4Text::readParagraph(long endPos, int &id, std::string &mess)
break;
case 0x13: // seems another way to define the left margin
f << "#left,";
- // fall-through intended
+ WPS_FALLTHROUGH;
case 0x12:
pp.m_margins[1] = arg/1440.;
break;
@@ -2565,7 +2566,7 @@ bool WPS4Text::readPLC
break;
default:
WPS_DEBUG_MSG(("WPS4Text:readPLC: unexpected PLC size\n"));
- // fallthrough intended
+ WPS_FALLTHROUGH;
case 0:
plc.m_value = 0;
}
diff --git a/src/lib/WPS8Table.cpp b/src/lib/WPS8Table.cpp
index 3280158..da6bfa9 100644
--- a/src/lib/WPS8Table.cpp
+++ b/src/lib/WPS8Table.cpp
@@ -605,7 +605,7 @@ bool WPS8Table::readMCLD(RVNGInputStreamPtr input, WPSEntry const &entry)
break; // normal
case 0xFF: // also unset, diff with value = 1 ?
f2 << "#f" << dt.id() << "=" << std::hex << dt.m_value << std::dec << ",";
- // fall-through intended
+ WPS_FALLTHROUGH;
case 1:
cell->setVerticalSet(false);
break;
diff --git a/src/lib/WPS8TextStyle.cpp b/src/lib/WPS8TextStyle.cpp
index aa02e49..dbaeb71 100644
--- a/src/lib/WPS8TextStyle.cpp
+++ b/src/lib/WPS8TextStyle.cpp
@@ -671,6 +671,7 @@ bool WPS8TextStyle::readParagraph(long endPos, int &id, std::string &mess)
{
case 2: // not frequent: only found one time
f << "#type[bullet]=2,";
+ WPS_FALLTHROUGH;
case 1: // the normal case
para.m_listLevelIndex = 1;
para.m_listLevel.m_type = libwps::BULLET;
@@ -756,7 +757,7 @@ bool WPS8TextStyle::readParagraph(long endPos, int &id, std::string &mess)
break;
default:
f << "#bullet/type=" << type << ",";
- // fall-through intended
+ WPS_FALLTHROUGH;
case 2:
para.m_listLevel.m_type = libwps::ARABIC;
break;
@@ -1001,6 +1002,7 @@ bool WPS8TextStyle::readParagraph(long endPos, int &id, std::string &mess)
f << "extra[tabs]=[" << data.m_recursData[ch] << "],";
}
}
+ WPS_FALLTHROUGH; // checkme
case 0x34: // interline line spacing 8*152400 -> normal, sinon *2
{
diff --git a/src/lib/WPSCell.cpp b/src/lib/WPSCell.cpp
index 7086140..d87ea0b 100644
--- a/src/lib/WPSCell.cpp
+++ b/src/lib/WPSCell.cpp
@@ -64,12 +64,14 @@ bool WPSCellFormat::convertDTFormat(std::string const &dtFormat, librevenge::RVN
{
case 'Y':
list.insert("number:style", "long");
+ WPS_FALLTHROUGH;
case 'y':
list.insert("librevenge:value-type", "year");
propVect.append(list);
break;
case 'B':
list.insert("number:style", "long");
+ WPS_FALLTHROUGH;
case 'b':
case 'h':
list.insert("librevenge:value-type", "month");
@@ -82,13 +84,14 @@ bool WPSCellFormat::convertDTFormat(std::string const &dtFormat, librevenge::RVN
break;
case 'e':
list.insert("number:style", "long");
- // fall-through intended
+ WPS_FALLTHROUGH;
case 'd':
list.insert("librevenge:value-type", "day");
propVect.append(list);
break;
case 'A':
list.insert("number:style", "long");
+ WPS_FALLTHROUGH;
case 'a':
list.insert("librevenge:value-type", "day-of-week");
propVect.append(list);
@@ -96,7 +99,7 @@ bool WPSCellFormat::convertDTFormat(std::string const &dtFormat, librevenge::RVN
case 'H':
list.insert("number:style", "long");
- // fall-through intended
+ WPS_FALLTHROUGH;
case 'I':
list.insert("librevenge:value-type", "hours");
propVect.append(list);
@@ -286,11 +289,11 @@ bool WPSCellFormat::getNumberingProperties(librevenge::RVNGPropertyList &propLis
{
case 5: // thousand
propList.insert("number:grouping", true);
- // fall-through intended
+ WPS_FALLTHROUGH;
case 0: // default
if (m_subFormat==0)
propList.remove("number:decimal-places");
- // fall-through intended
+ WPS_FALLTHROUGH;
case 1: // decimal
propList.insert("librevenge:value-type", "number");
break;
diff --git a/src/lib/WPSContentListener.cpp b/src/lib/WPSContentListener.cpp
index 9d5e390..5994e51 100644
--- a/src/lib/WPSContentListener.cpp
+++ b/src/lib/WPSContentListener.cpp
@@ -1183,7 +1183,7 @@ bool WPSContentListener::openGroup(WPSPosition const &pos)
default:
WPS_DEBUG_MSG(("WPSContentListener::openGroup: UNKNOWN position, insert as char position\n"));
#endif
- // fallthrough intended
+ WPS_FALLTHROUGH;
case WPSPosition::CharBaseLine:
case WPSPosition::Char:
if (m_ps->m_isSpanOpened)
@@ -1372,7 +1372,7 @@ void WPSContentListener::_handleFrameParameters
{
case WPSPosition::YFull:
propList.insert("svg:height", double(h), unit);
- // fall-through intended
+ WPS_FALLTHROUGH;
case WPSPosition::YTop:
if (origin[1] < 0.0 || origin[1] > 0.0)
{
@@ -1416,7 +1416,7 @@ void WPSContentListener::_handleFrameParameters
{
case WPSPosition::XFull:
propList.insert("svg:width", double(w), unit);
- // fallthrough intended
+ WPS_FALLTHROUGH;
case WPSPosition::XLeft:
if (origin[0] < 0.0 || origin[0] > 0.0)
{
diff --git a/src/lib/WPSGraphicShape.cpp b/src/lib/WPSGraphicShape.cpp
index 6a73f8b..6c60213 100644
--- a/src/lib/WPSGraphicShape.cpp
+++ b/src/lib/WPSGraphicShape.cpp
@@ -631,6 +631,7 @@ std::vector<WPSGraphicShape::PathData> WPSGraphicShape::getPath(bool forTransfor
break;
}
}
+ WPS_FALLTHROUGH;
case Arc:
case Pie:
{
diff --git a/src/lib/WPSPageSpan.cpp b/src/lib/WPSPageSpan.cpp
index f4d2fca..0444680 100644
--- a/src/lib/WPSPageSpan.cpp
+++ b/src/lib/WPSPageSpan.cpp
@@ -114,6 +114,7 @@ void WPSPageSpan::setHeaderFooter(const HeaderFooterType type, const HeaderFoote
{
case NEVER:
_removeHeaderFooter(type, ALL);
+ WPS_FALLTHROUGH;
case FIRST:
case ALL:
_removeHeaderFooter(type, ODD);
diff --git a/src/lib/libwps_internal.cpp b/src/lib/libwps_internal.cpp
index 73d1999..0be82b4 100644
--- a/src/lib/libwps_internal.cpp
+++ b/src/lib/libwps_internal.cpp
@@ -488,6 +488,7 @@ librevenge::RVNGString WPSField::getString() const
struct tm timeinfo;
if (localtime_r(&now, &timeinfo))
{
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
char buf[256];
strftime(buf, 256, format.c_str(), &timeinfo);
res=librevenge::RVNGString(buf);
diff --git a/src/lib/libwps_internal.h b/src/lib/libwps_internal.h
index 690dedb..8e91806 100644
--- a/src/lib/libwps_internal.h
+++ b/src/lib/libwps_internal.h
@@ -83,6 +83,20 @@ struct WPS_shared_ptr_noop_deleter
void operator()(T *) {}
};
+/** fall through attributes */
+#define WPS_FALLTHROUGH
+#if defined(__clang__)
+# if defined(__has_cpp_attribute) && __has_cpp_attribute(clang::fallthrough)
+# undef WPS_FALLTHROUGH
+# define WPS_FALLTHROUGH [[clang::fallthrough]]
+# endif
+#elif defined(__GNUC__)
+# if __GNUC__>=7
+# undef WPS_FALLTHROUGH
+# define WPS_FALLTHROUGH __attribute__ ((fallthrough))
+# endif
+#endif
+
// basic classes and autoptr
/** shared pointer to librevenge::RVNGInputStream */
typedef shared_ptr<librevenge::RVNGInputStream> RVNGInputStreamPtr;
diff --git a/src/lib/libwps_tools_win.cpp b/src/lib/libwps_tools_win.cpp
index 80f53c7..2868267 100644
--- a/src/lib/libwps_tools_win.cpp
+++ b/src/lib/libwps_tools_win.cpp
@@ -186,6 +186,7 @@ Font::Type Font::getTypeForOEM(int oem)
default:
WPS_DEBUG_MSG(("libwps_tools_win::Font::getTypeForOEM: find unknown oem %d\n", oem));
+ WPS_FALLTHROUGH;
case 0:
return UNKNOWN;
}
--
2.9.4

View File

@@ -1,17 +0,0 @@
SUMMARY = "Import filter library for MS Works"
HOMEPAGE = "https://sourceforge.net/projects/libwps/"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = " \
file://COPYING.MPL;md5=815ca599c9df247a0c7f619bab123dad \
"
SRC_URI = " \
http://dev-www.libreoffice.org/src/${BPN}-${PV}.tar.xz \
file://0001-g-7-try-to-remove-some-warnings.patch \
"
SRC_URI[md5sum] = "b04428f208e2eb31adcba5a53dec62c2"
SRC_URI[sha256sum] = "e48a7c2fd20048a0a8eaf69bad972575f8b9f06e7497c787463f127d332fccd0"
inherit autotools-brokensep pkgconfig
DEPENDS = "librevenge"

View File

@@ -0,0 +1,14 @@
SUMMARY = "Import filter library for MS Works"
HOMEPAGE = "https://sourceforge.net/projects/libwps/"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = " \
file://COPYING.MPL;md5=815ca599c9df247a0c7f619bab123dad \
"
SRC_URI = "http://dev-www.libreoffice.org/src/${BPN}-${PV}.tar.xz"
SRC_URI[md5sum] = "b49670696446f4e11cafa49ec566d54c"
SRC_URI[sha256sum] = "13beb0c733bb1544a542b6ab1d9d205f218e9a2202d1d4cac056f79f6db74922"
inherit autotools-brokensep pkgconfig
DEPENDS = "librevenge"

View File

@@ -29,8 +29,8 @@ index f06ef8e..66a11a9 100644
-ICU_MAJOR=54
+ICU_MAJOR=58
ICU_MINOR=1
ICU_RECLASSIFIED_CLOSE_PARENTHESIS="TRUE"
ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE"
ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE"
diff --git a/download.lst b/download.lst
index 4571338..0770a4d 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -145,7 +145,7 @@ index bcc7cef..ff201a6 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -1594,6 +1594,41 @@ void SubsetMap::InitList()
aAllSubsets.push_back( Subset( 0x1D800, 0x1DAAF, RID_SUBSETSTR_SUTTON_SIGNWRITING ) );
case UBLOCK_SUTTON_SIGNWRITING:
break;
#endif
+#if (U_ICU_VERSION_MAJOR_NUM >= 58)
@@ -192,7 +192,7 @@ index 06630cc..a7765c3 100644
+++ b/svx/source/dialog/ucsubset.src
@@ -1079,6 +1079,50 @@ Resource RID_SUBSETMAP
{
Text [ en-US ] = "Sutton Signwriting";
Text [ en-US ] = "Warang Citi";
};
+ String RID_SUBSETSTR_ADLAM
+ {

View File

@@ -0,0 +1,278 @@
From 99dd8e29764156b0d7ac53044f393efd8b6555ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Fri, 8 Jun 2018 15:10:50 +0200
Subject: [PATCH] Fix build with recent icu
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Change-Id: I0ce2494a3994155ad0949a17aa71da51891200a7
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
basegfx/source/range/b2drangeclipper.cxx | 1 +
i18npool/inc/collator_unicode.hxx | 2 +-
.../source/breakiterator/breakiterator_unicode.cxx | 20 ++++++++++----------
i18npool/source/collator/collator_unicode.cxx | 14 +++++++-------
i18npool/source/collator/gencoll_rule.cxx | 2 +-
i18npool/source/ordinalsuffix/ordinalsuffix.cxx | 2 +-
i18nutil/source/utility/unicode.cxx | 6 +++---
vcl/generic/glyphs/scrptrun.h | 2 +-
opencl/source/openclconfig.cxx | 2 +-
lotuswordpro/source/filter/localtime.cxx | 2 +-
10 files changed, 27 insertions(+), 24 deletions(-)
diff --git a/basegfx/source/range/b2drangeclipper.cxx b/basegfx/source/range/b2drangeclipper.cxx
index edbb128..ceb9e11 100644
--- a/basegfx/source/range/b2drangeclipper.cxx
+++ b/basegfx/source/range/b2drangeclipper.cxx
@@ -31,6 +31,7 @@
#include <o3tl/vector_pool.hxx>
#include <boost/bind.hpp>
#include <boost/utility.hpp>
+#include <boost/next_prior.hpp>
#include <algorithm>
#include <deque>
diff --git a/i18npool/inc/collator_unicode.hxx b/i18npool/inc/collator_unicode.hxx
index 951de9c..c12213a 100644
--- a/i18npool/inc/collator_unicode.hxx
+++ b/i18npool/inc/collator_unicode.hxx
@@ -69,7 +69,7 @@ public:
protected:
const sal_Char *implementationName;
private:
- RuleBasedCollator *uca_base, *collator;
+ icu::RuleBasedCollator *uca_base, *collator;
#ifndef DISABLE_DYNLOADING
oslModule hModule;
#endif
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index c68b860..6b10960 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -61,7 +61,7 @@ BreakIterator_Unicode::~BreakIterator_Unicode()
Wrapper class to provide public access to the RuleBasedBreakIterator's
setbreakType method.
*/
-class OOoRuleBasedBreakIterator : public RuleBasedBreakIterator
+class OOoRuleBasedBreakIterator : public icu::RuleBasedBreakIterator
{
public:
#if (U_ICU_VERSION_MAJOR_NUM < 58)
@@ -224,7 +224,7 @@ sal_Int32 SAL_CALL BreakIterator_Unicode::nextCharacters( const OUString& Text,
loadICUBreakIterator(rLocale, LOAD_CHARACTER_BREAKITERATOR, 0, "char", Text);
for (nDone = 0; nDone < nCount; nDone++) {
nStartPos = character.aBreakIterator->following(nStartPos);
- if (nStartPos == BreakIterator::DONE)
+ if (nStartPos == icu::BreakIterator::DONE)
return Text.getLength();
}
} else { // for CHARACTER mode
@@ -243,7 +243,7 @@ sal_Int32 SAL_CALL BreakIterator_Unicode::previousCharacters( const OUString& Te
loadICUBreakIterator(rLocale, LOAD_CHARACTER_BREAKITERATOR, 0, "char", Text);
for (nDone = 0; nDone < nCount; nDone++) {
nStartPos = character.aBreakIterator->preceding(nStartPos);
- if (nStartPos == BreakIterator::DONE)
+ if (nStartPos == icu::BreakIterator::DONE)
return 0;
}
} else { // for BS to delete one char and CHARACTER mode.
@@ -260,7 +260,7 @@ Boundary SAL_CALL BreakIterator_Unicode::nextWord( const OUString& Text, sal_Int
loadICUBreakIterator(rLocale, LOAD_WORD_BREAKITERATOR, rWordType, NULL, Text);
result.startPos = icuBI->aBreakIterator->following(nStartPos);
- if( result.startPos >= Text.getLength() || result.startPos == BreakIterator::DONE )
+ if( result.startPos >= Text.getLength() || result.startPos == icu::BreakIterator::DONE )
result.endPos = result.startPos;
else {
if ( (rWordType == WordType::ANYWORD_IGNOREWHITESPACES ||
@@ -269,7 +269,7 @@ Boundary SAL_CALL BreakIterator_Unicode::nextWord( const OUString& Text, sal_Int
result.startPos = icuBI->aBreakIterator->following(result.startPos);
result.endPos = icuBI->aBreakIterator->following(result.startPos);
- if(result.endPos == BreakIterator::DONE)
+ if(result.endPos == icu::BreakIterator::DONE)
result.endPos = result.startPos;
}
return result;
@@ -282,7 +282,7 @@ Boundary SAL_CALL BreakIterator_Unicode::previousWord(const OUString& Text, sal_
loadICUBreakIterator(rLocale, LOAD_WORD_BREAKITERATOR, rWordType, NULL, Text);
result.startPos = icuBI->aBreakIterator->preceding(nStartPos);
- if( result.startPos < 0 || result.startPos == BreakIterator::DONE)
+ if( result.startPos < 0 || result.startPos == icu::BreakIterator::DONE)
result.endPos = result.startPos;
else {
if ( (rWordType == WordType::ANYWORD_IGNOREWHITESPACES ||
@@ -291,7 +291,7 @@ Boundary SAL_CALL BreakIterator_Unicode::previousWord(const OUString& Text, sal_
result.startPos = icuBI->aBreakIterator->preceding(result.startPos);
result.endPos = icuBI->aBreakIterator->following(result.startPos);
- if(result.endPos == BreakIterator::DONE)
+ if(result.endPos == icu::BreakIterator::DONE)
result.endPos = result.startPos;
}
return result;
@@ -322,9 +322,9 @@ Boundary SAL_CALL BreakIterator_Unicode::getWordBoundary( const OUString& Text,
result.endPos = icuBI->aBreakIterator->following(nPos);
}
}
- if (result.startPos == BreakIterator::DONE)
+ if (result.startPos == icu::BreakIterator::DONE)
result.startPos = result.endPos;
- else if (result.endPos == BreakIterator::DONE)
+ else if (result.endPos == icu::BreakIterator::DONE)
result.endPos = result.startPos;
return result;
@@ -388,7 +388,7 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLineBreak(
lbr.breakIndex = nStartPos;
lbr.breakType = BreakType::WORDBOUNDARY;
} else if (hOptions.rHyphenator.is()) { //Hyphenation break
- sal_Int32 boundary_with_punctuation = (line.aBreakIterator->next() != BreakIterator::DONE) ? line.aBreakIterator->current() : 0;
+ sal_Int32 boundary_with_punctuation = (line.aBreakIterator->next() != icu::BreakIterator::DONE) ? line.aBreakIterator->current() : 0;
line.aBreakIterator->preceding(nStartPos + 1); // reset to check correct hyphenation of "word-word"
sal_Int32 nStartPosWordEnd = nStartPos;
diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
index 9ef6548..978aa04 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -138,7 +138,7 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
UErrorCode status = U_ZERO_ERROR;
OUString rule = LocaleDataImpl().getCollatorRuleByAlgorithm(rLocale, rAlgorithm);
if (!rule.isEmpty()) {
- collator = new RuleBasedCollator(reinterpret_cast<const UChar *>(rule.getStr()), status); // UChar != sal_Unicode in MinGW
+ collator = new icu::RuleBasedCollator(reinterpret_cast<const UChar *>(rule.getStr()), status); // UChar != sal_Unicode in MinGW
if (! U_SUCCESS(status)) throw RuntimeException();
}
if (!collator && OUString(LOCAL_RULE_LANGS).indexOf(rLocale.Language) >= 0) {
@@ -355,11 +355,11 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
// The default collator of the en-US locale would also fulfill
// the requirement. The collator of the actual locale or the
// NULL (default) locale does not.
- uca_base = static_cast<RuleBasedCollator*>(icu::Collator::createInstance(
+ uca_base = static_cast<icu::RuleBasedCollator*>(icu::Collator::createInstance(
icu::Locale::getRoot(), status));
#endif
if (! U_SUCCESS(status)) throw RuntimeException();
- collator = new RuleBasedCollator(
+ collator = new icu::RuleBasedCollator(
reinterpret_cast<const uint8_t*>(ruleImage), ruleImageSize, uca_base, status);
if (! U_SUCCESS(status)) throw RuntimeException();
}
@@ -373,17 +373,17 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
*/
icu::Locale icuLocale( LanguageTagIcu::getIcuLocale( LanguageTag( rLocale), rAlgorithm));
// load ICU collator
- collator = static_cast<RuleBasedCollator*>( icu::Collator::createInstance(icuLocale, status) );
+ collator = static_cast<icu::RuleBasedCollator*>( icu::Collator::createInstance(icuLocale, status) );
if (! U_SUCCESS(status)) throw RuntimeException();
}
}
if (options & CollatorOptions::CollatorOptions_IGNORE_CASE_ACCENT)
- collator->setStrength(Collator::PRIMARY);
+ collator->setStrength(icu::Collator::PRIMARY);
else if (options & CollatorOptions::CollatorOptions_IGNORE_CASE)
- collator->setStrength(Collator::SECONDARY);
+ collator->setStrength(icu::Collator::SECONDARY);
else
- collator->setStrength(Collator::TERTIARY);
+ collator->setStrength(icu::Collator::TERTIARY);
return 0;
}
diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx
index 201170a..9b8c1b6 100644
--- a/i18npool/source/collator/gencoll_rule.cxx
+++ b/i18npool/source/collator/gencoll_rule.cxx
@@ -112,7 +112,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
//UCollator *coll = ucol_openRules(Obuf.getStr(), Obuf.getLength(), UCOL_OFF,
// UCOL_DEFAULT_STRENGTH, &parseError, &status);
- RuleBasedCollator *coll = new RuleBasedCollator(reinterpret_cast<const UChar *>(Obuf.getStr()), status); // UChar != sal_Unicode in MinGW
+ icu::RuleBasedCollator *coll = new icu::RuleBasedCollator(reinterpret_cast<const UChar *>(Obuf.getStr()), status); // UChar != sal_Unicode in MinGW
if (U_SUCCESS(status)) {
std::vector<uint8_t> data;
diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
index 17546ef..eb45ebd 100644
--- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
+++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
@@ -79,7 +79,7 @@ uno::Sequence< OUString > SAL_CALL OrdinalSuffixService::getOrdinalSuffix( sal_I
if (!U_SUCCESS(nCode))
return retValue;
- boost::scoped_ptr<NumberFormat> xNumberFormat(icu::NumberFormat::createInstance(aIcuLocale, nCode));
+ boost::scoped_ptr<icu::NumberFormat> xNumberFormat(icu::NumberFormat::createInstance(aIcuLocale, nCode));
if (!U_SUCCESS(nCode))
return retValue;
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx
index 6766a6b..01fae9b 100644
--- a/i18nutil/source/utility/unicode.cxx
+++ b/i18nutil/source/utility/unicode.cxx
@@ -1004,15 +1004,15 @@ OUString SAL_CALL unicode::formatPercent(double dNumber,
icu::Locale aLocale = LanguageTagIcu::getIcuLocale(aLangTag);
- boost::scoped_ptr<NumberFormat> xF(
- NumberFormat::createPercentInstance(aLocale, errorCode));
+ boost::scoped_ptr<icu::NumberFormat> xF(
+ icu::NumberFormat::createPercentInstance(aLocale, errorCode));
if(U_FAILURE(errorCode))
{
SAL_WARN("i18n", "NumberFormat::createPercentInstance failed");
return OUString::number(dNumber) + "%";
}
- UnicodeString output;
+ icu::UnicodeString output;
xF->format(dNumber/100, output);
OUString aRet(reinterpret_cast<const sal_Unicode *>(output.getBuffer()),
output.length());
diff --git a/vcl/generic/glyphs/scrptrun.h b/vcl/generic/glyphs/scrptrun.h
index 625ca7b..2b8ce0b 100644
--- a/vcl/generic/glyphs/scrptrun.h
+++ b/vcl/generic/glyphs/scrptrun.h
@@ -65,7 +65,7 @@ struct ParenStackEntry
}
};
-class ScriptRun : public UObject {
+class ScriptRun : public icu::UObject {
public:
ScriptRun();
diff --git a/opencl/source/openclconfig.cxx b/opencl/source/openclconfig.cxx
index 688dab1..aa1f913 100644
--- a/opencl/source/openclconfig.cxx
+++ b/opencl/source/openclconfig.cxx
@@ -121,7 +121,7 @@ bool match(const OUString& rPattern, const OUString& rInput)
UErrorCode nIcuError(U_ZERO_ERROR);
icu::UnicodeString sIcuPattern(reinterpret_cast<const UChar*>(rPattern.getStr()), rPattern.getLength());
icu::UnicodeString sIcuInput(reinterpret_cast<const UChar*>(rInput.getStr()), rInput.getLength());
- RegexMatcher aMatcher(sIcuPattern, sIcuInput, 0, nIcuError);
+ icu::RegexMatcher aMatcher(sIcuPattern, sIcuInput, 0, nIcuError);
if (U_SUCCESS(nIcuError) && aMatcher.matches(nIcuError) && U_SUCCESS(nIcuError))
return true;
diff --git a/lotuswordpro/source/filter/localtime.cxx b/lotuswordpro/source/filter/localtime.cxx
index f8af7e6..73903c8 100644
--- a/lotuswordpro/source/filter/localtime.cxx
+++ b/lotuswordpro/source/filter/localtime.cxx
@@ -176,7 +176,7 @@ bool LtgLocalTime(long rtime,LtTm& rtm)
if ((rtime > 3 * DAY_SEC)&&(rtime < LONG_MAX - 3 * DAY_SEC))
{
- TimeZone* pLocalZone = TimeZone::createDefault();
+ icu::TimeZone* pLocalZone = icu::TimeZone::createDefault();
long offset = (pLocalZone->getRawOffset())/1000;
delete pLocalZone;
long ltime = rtime + offset;
--
2.14.3

View File

@@ -0,0 +1,70 @@
From 42cebff14f7d486c20f04863681cc5ef4602f4eb Mon Sep 17 00:00:00 2001
From: Rene Engelhard <rene@debian.org>
Date: Tue, 24 Apr 2018 15:56:23 +0200
Subject: [PATCH] fix build with poppler 0.64
GooString became const...
Upstream-Status: Backport
Change-Id: Icc95be2e8603a4e22c6a9ac2008986bacd0bfba5
---
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 10 ++++++++++
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index b7c47d8..6a40bcc 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -453,6 +453,9 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, GfxState* state )
FontAttributes aNewFont;
int nSize = 0;
+#if POPPLER_CHECK_VERSION(0, 64, 0)
+ const
+#endif
GooString* pFamily = gfxFont->getName();
if( pFamily )
{
@@ -750,6 +753,9 @@ void PDFOutDev::updateFont(GfxState *state)
FontAttributes aFont;
int nEmbedSize=0;
+#if POPPLER_CHECK_VERSION(0, 64, 0)
+ const
+#endif
Ref* pID = gfxFont->getID();
// TODO(Q3): Portability problem
long long fontID = (long long)pID->gen << 32 | (long long)pID->num;
@@ -929,7 +935,11 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y,
printf( "\n" );
}
+#if POPPLER_CHECK_VERSION(0, 64, 0)
+void PDFOutDev::drawString(GfxState*, const GooString* /*s*/)
+#else
void PDFOutDev::drawString(GfxState*, GooString* /*s*/)
+#endif
{
// TODO(F3): NYI
}
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
index b5dd4e4..2f59bf2 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
@@ -237,7 +237,11 @@ namespace pdfi
double dx, double dy,
double originX, double originY,
CharCode code, int nBytes, Unicode *u, int uLen) SAL_OVERRIDE;
+#if POPPLER_CHECK_VERSION(0, 64, 0)
+ virtual void drawString(GfxState *state, const GooString *s) SAL_OVERRIDE;
+#else
virtual void drawString(GfxState *state, GooString *s) SAL_OVERRIDE;
+#endif
virtual void endTextObject(GfxState *state) SAL_OVERRIDE;
//----- image drawing
--
2.14.3

View File

@@ -0,0 +1,60 @@
From a6a65ecdef3a577b537b5d9fccb9d41e585b9f14 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Tue, 19 Jan 2016 10:58:44 +0100
Subject: [PATCH] Make virtual ~ScValidationDlg non-inline
...otherwise, GCC 6 would aggressively inline ScValidationDlg destruction of the
VclPtr<ScValidationDlg> in ScValidityRefChildWin::ScValidityRefChildWin
(sc/source/ui/view/reffact.cxx, in sc library), checking whether the vtable
points at ~ScValidationDlg (instead of a derived class dtor) to directly inline
the ~ScValidationDlg code, which requires the ScValidateionDlg vtable (to store
it in the object's vtable during destruction), which requires the code of inline
virtual ScValidationDlg::dispose and ScValidationDlg::Close, which in turn need
the addresses of (non-inline) ScValidationDlg::RemoveRefDlg and
ScTPValidationValue::RemoveRefDlg, both defined in the scui library and not
exported from there.
Change-Id: I7eb96f42deb5edd844d91e999aa5511679302c01
(cherry picked from commit 8d1a24dae03690b576310e3539369916f31ac475)
Reviewed-on: https://gerrit.libreoffice.org/21637
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Upstream-Status: Backported
---
sc/source/ui/dbgui/validate.cxx | 5 +++++
sc/source/ui/inc/validate.hxx | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 459c5d731fc7..db7301280b1e 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -96,6 +96,11 @@ ScValidationDlg::ScValidationDlg(vcl::Window* pParent, const SfxItemSet* pArgSet
get(m_pHBox, "refinputbox");
}
+ScValidationDlg::~ScValidationDlg()
+{
+ disposeOnce();
+}
+
void ScTPValidationValue::SetReferenceHdl( const ScRange&rRange , ScDocument* pDoc )
{
if ( rRange.aStart != rRange.aEnd )
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index d39b99b12bac..1e785b7942de 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -182,7 +182,7 @@ class ScValidationDlg
public:
explicit ScValidationDlg( vcl::Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = NULL );
- virtual ~ScValidationDlg() { disposeOnce(); }
+ virtual ~ScValidationDlg();
virtual void dispose() SAL_OVERRIDE
{
if( m_bOwnRefHdlr )
--
2.14.4

View File

@@ -13,6 +13,8 @@ SRC_URI += " \
file://0007-Package.mk-workaround-icu-missing-error-for-without-.patch \
file://0008-configure.ac-avoid-finding-calling-pg_config.patch \
file://0009-avoid-downloading-by-git-submodules.patch \
file://0010-Fix-build-with-poppler-0.62.0.patch \
file://0011-pdfioutdev_gpl-Fix-build-with-poppler-0.70.0.patch \
"
SRC_URI[translations.md5sum] = "644f33f2bc84fe9ffd8a4c09b41a36fc"
@@ -70,6 +72,7 @@ DEPENDS += " \
hyphen \
graphite2 \
liblangtag \
lpsolve \
"
# necessary to let the call for python-config succeed
@@ -149,6 +152,7 @@ EXTRA_OECONF += " \
--with-system-altlinuxhyph \
--with-system-graphite \
--with-system-liblangtag \
--with-system-lpsolve \
"
PACKAGECONFIG ??= " \
@@ -162,7 +166,7 @@ PACKAGECONFIG[gtk3] = "--enable-gtk3 , --disable-gtk3, gtk+3 cairo"
PACKAGECONFIG[avahi] = "--enable-avahi, --disable-avahi, avahi"
PACKAGECONFIG[odk] = "--enable-odk, --disable-odk"
PACKAGECONFIG[mariadb] = "--enable-ext-mariadb-connector --enable-bundle-mariadb --with-system-mariadb, --disable-ext-mariadb-connector --disable-bundle-mariadb, mariadb"
PACKAGECONFIG[mariadb] = "--enable-ext-mariadb-connector --with-system-mariadb, --disable-ext-mariadb-connector, mariadb"
PACKAGECONFIG[postgresql] = "--enable-postgresql-sdbc --with-system-postgresql, --disable-postgresql-sdbc, postgresql"
do_configure() {
@@ -229,7 +233,6 @@ LO_LANGUAGE_FILES = " \
${libdir}/libreoffice/program/resource/*%{1}.res \
${libdir}/libreoffice/share/config/soffice.cfg/modules/*/ui/res/%{1}.zip \
${libdir}/libreoffice/share/config/soffice.cfg/*/ui/res/%{1}.zip \
${libdir}/libreoffice/share/template/%{1} \
${libdir}/libreoffice/share/registry/Langpack-%{1}.xcd \
${libdir}/libreoffice/share/registry/res/registry_%{1}.xcd \
${libdir}/libreoffice/share/registry/res/fcfg_langpack_%{1}.xcd \

View File

@@ -15,6 +15,9 @@ SRC_URI += " \
file://0003-upgrade-to-ICU-58.patch \
file://0004-remove-dictmgr.hxx-to-be-compatible-with-later-hunsp.patch \
file://0005-packedpixeliterator.hxx-fix-typo-detected-by-gcc7.patch \
file://0006-Fix-build-with-recent-icu.patch \
file://0007-fix-build-with-poppler-0.64.patch \
file://0008-Make-virtual-ScValidationDlg-non-inline.patch \
"
SRCREV_unoconv = "260b815bf2c57118df439f381974f3f0987222a1"

View File

@@ -0,0 +1,50 @@
From c317f7f33ecc275f4e39dae1dcdfc444b99b1d9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Sun, 18 Mar 2018 17:06:55 +0100
Subject: [PATCH] Fix build with poppler >= 0.62.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
see [1] for further details
[1] https://bugs.freedesktop.org/attachment.cgi?id=135409
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index b7c47d8..e505a43 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -34,7 +34,10 @@
// sigh, UTF8.h was removed in poppler-0.21.0 and put back in 0.21.1
// FIXME: we can't use #if POPPLER_CHECK_VERSION(0, 21, 0) && !POPPLER_CHECK_VERSION(0, 21, 1)
// because the internal poppler does not provide poppler-version.h and the macro always returns 0
-#if POPPLER_CHECK_VERSION(0, 21, 1)
+// Maybe change cam in earlier but meta-oe is going to jump to 0.62.0
+#if POPPLER_CHECK_VERSION(0, 62, 0)
+#include "UnicodeMapFuncs.h"
+#elif POPPLER_CHECK_VERSION(0, 21, 1)
#include "UTF8.h"
#elif POPPLER_CHECK_VERSION(0, 21, 0)
#include "UTF.h"
@@ -916,7 +919,11 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y,
);
// silence spurious warning
+#if POPPLER_CHECK_VERSION(0, 62, 0)
+ (void)&mapUTF16;
+#else
(void)&mapUCS2;
+#endif
char buf[9];
for( int i=0; i<uLen; ++i )
--
2.14.3

View File

@@ -0,0 +1,51 @@
From 448e8dc3c47db0219f6d72ca61b00d6df711932f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Thu, 25 Oct 2018 22:36:43 +0200
Subject: [PATCH] pdfioutdev_gpl: Fix build with poppler >= 0.70.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 4 ++++
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 4590d65..34d73bc 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -603,7 +603,11 @@ void PDFOutDev::restoreState(GfxState*)
printf( "restoreState\n" );
}
+#if POPPLER_CHECK_VERSION(0, 70, 0)
+void PDFOutDev::setDefaultCTM(const double *pMat)
+#else
void PDFOutDev::setDefaultCTM(double *pMat)
+#endif
{
assert(pMat);
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
index 2f59bf2..b6d97bb 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
@@ -179,7 +179,11 @@ namespace pdfi
//----- initialization and control
// Set default transform matrix.
+#if POPPLER_CHECK_VERSION(0, 70, 0)
+ virtual void setDefaultCTM(const double *ctm) SAL_OVERRIDE;
+#else
virtual void setDefaultCTM(double *ctm) SAL_OVERRIDE;
+#endif
// Start a page.
virtual void startPage(int pageNum, GfxState *state
--
2.14.4

View File

@@ -1,27 +0,0 @@
SUMMARY = "C++ mathematics library for graphics programming"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://copying.txt;md5=4431606d144252143c9c3df384a74cad"
inherit cmake
SRC_URI = "git://github.com/g-truc/glm.git"
# 0.9.8.3 tag
SRCREV = "6a1e2ec5d5e79e6d869c947cbdbcbb297bdf9d32"
S = "${WORKDIR}/git"
do_configure() {
# for some reason simple tailored configure runs best
mkdir -p ${B}
cd ${B}
# -DCMAKE_INSTALL_LIBDIR:PATH=${libdir} causes configur break with
# | CMake Error: Could not open file for write in copy operation /usr/lib/cmake/glm/glmConfig.cmake.tmp
# | CMake Error: : System Error: No such file or directory
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
-DCMAKE_INSTALL_INCLUDEDIR:PATH=${includedir} \
${OECMAKE_SOURCEPATH}
}
FILES_${PN}-dev += "${libdir}/cmake"
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,38 @@
From c780138f9e56499d0cfd5954506fc665e42e7e3e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Fri, 26 Oct 2018 22:57:36 +0200
Subject: [PATCH] Fix build with boost >= 1.68.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Submitted [1]
[1] https://github.com/tdf/libcmis/pull/21
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
src/libcmis/xml-utils.cxx | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/libcmis/xml-utils.cxx b/src/libcmis/xml-utils.cxx
index e72567a..9620a26 100644
--- a/src/libcmis/xml-utils.cxx
+++ b/src/libcmis/xml-utils.cxx
@@ -30,7 +30,13 @@
#include <sstream>
#include <stdlib.h>
+#include <boost/version.hpp>
+
+#if BOOST_VERSION >= 106800
+#include <boost/uuid/detail/sha1.hpp>
+#else
#include <boost/uuid/sha1.hpp>
+#endif
#include <curl/curl.h>
#include "xml-utils.hxx"
--
2.14.4

View File

@@ -13,6 +13,7 @@ SRC_URI = " \
file://0002-drop-prefix.patch \
file://0003-do-not-reinvent-the-wheel.patch \
file://0004-fix-build-error-with-gcc-std-c-98.patch \
file://0005-Fix-build-with-boost-1.68.0.patch \
"
SRC_URI[md5sum] = "3270154f0f40d86fce849b161f914101"

View File

@@ -1,40 +0,0 @@
From f82fc1451c10d93be031e18935e5ea7589e3f602 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Sun, 31 Jul 2016 16:09:00 +0200
Subject: [PATCH] move _lt_tag_filter_t after neum to fix build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
liblangtag/lt-tag.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/liblangtag/lt-tag.h b/liblangtag/lt-tag.h
index 939acf5..2cc3028 100644
--- a/liblangtag/lt-tag.h
+++ b/liblangtag/lt-tag.h
@@ -53,8 +53,6 @@ typedef struct _lt_tag_t lt_tag_t;
* This is used as a binary count sequence with lt_tag_get_string_with_filter()
* to allow only given tags to be the outcome.
*/
-typedef enum _lt_tag_filter_t lt_tag_filter_t;
-
enum _lt_tag_filter_t {
LT_TAG_FILTER_NONE = 0,
LT_TAG_FILTER_LANGUAGE = 1 << 0,
@@ -68,6 +66,8 @@ enum _lt_tag_filter_t {
LT_TAG_FILTER_ALL = -1
};
+typedef enum _lt_tag_filter_t lt_tag_filter_t;
+
lt_tag_t *lt_tag_new (void);
lt_tag_t *lt_tag_ref (lt_tag_t *tag);
void lt_tag_unref (lt_tag_t *tag);
--
2.5.5

View File

@@ -11,19 +11,11 @@ SRC_URI = " \
https://bitbucket.org/tagoh/${BPN}/downloads/${BPN}-${PV}.tar.bz2 \
file://0001-configure.ac-add-missing-HAVE_INTROSPECTION-check.patch \
file://0002-configure.ac-remove-untranslated-AX_CHECK_ENABLE_DEB.patch \
file://0003-move-_lt_tag_filter_t-after-neum-to-fix-build.patch \
"
SRC_URI[md5sum] = "dcd7a845a8a9b57ca96eb04a29083246"
SRC_URI[sha256sum] = "df84efd7e3e67cc8a38ece1e23f080c70ea29b26590ee324d03f1df37bf46576"
SRC_URI[md5sum] = "284f120247323a35122ab32b4b359c45"
SRC_URI[sha256sum] = "d6242790324f1432fb0a6fae71b6851f520b2c5a87675497cf8ea14c2924d52e"
inherit autotools pkgconfig
# broken
EXTRA_OECONF += "--disable-introspection"
# Even though introspection is disabled , gobject-introspection package is still
# needed for m4 macros.
DEPENDS += "gobject-introspection"
inherit autotools pkgconfig gobject-introspection
do_configure_prepend() {
if ! grep -q ${HOST_SYS}-libtool ${S}/configure.ac; then
@@ -32,4 +24,6 @@ do_configure_prepend() {
fi
}
export GIR_EXTRA_LIBS_PATH="${B}/liblangtag/.libs"
BBCLASSEXTEND = "native"

View File

@@ -0,0 +1,58 @@
From 090c85c00f9985f67000cf4d6a9544ce4c30ca43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Mon, 2 Jul 2018 14:18:37 +0200
Subject: [PATCH] Fix build with gcc8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
src/lib/RVNGHTMLTextTableStyle.cpp | 2 +-
src/lib/RVNGHTMLTextTextStyle.cpp | 2 +-
src/lib/RVNGZipStream.cpp | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lib/RVNGHTMLTextTableStyle.cpp b/src/lib/RVNGHTMLTextTableStyle.cpp
index 719ec6a..cca62c8 100644
--- a/src/lib/RVNGHTMLTextTableStyle.cpp
+++ b/src/lib/RVNGHTMLTextTableStyle.cpp
@@ -169,7 +169,7 @@ std::string RVNGHTMLTextTableStyleManager::getCellContent(RVNGPropertyList const
if (pList["fo:background-color"])
s << "\tbackground-color:" << pList["fo:background-color"]->getStr().cstr() << ";\n";
- static char const *(type[]) = {"border", "border-left", "border-top", "border-right", "border-bottom" };
+ static char const *type[] = {"border", "border-left", "border-top", "border-right", "border-bottom" };
for (int i = 0; i < 5; i++)
{
std::string field("fo:");
diff --git a/src/lib/RVNGHTMLTextTextStyle.cpp b/src/lib/RVNGHTMLTextTextStyle.cpp
index 5dc7d62..1622572 100644
--- a/src/lib/RVNGHTMLTextTextStyle.cpp
+++ b/src/lib/RVNGHTMLTextTextStyle.cpp
@@ -281,7 +281,7 @@ std::string RVNGHTMLTextParagraphStyleManager::getContent(RVNGPropertyList const
void RVNGHTMLTextParagraphStyleManager::parseBorders(RVNGPropertyList const &pList, std::ostream &out) const
{
- static char const *(type[]) = {"border", "border-left", "border-top", "border-right", "border-bottom" };
+ static char const *type[] = {"border", "border-left", "border-top", "border-right", "border-bottom" };
for (int i = 0; i < 5; i++)
{
std::string field("fo:");
diff --git a/src/lib/RVNGZipStream.cpp b/src/lib/RVNGZipStream.cpp
index b15eac5..42be5eb 100644
--- a/src/lib/RVNGZipStream.cpp
+++ b/src/lib/RVNGZipStream.cpp
@@ -478,6 +478,7 @@ RVNGInputStream *RVNGZipStream::getSubstream(RVNGInputStream *input, const char
// TODO: return partial result on Z_BUF_ERROR/Z_DATA_ERROR?
default:
data.clear();
+ __attribute__((fallthrough));
// fall-through intended
case Z_STREAM_END:
done = true;
--
2.14.4

View File

@@ -5,9 +5,12 @@ LIC_FILES_CHKSUM = " \
file://COPYING.MPL;md5=815ca599c9df247a0c7f619bab123dad \
"
SRC_URI = "http://dev-www.libreoffice.org/src/${BPN}-${PV}.tar.bz2"
SRC_URI[md5sum] = "2d4183bf17aea1a71842468a71a68c47"
SRC_URI[sha256sum] = "dedd6fe1f643fc2f254f2ad3719547084bd86bcc482104b995caf3b828368b18"
SRC_URI = " \
http://dev-www.libreoffice.org/src/${BPN}-${PV}.tar.bz2 \
file://0001-Fix-build-with-gcc8.patch \
"
SRC_URI[md5sum] = "5b9ac52ec77d4d19157cf5962ebc0aea"
SRC_URI[sha256sum] = "c51601cd08320b75702812c64aae0653409164da7825fd0f451ac2c5dbe77cbf"
inherit autotools pkgconfig

View File

@@ -0,0 +1,130 @@
From f7506e802901dc7cbd9d91be60576e4f60da1e45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Wed, 31 Oct 2018 22:59:02 +0100
Subject: [PATCH] Align compile
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Parts taken from [1]
[1] https://src.fedoraproject.org/cgit/rpms/lpsolve.git/tree/lpsolve-5.5.0.11.cflags.patch
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
lp_solve/ccc | 37 ++-----------------------------------
lpsolve55/ccc | 47 ++++-------------------------------------------
2 files changed, 6 insertions(+), 78 deletions(-)
diff --git a/lp_solve/ccc b/lp_solve/ccc
index 35b89fb..051a8e6 100644
--- a/lp_solve/ccc
+++ b/lp_solve/ccc
@@ -1,41 +1,8 @@
:
src='../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c lp_solve.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
-c=cc
-#determine platform (32/64 bit)
->/tmp/platform.c
-echo '#include <stdlib.h>'>>/tmp/platform.c
-echo '#include <stdio.h>'>>/tmp/platform.c
-echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
-$c /tmp/platform.c -o /tmp/platform
-PLATFORM=`/tmp/platform`
-rm /tmp/platform /tmp/platform.c >/dev/null 2>&1
-
-mkdir bin bin/$PLATFORM >/dev/null 2>&1
+mkdir bin >/dev/null 2>&1
math=-lm
-#check if this system has the isnan function
->/tmp/isnan.c
-echo '#include <stdio.h>'>>/tmp/isnan.c
-echo '#include <stdlib.h>'>>/tmp/isnan.c
-echo '#include <math.h>'>>/tmp/isnan.c
-echo 'main(){isnan(0);}'>>/tmp/isnan.c
-$c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1
-if [ $? = 0 ]
-then NOISNAN=
-else NOISNAN=-DNOISNAN
-fi
-rm /tmp/isnan.c /tmp/isnan >/dev/null 2>&1
-
-opts='-O3'
-
-def=
-if [ "$PLATFORM" = "SCO_UNIX" ]
-then opts='-O0'
- def='-dy -K PIC -DLLONG=long'
- dl=-ldl
-else dl=-ldl
-fi
-
-$c -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I../shared $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src -o bin/$PLATFORM/lp_solve $math $dl
+$CC $CFLAGS $LDFLAGS -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I../shared -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src -o bin/lp_solve $math -ldl
diff --git a/lpsolve55/ccc b/lpsolve55/ccc
index 4afb1bf..995b0d9 100644
--- a/lpsolve55/ccc
+++ b/lpsolve55/ccc
@@ -1,50 +1,11 @@
:
src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
-c=cc
-#determine platform (32/64 bit)
->/tmp/platform.c
-echo '#include <stdlib.h>'>>/tmp/platform.c
-echo '#include <stdio.h>'>>/tmp/platform.c
-echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
-$c /tmp/platform.c -o /tmp/platform
-PLATFORM=`/tmp/platform`
-rm /tmp/platform /tmp/platform.c >/dev/null 2>&1
+mkdir bin >/dev/null 2>&1
-mkdir bin bin/$PLATFORM >/dev/null 2>&1
+$CC $CFLAGS -fPIC -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
-#check if this system has the isnan function
->/tmp/isnan.c
-echo '#include <stdio.h>'>>/tmp/isnan.c
-echo '#include <stdlib.h>'>>/tmp/isnan.c
-echo '#include <math.h>'>>/tmp/isnan.c
-echo 'main(){isnan(0);}'>>/tmp/isnan.c
-$c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1
-if [ $? = 0 ]
-then NOISNAN=
-else NOISNAN=-DNOISNAN
-fi
-rm /tmp/isnan.c /tmp/isnan >/dev/null 2>&1
-
-def=
-so=
-if [ "$PLATFORM" = "SCO_UNIX" ]
-then def='-dy -K PIC -DNOLONGLONG'
- dl=-lc
-else dl=-ldl
- so=y
-fi
-
-opts='-O3'
-
-$c -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
-ar rv bin/$PLATFORM/liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'`
-ranlib bin/$PLATFORM/liblpsolve55.a
-
-if [ "$so" != "" ]
-then
- $c -fpic -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
- $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o bin/$PLATFORM/liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm -ldl
-fi
+$CC $CFLAGS fPIC -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src
+$CC $LDFLAGS -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o bin/$PLATFORM/liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm -ldl
rm *.o 2>/dev/null
--
2.14.4

View File

@@ -0,0 +1,34 @@
SUMMARY = "A Mixed Integer Linear Programming (MILP) solver"
HOMEPAGE = "http://lpsolve.sourceforge.net/5.5/"
LICENSE = "LGPL2.1"
LIC_FILES_CHKSUM = "file://README.txt;start_line=6;end_line=7;md5=883769a4ee3f3c1843e536ab0fabb3b2"
SRC_URI = " \
http://downloads.sourceforge.net/project/${BPN}/${BPN}/${PV}/lp_solve_${PV}_source.tar.gz \
file://0001-Align-compile.patch \
"
SRC_URI[md5sum] = "3be57261fc41dd8e210f54017220d5f7"
SRC_URI[sha256sum] = "201a7c62b8b3360c884ee2a73ed7667e5716fc1e809755053b398c2f5b0cf28a"
S = "${WORKDIR}/lp_solve_5.5"
do_compile() {
cd lpsolve55
sh -x ccc
cd ../lp_solve
sh -x ccc
}
do_install() {
install -d ${D}${bindir}
install -m 755 lp_solve/bin/lp_solve ${D}${bindir}
install -d ${D}${libdir}
install -m 644 lpsolve55/bin/liblpsolve55.so ${D}/${libdir}
install -d ${D}${includedir}/lpsolve
install -m 644 lp*.h ${D}${includedir}/lpsolve
}
FILES_SOLIBSDEV = ""
FILES_${PN} += "${libdir}/liblpsolve55.so"