summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2017-03-13Minor loplugin:unnecessaryoverride improvementStephan Bergmann
Change-Id: I3afb31b642a47e767dda0614d223b6b7f22e5d54
2017-03-13Resolves: rhbz#1431540 crash in SwDBManager::releaseRevokeListenerCaolán McNamara
Change-Id: I8e61163de7e6192bdf613ab6b58906326499d6c2 Reviewed-on: https://gerrit.libreoffice.org/35137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-13Clean up integer types representing positions in ToolBox's item vectorStephan Bergmann
(vs. uses of sal_uInt16 representing such items' IDs). APPEND and ITEM_NOTFOUND are members of ToolBox now (and have been bumped to the corresponding type's max). The payload of VclEventIds ToolboxButtonStateChanged ToolboxClick ToolboxHighlightOff ToolboxItemAdded ToolboxItemDisabled ToolboxItemEnabled ToolboxItemRemoved ToolboxItemTextChanged ToolboxItemUpdated ToolboxItemWindowChanged ToolboxSelect has been changed too (note that reading/writing of those payloads isn't very consistent, though: for some of these, values are written that are never read, while for some others no values are ever written but the reading code would like to receive some value if the payload wasn't a nullptr). Change-Id: I4856ffb3637404b8d866621a3503d7922b1b8141
2017-03-13tdf#103931 writerfilter breaktype: same for implicit and explicitJustin Luth
MSWord normally does NOT specify "nextPage" for the sectionBreak, since that is the default type. That is imported as BreakType == -1. However, Writer ALWAYS exports the section type name, which of course is imported explicitly. **There is an import hack that treats the very first -1 section as continuous IF there are columns**. Since Writer explicitly defines the section type, these documents import differently. When Writer round-trips these types of files, they get totally messed up in Writer, although they look fine in Word. So, treat both implicit and explicit nextPage identically for bTreatAsContinuous during import. Another unit test demonstrated that headers/footers are lost when treating as continuous, so preventing that situation now also. This fix allows several import-only unit tests to round-trip. Change-Id: I37fa861d82e8da564d28d8e9089fe0f2777650fb Reviewed-on: https://gerrit.libreoffice.org/35013 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-13sw: prefix members of SwTableBoxFormulaMiklos Vajna
Change-Id: If96fbf097e2314303e60fd4f10ae314d12f2c468
2017-03-13templatize SvXMLEnumMapEntryNoel Grandin
in preparation for "scoped UNO enums". This is a little hacky: In order to limit the scope of this change, the templated SvXMLEnumMapEntry struct actually has a fixed size field, and we cast it to SvXMLEnumMapEntry<sal_uInt16>* in various places, to avoid carrying the type param around. Change-Id: Idfbc5561303c557598dd5564b7a7259ae5261d83 Reviewed-on: https://gerrit.libreoffice.org/34987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-13convert GraphicDrawMode to scoped enumNoel Grandin
Change-Id: I18eec89c4e1ebb86d64297e7cef4b36bf12df59f Reviewed-on: https://gerrit.libreoffice.org/35004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-11Fix typosAndrea Gelmini
Change-Id: I8afde16343288888d9b1806fae6cba3514812d02 Reviewed-on: https://gerrit.libreoffice.org/35062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-11Fix (German?) spelling mistakes in comments: s/save/safe (the adjective)Tor Lillqvist
Might be more of them left, I found these by looking for "is save" or "it save". Many more potential misspellings of "Safe" as "Save" in identifiers are left. Need to check individually which of them actually mean "Safe", which mean "Saved" perhaps. Change-Id: I5d3791ea2df2e1d485f65400404972b72af45aec
2017-03-11fix typo: savety --> safetydennisroczek
Change-Id: I6fab05c05c8f79607b75429f32be0497b54b3cb7 Reviewed-on: https://gerrit.libreoffice.org/35059 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-11ooxmlimport: unit test for tdf#93640 is round-trippableJustin Luth
Since this test round-trips well, move it to ooxmlexport Change-Id: I95038e27a5779687152cca2bd31fe5719cac65b6 Reviewed-on: https://gerrit.libreoffice.org/35034 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-03-10ooxmlexport: move tdf103931 unit test to ooxmlimportJustin Luth
Visually, this unit test round-trips terribly. During round-tripping, the 3 columns (related to textsections) in the very first section get transferred into the pagedesc. Thus the first section is "lost". For some unknown reason, another section is added later on. So, cummulatively, the section count remained the same, but whatever fixes these two situations will also affect the section count. However, it should work fine as an import only test. There ARE three sections in MSWord after all. Change-Id: I1973977f5c5a45189896b10cacd757600e7684db Reviewed-on: https://gerrit.libreoffice.org/35012 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-03-10coverity#1402149 Unchecked dynamic_castCaolán McNamara
Change-Id: I73fa2c6d3658e10728492c9766acef1eaadc5ca1
2017-03-09convert SvxCellHorJustify to scoped enumNoel Grandin
Change-Id: I0dd88b5bf9e1aededfa2d94b6b2d3d26694fff33 Reviewed-on: https://gerrit.libreoffice.org/34968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-08loplugin:loopvartoosmallStephan Bergmann
Change-Id: I01b42f92b553695724305c1604db967da114a818
2017-03-08tdf#98899 Set a title for Mail Merge Wizard windowGabor Kelemen
Change-Id: Id50bae820bf5e4a84587ead0b600225a5f625050 Reviewed-on: https://gerrit.libreoffice.org/34964 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-03-08Some more long -> WW8_CP (to avoid loplugin:loopvartoosmall)Stephan Bergmann
Change-Id: Icdf00da8e627d5e3a671acd17af58734873f4bdb
2017-03-08tdf#52986 Set default help IDs of the Mail Merge WizardGabor Kelemen
Set help ID using SetRoadmapHelpId for all pages so that when by default the focus is on the left side pane of the wizard the relevant help page is displayed when hitting the Help / F1 button Change-Id: I62e3300027c3e96f627b1c84f2da11edb92678aa Reviewed-on: https://gerrit.libreoffice.org/34935 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-08loplugin:loopvartoosmallStephan Bergmann
Change-Id: I7f636aea9ccde7cba70ba9fcc0d709cbc334daee
2017-03-08make SfxGetpApp just get and move GetOrCreate to the peripheryCaolán McNamara
Change-Id: If3b22635e46dbccf0fad101f51bb653cbbcd3a32 Reviewed-on: https://gerrit.libreoffice.org/34957 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-08convert SvxShadowLocation to scoped enumNoel Grandin
Change-Id: Ie51995579312328538263172cd3173641df89bca Reviewed-on: https://gerrit.libreoffice.org/34965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-08convert SvxCaseMap to scoped enumNoel Grandin
Change-Id: Iea77ddc21e9b2d5a021c08e323da9ccabf9d46bd Reviewed-on: https://gerrit.libreoffice.org/34963 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-08lok: Do not use UNO for fetching tracked changesPranav Kant
See inline comment for reasons. Also, move the SwRedlineTypeToOUString function as inline to same header file containing redline types. Change-Id: I9b4be4f104c095b2ccd8287d935347c81fd25974 Reviewed-on: https://gerrit.libreoffice.org/34950 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-03-08convert SvxAdjust to scoped enumNoel Grandin
Change-Id: I0df7a5313d6d62d0c657e62ef6014a3ddbab4639 Reviewed-on: https://gerrit.libreoffice.org/34941 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-08tdf#91222 VclBuilder constructor cleanupJulien Nabet
Change-Id: I951bfda566e0aae3b0a82f30be28e66601797cc8 Reviewed-on: https://gerrit.libreoffice.org/34958 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-08lok: Create change tracking position tooPranav Kant
We want to expose change tracking comments to lok clients also. For this, lok clients needs to know the position in the document where the comment should be shown. Change-Id: I38794387cef3d11b5e0c1cfd0967408d8e54ded3 Reviewed-on: https://gerrit.libreoffice.org/34949 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-03-07sw: SwUndoCompDoc: fix assertion about invalid node indexesMichael Stahl
Try the steps from i#101009, then Undo and Redo: Assertion `idx < m_nSize' failed The problem is that the indexes stored in SwUndoCompDoc are for the document *post* insertion of the content of the other document, so delay the creation of rPam in SwUndoCompDoc::RedoImpl() until the content is inserted. Change-Id: I0d9c8dc90ea88c87bc56329b42a0ec22bbc6b248
2017-03-07tdf#106218 sw: compare document: tweak special handling of EndOfContentMichael Stahl
In case the last paragraph in the document is inserted or deleted, the redline must not be positioned on the EndOfContent node (i#101009). But then rejecting the redline will have an additional paragraph as compared to the original document. Try to avoid that by tweaking the start position of the redline to the end of the previous paragraph. (regression from f4609c4c294a62023b6cd6baeb6a73d44992dec3) Change-Id: Iae75042a3124d0f3bca955fb856c94a6f478b986
2017-03-07Notebookbar: fix popupsSzymon Kłos
Change-Id: If00c3d2e64b89883dd77efb53dd16e149de03e94
2017-03-07Replace some constexpr functions with static data membersStephan Bergmann
(I leave the DOCUMENTBORDER TODO alone, as that one is of type long while defDocumentBorder is of type sal_uInt16, so cleaning that up likely is a little more effort.) Change-Id: Ie9972e2f38b0ca9812e09f1c9d9fbded1046fda0
2017-03-07lok: Allow changing comment text of document redlinesPranav Kant
The id of the redline is optional. If not mentioned, the current redline is assumed to be the one whose comment text will be changed. Change-Id: Ia859de171603239a78f4bdef5eff0facd580d027 Reviewed-on: https://gerrit.libreoffice.org/34923 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-03-07tdf#105570: Treat sprmTTableHeader properly.Vitaliy Anderson
Only take into account sprmTTableHeader if all previous rows had it. Change-Id: I0f81da366c148963503b4aeba778f5d97aa72d26 Reviewed-on: https://gerrit.libreoffice.org/34931 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-03-07tdf#104287 RTF import: handle bitmap shapes inside tablesMiklos Vajna
Regression from commit 015fd55c94b7b650ed8e572cafaf3b0f903b01b9 (tdf#96275 RTF import: fix anchor of shapes inside tables, 2016-05-10), the problem was that since shapes inside tables are now buffered, some previously hidden problems in the buffering became visible. For one, there was no code to make sure that a bitmap shape is not appended at the end of the buffer again when it gets re-played. For another, only the bitmap shape itself was buffered, not its size. Change-Id: I04d65eb794ff6b160ef77af85479ba25ea5f8aa7 Reviewed-on: https://gerrit.libreoffice.org/34940 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-07only one use of GetLastSaveDirectoryCaolán McNamara
which is to get its value and do a const_cast dance to save and restore its value which is a strange thing to do just for one obscure dialog when no other use of the save/load dialogs does this Change-Id: I7700d7ed738d578869284d415197de06167001b5
2017-03-07A11Y nitpick: correct mnemonic widget mappingGabor Kelemen
This warning appeared while opening the 4th page of Mail Merge Wizard warn:vcl:5291:1:vcl/source/window/builder.cxx:220: missing either source femalecolft or target fieldname member of Mnemonic Widget Mapping warn:vcl:5291:1:vcl/source/window/builder.cxx:220: missing either source femalefieldft or target fieldvalue member of Mnemonic Widget Mapping Change-Id: Ibde465ab1a3603a6b4f831e8d7939b512c4b593e Reviewed-on: https://gerrit.libreoffice.org/34934 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-03-07convert RES_FIELDS to scoped enumNoel Grandin
and rename to SwFieldIds Change-Id: I50d2b7550f68b4b020ffc1603f931c671c8e1de6 Reviewed-on: https://gerrit.libreoffice.org/34924 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-06Notebookbar: fixed vertical alignmentSzymon Kłos
Change-Id: I19d06f9dd2d4ec65de687b36d8a80eb7c7beba22
2017-03-06sw: remove unnecessary upcastsJochen Nitschke
guess some broken compiler needed these Change-Id: If0132f6363555fea2ef880bd7af343c2d7b2a0a4 Reviewed-on: https://gerrit.libreoffice.org/34925 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-06sw: Bin unused vectorPranav Kant
Change-Id: I948d07c178344b66ea91eddf5771dc65b3ea9d30
2017-03-06convert SdrTextAniKind to scoped enumNoel Grandin
Change-Id: Ie79aaf96a0d89c96c4ecd4ee8ccb0eabd3456bd0 Reviewed-on: https://gerrit.libreoffice.org/34916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-06doc/docx: make unit test for tdf#99120 round-tripableJustin Luth
When a page description is chained to a non-chained follow, it will only be used for a single page. Thus it might be able to be combined into the follow as a titlePage instead. However, if this page description has distinct even/odd pages, don't merge it as a titlepage. Change-Id: I62237a48c062e7c393a5224285a23597c479c1c9 Reviewed-on: https://gerrit.libreoffice.org/34889 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-06sw: prefix members of SwRectFnSetMiklos Vajna
Change-Id: I229620b9a96578f1f47132ff7bd4ea27e7611fec Reviewed-on: https://gerrit.libreoffice.org/34917 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-06convert HTMLTableRules to scoped enumNoel Grandin
Change-Id: Id8758955565579abd1f4687907d7fe06aaefa749
2017-03-06convert HTMLTableFrame to scoped enumNoel Grandin
Change-Id: I1353619ca11f867ca37dec3105e50ba9f3d70d54
2017-03-06convert HTMLInputType to scoped enumNoel Grandin
Change-Id: I3f6f6aadd813898ccff93154138a2fbf911b9c8f
2017-03-06convert HTMLScriptLanguage to scoped enumNoel Grandin
Change-Id: If87863b520da704410a6ad261330bbde7ef8008c
2017-03-06convert ScrollingMode to scoped enumNoel Grandin
Change-Id: Ice1628ba09998be455fd6a77a044cb403235d462 Reviewed-on: https://gerrit.libreoffice.org/34914 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-06make use of the SfxItemSet::GetItem<T> methodNoel Grandin
Change-Id: I8201429993129b019a6dd51c203a9f8dcbb2253e Reviewed-on: https://gerrit.libreoffice.org/34867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-06remove some unnecessary use of OUString constructorNoel Grandin
found with git grep -nP '<<= OUString\(\w*[A-Za-z]+' Change-Id: I43354842f1e0418fb292f2e8e0cb30f1229d1c67 Reviewed-on: https://gerrit.libreoffice.org/34864 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-06templatize HTMLEnumOption::GetEnum methodsNoel Grandin
And consequently fix bug in htmlfld.cxx in the RES_DOCSTATFLD/SwDocStatSubType handling, where it was updating the m_bUpdateDocStat fields by comparing the wrong enum variable. Change-Id: If9a68699a9d375ace120a3bf4f4bf4d4ae20a8e0 Reviewed-on: https://gerrit.libreoffice.org/34857 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>