summaryrefslogtreecommitdiff
path: root/sw/inc
AgeCommit message (Collapse)Author
2019-01-25loplugin:unusedmethodsNoel Grandin
Change-Id: Ifb0c479e9d1aed1cd90d78ed23902fc05db556d6 Reviewed-on: https://gerrit.libreoffice.org/66862 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-24tdf#86731 Don't show 'spelling complete' when dictionary is missingSzymon Kłos
To check if dictionary is missing we have to run spelling which checks used language for each text portion. When AutoSpelling or manually invoked Spelling is performed SwDoc receives notification about missing dictionaries. Then it is possible to not show 'Completed' dialog. Change-Id: I040ce6565632294796c0206d20c4cd0066ca9643 Reviewed-on: https://gerrit.libreoffice.org/66813 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-01-24sw: make it possible to listen to paste eventsMiklos Vajna
The use-case is that the user pastes content and custom postprocessing is necessary for the pasted content. This is not easy by default, since the cursor is at the end of the pasted content, so the start is not known -- even if you intercept the paste UNO command. Precisely tracking the start is possible when using the internal API, SwReader::Read() does something similar already to track the undo range. Only expose the text selection after paste (as a start), but design the API in a way so that other pasted content type (e.g. image) can be added in a backwards-compatible way later. Change-Id: If35bda4244cc417e4858124fb75f7608b95fc556 Reviewed-on: https://gerrit.libreoffice.org/66807 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-01-24loplugin:constparams in swNoel Grandin
Change-Id: I4a0f51eae28c82eca3c44b9d06c0410f9645f62f Reviewed-on: https://gerrit.libreoffice.org/66833 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-24tdf#122901 track changes: keep paragraph top and bottom bordersLászló Németh
applied in Show Changes mode, instead of losing them after saving the document or hiding the changes. The bug occurred in paragraphs with directly preceding tracked deletions. Change-Id: I25a84aec0159f809dd7b67d4e530e87b01070f44 Reviewed-on: https://gerrit.libreoffice.org/66800 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-01-24tdf#122893 track changes: keep paragraph alignmentLászló Németh
and preset line spaces applied in Show Changes mode, instead of losing them after saving the document or hiding the changes. The bug occurred in paragraphs with directly preceding tracked deletions. Change-Id: I33d9db8ee3522470c4f2dfdcfbea4060db8769a2 Reviewed-on: https://gerrit.libreoffice.org/66789 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-01-23give email settings dialog a titleCaolán McNamara
Change-Id: Id073f9bc4ed4710ba29d7864f8d03a54fa14354c Reviewed-on: https://gerrit.libreoffice.org/66788 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-22tdf#117935 Accessible text-attributes-changed signals...Noel Grandin
... should only be emitted when the text attributes have changed [a11y] second attempt. This appears to have begin at commit 7d9bb549d498d6beed2c4050c402d09643febdfa Date: Mon Jun 2 15:00:50 2014 +0000 Related: #i124638# Second step of DrawingLayer FillAttributes... Which accidentally removed the aWhichSublist param from the SwUpdateAttr constructor in SwpHints::TryInsertHint. Change-Id: If435ea71e8d84e0d8497cd7106cfdbebcc6af7a0 Reviewed-on: https://gerrit.libreoffice.org/66719 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-21cleanup SwAuthEntry manual ref-countingNoel Grandin
And remove the "handle" nonsense and just pass plain honest pointers to a real type around Change-Id: Ic49443f5f8b20890d8335088331fff81585e8981 Reviewed-on: https://gerrit.libreoffice.org/66615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-18lok sw: When inserting shapes, do that in the middle of the visible area.Jan Holesovsky
Instead of in the middle of the entire document, which may be far away. Change-Id: I50a1a5f159b73a3803cd7a549939b73a366e7dc5 Reviewed-on: https://gerrit.libreoffice.org/66584 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-01-18use unique_ptr in SwCursorMoveStateNoel Grandin
Change-Id: I39e67d24a38df71309f5cb4a82165c14e5640556 Reviewed-on: https://gerrit.libreoffice.org/66569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-18Resolves tdf#122637 - Disabled controls in Outline & Numbering unclearheiko tietze
Tooltip added Change-Id: I4e92dc1be5bb5e864f5a10f62fd65ba1494cab6c Reviewed-on: https://gerrit.libreoffice.org/66575 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2019-01-16SwXOLEListener: not SwClient/ModifyBjoern Michaelsen
Change-Id: Ie27432549e835622ab8480acfb3ed613aef623ab Reviewed-on: https://gerrit.libreoffice.org/66411 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2019-01-15UNO Styles: uno SvtListener instead of SwClientBjoern Michaelsen
Change-Id: I173f8e2e74d4892f259fb62b623cad87523bc990 Reviewed-on: https://gerrit.libreoffice.org/66334 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2019-01-15rename GetBroadCaster->GetBroadcasterNoel Grandin
Change-Id: I76ca0cd28b4c6a95d9021c760f61db982283377b Reviewed-on: https://gerrit.libreoffice.org/66313 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-15use unique_ptr in SwPostItMgrNoel Grandin
Change-Id: Icc946b986f62d986e979e6a3f3ba0d2c28cb9adf Reviewed-on: https://gerrit.libreoffice.org/66312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-15simplify UCB_GetFileListOfFolderNoel Grandin
no need to use heap objects here Change-Id: Iadc35b019da7b9446ede79c96a9d8ce8c6db81ef Reviewed-on: https://gerrit.libreoffice.org/66315 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-15use unique_ptr for SwTableAutoFormatNoel Grandin
Change-Id: Ib83be524b5c15e4639a834494726501ac7aa6755 Reviewed-on: https://gerrit.libreoffice.org/66314 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-12make SwFormat a ::sw::BroadcastingModifyBjoern Michaelsen
- clean up SwSection..Hint: Lazily reusing the Dying HintId is evil - switch the SwChartDataSequence to SvtListener - add some description to RuntimeException Change-Id: I897a63030f207cabe4d1ba7de0c25c6c581ffd1f Reviewed-on: https://gerrit.libreoffice.org/65816 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2019-01-11tdf#42949 Fix IWYU warnings in sw/inc/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. - Also fix .h / .hrc files - Remove a bit of duplication from the .yaml file Change-Id: I22145a79343497678e481d882544eb08e765312a Reviewed-on: https://gerrit.libreoffice.org/65878 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-11use unique_ptr in SwNodes::ExpandRangeForTableBoxNoel Grandin
Change-Id: I31cc9d6b962c116c64789d886b82ea476f4e5144 Reviewed-on: https://gerrit.libreoffice.org/66124 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-10use unique_ptr in SwTextNodeNoel Grandin
Change-Id: I3f263a617e0ca48cbbe894a061910f1af767bb11 Reviewed-on: https://gerrit.libreoffice.org/66037 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-09sw: DOCX: recognize TOC title during importSerge Krot
Change-Id: Ifa4fb59858d61580f76e3d104aa4caa6b5902d1b Reviewed-on: https://gerrit.libreoffice.org/64735 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-01-09use unique_ptr in SwContentNode::CreateOLENodesArrayNoel Grandin
Change-Id: I4ff33dbdc4d87fd00e4a2b995fff1238c7e2a679 Reviewed-on: https://gerrit.libreoffice.org/65995 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-09use unique_ptr in pGlobalOLEExcludeListNoel Grandin
Change-Id: Ib52e594b469818a0567c9c6b5cd460375d997abc Reviewed-on: https://gerrit.libreoffice.org/65994 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-08convert "*xxx.get()" to "*xxx"Noel Grandin
Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-07sw: prefix members of SwSmartTagMgr, SwFormatPageDesc and SwTabColsMiklos Vajna
Change-Id: I0bb794f500793f6d248186b683e0adb88b3e5a33 Reviewed-on: https://gerrit.libreoffice.org/65922 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-01-03Unfloat: Introduce Unfloat table button as a frame controlTamás Zolnai
Use the same button style and color what LO uses for header/footer button. Later it might be a good idea to have a separate configurable color for this button, but for now it's seems unneeded to introduce a new configure option for this. Change-Id: Idf86aaa44e29846a2ee211a81fe5376b4335bb05 Reviewed-on: https://gerrit.libreoffice.org/65818 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-01-03sw: paragraph-sign: process signatures in one pass on loadingAshod Nakashian
This combines the metadata field restoration logic with validation/update of said field in one pass upon loading docs. This cuts down overheads and makes the code more readable. In addition, now that paragraph signature validation is quite cheap (separate commits), esp. when no signatures exist, we validate and update signatures (where applicable) when fields are updated. Change-Id: I4adcea579c591f9be457ed742d2cf54fa308163d Reviewed-on: https://gerrit.libreoffice.org/63008 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-01-02Remove SwModify/SwClient for UNO BookmarksBjoern Michaelsen
- introduce sw::BroadcastingModify for migration * still receives .SwModify signals * broadcasts those to old SwClients and new SvtListeners * add tests - remove SwClient/SwModify for UNO bookmarks Change-Id: Icefca478472820b93f4bb59e670e59b60eddfe2b Reviewed-on: https://gerrit.libreoffice.org/65806 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2019-01-02sw: prefix members of SwHashTable, SwSbxValue and SwServerObjectMiklos Vajna
Change-Id: Ibd99ef57d1e80b14e8b2e3ed73dbbab7755a2ea8 Reviewed-on: https://gerrit.libreoffice.org/65802 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2018-12-28Fix typo in codeAndrea Gelmini
Change-Id: I3a4bfbd84735ddcc8d2d0754973f73a98e06c303 Reviewed-on: https://gerrit.libreoffice.org/65652 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-22use boost::optional for OUStringNoel Grandin
instead of storing on heap Change-Id: I4ca2bb58ec4f71b161c9e6081f5e456de54d8153 Reviewed-on: https://gerrit.libreoffice.org/65537 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21sw_redlinehide: adapt ToX UpdateMichael Stahl
The ToX exists only once in the model, so it either has to have the content corresponding to redlines being shown, or hidden. Adapt Update based on current layout setting. Change-Id: Ibf5ec092632cf3a5f513965afdb840fd8239a7fd Reviewed-on: https://gerrit.libreoffice.org/65527 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-12-19tdf#99631 DOCX import: keep zoom of embedded XLSXLászló Németh
OLE objects by importing their VisibleArea settings This also reverts commit 5c1a6c9adb5ccfbb869a0a7ac730d8860a1bf405 "tdf#99631 DOCX import: set 1:1 scale in embedded XLSX". Change-Id: I73dc945c86d0200e72767810b2ff39f233729080 Reviewed-on: https://gerrit.libreoffice.org/65343 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2018-12-18sw_redlinehide_4b: adapt FindFormat()Michael Stahl
Change-Id: I78cfca1cd629bf518f8294450a34ee228a360ef9
2018-12-18sw_redlinehide_4b: adapt FindAttrImpl()Michael Stahl
* rename the only user, some UpdateFields() overload, to UpateOneField() * restrict it to search for non-formatting hints; the FindAttrsImpl() should be used for formatting hints instead Change-Id: I15002610a287fcdcd76777733a277d2ce64904bc
2018-12-18sw_redlinehide_4b: adapt FindAttrs()Michael Stahl
Iterate over merged nodes, and iterate over extents in them, so the complex attribute-finding logic doesn't need to be changed. Change-Id: Id72ca9247165a0c93f0cf2a38b7a0249771ca2eb
2018-12-18sw_redlinehide_4b: FindText() adapt the replace part as wellMichael Stahl
When redlining is enabled, the result will be a delete redline for the existing text, and an insert redline for the new text; that much is obious (and ReplaceRange can deal with a selection larger than one SwTextNode easily, since it mostly adds redlines). For the case when redlining is disabled, there are 2 options, and i don't really know which is preferrable from UX point of view: One approach is to reuse GetRanges() to ignore delete redlines in the replace range; move its declaration to different header. Another approach is to DeleteAndJoin() the existing delete redlines, which is the same as the previous model based Hide mode, which calls DeleteRedline() to remove the hidden redlines. Also change ChgAutoCorrWord() to call DeleteSelImpl() directly. Change-Id: I5974409d09eb39e04cc0b5dfc20d4db510e1cf58
2018-12-18sw_redlinehide_4b: adapt FindText()Michael Stahl
Generally speaking, the find functions should find the strings that are visible in the document view. However, they may also be called from SwXTextDocument functions, where they ought to find the strings that are actually in the document model. So concoct some funny helper types and adapt this so it can handle both cases; it's not pretty but maybe it even works. Change-Id: I1917398ff928e922673353e75e8fb724dc042031
2018-12-18sw: refactor a confusing thicket of overloads, all named Find()Michael Stahl
Also, some of these don't really make much sense as member functions of SwPaM, so make them plain functions instead. Also, some pointer parameters are never null, but there is code to handle that case in MakeRegion(); simplify that. Change-Id: I822e814b0cab14f7f31cfa33478ed15774405a61
2018-12-18sw_redlinehide_4b: FrameMode::Existing is not idempotentMichael Stahl
... so use it only once. The problem is that the second time it will call DelFrames() on every non-first node, which then empties the first frame's newly created MergedPara instance. This can be reproduced by toggling Edit->Tracked Changes->Show in tdf99766-2.odt. Also change some function parameters on e.g. SwTextFootnote::DelFrames() to SwRootFrame to make it obvious that these don't actually need a particular SwTextFrame. Change-Id: I129be5db4a30546905c24c5e8820a5f105a33109
2018-12-18sw_redlinehide_4b: SwCursorShell::GotoRefMark() check visibility tooMichael Stahl
As seen in ooo50225-1.sxw. Change-Id: I9f0bc0838cbf216b9a73e3ce6bc06b4340064077
2018-12-18sw_redlinehide_4b: consider the comments in the marginMichael Stahl
SwPostItMgr needs to hide the comments that are in delete redlines. Also notify SwPostItMgr when redlines are created/removed. SwPostItMgr is owned by the ViewShell but there is currently only one layout so SwRootFrame still needs to broadcast to all of them. Also an EndListening call was missing in SwPostItMgr::CheckForRemovedPostIts() which caused asserts. Change-Id: Ic0fccde50f6fdaa449afb535476c00c41ba94287
2018-12-18tdf#122164: inform user that Base is needed for MailMergeMike Kaganski
Change-Id: Id62a2e4cd2d8d8b6aa79e43448513a9791a55d91 Reviewed-on: https://gerrit.libreoffice.org/65302 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-18Get rid of aEmptyOUStrMike Kaganski
Commit 8051bb7e18ccae0f639e65dfa86bcc18a5fb9108 had removed its "String" counterpart. Change-Id: Id873a259e7f4b2794e94dec83d08ed6b57298beb Reviewed-on: https://gerrit.libreoffice.org/65299 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-17sw: prefix members of SwXNumberingRulesMiklos Vajna
Change-Id: I000c534d1c9740dcb0dfbbe9fc71f18a503874f3 Reviewed-on: https://gerrit.libreoffice.org/65243 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2018-12-14crashtesting: intermittent threaded crashCaolán McNamara
race in SwDoc::CreateNumberFormatter on thread unsafe mpNumberFormatter. thread 1: SwDoc::CreateNumberFormatter SwDoc::GetNumberFormatter ... sw::DocumentTimerManager::DoIdleJobs Timer::Invoke thread 2: SwDoc::CreateNumberFormatter SwDoc::GetNumberFormatter SwXTextDocument::GetNumberFormatter(); SwXTextDocument::queryInterface ... SvXMLExport::setSourceDocument SvXMLNumFmtExport::SvXMLNumFmtExport Change-Id: Iad9aa9514c9de61eb40256b954d0444d9fc9d81e Reviewed-on: https://gerrit.libreoffice.org/65034 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-12weld SwCaptionDialogCaolán McNamara
Change-Id: I5babfbf3489f88c5d6cdeffbd514d86368f04fa9 Reviewed-on: https://gerrit.libreoffice.org/65014 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-10tdf#115094 Part II: OOXML Feature: Add layoutInCell to Doc modelPatrick Jaap
Change-Id: I50dcc2363982f8e6b68f10b0b724b59e9430d6c5 Reviewed-on: https://gerrit.libreoffice.org/63380 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>