summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2019-02-22SfxProgress:SetStateText is deadNoel Grandin3-13/+0
since commit 83ee1bccf9899bb5c1913389b9a26a73a515ad82 Date: Fri Jul 22 09:19:52 2011 +0100 callcatcher: remove unused methods and even following the history back before that only shows one previous actual place where the state text was being displayed. Change-Id: Ib520cb6e999c1e11caf7348821bb274cdd785a44 Reviewed-on: https://gerrit.libreoffice.org/68198 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-22Avoid uncontrolled overflow in SwTable::GetBoxNumStephan Bergmann1-2/+8
...where bad input like "WRONG CELL NAME" (in PythonTest_sw_python's sw/qa/python/check_xtexttable.py) could wrap around to a valid but wrong nRet. Instead, return SAL_MAX_UINT16 upon overflow. At least the call to GetBoxNum in SwTable::GetTableBox (sw/source/core/table/swtable.cxx) with bFirstPart potentially true, assigning to nBox, then later checks if( nBox >= pBoxes->size() ) return nullptr; so returning SAL_MAX_UINT16 upon overflow appears to be the best choice. (Found with Clang's -fsanitize=implicit-signed-integer-truncation.) Change-Id: I12822a6bd4f0269adb14c04eefbd1cde4d288728 Reviewed-on: https://gerrit.libreoffice.org/68203 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-22ofz#13250 Direct-leakCaolán McNamara3-7/+5
Change-Id: Idf5984399f2d8bdf4751667e01f170bed15a4443 Reviewed-on: https://gerrit.libreoffice.org/68205 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-22sw btlr writing mode shell: fix up/down cursor travellingMiklos Vajna6-12/+44
By teaching SwEditWin::KeyInput() about 2 vertical modes: the existing tbrl one and the new btlr one. Up now correctly goes to the next character and down to the previous one. Change-Id: I71faebe62e5fa3892b37e8bea6c15d1fb84df5d1 Reviewed-on: https://gerrit.libreoffice.org/68183 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-22Remove confusing commentMatteo Casalin1-4/+1
Change-Id: I0e19228b50a19085c9eee70372b34a07e7255091 Reviewed-on: https://gerrit.libreoffice.org/68115 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-22loplugin:unusedfields in swNoel Grandin15-75/+16
Change-Id: Id68a01042f8398d7d4803a9ce7eb03620732f1ce Reviewed-on: https://gerrit.libreoffice.org/68163 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-21Set maLayoutSize also for non-RES_FLYFRMFMT, like RES_DRAWFRMFMTStephan Bergmann1-0/+1
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 Kaganski1-6/+6
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 Vajna1-1/+1
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 McNamara1-1/+1
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émeth2-32/+0
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 kainz1-99/+768
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 Kaganski1-41/+4
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 Vajna1-1/+1
Change-Id: Icb3ba2658442b1218ac039d0a5a6d5dc77b94434
2019-02-20Revert "uitest for bug tdf#101873"Miklos Vajna2-52/+0
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 Luth3-2/+11
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 Stahl2-3/+6
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 McNamara2-7/+7
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 Crhonek2-0/+52
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 Lillqvist3-0/+35
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 Yesil4-2/+74
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 McNamara1-1/+4
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 Lillqvist1-1/+0
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 Grandin1-2/+2
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 Vajna2-0/+38
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émeth1-0/+21
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 Grandin1-4/+4
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 tietze9-3/+31
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 Vajna1-4/+1
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 Vajna2-68/+68
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 kainz12-220/+220
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 tietze6-97/+93
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 kainz3-9/+12
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 Gelmini1-1/+0
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 Grandin1-2/+2
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 Casalin1-8/+10
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 Zolnai1-1/+5
* 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 Zolnai2-0/+65
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 Zolnai1-0/+11
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 Zolnai9-0/+565
- 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 Zolnai2-3/+5
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 Zolnai6-0/+135
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 Zolnai1-0/+12
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 Zolnai2-0/+30
* 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 Zolnai3-1/+116
* 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 Raykowski1-0/+3
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 Vajna2-4/+46
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 Vajna2-29/+8
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 Vajna3-34/+39
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 Grandin9-18/+18
Change-Id: I08fcbe2569c07f5f97269ad861fa6d38f23a7cc7 Reviewed-on: https://gerrit.libreoffice.org/67816 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>