summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2019-02-19tdf#123057 Correct page count in mail merge if sections are hiddenIlhan Yesil
Remove of invisible content has influence on page count and therefore on fields for page count. So straight after removing invisible content in the mail merge process, the layout has to be updated before fields are converted to text. Change-Id: If43f9921b6797c7ceb112860cda4baf4978c36bc Reviewed-on: https://gerrit.libreoffice.org/67343 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-02-19set parent for chinese dictionary dialogCaolán McNamara
Change-Id: I29fce67b32a5c632eb12210f707f13b995bd58d3 Reviewed-on: https://gerrit.libreoffice.org/68007 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-19UNO_NAME_FILTER_NAME is not used anywhereTor Lillqvist
Change-Id: I135359d9cce4a3195a8e2099545ffafa5b767cdb Reviewed-on: https://gerrit.libreoffice.org/68013 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2019-02-19use boost::optional in EditFieldInfoNoel Grandin
it is inefficient to allocate a tiny object like Color separately on the heap Change-Id: I2f03538f987ff032857f3316ed2d8c2c8d731549 Reviewed-on: https://gerrit.libreoffice.org/67968 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-19tdf#101873 sw: fix search for second term after double not foundMiklos Vajna
Regression from commit 8d2fe8d7e5f374f3a106a4fc58ef597a52815ad0 (SwView::SearchAndWrap: fix WrapAround search in fly frames, 2015-06-03). The search implementation looks in the body text, then in case searching in extra content was not enabled already, it attempts to search there. The problem was that while the wrap-around implementation intended to do the same, it failed to unset the "search in extra" flag in case nothing was found, fix that now. Change-Id: Idf078e464824cad69c9709309435f2db207503b8 Reviewed-on: https://gerrit.libreoffice.org/67986 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-19tdf#122624 XLSX OLE in DOCX: export view positionsLászló Németh
of the visible sheet of an embedded spreadsheet, instead of exporting always the first column and row. Change-Id: Iaf87bfc5b7658cd4d64cb9c83c50bbf66fd6e7f0 Reviewed-on: https://gerrit.libreoffice.org/67982 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-02-18use clear() instead of erase(begin, end)Noel Grandin
Change-Id: Ie1dcff4c2e5f52521b4172ef5726413a9d048214 Reviewed-on: https://gerrit.libreoffice.org/67961 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18Resolves tdf#121596 - Include a key combination to insert thin spacesheiko tietze
uno:InsertNarrowNobreakSpace/ FN_INSERT_NNBSP added and asigned to shift+alt+space Change-Id: I20dd4159bc35ee378bee75af9734b1f25dfd8b1a Reviewed-on: https://gerrit.libreoffice.org/66776 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2019-02-18sw: remove not needed condition in SwTextFrame::SwitchHorizontalToVertical()Miklos Vajna
The distance of the content from the left edge of the parent frame (in vertical mode) is the same in both the top-to-bottom and in the bottom-to-top cases. Change-Id: I9dff075276b884cb8742584cbd4b8310e7cea553 Reviewed-on: https://gerrit.libreoffice.org/67955 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-18sw: prefix members in dbfld.hxxMiklos Vajna
Change-Id: I8319173b5bae27456287f2ed8e028b0dc351c4b7 Reviewed-on: https://gerrit.libreoffice.org/67952 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-18tdf#123261 Styles items get checkbox option in menubar and popupmenuandreas kainz
Change-Id: I54d8aa665e290b735e90212f4d7dc47576415bca Reviewed-on: https://gerrit.libreoffice.org/67940 Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
2019-02-18Resolves tdf#123091 - Move Display Fields section from Formatting Aids to Viewheiko tietze
Change-Id: Ie302ff30328bd23c280369db0bb84c6103335ae3 Reviewed-on: https://gerrit.libreoffice.org/67812 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2019-02-18tdf#123255 writer Menubar Comment group rearrangementandreas kainz
Change-Id: Ib8e26e806899f564d9417cd10159d9de47d43cd1 Reviewed-on: https://gerrit.libreoffice.org/67530 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2019-02-18Removed duplicated includeAndrea Gelmini
Change-Id: I4d0da48bad9470a336f0412aaa976f454a2428c4 Reviewed-on: https://gerrit.libreoffice.org/67935 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-02-18loplugin:simplifybool, check for !(!a op !b)Noel Grandin
Change-Id: Ic3ee9c05705817580633506498f848aac3ab7ba6 Reviewed-on: https://gerrit.libreoffice.org/67866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-17Use indexed getToken()Matteo Casalin
Change-Id: Id26dc4262ca7030f5165a56be019a009e043d893 Reviewed-on: https://gerrit.libreoffice.org/67660 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-16MSForms: Rework the MS compatible Forms menu a bitTamás Zolnai
* DateField is saved as a content control in MSO file formats so let have it under content controls submenu * The MS compatible forms menu is a Writer specific thing so better to have the related commands as Writer commands. Change-Id: I2d66130f54c055a422f56b18ff2c98667e4f6469 Reviewed-on: https://gerrit.libreoffice.org/67912 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-02-16MSForms: Make Control Properties menu to work with drop-down form fieldTamás Zolnai
Always forward the Execute and State method to the form shell, so if a form control is selected the Control Properites will work correctly. Otherwise we check whether there is any field next to the cursor. Change-Id: I25055c17d887a2f2a716d8325f46825cc408179e Reviewed-on: https://gerrit.libreoffice.org/67911 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-02-16MSForms: Don't show popup dialog of drop-down field when there is no item listTamás Zolnai
Change-Id: Ife361e0ee18437da6f188e77713ea51403b70dbc Reviewed-on: https://gerrit.libreoffice.org/67910 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-02-16MSForms: Introduce a properties dialog for Drop-down form fieldTamás Zolnai
- Dialog created similar to the edit dialog of Input field - On the dialog, the user can edit the list of the drop down field - This dialog is only for editing of the field, so the user can't select an item from the list to display in the field. Change-Id: I6222aba9b211afeb0e9d10d97a49347921ff7353 Reviewed-on: https://gerrit.libreoffice.org/67909 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-02-16MSForms: Make Drop-Down form field to have a default sizeTamás Zolnai
Similar to MSO Drop-down form field and LO Input List. Change-Id: Idba278d8c2a2106b6f3cc22d8b9f8570f45bfae9 Reviewed-on: https://gerrit.libreoffice.org/67908 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-02-16MSForms: Insert Legacy Form Fields from MS compatible Forms menuTamás Zolnai
I added a new submenu under MS compatible Forms menu called Legacy Forms. Under this submenu user can insert the three legacy form fields. These fields were already supported by DOC / DOCX filters, but were missing from the UI. When inserting text form field we insert 5 enspace to make the field visible, otherwise we use the same insertion methods what is called by DOC import. Change-Id: I1fb8c03d969b4c547ca92e783ac5e216767685d5 Reviewed-on: https://gerrit.libreoffice.org/67907 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-02-16MSForms: Show restart dialog when MS compatible Forms menu setting is changedTamás Zolnai
Change-Id: Icb98dac73dea5f5cb18e1ca34e37e9d9bf84782e Reviewed-on: https://gerrit.libreoffice.org/67906 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-02-16MSForms: Introduce a new Forms menu which is compatible with MS WordTamás Zolnai
* It's a Writer only menu by now * Displayed when the compatibility option is set * The menubar is changed during creation, so the option has an effect only after a restart. * MS compatible Forms menu contains only some ActiveX controls now Change-Id: I459f489c15ea7a25514f379b1800b926cc2087ce Reviewed-on: https://gerrit.libreoffice.org/67904 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-02-16MSForms: Introduce a new compatibility flag to enable MS compatible Forms menuTamás Zolnai
* It's a global option not a document level setting (like other compatibility options) so I created a separate section on the GUI for this option on the same tab page. * In the configuration the option is placed under Compatibility/View since the existing Compatibility/FormattingOptions seems related to document formating and not the GUI. * Since it was added with a new configuration root I needed to add also a new ConfigItem derviative class to handle this option. Change-Id: I54668ae9808a1ca3c3b7fe81f2f201720257b3fb Reviewed-on: https://gerrit.libreoffice.org/67902 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-02-15Revert "tdf#49684 Don't focus on Navigator or Sidebar on show"Jim Raykowski
See tdf#122900 for unwanted behavior changed caused by this. This reverts commit 88cbc3ea2db8358bbedff01361f95f972f2b0231. Change-Id: I9451a4b1f059b40d33b66b06f23228fc64170d8d Reviewed-on: https://gerrit.libreoffice.org/67853 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2019-02-15sw btlr writing mode shell: fix cursor positionMiklos Vajna
By implementing the SwRect variant of SwTextFrame::SwitchHorizontalToVertical() for the IsVertLRBT() == true case. The blinking cursor position after doc load is now correct. Change-Id: I4862a6de286d3c0a34235fa0be8be2746b1a4151 Reviewed-on: https://gerrit.libreoffice.org/67880 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-15sw btlr writing mode: implement DOCX filterMiklos Vajna
Replace the old trick with character-level rotation with the usage of the new writing direction. This means that finally table cells with btlr text direction and multiple paragraphs show all content, not only the first paragraph, as before (seen as data loss by users). Change-Id: I094f36fa6ba0701579e487e8e0212707987b1b2f Reviewed-on: https://gerrit.libreoffice.org/67870 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-15sw btlr writing mode layout: fix multiple paragraphsMiklos Vajna
aVerticalLeftToRightBottomToTop was wrong, it mapped from physical to logical, and it should be the other way around. In practice this means that when SwTextFrame::AdjustFrame() is invoked for a second lower, then nAdd will be a small positive (and not a large negative) number, so the warn:legacy.osl:20827:20827:sw/source/core/text/frmform.cxx:479: Ey warning goes away and the second lower becomes visible. Change-Id: I894fef4a89b1feeb333537ff7d76793130007ed8 Reviewed-on: https://gerrit.libreoffice.org/67862 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-15loplugin:simplifybool extend to !(a == b) where comparison an overloaded opNoel Grandin
Change-Id: I08fcbe2569c07f5f97269ad861fa6d38f23a7cc7 Reviewed-on: https://gerrit.libreoffice.org/67816 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-15Initialise an integer to 0, not falseTor Lillqvist
Change-Id: I9d85f6a86d96353312bb00aeb1c173fa9fdfefda
2019-02-15Interpret the parameter of WordBasic.FileClose() more correctlyTor Lillqvist
In particular, the value 2 means "do not save". Change-Id: I9788d201f8ecfcc016a12aa2088552ee994e1c17
2019-02-15CppunitTest_sw_layoutwriter: disable testBtlrCell() on Windows, tooMiklos Vajna
Till it's clear why it has unexpected values. Report from mailing list: > Test name: SwLayoutWriter::testBtlrCell > equality assertion failed > - Expected: 2707 > - Actual : 2710 > - In <>, attribute 'y' of '//textarray[1]' incorrect value. Change-Id: Ic914f513df544dcf472b0870a3936f87d876c76b Reviewed-on: https://gerrit.libreoffice.org/67856 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-14sw btlr writing mode layout: fix baseline offsetMiklos Vajna
The problem was that the x position of the btlr text had a 159 twips difference (it was too close to the cell border), since the text portion height -> baseline offset calculation worked with the descent, not with the ascent. The position of the text now matches exactly what Word does. As a side-effect this means that multiple portions in a line and also multiple lines in a text frame now work correctly. Change-Id: Ic139db328e2a913e5cae4026886c3410cdab357d Reviewed-on: https://gerrit.libreoffice.org/67823 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-14Use indexed getToken()Matteo Casalin
Change-Id: Ibf8a644c1d61516caa67e0ce22b33a41380d9911 Reviewed-on: https://gerrit.libreoffice.org/67621 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-13sw btlr writing mode: add UI for thisMiklos Vajna
There was only horizontal and vertical previously, so keep things simple and talk about the BT and TB version of vertical, not mentioning the LR/RL aspect. Also rename the textdirection widget, so it's unique not only within the tab page, but inside the dialog, so we can have uitest coverage for this. Change-Id: Ie396898fde03aca6cd37a29f049099fa4b2c5fc0 Reviewed-on: https://gerrit.libreoffice.org/67789 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-13sw btlr writing mode: add a layout-level testMiklos Vajna
Fails with commit e8b9572bf89f55463f2c879a401ed62efc165d95 (sw btlr writing mode: implement initial layout, 2019-02-12) reverted. Change-Id: Ic68ef53a8b5bf86678d7e67c9960501f23341268 Reviewed-on: https://gerrit.libreoffice.org/67776 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-13tdf#123266 make cursors svg ready for better resizing.andreas kainz
Change-Id: I1980cfd444e4ccee6574878fb6d6dd507bc972d5 Reviewed-on: https://gerrit.libreoffice.org/67673 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2019-02-13sw btlr writing mode: implement ODF filterMiklos Vajna
An easy way would be to just extend aXML_WritingDirection_Enum, but then we would write the new attribute value to a non-extension namespace. So special case the new attribute value during both import and export (and only for table cells as a start). Change-Id: I431bf99693c4a3452e91f241bd2f0fcfc72c68fd Reviewed-on: https://gerrit.libreoffice.org/67770 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-13tdf#123002 Disable off-page positioning for footer/header objects onlyPatrick Jaap
We should restrict this to this case since the anchor of objects in the body may appear on another page when the object is moved around. In constrast, objects in header and footer should not appear on other pages, so we still disable the "off-page positioning" for them. Horizontal off-page positioning should be disabled in any case. See also tdf#112443 and tdf#120839 Change-Id: I056c74526f38c302ba49297f9f84ec0e958d2cec Reviewed-on: https://gerrit.libreoffice.org/67088 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-13tdf#123378 Prevent modifying doc when printingSamuel Mehrbrodt
Just remove this update fields call, they are updated anyway. Change-Id: Iaed1b6e7e1be8138ecb48e7557cc09ec0eeebda3 Reviewed-on: https://gerrit.libreoffice.org/67754 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-02-13Pointer is pointlessNoel Grandin
since it is just a wrapper around PointerStyle Change-Id: I51f065e0d4ad8bd91f5c84c5819048c720a19267 Reviewed-on: https://gerrit.libreoffice.org/67711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-13Add note with link to bug report for double-removal of annotationsHamish McIntyre-Bhatty
Change-Id: Ie5c5f6296e54b1118f1182766473f3f70eb37385 Reviewed-on: https://gerrit.libreoffice.org/67722 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-02-13tdf#97361 Make xtext.py more pythonicHamish McIntyre-Bhatty
Mostly just clean up with pylint, and changing variable names to comply with the style guide. Change-Id: I7298fbbcf394de19acf66d10447676d7d822d6f0 Reviewed-on: https://gerrit.libreoffice.org/66198 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-02-13sw btlr writing mode layout: implement unmapping of this directionMiklos Vajna
Fix various cases which trigger this warning: warn:legacy.osl:10975:10975:sw/source/core/txtnode/swfont.cxx:427: Unsupported direction Which means that we tried to work with a VCL direction of 900, without passing around the btlr flag accordingly. Change-Id: I96374fc949f60e8324c5a84de48b710b6461bafb Reviewed-on: https://gerrit.libreoffice.org/67746 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-12sw btlr writing mode: implement initial layoutMiklos Vajna
The bulk of this commit is reasonably straightforward, the interesting parts are: - SwFrame::CheckDir() is where the layout reads the doc model, i.e. sets the new SwFrame::mbVertLRBT. - We had 3 text directions previously: horizontal, vertical (implicitly RL) and vertical LR (implicitly TB). This adds a 4th text direction for the LRBT case. - SwTextFrame::SwitchHorizontalToVertical() is responsible for re-locating the origo of a string to be painted from the top left to the bottom left corner (in addition to the height/width swap that's done for all vertical directions). - Finally MapDirection() is the place where we map Writer's new btlr mode (with no character rotation) to VCL's 900 (90 degrees) rotated direction. No functional changes intended for existing text directions. Lots of places are still not yet adapted, but this is good enough to paint a single word in a table cell at the correct position with the correct direction. Change-Id: I465c62db6562d8a2be140c3d37473e590830139e Reviewed-on: https://gerrit.libreoffice.org/67740 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-12sw: remove load_save_test.pyMichael Stahl
This is not and has never been a unit test; let's remove it to avoid confusion. Change-Id: I42a5e8f9d2f9757bcc9e0c6051e5d86ffc6e023f Reviewed-on: https://gerrit.libreoffice.org/67732 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2019-02-12tdf#122594 XLSX OLE in DOCX: export ActiveTableLászló Németh
(visible sheet) of an embedded spreadsheet, instead of exporting always the first sheet. Change-Id: I5c6f982b1b814a5f3830f08d247f4db3fdc3c384 Reviewed-on: https://gerrit.libreoffice.org/67733 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-02-12sw btlr writing mode: implement UNO APIMiklos Vajna
The custom code in SwXCell::setPropertyValue() was added in commit 5a5597655a4bf12e4ca07c9c2b6f6221e217f080 (tentative fix for fdo#30474#, 2010-11-26), which suggests that not handling all constants from text::WritingMode2 was not intentional. Later the writerfilter side (which is the only client of this hidden property) was adapted to use text::WritingMode2, so do the same here. This implicitly adds support for the new text::WritingMode2::BT_LR as well. Change-Id: I37d8eaa844847cb19e7503b2d973069f9895e6bc Reviewed-on: https://gerrit.libreoffice.org/67730 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-12merge together as get_checkbox_column_widthCaolán McNamara
Change-Id: I183d2d94ab60c128b136674ef40eeb30057b281c Reviewed-on: https://gerrit.libreoffice.org/67714 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>