summaryrefslogtreecommitdiff
path: root/sw/inc
AgeCommit message (Collapse)AuthorFilesLines
2020-06-24sw: make postithelper.hxx self-containedMiklos Vajna1-12/+2
The problem was that the inline SwSidebarItem ctor/dtor needed a complete type for sw::annotation::SwAnnotationWin, but AnnotationWin.hxx already includes this header, so we can't include it. Move the ctor/dtor to postithelper.cxx where we include AnnotationWin.hxx already. Change-Id: I619bd5d21493a80436a333c128eadfff2a6834b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97011 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-24tdf#128197: sw: different line height for DOCX with compat=14Vasily Melenchuk1-1/+2
Lines containing just a shape inline without any other text are treated in DOCX with compatibility option 15 and 14 in a different way: while compat=15 is layouting line exatly as LO does, in compat=14 mode minimal line height takes into account just shape height and not current font. Change-Id: Id2bdab941a0bbaa9080567d736435d9e0babd490 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96080 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-06-23sw doc model xml dump: improve undo-redo coverage:Miklos Vajna1-1/+6
- show the undo manager's node array - show SwUndoDelete - show SwUndoSaveContent - show SwHistory - show SwHistoryHint - show SwHistoryTextFlyCnt - show SwUndoFlyBase - show SwHistorySetFormat - show SwUndoInserts When an action + undo pair goes wrong, it's easier to see the state of the undo stack after the action this way, then decide if the undo stack is already bad, or the problem is with the undo implementation. Change-Id: Ic509a233dce3c47db9697982eb7ea423f4706129 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96930 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-06-20use JsonWriter for the rest of ITiledRenderableNoel Grandin2-4/+5
and fix bug in buffer reallacotion where mPos pointing at the beginning of the new buffer instead of at the correct index inside it. Change-Id: Ie1ffaa176f6165e2cec85c93adc945312eff38e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96650 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-18new json writer for LOKNoel Grandin1-1/+1
we shave about 3 memory copies off in the process, and make the class play nicely with our string types. Change-Id: I1f614fb35b1de499ac99e3b33ac638ad81054bed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96393 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-17uitest: Add support for Writer commentsShiko1-0/+3
Change-Id: I88ed2894c3665fb421c5d8ea0f278c54ccd0d0e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96230 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2020-06-16sw: fix type of FieldsToCalc() parameterMichael Stahl1-1/+1
Change-Id: Ic59c65f67c9479c5d43bef4abd67b8e4ee4192b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96128 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-06-16sw: remove useless SET_CURR_SHELL macroMiklos Vajna1-4/+0
Perhaps it did something useful in the past, but it's better to expand it in its current form. Change-Id: I404e8d274f15a178f519d42a1ecd993c1e530f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96384 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-15tdf#133957 sw: SelectAll should select fly in empty sectionMichael Stahl1-0/+3
Ctrl+A should select everything in the section; if the section is empty, there's no text to select, and then the shell will cancel the selection because SwCursorShell::HasSelection() returns false - so check if there are flys anchored there, which fixes the Copy. To fix Delete, a few more checks for empty selection need to be changed. Change-Id: If54160bdca976ad5f153b89cf8492f4da1e774b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96324 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-06-15tdf#128195 Keep spacing below last paragraph in header (docx)Samuel Mehrbrodt1-0/+1
Add a layout compat option to keep the spacing below the last paragraph in the header in doc/docx files Change-Id: I259511183a8252e04d9951357dbdd4f4832523ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94577 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-06-12tdf#131912 sw: fix spell check correct deleting flysMichael Stahl1-1/+2
* SwEditShell::ApplyChangedSentence() should not call DeleteAndJoin() + InsertString() but ReplaceRange() * ReplaceRange() and SwUndoReplace need to set a new flag DelContentType::Replace to tell SwUndoSaveContent::DelContentIndex() not to delete flys but instead record the previous anchor positions * SwUndoReplace::UndoImpl() should also not call DeleteAndJoin() + InsertString(); instead call ReplaceRange() for the start node and then DeleteAndJoin() for any regex "\n" that were inserted (regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5) Change-Id: I485d79510ae233213cb4b208533871934c5e5ec6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96201 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-06-03tdf#101211 Add goto prev and next page uno commandsJim Raykowski1-0/+3
Change-Id: I7e195727066e47f93665fdebf1042282ecbb42b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91605 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2020-06-02tdf#133589 AutoCorrect: transliterate to Old HungarianLászló Németh1-1/+2
In right-to-left paragraph mode, transliterate Hungarian text word by word during typing, also add the associated checkbox to Localized Options page of AutoCorrect dialog window. Old Hungarian (ISO 15924: Hung) is a historical and renewed script which is still in use to transliterate Hungarian writing. As a localized AutoCorrect feature, the patch supports the followings: – word-by-word transliteration of Hungarian texts only in right-to-left paragraph mode. – consonant disambiguation of digraphs and trigraphs based on hyphenation (now pattern-based Huhyphn dictionary of libhyphen, planned dictionary based Hunspell later) – transliteration by extended hu-Hung module of Numbertext library. Note: transliteration of the selected text using AutoCorrect Apply function has't been implemented, yet. Change-Id: Iee0f18e2485c974c35acf0a3abc3a49c2cf80196 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95303 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-29pack a few more classesNoel Grandin2-5/+5
Change-Id: Ia7870d1d0d91de213727116ccda5b41913223866 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95097 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-29Fix 983db96a17630be906b868d2be811663f0d846f6Julien Nabet2-3/+3
warn:unotools.config:172285:172285:unotools/source/config/configitem.cxx:409: ignoring XHierarchicalNameAccess to /org.openoffice.Office.Writer/FormLetter/PrintOutput/AskForMergeFormLetter/FileOutput/FilePassword/FromDatabaseField com.sun.star.container.NoSuchElementException message: FormLetter/PrintOutput/AskForMergeFormLetter/FileOutput/FilePassword/FromDatabaseField /home/julien/lo/libreoffice/configmgr/source/access.cxx:436 missing comma + confusion in switch cases in SwMiscConfig::Load + typo Encyrpted->Encrypted Author: Gülşah Köse <gulsah.kose@collabora.com> Date: Fri May 22 11:51:33 2020 +0300 Add an option to create encyrpted PDF files with mailmerge. With that option user can create encyrpted pdf files with a password column in database via mailmerge. Change-Id: I1ae9bbeb3f69ed9c0ba51709852f8edd5f2dc683 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95033 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-26Add an option to create encyrpted PDF files with mailmerge.Gülşah Köse3-0/+19
With that option user can create encyrpted pdf files with a password column in database via mailmerge. Change-Id: I081ef050bc269b1fec24fd01ecc812acd7b857ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94709 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2020-05-24remove some unused definesNoel Grandin1-12/+0
Change-Id: Ibfdc84f07642db6ec8362c4d76195b4f39dc103c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94731 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-22remove Size arg from Window::Draw and depend on GetSizePixelCaolán McNamara1-1/+1
90% of cases pass GetSizePixel as the Size arg already and this aligns Window::Draw with how Window::PaintToDevice works Change-Id: If5b024179a4b7a3b099177c2f6d4b1fb006b95ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94644 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-21Make Insert Table dialog asyncSzymon Kłos1-3/+5
Change-Id: Id2458c16f259a58e2376f42104a9a6c9056cab11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94536 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94589 Tested-by: Jenkins
2020-05-18loplugin:unusedmethodsNoel Grandin2-3/+0
Change-Id: I95391ef6ed5154efc2c7705dde22afa59da24a70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94403 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-16loplugin:unusedfieldsNoel Grandin1-2/+0
Change-Id: If0e362cf5b403be63439ec694f3a0e440dfd9bc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94327 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-13loplugin:unusedmethodsNoel Grandin1-3/+0
Change-Id: Id813d95a90fdbb360dfc8670c0b55b635f633965 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-13options swapped in SwAccessibilityOptionsNoel Grandin1-4/+4
ever since commit d93f729bf463a5ad12e2c4a49e80fd7ff5622334 #100333# separate accessibility options from view options Change-Id: I54d2c6de98c5d4f0d760d18d3d219710c7d91de9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94094 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-13NFC sw: cleanup and make RES_POOLTABSTYLE_DEFAULT consistentJustin Luth1-4/+4
It was introduced in 2016, and shortly thereafter many other styles were added using the full word TABLE. So make this one consistent since the eye just glances over the difference. In fact, in one place a comment even referred it it as _TABLESTYLE_DEFAULT. At first I was going to limit the change to just the one term, but the number of reference for everything was fairly small, so I just made everything consistent. Change-Id: I57cc0d081c4bbd5bcea872259065af483c94a334 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/82997 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-09compact namespace in swNoel Grandin57-152/+118
Change-Id: Ie2c3e3f95a687b12b89bcfc5cad44fb7a1d4568f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93862 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-09tdf#94628: sw: allow setting for bullet for outline paragraphsVasily Melenchuk1-1/+1
Paragraphs in outline (having style "Header XXX") can also be a part of list and have custom bullets. Simplified code of SwXNumberingRules::SetPropertiesToNumFormat(): do not check for properties special for outline/chapters and removed redundant data shuffle with local maps. Change-Id: I1fa7f8f5359acee1d5aa62d9700641490bb91b6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93672 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-08lok: MSForms: Handle event about item selection of a drop-down field.Tamás Zolnai1-0/+3
Change-Id: I095013097348c98361b6614e4ddf1e9029923c7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93659 Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-05-08sw: remove now unused SwBlinkPortionMiklos Vajna1-1/+0
Change-Id: If2ae13219f7907eb2b2a66a38bcd636dd64dfe3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93676 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-04default CreateIterator mask to SfxStyleSearchBits::AllCaolán McNamara1-1/+1
Change-Id: Ie79eff57646853613e8c6060adbce92dd388df5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93357 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-30loplugin:makeshared in swNoel Grandin1-1/+1
Change-Id: I58d91e75ef96beaab7ec34df519ae3a376dce976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93201 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27tdf#116883: sw: support for lists level format stringVasily Melenchuk1-0/+1
Multilevel lists are more flexible in case of DOCX. There is supported custom format for any level in DOCX unlike in LO and ODT where we are limited only with prefix and suffix for hardcoded list levels separated by dot. At the same time DOCX can have lists not only "1.2.3.4", but "1/2/3/4" or even "1!2>3)4" and such format can vary on each list level. Here is basic implementation for list format as a core feature for all documents and old way (prefix-suffix + ".") is left as fallback. Practically its usage is currently implemented only in DOCX import/export. Some RTF/OOXML unittests were redesigned: since we are not creating prefix/suffix for these formats conditions should be checked in a different way. Change-Id: I1ec58bcc5874d4fa19aee6a1f42bf1671d853b14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92106 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-04-26Fix typoAndrea Gelmini1-1/+1
Change-Id: I0c0c7350b1b8c8630953cdf87146da933de757e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92869 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-04-26update pchesCaolán McNamara4-14/+10
Change-Id: I83a61da7dda6c72552eecd377f1c3744c92a797e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92909 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25convert CursorMoveState to scoped enumNoel Grandin1-9/+9
Change-Id: Ie5071ca1e663213da7c0db392be20957587517ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92870 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-24convert SwFillMode to scoped enumNoel Grandin2-9/+10
Change-Id: I03230496aac57f8855ce8d3dcd8576d265060aa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92845 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-23pass SvxBrushItem around by unique_ptrNoel Grandin3-7/+7
we never create an object that is actually shared, so this is wasted Note1: in IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl, weld::Button&, void) there was a comparison if( aBrush != pRepr->GetBackground() || ... which I removed Note2: In bool SwDoc::GetBoxAttr( const SwCursor& rCursor, std::shared_ptr<SfxPoolItem>& rToFill ) which had a condition else if( rToFill != xBack ) I changed to compare contents Change-Id: Idd769f44917c5ccc7e9f4bfbaddf12f9cd4151cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-22uiobject.hxx only needs forward declaresCaolán McNamara3-7/+6
and update pches accordingly Change-Id: I411712532fd85961bffe6678416fcdc1d9c7f53d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92617 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-21weld FontNameBoxCaolán McNamara1-6/+2
with custom row rendering Change-Id: Ia909b5b9ad56b6ea4611e9ea0a1e2cb0064a8cd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91841 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-21CreateDocumentInfoDialog should return shared_ptrNoel Grandin1-1/+1
which is what it's only call site wants Change-Id: I1c2c2ed3a91a3376af142ac9a5d6993a2186d660 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92590 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-20remove direct access to Size field on SwRectNoel Grandin1-5/+0
so I can add asserts to prevent construction of invalid rectangles Change-Id: I01ac97b3cc780acbd182a646f0e072e518a45bee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92520 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-18simplify some SwRect code - use the SwRect Add* variantsNoel Grandin1-0/+2
which makes it easier to assert the correct stuff in later commits. And add AddTop() and AddLeft() methods for symmetry. Change-Id: I0e03d9d1e933fc14eb007f6f31862f14fee9ef7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92451 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-17Move Word compat option where it belongsSamuel Mehrbrodt1-1/+0
Change-Id: I6b28c6782f22190b7b22b11361c200d68d672aea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-17loplugin:buriedassign in sw(1)Noel Grandin1-2/+3
Change-Id: Ifaab4ab1bde3ff8236b51244098c81e6f460fbd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92408 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-03split up polypolygonprimitive2d.hxx into separate filesTomaž Vajngerl1-2/+1
This patch splits the polypolygonprimitive2d.hxx into: - PolyPolygonColorPrimitive2D.hxx - PolyPolygonGradientPrimitive2D.hxx - PolyPolygonGraphicPrimitive2D.hxx - PolyPolygonHairlinePrimitive2D.hxx - PolyPolygonHatchPrimitive2D.hxx - PolyPolygonMarkerPrimitive2D.hxx - PolyPolygonSelectionPrimitive2D.hxx - PolyPolygonStrokePrimitive2D.hxx ... and fixes the include files and pre-compiled headers Change-Id: I23982e0c81e8992f69e14cbac8e86858266b9999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91603 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-04-03Turn defines into constexprsMike Kaganski1-234/+269
This allows to see actual values of the WhichIds in IDE easier Change-Id: I31106459cd262000444175d082eb349ff937488d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91513 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-04-02loplugin:unusedmethodsNoel Grandin1-47/+0
Change-Id: I906234a38b96c6ba6eaadf7693abd33e98debf50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91567 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-31Translate German variable namesJohnny_M1-2/+2
Ende -> End Change-Id: I1b53861b16510c8e41c0d8d46df17103f988c323 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91216 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-03-31Translate German variable namesJohnny_M1-1/+1
Ende -> End Change-Id: I5d9cb8b91f20ed957c90558bc41b1da1c2ffb099 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91219 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-03-31Translate German variable namesJohnny_M1-3/+3
Ende -> End Change-Id: Idf599738be9b1eaac51da3461edc424fcc83a94e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91217 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-03-31convert enum to scoped in SvBaseLinkNoel Grandin2-4/+4
Change-Id: Ief399381ac27764fce95ee053c322571a07b671c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91366 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>