summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui
AgeCommit message (Collapse)Author
2021-10-10use SfxItemSetFixed in swNoel Grandin
Change-Id: I69e188d7599b7fc439f613cec0a0967ccb748b7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123313 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-09tdf#142344 SwNavigator: Keep heading selected after navigating toJim Raykowski
headings in tables and sections Currently after navigating to a heading in a table or section from the Navigator the table or section is selected in the Navigator content tree. This patch makes the Navigator selection remain on the heading until the cursor is moved to another outline position which then makes the Navigator track tables and sections again. Change-Id: Idfcfd168fbbda541d07bbcadbaad62772ef156af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123244 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-08remove unintended blank lineJim Raykowski
Change-Id: Ic7688a625d2c1be19f66e289d4517c7ce32ff4e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123239 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-07SwNavigator: Fix crash on image selectJim Raykowski
Fixes crash that occurs in update tracking test for bookmark when image is selected by testing that selection type is text before testing for bookmark. Change-Id: I53c64a71d3aff0f159bff31b98e2f453d7c2225a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123202 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-06tdf#144788 SwNavigator: Group footnotes and endnotes separatelyJim Raykowski
This is a follow-up patch to separately group footnotes and endnotes under the Footnotes and Endnotes category. A separator line is shown to distinguish between footnote and endnote entries. Entries above the line are footnotes, entries below are endnotes. A tool tip is also displayed to distinguish between them. Change-Id: I2c4c3ab074da3bd6ba60220f8e7bcc60125bf81f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123124 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-05Related: tdf#144817 tdf#144335 Persist SwNavigator tracking settingsJim Raykowski
Add persistence to Writer Navigator Outline, Table, and Section tracking settings. Change-Id: If2d406d0540083d982c2e7ffb78b1a6e156817c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122874 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-04sw: prefix members of SwFieldDataOnlyDlgWrapper, SwPtrItem, ...Miklos Vajna
... SwUINumRuleItem and SwWrtShellItem See tdf#94879 for motivation. Change-Id: I2b360aae78200fcc0a479ec76e895331c6a0e124 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123035 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-10-04tdf#144817 SwNavigator: Section tracking optionJim Raykowski
Add a check button to the section context menu in the content tree to turn section tracking on or off. Change-Id: Ib8c49626f31f41cf85818630d126dee98e1db809 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122844 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-04SwNavigator: Use select by address function for tracking Fields,Jim Raykowski
Comments, and Hyperlinks Field, comment, and hyperlink tracking selection in the Navigator content tree is done by comparing content address. This patch uses the lcl_SelectByContentTypeAndAddress function to replace redundant code. Change-Id: Idb9f48c46bb432bf2405e4fb0bd8d1830f2c26e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123031 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-04tdf#144788 SwNavigator: Add footnotes and endnotes to content treeJim Raykowski
This patch introduces lcl_SelectByContentTypeAndAddress function which is useful for content types that can have non unique string entries which can be selected incorrectly by use of the lcl_SelectByContentTypeAndName function. Although footnotes and endnotes names are always unique, lcl_SelectByContentTypeAndAddress is used here in preference of lcl_SelectByContentTypeAndName. Change-Id: Ia118f717f72877cddb932ef19f6d155a7227845d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122970 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-10-03cid#1492173 Explicit null dereferencedCaolán McNamara
Change-Id: I482b85707894c1b749c55fe1339caa5d2a7ae444 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123009 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-01loplugin:constparamsNoel Grandin
Change-Id: I0d1ad95a9944c9077a1b9db11f2ae05f993c2b36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122900 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-01Writer Navigator: Make fields always show in the content treeJim Raykowski
Currently, a field that is not visible, for example, when in folded outline content or a hidden section, is not shown under the Fields category. This patch changes the behavior to always show the field. Change-Id: Iea85a2c69df68bb0d37e8d94662d3ca9c81b0e41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122842 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-09-30tdf#95378 Writer Navigator: Track bookmarksJim Raykowski
Resolves bookmark tracking part of the enhancement request. Makes the Navigator content tree highlight the corresponding bookmark item of the first bookmark at the currrent cursor position in the document if there is one. Change-Id: Ida9f512eda9630bd6f1e5db1658715823644969d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122619 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-09-29tdf#144335 SwNavigator: Table tracking optionJim Raykowski
Adds a check button to the table context menu in the content tree to turn table tracking on or off. Change-Id: I787dc2f3e3b465d7f25a9e16b5f5491dc2d933d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122218 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-09-28gives names to all the Idles and TasksNoel Grandin
enforce it by making the constructor parameter non-default. Change-Id: I321543e4dcf15ea0a43ad8cce91d2f8dc22df6ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122766 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28vcl: rename OutDevState to StackChris Sherlock
I have moved the header file to include/vcl/rendercontext as this will eventually be part of the RenderContext split from OutputDevice. State and associated enums have also been moved to the vcl namespace. I have also moved ComplexTextLayoutFlags into the vcl::text namespace. Change-Id: I0abbf560e75b45a272854b267e948c240cd69091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-27sw: prefix members of SwPageFootnoteInfoItem, SwStdFontConfig, ...Miklos Vajna
... SwToolbarConfigItem and TextViewOutWin See tdf#94879 for motivation. Change-Id: I0d13d501c6a18c4f4f56d163f0065dd4eae88f8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122672 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-09-26use SfxItemSetFixed in swNoel Grandin
Change-Id: I1b7bfe92dc4ef61b26940ed02ccd8f359e8149e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122652 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-25tdf#143268 Fix slow response after Navigator fills table membersJim Raykowski
when document has many tables Change-Id: Iccf34700a3f09420f3dc3519b04351c53d1d59b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122416 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-09-25SwNavigator: Set in content type init if delete and edit are allowedJim Raykowski
Fixes crash that occurs for REFERENCE content type 'Delete' and 'Edit...' menu items. These are not allowed for REFERENCE content type. Change-Id: I893acd57f80c9a96637e4070f3e1ca7c29b1d7ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122559 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-09-24return SwCursor from IShellCursorSupplierNoel Grandin
rather than casting it Change-Id: Ia950f521c8f73d8a0da59344db9b5aacb727aca8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122576 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-23tdf#95378 Writer Navigator: Track indexesJim Raykowski
Resolves indexes tracking part of the enhancement request. Makes corresponding table of content entry, listed under Indexes category in Navigator content tree, highlight when current cursor position in the document is on table of content type section. Change-Id: I8237bc55db5568e585b25f898935b4506dec5c7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122503 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-09-23Fix typosAndrea Gelmini
Change-Id: I01c46b864e296d4094f0a1579fdc64066eacc386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122496 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-09-22tdf#95378 Writer Navigator: Track referencesJim Raykowski
Resolves reference tracking part of the enhancement request. Makes the Navigator content tree highlight the corresponding reference item of the reference field at the current cursor position in the document if there is one. Change-Id: If10d0cffbf03fcc9a61e573e967e854c428f9b5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122414 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-09-22Extend loplugin:stringviewparam to starts/endsWith: swStephan Bergmann
Change-Id: I7271bba6c61a56be15335c81d8950a29a07eb6d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122473 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-22tdf#95378 Writer Navigator: Track hyperlinksJim Raykowski
Continued effort for request to highlight corresponding Navigator tree items at document cursor position. Change-Id: I21c6b45308c7de654dbf1f904c30336a6229722c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122338 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-09-20sw: prefix members of SwNavigationConfig, SwNumRulesWithName and SwSrcViewMiklos Vajna
See tdf#94879 for motivation. Change-Id: I2740ff914fe35a069ce67ad10783dadc0cfdbf74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122339 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-09-19cid#1492160 Dereference before null checkCaolán McNamara
Change-Id: If53b117a69c37907c4d3871eec6c8b3ecfc9c461 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122314 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-18tdf#144349 Make Navigator global tree track sub-document sectionsJim Raykowski
Master document relies on the Navigator listing all the sub-documents. However there is no connection between the currently selected section (containing the sub-document) and the entry in the Navigator making it very hard to see what file needs to be edited. This patch highlights the corresponding item in the Navigator at the current cursor position in the document. Change-Id: Iee32d1db0e40e302bfff7a879d47a5632ce4ed43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122103 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-09-17Writer Navigator: Fix category content trackingJim Raykowski
This patch fixes a tracking bug that causes category content not to be tracked when field content is at the current cursor position in the document. Change-Id: I6fb5c4584cb05205e0c966eef079bd30ee3e6430 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122105 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-09-17tdf#95378 Writer Navigator: Track sectionsJim Raykowski
This patch adds document content tracking of sections. Change-Id: I4355792968031f10ab0afd176aa3284e89541b72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122104 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 5Mike Kaganski
- Revise uses of getSomething to use getFromUnoTunnel Where that is impossible, use getSomething_cast to unify casting, and minimize number of places doing low-level transformations. The change keeps the existing tunnel references that last for the duration of the pointers' life, because sometimes destroying such reference may destroy the pointed object, and result in use after free. Change-Id: I291c33223582c34cd2c763aa8aacf0ae899ca4c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122101 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1Mike Kaganski
The header got some changes: 1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace 2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace of uses of OImplementationId with it, including in XTypeProvider 3. Introduce convenience functions 'getSomething_cast' to cast between sal_Int64 and object pointers uniformly. 4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make it a bit shorter, and to reflect its function better. Templatize it to take also css::uno::Any for convenience. 5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it handle cases both with and without fallback to parent. 6. Adjust UNO3_GETIMPLEMENTATION_* macros TODO (in separate commits): - Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation - Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-13sw: prefix members of SwChapterNumRules, SwDBConfig, SwGlossaryList and ...Miklos Vajna
... SwModule See tdf#94879 for motivation. Change-Id: I0bf6d2cf5fdaed76eadc801d654a2cea7700f046 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122018 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-09-08convert some OSL_ENSURE -> assertNoel Grandin
where we are just provide checking for a following static_cast. I'd rather have an explicit assert failure than a random crash Change-Id: Iab6c6b056341018deaa74b78b075e564f72c58d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121814 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-06tdf#138255 use GtkSpinButton in SwGotoPageDlgtobias
Use GtkSpinButton instead of GtkEntry in SwGotoPageDlg analogous to the widget in SwNavigationPI. Change-Id: I0ddb4433bea23d8f3d460bd69f30a10b8f7ce984 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121688 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-08-24tdf#127978 - Don't URL encode filename for navigator's tooltip (D&D)Andreas Heinisch
Change-Id: I3a5d6404755698be81818c4636fcc505992e1a05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120936 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-08-13split SvNumberFormatter into it's own headerNoel Grandin
so I can make changes without running into cyclic dependencies between header files Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-11Drop convertMm100ToTwip in favor of the new o3tl::toTwipsMike Kaganski
Step by step, duplicates from <tools/UnitConversion.hxx> may go Change-Id: Id4c03ff8adc120ae06dbfdbdfb4f5ff0bb51f489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120315 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-05Pass context and resource string down to boost::locale separatelyNoel Grandin
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-04tdf#143499 don't search entire tree looking for insertion pointCaolán McNamara
keep a short insertion candidate vector up to date as the tree is populated for gen takes time from ~310ms to ~45ms Change-Id: I70e6c0243771cef39e54f4d039069cf54aa6d41c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119956 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-03Related: tdf#143499 lookup id just onceCaolán McNamara
instead of twice for gen takes time from ~400ms to ~310ms Change-Id: Ic5e11e889c10fa90b23165aabdca751436ecf55c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119943 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.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-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-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-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-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-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-18tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWNArmin Le Grand (Allotropia)
Rename ::StateChanged methods using SfxItemState to allow better analysis of SfxItemState/SfxPoolItem usage(s), discussion see tdf#130428 comment 30 Change-Id: I736be0160ad7a9b7882c1c8a4cc05d9396ee3305 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117366 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>