summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2016-08-29Indentation fixesMiklos Vajna
Change-Id: I903fcd36878cd0b74757805bcbdb414feb713d7b
2016-08-29loplugin:staticmethodsStephan Bergmann
Change-Id: I2cd84261237eb1d60dfba5f85e444d5553e08798
2016-08-29loplugin:nullptrStephan Bergmann
Change-Id: I829b981553cd9e85c6bdae119fcf3df7600a679f
2016-08-29loplugin:sallogareasStephan Bergmann
Change-Id: I19e5abbf871674709df4b6983643735d8af66b85
2016-08-29loplugin:passstuffbyrefStephan Bergmann
Change-Id: I0c14b9bca3259b9d24e1d869878872d930f1ff0e
2016-08-29loplugin:sallogareasStephan Bergmann
Change-Id: Iabbdee1e3d2cc72ac2771709cb02d70ce3a62ba2
2016-08-29loplugin:defaultparamsStephan Bergmann
Change-Id: If8cdddec3d092fc11ce0c571fc1788671755d2d6
2016-08-29loplugin:redundantcastStephan Bergmann
Change-Id: I072f661c767fc29b0d2d79a9c479f6591acb7573
2016-08-29loplugin:overrideStephan Bergmann
Change-Id: I07167541ae506c7ac0a4fbcdbf14fbfaa163a200
2016-08-29tdf#83830: Use samecontentlistbox in Header/Footer PanelSusobhan Ghosh
Change-Id: Ib24f6e6ac91859467f105c4db9b094454443ff9d Reviewed-on: https://gerrit.libreoffice.org/28218 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-08-29Get rid of a pointless indirect function pointer variableTor Lillqvist
Sure, lots of them left. And actually, I don't know, maybe there is some deeper reason why such are used in the sw coding style. Feel free to revert these commits. Change-Id: I5a1c31fe32b3bdf6d40489d029be165c38a8ba05
2016-08-29Bin some dead codeTor Lillqvist
Change-Id: Ia77a8ee055b5d29490b863a7792edda995a3faa6
2016-08-29Get rid of pointless indirect function pointer variablesTor Lillqvist
Change-Id: Ic8eddec51d59b531ae22421b796a148267b9f3c1
2016-08-29Adapt loplugin:stringconstant to improved OUStringLiteral1Stephan Bergmann
Change-Id: Ibc5128df8bcf8cb5f2f09551c0de6dfdb46bdee0 Reviewed-on: https://gerrit.libreoffice.org/28447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-29sw lok: emit REDLINE_TABLE_ENTRY_MODIFIED when deleting self-added charactersMiklos Vajna
This doesn't work out of the box via SwRangeRedline::SetStart/End, because the range of the redline is adjusted when redlining is disabled by sw::DocumentRedlineManager::AppendRedline() when it compresses the insert and delete redlines into a single reduced insert redline, and then the redline is updated implicitly via SwIndex. Change-Id: I4b652348b256df75e4c774ea5f3fdd78f59deb01 Reviewed-on: https://gerrit.libreoffice.org/28454 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-29MM don't keep undo informationJan-Marek Glogowski
Doen't make much sense to store undo information for all merge based progress. Actually it even prevents crahes when undoing a merged ODT document. Change-Id: Ic3a3982f3e5eb4f6de9f027a6a5e376c2833e8a5
2016-08-29Fix SwDoc::AppendDoc for trailing sectionsJan-Marek Glogowski
We already treat the StartOfContent node special in the CopyRange function to prevent merging of SwTextNodes. For trailing sections, we have to expand the code to treat EndOfContent special too, because the supplied SwPaM range is handled as [mark, point[, so it previously missed the section end node, which resulted in "unhiding" the last section, if it was the last node in the document. Change-Id: Ie094e2a0182647a49c9ba45d08a7dd2cabe667c6
2016-08-29MM block idle-handling of generated documentsJan-Marek Glogowski
We don't need any background idle jobs for the generated documents, like spell checking, statistics etc. This can be done when (or even if) the document is presented to the user as a background task. Change-Id: I4c72ed6e0d2f90d43e7f04cd0ea4418cbffe1206
2016-08-29Add SAL_INFOs to dump the SwPageFrame lifecycleJan-Marek Glogowski
Debug area name is "sw.pageframe". Change-Id: I136cc8192137a8c682900a6ce2c557f6b6b3a6cd
2016-08-29Don't oscillate empty pages in CheckPageDescsJan-Marek Glogowski
For the first case of dropping "wrong" empty pages,look ahead and pre-validate the next page, if it needs this empty page, to prevent case three for the next page. This prevents destruction and re-insert of the empty page. Change-Id: I475aa98a2693f814afcc41bd4bc73f04e742c105
2016-08-29Flush the page break for correct layoutingJan-Marek Glogowski
This is a workaround to create correct SwPageFrm objects for layouting, so the page break is actually visible when copying nodes, so we create the correct SwPageFrm. This is especially problematic for mail merge after the fix in commit 60d34e1c840d2c317bb7d0a5b14f4602c22b3fcc, which - correctly - checks all later SwPageDesc for every fix done by CheckPageDescs(). Change-Id: Ie6ea2e9a0587199be4dbaf3ed63a94c29b318ce2
2016-08-29Use InsertPage in AssertFlyPagesJan-Marek Glogowski
AssertFlyPages used its own code to insert pages. It had two flaws: 1. It used the SwPageDesc of the previous page, unaware of changed page description of a new page, which would later be fixed by CheckPageDescs, eventually requiring re-layout. 2. The Code has an of-by-one error when setting the initial bOdd, which would also insert wrong / inverse left and right pages. So this changes AssertFlyPages to use InsertPage, which has a little more overhead for inserts, but prevents later expensive corrections, especially when CheckPageDescs() inserts or removes "early" pages, which need to evaluate and move all page bound flys. Change-Id: I8806cebb26db60602d8438f117e0416e07228b3b
2016-08-29Refactor duplicated code in SwFrame::InsertPageJan-Marek Glogowski
Change-Id: Iff9a78cf2f5e6ded4d1b03a8303529aa324ddad9
2016-08-29Fix some variable scopes and clarify namesJan-Marek Glogowski
Helps understanding the code, especially CheckPageDescs(). Change-Id: I53e7d0ea65d6c6ae3da98acba4d366a47d2c4210
2016-08-29Don't re-check valid SwPageDescs when layoutingJan-Marek Glogowski
nCheckPageNum is set to USHRT_MAX, if all SwPageDesc were checked. Code manipulating SwPageFrm objects checks the pages via CheckPageDescs(). If this is currently forbidden, CheckPageDescs() sets nCheckPageNum to the first page to check. I guess the !pPage check is there to check the pages - at the end, if someone has missed the CheckPageDescs call. And we have to run the check, if the current page is unchecked AKA pPage->GetPhyPageNum() >= nCheckPageNum to do correct layouting. Change-Id: Ib67878115cde04b7161c919a67131a1e1dc67d8d
2016-08-29Remove now unused SwTextBoxHelper functionsJan-Marek Glogowski
Change-Id: I39500424c79040b1887ea74081fdf0ea0bc5f009
2016-08-29Add convenience function getOtherTextBoxFormatJan-Marek Glogowski
Since we already have isTextBox to identify a text box, this just adds a call to SwFrameFormat::GetOtherTextBoxFormat() to actually return the corresponding SwFrameFormat. This gets rid off all the remaining occurences of the SwFrameFormat / Textbox sets and maps. Change-Id: Id5f05a1ff71e604658e7d8a0d0825f5671335b3f
2016-08-29Switch isTextBox to use the format pointersJan-Marek Glogowski
This replaces all possible occurences of the text box format maps, which just want to know, if a SwFrameFormat is part of a text box to use the direct lookup via the isTextBox, which is now a cheap call. Change-Id: I3b4e2301f816aead1b719cd70a8ef118e685ccfc
2016-08-29Link DRAW and FLY format for faster textbox lookupJan-Marek Glogowski
Currently we have to rebuild the list of text boxes for every lookup. Instead of a managed set, or a per-document list etc., this introduces direct pointers between the corresponding SwDrawFramFormat and SwFlyFrameFormat of a text box. Change-Id: Iefba2d153d9d8b3f1185aa305e9f463a50e78f89
2016-08-29Don't inheritate from boost::multi_indexJan-Marek Glogowski
Drops all using statements and the namespace aliases. This is more in the spirit of tdf#75757. Change-Id: Id7c81baea0e2d1af151b7b9bdce8d9fe5f7a2089
2016-08-29Convert SwFrameFormats to boost::multi_indexJan-Marek Glogowski
This is almost the same situation as SwPageDescs. What makes this more complicated is the fact, that actually duplicated draw objects are allowed, in regard to the key values "type" and "name". And actually for some types, duplicate names are not allowed, e.g. SwDoc::FindFlyByName( const OUString& rName, sal_Int8 nNdTyp ) expects a single result! Change-Id: I6e0ea1099c1c1e6cfe90926170e27179722e88b8
2016-08-29Convert SwPageDescs to boost::multi_indexJan-Marek Glogowski
Page descriptions are exported via XIndexAccess, so they need a stable array, currently a vector. On the other hand they are referred by a unique name, so the lookup in the unsorted array is O(n), not taking into account the amount of string comparisons. The multi index container adds an ordered unique index, which gets the lookup time down to O(log(n)) at the cost of a bit more management overhead for most operations, which is largely outweighted by the amount of lookup calls. These anyway have to be done on insert to guarantee the unique naming. Change-Id: I3fb892ff524f6a9804d9572c1825074c0810649e
2016-08-29tdf#101589 MS export: use dont-split-row for 1-row tableJustin Luth
.doc and .docx do not have a setting for "do not split table" so it was being emulated by "keep paragraph with next" for all but the last table-row. That means that a single-row table with lots of content might be split. There is a setting to prevent a row from splitting, so use that instead in this corner case. It needs to be separate from the other function in order to be set in time for docx to write w:cantSplit w:val="true" before the row contents. For some reason it did not work to move the whole function here. Change-Id: Idc11626e0e2cf1706b87a83f2bd4a802348cb633 Reviewed-on: https://gerrit.libreoffice.org/28352 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-08-29sw: prefix members of SwHTMLForm_ImplMiklos Vajna
Change-Id: Ifecf64e10833e2ede87e304db095c2480db64c81 Reviewed-on: https://gerrit.libreoffice.org/28452 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-29Emit notification to a LibreOfficeKit client also when a redline is modifiedTor Lillqvist
Work in progress, not all modifications to a redline record cause notifications yet. Change-Id: I01614cd6ede9576e9cc329889fef86342567325f
2016-08-27fftester: empty tabbox protectionCaolán McNamara
Change-Id: I56b0845205d6968355b3327721bf9ca0930903e1
2016-08-27put StreamMode masks in scope of enum classJochen Nitschke
Change-Id: I77682f7e289a59b986bb84edf014029a20266470 Reviewed-on: https://gerrit.libreoffice.org/28420 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-26tdf#100002 MM: directly try filename from columnJan-Marek Glogowski
If we generate multiple files via mail merge with the same name, we append a number to any file, so the "basename" filename won't actually be generated. But if we get the filename from a database column, the user expects to try the original file name before trying a name with an appended number. Change-Id: I68411901ed90d8e9a21423de9233a5be4f41eb12
2016-08-26tdf#101672 non-split underline buttonMaxim Monastirsky
Change-Id: Ib20dc0d0036f594adb83a50c2e3da66f565b2db8 Reviewed-on: https://gerrit.libreoffice.org/28356 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-08-26convert SV_ITEM_ID_LBOX defines to scoped enumJochen Nitschke
and remove unused SV_ITEM_ID_EXTENDRLBOXSTRING Change-Id: Ic84d9341d0225b01b9ef46814483c66b1af307b5 Reviewed-on: https://gerrit.libreoffice.org/28397 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-25Notebookbar: Single contextual toolbar implementationYousuf Philips
Change-Id: I72a0bffc3f1093d9f07ea9d4ba9101df2cf4d032 Reviewed-on: https://gerrit.libreoffice.org/28331 Reviewed-by: Szymon Kłos <eszkadev@gmail.com> Tested-by: Szymon Kłos <eszkadev@gmail.com>
2016-08-25loplugin:staticaccess: Extend loplugin:staticcall to cover all access...Stephan Bergmann
to static members (data, in addition to function) via class member access syntax. Also covers the (somewhat obscure) access to enumerator members. Change-Id: Iec54b8df2fdb423c0caf21a0dd0f9fe8fdf33897
2016-08-25loplugin:countusersofdefaultparamsNoel Grandin
Change-Id: I7150494a56abc6ec9c7fba39cefe3967a475f073
2016-08-25GSoC notebookbar: container with context supportSzymon Kłos
+ added sfxlo-ContextVBox + notebookbar's .ui file must contain control implementing NotebookbarContextControl interface with id "ContextContainer" Change-Id: Ice81e23c4ba742564ebceeda95be120ea3f58c99 Reviewed-on: https://gerrit.libreoffice.org/28247 Tested-by: Jenkins <ci@libreoffice.org> Tested-by: Yousuf Philips <philipz85@hotmail.com> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-08-25SCNR: Bin some unused forward declarationsTor Lillqvist
Change-Id: I59864e5464f1a5d5fb3f9717cb2a0ad18f52e300
2016-08-25Drop duplicate forward declaration of SwPaMTor Lillqvist
Change-Id: I59825a85de15d3056f1e17850f37562c5bb740f4
2016-08-25tdf#83830: Use SpacingListBox in Header/Footer and Sidebar Wrap PanelSusobhan Ghosh
Change-Id: I80ea84b6eaabcf241b313d46695cffdd74174c08 Reviewed-on: https://gerrit.libreoffice.org/28104 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-08-25drop enum IAccessibleViewForwarderListener::ChangeTypeNoel Grandin
since only one of it's values was in use, and simplify the ViewForwarderChanged method as a consequence. Change-Id: I00544c9b0a601c01e49519be5bafe192c6f735f6
2016-08-25convert SvxAnchorIds to scoped enumNoel Grandin
Change-Id: I4375fa07eb6ac81b21b904e965e4c2f9600ca99a
2016-08-25convert DataAccessDescriptorProperty to scoped enumNoel Grandin
Change-Id: Ifb8fb1d28464f0638ec1485d77ad333b1acc667c