summaryrefslogtreecommitdiff
path: root/sw/source/uibase
AgeCommit message (Collapse)Author
2021-07-30cid#1399290 silence Uncaught exceptionCaolán McNamara
Change-Id: I1fecdb09374c3631e005039d38dfd852a7b4b671 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119704 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-30convert TextAlign to scoped enumCaolán McNamara
Change-Id: Id2c466eacb44f0ea6adba75a0ac0be8be8e7ed4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119682 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-30indexing: add LOKit API to render the search result into a bitmapTomaž Vajngerl
This adds a new LOKit API to render the search result into a bitmap buffer. It combines the SearchResultLocator to get the location inside the document of the search result (a series of rectangles) and the existing LOKit paintTile API to render the result into a bitmap (byte) buffer. It also adds a LOKit test to show how the API is used and to render a search result of a example document. Change-Id: I4284d90188777fd28158d029daa04151e71022bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118670 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-07-29use the parent as available from HangulHanjaConversionCaolán McNamara
Change-Id: I9b8e34f4358620f2bc3c510ea3d581be8f87bb97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119648 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-28Removed executable bits on source fileAndrea Gelmini
Change-Id: Ib9d8c713e6bc673e806ee8e2e9afea65a5ad83ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119565 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2021-07-28use officecfg for SvtCJKOptionsNoel Grandin
and remove some unused options Change-Id: I487a233de4f7414012e5405f2c2e1f9c8b8fb4f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119554 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-27tdf#123626 Add "Open hyperlink" context menu to hyperlinked shapesSamuel Mehrbrodt
Was missing in a23b44fd9f0119f7ea3523e32875f55c1a07c1cd Change-Id: Ifcee4af79a00c77206be4c2d5ff621f56f2d0018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119551 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-07-27drop SvtLanguageOptions classNoel Grandin
since it is just a wrapper over SvtCJKOptions and SvtCTLOptions. Later I will replace those two with the equivalent officecfg calls Change-Id: I61c5667a05f75d42643175f2c28c29d7a590b15c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119516 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-26use officecfg for SvxHtmlOptionsNoel Grandin
Change-Id: Ie7db7d20509e45fd87d8460c7fae6c0131e0a1f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119494 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-26use officecfg for security optionsNoel Grandin
Change-Id: I9d91fd5b260b82e05aac6567143386742953ecf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119486 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-26tdf#123626 Allow adding hyperlinks to shapesSamuel Mehrbrodt
* Support hyperlinks on Shapes in Writer * Add menu items * Add context menu items * ODF import/export + test * OOXML import/export + test Change-Id: I7269064c4cabd16fdb8259a48429c508184d3ccf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119164 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-07-25use officecfg for drawing optionsNoel Grandin
Change-Id: Idba40d9816f29c0e4bc4a468b8c0a2cbb74d09d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119481 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25use officecfg to retrieve WarnAlienFormatNoel Grandin
Change-Id: Id7ca2ffa237cb8fda58af60ee5d296f492c5a47e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119462 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-24tdf#143148: Use pragma once instead of include guardsHuilin
Change-Id: I5ac5ac09474b9e05b17a9c5b191ab2808eca2660 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119431 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-07-24sw: define to constexpr, use MM50 from svx and use o3tl::convertTomaž Vajngerl
MM50 is a constant representing 0.5cm in twips. Use o3tl::convert for to init the constant instead. It matches the constant which I checked with a static_assert. Change-Id: Ib6c37a44ef5b22258e913fd3809a37ab0d18671b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119396 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-07-22Fix typosAndrea Gelmini
Change-Id: I38c7fda55f7d24f7265b58d56222187f2aa1e5d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119286 Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-07-22sw bibliography, local copy: add context menuMiklos Vajna
This way in case a bibliography entry (field) has both a URL and a LocalURL, it is possible to choose which one should be opened when the context menu is used on the field. This is meant to be the primary way the user consumes this information. Change-Id: I21b72505f8387943424665bff70905f774771d4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119373 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-07-22Dereferencing uninitialized pointerMike Kaganski
SfxItemSet::GetItemState returns SfxItemState::DEFAULT without resetting the passed pointer. Regression after commit dd5bf12193471f064bf7f581dd1b21783390e735. Change-Id: I1e427a05f8e5b375f50d81b51d32e78fca83eb42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119348 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-21sw bibliography, local copy: add document model & UNO APIMiklos Vajna
The idea is that a bibliography entry (field) can have not only an URL (which might be unavailable due to lack of network connectivity, paywall, etc) but also a local copy, which is also a URL. The local copy doesn't replace the original URL. The local copy is stored part of the document, since it may be a relative URL, e.g. ODT + several PDFs copied around in the same directory. This commit just starts this feature, up to the extent that read and write of the new property works. Change-Id: I3c4df2be3a1f3b02a87c097f8a0630951def09d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119322 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-07-21IsVertical->IsEffectivelyVertical, GetDirectVertical->GetVerticalMike Kaganski
Before commit 653b53287ca09a9ffe3f5ce0242919e719c1086c, editengine objects had a pair IsVertical/SetVertical, which queried and set a boolean flag (and SetVertical also had a second argument to set another flag). The mentioned commit had introduced an inconsistency, changing SetVertical to only set a single flag, but at the same time making IsVertical to return a synthesized result from two values: vertical and rotation. Additionally, GetDirectVertical was introduced to complement SetVertical. In many places, the use of synthetic IsVertical looks suspicious, especially where it is used in combinations with SetVertical. But here I don't change existing logic, and only rename the methods, so that in case someone sees an actual problem, it would be easier to spot the method mismatch. The end result is that now we have a proper getter/setter pair GetVertical/SetVertical, and also IsEffectivelyVertical, named to reflect that it calculates its return value. Change-Id: I38e2b7c5bd7af0787dd7a1c48e1385138dac80b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119315 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-21can pass SfxItemSet around by value in SfxShellNoel Grandin
Change-Id: I80ee25c56da437d778e11f2dab3d07845ebd9597 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119274 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-19sw: fix indentation for better readibilityXisco Fauli
After 9a8c8053b4fb322edb1e45b891307cdad1f3d41f < Resolves tdf#113171 - Text box must not toggle command > Change-Id: I867a012f18634ee8f83bfa2899f97eec1fae4630 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119202 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-19jsdialog: sidebar: avoid duplicated widget idsSzymon Kłos
all controls for sidebar goes to the same window id we need different names for every widget so create valuesets with different name every time Change-Id: I69074e607bfe5fa6db665c0dbcae1f029d13a161 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116836 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119196 Tested-by: Jenkins
2021-07-19Move svl::Items to include/svl/whichranges.hxx, and unify its usageMike Kaganski
... in WhichRangesContainer and SfxItemSet ctors. Now it's not needed to explicitly use 'value' in WhichRangesContainer's ctor, or create an instance for use in SfxItemSet ctor (svl::Items is already defined as a template value of corresponding type). Instead of WhichRangesContainer Foo(svl::Items<1, 2>::value); SfxItemSet Bar(rItemPool, svl::Items<1, 2>{}); now use: WhichRangesContainer Foo(svl::Items<1, 2>); SfxItemSet Bar(rItemPool, svl::Items<1, 2>); Change-Id: I4681d952b6442732025e5a26768098878907a238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119157 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-19sw: xDictionary may be an empty reference in SID_SPELLCHECK_IGNORE_ALLMiklos Vajna
Seen in a crashreport: handleFatalSignal ./common/SigUtil.cpp:255 /lib/x86_64-linux-gnu/libpthread.so.0 __restore_rt ??:? program/../program/libswlo.so SwTextShell::Execute(SfxRequest&) sw/source/uibase/shells/textsh1.cxx:1496 Change-Id: I709f361a1396abbb07cea06509afc41bb5f5c9a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119067 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-07-19tdf#128814 sw navigator: Make right-click select entryJim Raykowski
before context menu is shown Change-Id: I890efd794aaa88ac6bde6bf41b3976b8c27a3273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118709 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-07-17use WhichRangesContainer in swNoel Grandin
Change-Id: I8662b2e03b0dbe3a7206d8b59ae3556e3b2e75a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119007 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-17Bin useless commentTor Lillqvist
Change-Id: Ifc7e36aa1df56cf532b698c8671cabbb35061bac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119076 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-07-15drop the Pair constructor from SfxItemSetNoel Grandin
just so we have one fewer odd constructors here Change-Id: I81278e9436747a4eb46a33da9bfec7a8b30079b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-15WhichRangesContainer, reduce malloc in SfxItemSetNoel Grandin
SfxItemSet shows up in perf profiles frequently, and the hottest part is the malloc of the two arrays we need. But most of the time, one of those arrays is a compile-time constant. So this change introduces (*) WhichRangesContainer, which manages whether the SfxItemSet owns the array it points at or not. (*) a static const member in svl::Items (idea from mkaganski) to store the data. Change-Id: Icb8cdbc4d54fd76739565c575e16a744515e5355 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118703 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-14Resolves tdf#113171 - Text box must not toggle commandHeiko Tietze
Change-Id: I1985a377c9b299dce7d3e01d4e67099562008d22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118888 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-07-13use ImplInheritanceHelper in SwXTextDocumentNoel Grandin
so we avoid having two copies of OWeakObject in it Change-Id: Ia592f1d67a730da35c5d73c81c689d9da02fce1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118853 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-13tdf#142701 track changes: fix layout regression of image deletionLászló Németh
Commit d6322bcedc197a654abc7d64bfea8cf570f123bf (tdf#59463 track changes: record deletion of images) converted image anchors to AS_CHAR, which resulted loss of the original layout during rejecting the tracked image deletion. Now keep the original AT_CHAR (also AS_CHAR) anchorings, also convert the AT_PARA and other anchoring types to AT_CHAR using the following workaround: add an invisible text-based anchoring point with ZWJs. Follow-up to commit 8726cf692299ea262a7455adcf6ec25451c7869d (tdf#142700 DOCX: fix lost track changes of images). Change-Id: I29d1e161b5f24c0fed51d40c9a8db82085918d0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118747 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2021-07-13tdf#143257 like graphics defer creating transfer data for drawings until neededCaolán McNamara
don't create when a drawing is selected, wait until its actually dropped into something (I experimented with dropping into gimp) Change-Id: I3edaf79537d5723565adf8c45d6f7408026a93e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118770 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-12tdf#126665 Remember last used file picker directorySamuel Mehrbrodt
This introduces internal tracking of last used directories. Each caller of the file picker can pass a "context". The selected directory will then be saved & restored when opening the file picker with the same context again. After ffa636ba74b04b3258ec9a696bc4eac33581fa24 , the Windows file picker no longer tracks the last used directory itself. This is a replacement and an improvement at the same time, since there is not one global last used directory, but one per context. Change-Id: I10650cfb9359922690954fa65c89b4e47477e2c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118597 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-07-09Make loplugin:stringadd slightly more aggressiveStephan Bergmann
...by assuming that all const member functions are side-effect free. (This presumably means that some of the special cases in StringAdd::isSideEffectFree are obsoleted by this more general case, but any such removal is postponed to later clean-up.) (Came across this when idly wondering why 8b7f948d9d79393bc6c1b11d239706666fd5d7de "sc, VmlFormControlExporter: avoid OStringBuffer style" had not been found by the plugin before.) Change-Id: I6bca10df53885b14a590543aabd61f23b3748572 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118675 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-07-05tdf#132776 sw UI: make unique names for custom hatch and gradientJustin Luth
This has already been done in sd, so just copy the idea and adapt it to fit in the sw environment. This fixes LO 6.3.4 regression from 7.0 commit 53c474633c4e658f096669fb0225d751a5701aaf. This reason for this is noted in one of those commits: > However tdf#99908 shows that ODF import doesn't like anonymous > gradients. This is a bug in xmloff style import and should eventually > be fixed there. Here we implement the same band-aid solution > tdf#99908 implements for Impress sidebar Change-Id: I4437ac97b6aa97f2cd27a10c3d593dc97d24e9c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117594 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-07-02no need to allocate return val on heap for GetItemSetForPreviewNoel Grandin
Change-Id: I261182ec2348df045171c5e1beb33579e2c0c766 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118284 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-02fix potential use-after-free in SwClipboardChangeListenerNoel Grandin
we think we're seeing this in COOL Change-Id: I29a287b032158076a99a836d98113d1623ebef99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-01can allocate these SfxItemSet on the stackNoel Grandin
Change-Id: Ib2b89613ad3e8f2bcdd51bee10bab3559a64fce4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118208 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-01tdf#127978 - Don't URL encode filename for navigator's tooltipAndreas Heinisch
Change-Id: I70ea7fb739f14c5c60915acc6c66ea241f67524c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118197 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-07-01avoid some dynamic_castsNoel Grandin
where we know the object must be of the destination type Change-Id: Ib5c7d1a55a89d77060e4064d3469f706f2ad7040 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118166 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-01Improve preview of theme color sets - add color set nameTomaž Vajngerl
Change-Id: I1f7b3668ba9dfbab1da283741e99754de2d6be47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118151 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-30reduce cost of allocating and copying SvxNumRuleNoel Grandin
by using std::move to avoid copying unnecessarily Change-Id: I940b57c9a05c8d75b9a16291fc4f05756fdeea12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118164 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-30StylePresets: set bacground color for ValueSetTomaž Vajngerl
Change-Id: Ifbaab139235dbe2fdcebf278bce2c91c2b744aa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118150 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-28loplugin:indentation improve checks for brace alignmentNoel Grandin
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-24tdf#46626 Don't include footnote numbers in Navigator headingsJim Raykowski
Change-Id: I8c655c6ed1e1d05407dac27ef19f26c6ca8d8d54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117692 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-06-20cid#1486006 help coverity see that pGlossaries won't be nullCaolán McNamara
Change-Id: I0f0e8e5ac0169090cd1f99c8aa6bf16b1edf8a85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117506 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-20drawinglayer: remove ImplPrimitive2DIDBlock macroTomaž Vajngerl
We can just implement the simple getPrimitive2DID method in all primitives. The ImplPrimitive2DIDBlock macro doesn't save us anything. Change-Id: I02f44d4891d7b340220890bf52a7ebfc8e41850a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117509 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-18tdf#142852 forward surrounding-text requests to an active drawing editengineCaolán McNamara
when present. As we do for related CommandEventId::[StartExtTextInput/EndExtTextInput] Change-Id: Ie5b57c8a8a1a258efc2be079a2674b1ca620dc9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117465 Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Justin Luth <justin_luth@sil.org> Tested-by: Jenkins