summaryrefslogtreecommitdiff
path: root/sw/source
AgeCommit message (Collapse)AuthorFilesLines
2 hoursclang-tidy Undefined or garbage value returned to callerHEADmasterNoel Grandin1-2/+2
[clang-analyzer-core.uninitialized.UndefReturn,-warnings-as-errors] Change-Id: Idc8f2f4a3189a3a65c95740a12387d5df7c0bea6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115266 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
20 hoursref-count SfxItemPoolNoel Grandin3-14/+6
so we can remove SfxItemPoolUser, which is a right performance hog when we have large calc spreadsheets Change-Id: I344002f536f6eead5cf98c6647dd1667fd9c8874 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115247 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
40 hourssimplify SwAttrPool codeNoel Grandin1-34/+2
Change-Id: I1bf94fb65f75e80641df7485b228bd1c80870482 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115245 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
43 hourstdf#138518 sw: layout: unbreak fdo80206-1.docMichael Stahl1-1/+1
The 7 flys on the para on page 3 create ~15 extra pages with one paragraph each. Argh! One of the bPageHasFlysAnchoredBelowThis checks was inverted. How dumb of me. (regression from c799de145f7e289f31e3669646e5bd12814e6c5e) Still doesn't look good but now it looks same as in 7.0. Change-Id: Ib10c46f48746362d8d679c147ddc8b85157be508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115242 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2 dayscid#1401328 Uncaught exceptionCaolán McNamara1-3/+3
and cid#1401334 Uncaught exception Change-Id: I609ec44bf28db28e69533d7b795f705fa8a330f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115228 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2 daystdf#138518 sw: layout: fix assert on ooo43913-1.docMichael Stahl3-13/+19
Assertion `rAnchoredObjPage.GetPhyPageNum() == _nFromPageNum' failed. Because not only the fly's anchor frame moves forward in FormatAnchorFrameForCheckMoveFwd(), but also the fly itself, apparently because it's in a table: 0 SwAnchoredObject::SetPageFrame(SwPageFrame*) (this=0x5a1d3d8, _pNewPageFrame=0x8cfbeb0) at sw/source/core/layout/anchoredobject.cxx:162 1 SwPageFrame::MoveFly(SwFlyFrame*, SwPageFrame*) (this=0x8cbd8c0, pToMove=0x5a1d280, pDest=0x8cfbeb0) at sw/source/core/layout/flylay.cxx:985 2 lcl_ArrangeLowers(SwLayoutFrame*, tools::Long, bool) (pLay=0x8cf80c0, lYStart=179488, bInva=false) at sw/source/core/layout/tabfrm.cxx:5000 3 SwCellFrame::Format(OutputDevice*, SwBorderAttrs const*) (this=0x8cf80c0, pAttrs=0x8ce78c0) at sw/source/core/layout/tabfrm.cxx:5359 4 SwLayoutFrame::MakeAll(OutputDevice*) (this=0x8cf80c0) at sw/source/core/layout/calcmove.cxx:1036 5 SwFrame::PrepareMake(OutputDevice*) (this=0x8cf80c0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/calcmove.cxx:375 6 SwFrame::Calc(OutputDevice*) const (this=0x8cf80c0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/trvlfrm.cxx:1792 7 SwFrame::MakePos() (this=0x8cebdb0) at sw/source/core/layout/calcmove.cxx:627 8 SwTextFrame::MakePos() (this=0x8cebdb0) at sw/source/core/text/frmform.cxx:340 9 SwContentFrame::MakeAll(OutputDevice*) (this=0x8cebdb0) at sw/source/core/layout/calcmove.cxx:1412 10 SwFrame::PrepareMake(OutputDevice*) (this=0x8cebdb0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/calcmove.cxx:286 11 SwFrame::Calc(OutputDevice*) const (this=0x8cebdb0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/trvlfrm.cxx:1792 12 SwTextFrame::CalcFollow(o3tl::strong_int<int, Tag_TextFrameIndex>) (this=0x5ae2c60, nTextOfst=...) at sw/source/core/text/frmform.cxx:279 13 SwTextFrame::AdjustFollow_(SwTextFormatter&, o3tl::strong_int<int, Tag_TextFrameIndex>, o3tl::strong_int<int, Tag_TextFrameIndex>, unsigned char) (this=0x5ae2c60, rLine=..., nOffset=..., nEnd=..., nMode=1 '\001') at sw/source/core/text/frmform.cxx:611 14 SwTextFrame::FormatAdjust(SwTextFormatter&, WidowsAndOrphans&, o3tl::strong_int<int, Tag_TextFrameIndex>, bool) (this=0x5ae2c60, rLine=..., rFrameBreak=..., nStrLen=..., bDummy=false) at sw/source/core/text/frmform.cxx:1166 15 SwTextFrame::Format_(SwTextFormatter&, SwTextFormatInfo&, bool) (this=0x5ae2c60, rLine=..., rInf=..., bAdjust=false) at sw/source/core/text/frmform.cxx:1613 16 SwTextFrame::Format_(OutputDevice*, SwParaPortion*) (this=0x5ae2c60, pRenderContext=0x5b7fcf0, pPara=0x8d07490) at sw/source/core/text/frmform.cxx:1720 17 SwTextFrame::Format(OutputDevice*, SwBorderAttrs const*) (this=0x5ae2c60, pRenderContext=0x5b7fcf0) at sw/source/core/text/frmform.cxx:1910 18 SwContentFrame::MakeAll(OutputDevice*) (this=0x5ae2c60) at sw/source/core/layout/calcmove.cxx:1525 19 SwFrame::PrepareMake(OutputDevice*) (this=0x5ae2f80, pRenderContext=0x5b7fcf0) at sw/source/core/layout/calcmove.cxx:321 20 SwFrame::Calc(OutputDevice*) const (this=0x5ae2f80, pRenderContext=0x5b7fcf0) at sw/source/core/layout/trvlfrm.cxx:1792 21 SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs(SwTextFrame&) (_rAnchorTextFrame=...) at sw/source/core/layout/objectformattertxtfrm.cxx:905 22 SwObjectFormatterTextFrame::FormatAnchorFrameForCheckMoveFwd() (this=0x8ce5720) at sw/source/core/layout/objectformattertxtfrm.cxx:919 23 SwObjectFormatterTextFrame::DoFormatObjs() (this=0x8ce5720) at sw/source/core/layout/objectformattertxtfrm.cxx:368 24 SwObjectFormatter::FormatObjsAtFrame(SwFrame&, SwPageFrame const&, SwLayAction*) (_rAnchorFrame=..., _rPageFrame=..., _pLayAction=0x0) at sw/source/core/layout/objectformatter.cxx:160 25 SwContentFrame::CalcLowers(SwLayoutFrame&, SwLayoutFrame const&, long, bool) (rLay=..., rDontLeave=..., nBottom=192048, bSkipRowSpanCells=true) at sw/source/core/layout/tabfrm.cxx:1534 26 lcl_RecalcRow(SwRowFrame&, tools::Long) (rRow=..., nBottom=192048) at sw/source/core/layout/tabfrm.cxx:1653 27 SwTabFrame::MakeAll(OutputDevice*) (this=0x8cf5f80, pRenderContext=0x5b7fcf0) at sw/source/core/layout/tabfrm.cxx:2425 It looks like the _nFromPageNum is always from the SwObjectFormatter::mrPageFrame anyway because that's a precondition of the mpPgNumAndTypeOfAnchors->Collect() being called, so just rely on that to get the correct page. (regression from c799de145f7e289f31e3669646e5bd12814e6c5e) Change-Id: Ibdffb2121cffbc04320d17a29ab2e160dec4250b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115188 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
3 daysloplugin:unusedmethodsNoel Grandin1-29/+0
plugin code needed some updating because it was interacting badly with PCH code in pluginhandler::ignoreLocation Change-Id: I228f94a4e285747bd1d5b8536010f8617118cafa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
3 daysadd SfxItemPoolDeleter utilityNoel Grandin2-6/+4
add use so we can hold the pool with std::unique_ptr Change-Id: I685fbc37c0ae145a5b48a66a88eab9fb29a0fc0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115174 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
3 daysuse Label::set_label_type to designate a label as a warning/errorCaolán McNamara1-0/+1
To be consistent with other cases. weld::LabelType::Error is another option. What colors, if any, it results in isn't cast in stone, but be consistent in that all warnings (or errors) use the same ones. Change-Id: I6943aa6370cf6cead60cd404987e8211532143eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113529 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
3 daysFix typosAndrea Gelmini1-1/+1
Change-Id: Ibc86f8a76080b55dd7c5a458e2b8fa7ce534a4b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115164 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
3 daysReplace magic numbers in SwPageFrame::UpdateAttr_()Miklos Vajna1-9/+9
By using the same SwPageFrameInvFlags constants that SwPageFrame::SwClientNotify() already does. Change-Id: Ic07ce518901890367ce95080bf2a588697b8990b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115156 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
4 daysloplugin:constmethodNoel Grandin1-1/+1
Change-Id: I7913fd8144d521b8293ac43036d0fad82e457cd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115145 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
4 daystdf#142080 sw: layout: fix infinite loop in CalcContent()Michael Stahl1-5/+9
On page 9, SwSectionFrame::Format() calls CalcContent() and that formats all its content frames, then on SwTextFrame 91 SwObjectFormatter::FormatObj() fails becuase it moved forward. With commit c799de145f7e289f31e3669646e5bd12814e6c5e this now sets the o_rbPageHasFlysAnchoredBelowThis to true, which prevents a call to SwLayouter::InsertMovedFwdFrame(), and the flys anchored in next frames aren't moved off the page at this time. Then the loop starts over at the beginning of the SwSectionFrame, and frame 91 will be formatted again because the loop tries to format the first frame on the next page to see if it will move back; now the MoveBwd() isn't prevented any more so the result is the same failure in SwObjectFormatter::FormatObj(). Fix this by ignoring the bRestartLayoutProcess in case the current frame was originally on the next page and didn't move back (or, as is the case here, moved back and then forward again); it should just be formatted again on the next page. Once that happens, it will eventually be entered into SwLayouter::InsertMovedFwdFrame() too. This happens to fix another problem with this bugdoc too: the first column of the section on page 9 is empty. This also happens in LO 6.4 but not LO 6.1. An alternative would be to move the flys anchored below off the page as is done in SwLayAction::FormatContent() now but sections can be in flys or footnotes or headers so perhaps it should be done only at the top-level. (regression from c799de145f7e289f31e3669646e5bd12814e6c5e) Change-Id: I0965aebb4e3cec687f4e70f8d5e3aa8a55da3393 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115144 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
4 daysIntroduce SwPageFrameInvFlags to replace magic numbers in ...Miklos Vajna2-22/+38
... SwPageFrame::SwClientNotify() SwPageFrame::UpdateAttr_() is not yet updated to produce these. Change-Id: Id45162b11ca9bf60f0f0ae43fc22cc2086e0fd67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115114 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
4 daystdf#140969 Select in Navigator all document selected drawing objectsJim Raykowski2-14/+39
when in Drawing objects content navigation view Change-Id: If5d78453f36f035a93936490ab8c2cd4223f1feb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114811 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
5 daystdf#69635 DOCX: export hidden (shared) headers/footersDaniel Arato (NISZ)6-25/+106
Exporting to .docx used to lose all header and footer content that was not visible in the document at the moment of saving. This commit forces the DocxExport class to output all headers and footers even when the "Same content on left and right pages" option is turned on. Change-Id: I6a52f216f1e1b386d887ec614198766670b5bce3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113158 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
5 daystdf#141945 sw: layout: check master frame when moving fly forwardMichael Stahl1-1/+4
The problem is that in the finished layout the fly frames are positioned on the first page but are in SwPageFrame::m_pSortedObjs of the second page. Don't use FindPageFrameOfAnchor() because that looks up the follow-frame that contains the anchor position. This was unintentional; the idea was to get flys anchored in subsequent paragraphs out of the way. This situation where it's on a follow-frame of the same paragraph is more complicated and less obvious, so don't try to solve it now. (regression from eb85de8e6b61fb3fcb6c03ae0145f7fe5478bccf) Change-Id: Ic6809a43c467955368807ccc82a7873c29fbfc2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115100 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
5 daystdf#141613 sw: fix crash at header/footer undoDaniel Arato (NISZ)1-0/+84
Undoing the creation of a header/footer used to leave their corresponding document nodes intact, causing the node index of a previous undo entry to point to the wrong node. We now force the destruction of the header/footer nodes manually. We also cut the redo chain which loses the redo history, but solves another crash for now (when redoing the creation of the header). The proper solution would be to create a new SwUndo* derived class from scratch to represent the creation of a new header/footer section in the document. Regression from commit 8d8486f43c1a8a51157bfc3e0b87090b05a9229e (tdf#46561 sw: fix lost undo stack setting header/footer) Change-Id: I97188aa8ded802bc6b6fa88ddd83a95c40de8bc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114667 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
5 dayscid#1478174 Uninitialized scalar fieldCaolán McNamara1-0/+1
Change-Id: Ib17e55b600012ef5f6a26d01e9d54aa7be9c590d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115052 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
6 daysloplugin:stringadd improvement for appending numbersNoel Grandin9-71/+59
I was wrong, the Concat framework already optimised appending numbers by stack-allocating small buffers, so include them in the plugin Change-Id: I922edbdde273c89abfe21d51c5d25dc01c97db25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115037 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
6 daysloplugin:unnecessaryparen small improvementNoel Grandin2-6/+6
when calling a function, and passing only one arg, but the function has defaulted args, we were ignoring this case. Change-Id: I86517f18e30531127664088ddc09ef96dbd8bdf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115033 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
6 dayssw: prefix members of BaseFrameProperties_Impl, SwDocStyleSheetPool, ...Miklos Vajna3-73/+73
... SwShapeDescriptor_Impl and SwStyleSheetIterator See tdf#94879 for motivation. Change-Id: I5602b7e94da0e5b004a45bed56d8c231b11004f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115023 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
7 dayssal_uLong->sal_uInt32 in SvParserNoel Grandin2-4/+4
Change-Id: Ibe5599e1cc136330a8e9c089c7cc66d0ef4bc966 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
7 daysthrow() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann42-98/+98
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
7 daysRemove duplicated includeAndrea Gelmini1-1/+0
Change-Id: Ib26ae0e3e1b1b1721f426b3f9967d97baf4f982c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114903 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
7 daystdf#79049 speed up OOXML workbook load (4)Noel Grandin2-13/+9
Optimise LocaleDataWrapper for reads by initialising the data we in the constructor, so we don't need any kind of locking Reduces load time from 34s to 28s. Change-Id: I4bd3bddb30b70ba015fe5b1372534f9507762b74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114960 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
9 dayssw: add some SAL_INFO on DoIdleJob interruptMichael Stahl1-0/+6
Change-Id: I44df06ab4bad1a5e0aaf5409590f5d7869f33482 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114937 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
9 dayssw: speed up DoIdleJobs(WORD_COUNT)Michael Stahl1-0/+8
SwTextNode::CountWords() has early returns that don't clear the WordCountDirty flag, for nodes that don't contain any plain text. This speeds things up considerably for tdf135116-1.odt, which didn't finish the idle jobs after 5 minutes in an optimized 7.1 build, because the time slice tends to expire iterating nodes in word-count before it can make progress. With this it does ~25 WORD_COUNT pages and then ~90 AUTOCOMPLETE_WORDS pages per idle, sending OnLayoutFinished after 13-14 seconds. jmux just pointed me to commit 0fedac18214a6025401c4c426466a5166553e8ec which is not in 7.1 today and may have improved the performance here. Change-Id: I5e9651da3a173649c49fc36edefb23298dfd6bc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114936 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
9 daysreinterpret_cast to SwPostItContent when field type is postitJim Raykowski1-12/+34
Change-Id: I4ed914479c07c786fdc3401c56f7d793777df751 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114897 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
9 daystdf#78864 sw track changes: cross out deleted imagesLászló Németh3-1/+59
Show Changes mode shows deleted images with crossing out to allow differentiate deleted and inserted images during change tracking. See also commit d6322bcedc197a654abc7d64bfea8cf570f123bf (tdf#59463 track changes: record deletion of images). Change-Id: If9bc2252c6cdd06cbe267fe130023c416aa53ce7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114906 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
9 daysallow dnd into weldeditviewCaolán McNamara1-2/+0
Change-Id: I42fafed01a3884279781642154656f0ee32ad431 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114846 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
9 daystdf#137741 SW: Add fields content type to NavigatorJim Raykowski3-8/+192
also makes Comments category be tracked Change-Id: I038ba87d6ae0b96bae2d7a213ec5df92ac7d566d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112560 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
10 daystdf#133548 don't change outline level attrib and list style attribJim Raykowski1-11/+0
when a new paragraph style is created based on a "to outline style assigned" paragraph style Change-Id: Ia757ca375e0e8749a24c27ad8e3f40daff7ef55d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112255 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
10 dayssw html/reqif export: fix size of presentation data for "real" OLE2 embeddingMiklos Vajna1-2/+2
InsertOLE1Header() can either take its OLE1 presentation data (preview) from OLE2 or from RTF (SwOLENode). The presentation data size we wrote was incorrect in the OLE2 case case: nPresentationData is the RTF size, nBytes is the actual buffer size. In practice this made the embedded object non-editable in Word (when trying to edit the RTF fragment). This went wrong in commit 0d027abbc5609b096d2a954e77aa7354a55928ab (sw reqif-xhtml export, embedded objects: take OLE1 pres data from rtf if needed, 2020-09-02). Change-Id: I89019202c9a8b40c1b9a21f611f1190fd50073a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114889 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
10 daysloplugin:stringadd simplify some *StringBuffer operationsNoel Grandin1-4/+2
pulled from a larger patch which I created with a more permissive variant of this plugin Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
10 daysReplace magic numbers in SwFlyFrame::UpdateAttr_()Miklos Vajna1-12/+19
By using the same SwFlyFrameInvFlags constants that SwFlyFrame::SwClientNotify() already does. Change-Id: Ib0775c34cb4b1c6bec4455216ebb2dea3976d007 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114820 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
10 daysremove support for BITMASK in vcl backendsNoel Grandin1-1/+1
Rather use a proper alpha channel if we need transparency. This is another small step towards merged alpha in our vcl layer. I suspect the intent in a lot of this code was to save memory. Which have been a thing way back then, but these days our backends mostly end up doing a copy-and-convert to a real alpha channel anyway, so the existing code is actually now a pessimisation. Change-Id: I4a2bcbb2f76b841f05bc00580f364492829c69de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114808 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
10 daystdf#137741 Add ability to navigate by fields from Navigate By controlJim Raykowski4-7/+46
Change-Id: I3cc464a3d5097b4e0438ea22ebf6daad5a2f2a86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112144 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
11 dayscreatePixelProcessor2DFromOutputDevice won't return nullCaolán McNamara2-11/+6
nor will createProcessor2DFromOutputDevice Change-Id: I1e0359ef2f94eeaf2da9a89d9e9dfb615587d3da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114814 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
11 daystdf#116384 only drag hyperlink if user's not currently setting the selectionCaolán McNamara1-2/+3
which is what writer does for normal text. Under gtk it's common on selecting by dragging the mouse over a hyperlink for one or two letters of the hyperlink to get selected before that selection then gets dragged as dnd. Under gen StartDragWidth is 2 by default so the drag kicks in before enough text has been selected for writer to select anything, but under gtk gtk-dnd-drag-threshold is used for StartDragWidth and that is 8 by default making it easy to select one or two characters before the gesture is recognized as a possible drag. it seems sane to do the same as for normal text and not dnd if the user is still using the mouse to set a selection Change-Id: I971d429acaf8a5a656c5ce58f52632979b94e40a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114817 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
11 daysuse string_view in INetURLObject::encodeNoel Grandin8-10/+10
Change-Id: Ib686c6872388b02c8939d3b65f6bd25cda348bc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
11 dayssw bibliography: fix warning when de-selecting a biblio entry fieldMiklos Vajna3-6/+27
De-selecting a biblio entry field resulted in this warning: warn:sw.core:3311:3311:sw/source/core/fields/authfld.cxx:104: SwAuthorityFieldType::RemoveField: pEntry is not my field But this was even an assert before commit 64ffabbdb2725e93de997171708bb31c33c93a55 (sw bibliography, refer to a page: make the biblio field clickable, 2021-03-12). It seems the root of the problem was: - SwAuthorityFieldType has a list of SwAuthEntry instances that its SwAuthorityFields may have - when the field is selected, we copy the selection to a clipboard document, using SwFEShell::Copy() - this calls SwAuthorityFieldType::AppendField() to register the SwAuthEntry, but that registers a copy instead - SwAuthorityFieldType::RemoveField() then asserted that the original SwAuthEntry is part of SwAuthorityFieldType's list, but it was not Fix the problem by returning a reference to the copied SwAuthEntry in SwAuthorityFieldType::AppendField(), that fixes the warning and then we can turn this back to an assert, to detect problems where an unregistered SwAuthEntry would be de-registered. In practice this caused a problem in the Insert Bibliography Entry dialog: bibliography source = document content case uses SwAuthorityFieldType::GetAllEntryIdentifiers() to provide a list of sources, and this way sources were not removed from that list when deleting biblio entry fields. Change-Id: Iea4fa44302aaac0daa122bbf227888d1dbb06597 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114765 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
11 dayssw: layout: let nested table move forwardMichael Stahl1-2/+1
The problem is that a nested table at the bottom of the page doesn't fit into its cell, but it is split and its first row still remains on the page where it doesn't fit. The outer table 3 tries to split with bTryToSplit=true. In SwTabFrame::MakeAll(), first a split of the nested table 435 with bTryToSplit=true is attempted; this fails and is partially undone - the follow flow line is removed, but the last 2 rows remain in follow. The bTryToSplit=false is skipped because there's only one row now. Then MoveFwd() is tried, but it fails because the top-level table doesn't have a previous frame. Then bTryToSplit=false is tried, and succeeds, again leaving row 436 on page 1 and other 2 in follow. Now another attempt with bTryToSplit=true is made, failing again, not effectively changing anything. During all of this, growing of the outer cell frame 434 and row frame 433 is prevented by the outer table 3 having a follow flow line, see SwRowFrame::GrowFrame(). The result is that cell 434 has content area height 190 but the table 435 with its single row is all valid with height 406, so it's cut off in the rendering. This doesn't happen for SwTextFrame inside table because that one does the MoveFwd(). Plausibly it's the inner table's responsibility to finish with a valid state that fits the constraints of the current page; there are some checks in lcl_RecalcSplitLine() to check for no content frame in the row but none for the row being too small to contain the content that was formatted. So the only valid results for the inner table are that it either moved forward, or it left behind a row containing no content (such as that produced by its own failed attempt to split with bTryToSplit=true), which could be handled by the outer table split code - but the latter could be insufficient in case the outer table is itself a follow, or at least would require further changes in lcl_RecalcSplitLine(). So fix this by removing a condition in MoveFwd() that doesn't make any sense to me - why is it relevant for an inner table during a split of the outer table whether the outer table itself can move forward? Change-Id: I1e01ce233383cc70b9aea72d25369b7278eb75f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114760 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
11 dayssw: fix crash in SwFormatAutoFormat::dumpAsXml()Michael Stahl2-2/+8
Change-Id: Ib2d723b34d8e6f1254f5a9b0d0be509daf24ce43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114758 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
11 dayssw: fix crash in SwAnchoredObject::dumpAsXml()Michael Stahl1-1/+2
SwAnchoredObject::GetObjBoundRect() is const, so it's only idiomatic that calling it reformats everything. Change-Id: Id57472ae3041c7264bc904e1a68907c48e60ac96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114757 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
11 daysIntroduce SwFlyFrameInvFlags to replace magic numbers in ...Miklos Vajna2-27/+44
... SwFlyFrame::SwClientNotify() SwFlyFrame::UpdateAttr_() is not yet updated to produce these. Change-Id: Ie29d900c1796c868d051ffd9c28600e44ff3b704 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114752 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
11 dayssw bibliography, refer to a page: add insert/delete UIMiklos Vajna1-0/+17
If the toggle button's activate state changes, adapt the sensitivity of the next spinbutton, this way a new page number can be added and an old one can be deleted. Change-Id: I97067182e8cd42a02b164ac941598bada2630e07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114750 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
12 daysuse string_view in INetURLObject::decodeNoel Grandin13-48/+49
Change-Id: I10e04970ceac33c9c3fbfd0182dd2140e06cb80b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114658 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
12 daystdf#59463 track changes: record deletion of imagesLászló Németh1-5/+31
Instead of deleting the image object without recording the deletion, delete the anchor point in the text to record the deletion, if Record Changes is enabled. Note: only images anchored as characters can be recorded this way, so change the anchor before the deletion, if needed. This less problem, than hidden, i.e. non-tracked deletion of images. Change-Id: I7e4bee82b76b4a26e6482a678a2a1ce432980271 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114671 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
12 dayssw bibliography, refer to a page: save edited page numberMiklos Vajna1-1/+33
This is the writing side of commit e920406994dd2b880d4b752e3ea4e09e4a8f97cc (sw bibliography, refer to a page: add dedicate widget to show the page number, 2021-04-21). Change-Id: If47932eedd689ca474bfdf44613d0c30087053b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114664 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins