summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2019-02-21Set maLayoutSize also for non-RES_FLYFRMFMT, like RES_DRAWFRMFMTStephan Bergmann
Running CppunitTest_sw_ww8export2's testTdf111480 under Clang's -fsanitize=implicit-signed-integer-truncation fails in SwWW8WrGrf::WritePICFHeader (sw/source/filter/ww8/wrtww8gr.cxx) when the passed- in nHeight, where both nWidth and nHeight are zero, is reduced to below zero when subtracting nThick for the borders. In turn, nWidth and nHeight being zero is caused by SwWW8WrGrf::Insert (sw/source/filter/ww8/wrtww8gr.cxx) calling rFly.GetLayoutSize(), and that ww8::Frame::maLayoutSize being left initialized to zero in the Frame::Frame(const SwFrameFormat &rFormat, const SwPosition &rPos) ctor (sw/source/filter/ww8/writerhelper.cxx) unless it is a RES_FLYFRMFMT (while in this scenario it is a RES_DRAWFRMFMT). The additional maLayoutSize, and SwWW8WrGrf::Insert calling GetLayoutSize() instead of GetSize(), were added with CWS ww8export01_SRC680 commits in 2007 (e.g., a79a54b255481f31db2c530278c2deee97625769 "INTEGRATION: CWS ww8export01_SRC680"), to fix <https://bz.apache.org/ooo/show_bug.cgi?id=43447> "export to .doc of images with captions if image had been resized". It looks like those commits didn't take into account that GetLayoutSize() could also be called for non-RES_FLYFRMFMT while it would erroneously be left initialized to zero for those. Change-Id: I7455ab43268d132dc23958185a48a1e73214c7ca Reviewed-on: https://gerrit.libreoffice.org/68151 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-21Make sure that mark does not exceed the length of the textMike Kaganski
Change-Id: I685d3ac7f7038ef91463b2a0f012e23f0d6a422e Reviewed-on: https://gerrit.libreoffice.org/68147 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-21sw: fix warning in SwTextShell::GetState()Miklos Vajna
warn:sw.core:31398:31398:sw/source/core/bastyp/index.cxx:322: SwIndex::operator--() wraps around Change-Id: I5c37a6b5e1fe24bc3b6b84e762bad6577583f3d8 Reviewed-on: https://gerrit.libreoffice.org/68127 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-21weld HangulHanjaConversionDialogCaolán McNamara
Change-Id: Ia41f1a03581a0a48d59706ac5b3c569fc39c7f4d Reviewed-on: https://gerrit.libreoffice.org/68099 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-21tdf#123434 FILEOPEN: RTF: missing content in cellsLászló Németh
Revert "tdf#122424 RTF import: ignore table row text outside the cells" This reverts commit dc8fa612054363e1a871b0e413a59889fbdb156a. Change-Id: Id68dc7ae55df013de64fb2d4955a412e4c046781 Reviewed-on: https://gerrit.libreoffice.org/68086 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-02-21sifr icon theme update and writer tabbed compact toolbar updateandreas kainz
Change-Id: I031f7ce7e63c9bf7ebda55c2742004f642ba8e5a Reviewed-on: https://gerrit.libreoffice.org/68129 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2019-02-20Avoid meaningless string<->integer conversionsMike Kaganski
Change-Id: I4b86636cc4e4884459d59d1df9949505274bde9e Reviewed-on: https://gerrit.libreoffice.org/68069 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-20sw: fix buildMiklos Vajna
Change-Id: Icb3ba2658442b1218ac039d0a5a6d5dc77b94434
2019-02-20Revert "uitest for bug tdf#101873"Miklos Vajna
This reverts commit 92849660e21d5a13fb671339e52cbc30335ab842. The original commit already contained a test, so this one is redundant. And when there is a possibility to choose, then it's better to test something from fast cppunit tests than from slow uitests. Change-Id: I1d8849da242ee6c8e5d7729b26a71e495a2d394e Reviewed-on: https://gerrit.libreoffice.org/68062 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-20tdf#123433 ww8import: end same attribute as what startedJustin Luth
This resolves the regression from the bugfix for tdf#116071 from commit 3539a1efb41a787237e4333ebc715db96ffacb5b Change-Id: I59929401d84e3ad201bffc8aa9b50057ac716e71 Reviewed-on: https://gerrit.libreoffice.org/68011 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-20tdf#123293 sfx2: fix metadata loss when loading from streamMichael Stahl
The problem is that when loading from a stream, there is no BaseURL and also no storage for the document. Due to the lack of BaseURL, the sfx2::createBaseURI() throws and loading RDF metadata fails, which also pops up an annoying warning dialog. Try to handle this in a similar way than a newly created document (see GetDMA()), by using the vnd.sun.star.tdoc scheme URL for the document; this however currently requires that the document has a XStorage, which is also not the case here. So add another UNO method to tdoc UCP's tdoc_ucp::ContentProvider, to split out the creation of the tdoc schema URL from the creation of the ucb Content, to get rid of the XStorage requirement. Change-Id: Ica62743f9d21db0b1464b70db1a62ebc61989ef8 Reviewed-on: https://gerrit.libreoffice.org/67882 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-02-19weld ChineseDictionaryDialogCaolán McNamara
and ChineseTranslationDialog Change-Id: I3b754c405c8379fc0c5fa94437cc0464a1dea999 Reviewed-on: https://gerrit.libreoffice.org/67991 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-19uitest for bug tdf#101873Zdeněk Crhonek
Change-Id: I2b01767b94a7c63fac725d2f6e943e589e232822 Reviewed-on: https://gerrit.libreoffice.org/68023 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2019-02-19tdf#110987: Don't mis-detect .doc files as .dotTor Lillqvist
Also add a unit test for that. Change-Id: I86c195cebbe12b2bdf498954956db882f6f0d12b Reviewed-on: https://gerrit.libreoffice.org/68005 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
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