summaryrefslogtreecommitdiff
path: root/svx/source
AgeCommit message (Collapse)Author
2024-08-09Simplify GetObjectRectangles function with JSonWriter.Gökay Şatır
This is a follow up for: * https://gerrit.libreoffice.org/c/core/+/171374 Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I66bf8c100053907a0e2999730a6ef19e1144ae58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171598 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-08-08Add SdrModel "IsImpress" function.Gökay Şatır
Functionalities like "SetMarkHandlesForLOKit" can now use this to send data selectively. Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I8d300d1d6fe0d953f4798ec3ee0c48e258054335 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171597 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-08-02reduce cost of dynamic casting in SdrMarkView::CheckSingleSdrObjectHitNoel Grandin
which shows up when navigating large complex documents with lots of shapes Change-Id: I0631daf1365387f1192815402921ada191ab6046 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170760 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins (cherry picked from commit 0ee4b0339c3f3fd2f39f7193e2cf54df63a071b6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170730 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-08-02When a shape is selected, send other shapes' rectangles.Gökay Şatır
GitHub issue link: * https://github.com/CollaboraOnline/online/issues/9689 Also add OrdNum property to ExtraInfo in order to exclude the selected shape from the list. Check new properties in tiledrendering test. Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I544e2c8089510f47b0cc0f25e368cad6d459cb2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171374 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-07-31cool#9352 unassign cursor on SdrObjEditView to avoid crashJaume Pujantell
On stress test with shapes and typing a segfault ocurred due to using a freed vcl::Cursor. On SdrObjEditView::SdrEndTextEdit, delete pOLV can delete the cursor remembered in pTECursorBuffer. But if it is set to the window before the deletion, it will be safely removed from the window. And on SdrObjEditView::ModelHasChanged a re-anchoring sets a cursor on the window that sholdn't be there and other SdrObjEditView can see, remeber, and use it even after this one died and freed the cursor. Change-Id: I3cfef3b68b77e6e6b49c3b68297a6a20e1f9394a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171184 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-07-23tdf#161911 annot: fix for annotation with 0 sizeTomaž Vajngerl
We need to set the size to something non-zero or it will stay zero even if we try to adapt the frame to the text content. Additionally when we adapt the frame to text, we need to update the annotation with the new size. Change-Id: I4125f95fe6d0e55ab3b00a6a457cd2c9e04ec7c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170260 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins (cherry picked from commit b547e9f19de339531709c14931998125b9a41649) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170334 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-22annot: AnnotationObject should be the size as the text contentTomaž Vajngerl
This makes the AnnotationObject to resize the frame to the size of the text content, or else the text that is too big will be shown outside the object's frame (rectangle). For some reason we need to set the object as a "text frame" (mbTextFrame = true) or else it will not allow to automatically adjust the frame to the text content. Change-Id: Ib2b9a7c07626fe8b0a2286cfd67c3bf37cf9af03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169642 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170331 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-22annot: don't show the annot. object if LOK and not PDF documentTomaž Vajngerl
Change-Id: I50ffd1b6d81d2fcf6ef9f821e783ae228e39e4e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170330 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-16svx: fixed textbox text always black on dark themePranam Lashkari
problem: when doc is in dark mode and a textbox is inserted, even though text has automatic color it will be black on unselecting textbox Change-Id: I8736c15a1254682f06218a1eb1039b1985eda552 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170537 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-15delay parsing of formula in EnhancedCustomShape2dNoel Grandin
We create a bunch of temporary copies of these during layout in writer, and we don't appear to need the equation results at that point. Speeds up display of a complex DOCX file load by 10% Change-Id: Ic5870931caba13cd79b07617d04b70616f06c5b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170480 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-07-15remove RecalcObjOrdNums in DoTextBoxZOrderCorrectionNoel Grandin
(1) We already do this recalculation automatically using a dirty flag. (2) Add a custom method so we don't trigger that recalculation here Speeds up display of a complex DOCX file load by 10% Change-Id: I2a8c975ba0711172bc3e0c20c0e89f08351b6126 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170364 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-07-01reduce number of SvxTextEditSourceImpl listeners on SdrModelNoel Grandin
when we have a lot of shapes, the number of listeners attached to SdrModel becomes a serious bottleneck because of the number of broadcast/notify function calls. But SvxTextEditSourceImpl can just as well listen to the SdrObject, which achieves the same end, and reduces the bottleneck on the SdrModel. We do have to adjust some of the broadcast sites to broadcast the event to the SdrObject listeners as well as the SdrModel listeners. Possibly as another change we can remove the broadcasting to the SdrModel listeners. This shaves 10% off the load time of a large DOCX with lots of shapes. Noting that we do no need to listen to SdrHintKind::ModelCleared because we will get called via SvxTextEditSourceImpl::ObjectInDestruction when the model is destroyed. Change-Id: I3f7f6aa2a2146e4c4f59c974aa3fed92becf5eca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169565 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 4d0ba0badeb5a83d8eb5373ba5d7ef931dcf62c9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169563 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-01reduce number of SvxUnoShape listeners on SdrModelNoel Grandin
when we have a lot of shapes, the number of listeners attached to SdrModel becomes a serious bottleneck because of the number of broadcast/notify function calls. So (1) make SvxUnoShape listen to the SdrObject which achieves the same end, and reduces the bottleneck on the SdrModel. (2) repurpose the maAllIncarnatedObjects set, which tracks all objects linked to the SdrModel, so we can shut down the associated UNO shapes during ClearModel. There is no other good way of doing this, and if we don't do it, we get various use-after-free issues during shutdown. This takes the load time of a large DOCX with lots of shapes, from 35s to 17s on my machine. Change-Id: I34a6ac35c90de8b7103a7373aafe6e9607cc01c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169612 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins (cherry picked from commit d900a952eb2267717797c7e91326a0ce3f222063) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169725 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-06-29svx: use SAL_RET_MAYBENULL in GetSfxViewShell()Xisco Fauli
Change-Id: I05e66544c08a1ed55a5571f6061b23346235224e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168293 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins (cherry picked from commit cb982975c16e380f88282f03d07f8cfb8421ed77) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168316 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-06-28UniqueID class that generates and stores a uniqueID for an objectTomaž Vajngerl
UniqueID generates an unique ID (unique for all users of UniqueID) and keeps the value for the object's life time. Change-Id: Ic2cc1665e57b1984c231a050f82a330c9dcf1ffc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169691 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-06-28jsdialog: support on demand rendering for icon viewSzymon Kłos
- rename action: rendered_combobox_entry -> rendered_entry - change generic get json property callback to more specialized image getter as it wasn't used anywhere apart of that and we need image enceded as base64 only not JSON - add to the full update of icon view "ondemand" property to the entries with images so LOK client will know it has to download the render - it will be possible to support HiDPI renders in the future: added TODO Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I83a6e91133f8f9cb03e0bc794b51e1947435fa90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169622 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-06-27Update getPartHash function.Gökay Şatır
Current hash uses this pointer so it gives different values for another pointer. Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I1a687a56ed90d01821a97f3d350759a0dd2621e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169660 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-06-20annot: clone annotations in SdrObjects when the page is duplicatedTomaž Vajngerl
When the page is duplicated we need to clone all SdrObjects and with that also all the annotations contained in the SdrObjects. The annotations must also be added to the page, so that we can find them quickly. Previously we only cloned the annotations and relied that the SdrObjects would be automagically be created, but as the SdrObject are also cloned this creates a mess with duplicated objects with annotatins for the wrong page or annotation objects with missing annotation. Change-Id: I4bf53e4bd387fad9b0a8e4f43edd57c3d0fd34cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169256 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2024-06-18annot: update object text when annotation text changesTomaž Vajngerl
When the annotation text changes we need to sync this with the SDR object (if the object is showing the annotation text - like free text annotation). Also move annotation object searching to the annotation class, so it can be reused in AnnotationWindow. Also change uso of UNO XAnnotation in AnnotationWindow and use concrete type (sdr::annotation::Anootation) instead. Change-Id: I46db479ae8471c82ac58487a0125df15697245be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168981 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-18annot: update annotation object when annotation position changesTomaž Vajngerl
+ add tests which check annotation object position changes Change-Id: Iad5de3d319c14ddb69d6c1994ce5949d57d76de7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168744 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 752436502c8ef19d93e4a211431b9be637261d07) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168842 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-18annot: document new annotation classes and methodsTomaž Vajngerl
Change-Id: I71d1055a30e0e8eedcd8fa71b47e74e90f1aac93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168654 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-18annot: don't render objects marked as annotation in PDF exportTomaž Vajngerl
Objects that are marked as annotation shouldn't be rendered to the PDF document. Those should be written to the PDF as annotations (if output of annotations is enabled in the PDF export options). Change-Id: I60650b5a64dc52da6d32d8ac92441e4b21900126 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168653 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-18annot: add custom selection overlay for the annotation objectTomaž Vajngerl
Make annotation objects selection similar like it was with the old annotationg tags. Change-Id: I0623ddf56274dc996ed9dd16096256e03ad65270 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168652 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-18annot: update annotation position, size, text when those changeTomaž Vajngerl
Change-Id: I345f4c714ed4ca0c8277e0aedf5ea4b5cd70ea70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168604 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-18annot: new Annotation sdr object, replacing annotation tagsTomaž Vajngerl
Previously the annotations are shown as annotation (smart) tags, which just mark in the document the existence of an annotation at a certain position. For PDF support the annotations can be more complex, so they can show many forms of vector graphic, ink, bitmaps, text boxes,... and for this a normal tag is not enough. This change moves the annotations from simple tag to use the sdr objects, so any SdrObject can be created as an annotation. The previous tag annotations are using SdrObject (actually SdrRect) subclass AnnotationObject and the code that previouslly worked with the tag annotations has been adapted. The (PDFium based) PDF import has been changed to use subclasses of the SdrObjects for the PDF annotations. Change-Id: I4746b85b5b679499e470987e61ed356397e56bf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168602 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-17LOK: fixed incorrect Logic point calculation for Map modePranam Lashkari
problem: it was very difficult to select line in online, specifically in writer if line is very think and it was almost impossible to select line Change-Id: Ib641cd3d9795b93d47c78bc8f57211f51714844d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168837 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-06-17annot: add {add,remove}Annotation that don't notifyTomaž Vajngerl
Add addAnnotationNoNotify method, that doesn't broadcast that an annotation was added, and change addAnnotation to call the method and in addition call the broadcast bits. Previously all this had happened in the addAnnotation without the choice to not broadcast. Change removeAnnotation in a similar way. Change-Id: Ie15a386a8b8d4493d5b41fcbcb55924a693b46d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168429 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins (cherry picked from commit e467cb52d68692e936eb07c2c1faa45f03dd1f82) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168573 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-17annot: prepare SdrObject to represent an annotationTomaž Vajngerl
Adds the ObjectAnnotationData class that is available in every SdrObject, so it is possible to mark an object to represent an annotation. Such objects will be treated differently when saving the objects to files, printing, exporting to PDF. Change-Id: Iabcc2166ea20cbeac6d2ada7120700a4e8b19303 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168428 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins (cherry picked from commit 4cd2737d829e8a3413ad3d60a17dded4dcc8938c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168572 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-12svx: adjust the values for impress/draw ruler to work with LOKitTomaž Vajngerl
The values in impress/draw don't need to be converted to 100th mm as the vales are already in 100th mm. However the null offset and page size needs to be adjusted, because in impress/draw the actual document doesn't start at 0,0 but there is one document width or 1/2 document height margin to the left, right, up and down of the document. So the null offset returns the number of the document width or 1/2 document height. For LOKit the null offset needs to be subtracted. Similar needs to be done for page width and height. The page width is docuemnt width * 3 and page height is document height * 2. So to get expected numbers for LOKit, the page width needs to be divided by 3 and page height divided by 2. Change-Id: I8d5561d5273b4bbeab475565504fa64c7f882fd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168276 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-06-12annot: move TextAPI to svx and adapt the codeTomaž Vajngerl
TextApiObject is derived from SvxUnoText and holds and handles the text in the annotation. This functionality is changed to get rid of sd module specifics and moved to svx module. This now allows to move the most improtant parts of the Annotation object to svx. Change-Id: I34e238616e7fac973e75e79bb60a8d093c493258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166497 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 2791964914ba19b636ce49a60508bcab7af675cd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168559 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-11annot: moved more of Annotation and dependencies into svxTomaž Vajngerl
Moved the holder of annotations from SdPage to SvxPage, so that the vector holding the annotations and accessors are on SvxPage and adapted the code. This also changes the type od most parameters on most methods from sd::Annotation to sdr::annotation::Annotation and adapted the code. Moved AnnotationEnumeration into svx, as it was needed in svx already. Change-Id: Iab17aa881443f58adfb9158959db00ed24076279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166494 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit a0a581ead18f030f59d203539706de0230746cae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168555 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-06-10annot: move UndoAnnotation and deps. to svx, adapt svx AnnotationTomaž Vajngerl
This moves UndoAnnotation and dependent classes to svx, refactor the code to in sdr::annotaion::Annotation so annotations in sd module still work as they have before. Change-Id: I3769069a636c30c55bc1fcf2406d990f1b44baa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166493 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit d126f57fd4bbba7ac0e4218ed30524cb9bbb5859) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168527 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-10annot: added Annotation impl. to svx, moved some thing from sdTomaž Vajngerl
This is an attempt to move the sd::Annotation to the common code in the svx module. This will need to be done in multiple steps so the first one is to introduce sdr::annotation::Annotation class in svx module, which is derived by sd::Annotation. Non-problematic functionality and members are also moved to the svx Annotation. Change-Id: Id20466b3780514ab63a9df8923b879098870ebb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166492 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit a938ed2be520426ce7949c4fd30a6e7e31d7c279) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168419 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-03Resolves: tdf#157453 support FM_PROP_LINECOUNT for combobox dropdow rowsCaolán McNamara
Change-Id: I3d18ed505c2eea7305903f9a476c332db0148113 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167814 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2024-05-31tdf#161354: drop incorrect assertionMike Kaganski
Change-Id: I49eb5c52ef843f4615f1cf1549cd59c365e5ce1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168277 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit be2638603b85974cc452e3d453f4adb9d9f5d97f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168207 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-05-17tdf#161019 tdf#159846 spreadsheet border renderingNoel Grandin
regression from commit e27d4cc31e04be4c47b5085dfa2363ee45457e8a Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Mon Jun 19 12:23:55 2023 +0200 tdf#150534 reduce the memory consumption of cells when calculating Change-Id: Id8b52a3a0880bbb6a7aff28f55bcd57cb1cae048 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 6f8a73a379d97829080367b21d54f9b5fab781c9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167682 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-05-17svx: move lok's NotifyKit in the ruler to the SvxRuler super-classTomaž Vajngerl
We want to make the ruler work in other components and also not only for horizontal orientation. For this we want the NotifyKit already in the SvxRuler, which is used by all rulers. This change moves the functionality to the from SwCommentRuler to SvxRuler and partially reverts the previous attempt as changing the ruler instance for vertical ruelr to SwCommentRuler caused test failures. Change-Id: Ie618b5dc5b936f9dc53d09b624eefdbc506d98f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167740 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-05-15tdf#156484 svx,sw: fix visibility of shapes in header/footerMichael Stahl
Similar to commit ae132145ff42a95dc24fb124847c04af4b8c8dab, also forward IsVisible() and IsPrintable() from SdrVirtObj to its real object; evidently the properties aren't copied when creating SdrVirtObj but there is no reason for that to have these properties independent. This triggers an assert in VOCOfDrawVirtObj::createPrimitive2DSequence() because that is called during layout from getObjectRange(); the assert was added in commit ae3ec0d53a22ae5d2b7fb244a6056d0627b71873 and intended for painting, but this isn't painting, and it's not easily possible to detect if the function is called during painting, so remove the assert. (cherry picked from commit da7e1d686a586fa93b1e96adb3d837ea3ae59b98) Change-Id: Id2a04a5d07f43b86eb9c524b30ba74ecaf6a95c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167658 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-05-08svx: Avoid divide by 0Xisco Fauli
See https://crashreport.libreoffice.org/stats/signature/SvxRuler::UpdateTabs() Change-Id: Ie08c54d1a1b40bcc42da9f81c893f496fff433a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166626 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 90548039f09d4bc773bf6879a62d544adfa175db) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166674 Reviewed-by: Aron Budea <aron.budea@collabora.com> (cherry picked from commit 35c0afcf0a0428670e3e1998f222440b504ae0c8)
2024-05-06always check return of SfxViewFrame::Current()Caolán McNamara
Change-Id: If35fe03c775aec12ec534d02d58596aebcec764f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166985 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit caf719c59c6dc8db2b6a0eab8d47760277f112a3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166902 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit cd7ee2410a42da4b702cb32f57e038ba7d9f0854)
2024-04-15Related: tdf#160056 this can be staticCaolán McNamara
Change-Id: I1172854a1bf00e74adbe350c54e4e98ea38b0b35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165072 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 49189bb8823adc6a76d3f33b34c02d6a640df96a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165746 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit ba5cbbccefb5d55e19ed928cf900f8afb8337e9d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166120 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2024-04-15editeng: use text scaling that better mimics MSO text scalingTomaž Vajngerl
Implement text scaling algorithm that is similar to MSO text scaling for text boxes for the compatibility purpuse, so that the Impress slides better match how the PP slides are layed out. This also moves the implementation into EditEng, where it is possible to better control how searching for the best scaling factor is performed without doing additional irrelevant work or trigger invalidations that should not be triggered. An additional change is that the paragraph with no content at the end are ignored, and are not taken into account when determining the height of the content. This is done for compatibility reasons. Fix horizontal spacing of tabs - the spacing shouldn't be scaled and the tab shouldn't include the space at the beginning of the line. Change-Id: Ie37fa67f1cf300e915a4ebaef2a7f968bf6c5744 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165441 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit f61ea135430d7b4a1fac7de1e57a1314fbb1b49e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166087 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-04-15svx: read font and spacing scaling from oox, add bot as UNO prop.Tomaž Vajngerl
- Read spacing in oox. - Add spacing scaling as a property. - Rename property "TextFitToSizeScale" to "TextFitToSizeFontScale" - Add property "TextFitToSizeSpacingScale" Change-Id: Icde575e55a3146169d86bb538a57adcf1fa228a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165633 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit db64748f1ee771da9da857f95601b9e08b577166) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165709 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-04-15tdf#160176 svx: Reset help text when form control has noneMichael Weghorn
In `FmFormPage::RequestHelp`, also call `Help::ShowQuickHelp`/`Help::ShowBalloon` when the help text is empty, as that is the way to unset the help text/remove the tooltip again, see `ImplShowHelpWindow` in `vcl/source/app/help.cxx`: For the case of non-native tooltips (e.g. the gen VCL plugin on Linux), the `bRemoveHelp = true` code path is relevant. For qt5/qt6/kf5/kf6 which use native tooltips, the call to pParent->ImplGetFrame()->ShowTooltip(rHelpText, rHelpArea) further up sets the `QtFrame`'s `m_aTooltipText` member to an empty string, which prevents showing the outdated help text for the `QEvent::ToolTip` event in `QtWidget::handleEvent`. Change-Id: Iceb2424d9c72ae46333a718c677629122e517f11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166006 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 6347c89711903834cc9188abda5d5a253053b789) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165933 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2024-04-15editeng: combine scaling parameters into ScalingParameters structTomaž Vajngerl
This makes dealing with scaling parameters much clearer and it improves readability. Change-Id: I327b6530ef5587972cc0075390704754a33563a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165632 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 4bdbf0f898e8642b0a34195537d1516cc8eee819) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165712 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-04-07tdf#160421 flip lights too for flipped extruded shapesRegina Henschel
If an extruded custom shape is mirrored, the lights in the scene are also mirrored. This should not happen. MS Office keeps the light direction in relation to the camera direction for binary files and pptx files with legacy camera. We should do the same, especially since the UI does not allow the user to set the light directions at arbitrary angles. Otherwise the shape receives only ambient light. Change-Id: I091d78c581b3d247f8b0680cd57654e3df330cdd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165562 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 9761d4239de6398d4f6ecf08356f2ce18e502a04) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165614 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-04-07tdf#160444 check device's owner window is a nullptrPatrick Luby
Since commit 563f7077f1dbce31ff95ee8d2e8d17b629693db1, the device's owner window gets deleted before this object is deleted. Change-Id: I15dc8db60e5520c2f0e73a9a117f25af15845caf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165637 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com> (cherry picked from commit d034036a049d6dcc8dc62a8e44c1e4befcaa25b0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165623 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2024-03-27tdf#158773 reduce cost of TextProperties::NotifyNoel Grandin
Shaves 30% off the load time here, by re-arranging the logic so we do th expensive dynamic_cast less often Change-Id: If7a1605994e620dbdb61010506c624cc738359a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164466 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 3b784236d7c3bf386deeeadcf79d9e9b289bf991) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165112 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-03-11LOK: send LOK_CALLBACK_SHAPE_INNER_TEXT info on empty textbox initializationPranam Lashkari
Change-Id: I8bc003f89147c145ec4b1f9a91b6fe82da9f14be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164663 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-11LOK: don't send empty callback for LOK LOK_CALLBACK_SHAPE_INNER_TEXTPranam Lashkari
Change-Id: Id0a3a84fcadc1ab216b856760fd168b23bed2827 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164660 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>