summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui
AgeCommit message (Collapse)Author
2021-06-08tdf#141805 sw: hide rtl gutter UI for ODF documentsMiklos Vajna
ODF doesn't track RTLness of the gutter explicitly, it infers this setting from the writing direction. This means that in case the UI is used to set it explicitly to a custom value, it'll be lost after export + import. Fix the problem by hiding the widget in the ODF case, so it doesn't confuse users; it's still visible for Word formats which store this explicitly. Change-Id: I1316dcf461429af72498957c9b3eebcbdac794bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116799 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-05-30std::unique_ptr -> std::optionalNoel Grandin
Change-Id: I78e5995b1a5cccff9c632ef4bcf75ea3ec01ff65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-28no need to allocate these on the heapNoel Grandin
Change-Id: I5ed00fe80e96e9d07d56eb7841a66ba98f328a91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116318 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-21sw: replace most static_cast<sal_uInt16>() calls with o3tl::narrowing()Miklos Vajna
o3tl::narrowing() is a better way to handle this, as that way the integer conversion is still implicit, which allows detecting integer truncation at runtime (with suitable compiler flags). Change-Id: I499abda3be6943e8c111c56df390e72939586221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115948 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-05-19tdf#137741 tdf#142258 Improve naming of Sw Navigator Field entriesJim Raykowski
Change-Id: Ibdfe2797f67e30e590b4d1b0b12e9e5639dacba6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115669 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-05-18Related: tdf#138604 sw: advertise AT_CHAR as "to char"Miklos Vajna
Change-Id: Ia657a590dfc4471e3ad54f1168a257e5f6fc1424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115720 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-05-17split OutputDevice from WindowNoel Grandin
as part of a longer-term goal of doing our widget rendering only inside a top-level render- context. I moved all of the OutputDevice-related code that existed in vcl::Window into a new subclass of OutputDevice called WindowOutputDevice. Notes for further work (*) not sure why we are getting an 1x1 surface in SvpSalGraphics::releaseCairoContext, but to fix it I clamp the size there (*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice (*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code? Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-14Outline folding experimental feature rehackJim Raykowski
* Changes the way the outline content visibility button is shown to similiar how the table un-float button is shown. * Toggle function is replaced by an invalidate function that makes outline content visible or not visible only if needed. * Removes the left and right arrow keys restrictions of cursor movement in and out of an outline node paragraph having outline content visibility attribute set false (folded outline content). These were prevented due to causing an assert in txtfrm.cxx SwTextFrame::MapModelToView but seems to do no harm here if allowed. * Makes a selection read-only if it spans an outline node that has folded content and disallows actions that would cause loss of folded content. * Adds RestoreSavePos when Move fails in SwCursor::LeftRight to fix a bug that occurs in documents with outline content folded at the end of the document. When the cursor is at the end of the visible document and right arrow key is pressed Move fails after moving the cursor to the end of the document model, which doesn't have a node frame and causes wierd numbers to be displayed in the statusbar page number count. Left arrow, when in this state causes a crash without the added RestoreSavePos. * Addresses tdf#141390 concerning position of view when feature is turned off and on. Change-Id: I0430f73643201aa08ffc347c1597b44b1de290e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114255 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-05-05tdf#140969 Select in Navigator all document selected drawing objectsJim Raykowski
when in Drawing objects content navigation view Change-Id: If5d78453f36f035a93936490ab8c2cd4223f1feb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114811 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-05-02Remove duplicated includeAndrea Gelmini
Change-Id: Ib26ae0e3e1b1b1721f426b3f9967d97baf4f982c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114903 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-04-30reinterpret_cast to SwPostItContent when field type is postitJim Raykowski
Change-Id: I4ed914479c07c786fdc3401c56f7d793777df751 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114897 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-04-30tdf#137741 SW: Add fields content type to NavigatorJim Raykowski
also makes Comments category be tracked Change-Id: I038ba87d6ae0b96bae2d7a213ec5df92ac7d566d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112560 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-04-28sw bibliography: fix warning when de-selecting a biblio entry fieldMiklos Vajna
De-selecting a biblio entry field resulted in this warning: warn:sw.core:3311:3311:sw/source/core/fields/authfld.cxx:104: SwAuthorityFieldType::RemoveField: pEntry is not my field But this was even an assert before commit 64ffabbdb2725e93de997171708bb31c33c93a55 (sw bibliography, refer to a page: make the biblio field clickable, 2021-03-12). It seems the root of the problem was: - SwAuthorityFieldType has a list of SwAuthEntry instances that its SwAuthorityFields may have - when the field is selected, we copy the selection to a clipboard document, using SwFEShell::Copy() - this calls SwAuthorityFieldType::AppendField() to register the SwAuthEntry, but that registers a copy instead - SwAuthorityFieldType::RemoveField() then asserted that the original SwAuthEntry is part of SwAuthorityFieldType's list, but it was not Fix the problem by returning a reference to the copied SwAuthEntry in SwAuthorityFieldType::AppendField(), that fixes the warning and then we can turn this back to an assert, to detect problems where an unregistered SwAuthEntry would be de-registered. In practice this caused a problem in the Insert Bibliography Entry dialog: bibliography source = document content case uses SwAuthorityFieldType::GetAllEntryIdentifiers() to provide a list of sources, and this way sources were not removed from that list when deleting biblio entry fields. Change-Id: Iea4fa44302aaac0daa122bbf227888d1dbb06597 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114765 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-04-27Related: tdf#130326 drop ScContentTree::ObjectFreshCaolán McNamara
this was introduced as part of the large IA2 integration commit b41332475783c31136673fb44cf4c411bb0148f8 Author: Steve Yin <steve_y@apache.org> Date: Mon Dec 2 15:54:29 2013 +0000 Integrate branch of IAccessible2 Both calc and writer gained the feature that "space" in the navigator for drawing objects selects the highlighted object, extending the selection if another one is already selected. (notably impress was left unchanged) In calc, but not writer, an ObjectFresh was added which fires on every SfxHintId::ScKillEditView which is broadcast on every exit of the cursor from a cell. Its purpose seems to be primarily to re-highlight the last selected-by-keyboard entry on a content refresh. As far as I can tell this doesn't seem necessary and we already refresh content on SfxHintId::ScDrawChanged events so we shouldn't need to additionally refresh on ScKillEditView and refreshing on every ScKillEditView is very slow on navigating through a calc document with a lot of drawing objects. Change-Id: I64b2840f8510d474314d108e657fc3367f8ab6c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114650 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-23tdf#141824 init navigator to possibly floating in base ctorCaolán McNamara
so its in the expected state when the child contents are created Change-Id: Id5baaca8479334c8fa2ec60ce8b598b7a61a3d7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114481 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-19Only Toggle in Outline Folding menu when sublevels are includedJim Raykowski
Change-Id: Ib0d61d96f46acfeca1c017ec77d315e68ce33fb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114072 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-04-09Recheck include/ with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-01tdf#140343 sw page rtl gutter margin: add UIMiklos Vajna
And extend SwFrame::UpdateAttrFrame() so that the layout is updated when the UI mutates the doc model. Change-Id: I4112388981187226f97ec39f4c44ffb3cc1e5253 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113440 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-03-29tdf#140556 master document view not launching subdocument from context menuCaolán McNamara
Change-Id: I0ae61e51266ae050e340c1af99e0dd6a481e6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113315 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-27Sw Navigator: Improve chapter deleteJim Raykowski
by selecting to the start of the next outline node vs selecting to end of the last paragraph before the next outline node. Change-Id: I5a51ff5c1ced8d9ab0aee7c7b38fc5235027f384 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113140 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-03-26loplugin:flattenNoel
Change-Id: Ib7a895fba66f8dc9b6501e61631c02694053b7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113157 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-25tdf#134734 tdf#141059 tdf#122508 cui,sw,xmloff: BackgroundFullSizeMichael Stahl
* add BackgroundFullSize property to PageProperties * add a checkbox on the SvxPageDescPage * marshal the item via SfxGrabBagItem to avoid changing svxids.hrc * add RES_BACKGROUND_FULL_SIZE item, pool default is "true" which is appropriate for Word import filters * ODF export: remove hard-coded export in XMLPageMasterExportPropMapper::ContextFilter() * use it in SwFrame::PaintSwFrameBackground() * fix painting of bitmaps by also using the page frame area in SwFrame::GetBackgroundBrush(), which was the reason why f006b6339e20af6a3fbd60d97d21590d4ebf5021 painted things inconsistently * force repaint in lcl_DescSetAttr()/SwFrame::UpdateAttrFrame() Change-Id: I4cb64f87c01d17c051936e9b8128395fbb8b4fe5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112594 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-19silence coverity unchecked return value from library on xmlText* functionsCaolán McNamara
Change-Id: I651abb00d8ae1bdbf758a6a0176fd8912531a585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112753 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-18Sw Navigator: fix table selectionJim Raykowski
Fixes table selection from the Navigator not selecting the whole table. Change-Id: If6a9161d011a056aad02c3bd99c19e62802288c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112254 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-03-11remove some unneeded vcl/window.hxx includesCaolán McNamara
Change-Id: I2b716371e2bebe7390e7f0c7b747140d9f4bdec6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112330 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-11remove intermediate containers in sidebarsCaolán McNamara
tested extension sidebars of: a) Wollmux extension sidebars b) Analog Clock Extension demo https://wiki.openoffice.org/wiki/Sidebar_for_Developers#Example:_Analog_Clock_Extension Change-Id: If9729e20526681928137989f01a8ae733a9b0cb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112035 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-11tdf#140845 labelling improvements for List Styles in ContainsSeth Chaiklin
move hard-coded formatting of liststyle out of sw/source/uibase/utlui/attrdesc.cxx and into sw/inc/strings.hrc, so that translators can customize as needed. In sw/inc/strings.hrc: * "Numbering" -> "List Style: (%LISTSTYLENAME)" * "no numbering" -> "List Style: (None)" (to be consistent with setting in "List Style" control and to keep consistent appearance in Contains) Thanks to Mike Kaganski for assistance. Change-Id: I9d2b6507082fea06665d0d8a3465c314a5d894c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112213 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk> Tested-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2021-03-11rename SfxChildWindowContext::GetFloatingWindow to what it doesCaolán McNamara
Change-Id: I0a8e1be2c64d054e6af1e9826f993d3b219e854b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112245 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-11register navigator individually in each module that it exists inCaolán McNamara
instead of globally. This makes the navigators the same as everything else and easier to deal with. Change-Id: I882612e73d36485b84161a2d3fbc1188f734c0fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112244 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-10tdf#40427: use node index as position, not Y position on screenMike Kaganski
As mentioned in comment to SwContent::nYPosition in sw/source/uibase/inc/swcont.hxx: some subclasses appear to use this for a tools/gen.hxx-style geometric Y position, while e.g. SwOutlineContent wants to store the index in its subtree Abusing the nYPosition to store vertical position *on screen* gives wrong results when a following section is positioned on screen higher than a previous section - e.g., when multiple-page view is active. So just use the section's node as Y position of the Navigator entry. When the section is inside a fly frame, use the frame's anchor node. Change-Id: I6caf26aeb19d845129dc837138c37f42bbc18655 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112197 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-09let SwMultiTOXTabDialog have a Widget parent instead of a WindowCaolán McNamara
Change-Id: I7a7ae6cd5240257a0f2e33e89d20a1799b29013d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112195 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-09decompose SwNavigationPIUIObject and use sub components directlyCaolán McNamara
Change-Id: Ia4722972fe579646b4c3f06de339d72a931b05d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112146 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-09tdf#140661 Give shapes names when ungrouping if they don't already haveJim Raykowski
Change-Id: I8242a697980e4f661a914998792ae9efdb090915 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111725 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-03-07tdf#116136 don't show statusbar template control tooltipJim Raykowski
in print preview Change-Id: I9bba275d89d1d70bfcef9182f52273fd405118d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111863 Tested-by: Jenkins Reviewed-by: John Turpish <jbt@gmx.us> Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-03-06allow a widget as a parent, not just a windowCaolán McNamara
Change-Id: I83c3c5a69c0badac7998dfb88107978eee7cdcd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112032 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-05replace GetOptimalSize with Container::get_preferred_sizeCaolán McNamara
Change-Id: Ib4760da9ba3d0e25de3a5a0d363360720b81d197 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112026 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-05add a callback for when a container gains or loses focusCaolán McNamara
Change-Id: Id8e8e59547280297db9140a840228f62b75593ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112021 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-05use m_xDocListBox to detect we're disposedCaolán McNamara
Change-Id: Ie04b73e9e57e966c489b401b675ab6e95d2ecfce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112015 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-05rename SwContentTree FocusHdl to match SwGlobalTree equivalentCaolán McNamara
Change-Id: I5f06d857c04f5378df45e149d779466584fc0ce3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112016 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-05drop SetUpdateMode on entering global modeCaolán McNamara
we don't bother do this on exiting global mode. If it still makes sense to do this is presumably should be on child treeview-based widget instead Change-Id: Ic97d595e638ea0671c6efe0a47336b266cc7b83c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112014 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-05don't use the vcl::Window parent to derive a treeview sizeCaolán McNamara
Change-Id: I8076c3db1fd917110445900404b599e821df698d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111997 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-05don't use the vcl::Window parent to derive a treeview sizeCaolán McNamara
Change-Id: Ib86c3eb25df390b5b4fba576abb3158728ff0a0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111994 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-04SidebarPanelBase is always created with a PanelLayoutCaolán McNamara
Change-Id: I825452fbd56435edcc0a2ffb7abe0f834bf10fb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111976 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-04tdf#116136 don't show status bar word count control tool tipJim Raykowski
in print preview Change-Id: Iad07d1d4951cba284c67d711ebd83507ca265864 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111728 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-02-23replace SwTemplatePopup_ImplCaolán McNamara
Change-Id: I82afec995488d388cb39c324f8f9a6684441fbe9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111361 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-23replace BookmarkPopup_ImplCaolán McNamara
Change-Id: I87dda264ec61bbbfd6cf4eb0cbbe636724579537 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111360 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-16tdf#140387 grab focus to first panel widget on panel gaining focusCaolán McNamara
otherwise focus is getting lost in these currently mixed vcl+gtk widget panels. Change-Id: I6488ddfc98afdedb55bb3217f3877e96258dd65a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110955 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-04Fix typo in codeAndrea Gelmini
Change-Id: I50bc2e4909bc34b431fcff8047b9184fa5cd7d9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110267 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-02-04use more StaticWhichCastBjoern Michaelsen
- because it uses TypedWhichIds well-defined mapping of id to type - ... and assert, if the content found doesnt match up expectations Change-Id: Idda58ccda47c5d074326537dcc6670ef0cfcabf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110233 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2021-02-03Fix typosAndrea Gelmini
Change-Id: I59f3229f68056fd2c3861ef44b0d803ed956891c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110266 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>