summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2015-06-03SwView::SearchAndWrap: fix WrapAround search in fly framesMiklos Vajna
First, SttDoc() / EndDoc() is the implementation of Ctrl-Home, i.e. it goes to the start of the current text (like a fly frame), not to the start of the whole document. When wrapping around, we want the later. Second, if the normal search have two passes, first searching in the body text, then searching in the special sections, then the wrap-around search should do the same. Change-Id: I0b7466c80476f6fb45174be19215a5d68374d047 (cherry picked from commit c88802829832a315550cb7e19e17030dc4c2bd77)
2015-06-03CppunitTest_sw_tiledrendering: add TextFrame search testcaseMiklos Vajna
Fails without commit 2d17cd6b03a214393755ddfed5ba50a18f0cd774 (sw: LOK_CALLBACK_TEXT_SELECTION should be the union of all selections, 2015-06-02). Change-Id: I1d45eabf53dadd24051ff46acbf4bbfb85fb60a9 (cherry picked from commit 3f3ea9fadd6dc643fbd12e99075a23d59ff73207)
2015-06-03CppunitTest_sw_tiledrendering: add search start point testcaseMiklos Vajna
Fails without the sw/source hunk of commit 1dc60bc9e99304c58007bfd5a964ff3f78480106 (SvxSearchItem: add m_nStartPoint{X,Y}, 2015-05-28). Change-Id: I7b13294760a8a3c9c413a4a11582bc2a14d3d499 (cherry picked from commit 54619b4fa1cc477c92d0fa48cafffefe1b15a8fe)
2015-06-03LOK: add DOCUMENT_SIZE_CHANGED testcaseMiklos Vajna
This failed without the SwViewShell::SizeChgNotify() hunk of commit 63a40c45018ad2e6f4a660a520a5907beb1d7801 (LOK: change PAGE_COUNT to a more generic DOCUMENT_SIZE, 2015-05-27). Change-Id: Id230420f60d1a6f3caf822f7e23ffca010919196 (cherry picked from commit 560c3fdca41843c29ea33c1e9c14429537f4e4b6)
2015-06-03tdf#91228 Fix Writer crashPhilippe Jung
Start Writer, Insert Image, Anchor as character, Go after image, press enter, writer crash This is because m_pAnchoredFly is not updated. JoinPrev, JoinNext and SplitContentNode all rely on CutText with calls InsertHint. InsertHint calls SetAnchor. SetAnchor calls Modify callback except if "LockModify"ed. This patch ensures that, whatever the value of LockModify, the references are kept correct. Change-Id: Id7254784c6954db4b542b2c4228b388fb924bbc2 Reviewed-on: https://gerrit.libreoffice.org/16041 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 9f01951b858453684f2622541af0eb85d4544fc6) Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-06-02sw: LOK_CALLBACK_TEXT_SELECTION should be the union of all selectionsMiklos Vajna
E.g. if searching for a keyword and it's inside a text frame, then we have two cursors: one is an empty selection at the anchor point, and the other is the real selection. What happened is that we emitted two events for the two cursors, instead of merging them together. Fix the problem by not emitting the events in SwSelPaintRects::Show(), instead do it at once in SwShellCrsr::Show(). Change-Id: Ie2c7691aaaea7ba8a32b5cfa718a45cba571f791
2015-06-02tdf#91592 WRITER crashes when navigating through commentsPhilippe Jung
without rSh.EnterStdMode, the image is selected and it has no GetTextNode. Change-Id: I91ed5a1ed002a04919042f4df22c49d3189daccd Reviewed-on: https://gerrit.libreoffice.org/15952 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 4826007f0e09160ffdb592d10b65eb262ada18c8) Reviewed-on: https://gerrit.libreoffice.org/16031
2015-06-02tdf#79639 DOCX import: don't delay text frame conversion of in-header tablesMiklos Vajna
Floating tables may or may not be converted to table-in-textframes during import, depending on if we guess that it'll be a multi-page table with minimal wrapping or a real wrapped table. If the floating table is in a header or footer, then it won't be a multi-page one, so can do the conversion right away. Change-Id: I8d5ff8c5fe00037d5cef92dea6b54de6806214bc (cherry picked from commit 81ef96a2417c7843dfed0558c920ad3064e58921)
2015-06-01dispose SfxControllerItem objects correctlyLászló Németh
Change-Id: Id5f80e06e5609b4e85f3d6db7bc37aabe6ef0dac Reviewed-on: https://gerrit.libreoffice.org/15976 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-05-31tdf#81475 Additional work on the formatting and draw toolbarYousuf Philips
Change-Id: Idf8c389915e880cbc4246743d2b6a70d4e99f2e2 Reviewed-on: https://gerrit.libreoffice.org/15992 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com> (cherry picked from commit 1a8e9dae32997bf199dbd192058fcd8f187ddc49) Reviewed-on: https://gerrit.libreoffice.org/15997 Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org> Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-05-30tdf#91438 Rename uno commands in toolbar xml and fix iconsYousuf Philips
Change-Id: Iabb6812e45d00f9dbee8d938225f26397e9120ba Reviewed-on: https://gerrit.libreoffice.org/15882 Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com> (cherry picked from commit 3fda0da0e97459505d2c549018a6b7ec68529a89) Reviewed-on: https://gerrit.libreoffice.org/15983 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-05-29VclPtr: tdf#91396 crash after tool options and sidebar switchingCaolán McNamara
Change-Id: I86c23ffc08c8dec275608d9bc0bbe5eaf7ce0993 Reviewed-on: https://gerrit.libreoffice.org/15986 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-29convert WINDOW_POSSIZE constants to scoped enumNoel Grandin
Change-Id: Id85137ffc7309a66b04132d588d289db136117b9 Signed-off-by: Jan Holesovsky <kendy@collabora.com>
2015-05-29convert POINTER constants to scoped enumNoel Grandin
Change-Id: Iea29ce5fd6c620535197d3ca8538335078430e19 Reviewed-on: https://gerrit.libreoffice.org/15825 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> Signed-off-by: Jan Holesovsky <kendy@collabora.com>
2015-05-29pass RenderContext into writer paintingTomaž Vajngerl
Change-Id: Ib2d986d05dc7db1b65ed29ea295807d6f20cea4a Signed-off-by: Jan Holesovsky <kendy@collabora.com>
2015-05-29fix Invalid Read on conversion of ooo95991-1.odt to pdfCaolán McNamara
"Prepare" can delete the Portion belonging to the SwTxtFrm and replace it. Prepare knows this and re-fetches it if that happens. But Prepare can call itself and the outermost Prepare doesn't know that the innermost Prepare replaced the SwTxtFrm (and re-fetched it for the remainer of the innermost Prepare). So bubble out that it was re-fetched so the outer most one re-fetches too Invalid read of size 1 SwParaPortion::SetPrep(bool) (porlay.hxx:299) SwTextFrm::Prepare(PrepareHint, void const*, bool) (txtfrm.cxx:1805) SwContentFrm::MakeAll() (calcmove.cxx:1317) SwFrm::PrepareMake() (calcmove.cxx:340) SwFrm::Calc() const (frame.hxx:1004) CalcContent(SwLayoutFrm*, bool, bool) (fly.cxx:1465) SwLayoutFrm::FormatWidthCols(SwBorderAttrs const&, long, long) (wsfrm.cxx:3306) Address 0x2137c850 is 832 bytes inside a block of size 840 free'd free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) rtl_freeMemory_SYSTEM(void*) (alloc_global.cxx:277) rtl_freeMemory (alloc_global.cxx:347) rtl_cache_free (alloc_cache.cxx:1222) FixedMemPool::Free(void*) (mempool.cxx:48) SwParaPortion::operator delete(void*, unsigned long) (in /home/caolan/LibreOffice/core/instdir/program/libswlo.so) SwParaPortion::~SwParaPortion() (porlay.cxx:1967) SwTextFrm::ClearPara() (txtcache.cxx:106) SwTextFrm::Init() (txtfrm.cxx:339) SwTextFrm::CalcLineSpace() (txtfrm.cxx:792) SwTextFrm::Prepare(PrepareHint, void const*, bool) (txtfrm.cxx:1724) SwTextFrm::Prepare(PrepareHint, void const*, bool) (txtfrm.cxx:1706) SwContentFrm::MakeAll() (calcmove.cxx:1317) SwFrm::PrepareMake() (calcmove.cxx:340) SwFrm::Calc() const (frame.hxx:1004) CalcContent(SwLayoutFrm*, bool, bool) (fly.cxx:1465) SwLayoutFrm::FormatWidthCols(SwBorderAttrs const&, long, long) (wsfrm.cxx:3306) Change-Id: I1fdade2846e3cbd2e73be1f58d2597e9358fa0ea (cherry picked from commit f703201d35f6e77940f68a21b339f67335b99441)
2015-05-29SvxSearchItem: add m_nStartPoint{X,Y}Miklos Vajna
The idea is that if you have your cursor at the begining of a Writer document, and you scroll down a lot, then search, then it's annoying that search jumps back to the start of the document for the first hit. Add an optional way to provide what is the starting point of such a search, so we can have "when nothing is selected, then search from the top left corner of the visible area". No UI yet to enable this, but available via the UNO API. Change-Id: Ibcf3a5f2eeba1372b1dfe8474081e6591a6e0134 (cherry picked from commit 1dc60bc9e99304c58007bfd5a964ff3f78480106)
2015-05-28Rewrite all calls like Dialog(params).Execute()Philippe Jung
Replace all calls looking like ADialog(some params).Execute() by ScopedVclPtrInstance<ADialog>::Create(some parms)->Execute() Change-Id: I0b6f0a9ea5ef0a749ffa30ce131e9dc989604639 Reviewed-on: https://gerrit.libreoffice.org/15915 Tested-by: Jenkins <ci@libreoffice.org> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-05-28LOK: change PAGE_COUNT to a more generic DOCUMENT_SIZEMiklos Vajna
Change-Id: If94af4072c321358d7bd4d678eeed181dc0f44db (cherry picked from commit 63a40c45018ad2e6f4a660a520a5907beb1d7801)
2015-05-28SwXTextDocument::initializeForTiledRendering: allow having different defaultsMiklos Vajna
SetHardBlank() configures the gray background for non-breaking spaces. Change-Id: I779503189085cc6537b776deb3d30cb93b316acd (cherry picked from commit e3b0bae416b22f6dbf0a63efb645dadf75763a9c)
2015-05-27Resolves: tdf#91403 no wrtshell during initial layoutCaolán McNamara
(cherry picked from commit ff44502d836880d2bdb057e7fdfd9b5abeb87842) Change-Id: I0d0b8027e07f9dc2dfff584abd026d1b496d93dd
2015-05-27tdf#91145: Set Cell Background Color in Table Broken in Writer 5.0Bjoern Michaelsen
- iterate over PaMs, not over Shells - regression from 0ed7c8b55a026d7d98f9c994ad5e8626dd9504b2 Change-Id: I33ea486d416a7e64fd97938ce09492209c102c88
2015-05-27Fix accidental mis-uses of VclPtr address-of operatorStephan Bergmann
Change-Id: I3a82423378d3198a25f90ddfbf42af55d85c96fb (cherry picked from commit 668408fa1c69eaf0f0a37f24e2ec8b4a38fe3db7, w/o the accidentally included sw/htmlexport-swobjects.patch)
2015-05-27SwPaM::Find: fix backwards-search in shape textMiklos Vajna
Change-Id: I79157853d16ead4cb4147763ef0590702b3d8be6 (cherry picked from commit 122b149826d270b8cbb26e2044f8da25b1d29c25)
2015-05-27loplugin:unreffunStephan Bergmann
Change-Id: Ib7311448e15d23b041ebb4552df80046523a32f2 (cherry picked from commit 077cd88f2da8538e4e89bce2614d6662ccfedce2)
2015-05-27CppunitTest_sw_tiledrendering: disable the search test on non-Linux for nowMiklos Vajna
Change-Id: Iae2de9b9ada2046beca29990a8abda09947d7b34
2015-05-27Add SwTiledRenderingTest::testSearch() testcase.Miklos Vajna
Fails if the last hunk of commit bdc1824ea7acfa2fe9d71cdbe57882acce155577 (SwPaM::Find: search in shapes anchored to the range, 2015-05-19) is reverted. Change-Id: Id239e781ce493ee8952bcd9a018aa78146933433 (cherry picked from commit 01d422d8659d1b19676de16b199c3438a148506f)
2015-05-26unit test for DOCX import fix of vertical pos. of inline imagesLászló Németh
(regression of commit ab81e3bff2a1844be67209bc8947d539edbaf8e6) Change-Id: I329e68e7ecb9fd30de238f31c73f8de04efde9da Reviewed-on: https://gerrit.libreoffice.org/15917 Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org> Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-05-26tdf#91389 EDITING: Crash when deleting headerPhilippe Jung
Replaced MyDlg(pParent).Execute by VclPtr equivalent Change-Id: I7e03913665f770d694f53949e08425ba60adc6ad Reviewed-on: https://gerrit.libreoffice.org/15908 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-05-26Audit all PostUserEvent calls and instrument for VclPtr.Michael Meeks
Hold a reference on the VclPtr while we're waiting for the UserEvent. Change-Id: I55c2671ca12eb14761c6a7dffd551af71547ecbd
2015-05-26tdf#90315 RTF import: fix \colsx default valueMiklos Vajna
See SectPageInformation::mnColsx on the libreoffice-3-6 branch + the spec agrees, too. Change-Id: I6f70a125f8d962621f319e3e75e2865e5f126859 (cherry picked from commit e18adb7369d140f33b947668a69da2fa78738e7b)
2015-05-26SwView::UpdatePageNums: add LOK callback about page count changeMiklos Vajna
Change-Id: If9ab69c9f3ec3f9f518738792ff020ef4cfd6390 (cherry picked from commit fb2e4da0e20fea3c085ddec899376e7f3671e1b1)
2015-05-26SwPaM::Find: forgot to show the cursor after ending the text editMiklos Vajna
Without this, if you searched inside a shape, then got a next hit outside the shape, you didn't get your blinking cursor even if you clicked into the writer text. Change-Id: I053af9672dc9290728b16780f21301b3b840cb55 (cherry picked from commit 1633fb2651e32f3dab5104b11074e7904cdcbec3)
2015-05-25tdf#90882 Add table insert uno commands to menu bar and fix labelsYousuf Philips
Change-Id: I4f5f2daeb27b8ba486abc685e42596030de6d2d1 Reviewed-on: https://gerrit.libreoffice.org/15863 Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com> (cherry picked from commit 54b9bdc7b14b75f93a043c9af60ae605e57b194d) Reviewed-on: https://gerrit.libreoffice.org/15881 Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org> Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-05-25tdf#81475 Additional improvements to Writer's toolbarsYousuf Philips
Change-Id: Ibf64cecd88faca1dce7f081a630faabd0ee76046 Reviewed-on: https://gerrit.libreoffice.org/15860 Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com> (cherry picked from commit 89f7a5670ae0b21c8a80f73d27b5bc1181021373) Reviewed-on: https://gerrit.libreoffice.org/15864 Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org> Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-05-25fix assert on export of ooo40760-1.sxw to docxCaolán McNamara
and a pile more Change-Id: I7334233c789bb0ed7a60387ef7d84dd34ab5a187 (cherry picked from commit 3185b6c8caf97afa602c864f588d079cbbe04038)
2015-05-23tdf#91429 do not convert ooxml preset shape modifier valuesAndras Timar
Revert "Resolves: #i124703# adapt coordinate range from ms relative..." This reverts commit c764a3d978beb2e6197a8d3f7df53d81ebf72467. The reverted commit did not fix anything in LibreOffice in the first place. The document referenced in #i124703# is as good without the patch as with it. But it caused a regression. Conflicts: oox/source/drawingml/customshapeproperties.cxx Change-Id: I65eb114423039e9c9c684cc55009275fd06caacd Reviewed-on: https://gerrit.libreoffice.org/15875 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit da0a44b415f630ce39617b8c8f0c366177a7705e)
2015-05-22tdf#90946: sw: ODF import: ignore invalid gradient-name if style SOLIDMichael Stahl
The bugdoc has a fill-gradient-name that refers to a non-existent gradient and also draw:fill="solid"; handle this combination without exception. Change-Id: I2c912b28a6b1550e2e4c6c71ff8889ae1779c618 (cherry picked from commit 00eab70295cbce40368d57224c3f51c6e5f2457e)
2015-05-22tdf#91140: tweak fix a bit, turns out xmloff was also passing empty URLMichael Stahl
Change-Id: Ia6e1fbe18e72c9c06915e1b437076a1f56a6c206 (cherry picked from commit 12f907da9535ae9fb28fb7ef1b05240eabf51e82)
2015-05-22sw: avoid CrossRefBookmark assertion when importing ooo83574-1.docMichael Stahl
One of the thousands of redlines in the document contains a paragraph that has a cross-ref bookmark on it. At the end of the import the redlines get hidden, i.e. copied and deleted from the body. Because this redline starts in the middle of a paragraph, the CrossRefBookmark on its last paragraph gets its position corrected onto the middle of a paragraph, and it becomes unhappy and asserts. Probably this can only happen in WW8 import, since other imports insert the redline data into the redline area in the nodes array. Change-Id: I5bfd94cacf9c2e76fd646728a123b3297b47c255 (cherry picked from commit 27384cdf7df20d6bc46e5d028f27be41b49b0f02)
2015-05-22sw: fix -Werror=shadowMiklos Vajna
Change-Id: I8ad37290a2b5dab41d180799f9e5ec7d603952ba
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-20tdf#76941 and tdf#87539: docx export image greyscale, watermark, black&whiteJoren De Cuyper
Thanks to Miklos :) Change-Id: Ib6344ff654e39bf712d7071545573fb2ec525b63 Reviewed-on: https://gerrit.libreoffice.org/15733 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-05-20tdf#85911 docx: export comment initialsJoren De Cuyper
Change-Id: I1437c197312911a15a50715235d840b24117bfba Reviewed-on: https://gerrit.libreoffice.org/15742 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-05-20SwEditWin::MouseMove: ignore visual area when tiled renderingMiklos Vajna
With this, it's possible to do mouse-button-down + move several times + mouse-button-up desktop-style selection of Writer text. Change-Id: If0711c5d397a8342b31c9b5448bf6223990529e4
2015-05-20tdf#90882 Writer: insert row/col before/afterPhilippe Jung
From the contextual menu, it is now possible to insert rows or cols before the current position. Number of rows/cols inserted is based on current selection. Change-Id: Ie1a718fbb1b8caf67716f9c8fad21f90d182ca79 Reviewed-on: https://gerrit.libreoffice.org/15773 Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com>
2015-05-20LOKit mouse move handlerMihai Varga
Change-Id: I783bf782df66329ea4a1f78346aa2c36b9e4e425 Reviewed-on: https://gerrit.libreoffice.org/15799 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-05-20fiX OSX buildNoel Grandin
Change-Id: I5dafc2c8a76356a7bbb258ec9563085d8f2b05cc
2015-05-20fix OSX buildNoel Grandin
Change-Id: I5f2ce7043802963c5fa41f0710c176a270e2d23b
2015-05-20convert DEFAULTCONSTANT constant to scoped enumNoel Grandin
Change-Id: I5ebd77edfa29d6c6c7acea37e826ef1d625916c3