diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-24 12:36:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-24 12:36:06 +0100 |
commit | 6d21cbd1238556535ec1bb1adf35b25bc8eb898b (patch) | |
tree | 6a7440fc20cc1798fd55384e24d4a3a4494268e9 /sw | |
parent | 1e8e3a8c4624e9a4f16a7fb7f24c5d7125d7f106 (diff) |
Revert "guard against hangs with bogus unsorted plcfs"
This reverts commit f3db01f313ac06f70bec7584f48a380ab832ca75.
<= maybe, need to double check
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/core/data/ww5/pass/hang-1.doc | bin | 4290 -> 0 bytes | |||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 17 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.hxx | 1 |
3 files changed, 0 insertions, 18 deletions
diff --git a/sw/qa/core/data/ww5/pass/hang-1.doc b/sw/qa/core/data/ww5/pass/hang-1.doc Binary files differdeleted file mode 100644 index 603372406e18..000000000000 --- a/sw/qa/core/data/ww5/pass/hang-1.doc +++ /dev/null diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 05e2be942698..313dd7833858 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -2101,8 +2101,6 @@ void WW8PLCF::ReadPLCF(SvStream& rSt, WW8_FC nFilePos, sal_uInt32 nPLCF) #endif // OSL_BIGENDIAN // Pointer to content array pPLCF_Contents = reinterpret_cast<sal_uInt8*>(&pPLCF_PosArray[nIMax + 1]); - - TruncToSortedRange(); } OSL_ENSURE(bValid, "Document has corrupt PLCF, ignoring it"); @@ -2122,21 +2120,6 @@ void WW8PLCF::MakeFailedPLCF() pPLCF_Contents = reinterpret_cast<sal_uInt8*>(&pPLCF_PosArray[nIMax + 1]); } -void WW8PLCF::TruncToSortedRange() -{ - //Docs state that: ... all Plcs ... are sorted in ascending order. - //So ensure that here for broken documents. - for (auto nI = 0; nI < nIMax; ++nI) - { - if (pPLCF_PosArray[nI] >= pPLCF_PosArray[nI+1]) - { - SAL_WARN("sw.ww8", "Document has unsorted PLCF, truncated to sorted portion"); - nIMax = nI; - break; - } - } -} - void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN) { OSL_ENSURE( nIMax < ncpN, "Pcl.Fkp: Why is PLCF too big?" ); diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index 54e8165251f6..53e5d47c507b 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -291,7 +291,6 @@ private: void MakeFailedPLCF(); - void TruncToSortedRange(); public: WW8PLCF(SvStream& rSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct, WW8_CP nStartPos = -1); |