summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2021-02-22drop stray printfCaolán McNamara
Change-Id: I69ebaa5cd620384f583294123e467e88c76a3e27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111309 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-21Typo fix: supress -> suppressTor Lillqvist
Change-Id: I72aeaff1bc8ac67253265ea99de91b9b9906e5d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111275 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-02-20loplugin:refcounting in svxNoel
Change-Id: I79afd219a29ad176ce72020579d2b29a0b3ec09d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-20drop some unneeded includesCaolán McNamara
Change-Id: I0fe18c3e535bee2213606b7189778c40403a97ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111255 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-20move docking adapters to vclCaolán McNamara
Change-Id: I9be6f65734c24196758dea6853219a168c53a7fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111250 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19update pchesCaolán McNamara
Change-Id: Ic4586057346b6de700c1bb6ff4cd759a11bb3e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111231 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19foward declare NotebookBarAddonsItem instead of using includeCaolán McNamara
Change-Id: I57e5a8f28a40994b61ab0f554401e4f70c8ffc12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111230 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19weld rows menuCaolán McNamara
Change-Id: I0dd56e2c236b15b057ddd0f2d93019b783d457d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111218 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19nRow argument is unusedCaolán McNamara
Change-Id: I9401d5af8e537423e7198435457107e12817fc09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111217 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19drop unneeded includeCaolán McNamara
Change-Id: I78ad2129d97d6a7476e81dc7689ffe30c449eb75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111216 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19weld FunctionPopup_ImplCaolán McNamara
Change-Id: I1489f545af75fc93cf37c4399217cd91ca464243 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111212 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19rename get_vscroll_width to get_scroll_thicknessCaolán McNamara
and add split customize_scrollbars to form a separate set_scroll_thickness Change-Id: Ia4b1c85d6ae85b0fb7aeb852d3a91b36b63143db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111207 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19Some more unit conversion unificationMike Kaganski
Change-Id: I8f0afb93ffb8bd1b88efca802fad5e9aeb447021 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111168 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-18Better fix for tdf#125824: switch page only for the current view.Tamás Zolnai
First workaround was avoiding undoing: 9dca7c2fac5c6b83a6910aa61b1a2a316f36d948 Second workaround was forcing all views to exit text editing: e6c7a018a0cfee395ce2886d41c908a2447ef5cc Instead of these solutions, we allow to continue text editing in other views. What we do is avoiding jumping to the object location in all views while undoing. In theory, the two views / windows should be able to edit the document's different parts independently. So one view should not jump to the location where the other view edits something / does an undo. It works both with multi-window and Collabora Online's collaborative editing. Change-Id: I7ffe29bf175b8f855fe3e92b3d7e11ca6bcd3f5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111073 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 7db8c3d36db3ed727ade2609b7c1017cc813a560) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111112 Tested-by: Jenkins
2021-02-17tdf#115965 tdf#92622 NoList default in menu,tool,sidebarAnshu
Change-Id: Icbc612b44593c5366f3e7f81112f4013884f3599 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108841 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
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-16missing license and modelinesCaolán McNamara
Change-Id: I658cdaa63065298b129c37d294c03a9385b4acb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110942 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-15tdf#140414 add getting mouse pos to EditViewCallbacksCaolán McNamara
Change-Id: I09172e0cb24f5c45d2837cf2f2fc7cc4baa456a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110932 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-15loplugin:referencecasting in svxNoel
Change-Id: I072ba9da976cefd61f4a916e70b0601439e8a123 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110818 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-14Move unit conversion code to o3tl, and unify on that in more placesMike Kaganski
This also allows to easily add more units, both of length and for other unit categories. The conversion for "Line" unit (312 twip) is questionable. Corresponding entries in aImplFactor in vcl/source/control/field.cxx were inconsistent (45/11 in; 10/13 pc; 156/10 pt). They were added without explanation in commit c85db626029fd8a5e0dfcb312937279df32339a0. I haven't found a spec of the unit (https://en.wikipedia.org/wiki/Line_(unit) is not specific). I used the definition based on "by pt", "by mm/100", "by char" (they all were consistent); "by pc" seems inverted; "by twip" was half as much. This accepted conversion makes unit test for tdf#79236 pass. Change-Id: Iae5a21d915fa8e934a1f47f8ba9f6df03b79a9fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110839 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-13rename Ruler::GetType to drop using Window::GetTypeCaolán McNamara
Change-Id: I78da4bb35f5f3e7253737ddc3be1460fbf605ad8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110831 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-12svx: fix import of multiple paragraphs into title shapesMiklos Vajna
Title shapes try hard to have a single paragraph only, the Impress UI inserts linebreaks instead of paragraphs breaks in sd::FuText::KeyInput(), ever since commit f47a9d9db3d06927380bb79b04bb6d4721a92d2b (initial import, 2000-09-18). This matches the PowerPoint behavior. This is most visible when the paragraph has a bullet associated with it. Interestingly you can still put multiple paragraphs into title shapes using paste special -> plain text. In that case, it was inconsistent that we exported these multiple paragraphs to ODP, but merged them to a single paragraph on import since commit 0a783c1a041e2b74b7bf238d11ee2c303f6708f4 (#100190# don't allow more then one paragraph on title text objects, 2002-06-25). This results in loosing your bullets on save + open, both in the ODP and PPTX cases, since removeActionLock() on the XShape triggers this tweak. Also, PowerPoint does not do this merging on import. So fix the problem by removing the import-time tweak but leave the UI unchanged. Change-Id: I6796f83c40e83f65cfb0f6c7e66069c3e08c1e2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110826 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-02-11tdf#140274 set an initial minimum sizeCaolán McNamara
Change-Id: I93f0ac3d63b4864a0a5d98370407f9444b58b75c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110764 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-11tdf#139429 Convert Style previews widget to IconViewSzymon Kłos
- this adds labels to easily identify the styles - easier to work with many styles - nice native widget in gtk3 - double click opens the style settings - added Command callback fro iconview Change-Id: I08743515cbd2a4e4bd592d1509e48bbe2a43b129 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110408 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-11devtools: move devtools from svx to sfx2Tomaž Vajngerl
It's a better suited location for devtools as we can access the classes when we handle the .uno:DevelopmentToolsDockingWindow event. Change-Id: I753ca56808804c9cf6713920f92cd7d313f1f156 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110733 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-11devtools: inspect selected object when DevTools are startedTomaž Vajngerl
When DevTools window is started, we check if there is a selected object and inspect that one automatically, else use the root document object. Change-Id: I1b8b5031c4ac67300bcc15d176b86bac0a4c5d4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110732 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-11ofz#30805 Null-dereference READCaolán McNamara
presumably since... commit 09cb778b6eb7d3a5b9029965a1320b49c90e7295 Date: Tue Feb 9 13:42:22 2021 +0200 clean up SdrObject cloning Change-Id: I5e87c6ac7b786d691d625e16c31b8916e0b7da76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110754 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins
2021-02-11Remove unneeded breaksAndrea Gelmini
Extending this: https://gerrit.libreoffice.org/c/core/+/110512 Change-Id: I1066aac690fe297a557352266f3405ae29ed4593 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110522 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-11loplugin:refcounting generalise type checkingNoel
Change-Id: Ia013878ac9c2918d8eaf9aab16b291d8211e708f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110700 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-11rename RestGeoData->RestoreGeoDataNoel Grandin
Change-Id: I5d584f40949e5c7f2fc7e126cd9cae81eed4db70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-11devtools: when selection changes, select obj. in DOM tree viewTomaž Vajngerl
When we inspect the current selected object, we search and select the object in the document model tree view if the object is in the tree view, or just unselect everything. Change-Id: I5dc5e323067bfb4aa3d2cd904d3f810719e45fad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110467 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-11devtools: move SelectionChangeHandler to its own fileTomaž Vajngerl
Change-Id: I78d3712caedeb2ad4741e3706beb43051a978801 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110466 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-11devtools: rename LeftSideTreeView to DocumentModelTreeViewTomaž Vajngerl
Change-Id: I1a16f448a7e726e9c78d4b4a7b24ea8cef0e0d12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110465 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-11devtools: use xInvocation to get values of all property typesTomaž Vajngerl
Without XInvocation we could only get the values of XPropertySet type of properties. XInvocation however supports getting values of all types of properties as it can invoke any kind of methods. Change-Id: I1f6c7b932b8bc554bcf6600a8c9eef81b7b2cfa5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110464 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-10devtools: show properties nested if the the property is an objectTomaž Vajngerl
If the property value is an object, show the expander and allow to show properties of that object nested. Change-Id: I93edf1a47738b9d6f15949dd4116b92ee54c8f12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110463 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-10devtools: handle object inspector with attached objectsTomaž Vajngerl
This changes the object inspector tree view to create child nodes on demand (when expanded) and attach specialized node objects to the node, which are responsible to get the specific introspection information for the current inspected UNO object. Change-Id: Ib8431cc2a2c6d6d3ac7fd9db5bc61c9071d5e8f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110462 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-10devtools: add values for properties in object inspector tree viewTomaž Vajngerl
Change-Id: Ia53ea2cbc9797cd787d1ea3d841f947a515055e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110251 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-10loplugin:refcounting also check OWeakObject subclassesNoel
Change-Id: I2d89085a22d7424c6f8f7662307433ce50fc61d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-10tdf#139511 Correct calculation of minimum row height during resize.Gülşah Köse
Change-Id: Id47b5877d56850c80395897a83daae8e24f5c099 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110662 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2021-02-10clean up SdrObject cloningNoel
using operator= implies that overwriting an SdrObject is a useful operation, but that is not at all true - they are typically linked into and referred to by many other things. So rather use a copy-constructor. Also clean up a couple of weird "do some stuff after the clone" code into the main copy constructor. Change-Id: Iefc1481b527602748b5f3abed06e7cca66c0581c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110633 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-09loplugin:referencecasting check for Reference::queryNoel
Change-Id: I008d16d933c70df132699872ac4c39a5c1f87b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110592 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-09return by unique_ptr from NewGeoDataNoel Grandin
Change-Id: Iab806959d79ce828069cb16b6a7883981d85dfaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-08update pchesCaolán McNamara
Change-Id: Icf55ddda055d11b649e7607c2cdd8b6d6ddfefbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110483 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-08tdf#139767 fix crash caused by the selection listenerTomaž Vajngerl
When development tools window was closed, the selection listener was still listening and tried to change the selection because it was never unregistered from the selection supplier. This caused a crash as it tried to change the object on an non existing tree view. This change modifies the selection change listener so that is adds itself to the selection supplier when constructed and removes itself from the selection supplier, when the development tools window is disposed. Change-Id: Ifcb56aaee8f3c5c71ec609e68ffc78573f1b4179 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110121 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-05Make sanitiseMm100ToTwip simpler and more correctMike Kaganski
The result's absolute value is always smaller than n. Returning an uncorrected value taken from reversing multiplication and division order when intermediate value would overflow is better than arbitrary constant. Also further deduplicate Twips <-> 100th-mm conversion, and make sure they all are in a single header. Using conversion implementation that handles negatives correctly improves accuracy, as seen in unit tests; e.g. in testPictureEffectPreservation (the original doc had "dir" equal to "8100000", while we tested that it was "8076614" after roundtrip). Change-Id: Icd027af6238a9f45f916f53f8684506cc959e696 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110433 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-05devtools: change "Current Selection" tree item to a toggle buttonTomaž Vajngerl
It is a bit awkward that the selection is a tree item so this changes it to be a toogle button, which when enabled, shows the object in the right-hand side object inspector and disables the left-hand side DOM object tree view in this case. Change-Id: I4ebd03a39c72109f0545206354aa7dbe85e9649a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110119 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-02-04have one set of twips<->mm conversionsNoel
Change-Id: I510f4a0524a7c72eb124cba103cbf398024976d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110407 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-04remove svx/mutxhelp.hxxNoel
which is a clone of cppu::BaseMutex Change-Id: I6db266a4b67ac2d8b6c389cd27bf5bc7b9ecc754 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110402 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-04use more getSdrObjectFromXShapeNoel
Change-Id: Ia237643ab040425f231f781c86e7e060f0b53717 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110400 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-03tdf#137121 add popup menu to style items used in styles preview windowJim Raykowski
Change-Id: Ib9bd6584416b24301d3d302165d12c89bcd1e178 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109838 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>