diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | download.lst | 4 | ||||
-rw-r--r-- | external/libmwaw/0001-fix-build-with-msvc.patch.1 | 148 | ||||
-rw-r--r-- | external/libmwaw/Library_mwaw.mk | 2 |
4 files changed, 105 insertions, 51 deletions
diff --git a/configure.ac b/configure.ac index 4696ebfc8319..194cbb1e3d18 100644 --- a/configure.ac +++ b/configure.ac @@ -7868,7 +7868,7 @@ libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1]) libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1]) libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1]) -libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.8]) +libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.9]) libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1]) libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.5]) diff --git a/download.lst b/download.lst index a881466d2a91..08bace60c7cc 100644 --- a/download.lst +++ b/download.lst @@ -104,8 +104,8 @@ export MDNSRESPONDER_MD5SUM := 940057ac8b513b00e8e9ca12ef796762 export MDNSRESPONDER_TARBALL := mDNSResponder-576.30.4.tar.gz export MSPUB_MD5SUM := ff9d0f9dd8fbc523408ea1953d5bde41 export MSPUB_TARBALL := libmspub-0.1.2.tar.bz2 -export MWAW_MD5SUM := 72ad446d76b157e30c1baf39bb288b99 -export MWAW_VERSION_MICRO := 8 +export MWAW_MD5SUM := d8532ad5630d3f3b2189a7ec5639151b +export MWAW_VERSION_MICRO := 9 export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.bz2 export MYSQLCPPCONN_TARBALL := 7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz diff --git a/external/libmwaw/0001-fix-build-with-msvc.patch.1 b/external/libmwaw/0001-fix-build-with-msvc.patch.1 index 95b5e0cbeb0b..ab6035811ce5 100644 --- a/external/libmwaw/0001-fix-build-with-msvc.patch.1 +++ b/external/libmwaw/0001-fix-build-with-msvc.patch.1 @@ -1,54 +1,106 @@ -From 01495bf788fe32723f222599e34ba1779ca3d594 Mon Sep 17 00:00:00 2001 +From ae8f006018f6cfc79b86f327116f6ceed71692f9 Mon Sep 17 00:00:00 2001 From: David Tardon <dtardon@redhat.com> -Date: Fri, 24 Jun 2016 14:01:14 +0200 -Subject: [PATCH] fix build with msvc +Date: Wed, 23 Nov 2016 09:06:35 +0100 +Subject: [PATCH] fix build with MSVC --- - src/lib/CricketDrawParser.cxx | 4 ++-- - src/lib/FreeHandParser.cxx | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) + src/lib/PowerPoint3Parser.cxx | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) -diff --git a/src/lib/CricketDrawParser.cxx b/src/lib/CricketDrawParser.cxx -index f04be91..9fe5a32 100644 ---- a/src/lib/CricketDrawParser.cxx -+++ b/src/lib/CricketDrawParser.cxx -@@ -930,12 +930,12 @@ bool CricketDrawParser::readShape() - MWAWBox2f box(shape.m_vertices[0], shape.m_vertices[2]); - int angle[2] = { shape.m_angles[0], shape.m_angles[1] }; - if (box.min()[1]>box.max()[1]) { -- std::swap<float>(box.min()[1],box.max()[1]); -+ std::swap(box.min()[1],box.max()[1]); - angle[0]=180-shape.m_angles[1]; - angle[1]=180-shape.m_angles[0]; - } - if (angle[1]<=angle[0]) -- std::swap<int>(angle[0],angle[1]); -+ std::swap(angle[0],angle[1]); - if (angle[1]>360) { - int numLoop=int(angle[1]/360)-1; - angle[0]-=numLoop*360; -diff --git a/src/lib/FreeHandParser.cxx b/src/lib/FreeHandParser.cxx -index 78d8b08..e97e6e3 100644 ---- a/src/lib/FreeHandParser.cxx -+++ b/src/lib/FreeHandParser.cxx -@@ -999,7 +999,7 @@ bool FreeHandParser::checkHeader(MWAWHeader *header, bool strict) - getPageSpan().setFormOrientation(MWAWPageSpan::LANDSCAPE); - for (int j=0; j<4; ++j) { - if (j==1) continue; -- std::swap<float>(dim[2*j],dim[2*j+1]); -+ std::swap(dim[2*j],dim[2*j+1]); - } - val &= 0xFFDF; - } -@@ -1016,7 +1016,7 @@ bool FreeHandParser::checkHeader(MWAWHeader *header, bool strict) - f << "landscape,"; - getPageSpan().setFormOrientation(MWAWPageSpan::LANDSCAPE); - for (int j=0; j<4; ++j) -- std::swap<float>(dim[2*j],dim[2*j+1]); -+ std::swap(dim[2*j],dim[2*j+1]); - } - if (val&2) f << "crop[mark],"; - if (val&4) f << "center[mark],"; +diff --git a/src/lib/PowerPoint3Parser.cxx b/src/lib/PowerPoint3Parser.cxx +index 9ecbe1b..51348d6 100644 +--- a/src/lib/PowerPoint3Parser.cxx ++++ b/src/lib/PowerPoint3Parser.cxx +@@ -1076,15 +1076,15 @@ bool PowerPoint3Parser::readDocInfo(MWAWEntry const &entry) + f << "],"; + for (int i=0; i<4; ++i) dim[i]=int(input->readLong(2)); + if (!m_state->m_isMacFile) { +- std::swap<int>(dim[0],dim[1]); +- std::swap<int>(dim[2],dim[3]); ++ std::swap(dim[0],dim[1]); ++ std::swap(dim[2],dim[3]); + } + MWAWBox2i pageBox(MWAWVec2i(dim[1],dim[0]),MWAWVec2i(dim[3],dim[2])); + f << "dim[page]=" << pageBox << ","; + for (int i=0; i<4; ++i) dim[i]=int(input->readLong(2)); + if (!m_state->m_isMacFile) { +- std::swap<int>(dim[0],dim[1]); +- std::swap<int>(dim[2],dim[3]); ++ std::swap(dim[0],dim[1]); ++ std::swap(dim[2],dim[3]); + } + MWAWBox2i paperBox=MWAWBox2i(MWAWVec2i(dim[0],dim[1]),MWAWVec2i(dim[2],dim[3])); + f << "dim[paper]=" << paperBox << ","; +@@ -1673,16 +1673,16 @@ bool PowerPoint3Parser::readSlideFormats(MWAWEntry const &entry, std::vector<Pow + if (val) f << "id=" << std::hex << val << std::dec << ","; + int dim[2]; + for (int j=0; j<2; ++j) dim[j]=int(input->readLong(2)); +- if (!isMacFile) std::swap<int>(dim[0],dim[1]); ++ if (!isMacFile) std::swap(dim[0],dim[1]); + f << "dim0=" << MWAWVec2i(dim[1], dim[0]) << ","; + format.m_gradientOffset=int(input->readLong(2)); + if (format.m_gradientOffset) f << "grad[col,offset]=" << format.m_gradientOffset << ","; + for (int j=0; j<2; ++j) dim[j]=int(input->readLong(2)); +- if (!isMacFile) std::swap<int>(dim[0],dim[1]); ++ if (!isMacFile) std::swap(dim[0],dim[1]); + format.m_margins=MWAWVec2i(dim[1], dim[0]); + f << "box[margins]=" << format.m_margins << ","; + for (int j=0; j<2; ++j) dim[j]=int(input->readLong(2)); +- if (!isMacFile) std::swap<int>(dim[0],dim[1]); ++ if (!isMacFile) std::swap(dim[0],dim[1]); + format.m_shadowOffset=MWAWVec2i(dim[1], dim[0]); + if (format.m_shadowOffset!=MWAWVec2i(0,0)) + f << "shadow[offset]=" << format.m_shadowOffset << ","; +@@ -1727,15 +1727,15 @@ bool PowerPoint3Parser::readSlidePolygons(MWAWEntry const &entry, std::vector<Po + int dim[4]; + for (int i=0; i<4; ++i) dim[i]=int(input->readLong(2)); + if (!isMacFile) { +- std::swap<int>(dim[0],dim[1]); +- std::swap<int>(dim[2],dim[3]); ++ std::swap(dim[0],dim[1]); ++ std::swap(dim[2],dim[3]); + } + poly.m_box=MWAWBox2i(MWAWVec2i(dim[1],dim[0]), MWAWVec2i(dim[3],dim[2])); + f << "box=" << poly.m_box << ","; + f << "pts=["; + for (int pt=0; pt<N; ++pt) { + for (int i=0; i<2; ++i) dim[i]=int(input->readLong(2)); +- if (!isMacFile) std::swap<int>(dim[0],dim[1]); ++ if (!isMacFile) std::swap(dim[0],dim[1]); + poly.m_vertices.push_back(MWAWVec2f(float(dim[1])/8.f, float(dim[0])/8.f)); + f << poly.m_vertices.back() << ","; + } +@@ -1918,8 +1918,8 @@ bool PowerPoint3Parser::readFramesList(MWAWEntry const &entry, PowerPoint3Parser + int dim[4]; + for (int d=0; d<4; ++d) dim[d]=int(input->readLong(2)); + if (!isMacFile) { +- std::swap<int>(dim[0],dim[1]); +- std::swap<int>(dim[2],dim[3]); ++ std::swap(dim[0],dim[1]); ++ std::swap(dim[2],dim[3]); + } + frame.m_dimension=MWAWBox2i(MWAWVec2i(dim[1],dim[0]), MWAWVec2i(dim[3],dim[2])); + f << "dim=" << frame.m_dimension << ","; +@@ -2233,8 +2233,8 @@ bool PowerPoint3Parser::readTextZone(MWAWEntry const &entry, PowerPoint3ParserIn + int dim[4]; + for (int i=0; i<4; ++i) dim[i]=int(input->readLong(2)); + if (!isMacFile) { +- std::swap<int>(dim[0],dim[1]); +- std::swap<int>(dim[2],dim[3]); ++ std::swap(dim[0],dim[1]); ++ std::swap(dim[2],dim[3]); + } + tZone.m_box=MWAWBox2i(MWAWVec2i(dim[1],dim[0]),MWAWVec2i(dim[3],dim[2])); + f << "dim=" << tZone.m_box << ","; +@@ -3544,7 +3544,7 @@ bool PowerPoint3Parser::sendFrame(PowerPoint3ParserInternal::Frame const &frame, + case 3: { + float angle[2] = { frame.m_angles[0], frame.m_angles[0]+frame.m_angles[1] }; + if (angle[1]<angle[0]) +- std::swap<float>(angle[0],angle[1]); ++ std::swap(angle[0],angle[1]); + if (angle[1]>360) { + int numLoop=int(angle[1]/360)-1; + angle[0]-=float(numLoop*360); -- -2.7.4 +2.9.3 diff --git a/external/libmwaw/Library_mwaw.mk b/external/libmwaw/Library_mwaw.mk index c28fe0117c2f..f003626ec20f 100644 --- a/external/libmwaw/Library_mwaw.mk +++ b/external/libmwaw/Library_mwaw.mk @@ -161,6 +161,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,mwaw,\ UnpackedTarball/libmwaw/src/lib/NisusWrtStruct \ UnpackedTarball/libmwaw/src/lib/NisusWrtText \ UnpackedTarball/libmwaw/src/lib/PixelPaintParser \ + UnpackedTarball/libmwaw/src/lib/PowerPoint1Parser \ + UnpackedTarball/libmwaw/src/lib/PowerPoint3Parser \ UnpackedTarball/libmwaw/src/lib/RagTime5Chart \ UnpackedTarball/libmwaw/src/lib/RagTime5ClusterManager \ UnpackedTarball/libmwaw/src/lib/RagTime5Graph \ |