summaryrefslogtreecommitdiff
path: root/sw/source/uibase
AgeCommit message (Collapse)AuthorFilesLines
2020-05-10Resolves: tdf#132626 entry_insert_text works on the newly typed regionCaolán McNamara1-1/+0
but in this case we want to work on the whole entry string to see if it forms a legal result Change-Id: I818c7d6b8efc53d00a7ea68b2e1e0ad386ed0b20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93879 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin6-6/+6
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-09compact namespace in swNoel Grandin31-89/+74
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: fix editing of drop-down field.Tamás Zolnai1-9/+9
When cursor is on the left side of the form field. Change-Id: I8587c477b6177e9309349afbbfc70979b4338275 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93663 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-05-08lok: MSForms: Handle event about item selection of a drop-down field.Tamás Zolnai1-0/+36
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-08tdf#111535 - Add First-line indent, paragraph indent, and tab spaces/Core partgokaysatir1-0/+27
Change-Id: Ib340e74646299c344dd770977497f59a030c86f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93165 Tested-by: Jenkins Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-07tdf#132477 don't leave removed row highlightedCaolán McNamara1-0/+3
so that an attempt is made to unhighlight it in dnd post-processing Change-Id: I23fdf407d53c22a6bfd697e5e23c450f009c67b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93629 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-06tdf#101181: support for transparency attribute of glow effectMike Kaganski1-0/+1
Read/write support for ODF and OOXML (in ODF, loext:glow-transparency attribute of style:graphic-properties has been added). Added UI on glow sidebar panel. Not used in actual painting yet. Change-Id: I21b25d9c52c8611cd796f056374377ebf13cc2f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93565 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-05sw from-bottom relative orientation: fix calculation of position limitsMiklos Vajna1-1/+2
Create a new Writer doc, insert a rectangle with height = 10cm, try to position it 2cm above the bottom of the page, so that would be -12cm, but we limited the metric field to -2cm because 2cm was the page margin. Teach SwFEShell::CalcBoundRect() about text::RelOrientation::PAGE_PRINT_AREA_BOTTOM, then this will work without problems. Change-Id: Ib6ddccc1512d39fff5bff2e989973b156a6c2bf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93501 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-05-05remove unused nSearchFamily and nMask membersCaolán McNamara3-6/+0
and so SetSearchMask which doesn't have any effect anymore Change-Id: I0b7f402ce0317971d5196fc448fe2945a6a292f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93393 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-05we end up making a nFamily style, not the style of GetSearchFamilyCaolán McNamara1-1/+1
so use that as the filter Change-Id: I91ef5b07ccbe9a4ceafa86e2331ea72bebe38145 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93492 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-05help states that SfxNewStyleDlg lists SfxStyleSearchBits::UserDefined stylesCaolán McNamara1-1/+1
Change-Id: Ibf89d0ff1154b943a5650ac6cd6aa64a084c15cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93491 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-05use SfxStyleSearchBits::All for SfxNewStyleDlg in writer, like calc doesCaolán McNamara1-1/+1
Change-Id: I44399a617b07acb93ca33d537bcfcc5554e1ede5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93490 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-05nFamily is the SfxStyleFamily which was modifiedCaolán McNamara1-1/+1
so it seems natural to use that in the force update internal list call Change-Id: Id5871bdec5f2e06be6728c4a0290e8c91681d4fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93473 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-05we want to invalidate the current iteratorCaolán McNamara1-1/+2
if there isn't one we shouldn't need to create one to invalidate it Change-Id: Ia936f71c18c45d8e08f013ffa143c196109495ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93471 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-05make the family and mask explicit in SfxStyleSheetBasePool::FirstCaolán McNamara3-5/+5
Change-Id: I36655b65ca00e5f7b8779a28d4a1778c8e35dc4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93461 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-05nFamily is already set to SfxStyleFamily::ParaCaolán McNamara1-2/+0
Change-Id: Idbe36ef183148ea126e90ff14f011d403dbaa62f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93447 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-05drop SfxStyleSheetBasePool::CountCaolán McNamara1-4/+5
and use CreateIterator to make it explicit what is being counted Change-Id: I8d76aef601533960a23c056b83a48c4f130bbe75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93446 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-04make Search family and mask explicit for SfxNewStyleDlgCaolán McNamara1-1/+2
Change-Id: Ib3e5765d37474188d6505f1d9965969ee6c24f0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93358 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-03explicitly pass SfxStyleFamily to GenerateUnusedNameCaolán McNamara1-1/+1
Change-Id: I7879578383d58cb65441c9049e91e33bb4827afb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93353 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-02Resolves: tdf#132477 Fix Writer Navigator drag and drop crashJim Raykowski1-4/+8
Dont allow drag and drop when tree root is selected Change-Id: Ia5b8c07861c4ac9b0e4632ccc09e1cd9211e2a8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92962 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-02tdf#132603: fix crash when selecting part of a commentJulien Nabet1-1/+2
See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=160206 Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=65404e2c72ea2d5d3f6c074121005b8b9369e7fb author Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> 2020-04-08 08:54:21 +0200 committer Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> 2020-04-09 11:14:15 +0200 commit 65404e2c72ea2d5d3f6c074121005b8b9369e7fb (patch) tree 15eeeb5b634c461611893dbe3b49d689ef71f5c4 parent 40d83914d43f60a196dfabddea0b52e2046b333a (diff) Move is*Locked methods to object shell They depend on the model, not the view. Follow-up to 523922ee9d033fd304d2b50a72b76853ddcfbcdf Change-Id: I9267e856a0f0fb22778dcd95974bb4217fd3712f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93308 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-01can just call isXMLToken hereNoel Grandin1-3/+3
Change-Id: I5cb0b5ce9c9be78b68c757590880bf894186d0be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-01tdf#130122 Make Navigator CNV collapse to childrenJim Raykowski1-1/+1
in root Content Navigation View again SwContentTree CollapseHdl needs to return false, when a root node collapse to children is done, to inform the caller not to do the collapse. Change-Id: Ie8bd731c6ea2f4ae51ddfcd4515d4481ab2d37b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92999 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2020-05-01tdf#63967 Navigator section tooltip word and character countJim Raykowski1-0/+29
Change-Id: I13ef9d71b080d5cac15e402e9198cf3c182eb78e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91268 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2020-04-30loplugin:makeshared in swNoel Grandin6-14/+13
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-29weld SfxTemplatePanelControlCaolán McNamara3-6/+8
Change-Id: Ib3f6d01ddec37afc3987423dc15ab84ad6475f37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92942 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-28move the castToFastAttributeList functionNoel Grandin1-4/+1
to the slightly higher namespace, to make it easy and more readable to use directly in a for-loop-range expression. And make it return a reference rather than a pointer, since it is never allowed to be nullptr. Change-Id: I15d0b32493ef65cfc601b247c272b318f1eadfd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93049 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann11-1/+15
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-26move PanelLayout to sfx2Caolán McNamara10-10/+10
Change-Id: If29ccb67835adba3ff6cf2eb53f348bbe71d6463 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92933 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-26all ItemWindows are now weldedCaolán McNamara2-4/+4
where native widgetery is hostable in a vcl toolbar or a native one Change-Id: I942ada335bb4bd6ced0f3352f632e25787f68597 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88598 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25rename SvtValueSet back to ValueSetCaolán McNamara7-15/+15
Change-Id: I51ab96ffef7acc0d416d13ac8e380e49381f4d1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92902 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-24final ctor arg of PanelLayout ctor is always true nowCaolán McNamara11-11/+11
Change-Id: I40cb888c13cb49aa0e20b5be5ceb1c15cf7a346c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92858 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-24weld StylesPropertyPanelCaolán McNamara1-2/+0
and SvxStyleToolBoxControl, etc. use a GtkOverlay to support the submenu hackery in the Style wysiwyg combobox dropdown Change-Id: I17baa56f382243070ee49e6d707e97324e4f4d67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85720 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-24convert SwFillMode to scoped enumNoel Grandin5-8/+9
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 Grandin5-21/+21
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-22sw: prefer ODF over RTF when pasting from WriterMiklos Vajna2-0/+43
Regression from commit e9e6d4b058e13165f3dde1ca7822eec97dfe8aa7 (tdf#116685: Make the RICHTEXT take precedence over EMBED_SOURCE., 2019-09-26), the problem was that now we always prefer RTF over ODF when pasting into Writer. The commit made sense for Calc->Writer paste, but it causes formatting loss for Writer -> Writer paste. The exact use-case was copy&paste of numberings where the pasted content got paragraph indent as direct formatting, so shift-tab at the paragraph start changed only the bullet type, not the indentation -- but it's easy to imagine several other cases where a roundtrip via ODF provides better results than RTF. Fix the problem by leaving the above commit in place, but extending SwTransferable::Paste() so that it prefers ODF over RTF in case of a Writer->Writer paste (and leaves the non-Writer -> Writer paste behavior unchanged to avoid the unwanted OLE objects). Change-Id: Ida745bba65c5a210021cea0d267c02900fc6398a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92705 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-04-22move InterimItemWindow to svtoolsCaolán McNamara3-3/+3
Change-Id: I058b1d96a3ddfaa1aa96f66d0ebc6fa68900a48c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92697 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-22Fix typosAndrea Gelmini1-1/+1
Change-Id: I49d7dc8a2cbcba5413d05d97559321e672ed413a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92655 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-04-22tdf#42949 Simplify use of rtl::math::approxEqual in include/basegfx/Gabor Kelemen8-0/+8
Turns out we can save about 500Mb of preprocessor input if we use rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper rtl::math::approxEqual from rtl/math.hxx and manage the fallout accordingly. Before: bin/includebloat.awk | head sum total bytes included (excluding system headers): 19017296671 After: $ bin/includebloat.awk | head sum total bytes included (excluding system headers): 18535432672 Change-Id: I1691171f3a309405a7099882ad9989d147f59118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-22Revert "tdf114724: uitest: make test less time.sleep dependent"Xisco Faulí2-6/+0
This reverts commit 634ce6f2d87a30b8abd2e8c67668e3bb5d87406b. See https://gerrit.libreoffice.org/c/core/+/92616 Change-Id: I642843ab16450d1a6b15d5e955495efbbfa7822a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92539 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-04-21tdf114724: uitest: make test less time.sleep dependentXisco Fauli2-0/+6
Instead, check the focus moved to the bottom and back to the first element Execution times goes 17.232 from to 5.521 for me Change-Id: I816c197f44b68a1b9ab8686de191a743cbc78eb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92616 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-04-21CreateDocumentInfoDialog should return shared_ptrNoel Grandin1-2/+2
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-18simplify some SwRect code - use the SwRect Add* variantsNoel Grandin1-2/+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-16/+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-17tdf#131621: fix crash in mergedlo.dllMike Kaganski1-23/+42
When the embedded database comes from the template this document was created from, the document might not have old URL yet. We need to construct the embedded data source URL from the template URL to keep the relative references correct. Change-Id: I5607113e0ae88fdb825d8a645c0968d2fe22ebd7 Co-authored-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92398 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-04-16Enable trailing-blanks compat option also for OOXML filterSamuel Mehrbrodt1-0/+2
Change-Id: I6d338f881f1450be87bedf9ab9aaf24eeed2052d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92257 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-04-16fixes for code creating reversed RectanglesNoel Grandin1-1/+1
ie. where left > right or top > bottom These are all places where the code is self-evidently doing the wrong thing. Found by adding asserts to tools::Rectangle. In theory, this is legit, and code that wants a proper Rectangle is supposed to be first call Justify on a Rectangle, but lots of places don't do that, and that seems very dodgy to me. So lets work towards Rectangles always being in a valid state. Change-Id: I03296a624bd9b5b193e6aa8778addfb09708cdc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92310 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-15navigator pane is grabbing focus away from document when its createdCaolán McNamara1-3/+6
so only grab that focus when its a floating navigator Change-Id: I52e0840e74c3e8058aee3702df52137dfdd3dc9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92279 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>