summaryrefslogtreecommitdiff
path: root/sw/source
AgeCommit message (Collapse)Author
2016-05-09convert OUTLINER_MODE to scoped enumNoel Grandin
Change-Id: I7ac45d7fbd5e77a105cbe942c6d4fd6cfc8ff909 Reviewed-on: https://gerrit.libreoffice.org/24789 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-09convert FONT_EMPHASIS_MARK to scoped enumNoel Grandin
Change-Id: I137c78b337e57d3442db08334128e79d186b278f Reviewed-on: https://gerrit.libreoffice.org/24753 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-09convert SfxStyleFamily to scoped enumNoel Grandin
and update the RSC compiler to accept such In the process fix some confusion in SD where it was confusing SfxStyleFamily and the index of the relevant family (which other parts of the code in SVL use) Change-Id: I1efc9f85fbed8ab76eafe8f6e1ada411753ae5f9
2016-05-06tdf#90923 sw: invalidate layout when font substitutions are changedMichael Stahl
This should cause all text to re-format with the newly substituted fonts. Change-Id: I73f64cc679f818524940a52c2f7e696b02891c43
2016-05-06teach passstuffbyref plugin to check for..Noel Grandin
unnecessarily passing primitives by const ref. Suggested by Tor Lillqvist Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6 Reviewed-on: https://gerrit.libreoffice.org/24672 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-06sw: no need to copy these in rtfattributeoutputMiklos Vajna
Change-Id: I6afbde0943cc5a0a760b873c17a08bb0f5a8c1c5 Reviewed-on: https://gerrit.libreoffice.org/24687 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-05crashtesting: fix a gadzillion docx export crashesCaolán McNamara
and stop creating a graphic object from a url twice Change-Id: I94cb1e9ffc4eaf1b56a8bfd5795bd14e126518f8
2016-05-05Related: tdf#84695 sw: fix TextBox begin text edit by pressing normal charMiklos Vajna
When a draw shape is selected, but its text is provided by a TextBox, then F2 and Enter could start editing already, but pressing a normal character didn't work (unlike for TextFrames or regular draw shapes). Fix this by calling into lcl_goIntoTextBox() at one more place. Change-Id: Ia594279918a6c3087cac8b0c859ce7432e4a685d Reviewed-on: https://gerrit.libreoffice.org/24671 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-04use Any constructor instead of temporariesNoel Grandin
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-05-04While at it, delete Any functions on sal_Bool*Stephan Bergmann
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of sal_Bool across the code base Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
2016-05-04underline popup control possible to use outside sidebarSzymon Kłos
Change-Id: I48097007c7dc0439b33233939c1d73902dfeb679 Reviewed-on: https://gerrit.libreoffice.org/24491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2016-05-03sw: HTML filter: avoid turning on Undo with ridiculous hacksMichael Stahl
SwHTMLParser::SetControlSize() loads a "hidden document" into the same model (!) that is currently being imported (!), just so it can get a awt::XControl from the ViewShell; unfortunately creating the ViewShell happens to enable Undo too, so turn that off again. This avoids triggering the assert in SwRegHistory::InsertItems() on kde122884-1.html Change-Id: I3d8fcd5c43bcb8e7ed8775710acbc2d40f2ffdd0
2016-05-03tdf#99529 sw: don't pop up input field dialog before inserting fieldMichael Stahl
The dialog calls SwEditShell::UpdateFields(), so if there is already a existing field at the current cursor position it will be "updated" before the new field is inserted. Change-Id: I8ddbbe00534950759781a1ce8d0dca0376663462
2016-05-03tdf#98512 sw: add unit testMichael Stahl
... and fix the SAL_WARN not to warn spuriously. Change-Id: Ic951fc0d811e5cab39989285d34bdd2fff8f95fd
2016-05-03Remove Edit -> Plug-in as no longer usedBryan Quigley
This functionality seems to only have been used with NPAPI plugins. They've been previously removed. Per the help text, if it is still used by anything, you can use the context menu instead. MN_READONLY_PLUGINOFF also appeared to be unused, so removed. More code might be removable, but would affect activate on click/visible. Change-Id: I12d5bf54edd3a2f716912179b87e798b47b3cc3d Reviewed-on: https://gerrit.libreoffice.org/24500 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-02sw: translate last Anz occurrences in headersMiklos Vajna
Change-Id: I36e11fe9b5a8979478029162e0f51015fc1360fb Reviewed-on: https://gerrit.libreoffice.org/24583 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-01loplugin:simplifybool in swJochen Nitschke
Change-Id: I528f631165a618a70c3143c56273d8513b2cc5d2 Reviewed-on: https://gerrit.libreoffice.org/24554 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-05-01Fix typosAndrea Gelmini
Change-Id: Ifb7c33d6052efe5ea8a1e0e10b3178073cd29ca0 Reviewed-on: https://gerrit.libreoffice.org/24536 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-01Fix typosAndrea Gelmini
Change-Id: Ideafa411b53fe4a5f2e6559be10c4cb82b58a256 Reviewed-on: https://gerrit.libreoffice.org/24543 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-30Fix typosAndrea Gelmini
Change-Id: Id81b16ff26283611f0b84929d831c827f847ab73 Reviewed-on: https://gerrit.libreoffice.org/24317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-30sw: SwHistoryResetAttrSet now unused, remove itMichael Stahl
Change-Id: I6b87b82cb359298e768dd4eb90a788cafe6b8b1c
2016-04-30tdf#98512: sw: remove duplicate undo history addMichael Stahl
Follow-up to commit ed81bf39dd3431d28860fed6a2d4e8814126cc61. In almost all cases SetAttr() and InsertHint() will already add the history hint themselves, so this code in SwRegHistory::InsertItems() looks somewhat pointless as it inserts a duplicate. It turns out it's needed for hints that insert dummy characters, because firstly for the hints-without-end the NoteInHistory() was not called, and secondly when InsertText() inserts the dummy character it may actually delete the hints array if there are no pre-existing hints, and a new hints array will be created where the SwRegHistory isn't registered. It's not obvious how the hints array actually can become empty in SwTextNode::InsertText(). Let's fix that and assert instead that the history hint was inserted. Change-Id: If8e0ff1fe28a162f144149a536a7566f94219c0d
2016-04-30sw: SwFieldVarPage: disable "Insert" button on "Input field"...Michael Stahl
... if no variable name is selected. It doesn't work in this case. Change-Id: I36745806bcfc688b54b1ec49d0376b05bb5bbea6
2016-04-30sw: try to survive restoring a field dialog without SfxObjectShellMichael Stahl
The SFX will apparently restore the field dialog on startup if it was open on the last shutdown. Since i don't know how to disable this useless "feature", let's fudge things a bit so we don't crash immediately. Change-Id: I2c401440374d055774fdc8fcbd79a1262c42da0b
2016-04-29sw, xmlsecurity: indentation fixesMiklos Vajna
Change-Id: Iafb20132df4aba6b45cf49a7814084f66d087b25
2016-04-29sw: no need to copy these in docxsdrexportMiklos Vajna
Change-Id: I2d5d0ce4555250b1c2480167743258300b76c9fa Reviewed-on: https://gerrit.libreoffice.org/24486 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-29tdf#99434: import/export documentProtection-forms from .docx incl. testOliver Specht
the setting <w:documentProtection w:edit="forms"> disables editing of content outside of form controls. Change-Id: I0d11373d9010778ed5798598020e453cde06fa0f Reviewed-on: https://gerrit.libreoffice.org/24365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-04-28use initialization listJochen Nitschke
use anonymous union to make initialization and access easier prevent overwriting type and use scoped enum Change-Id: I76037ec666c5740096849b0c58fd9a187ada1d54 Reviewed-on: https://gerrit.libreoffice.org/24455 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-28tdf#74328: loading section page no. as 16 bit unsignedOliver Specht
The sprm sprmSPgnStart97 contains a 16 bit unsigned value. Test included. Change-Id: I300e9a94c13666cf8e71d3613b8f1171c7314cdd Reviewed-on: https://gerrit.libreoffice.org/24431 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-04-28tdf#97087 Give comprehensible, unique names to idlesMuhammet Kara
Timers and idles should have programmer comprehensible, unique names Change-Id: Id0f2c0a77cd28c3ec5473e8432569739b58d2101 Reviewed-on: https://gerrit.libreoffice.org/24388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-04-28teach stylepolice plugin about ref-counted-pointer namingNoel Grandin
Change-Id: I6e91d22fc1826038c05ddb6fc065563c6a250752 Reviewed-on: https://gerrit.libreoffice.org/24459 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-27tdf#99474 close direct char fmt at end of paraLuke Deller
When exporting to doc, ensure that the FKP entry for direct character formatting is closed at the end of a paragraph, so that any direct character formatting in the next paragraph does not apply to the end-of-paragraph marker (CR). Also revert the changes for i#119650 and tdf#87437 which targetted more specific examples of this problem, as those issues should now be covered by this fix. Add a test case for the example from tdf#99474 Change-Id: I2cb482adb39a84f152707dafcb18f289ca0bd550 Reviewed-on: https://gerrit.libreoffice.org/24402 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-04-27tdf#99460 sw: layout: don't split table before flyMichael Stahl
First the table is formatted properly and then the following paragraph is formatted, along with its anchored objects. The Fly frame is aligned to the bottom of the page by SwAnchoredObjectPosition::_AdjustVerRelPos() without checking for any overlap, and thus overlaps the table. Then SwFlyNotify and Notify_Background() invalidate the table's PrtArea, and the table responds by splitting numerous times, until finally there is a page where the table does not overlap with the fly any more. Instead of the table splitting, the paragraph with the Fly anchored to it should move to the next page; suppressing the table invalidation in Notify_Background() appears to achieve that. Change-Id: If65879f1756856bda344e0ef8fbffbc33e80f3ec Reviewed-on: https://gerrit.libreoffice.org/24307 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-27-Werror,-WvarargsStephan Bergmann
"passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]" just drop the variadic overload and use the one taking a WizardPath (i.e., a vector) Change-Id: I6e389f60f8b7cb0633bf173bde69af1c5af86048
2016-04-27tdf#98512 Fix the Undo action of insert an input field.HaidongWu
Change-Id: Ia3214564f78a300bfd3f2e6de677fcdff39e107b Reviewed-on: https://gerrit.libreoffice.org/23055 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-25There is no css::uno::Sequence<sal_uInt8> in UNOStephan Bergmann
Change-Id: I1d2207a5a8832155e29c334cbfe5dc5d794b80da
2016-04-25Some more sal_Bool -> boolStephan Bergmann
Change-Id: Ie056687f7845e3ee133627f8961795f6bd8730f7
2016-04-25Cannot extract Any to sal_uInt8Stephan Bergmann
...which has the same underlying type as sal_Bool. The /org.openoffice.Office.Writer/Numbering/DefaultBulletList properties FontWeight and FontItalic are of type xs:short, i.e., sal_Int16. Change-Id: Id8ea7300b5fda65f7fe7df98d4f8b32c22da9886
2016-04-25tdf#42949: clean up includes in include/oox/core using iwyuJorenz Paragas
This allows the headers in that folder to stand on their own and not depend on any transitively included headers. All changes to other files are needed to fix compiler errors related to missing includes that occurred afterwards. Change-Id: I2083b30763f0b2c1aacdff00226e5f567ae52db4 Reviewed-on: https://gerrit.libreoffice.org/24355 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-04-22tdf#81833: form protection can be modified as compatibility optionOliver Specht
ProtectForm is supported to prevent editing outside of form controls but could only be imported from doc and stored in odt but not changed. Now it is part of Writer's compatibility settings dialog. Change-Id: I7337fb3f0774d3c1d26cd8e1485958399b2a70e2 Reviewed-on: https://gerrit.libreoffice.org/24294 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-04-22Avoid reserved identifiersStephan Bergmann
Change-Id: I27ff0f4f0eb395d7e0a60dd604758c220a3134c4
2016-04-22Elide const varsStephan Bergmann
Change-Id: I1b2a7b071f9740e8c848f543e32fd47f054c8318
2016-04-21lokit: add getPartHashHenry Castro
In the tiled rendering case, the slides, no matter if it is inserted or deleted, the part names always return sequential names i.e. Slide 1, Slide 2, ..., Slide N. However the client side needs to know what slides had been deleted or inserted, so it is necessary to send the hash codes. Change-Id: I0e9caeec660c3e42dd9f751bdce7690f9ad365a1 Reviewed-on: https://gerrit.libreoffice.org/24267 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-04-21new plugin stylepoliceNoel Grandin
check for local variables which follow our member field naming convention, which is highly confusing Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann
Change-Id: I5c33d8ed3551d9ad4432824995bfdc3f73cfc5f8
2016-04-20clang-tidy clang-analyzer-deadcode.DeadStoresNoel Grandin
suspect that some of these may reveal latent bugs.... Change-Id: I9de9aabbda9c8952715631577c29c1830df1eb71 Reviewed-on: https://gerrit.libreoffice.org/24200 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-20character spacing control possible to use outside sidebarSzymon Kłos
Change-Id: Ic0c6458268b529bd0107d6ed5a35f49241cfb833 Reviewed-on: https://gerrit.libreoffice.org/24146 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2016-04-19cppcheck: silence known condition warning in sw ww8Jochen Nitschke
remove variable bDataImport and if clause correct indentation Change-Id: Ib7dd7b91cecbe9c47a50f7487be055b1247423a1 Reviewed-on: https://gerrit.libreoffice.org/24211 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-19cppcheck: silence known conditions warnings in sw annotshJochen Nitschke
Change-Id: I0e5d0eea0c3d8cd14938f45353ca4f27cf09d176 Reviewed-on: https://gerrit.libreoffice.org/24212 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>