summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2017-01-23Change all Idle* LINKs to be Timer*Jan-Marek Glogowski
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles Link in the Timer class. Now there are two possible solution: 1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or 2. split the inheritance of Idle from Timer again to maintain different Link<>s and move all common code into a TimerBase. While the 1st is more correct, the 2nd has a better indicator for Idles. This implements the first solution. And while at it, this also converts all call sites of SetTimeoutHdl and SetIdleHdl to SetInvokeHandler and gets rid of some local Link objects, which are just passed to the SetInvokeHandler call. It also introduces ClearInvokeHandler() and replaces the respective call sites of SetInvokeHandler( Link<Timer *, void>() ). Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
2017-01-23lok: New feature flag to turn off tiled annotationsPranav Kant
Change-Id: Ie418642242ada98d4a41f30bb6cefcd57f398ef0 Reviewed-on: https://gerrit.libreoffice.org/33472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-01-23Revert "used std::map in SfxItemSet"Noel Grandin
This reverts commit 2757ee9fe610e253e4ccc37423fa420004d0f388. Besides causing a performance regression, I now notice that there is code in SW that relies on iterating over two different SfxItemSet's in parallel, and assumes that missing items are returned as nullptr, which is not the case for my std::map based change. Change-Id: I2b1110350fe4c4b74e5508558e9661ef1e1a103e
2017-01-23tdf#63673 Never ignore detected BOMMaxim Monastirsky
SwIoSystem::IsDetectableText was returning false only because the detected line end isn't the same as the system default one. Instead return true whenever there is a known BOM or at least there is no 0x0, and actually use the detected line end. Change-Id: I20cc1642e7ad2e6e13dfb48c325a00c44f818f15 Reviewed-on: https://gerrit.libreoffice.org/33404 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-01-23tdf#96277 revert ww8 import: fix upper margin of floating tableJustin Luth
commit 3755c87d0426a499d4755e82d8fbc77caa240764 mis-positions non-textframed floating tables. The patch only worked under very ideal circumstances that cannot be identified during import time. Lots of bug reports indicate real world problems with it. This is a pretty safe revert because the code only processes a document one time, so old documents don't depend on this to work. Change-Id: I3b94d27901a20e46c2f5fd4305041d1d28acf33a Reviewed-on: https://gerrit.libreoffice.org/33322 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-23sw: prefix members of SwAccessibleCellMiklos Vajna
Change-Id: I444cd7fc523170bb7e1ee8a8041ca5a5df302226
2017-01-23new loplugin useuniqueptrNoel Grandin
Change-Id: Ic7a8b32887c968d86568e4cfad7ddd1f4da7c73f Reviewed-on: https://gerrit.libreoffice.org/33339 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-23Revert "Revert "use rtl::Reference in SwPostItField""Noel Grandin
This reverts commit 4b429851e54ccc42e5f9acebce67139bc3d5e244 and implements sberg's advice and removing copy operator Change-Id: I76876701f2585d4d1eacc4664b17d9ff73b26722 Reviewed-on: https://gerrit.libreoffice.org/33342 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-23Typo: idividual in .ui element nameGabor Kelemen
Change-Id: I96a6baaebb80283a40051fd8dc062513d4ae32a8 Reviewed-on: https://gerrit.libreoffice.org/33411 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-23tdf#104061 MSWordExportBase: tables shouldn't prevent sectionbreakJustin Luth
This also reverts temporary commit ba2c31da9723182d2087e27a1ea0f95d9617f343 which was done to look for more pro or con proof documents. None found. This section of code has been essentially unmodified since the initial import in 2000, so apparently the necessity for preventing the processing of a section if the table item contains pageBreak info is no longer valid. My guess is that tables were excluded to fudge round-tripping better. Recent use of dummy paragraphs during import fixes many import problems, and thus export of the section node no longer should be avoided. Change-Id: I28bcf618f596a1676e2e7820de192ca63bffe68f Reviewed-on: https://gerrit.libreoffice.org/32936 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-01-23bEncodedFilter is always falseMaxim Monastirsky
Change-Id: I1b959ce8f46f45a789bb7d493c371677ba775f3b
2017-01-21coverity#1399025 Dereference after null checkCaolán McNamara
Change-Id: I58ccfeb03388a60a6e2a506a22490ada5feb669f
2017-01-21coverity#1399026 Unchecked dynamic_castCaolán McNamara
Change-Id: I60188c36bdd6d44c5bd8dae28debafc10b6c9f3b
2017-01-21coverity#1399023 Unchecked dynamic_castCaolán McNamara
Change-Id: Id5d0a3cca9587f577000244a9776d7f1f61b5487
2017-01-21coverity#1399022 Dereference after null checkCaolán McNamara
Change-Id: I33c2007a8caf4f0c83cfe1119bba828f6a7c7c29
2017-01-21coverity#1399020 Dereference after null checkCaolán McNamara
Change-Id: Ic4a2eb0425cd48de85a40350c7368ade486842c2
2017-01-21coverity#1399028 Unchecked dynamic_castCaolán McNamara
Change-Id: I17b566a13b0822e39cb5852150f407c9d9c84305
2017-01-21coverity#1399436 Uninitialized scalar fieldCaolán McNamara
Change-Id: Icd4bc58207cf61a03e167faf8289310e9d453c39
2017-01-21coverity#1399014 Unchecked return valueCaolán McNamara
Change-Id: I0423d9be8032cb7d405cba258c79e1c625f6eee8
2017-01-21coverity#1399013 Unchecked return valueCaolán McNamara
Change-Id: I5e9f32dfc97c0a06fcae399412354eda91bf3f4b
2017-01-21coverity#1361585 Unchecked dynamic_castCaolán McNamara
Change-Id: I664dc6d5c38bcc4fd75d436b67453983e4b57403
2017-01-21coverity#1361580 Unchecked dynamic_castCaolán McNamara
Change-Id: I02521b61d2832ba510aaf5170e67c1fd5f691334
2017-01-21coverity#1352253 Unchecked dynamic_castCaolán McNamara
Change-Id: I7634fd735f3bdb729c06bcbca05ae31c930db930
2017-01-21coverity#704055 Unchecked return valueCaolán McNamara
Change-Id: Ie0c8155955ba975c913738adf40ef6ec092adba0
2017-01-21fix confusing function argumentsJochen Nitschke
cppcheck: funcArgOrderDifferent > Function 'CompareSequence' argument order different: > declaration 'rData1, rData2, rD1, rD2' > definition 'rD1, rD2, rMD1, rMD2' no logic change Change-Id: Ie43b66e867c6f5febd825d06380a27c736d6fded Reviewed-on: https://gerrit.libreoffice.org/33365 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-01-20Missing 'const'Stephan Bergmann
Change-Id: I2110b932f5e27141f137fecf5c2ff8a7f9665bf6
2017-01-20Revert "doesn't seem to be a reason start and end are swapped"Caolán McNamara
breaks tests apparently This reverts commit 92bfe7e3052a7540c81d9fa152f55920ad00b8ee.
2017-01-20doesn't seem to be a reason start and end are swappedCaolán McNamara
Change-Id: If1ccdd303bc7c6e69360295c599270c41d03f3f7
2017-01-20sw: fix remaining loplugin:cppunitassertequals warningsMiklos Vajna
Now only subsequentchecks are remaining, as far as I see. Change-Id: Id5e5a874f8de08c0fd3722aecdc02967ae5d421f Reviewed-on: https://gerrit.libreoffice.org/33346 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-20tdf#48658 writerfilter: only set THROUGH wraps as transparentJustin Luth
commit 15c3a08b8b1e8060f9659c7bc98480a39d1802c5 set transparency before the wrap type was known (which is good in case wrap type is never defined, and the default wrap type IS through, so that fits) but transparency was never re-evaluated once the wrap type was known. In MSWord, the header is at a lower zOrder than the body, so objects that are OVER the header text are still UNDER the body text. Writer emulates this by insisting that ALL through-wrapped header objects are UNDER the header text. (This ought to only apply to objects that spill into the body text area, but that’s pretty hard to calculate, so transparency was applied to any object anchored in the header.) Change-Id: Ie3916c6b7f3fa80caf5994fd910ba4d4d89ec702 Reviewed-on: https://gerrit.libreoffice.org/33152 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-20Related: tdf#100813 don't crash traversing table in page 43 master has...Caolán McNamara
align master with the more conservative 5-2/5-3 reproducible problem Change-Id: Ie7a53e94c062af894bee85ea05f1acf64bcb13f1
2017-01-20loplugin:staticaccessNoel Grandin
Change-Id: Ifed67e3c34663b056529719d78aa22f2a9f1da8d
2017-01-19Preserve whitespace with tiled rendering.Jan Holesovsky
Online is often used for taking minutes, and during that, people don't have time to play with the formatting - so it is annoying when autocorrect goes in the way. Change-Id: Ia1794c46d3003198764f666951821f693d710653
2017-01-19Revert "use rtl::Reference in SwPostItField"Noel Grandin
This reverts commit f7ee0054cf9da35f210d9043a68339415aba2284. until I can figure out how to make that miserable idiot of a Visual Studio 2013 compiler happy. Change-Id: I9206df8cbba52bf8aab242a1376f4b6598d2b739 Reviewed-on: https://gerrit.libreoffice.org/33325 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, swStephan Bergmann
Change-Id: I2da2ce4cd247e7b9f973150917b4ee7bd7a0e0c4
2017-01-19sw: try to fix MSVC build after a754294ac7a902fe96fbbd6b8b6824a360d6b248Michael Stahl
Change-Id: I20b381fd8dda3183df2034c481939b6318e64175
2017-01-19fix windows buildNoel Grandin
Change-Id: I64d03ac9ea616a66bd556ea61e2c70f4021a07ef
2017-01-19tdf#105417 sw hyphenation: avoid infinite loop on zero-length last lineMiklos Vajna
This hang happened when the user executed Tools -> Language -> Hyphenation -> Hyphenate All. This problem is visible only if all of these conditions are met: - a line in a paragraph has a word that already contains a soft-hyphen, but not at the position where the automatic hyphenation would insert it - the last line ends with a word that can be hyphenated - there is a fly frame in the document In this case it happens during hyphenation that the layout has an additional empty line at the end (which is removed by the time the layout finishes), so we hit the case when SwTextFormatter::Hyphenate() skips the "if( m_pCurr->PrtWidth() && m_pCurr->GetLen() )" block. Normally hyphenation terminates when it iterates over the portions of the line and no overrun nor any existing hyphen portion are seen, but in this case that never happened. Fix the problem by terminating not only when we reach the end of the portion iteration, but also when the portion list is non-existing (has zero length). Change-Id: I71d4b040a2d4692ae6eb92807dbbbb42b077a0f8 Reviewed-on: https://gerrit.libreoffice.org/33303 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-19use rtl::Reference in SwXTextFieldNoel Grandin
instead of manual acquire/release Change-Id: I15d151036f17641a7ac992feb4045b9e31df4dec
2017-01-19use rtl::Reference in SwPostItFieldNoel Grandin
instead of manual acquire/release Change-Id: Id14ac4731e513ae37f922db5d1e497aee10b3b35
2017-01-19use rtl::Reference in SwDocFacNoel Grandin
instead of manual acquire/release Change-Id: I40b4f6d2893fe0d4113032f638bce1793fc47cd7
2017-01-19use rtl::Reference in SwHTMLParserNoel Grandin
instead of manual acquire/release Change-Id: Ifdc04a9659d91d62da5715b24108927d1faf9c3e
2017-01-19use rtl::Reference in SwWriter::WriteNoel Grandin
rather than manual acquire/release Change-Id: Ic82e6528be66c2f4ff1248376285808c7323edf0
2017-01-19use rtl::Reference in ReaderNoel Grandin
rather than manual acquire/release Change-Id: If839bb45beb0d3573bff475a0b09ee4347c80c3e
2017-01-19use rtl::Reference in SwHTMLWriterNoel Grandin
instead of manual acquire/release Change-Id: I76176841738688dff9df2e7dc3077be7d32387e9
2017-01-19make SfxItemSet with SAL_WARN_UNUSEDNoel Grandin
Change-Id: Ia74ca329d8438f614169031acfbe0406faf7c281 Reviewed-on: https://gerrit.libreoffice.org/33268 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-19tdf#35021 TAB_OVER_MARGIN pdf support for left/center/decJustin Luth
also related to tdf#93637 which first raised the issue of pdf support for right-tabovermargin. Change-Id: Icabe2d0ac2dfe9181edde9dadfb0ab85f9ed4402 Reviewed-on: https://gerrit.libreoffice.org/33279 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-01-18tdf#105409 Use ScopedVclPtrMaxim Monastirsky
so disposeAndClear is called. Change-Id: I40da317ac03f815c8664e8a4648870c2066f9650
2017-01-18sw: Unify char highlight handlersMaxim Monastirsky
SID_ATTR_CHAR_COLOR_BACKGROUND code was mostly a copy-paste of SID_ATTR_CHAR_COLOR_BACKGROUND_EXT. Change-Id: I713bfd72a2f51f2d0ff10b36e9e0a9150b13a640
2017-01-18Drop SwEditWin:: prefixMaxim Monastirsky
Change-Id: I86b810a6ad94255a5f2a59392ba85775a488ba12