summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2015-07-24tdf#90046: RTF import: ensure that a run is started before \footnoteMichael Stahl2-0/+17
Avoids crashing with empty context stacks. Change-Id: I0ee8b457fdbb19b55f5c15876b7253680cde6e23 (cherry picked from commit a61fd02c819433a1206b3b3e61017ba2d0d3d467) Reviewed-on: https://gerrit.libreoffice.org/17334 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-24tdf#92911 SwAnnotationWin rendercontext: fix missing comment contentsMiklos Vajna1-0/+4
The problem was that when inserting a post-it comment, the Paint() is triggered for SwEditWin, which then shares a RenderContext with its children, and at the end paints the buffer to the vcl::Window of SwEditWin. When painting this buffer, the contents of SwAnnotationWin was missing, as the parent SwEditWin was not allowed to paint on that area. No explicit clipping is set at the OutputDevice level, but vcl::Window::ImplClipChildren() still calculates a clip region based on the child windows for the underlying SalGraphics, and that prevented SwEditWin to paint its buffer fully. Fix the problem by explicitly disabling this clipping for SwAnnotationWin in its ctor in the rendercontext case. (cherry picked from commit dcf94ab56d9e5e9864965f56d27045e67b093fa4) Change-Id: I5eb47c20070057a79297d91242624fc2057e2dfb Reviewed-on: https://gerrit.libreoffice.org/17329 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-24tdf#89702 DOCX import: fix too large bullet characterMiklos Vajna2-0/+14
Commit c1f8437dbed0e8b989e41a345ef7e658a6e8a4cd (fdo#83465 RTF import: handle font of numbering, 2014-09-25), changed the "get the me character style of the current numbering's current level" member function to be successfull even in case we're inside a DOCX run, not when we're inside a DOCX paragraph, but outside runs. While this is necessary for RTF, the side effect of this was that unwanted run properties started to affect the above mentioned character style in case of DOCX. Fix the problem by enabling the "in paragraph and run" looking for RTF only. Change-Id: I610bfce6cec15b918fe547402360f5a894401f7e (cherry picked from commit fc7c1a07d0d5e21a4e1533a0e5b0ac256763f973) Reviewed-on: https://gerrit.libreoffice.org/17323 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-23svx, sd, sw: GetPoolDefaultItem() can actually return nullptrMichael Stahl1-2/+5
...if you call ResetPoolDefaultItem() first. Crash found by Varun Dhall. Change-Id: I409484c172fb5843270aee2425844076a008b4df (cherry picked from commit bcb1f81668d9b6a6d807ae32d60ccfce0b36ceb5) Reviewed-on: https://gerrit.libreoffice.org/17320 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-07-23tdf#92471: Improve color conversion to MSO highlightingZolnai Tamás1-12/+12
The simple color distance on RGB color space is not good enough. It leads to a better result if we use the scheme of the primary colors. This method works well with MSO highlighting color palette, but not neccessarily in general. In highlighting palette light and dark variant of the same color type (e.g. blue and light blue) has the exactly same scheme. (cherry picked from commit 16f9cf57e20ffbe34cb184f694f465708250a578) filter: filter_utils test needs tools library (from Michael Stahl) (cherry picked from commit 75d0f7262004d93d457b4b0b499ebf0b23fcda04) Missing boost_headers (from Stephan Bergmann) (cherry picked from commit bd8e8db250f99445dc1a8baa7ffc6ddfe90fdf5b) Change-Id: I0de6e4598f365fda1cccd1d3466429e52cf4067f Reviewed-on: https://gerrit.libreoffice.org/17052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-07-23coverity#1311944 Logically dead codeCaolán McNamara1-1/+1
for the record its a SwFormatChg we get here at the crash time regression from commit 7de992bcc66c973bb6b247184cac38f01cd1104a Author: Caolán McNamara <caolanm@redhat.com> Date: Mon Jul 13 12:38:18 2015 +0100 fix a11y crash seen on close of tdf#92573 its not the reported crash, which has "gone away" which might be a duplicate of tdf#90502 the switch only handled RES_TITLE_CHANGED and RES_DESCRIPTION_CHANGED so if its anything else, e.g. OBJ_DYING, then don't attempt GetNoTextNode Change-Id: I290d6e633811423c3acc198aba7a60943518ec4a (cherry picked from commit 34c0b8869784cb44a516c97213ef24566a4ed111) Reviewed-on: https://gerrit.libreoffice.org/17137 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-23need to check for after reading and before seekingCaolán McNamara2-3/+2
seeking resets eof, so the IsEof is always false after the first loop Change-Id: I2e533f3f9c494566aabb947c05258a770e883b1f (cherry picked from commit e2e6fa5ad5aaa20a9fa8a6d060d9edd241aefd52) Reviewed-on: https://gerrit.libreoffice.org/17273 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-07-23xstUsrInitl contains max 9 charsCaolán McNamara2-4/+7
Change-Id: Ia40d037d7af6cd3a283aa12948e4c5565dcb2ae6 (cherry picked from commit cbea6a709f33babfb490ab1bd07cde8cc08114ac) Reviewed-on: https://gerrit.libreoffice.org/17292 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-07-21test should check that all levels are equalCaolán McNamara1-2/+6
regression from commit bf586debd4d8274cff2737f02beac465525328e8 Author: Matteo Casalin <matteo.casalin@yahoo.com> Date: Sat Feb 21 12:38:54 2015 +0100 Simplify Change-Id: I09f83b2bab053fcd48fe1a1a4184cc11a4f9d663 (cherry picked from commit 8a01693c79a24006cbe7d8642b97408eb23a1bd9) Reviewed-on: https://gerrit.libreoffice.org/17233 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2015-07-20sw: SwXFlatParagraph::isChecked() return value is invertedMichael Stahl1-4/+4
It was checked if the flag says it's not dirty. Thanks to Varun Dhall for pointing to this problem. (cherry picked from commit 0a91e08a46118b495f80f7901b2132b194d6d409) Change-Id: I4aa1fef8b2251f0f3e579930b39d6d5a256c1895 Reviewed-on: https://gerrit.libreoffice.org/17243 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-07-20sw: WW8 export: avoid invalidated positions in sw::FramesMichael Stahl3-1/+28
When exporting ooo67907-1.doc we get ~SwIndexReg assert because there's a frame anchored in a redline, and the SwPosition in the sw::Frame for it is invalidated during SetRedlineMode because the node it points to is deleted. Add another horrible workaround to the redline trainwreck. Change-Id: Ia9b2393c77f42502862daaa30fd54eb3b040a214 (cherry picked from commit ab706f85bb777ba160712c072c9d2a08ebcddcc6) Reviewed-on: https://gerrit.libreoffice.org/17231 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-20sw: DOCX export: *really* fix non-well-formed XML with hyperlink/rubyMichael Stahl3-6/+54
Turns out that 84ea33ef9a86f097a248b526554cdc3581c8d725 did not actually fix the problem; it was merely good enough to fool the asserts in FastSaxSerializer that were not yet adapted to the funky maMarkStack. The problem is that the StartRuby()/EndRuby() call StartRun()/EndRun() and that really messes up the mark stack. Prevent that by first ending the run before starting new one in StartRuby(), and then starting a new run after ending the ruby-base one in EndRuby(). The hints handled in SwWW8AttrIter::OutAttrWithRange() are sorted in the right way for this to work (i.e. the EndRuby() will be the last call for any given position). This apparently causes an additional <w:r/> empty element to be written, not sure if that causes any issues but at least the output is well-formed for fdo82849-1.odt. Change-Id: I28ffd029246310ff0e405b0674aef8e724700d4d (cherry picked from commit c2c51fa587523edd6e31a17affffc77645b60dea) Reviewed-on: https://gerrit.libreoffice.org/17230 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-07-17oox: fix invalid mime type "image/tif"Michael Stahl1-1/+1
(regression from ccfc02f7691848284403d339ee17054169fbff1d) Change-Id: I29a366228bf08f29edfa4a8e963889e34aa3d2ea (cherry picked from commit f18ca153aac53408284062309db513ab73f7dd2c) Reviewed-on: https://gerrit.libreoffice.org/17144 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-07-16tdf#38837 Reduce power consumption by minimizing idle timersAshod Nakashian2-1/+2
Both the document statistics- and state-manager have their own modified flags. There is a cyclic dependency between the the two in that updating the document's statistics also marks the document as modified. Of course when a document is edited the statistics modified flag is set to trigger an update. To avoid a perpetual cycle, the statistics manager resets the document's modified state to that before setting the new statistics. However, this doesn't reset the statistics modified flag, which was set when the document was modified by setting the new statistics. Hence, the statistics thinks there are modifications in the document when there isn't. This patch is to make DocumentStateManager::ResetModified() symmetrical to DocumentStateManager::SetModified() by reseting the modified flag of the statistics manager. The idle CPU drops to nil on unmodified documents after this. However, for modified documents the statistics is recalculated perpetually until the document is saved. This will need a different patch to fix. Change-Id: Ib5936bc1acbda34fcac6a00ec46eaa31e4363885 Reviewed-on: https://gerrit.libreoffice.org/16774 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 b0fde7a912ff3aa370496802f20895b1158b072c) Signed-off-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-07-16fix a11y crash seen on close of tdf#92573Caolán McNamara1-0/+3
its not the reported crash, which has "gone away" which might be a duplicate of tdf#90502 the switch only handled RES_TITLE_CHANGED and RES_DESCRIPTION_CHANGED so if its anything else, e.g. OBJ_DYING, then don't attempt GetNoTextNode Change-Id: I642beb66613481cbc7ee18647f0204a67d670a84 (cherry picked from commit 7de992bcc66c973bb6b247184cac38f01cd1104a) Reviewed-on: https://gerrit.libreoffice.org/16989 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-07-13tdf#92668: Revert some implementation names, for backwards compatibilityStephan Bergmann1-5/+8
These implementation names of Calc, Draw, Impress, and Writer documents are the most likely to be checked by existing third-party code, so revert the corresponding parts of 3099c70b11c7e5b80fe4dbe3dc99171fb38c6fc2 "Fix various XServiceInfo implementations" (and instead add fixups in CppunitTest_serives). Change-Id: I1a760adbf4c89a1b4477d6e628abba8d2028ccfe (cherry picked from commit 61a3be76c221c822b189d20e9269ec5caf1aadcc) Reviewed-on: https://gerrit.libreoffice.org/17010 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-07-13ww8: make sure we don't wrap aroundCaolán McNamara1-0/+4
Change-Id: I667bb264f92024b72f230c2ddbba3887471345f2 (cherry picked from commit 755b9320c81948358a1d4104c8875594b5700d39)
2015-07-10SdrPaintView::AddWindowToPaintView: take a vcl::Window, tooMiklos Vajna1-2/+2
Change-Id: Iedb296732c0819a1d6cdc1c59b3f1718e2cd6d38 (cherry picked from commit 9a11e59e5699c5eb0854355d3dd3848bc895545c)
2015-07-09tdf#92281 - FILEOPEN: Only western font is set for symbols in DOC filesMark Hung3-0/+10
Inserting a symbol in Writer set all fonts including CJK and CTL to the same one. This patch makes the behavior consistent with that, allows CJK and CTL user to see the symbols. Change-Id: I7a61868e8078c81c68e471760f080b3ce7df589f Reviewed-on: https://gerrit.libreoffice.org/16604 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/16871 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-08tdf#90611 DOCX import: fix missing paragraph style on footnotesMiklos Vajna2-0/+10
One one hand, a problem since commit 330b860205c7ba69dd6603f65324d0f89ad9cd5f (fdo#68787 DOCX import: handle when w:separator is missing for footnotes, 2013-09-04) was that the type attribute from <w:footnote w:type="separator"> resulted in two ooxml:CT_FtnEdn_type tokens, ignoring too many paragraph ends for footnotes, which resulted in missing paragraph style on footnotes. On the other hand, fixing the first problem showed that it wasn't correct that commit 9389cf78e304a5a99bcf1745b9388e14ac36281a (cp#1000018 RTF import: empty para at the end of footnote text got lost, 2013-11-15) unconditionally removed the RemoveLastParagraph() call in DomainMapper_Impl::PopFootOrEndnote(). It turns out that RTF and DOCX have different semantics here, the footnote is always within a <p></p> pair in DOCX, while in RTF a \par at the end of a footnote means an empty paragraph. Fix that by conditionally restoring the removed RemoveLastParagraph() call. (cherry picked from commit 519b34300f73b1e08f6194d6ba49d4fc010cf186) Change-Id: I33020ac761c94addfec8164a17863565e4453b07 Reviewed-on: https://gerrit.libreoffice.org/16810 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-07gcc4.6: remove c++11-isms on -5-0 branchThorsten Behrens2-2/+4
This is a fixup for 2a51dd6aca55a92d8751b67cdf7a5a6ab8c38237 Change-Id: I4fba62f944747cbb39013d4b0005a6b4a31f5222
2015-07-07tdf#92577 sw rendercontext: paint transparent from controls conditionallyMiklos Vajna1-2/+2
Regression from commit beb4aa21d61f0d66392d596be86fb57b4b167239 (SwViewShell::ImplEndAction: avoid direct paint, 2015-06-29), the problem was that the lcl_PaintTransparentFormControls() call performs direct paint, so it should be called only in case we don't do an async paint via invalidate. As expected, this call is no longer needed for the original i#107365 bug document in case SwViewShell::Paint() will be called by the main loop shortly. Change-Id: Ia27c551ed838d610f972f20abbb4ae9f0e1241b6 (cherry picked from commit 2b26c1796d0a05f47cfb01d79ee4f69344efbbb2)
2015-07-07SwLayAction::FormatLayout: avoid direct DrawRect()Miklos Vajna1-3/+0
Regression from commit 1d9e837698baab795efee6cc8b0e289528d5cac6 (Use GetBoundRect() instead of Frm() in layout., 2011-04-29), this causes problems for double-buffered rendering and also seems to be pointless, as just above we already added the rectangle to the repaint area. Change-Id: I3dc67143e8332ab941a683414ee318dbef13de88 (cherry picked from commit e47db97d2ced9178456eebaece11118158dce406)
2015-07-07tdf#87348 enable docx exporting linked textboxes that LO can importJustin Luth5-28/+149
Change-Id: I1f663e1a463919fc0662c94e03b801c7c58f1f5d Reviewed-on: https://gerrit.libreoffice.org/16745 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-07-06tdf#92481 RTF import: handle \widowctrlMiklos Vajna2-0/+12
(cherry picked from commit ffc7b671e213d366e59d39ddbbef66544ebf01e5) Change-Id: I1af1d6bc150c16a2c6b0fe788a41c8c18caee6c6 Reviewed-on: https://gerrit.libreoffice.org/16785 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-07-06tdf#90377: fix exclude recipient in mail mergeBjoern Michaelsen3-47/+30
- first, actually use the selection in MergeNew() - secoond, bring back GetSelection() for that - third, throw away lots of the old (dead) code that mostly just stumbled over itself - e.g. ExcludeRecord() wouldnt work on the last element due to a off-by-one error Change-Id: I07d07e086b748b393f2ada7cb22fdb2ce285ad65 Reviewed-on: https://gerrit.libreoffice.org/16762 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-07-06SwViewShell::ImplEndAction: avoid direct PaintDesktop()Miklos Vajna1-14/+1
With double-buffering enabled and typing quickly, one saw blinks in the text sometimes. The reason was that PaintDesktop() painted directly outside SwViewShell::Paint(). The problem is more visible with VCL_DOUBLEBUFFERING_AVOID_PAINT=1, loading a simple document + pressing a key draw an unexpected white rectangle. Given that InvalidateWindows() already calls PaintDesktop() inside Paint() implicitly (via SwViewShell::Paint()), fix the problem by just avoiding the DLPrePaint2() + PaintDesktop() + DLPostPaint2() calls. Change-Id: Ib8ce26a0bdd526bf85d362f0e865dd61d29f6d11 (cherry picked from commit c9175a1bd3249ad573ae6827bf19963a3ebe2fbc)
2015-07-06SwViewShell::DLPrePaint2: fix missing clipping for the non-buffered caseMiklos Vajna1-0/+3
With this, if the sw window is small enough that the page shadow is supposed to be under the sidebar, we no longer paint the shadow over the sidebar. In the non-double-buffered case the output is a window, so SdrPaintWindow::PreparePreRenderDevice() does its own buffering, and clipping is taken care of when that buffer is copied to the window in SdrPreRenderDevice::OutputPreRenderDevice(). This wasn't a problem before, as either the output was a non-screen device or UI elements were painted (like the sidebar), but never both at the same time. Change-Id: Ic02c814fc4deeea86c245c74bd69656533d9f835 (cherry picked from commit 978033d5ed9f93f2d5d9a1ba44acf6b37bc13bfe)
2015-07-04Removed spurious U+200CAndrea Gelmini1-1/+1
Change-Id: Ib01e794b70d611f68ab4a7c048860b28b2dca99f Reviewed-on: https://gerrit.libreoffice.org/16676 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit 2eea698f5b41b2dbf371e3a6c9d3b242c347206d)
2015-07-03tdf#92308: Dont crash on "File > Send > Email Document"Bjoern Michaelsen2-3/+8
- crashed due to out-of-range index with empty vector - kill pruposeless manual index fiddling for good - add trivial test Change-Id: Ic224c70f432d2b26718e05aa5a2742461cfb7bec Reviewed-on: https://gerrit.libreoffice.org/16749 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-07-03coverity#1309050 pLayout might be 0 hereMiklos Vajna1-1/+1
Change-Id: I5756c033e173faaba373c145b15a07e275453643 (cherry picked from commit ef46186bbab756442db1b7c12cd1902c138c737e)
2015-07-02sw: avoid layout recursion when loading documents with charts...Michael Stahl6-38/+73
... that have a Writer table as data source, such as ooo38798-1.sxw. The problem is that during layouting, the SwWrtShell::CalcAndSetScale() wants to call setVisualAreaSize() on the embedded chart object. This switches the state of the object to RUNNING, which loads it from the file, and during that the ODF filter calls into SwChartDataProvider and that uses a UnoActionRemoveContext; unfortunately that ends all pending Actions, so we get a recursive layout action. Apparently the UnoActionRemoveContext is required to call SwUnoTableCrsr::MakeBoxSels() for old-style tables, which need layout frames for selection?!? Try to avoid the problem by disabling UnoActionRemoveContext in case a new-style table will be selected, which can be done without layout. (cherry picked from commit b6cefd5e8b5086619e591385a0d7a6ffcd9783b9) Conflicts: sw/source/core/unocore/unochart.cxx sw/source/core/unocore/unotbl.cxx Change-Id: I097991ffb2e78ddf011db7575f7bb63ae8aa7005 Reviewed-on: https://gerrit.libreoffice.org/16617 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-01sw redercontext: fix missing draw of the overlayMiklos Vajna1-0/+13
With this, if e.g. Ctrl-A is hit for a hello-world document, then selection is properly visible. Change-Id: If3fae1e73dc76c50e62f6e1f31d99873636f0e93 (cherry picked from commit a2c4bed594013ed9d671197cde53990fcede395d)
2015-07-01sw rendercontext: update drawlayer in SwViewShell::PaintMiklos Vajna1-15/+9
Fixes warnings on startup like: warn:legacy.osl:13026:1:svx/source/svdraw/svdpntv.cxx:813: SdrPaintView::UpdateDrawLayersRegion: No SdrPaintWindow (!) when double buffering is enabled for SwEditWin. Change-Id: I3dd8019a158b7d50c5e460abf504da31aabe72c3 (cherry picked from commit 82307b16f89250d5fd724806f51823a38f7e202f)
2015-07-01SwViewShell::DLPrePaint2: paint to mpOut if isOutputToWindow()Miklos Vajna1-2/+3
With this, most of the SwEditWin is painted to the virtual device in case of double buffering, not directly to the screen (avoids flickering). Change-Id: If93aa082daaec6b0e2c417ebc7367e5ab601aa2c (cherry picked from commit af9d02a24bc61c9a531157ed6a49b25c47668277)
2015-06-30tdf#92386: Writer crashes in print preview if document in 2 windowsJulien Nabet1-0/+4
2 changes for the 2 following bts First bt: see https://bugs.documentfoundation.org/attachment.cgi?id=116883 Second bt: see https://bugs.documentfoundation.org/attachment.cgi?id=116888 Change-Id: I92ed3b7305bb5b714532f2dcffd615a8337db8b6 Reviewed-on: https://gerrit.libreoffice.org/16557 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 cb813b392d1f59ad8927b87e899d8a33d1db2504)
2015-06-30SwViewShell::ImplEndAction: avoid direct paintMiklos Vajna1-4/+1
Commit 56dd27d9ed829ea0444b3b5932dcd0d431d6e251 (sw: invalidate after keypresses when we have a callback, 2015-01-13) only enabled invalidate-then-paint for the tiled rendering case, because the main loop had no priorities back then. This limitation went away with 48c2815dd20cf20eeec8bb4e003000f4a3d13291 (tdf#91727 - Unwind non-dispatch of idle handlers., 2015-06-10), so it's not a problem to always do this panting inside the Paint() call. Change-Id: I98ddfcc0f20f1553974b74ec3c859dde315612e4 Reviewed-on: https://gerrit.libreoffice.org/16587 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit beb4aa21d61f0d66392d596be86fb57b4b167239)
2015-06-30SwViewShell::Paint: restore old render context at the endMiklos Vajna1-1/+24
The idea is that mpOut is only used for non-drawing purposes outside Paint(), e.g. to do logic <-> pixel conversion. Change-Id: Ia83cd32dd0a5152dcfc1644e92af08b4ddf4653c Reviewed-on: https://gerrit.libreoffice.org/16584 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 98d2d985082114ec259c11788af7b8574f2c9b3d)
2015-06-30SwFrm::Calc: use vcl::RenderContextMiklos Vajna34-147/+185
(cherry picked from commit 8527dfbd4d3f79de8b02c561e5f0fef0d54d3eeb) Conflicts: sw/source/core/layout/sectfrm.cxx sw/source/core/text/frmform.cxx sw/source/core/text/txtfrm.cxx Change-Id: I98de3f5413756c494c677d592ea921155e4c08be
2015-06-30coverity#1308430 pSh may be 0 hereMiklos Vajna1-1/+1
Change-Id: I2aaee946bdc5a22cf5a83e1e50714556260280f3 (cherry picked from commit 7192cb0f32632ba4095ba0316109cc2eb7f1b218)
2015-06-30SwFrm::PrepareMake: use vcl::RenderContextMiklos Vajna4-8/+8
Change-Id: I34306bb1622c79489eb647ed45f398ad2634c144 (cherry picked from commit ea1ea3b910dea72c901cd655af9a3abd501f4e60)
2015-06-30sw: outline SwFrm::Calc()Miklos Vajna2-5/+6
Change-Id: I9c59116828585c9645bc415ef5fffe65a24d09ee (cherry picked from commit 533e97947d82f780d5b1b7a02138d738b2435a56)
2015-06-29fix crash on exporting kde140265-1.doc to ODTMiklos Vajna1-1/+1
properties.pSGlobalShell can be legitimately 0 here. No testcase, for some reason the export does not crash if it's done by CppunitTest_sw_filters_test or CppunitTest_sw_odfexport; but it does crash with '--headless --convert-to odt kde140265-1.doc'. Change-Id: I50936f9e5236763cc987aba14d8fc897c4b789bf (cherry picked from commit 4cd3f9a7749b8ef285012a59d031dc9f2e4b5e43)
2015-06-29SwPageFrm::MakeAll: use vcl::RenderContextMiklos Vajna19-39/+39
One tricky part is that in generic SwFrm methods SwRootFrm may not have a shell and doesn't need a vcl::RenderContext, either; so check for that situation explicitly where the frame may be a root one. Change-Id: I48f39fb7195290393fca34f75d8798fb5f960f46 (cherry picked from commit a3413204d2eb0563a4a2e1104905951f81e417bc)
2015-06-29SwTextFrm::Format: use vcl::RenderContextMiklos Vajna28-43/+44
Change-Id: I468d662a612c951dc1482cfc685dee800bb11f82 (cherry picked from commit 05e50b570f602c17218bb6e82bcaac2fbdd943c1)
2015-06-29SwTextFrm::_Format: use vcl::RenderContextMiklos Vajna2-4/+4
Change-Id: Ia37257286cce7a4a4a6fdffd2dd0d896d46db548 (cherry picked from commit 6b88a6501a4de7aeb02da8f5efed28925aafc144)
2015-06-27tdf#89890 DOCX import: fix too large num pic bulletMiklos Vajna3-1/+24
Reading SwWW8ImplReader::CoreLoad()'s "update graphic bullet information" block, it turns out that the numbering picture bullet's height should be independent from the supplied bitmap, and only its aspect ratio should be respected. (cherry picked from commit eab89b7f024a8c86decdcb3362c40c40a7df37df) Change-Id: I1300aa0397a8098df2a3170af795fbba47fd2a9e Reviewed-on: https://gerrit.libreoffice.org/16502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2015-06-26crashtesting: fix asserts on exporting fdo66304-1.odt to docCaolán McNamara3-0/+30
Change-Id: Ia08207143d27f88d09bd45e64ba7c3c12cd2c1a1 (cherry picked from commit acdf113baf04263a03d574eac9a8c09f98598b7a) Reviewed-on: https://gerrit.libreoffice.org/16468 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-06-26SwTextFormatInfo::SwTextFormatInfo: use vcl::RenderContextMiklos Vajna6-14/+15
(cherry picked from commit 54106fae68149c0b1dbb4f6ece133fefacacc322) Conflicts: sw/source/core/text/frmform.cxx Change-Id: I8ff1647bdf8c46d395c398c97b97066d7b128cdb
2015-06-26SwTextFormatInfo::CtorInitTextFormatInfo: use vcl::RenderContextMiklos Vajna3-5/+5
Change-Id: I0f775bdfaf6a098be25d053f87b1bcf86d533297 (cherry picked from commit a5fe6ea091ae7e897b11b62b9b749b6194d34585)