summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par3.cxx
AgeCommit message (Collapse)AuthorFilesLines
2018-11-13ofz#10523 guard aginst 0 pF->nLCodeCaolán McNamara1-1/+1
Change-Id: I8ef476e06f54ddd57be907488a8a65314abda3ee (cherry picked from commit 108eca19c9043895f26c889c90b3f4081113a3fb) (cherry picked from commit 40d91027e70518dff8404aaf10fd9830995d9409)
2018-03-06ofz: check nLevel against maParaSprms sizeCaolán McNamara1-4/+4
Reviewed-on: https://gerrit.libreoffice.org/48521 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit bc75f71139a2f711813013fe2380d9a61e383574) Change-Id: I9bcaf176e6a2f70348712ca98c4176125c2f455e
2017-09-01ofz#3154 check bounds of special sprmCaolán McNamara1-2/+2
Change-Id: I82566e2f2ad479c392f06ae7149e3781c0338e50 ofz: sanity check L_VAR2 record bounds Change-Id: I862457a7239108974f360a87b4f6ccf433eae364 Reviewed-on: https://gerrit.libreoffice.org/37534 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 016e4d0e2650b2fb350068d86e8d392a7ef5acb1) ofz: stay within available data Change-Id: Ic959cf5b2cd92ba5bc297e686beb1fd50427a994 Reviewed-on: https://gerrit.libreoffice.org/36102 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit fdcac49119d3fc9f6216af834e7afc56d2c2e376) Reviewed-on: https://gerrit.libreoffice.org/41648 Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit f33a136dc6bcb8bc0ed6ddd6c3d38d75e067e6eb)
2017-07-12ofz: stay inside stringCaolán McNamara1-1/+1
Change-Id: Ia0d0ddfce4ee3d5f8763be6804fe52c514375bb3 Reviewed-on: https://gerrit.libreoffice.org/39629 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 073a2b2aef5c0b579aea8ed203dd9c1c5790b650) Reviewed-on: https://gerrit.libreoffice.org/39645 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit e2be5d28877a817ae302b3dca7af2f71597a912f)
2016-12-21tdf#104805 DOC import: fix non-0-starting LVL.xst with none-type prev levelMiklos Vajna1-3/+11
Interesting parts of the bugdoc: - it has a numbering definition with two levels - first level's type is none - second level has a numbering string: "\x01." Usually these placeholder bytes in the numbering string start from 0x00, but there it starts at 0x01, which means the layout has to replace it with the numbering from the second level. Mapping from the spec to the code: - nLevelB is an index into rgbxchNums - aOfsNumsXCH is rgbxchNums - sNumString is xst So when the rNotReallyThere added in commit 251ba90d863c2695c9f46ef922e49d72a65da9ea (INTEGRATION: CWS soberfilterteam06 (1.44.26); FILE MERGED, 2003-05-19) wants to clear out indexes from aOfsNumsXCH, it talks about numbering levels. The old code assumed that nLevelB is the same as nPosValue, which is true in many cases (when the levels are like 1, 1.1, 1.1.1), but not in this particular case, where nLevelB is 0, but nPosValue is 1. (cherry picked from commit 19d08bbf704332d727cfbe8e101e7d14c62326a0) Change-Id: I590d9b2725a3330c26a04a526ce22d95970a974f Reviewed-on: https://gerrit.libreoffice.org/32237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-11-18Resolves: tdf#91916 different word 6/7 vers have ambiguous sprmsCaolán McNamara1-1/+1
See tdf#91916, #i8726, #i42685# there is an ambiguity around certain properties as to what they mean, which appears to be a problem with different versions of the file format where properties conflict, i.e. ooo40606-2.doc, magic is a699 : 0x6f 0x4 0x0 0x71 0x4 0x0 ooo40635-1.doc, magic is a699 : 0x6f 0x4 0x0 0x71 0x4 0x0 ooo31093/SIMPCHIN.doc, magic is a699 : 0x6f 0x2 0x0 0x70 0x0 0x0 0x71 0x2 0x0 : 0x6f 0x5 0x0 0x70 0x5 0x0 ooo31093/TRADCHIN.doc, magic is a699 : 0x6f 0x1 0x0 0x70 0x0 0x0 0x71 0x1 0x0 ooo31093/JAPANESE.doc, magic is a697 : 0x6f 0x2 0x0 0x70 0x0 0x0 0x71 0x2 0x0 ooo31093/KOREAN.doc, magic is a698 : 0x6f 0x2 0x0 0x70 0x0 0x0 0x71 0x2 0x0 ooo31093-1.doc, magic is a698 : 0x6f 0x5 0x0 0x70 0x5 0x0 ooo31093-1.doc, magic is a698 : 0x6f 0x5 0x0 0x70 0x5 0x0 meanwhile... ooo27954-1.doc, magic is a5dc : 0x6f 0x1 0x81 0x71 0x2 0x4 0x0 0x74 0x2 0x20 0x0 ooo33251-1.doc, magic is a5dc : 0x6f 0x1 0x81 0x71 0x2 0x3 0x0 0x74 0x2 0x1c 0x0 --- So we have the same sprm values, but different payloads, where the a5dc versions appear to use a len argument, followed by len bytes, while the a698<->a699 versions use a 2byte argument commit c2213db9ed70c1fd546482d22e36e4029c10aa45 INTEGRATION: CWS tl28 (1.169.24); FILE MERGED 2006/10/25 13:40:41 tl 1.169.24.2: RESYNC: (1.169-1.170); FILE MERGED 2006/09/20 11:55:50 hbrinkm 1.169.24.1: #i42685# applied patch changed 0x6f and 0x70 from Read_BoldBiDiUsw to Read_FontCode for all versions. In the Word for Window 2 spec we have... 78 //sprmCMajority 80 //sprmCFBoldBi 81 //sprmCFItalicBi 82 //sprmCFtcBi 83 //sprmClidBi 84 //sprmCIcoBi 85 //sprmCHpsBi as see in GetWW2SprmDispatcher, different numbers, but the sequence starts with the same sprmCMajority as appears before 0x6f in word 6/95 I think the easiest explanation is that the CJK Word for Window 95, or whatever the product was went rogue, and did their own things with at least first three slots after sprmCMajority to do a different thing. I have no reason to think Tono was wrong with what they do in the a698<->a699 versions versions, but with magic a5dc they probably did mean sprmCFBoldBi, sprmCFItalicBi cause they have that 0x81 pattern which has significance for those types of properties. Change-Id: I44aabf7443391bae21ed5adb074780a1c929a80d
2016-10-05convert MapUnit to scoped enumNoel Grandin1-3/+3
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03sw: prefix members of WW8FibMiklos Vajna1-7/+7
Change-Id: I69f8b6dda03b9a8cc19fc1dbe5e8031cfb7329d2 Reviewed-on: https://gerrit.libreoffice.org/29470 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-30loplugin:stringconstant: adapt to improved OUStringLiteral1 (sw)Stephan Bergmann1-1/+1
Change-Id: Ifa1a6bafd3628b48ebceb09f8cd864361848e81c
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann1-1/+1
Change-Id: I7e7cdfa5efaf18bb47d40947d4e1d91a2c9b5a57
2016-06-16Remove the :: prefix in ::std for swMark Page1-1/+1
This patch was created using a script Variable name textual alignment is preserved to the same level Change-Id: I6b4858f8059b8cf71fc253e87d6df634362d62e9 Reviewed-on: https://gerrit.libreoffice.org/26306 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-06tools: rename SvStream::Read/Write to ReadBytes/WriteBytesMichael Stahl1-2/+2
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a Reviewed-on: https://gerrit.libreoffice.org/25972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-30Some clean up of uses of css::uno::Any::setValueStephan Bergmann1-1/+1
Change-Id: I04e8aef35a6083b61d775c8eb3f96757da2b31bd
2016-05-12clang-tidy modernize-loop-convert in swNoel Grandin1-2/+2
Change-Id: I1f4a0ad6658bd3154c48940296aa8edc1ea1612c Reviewed-on: https://gerrit.libreoffice.org/24876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin1-18/+18
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-22loplugin:commaoperator in sw/Noel Grandin1-1/+2
Change-Id: I9b00755707687e4c10c02bf49866571f2c44d8ba
2016-02-04vcl: take into account the font width is the average font widthChris Sherlock1-2/+2
I'm changing the Font class function names: - SetSize -> SetFontSize - GetSize -> GetFontSize - SetHeight -> SetFontHeight - GetHeight -> GetFontHeight - SetWidth -> SetAverageFontWidth - GetWidth -> GetAverageFontWidth That's because it really makes no sense to say that there is a single constant font width because obviously proportional fonts don't have one - the best we can do is an average font width, which is what folks like Microsoft sort of do already. On a fixed font, the average is still accurate, for obvious reasons :-) I'm also not a fan of GetSize/SetSize as I find it a might too generic. Change-Id: Ib80a604ba62d6883fd6cbc7994da763976be5c70 Reviewed-on: https://gerrit.libreoffice.org/22069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-31unnecessary use of OUString constructorNoel Grandin1-1/+1
Change-Id: Idd31b0a53c8318af69bbcd32f6798721ec8eb8e1 Reviewed-on: https://gerrit.libreoffice.org/21945 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-18vcl: change Font::SetName() to Font::SetFamilyName()Chris Sherlock1-6/+6
Change-Id: I9b7bd1ec25955981ebcb9085579cbb9fbaa802d5 Reviewed-on: https://gerrit.libreoffice.org/21560 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-16revert vcl patch series that brok Mac and WindowsNorbert Thiebaud1-6/+6
revert: 9bc2f3de8672e812f3a67541c6d7069b434a7e42 vcl: add comment about ImplFontMetric::{Get|Set}LineHeight() 26371f105bc44e04469ec03fc5bb12505e651c6b vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic() 2dd0b4317372b8022efe3911b38b4fa02956d8b9 vcl: font.hxx and metric.hxx cleanup, make ctors explicit and the dtor virtual 5ab13bf3ead3539e4ad847656da81e7eb6029652 vcl: tabify font.hxx f99550dae55e40e49bf9c9875053fe2abb4c71ca vcl: change Font::SetName() to Font::SetFamilyName() 2b297116cb6bb1061c43e5714e2609c8ee9f57d2 vcl: rename Font::GetName to Font::GetFamilyName Change-Id: I23f38921187d66b970ca815eb30dda4222a2da62
2016-01-16vcl: change Font::SetName() to Font::SetFamilyName()Chris Sherlock1-6/+6
Change-Id: I54a4036544c680c4a49607677af776aa7a433fbc Reviewed-on: https://gerrit.libreoffice.org/21510 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-13loplugin:unusedmethods unused return value in sw/Noel Grandin1-7/+4
Change-Id: Iaec71124b04ed678686d646df3ff0892585d3d50
2015-11-24loplugin:unusedfields in sw/Noel Grandin1-2/+0
Change-Id: I323a038e5581b00cd3a4ea2f362c66540377759e
2015-11-11sw: prefix members of SwWW8StyInfMiklos Vajna1-22/+22
Change-Id: I2749607eb2271a838acb8220c80d9363d8e8d867
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-27/+27
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-11-05use uno::Reference::set method instead of assignmenNoel Grandin1-2/+2
Change-Id: I76671a74150791e1a74ece3d5bcf40fd6c727ac7
2015-10-28sw: surely that should be !=, not <Michael Stahl1-1/+1
Change-Id: Id733fd3a53fe2023be20fcf7c9d93823d1697a7d
2015-10-28sw: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl1-16/+13
Change-Id: I2bb543ce1678140e8a6e086171a8f6b4529771d3
2015-10-16drop templated HasItem in favour of new templated SfxItemSet::GetItemCaolán McNamara1-4/+1
Change-Id: Ia753e8728a68b90cbf7fe3adda1de8a3297bd782
2015-10-02Fix typosAndrea Gelmini1-2/+2
Change-Id: I724f2b709f7bd417b5a522e063c0a2f2b5c3dad1 Reviewed-on: https://gerrit.libreoffice.org/18987 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-18Fix typosAndrea Gelmini1-1/+1
Change-Id: I021589aeca9ef6bceb1c828c2197f5ff58f85b09 Reviewed-on: https://gerrit.libreoffice.org/18707 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-09-09no point in reminding me now, we shipped a while backCaolán McNamara1-3/+2
Change-Id: I728d4c0c6e271e3a97a95996f96ed43c00a3abc8
2015-07-21need to check for after reading and before seekingCaolán McNamara1-3/+2
seeking resets eof, so the IsEof is always false after the first loop Change-Id: I2e533f3f9c494566aabb947c05258a770e883b1f
2015-06-02loplugin: loopvartoosmallKatarina Behrens1-4/+4
Change-Id: Icb30dac9cdcba493752623ccafff5f06ccafc31f
2015-05-26cppcheck: noExplicitConstructorCaolán McNamara1-1/+1
Change-Id: I955b04396d27e88ce228f180275955071da83ec6
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier1-150/+150
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-19Remove include stdio (part3)Julien Nabet1-2/+0
Change-Id: I0b44a33dc38b76130a7b230962de7ce86bd4574b Reviewed-on: https://gerrit.libreoffice.org/15793 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-05-11cppcheck: cstyleCastCaolán McNamara1-2/+2
Change-Id: Id3ffa264ba7990b53d264745eaf0726f1468577b
2015-05-02sw: prefix members of SwWW8ImplReaderMiklos Vajna1-93/+93
Change-Id: Ic3d21109097756d22105a8382f344b980f79b898 Reviewed-on: https://gerrit.libreoffice.org/15592 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-04-24loplugin:simplifyboolStephan Bergmann1-1/+1
Change-Id: Ic90d247e6c8e36e27ff444ace10fd37e06d46b50
2015-04-20Clean up new rtl/surrogates.hStephan Bergmann1-4/+5
Change-Id: Iec781bdbbf216cb14c9ba5be5955123273d7699c
2015-04-20sw: prefix WW8FormulaControl membersMiklos Vajna1-52/+52
Change-Id: Idf747fb895c15e8df96a6ced06cf9f0df5d35e39
2015-04-20sanitize strings with invalid high/low surrogate sequencesCaolán McNamara1-1/+27
Change-Id: I9ad1aa651b6971526dd924630fe5606b7632f2dc
2015-04-17loplugin:implicitboolconversion clean-upStephan Bergmann1-17/+17
Change-Id: I049b2eec5b2201f4056bb6e7b9b97e7763e5e214
2015-03-25Typo: formated->formattedJulien Nabet1-1/+1
Change-Id: Iefd4d375a0dfb36732233852f906c6b85dccc2a5
2015-03-11convert SetAttrMode to enum classNoel Grandin1-2/+2
Change-Id: If7dd0c49480756afb7d4eaaba597ecc305c35f64
2015-02-23remove unnecessary parenthesis in return statementsNoel Grandin1-1/+1
found with $ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;' Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
2015-01-26coverity#1266488 Untrusted loop boundCaolán McNamara1-0/+8
Change-Id: I41592965590d53fbaa632cf01abed430427a9698
2015-01-26coverity#1266486 Untrusted loop boundCaolán McNamara1-1/+8
Change-Id: I3c2ad66dd181c33073f8393dc81d1f56a80d5a87
2015-01-19fdo#39440 sw: reduce scope of local variablesMichael Weghorn1-2/+1
This addresses some cppcheck warnings. Change-Id: I7cbc1908d0e3c84f5864db34984d0740db891aef Reviewed-on: https://gerrit.libreoffice.org/13962 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>