summaryrefslogtreecommitdiff
path: root/sd/source/ui
AgeCommit message (Collapse)Author
29 hoursUse IsRunningUnitTest / IsRunningUITest consistentlyMike Kaganski
The functions are moved to o3tl as inline functions. Change-Id: Ief7d7e292ef15e055ad04ab5707e5e6a2a05b916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170636 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
33 hoursSimplify checking for "running under unit/ui test"Noel Grandin
In various places, the code checks if we are running as a unit test or a UI test. This code grew organically, and is most re-using environment variables that were designed for narrower purposes. Rather than being clever, just add two new explicit and simple environment variables in the natural place (the command that runs them), and check for those variables in the code. Change-Id: Icce0997914fa0be30a5ac1f29bd870bdb5893a8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170618 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
5 daysannot: make all keys work when writing in annotation windowTomaž Vajngerl
We did not call the method on the superclass when we don't handle the key ourselves, but we should. Change-Id: I67d55773b7e86297c00727b4791c16a1adcc37f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170430 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
5 daystdf#161994 annot: trigger selection of the current annotationTomaž Vajngerl
Delete annotation isn't active if no annotation is selected, but we do not report a new selection anymore, so fix this. Change-Id: Idb455d0c0d42412c55de4a7ca037342b58da548b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170429 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
5 daysannot: simplifx getting the proper window for popupTomaž Vajngerl
Change-Id: Ic9e01d57137ddfbb6f4ec741a275b579741675a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170428 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
8 daystdf#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
8 dayssd: Switch DBG_ASSERT to assertMichael Weghorn
This fixes Windows/MSVC build errors like the one reported in [1]: C:/BuildLO/core/sd/source/ui/view/drawview.cxx(394): error C2220: the following warning is treated as an error C:\BuildLO\core\sd\source\ui\view\drawview.cxx(372) : warning C6011: Dereferencing NULL pointer 'pSheet'. : Lines: 285, 287, 289, 292, 293, 294, 313, 333, 336, 339, 341, 343, 345, 347, 349, 353, 354, 355, 369, 373, 372 [1] https://lists.freedesktop.org/archives/libreoffice/2024-July/092158.html Change-Id: Ib63cc2d48203a4c6ba2f1239feb7dc306de5d11b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170279 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
8 dayscid#1556474 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1557319 COPY_INSTEAD_OF_MOVE cid#1557320 COPY_INSTEAD_OF_MOVE cid#1558101 COPY_INSTEAD_OF_MOVE cid#1606536 COPY_INSTEAD_OF_MOVE Change-Id: Ibe10ee3fad7f6ca1f3c5b316fdafe4bf15f0ead7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170280 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
9 daysRemove duplicated includeAndrea Gelmini
Change-Id: Id309c3775e1704ab65cea86ece65e960d1f2cd1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170264 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
9 daysDrop redundant codeMike Kaganski
GetMarkedObjBitmapEx works on BitmapEx now, and does exactly the same. Change-Id: Ia7333515996803fcf1ac10515950ce2f96ab01fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170239 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
9 dayssd: slideshow render interface and implementationMarco Cecchetti
Interface and implementation to expose the ability to render the slide's layers to a bitmap. Change-Id: I3da48585e498354592e163d84bd29659b233c255 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170214 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
9 daysRemove duplicated includeAndrea Gelmini
Change-Id: I454f1763640ae2a8cef62dcc5eac354a6fc17197 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170180 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
9 dayscid#1608488 COPY_INSTEAD_OF_MOVECaolán McNamara
Change-Id: Id2e09641f4095eca73a16dd1fcec64d91ab5395a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170197 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
9 dayscid#1554688 COPY_INSTEAD_OF_MOVECaolán McNamara
Change-Id: Icf7c8f12259f8d2023fadc4a62318ee392e71f4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170189 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
10 daysStyleSheetUndoAction stylesheet param should be a referenceNoel Grandin
Change-Id: Ib162befb88f7b9671efaa40ea699f0bb21b02adc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170164 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
10 dayscheckForUniqueItem should take a reference parameterNoel Grandin
Change-Id: Ibd9638f9716c4ce8db7ee5e652dc2f207617e7de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170162 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
10 dayssd: function to return a presentation info in a JSON documentMarco Cecchetti
The presentation info includes properties like document size, if the slide is visible, master slide information and similar. [ Miklos: don't refer to removed tools::ScopedJsonWriterArray. ] Change-Id: I5b0acff2ee0df351dd1859e02695ca249e17c391 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170155 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
12 dayscid#1609595 Dereference null return valueCaolán McNamara
Change-Id: I6ae93f46c50e0fe4a29d03fdf02797f808d4d1c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170022 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
13 daysUniqueID 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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170017 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
14 daystdf#161653 Fix selecting from numbering dropdown (Impress/Draw)Samuel Mehrbrodt
Change-Id: Ia066a8ff4b7ab4760fec7a4475afbceee084d115 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169995 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-07-04annot: add test that checks annotations after page is duplicatedTomaž Vajngerl
Change-Id: Ic2463272d024acda4f4f5bceadbf8d5779967f67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169643 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-07-04annot: 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
2024-07-03cid#1606793 Dereference before null checkCaolán McNamara
Change-Id: Ia2d5c0e347322828a0fa3c6b5af2b6a27956d4aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169921 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-03tdf#33603: handle outliner setup for notes pane searchThorsten Behrens
User can start search from subviewshell context of Notes pane, so disambiguate & delegate to actual main view shell (same fallback logic as for non-Notes pane case). Change-Id: I129505f452690ca5fde23dc6953cc3f34438d267 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169710 Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de> Tested-by: Jenkins
2024-07-03tdf#33603: make notes pane searchableSarper Akdemir
Flattens DocumentIteratorImpl, getting rid of the intermediary ViewIteratorImpl. Now the DocumentIteratorImpl, iterates in the following pattern: 1-) For all slides, visit the NormalView and the NotesView before advancing to next slide. 2-) Master Pages 3-) Handouts Now when a search result is found in the NotesView that is displayed on the NotesPane instead of the NotesView. Change-Id: I8133c6a74861e783ab1a23f51ac5faf362a0f512 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169659 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-06-29Use better types hereMike Kaganski
Change-Id: Icc9c6fdea2c3d10db51728389187589a26a887c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169758 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-06-29Decrease rounding errors a bitMike Kaganski
Change-Id: If9f078c96d03046aba4db19125a17fcf7fd68a81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169756 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-06-28tdf#33603: fix notespane (side/tool)bar interactionsSarper Akdemir
Introduces OverridingShells that when set, makes the view act like the MainViewShell. The main use case is having more then one ViewShell in a single window, where context (toolbars, sidebars etc.) can jump in between different ViewShells. Uses OverridingShells to enable NotesPane to react ToolBarShells. Accessing the functionality of ToolBarShells without the previous hacks with slot forwarding. Change-Id: Icc9721d7f54097025bc9dc7ef7069aed856e6d96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169658 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
2024-06-27use ESelection::NoSelection() instead of manually setting valuesTomaž Vajngerl
Change-Id: I65f378d0178c0fcd209dc629f49befacfce02de2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169640 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-06-25LOK: Do a ".uno:DocumentStatus" "state changed" callbackMike Kaganski
... along with proper state changed callbacks for .uno:SlideMasterPage, .uno:NormalMultiPaneGUI, .uno:NotesMode, and others. The ".uno:DocumentStatus" payload is a notification for the callback that it may need to collect the document status. This allows to avoid the bond between the mentioned true UNO command names, and the status collection: since we now send the status updates for all of them, the document status collection would be performed for each of them in the absence of a dedicated signal. This re-implements commit bbd32b39eae24e99d135ed5c48586db8c9b0fb23, without introducing a new callback enum value. Change-Id: I942e17298196ff39ef8817a4cd59ad0fb8fa0da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169468 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-06-25Revert "LOK: Introduce LOK_CALLBACK_STATUS_UPDATE"Mike Kaganski
This reverts commit bbd32b39eae24e99d135ed5c48586db8c9b0fb23. A following commit will implement an alternative method without a new enum member. Change-Id: Id00a4a0abe68fc69b1a3a81c731c8085e3dbca2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169467 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-06-24editeng: add convenience creators to ESelection All, NotFoundTomaž Vajngerl
ESelection::All() select all text ESelection::NotFound() sets seletion to not found state ESelection::NoSelection() sets selection to no / invalid selection Introduce max paragraph and position constants in ESelection, use for EE_PARA_APPEND, EE_PARA_ALL, EE_PARA_MAX_COUNT, EE_TEXTPOS_ALL, EE_TEXTPOS_MAX_COUNT. Also simplify some ESelection constructs. Change-Id: Ib110c5a730a1deabe4f988baa5a600249b3a31e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169356 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-06-22fix O(n^2) behaviour when fetching field info from EditEngineNoel Grandin
Change-Id: I324a1814fc1b3321eed5b29922790600e7092c17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169344 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-06-21LOK: Introduce LOK_CALLBACK_STATUS_UPDATEMike Kaganski
This allows to send status messages separately from statechanged; this is needed in Impress to notify about any mode update, not only masterview-related. Also send SlideMasterPage updates automatically from core. Change-Id: I0a50dbe61a5f2f28cd418eb4416819a6a76810b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169314 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-06-21LOK: differentiate page kinds in sd::ViewShellBase::setEditModeMike Kaganski
A follow-up to commit 4ff2e148fa25933e64b7bbecbcd3ed551ad686ab (LOK: differentiate page kinds in sd::ViewShellBase::getEditMode, 2024-06-16). Change-Id: Ib982c9ee45ca71445f09d56f9165bc33b43e8540 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169313 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@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> (cherry picked from commit c3281e071526f7efa9b7646a993476fc3f6ff8db) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169260 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-06-20loplugin:unusedfieldsNoel Grandin
Change-Id: I4bc67811e228b4806db9f9b9bf9fb0de0eb36de2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169263 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-06-20loplugin:unusedmethodsNoel Grandin
Change-Id: Ia216da9bd7764f2d21aaee761a02eafda88d892e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169257 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-06-19tdf#160490 PPTX import: fix automatically resized placeholder heightTibor Nagy
See also commit Ia7f94d7452d1a1c3f004aebd73b6ed5cbfd9b43b "tdf#157285 PPTX import: fix placeholder height". Change-Id: I6203af3fe86a60e29121685ffeb435f4ff25368a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169206 Tested-by: Jenkins Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
2024-06-18loplugin:ostr in variousNoel Grandin
Change-Id: I7aa8ed716998a185996482dc561219b398a1c919 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-06-18Add SfxItemType to SfxPoolItemOliver Specht
The SfxPoolItem has a new member SfxItemType m_eItemType to compare types based on enums instead of typeinfo() which consumes a lot of time e.g. while AutoFormat is running Change-Id: I033ce67bc9a28ee4790f162380314de85fb4154e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166452 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-06-17annot: 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/+/168977 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-06-17annot: add undo to annotations inserter when synchingTomaž Vajngerl
Change-Id: If4b8ddcbee9468655944effb931347c8077abc3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168976 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-06-17fix crash in "delete comments by author" in impressCaolán McNamara
insert comment, click on it to expand it, click on menubutton and use "delete all comments by..." crash on use of invalid iterator as callback trashes the vector being iterated over Change-Id: Ia86de87207f706f35a023efa433c5e67b8bb436a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168970 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-06-17Resolves: tdf#160681 draw impress comment similarly to how writer does itCaolán McNamara
so we get the same filled MenuButton in both applications Change-Id: Iea41a17285287ec2794e4cdce6eaae0906fff291 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168969 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-06-17annot: remove too much "using namespace ..." declarationsTomaž Vajngerl
Change-Id: Ief36190e10dc03246497d4fd9475d9141dd1d7b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168975 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-06-16LOK: differentiate page kinds in sd::ViewShellBase::getEditModeMike Kaganski
E.g., sending a LOK_CALLBACK_GRAPHIC_VIEW_SELECTION payload, the "mode" must be different for notes view and for normal view. Change-Id: I1f328290087f3185b7bef69560b28df6adb82e90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168917 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-06-15annot: support fill and line transparence for PDF annotationsTomaž Vajngerl
Change-Id: Iafff527a094e6cb550a9e060a191510f74d86075 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168841 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-06-14prefer simple HTML format over RTF while pasting clipboard contentOliver Specht
This changes applies to draw text, only JUnit test is included Basic HTML table import is included. Change-Id: I00387f3932c0aa54099c9bc7390ad86b4398b417 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162871 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-06-14annot: add support to import Stamp annotation from PDFTomaž Vajngerl
Stamp annotation shows an arbitrary bitmap in the document, where the most common bitmaps are stamps like "Approved", "Confidential", "Expired", "Sold",... Change-Id: I332e34cbb346a686ee16eac7ca437ec4048e65ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168760 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>