summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2017-08-11Resolves: tdf#111571 crash on restarting writer with modeless biblio dialogCaolán McNamara1-2/+2
Change-Id: I2663f84c28721f61c1ed7c8d92a228cafa8f1177 Reviewed-on: https://gerrit.libreoffice.org/41037 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-08-11tdf#105705 sw: fix another case of bookmarks becoming un-sortedMichael Stahl1-0/+4
The loop in SwTextNode::Update() that reassigns bookmark end positions away from the node to a temporary SwIndexReg can stop prematurely in a particular situation where there is a bookmark that is expanded and with both mark positions at the critical "rPos" insertion position, and also both their SwIndexes consecutive in the SwIndexReg::m_pFirst linked-list. What happens then is that the iteration gets to the first of the 2 consecutive positions of the bookmark, then calls GetMarkEnd() on the mark, which happens to return the other position, which is already stored in the "next" local variable. That other position is then moved to aTmpIdxReg, and in the next loop iteration GetNext() is null as it is the last one in aTmpIdxReg and the loop terminates. Thus various bookmark end positions don't get preserved, or the bAtLeastOneExpandedBookmarkAtInsertionPosition doesn't get set, either of which can cause the bookmark array to lose its sort order. This was found playing around with Zotero 4.0.29.10, while switching between different citation styles. (regression from 6a5dbe73537642b06bcde782118a34b4593d17eb) Change-Id: Ia35ce0656bcb2d6af7ea189458af3942ff83e4da (cherry picked from commit f78aadea74b99ba71f930c7cf52352da9ee965e9) Reviewed-on: https://gerrit.libreoffice.org/41015 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-10tdf#109314 the same Watermark for first pageSzymon Kłos1-149/+158
Change-Id: I37e0ab40bd76c34a52751d10bc5857c357ad52e9 Reviewed-on: https://gerrit.libreoffice.org/40501 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit a6698b9fd558ab48f2314b4ce3170175acade9b4) Reviewed-on: https://gerrit.libreoffice.org/40525 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-10Resolves: tdf#33692 drawing objects not visible after creation via ctrl+dragCaolán McNamara1-3/+4
Reviewed-on: https://gerrit.libreoffice.org/40457 Tested-by: Julien Nabet <serval2412@yahoo.fr> 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 fe3b0468884c3206f527f2afffbcb25482232452) Change-Id: Iecdff08b36ebee0135c6cac1882702fc4d6dd087 Reviewed-on: https://gerrit.libreoffice.org/40715 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-08-09Resolves: tdf#99286 for jpeg dpi use apis that know about MapUnit::MapPixelCaolán McNamara1-15/+3
move the code which can do this from sw to vcl Change-Id: I9940fb80ecdbfe8f70afc500c691288ed0993701 Reviewed-on: https://gerrit.libreoffice.org/40931 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-08ofz#2877: crash in SVTB16ShortCaolán McNamara1-1/+1
sal_uInt16 wraparound Change-Id: Ifd791bdd5f1b96576fdd4ca6665bb972fb8b1e4c Reviewed-on: https://gerrit.libreoffice.org/40852 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-08-02tdf#95489 use internal name for quotation character styleYousuf Philips2-2/+2
Change-Id: Ie52d1b558480be1c916ea1a0a4bdab26a5b72cb0 Reviewed-on: https://gerrit.libreoffice.org/40552 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-02tdf#107723 Import font name from text portions in shapesSamuel Mehrbrodt2-0/+11
Change-Id: Ib9b73b5c05ec2e6846ea3adc950ccab5d1c0a9b0 Reviewed-on: https://gerrit.libreoffice.org/40439 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 178b361c6379bc963c8a48925f1807c583f2d09f) Reviewed-on: https://gerrit.libreoffice.org/40528 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-02tdf#108944 writerfilter: fix missing footnote separatorJustin Luth1-0/+3
Fix regression from e79ef12b7a904f17d4147fa409d055c12b70f952 tdf#107033 DOCX import: fix unexpected missing footnote separator. Initially related to tdf#68787. If HandleMarginsHeaderFooter was called twice, then it automatically would have disabled the separator. Clearing the HasFtn/HasFtnSep flags also shouldn't be run when in the footnote sections. Change-Id: I00cbd1cbc8dc86edf426f852c59c3f943e373b13 Reviewed-on: https://gerrit.libreoffice.org/40551 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 6f57c09aadd40009173f8ae3654004dd0cad9fb8) Reviewed-on: https://gerrit.libreoffice.org/40588 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-02tdf#109790 RTF import: keep remembering paragraph style between \cell and \rowMiklos Vajna2-0/+24
This is the opposite situation as tdf#44715, where the problem was that style was not reset between in-cell paragraphs. Here we don't want to reset the paragraph style too early, so that direct (character) formatting isn't lost just because the theoretical end-of-row character would not have the same direct formatting. (cherry picked from commit aaa6a5202a447fb4e86d5f016d8e79fbc34a3ed7) Conflicts: writerfilter/source/rtftok/rtfdocumentimpl.cxx writerfilter/source/rtftok/rtfdocumentimpl.hxx Change-Id: I9bb54f37804f5889fb10504ae890362a2e42122c Reviewed-on: https://gerrit.libreoffice.org/40625 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-02tdf#108991 sw: fix crash due to not formatted but "valid" SwTextFrameMichael Stahl1-1/+9
SwTextNode::EraseText() on the paragraph at the start of the selection notifies the SwTextFrame: 0 in SwFrame::ImplInvalidateSize() (this=0x3088a20) at sw/source/core/layout/wsfrm.cxx:1568 1 in SwFrame::InvalidateSize() (this=0x3088a20) at sw/source/core/inc/frame.hxx:849 2 in SwTextFrame::InvalidateRange_(SwCharRange const&, long) (this=0x3088a20, aRange=..., nD=-62) at sw/source/core/text/txtfrm.cxx:741 3 in SwTextFrame::InvalidateRange(SwCharRange const&, long) (this=0x3088a20, aRange=..., nD=-62) at sw/source/core/text/txtfrm.cxx:708 4 in SwTextFrame::Modify(SfxPoolItem const*, SfxPoolItem const*) (this=0x3088a20, pOld=0x0, pNew=0x7ffc8da38c50) at sw/source/core/text/txtfrm.cxx:1005 5 in SwClient::SwClientNotify(SwModify const&, SfxHint const&) (this=0x3088a20, rHint=...) at sw/source/core/attr/calbck.cxx:67 6 in SwModify::CallSwClientNotify(SfxHint const&) const (this=0x2f05550, rHint=...) at sw/inc/calbck.hxx:355 7 in SwModify::ModifyBroadcast(SfxPoolItem const*, SfxPoolItem const*) (this=0x2f05550, pOldValue=0x0, pNewValue=0x7ffc8da38c50) at sw/inc/calbck.hxx:176 8 in SwModify::NotifyClients(SfxPoolItem const*, SfxPoolItem const*) (this=0x2f05550, pOldValue=0x0, pNewValue=0x7ffc8da38c50) at sw/source/core/attr/calbck.cxx:142 9 in SwTextNode::EraseText(SwIndex const&, int, SwInsertFlags) (this=0x2f05550, rIdx=SwIndex (offset 1), nCount=62, nMode=SwInsertFlags::DEFAULT) at sw/source/core/txtnode/ndtxt.cxx:2355 10 in SwUndoDelete::SaveContent(SwPosition const*, SwPosition const*, SwTextNode*, SwTextNode*) (this=0x3052950, pStt=0x7ffc8da390b8, pEnd=0x7ffc8da39100, pSttTextNd=0x2f05550, pEndTextNd=0x2faefe0) at sw/source/core/undo/undel.cxx:387 However, at this point the first page, which contains this paragraph, is not visible; so the Action that is created in ViewShell::ImplEndAction() will skip over the first page and start at the 2nd page, which is the first visible one. Now it happens that the last paragraph in the document has a page break on it, and formatting it causes it to move forward (a new page to be inserted and the empty 2nd page to be deleted). Unfortunately it then decides to reset the mbValidSize flag on the preceding SwTextFrame, assuming that it was set by its own moving forward, and not already set before. 0 in ValidateSz(SwFrame*) (pFrame=0x3088a20) at sw/source/core/layout/calcmove.cxx:1082 1 in SwContentFrame::MakeAll(OutputDevice*) (this=0x308b4a0) at sw/source/core/layout/calcmove.cxx:1276 2 in SwFrame::PrepareMake(OutputDevice*) (this=0x308b4a0, pRenderContext=0x306f850) at sw/source/core/layout/calcmove.cxx:346 3 in SwFrame::Calc(OutputDevice*) const (this=0x308b4a0, pRenderContext=0x306f850) at sw/source/core/layout/trvlfrm.cxx:1760 4 in SwLayAction::IsShortCut(SwPageFrame*&) (this=0x7ffc8da394a0, prPage=@0x7ffc8da392b8: 0x7491e30) at sw/source/core/layout/layact.cxx:1085 5 in SwLayAction::InternalAction(OutputDevice*) (this=0x7ffc8da394a0, pRenderContext=0x306f850) at sw/source/core/layout/layact.cxx:490 6 in SwLayAction::Action(OutputDevice*) (this=0x7ffc8da394a0, pRenderContext=0x306f850) at sw/source/core/layout/layact.cxx:351 7 in SwViewShell::ImplEndAction(bool) (this=0x30829c0, bIdleEnd=false) at sw/source/core/view/viewsh.cxx:278 8 in SwViewShell::EndAction(bool) (this=0x30829c0, bIdleEnd=false) at sw/inc/viewsh.hxx:605 9 in SwCursorShell::EndAction(bool, bool) (this=0x30829c0, bIdleEnd=false, DoSetPosX=false) at sw/source/core/crsr/crsrsh.cxx:258 10 in SwActContext::~SwActContext() (this=0x7ffc8da396a0, __in_chrg=<optimized out>) at sw/source/core/edit/edws.cxx:159 11 in SwWrtShell::DelRight() (this=0x30829c0) at sw/source/uibase/wrtsh/delete.cxx:260 So at the end of the Action, the first page is still not valid, and the SwTextFrame has mbValidPos = false, but it does have mbValidSize = true. Then when the SwCursorShell::UpdateCursor() calls SwViewShell::MakeVisible(), which creates another Action, the SwTextFrame is not formatted and its SwTextPortions do not match the paragraph text content, which is the cause of the crash. Change-Id: I6e8153c574469a94d190fda8bc3007d17a474c7f (cherry picked from commit b1ad2ee35647ccd46b0bdb96c5ded09710e307be) Reviewed-on: https://gerrit.libreoffice.org/40503 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-02sw: fix string accesses in SwScanner::NextWord() (related: tdf#109081)Michael Stahl1-2/+10
getWordBoundary() can return bounds that do not include the starting nPos, if there are ZWSP characters at the starting position. This happens in the bugdoc of tdf#109081 where paragraph starts with 3 ZWSP and then 5 dashes, SwScanner is created from 0 to 1 and bounds are 3 to 8. Change-Id: I5fc41b98568a7211fc7d5f29bb87840371a4c005 (cherry picked from commit af78fa5f0d3d891b9a30e927a3b35c55f03a03a7) Reviewed-on: https://gerrit.libreoffice.org/40502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-02tdf#105705 sw: sort bookmarks in ContentIdxStoreImpl::RestoreBkmks()Michael Stahl2-0/+8
The problem here is that the SplitNode() calls in SwRTFReader::Read() destroy the order of the bookmarks, which causes an assert later from the std::lower_bound() when a new mark is created. The 2 marks that cause the problem are: SwPosition (node 5, offset 0) SwPosition (node 5, offset 0), SwPosition (node 5, offset 0) During the 2 SplitNode calls, the second one is corrected by ContentIdxStore and remains on 5, but the first one is not and becomes: SwPosition (node 7, offset 0) ContentIdxStoreImpl::SaveBkmks() does different things when a mark position is exactly on the parameter position: if it has only one position, it is ignored, but if it has a second position, then both its positions are corrected. It is not possible to change the sort order so that marks with one position are sorted behind marks with 2 positions, because while SplitNode() corrects marks "backward", JoinNode() uses ContentIdxStore to correct marks "forward"; hence manually sort the marks. Change-Id: If5b35f18bfd47ffe98c0f67e84d380ca801411a3 (cherry picked from commit f2d2093b2198bd4c65475a60329a5a6a7a8575f1) Reviewed-on: https://gerrit.libreoffice.org/40543 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-01tdf#109228: FILESAVE: ODT: Anchor changed to 'to character' after RTTamás Zolnai2-0/+6
Ignore frames without names, becuase the code does not handle them well. It does not affect those use case for which the deduplication code was added. Reviewed-on: https://gerrit.libreoffice.org/40222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 615c2a2c54d3e7aefb4986ae7d8de81a42022988) Change-Id: I08ad062b8b11cc06323467329d8c4e97bc4932dd Reviewed-on: https://gerrit.libreoffice.org/40232 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-28ofz#2759 null dereferenceCaolán McNamara1-4/+6
(cherry picked from commit 6f5841e60ed29ae2577e63623edacc9fe1467ba5) Change-Id: I23671f0cea592c92a05b34b3cf284a47a73962b1 Reviewed-on: https://gerrit.libreoffice.org/40505 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-27tdf#108951 RTF import: fix missing custom bullet typesMiklos Vajna2-0/+47
Regression from commit f528f9499bd91b700c549575e88fa102cfffede9 (tdf#106953 RTF import: fix missing paragraph left margin, 2017-05-16) where I fixed the parent of the ooxml::CT_NumPr_numId token at one place, but forgot to adapt RTFDocumentImpl::popState() accordingly. (cherry picked from commit 1e87e93132f808ab95eab932b36bfe40d3cc607a) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: Ibddd2486a50f284e11c2cd96339e7140b427aae1 Reviewed-on: https://gerrit.libreoffice.org/40385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-27tdf#99692 sw: fix bookmark positions in tables at start of redlinesMichael Stahl1-3/+10
The code assumes that if it can move the cursor backward in line 2038, that move can be "inverted" by moving the cursor forward after the content has been moved - but if the cursor moved back a node, and the moved content does not start with a SwTextNode, the cursor will move forward skipping over the non-text nodes, so offsets in the aSaveBkmks (and aSaveRedl, presumably) are going to be wrong. Just don't use Move() if it leaves the current node. Change-Id: I95278a10c14aeba9f76558486bb2712f6726dbcb (cherry picked from commit 850795942b3e168cab8ce88b4f2b421945ff29ca) Reviewed-on: https://gerrit.libreoffice.org/40418 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-27tdf#109202 Add mimetype to image elementSamuel Mehrbrodt2-0/+11
Browsers don't recognize base64 svg if the mimetype is missing. So we add the image mimetype to our flat odf export, which the xhtml export uses and transforms it into an xhtml document. Change-Id: I21aafdb97b4104e14e2d40abda73a526bb37041a Reviewed-on: https://gerrit.libreoffice.org/40371 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Reviewed-on: https://gerrit.libreoffice.org/40478 Tested-by: Jenkins <ci@libreoffice.org>
2017-07-25tdf#108867 sw: fix dangling text box frame format pointers in UndoMichael Stahl2-0/+19
If the text box is removed, the SwFrameFormat of the drawing shape still retains a pointer to the frame SwFrameFormat, and the latter is owned by the SwUndoFlyBase. This is pretty bad, so try to clear & reset the connection between them in SwUndoFlyBase::InsFly() and DelFly(). Hopefully nothing will actually delete the drawing shape SwFrameFormat while the Undo object is alive. Note that when the SwUndoInsLayFormat is created when the text box is added, the GetOtherTextBoxFormat() returns null as it's set later, that's why the constructor can't do anything. Change-Id: Iae562b6f8f272e47b2b5cf8ee80778db15d29ce0 (cherry picked from commit 2e486daff35ab16e810bfdafb24b19bcbf2fe8cd) Reviewed-on: https://gerrit.libreoffice.org/40270 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-25crashtesting: 554 crashing documents on export to .docCaolán McNamara1-2/+4
regression from... commit d72e0cadceb0b43928a9b4f18d75c9d5d30afdda Date: Mon Jun 19 15:32:16 2017 +0200 Watermark: tdf#91687 correct size in the .doc hopefully this fix is correct Change-Id: I17512ffdd4db605e79b3adb97551e6f4e3816f2f Reviewed-on: https://gerrit.libreoffice.org/39661 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 661fa18d424690e1c3bce4ac70a8018dabe82637) Reviewed-on: https://gerrit.libreoffice.org/40406
2017-07-20tdf#107975: Revert "fix deleting an image anchored to last paragraphMichael Stahl3-19/+5
... in document" This reverts commit 2903d85d6197829633d7f96c95cd55821c2c20ff. It was a good idea, but is not complete. Change-Id: Ia0da2640889ce6e78b89b27c75fae9d6508afd40 (cherry picked from commit 14d2255cbd254dea6e87a04f747e7d6d3d54ceb9) Reviewed-on: https://gerrit.libreoffice.org/40187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-20tdf#109197 crash when deleting user field variables in swNoel Grandin1-2/+5
regression from: commit a706bb06d5326e7a997dd1d71f3f947bd0ad28e6 "new loplugin: useuniqueptr: sw part 1" Change-Id: I57f9c9e6d7eeccc033b71d7182c960f3d79df73c Reviewed-on: https://gerrit.libreoffice.org/40244 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-20tdf#109080 First page header/footer ODF (1/2)Luke Deller3-0/+31
The proposal to add <style:header-first> / <style:footer-first> to the ODF standard has not yet been accepted, so meanwhile we should be using an extension namespace for these elements. This first commit (intended for backport) adds support for reading <loext:header-first> / <loext:footer-first> Change-Id: I616b6a0acaead9d767ae7d119e539b865f3a6774 (cherry picked from commit bff8cd3d52223002263dcb8c09758c4fc753b6e3) Reviewed-on: https://gerrit.libreoffice.org/40227 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-20tdf#109188 Always load documents read-only in SwOneExampleFrameSamuel Mehrbrodt1-1/+1
Should be no problem since 38a3743e0c5d52f9386f74097fd512d3133fbbe3 Change-Id: I0ce47bc2bdaa900559a16baf25305066977caa6d Reviewed-on: https://gerrit.libreoffice.org/40140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/40212
2017-07-18tdf#108955 RTF import: fix missing paragraph backgroundMiklos Vajna2-0/+18
See commit 1be0a3fa9ebb22b607c54b47739d4467acfed259 (n#825305: writerfilter RTF import: override style properties like Word, 2014-06-17) for the context. Here the problem was that details of the paragraph background were removed during the style deduplication, but not the paragraph background sprm itself. That was interpreted (correctly) by dmapper as "no background", rather than "inherit from style". (cherry picked from commit 138269391a9ac8cdc0c00b55e1fbc84a94c84a77) Change-Id: I88904cbd0a3c7686ede1f98d06df8fc875978afc Reviewed-on: https://gerrit.libreoffice.org/40131 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-18tdf#106132 DOCX import: fix handling of nested textbox marginsMiklos Vajna2-0/+7
drawingML shapes are independent, and having a separate parser for each shape is a good thing, so that when we have an XML fragment like this: <wps:wsp> <wps:txbx> ... </wps:txbx> <wps:bodyPr .../> </wps:wsp> where <wps:txbx> may contain nested <wps:wsp> tags, we apply the properties specified in <wps:bodyPr> to the correct shape. In contrast, doing the same for VML is not a good idea, see commit 476316bfc9dd36c0613327c20822a193b5ca8d9b (do reuse shape context, 2012-05-22). So conditionally (for DML) maintain a stack of shape parsers, this way the outer <wps:bodyPr> is parsed and the result is applied to the correct shape, at the end resulting in correct inner margin for the outer shape in the bugdoc. This requires moving the context setup code from the OOXMLFastContextHandlerShape ctor to setToken(), as only then we know if this shape context will be used for VML or DML purposes. This should be OK, given that writerfilter::ooxml::OOXMLFastHelper::createAndSetParentAndDefine() calls setToken() right after allocating the context. (cherry picked from commit 6f9f9491bdef676f969898bd653db9905d14f5e8) Change-Id: I8c0d2f49cac76589fe269230698b203b5ca6996c Reviewed-on: https://gerrit.libreoffice.org/39830 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-18Partially revert c1723a3b6Varun Dhall1-2/+3
The loop behavior was changed by the original commit instead of starting from 1 it started from 0 due to which it ends up saving Default Style and missed an important custom style Change-Id: I4853b70fbb6a24c9ccbd0b5713c6dbe4215830a6 Reviewed-on: https://gerrit.libreoffice.org/40093 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 315b6afc90298ac23de7d24449feae6beaade17a) Reviewed-on: https://gerrit.libreoffice.org/40129
2017-07-17sw: make SwGrfNode::mpReplacementGraphic swappableMichael Stahl2-0/+27
Same as previous commit, but for sw. (cherry picked from commit a03a0cfb1e41c357950a40623c2f8b6f5507e97d) loplugin:staticmethods (cherry picked from commit 3039b7cae36abb7e9bfffa4fbbba023721376568) Change-Id: Id678de3f512204437e37aaedf24e24aff7a9e592 Reviewed-on: https://gerrit.libreoffice.org/39968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-14tdf#109053: DOCX: Multipage table is not imported properlyTamás Zolnai2-0/+8
An other use case when converting to a "floating table" is not a good idea. In this case we can check whether next to the table anything fits in the text area. If not then we can avoid floating table conversion. Reviewed-on: https://gerrit.libreoffice.org/39811 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit fc55711f01af172eb3a034454405fa941454c781) Change-Id: I798a2f4c7a9dfe6aecbe4a73e3162b49ea5f0adc Reviewed-on: https://gerrit.libreoffice.org/39929 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-10Fix tdf#106029 - Add setting XML_doNotExpandShiftReturn when exporting to docxnikki3-3/+15
Change-Id: Ie8ffb0f2d5444c6ead13bdc894715c5a2e6d0baa Reviewed-on: https://gerrit.libreoffice.org/36485 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 9ad9c5183f348384b62ec88459a3a5922e423d83) Reviewed-on: https://gerrit.libreoffice.org/39735
2017-07-06tdf#108873 fix merge data handling in fieldsJan-Marek Glogowski3-3/+21
This is a regression from tdf#70346 / commit 4851cde7b98226b0f82ae2b191c290173e9b06c6 It added the whole DB row as variables to the SwCalc hash set. This works correct for conditionals when hiding sections, but not for conditionals used in fields - actually they break. Previously the field would do a fallback to query the DB again, if no variable was in the dict and the only possible variables in the dict could have been user-defined fields. This handles the added variables correctly for fields. Also fixes a bug to store the DB number values as number variables and adds the record number, as SwCalc::VarLook does. Change-Id: Ib0dbeda68234e671768ede55b2012235a3680276 Reviewed-on: https://gerrit.libreoffice.org/39509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit f54c6938f73b94fb6f722f3ea68454fee424e62e) Reviewed-on: https://gerrit.libreoffice.org/39612 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-07-06ofz: 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/39644 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-06Watermark: tdf#91687 correct size in the .docSzymon Kłos3-1/+16
Export: * Watermarks saved using Writer were very small in the MSO. Export fUsegtextFStretch property in the Geometry Text Boolean Properties. * tdf#91687: SnapRect contains size of Watermark after rotation. We have to export size without rotation. Import: * When import set height depending on used font and width. Text will keep the ratio. Remember the padding for export. * added unit test * introduced enum to avoid magic numbers for stretch and best fit properties. Change-Id: I3427afe78488d499f13c543ca401c096161aaf34 Reviewed-on: https://gerrit.libreoffice.org/38979 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit d72e0cadceb0b43928a9b4f18d75c9d5d30afdda) Reviewed-on: https://gerrit.libreoffice.org/39607 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-07-06sw: fix use-after-free in SwAccessibleMap::FireEvents()Michael Stahl1-0/+5
As seen when running JunitTest_sw_unoapi_3 against "make debugrun", the damn thing can call itself recursively via an odd corner case in GetContext(): 0 in SwAccessibleEventList_Impl::~SwAccessibleEventList_Impl() (this=0x9a6a170, __in_chrg=<optimized out>) at sw/source/core/access/accmap.cxx:498 1 in SwAccessibleMap::FireEvents() (this=0x8198bb0) at sw/source/core/access/accmap.cxx:3023 2 in SwAccessibleMap::InvalidateCursorPosition(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> const&) (this=0x8198bb0, rAcc=uno::Reference to (SwAccessibleParagraph *) 0x9a439d8) at sw/source/core/access/accmap.cxx:1069 3 in SwAccessibleMap::GetContext(SwFrame const*, bool) (this=0x8198bb0, pFrame=0x825ca10, bCreate=true) at sw/source/core/access/accmap.cxx:1925 4 in SwAccessibleMap::GetContextImpl(SwFrame const*, bool) (this=0x8198bb0, pFrame=0x825ca10, bCreate=true) at sw/source/core/access/accmap.cxx:1936 5 in SwAccessibleContext::InvalidateChildPosOrSize(sw::access::SwAccessibleChild const&, SwRect const&) (this=0x405a350, rChildFrameOrObj=..., rOldFrame=SwRect = {...}) at sw/source/core/access/acccontext.cxx:1196 6 in SwAccessibleMap::FireEvent(SwAccessibleEvent_Impl const&) (this=0x8198bb0, rEvent=...) at sw/source/core/access/accmap.cxx:898 7 in SwAccessibleMap::FireEvents() (this=0x8198bb0) at sw/source/core/access/accmap.cxx:3018 8 in SwViewShellImp::FireAccessibleEvents() (this=0x7744dc0) at sw/source/core/view/viewimp.cxx:460 9 in SwLayIdle::SwLayIdle(SwRootFrame*, SwViewShellImp*) (this=0x7ffc63395e30, pRt=0x7745120, pI=0x7744dc0) at sw/source/core/layout/layact.cxx:2267 Presumably all of mpEvents, mpEventMap and mpShapes must live until the outermost FireEvents() completes. Change-Id: I4e5a053035bf7fc12d9407913437d721889950ae (cherry picked from commit ddf8d9a150e3e1725de65577c48d47918b4b11a8) Reviewed-on: https://gerrit.libreoffice.org/39566 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-04tdf#105095 DOCX import: conditionally ignore leading tab in footnotesMiklos Vajna3-1/+16
Commit b38629ae210b204a6d24d6e9c5c62eaaf563d494 (cp#1000017 DOCX/RTF import: avoid fake tab char in footnotes, 2013-12-05) added code to strip leading tabs from footnote text to improve odt->docx->odt rountrip experience. Turns out that this is correct only in case the gap between the footnote number and the content is provided by a paragraph margin. In case there is no such margin, then the tab is wanted; so only conditionally ignore such leading tab characters. (cherry picked from commit abc440a691efb872afac385ce5ed28cd5db56c8c) Change-Id: I9d419bf2fd3b4899208489210cbe9809a2ab0736 Reviewed-on: https://gerrit.libreoffice.org/39494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-04tdf#108836 sw: don't enable Undo if Steps configured to 0Michael Stahl2-2/+10
It doesn't work. Change-Id: Iafc3eb50f481faffee60592aa3b6fd2ed4387b90 (cherry picked from commit 5c4a9dfdc01606e0a35c5e2809571d0f6f03df39) Reviewed-on: https://gerrit.libreoffice.org/39390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-04tdf#101821 sw: fix layout footnote use-after-freeMichael Stahl2-3/+38
After inserting a header in the bugdoc, during SwFrame::Calc of a SwTextFrame that is in a footnote, it decides move forward to the next page. This deletes the SwFootnoteFrame and SwFootnoteContFrame that lcl_FormatContentOfLayoutFrame() are iterating over. For want of a more elegant solution, use a big hammer to prevent the problem and try to clean up so that no empty SwFootnoteFrame and SwFootnoteContFrame remain (as that is known to crash in other places, see commit c9fb347642729017ad0c613fe26310befd021db8) Invalid read of size 8 at 0x414E1F96: SwFrame::GetNext() (frame.hxx:485) by 0x41AFDD07: lcl_FormatContentOfLayoutFrame(SwLayoutFrame*, SwFrame*) (objectformattertxtfrm.cxx:646) by 0x41AFDCC0: lcl_FormatContentOfLayoutFrame(SwLayoutFrame*, SwFrame*) (objectformattertxtfrm.cxx:642) by 0x41AFDCC0: lcl_FormatContentOfLayoutFrame(SwLayoutFrame*, SwFrame*) (objectformattertxtfrm.cxx:642) by 0x41AFDEA7: SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs(SwTextFrame&) (objectformattertxtfrm.cxx:696) by 0x41AAA680: SwFlyAtContentFrame::MakeAll(OutputDevice*) (flycnt.cxx:415) by 0x41A7F211: SwFrame::PrepareMake(OutputDevice*) (calcmove.cxx:346) by 0x41B75758: SwFrame::Calc(OutputDevice*) const (trvlfrm.cxx:1761) by 0x41AA8927: SwFlyFrame::Calc(OutputDevice*) const (fly.cxx:2559) by 0x41ADB36B: SwLayAction::FormatLayoutFly(SwFlyFrame*) (layact.cxx:1414) by 0x41AF9658: SwObjectFormatter::FormatObj_(SwAnchoredObject&) (objectformatter.cxx:321) by 0x41AFCB6E: SwObjectFormatterTextFrame::DoFormatObj(SwAnchoredObject&, bool) (objectformattertxtfrm.cxx:126) by 0x41AF9A6A: SwObjectFormatter::FormatObjsAtFrame_(SwTextFrame*) (objectformatter.cxx:443) by 0x41AFD275: SwObjectFormatterTextFrame::DoFormatObjs() (objectformattertxtfrm.cxx:328) by 0x41AF924A: SwObjectFormatter::FormatObjsAtFrame(SwFrame&, SwPageFrame const&, SwLayAction*) (objectformatter.cxx:191) by 0x41ADC213: SwLayAction::FormatContent(SwPageFrame const*) (layact.cxx:1633) by 0x41AD88DE: SwLayAction::InternalAction(OutputDevice*) (layact.cxx:760) by 0x41AD7080: SwLayAction::Action(OutputDevice*) (layact.cxx:351) by 0x41ADE32E: SwLayIdle::SwLayIdle(SwRootFrame*, SwViewShellImp*) (layact.cxx:2133) by 0x41FFC97E: SwViewShell::LayoutIdle() (viewsh.cxx:711) Address 0x505541a8 is 72 bytes inside a block of size 272 free'd at 0x4C2F21A: operator delete(void*) (vg_replace_malloc.c:576) by 0x41AD371A: SwFootnoteFrame::~SwFootnoteFrame() (ftnfrm.hxx:52) by 0x41B5B74C: SwFrame::DestroyFrame(SwFrame*) (ssfrm.cxx:391) by 0x41A97294: SwFlowFrame::CutTree(SwFrame*) (flowfrm.cxx:406) by 0x41A979AE: SwFlowFrame::MoveSubTree(SwLayoutFrame*, SwFrame*) (flowfrm.cxx:592) by 0x41ACFB69: SwContentFrame::MoveFootnoteCntFwd(bool, SwFootnoteBossFrame*) (ftnfrm.cxx:2756) by 0x41A9B78E: SwFlowFrame::MoveFwd(bool, bool, bool) (flowfrm.cxx:1813) by 0x41A85864: SwContentFrame::MakeAll(OutputDevice*) (calcmove.cxx:1681) by 0x41A7F211: SwFrame::PrepareMake(OutputDevice*) (calcmove.cxx:346) by 0x41B75758: SwFrame::Calc(OutputDevice*) const (trvlfrm.cxx:1761) by 0x41AFDCFB: lcl_FormatContentOfLayoutFrame(SwLayoutFrame*, SwFrame*) (objectformattertxtfrm.cxx:644) by 0x41AFDCC0: lcl_FormatContentOfLayoutFrame(SwLayoutFrame*, SwFrame*) (objectformattertxtfrm.cxx:642) by 0x41AFDCC0: lcl_FormatContentOfLayoutFrame(SwLayoutFrame*, SwFrame*) (objectformattertxtfrm.cxx:642) by 0x41AFDCC0: lcl_FormatContentOfLayoutFrame(SwLayoutFrame*, SwFrame*) (objectformattertxtfrm.cxx:642) by 0x41AFDEA7: SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs(SwTextFrame&) (objectformattertxtfrm.cxx:696) by 0x41AAA680: SwFlyAtContentFrame::MakeAll(OutputDevice*) (flycnt.cxx:415) by 0x41A7F211: SwFrame::PrepareMake(OutputDevice*) (calcmove.cxx:346) by 0x41B75758: SwFrame::Calc(OutputDevice*) const (trvlfrm.cxx:1761) by 0x41AA8927: SwFlyFrame::Calc(OutputDevice*) const (fly.cxx:2559) by 0x41ADB36B: SwLayAction::FormatLayoutFly(SwFlyFrame*) (layact.cxx:1414) by 0x41AF9658: SwObjectFormatter::FormatObj_(SwAnchoredObject&) (objectformatter.cxx:321) by 0x41AFCB6E: SwObjectFormatterTextFrame::DoFormatObj(SwAnchoredObject&, bool) (objectformattertxtfrm.cxx:126) by 0x41AF9A6A: SwObjectFormatter::FormatObjsAtFrame_(SwTextFrame*) (objectformatter.cxx:443) by 0x41AFD275: SwObjectFormatterTextFrame::DoFormatObjs() (objectformattertxtfrm.cxx:328) by 0x41AF924A: SwObjectFormatter::FormatObjsAtFrame(SwFrame&, SwPageFrame const&, SwLayAction*) (objectformatter.cxx:191) by 0x41ADC213: SwLayAction::FormatContent(SwPageFrame const*) (layact.cxx:1633) by 0x41AD88DE: SwLayAction::InternalAction(OutputDevice*) (layact.cxx:760) by 0x41AD7080: SwLayAction::Action(OutputDevice*) (layact.cxx:351) by 0x41ADE32E: SwLayIdle::SwLayIdle(SwRootFrame*, SwViewShellImp*) (layact.cxx:2133) by 0x41FFC97E: SwViewShell::LayoutIdle() (viewsh.cxx:711) Change-Id: I656cc2303eeccd5eef68ad3b8e81bb0fd47b94fb (cherry picked from commit 9dcb767c5bdccdf6606240afd6aa2c6bd3dcc9f4) Reviewed-on: https://gerrit.libreoffice.org/39102 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-04tdf#108826 sw: also handle RES_REMOVE_UNO_OBJECT in SwCallMouseEventMichael Stahl1-3/+5
This is sent from SwUndoFlyBase::DelFly(); the SwFrameFormat isn't deleted in this case but it's no longer part of the document, so an UI class like SwCallMouseEvent should stop pointing to it. Change-Id: I05349271d14bb1948ea30528cd85c68ed638f28e (cherry picked from commit e7c6301e707fcc461bdda5ac74c7499f568ff716) Reviewed-on: https://gerrit.libreoffice.org/39362 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-04tdf#101821 sw: layout: don't move endnotes into footnotes' containerMichael Stahl1-1/+2
The bugdoc has a single 1-column section from start to end, no footnotes but lots of endnotes, and the section has the settings "Footnotes - collect at end of text" unchecked and "Endnotes - collect at end of section" checked. This means that the SwFootnoteContFrame for footnotes would be put directly below the SwPageFrame (so that multiple sections on a single page can share it), but the SwFootnoteContFrame for the endnotes is put below the SwColumnFrame (which is created despite only 1 column) below the SwSectionFrame. Hence content in endnotes has the mbInfSct flag set, and the crash happens because the endnotes are moved from below the SwSectionFrame to a new SwFootnoteContFrame that is directly below a SwPageFrame, without clearing the mbInfSct flag. Fix the wrong call in SwFootnoteBossFrame::MoveFootnotes_() to FindFootnoteBossFrame() that resulted in the wrong (unsuitable for endnotes) SwFootnoteContFrame to be used as the target for the move. Change-Id: I64f6b86441e5ac1f16433f005e97c274a1c69dfa (cherry picked from commit 4c0b3520b66477334a7971dbed7ffcdcd265e749) Reviewed-on: https://gerrit.libreoffice.org/39101 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-29tdf#100075 DOCX frame height rule updatedVasily Melenchuk2-0/+17
According to "[MS-OE376]: Office Implementation Information for ECMA-376 Standards Support" Word treats default value for hRule attribute in a different way: if frame height is missing it is "auto" (as in specification), but if frame height exist, then default value for hRule is "atLeast". Change-Id: I0ce30b61d1a6b85febbbd8a6bf5af3eb1bb2767f Reviewed-on: https://gerrit.libreoffice.org/39065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit d5b19100ca4d3670d1b5367e8000739af60a6892) Reviewed-on: https://gerrit.libreoffice.org/39384 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-06-26ofz#2392 restored props don't match saved propsCaolán McNamara1-2/+13
Change-Id: Idb198f0121ac9c6b4083b157af07c5eb1cda66cb Reviewed-on: https://gerrit.libreoffice.org/39266 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-26tdf#98800 Enable Next button on the third page of the MM WizardGabor Kelemen1-0/+1
This seems to enable and disable the Next button even if the 'This page shall' checkbox is already enabled after a previous run. Change-Id: I9cba7649b9cd1df110c5a120d4eea3d97b3afcf1 Reviewed-on: https://gerrit.libreoffice.org/38553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 511c16bd8c8671f43d2ff93f845209e733c6ae4d) Reviewed-on: https://gerrit.libreoffice.org/39207
2017-06-23tdf#91781 Move watermark from insert to format menuYousuf Philips1-1/+1
Change-Id: I747562462accc49e7f3dc851e1ebb274e36b93d7 Reviewed-on: https://gerrit.libreoffice.org/38988 Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com> (cherry picked from commit 6ef59d7ace7e4db52caea601a384ed016365bcaf) Reviewed-on: https://gerrit.libreoffice.org/38990 Tested-by: Jenkins <ci@libreoffice.org>
2017-06-23tdf#101821 sw: fix layout footnote use-after-free in SwRootFrameMichael Stahl1-10/+14
The ClearSwLayouterEntries() accesses anchored objects and if they are anchored in footnotes then RemoveFootnotes() has already deleted them. (regression from 962d0500c4debaef43e5f146e47e08c66d851562) Invalid write of size 1 at 0x4143CCB3: SwAnchoredObject::SetTmpConsiderWrapInfluence(bool) (anchoredobject.cxx:739) by 0x414D8A21: SwObjsMarkedAsTmpConsiderWrapInfluence::Clear() (objstmpconsiderwrapinfl.cxx:58) by 0x414C943E: SwLayouter::ClearObjsTmpConsiderWrapInfluence(SwDoc const&) (layouter.cxx:401) by 0x411DBE57: sw::DocumentLayoutManager::ClearSwLayouterEntries() (DocumentLayoutManager.cxx:504) by 0x414D05D9: SwRootFrame::DestroyImpl() (newfrm.cxx:594) by 0x41535AB3: SwFrame::DestroyFrame(SwFrame*) (ssfrm.cxx:389) by 0x419E8171: std::_Sp_counted_deleter<SwRootFrame*, void (*)(SwFrame*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:464) by 0x40EB6DB5: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:150) by 0x40EB5E76: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (shared_ptr_base.h:662) by 0x419E65F9: std::__shared_ptr<SwRootFrame, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (shared_ptr_base.h:928) by 0x419E6615: std::shared_ptr<SwRootFrame>::~shared_ptr() (shared_ptr.h:93) by 0x419E619D: SwViewShell::~SwViewShell() (vnew.cxx:285) Address 0x5feb6eee is 334 bytes inside a block of size 488 free'd at 0x4C2F21A: operator delete(void*) (vg_replace_malloc.c:576) by 0x41488962: SwFlyAtContentFrame::~SwFlyAtContentFrame() (flyfrms.hxx:134) by 0x41535AFC: SwFrame::DestroyFrame(SwFrame*) (ssfrm.cxx:391) by 0x415360BD: SwLayoutFrame::DestroyImpl() (ssfrm.cxx:477) by 0x41535AB3: SwFrame::DestroyFrame(SwFrame*) (ssfrm.cxx:389) by 0x414A2FF4: sw_RemoveFootnotes(SwFootnoteBossFrame*, bool, bool) (ftnfrm.cxx:852) by 0x414A3104: sw_RemoveFootnotes(SwFootnoteBossFrame*, bool, bool) (ftnfrm.cxx:874) by 0x414A321A: SwRootFrame::RemoveFootnotes(SwPageFrame*, bool, bool) (ftnfrm.cxx:897) by 0x414D0558: SwRootFrame::DestroyImpl() (newfrm.cxx:585) by 0x41535AB3: SwFrame::DestroyFrame(SwFrame*) (ssfrm.cxx:389) by 0x419E8171: std::_Sp_counted_deleter<SwRootFrame*, void (*)(SwFrame*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:464) by 0x40EB6DB5: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:150) by 0x40EB5E76: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (shared_ptr_base.h:662) by 0x419E65F9: std::__shared_ptr<SwRootFrame, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (shared_ptr_base.h:928) by 0x419E6615: std::shared_ptr<SwRootFrame>::~shared_ptr() (shared_ptr.h:93) by 0x419E619D: SwViewShell::~SwViewShell() (vnew.cxx:285) Change-Id: I147f46d49c90de46189ad34feed66c289adddc15 (cherry picked from commit c7782c7c27d85866872cc24a618df02504ff12ca) Reviewed-on: https://gerrit.libreoffice.org/39103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2017-06-23Watermark: auto size in the RTFSzymon Kłos2-0/+417
When Watermark size is set to Auto in the MSO, the saved value is equal 1pt. Before this patch in this case Watermark was invisible due to small size. Change-Id: Ia2028a6547cf98dd31031305bcc5375625b83fe0 Reviewed-on: https://gerrit.libreoffice.org/38883 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit bd72163f21375cd216dcd25568b05527063ea726) Reviewed-on: https://gerrit.libreoffice.org/39131 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-06-21these checkbox group entries are mutually exclusiveCaolán McNamara3-30/+30
so they're closer to radio buttons than checkboxes though this isn't great either as there are possibilites that are not listed, in which case all are unchecked, and when is selected like buletting it cannot be turned off from the menu (cherry picked from commit 4d7054947d87174decf12ad204c09532f33599f8) Change-Id: Ifa9650cdde5575807c0bd876e859c3ba3748e580 Reviewed-on: https://gerrit.libreoffice.org/39008 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-06-20tdf#108416 RTF import: fix unexpected bold list numberingMiklos Vajna2-0/+26
Some paragraph-level run properties affect the current list style since commit 2123ede032ca64f696ef54af4ad3238974ca2b5d (n#758883 dmapper: paragraph-level run props should affect numberings as well, 2012-06-19). This was extended for any run properties in case of RTF since commit c1f8437dbed0e8b989e41a345ef7e658a6e8a4cd (fdo#83465 RTF import: handle font of numbering, 2014-09-25), as RTF doesn't really separate the paragraph-level and the other run properties. However, field formatting clearly should affect only the field itself, so disable this mechanism in that context. (cherry picked from commit 67a0889450daa6b9c9c799dab2d9da3a5044cb5d) Change-Id: I6df7488e99e44f3ba7e17bf09ce590c88151e043 Reviewed-on: https://gerrit.libreoffice.org/39013 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-19tdf#81475 Add separator before clone formatting buttonYousuf Philips2-0/+3
Also add some useful hidden commands for easy access for users to enable Change-Id: I28806047f2fac51995d88b7c204d54479471aa29 Reviewed-on: https://gerrit.libreoffice.org/38552 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com> (cherry picked from commit dc31c2335b2469630cdbcef4ba38a44e01408e27) Reviewed-on: https://gerrit.libreoffice.org/38572 Tested-by: Yousuf Philips <philipz85@hotmail.com>
2017-06-19tdf#85940 Use correct reference ID for QuotationXisco Fauli2-2/+2
Change-Id: I5c2ead67465c79fa30fc7d7db9d48748bdaf5491 Reviewed-on: https://gerrit.libreoffice.org/38961 Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com> (cherry picked from commit 60954fc67a022565741c4ccb4667581a5a790a10) Reviewed-on: https://gerrit.libreoffice.org/38967 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
2017-06-19tdf#85940 Add basic character styles to context menuYousuf Philips2-0/+12
Change-Id: Id25768dfd2c8db530a31ddf8a31108f9b5c67855 Reviewed-on: https://gerrit.libreoffice.org/38652 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com> (cherry picked from commit 41b8cdd0f4130f60027002f1d6daa9f6169b04d9) Reviewed-on: https://gerrit.libreoffice.org/38740 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>