diff options
author | David Tardon <dtardon@redhat.com> | 2015-05-16 15:13:12 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2015-05-17 09:02:08 +0200 |
commit | 89a0763e6de4939bde1bfa149e81c2cdfc24f1de (patch) | |
tree | a9c5fcf68c4ae7d39a6bb7db8e79e92eb234a7c1 /external | |
parent | 1e8d6bb3e64700b0309bbc3331109d08404972e8 (diff) |
upload libmwaw 0.3.5
Change-Id: Ife74524f82190a06775656271965c869da8702a9
Diffstat (limited to 'external')
5 files changed, 11 insertions, 147 deletions
diff --git a/external/libmwaw/0001-ClarisWorks-AppleWorks-spreadsheet-do-not-remove-fir.patch b/external/libmwaw/0001-ClarisWorks-AppleWorks-spreadsheet-do-not-remove-fir.patch deleted file mode 100644 index 0d79446c7910..000000000000 --- a/external/libmwaw/0001-ClarisWorks-AppleWorks-spreadsheet-do-not-remove-fir.patch +++ /dev/null @@ -1,99 +0,0 @@ -From c092ac823e50083c04464565365ddd4af71f8c89 Mon Sep 17 00:00:00 2001 -From: osnola <alonso@loria.fr> -Date: Tue, 6 Jan 2015 15:39:54 +0100 -Subject: [PATCH 1/2] ClarisWorks/AppleWorks[spreadsheet]: do not remove first - empty rows and/or columns in the main spreadsheet + if we remove some first - rows/columns in a embedded spreadsheet, update the cells present in - formula... - ---- - src/lib/ClarisWksDbaseContent.cxx | 29 +++++++++++++++++++++++++++++ - src/lib/ClarisWksDbaseContent.hxx | 3 ++- - src/lib/ClarisWksSpreadsheet.cxx | 5 +++++ - 3 files changed, 36 insertions(+), 1 deletion(-) - -diff --git a/src/lib/ClarisWksDbaseContent.cxx b/src/lib/ClarisWksDbaseContent.cxx -index 7226af1..ea15544 100644 ---- a/src/lib/ClarisWksDbaseContent.cxx -+++ b/src/lib/ClarisWksDbaseContent.cxx -@@ -1393,4 +1393,33 @@ bool ClarisWksDbaseContent::readFormula(Vec2i const &cPos, long endPos, std::vec - - return true; - } -+ -+//////////////////////////////////////////////////////////// -+// -+//////////////////////////////////////////////////////////// -+void ClarisWksDbaseContent::Record::updateFormulaCells(Vec2i const &removeDelta) -+{ -+ if (m_content.m_contentType!=MWAWCellContent::C_FORMULA) -+ return; -+ std::vector<MWAWCellContent::FormulaInstruction> &formula=m_content.m_formula; -+ for (size_t i=0; i<formula.size(); ++i) { -+ MWAWCellContent::FormulaInstruction &instr=formula[i]; -+ int numCell=instr.m_type==MWAWCellContent::FormulaInstruction::F_Cell ? 1 : -+ instr.m_type==MWAWCellContent::FormulaInstruction::F_CellList ? 2 : 0; -+ for (int c=0; c<numCell; ++c) { -+ instr.m_position[c]-=removeDelta; -+ if (instr.m_position[c][0]<0 || instr.m_position[c][1]<0) { -+ static bool first=true; -+ if (first) { -+ MWAW_DEBUG_MSG(("ClarisWksDbaseContent::Record::updateFormulaCells: some cell's positions are bad, remove formula\n")); -+ first=false; -+ // revert to the basic cell type -+ m_content.m_contentType=m_valueType; -+ return; -+ } -+ } -+ } -+ } -+} -+ - // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab: -diff --git a/src/lib/ClarisWksDbaseContent.hxx b/src/lib/ClarisWksDbaseContent.hxx -index 4894d31..8a40b31 100644 ---- a/src/lib/ClarisWksDbaseContent.hxx -+++ b/src/lib/ClarisWksDbaseContent.hxx -@@ -83,7 +83,8 @@ public: - m_content(), m_valueType(MWAWCellContent::C_UNKNOWN), m_hasNaNValue(false), m_backgroundColor(MWAWColor::white()), m_font(3,9), m_borders(0) - { - } -- -+ //! update the formula cell (removing delta to each position) -+ void updateFormulaCells(Vec2i const &removeDelta); - //! the style if known - int m_style; - //! the format -diff --git a/src/lib/ClarisWksSpreadsheet.cxx b/src/lib/ClarisWksSpreadsheet.cxx -index c6b9f3d..60eb293 100644 ---- a/src/lib/ClarisWksSpreadsheet.cxx -+++ b/src/lib/ClarisWksSpreadsheet.cxx -@@ -455,6 +455,8 @@ bool ClarisWksSpreadsheet::sendSpreadsheet(int zId, MWAWListenerPtr listener) - MWAW_DEBUG_MSG(("ClarisWksSpreadsheet::sendSpreadsheet: can not find content\n")); - return false; - } -+ if (m_parserState->m_kind==MWAWDocument::MWAW_K_SPREADSHEET && zId==1) -+ minData=Vec2i(0,0); - std::vector<float> colSize((size_t)(maxData[0]-minData[0]+1),72); - for (int c=minData[0], fC=0; c <= maxData[0]; ++c, ++fC) { - if (c>=0 && c < int(sheet.m_colWidths.size())) -@@ -462,6 +464,7 @@ bool ClarisWksSpreadsheet::sendSpreadsheet(int zId, MWAWListenerPtr listener) - } - sheetListener->openSheet(colSize, librevenge::RVNG_POINT); - MWAWInputStreamPtr &input= m_parserState->m_input; -+ bool recomputeCellPosition=(minData!=Vec2i(0,0)); - for (int r=minData[1], fR=0; r <= maxData[1]; ++r, ++fR) { - if (sheet.m_rowHeightMap.find(r)!=sheet.m_rowHeightMap.end()) - sheetListener->openSheetRow((float)sheet.m_rowHeightMap.find(r)->second, librevenge::RVNG_POINT); -@@ -478,6 +481,8 @@ bool ClarisWksSpreadsheet::sendSpreadsheet(int zId, MWAWListenerPtr listener) - // change the reference date from 1/1/1904 to 1/1/1900 - if (rec.m_format.m_format==MWAWCell::F_DATE && rec.m_content.isValueSet()) - rec.m_content.setValue(rec.m_content.m_value+1460); -+ if (recomputeCellPosition) -+ rec.updateFormulaCells(minData); - if (rec.m_borders) { - int wh=0; - for (int i=0, bit=1; i < 4; ++i, bit*=2) { --- -2.1.0 - diff --git a/external/libmwaw/0002-ClarisWors-AppleWorks-spreadsheet-Oops-correct-of-a-.patch b/external/libmwaw/0002-ClarisWors-AppleWorks-spreadsheet-Oops-correct-of-a-.patch deleted file mode 100644 index 98f07bc0fc5a..000000000000 --- a/external/libmwaw/0002-ClarisWors-AppleWorks-spreadsheet-Oops-correct-of-a-.patch +++ /dev/null @@ -1,31 +0,0 @@ -From bc03e5d29fbf3eb3f58b9f91c7e8c748239721ac Mon Sep 17 00:00:00 2001 -From: osnola <alonso@loria.fr> -Date: Tue, 6 Jan 2015 15:48:18 +0100 -Subject: [PATCH 2/2] ClarisWors/AppleWorks[spreadsheet]: Oops, correct of a - mistake... - ---- - src/lib/ClarisWksDbaseContent.cxx | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/lib/ClarisWksDbaseContent.cxx b/src/lib/ClarisWksDbaseContent.cxx -index ea15544..e175c2e 100644 ---- a/src/lib/ClarisWksDbaseContent.cxx -+++ b/src/lib/ClarisWksDbaseContent.cxx -@@ -1413,10 +1413,10 @@ void ClarisWksDbaseContent::Record::updateFormulaCells(Vec2i const &removeDelta) - if (first) { - MWAW_DEBUG_MSG(("ClarisWksDbaseContent::Record::updateFormulaCells: some cell's positions are bad, remove formula\n")); - first=false; -- // revert to the basic cell type -- m_content.m_contentType=m_valueType; -- return; - } -+ // revert to the basic cell type -+ m_content.m_contentType=m_valueType; -+ return; - } - } - } --- -2.1.0 - diff --git a/external/libmwaw/Library_mwaw.mk b/external/libmwaw/Library_mwaw.mk index 9cab326c8a30..052362a919fb 100644 --- a/external/libmwaw/Library_mwaw.mk +++ b/external/libmwaw/Library_mwaw.mk @@ -40,6 +40,10 @@ $(eval $(call gb_Library_add_generated_exception_objects,mwaw,\ UnpackedTarball/libmwaw/src/lib/BeagleWksSSParser \ UnpackedTarball/libmwaw/src/lib/BeagleWksStructManager \ UnpackedTarball/libmwaw/src/lib/BeagleWksText \ + UnpackedTarball/libmwaw/src/lib/ClarisDrawGraph \ + UnpackedTarball/libmwaw/src/lib/ClarisDrawParser \ + UnpackedTarball/libmwaw/src/lib/ClarisDrawStyleManager \ + UnpackedTarball/libmwaw/src/lib/ClarisDrawText \ UnpackedTarball/libmwaw/src/lib/ClarisWksBMParser \ UnpackedTarball/libmwaw/src/lib/ClarisWksDatabase \ UnpackedTarball/libmwaw/src/lib/ClarisWksDbaseContent \ @@ -113,6 +117,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,mwaw,\ UnpackedTarball/libmwaw/src/lib/MWAWTable \ UnpackedTarball/libmwaw/src/lib/MWAWTextListener \ UnpackedTarball/libmwaw/src/lib/MacDocParser \ + UnpackedTarball/libmwaw/src/lib/MacDraftParser \ UnpackedTarball/libmwaw/src/lib/MacDrawParser \ UnpackedTarball/libmwaw/src/lib/MacDrawProParser \ UnpackedTarball/libmwaw/src/lib/MacDrawProStyleManager \ @@ -145,6 +150,12 @@ $(eval $(call gb_Library_add_generated_exception_objects,mwaw,\ UnpackedTarball/libmwaw/src/lib/NisusWrtParser \ UnpackedTarball/libmwaw/src/lib/NisusWrtStruct \ UnpackedTarball/libmwaw/src/lib/NisusWrtText \ + UnpackedTarball/libmwaw/src/lib/RagTime5ClusterManager \ + UnpackedTarball/libmwaw/src/lib/RagTime5Graph \ + UnpackedTarball/libmwaw/src/lib/RagTime5Parser \ + UnpackedTarball/libmwaw/src/lib/RagTime5Spreadsheet \ + UnpackedTarball/libmwaw/src/lib/RagTime5StructManager \ + UnpackedTarball/libmwaw/src/lib/RagTime5Text \ UnpackedTarball/libmwaw/src/lib/RagTimeParser \ UnpackedTarball/libmwaw/src/lib/RagTimeSpreadsheet \ UnpackedTarball/libmwaw/src/lib/RagTimeStruct \ diff --git a/external/libmwaw/UnpackedTarball_libmwaw.mk b/external/libmwaw/UnpackedTarball_libmwaw.mk index f88842a63c19..b18f32ad5865 100644 --- a/external/libmwaw/UnpackedTarball_libmwaw.mk +++ b/external/libmwaw/UnpackedTarball_libmwaw.mk @@ -13,12 +13,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libmwaw,$(MWAW_TARBALL))) $(eval $(call gb_UnpackedTarball_set_patchlevel,libmwaw,1)) -$(eval $(call gb_UnpackedTarball_add_patches,libmwaw,\ - external/libmwaw/0001-ClarisWorks-AppleWorks-spreadsheet-do-not-remove-fir.patch \ - external/libmwaw/0002-ClarisWors-AppleWorks-spreadsheet-Oops-correct-of-a-.patch \ - external/libmwaw/ubsan.patch.0 \ -)) - ifeq ($(COM_GCC_IS_CLANG),TRUE) ifneq ($(filter -fsanitize=%,$(CC)),) $(eval $(call gb_UnpackedTarball_add_patches,libmwaw, \ diff --git a/external/libmwaw/ubsan.patch.0 b/external/libmwaw/ubsan.patch.0 deleted file mode 100644 index 4a7f21093004..000000000000 --- a/external/libmwaw/ubsan.patch.0 +++ /dev/null @@ -1,11 +0,0 @@ ---- src/lib/WingzParser.cxx -+++ src/lib/WingzParser.cxx -@@ -1120,7 +1120,7 @@ - MWAWColor colors[4]; - for (int i=0; i<4; ++i) { // font, back, unknown,font color - val=(int) input->readULong(4); -- int col=((val>>16)&0xFF)|(val&0xFF00)|((val<<16)&0xFFFFFF); -+ int col=((val>>16)&0xFF)|(val&0xFF00)|((val&0xFF)<<16); - int high=(val>>24); - colors[i]=MWAWColor(uint32_t(col)|0xFF000000); - switch (i) { |