summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)Author
2023-02-11tdf#45705 Make SID_ZOOM_IN and SID_ZOOM_OUT smoother in ImpressRafael Lima
As reported in the bug ticket, the commands SID_ZOOM_IN and SID_ZOOM_OUT are not smooth and increase/decrease zoom at too big steps. This patch uses basegfx::zoomtools to zoom in and out, making it smoother. Change-Id: I801fa6123bf0696046e5d45c7a6b309e7cc3312e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146825 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2023-02-08editeng: remove SvxLRSpaceItem::nTxtLeftMichael Stahl
Several parts of SvxLRSpaceItem appear to maintain an invariant of the 3 members nTxtLeft/nLeftMargin/nFirstLineOffset: nLeftMargin is either equal to nTxtLeft if nFirstLineOffset is positive, otherwise equal to nTxtLeft + nFirstLineOffset. But not every part maintains it: there are functions SetLeftValue() and SetLeft() which simply write into nLeftMargin regardless, and a constructor that takes 3 separate numbers without any checks. The constructor calls violate the invariant in 2 ways: nTxtLeft is simply set to 0 (many cases), and one case in OutlineView::OutlineView() that sets nTxtLeft to 2000 but the other 2 at 0. Another odd thing is that the UNO services that expose SvxLRSpaceItem either expose a property for MID_L_MARGIN or for MID_TXT_LMARGIN but never both. It looks like there are 2 distinct usages of SvxLRSpaceItem: for anything that's applied to paragraphs, all 3 members are used; for anything else, nTxtLeft is unused. Try to simplify this by removing the nTxtLeft member, instead GetTextLeft() simply calculates it. Also assert in SetLeftValue()/SetLeft() that nFirstLineOffset is 0. Change-Id: Ida900c6ff04ef78e92e8914beda1cc731a695b06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146643 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-07cid#1520799 Unchecked dynamic_castCaolán McNamara
and cid#1520801 Unchecked dynamic_cast Change-Id: I03a0fdde1da3a9f10699b35455fa2f79ff00a494 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146635 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-07improve readability of VirtualDevice constructorNoel Grandin
(a) It is not obvious what DeviceFormat::DEFAULT means (b) There are two parameters (each with two states), but only really 2 possible overall states So (1) use more useful names (2) combine the two parameters into one enum Change-Id: Ic0595b39e032cc9e019b88326389d055b977da00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-07GtkPaned properties applied to children not in a GtkPaned anymoreCaolán McNamara
since commit 280e55bf440b32ec87ce79271276c24f55172663 Date: Thu Jun 23 16:25:11 2022 +0200 Remove not necessary container in Animation Panel in Impress Sidebar It was causing layouting issues in LOK. Change-Id: I67bdb0283bd01397f59d9d4b4fbacd0610b606cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146567 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-07uitest: reset value when changing the measurement unitXisco Fauli
Otherwise, changing it in one test might affect other tests Use @contextmanager decorator to change it back to default 'Inch' at the end of the test even if the test hits an assert Change-Id: I1e7b35019cd19b490aa619c0a866bb9f93820950 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146583 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-05osl::Mutex->std::mutex in sd::framework::FrameworkHelperNoel Grandin
Change-Id: I84d5eb29413b3242386f1ffb1beafa9622985ded Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146558 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-02leader of group should default to activeCaolán McNamara
Change-Id: I1c49b227e63f01ffdd1c3b427ef780ea38a6d1ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146476 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-02add truncate-multiline for consistencyCaolán McNamara
Change-Id: I62de1820479f658076621ec0a62df967055adc4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146475 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-02osl::Mutex->std::mutex in sd::RandomAnimationNodeNoel Grandin
Change-Id: Idebeff57bc5149a3b6ea43fdac0ccafe4a8597dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146468 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-01Resolves: tdf#152845 AutoText preview not readable in high contrast modeCaolán McNamara
if its a high contrast mode with white text on black background. Reuse isOutputToWindow to distinguish between the case we are outputting to screen but not using a vcl::Window (and want to use the appropiate color for autocolor) vs the cases we are printing or exporting to pdf and not using a vcl::Window where the color should be black. Change-Id: Ib688892a6315fe88ba585613539088611d3995ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145234 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-01gtk[3|4] drop can-focus so it takes the default stateCaolán McNamara
Change-Id: Ifd39ee1d72e0592638e0f5d0ed4e1b6b2ea82a77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146439 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-01add truncate-multiline for consistencyCaolán McNamara
Change-Id: I21263263ec9fc9d9e39e7b2ec32b54a7a75323a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146438 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-31uitest: remove wait_until_file_is_availableXisco Fauli
Introduced in 33a49a99c76ca1879dbb0202384aa939a6d44a75 "uitest: introduce wait_until_file_is_available" as a blind fix for https://gerrit.libreoffice.org/c/core/+/124654/5/sw/qa/uitest/writer_tests6/edit_file_properties_before_saving.py#91 It turned out the root problem was caused by another test and the fix is addressed in https://gerrit.libreoffice.org/c/core/+/146385 "uitest: Always change doc info setting back to false" Change-Id: I4b3d5e24e35a33de6c128dcbf2f144b4cf48a48c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146389 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-01-31Some simplification after 743dd1d3c1142c1c99b0844cc26dd0be91a1de40Mike Kaganski
MapMode ctor taking origin and scales sets mbSimple to false, so avoid calling it when these are the defaults. Some calculations become unneeded when the fraction is (1, 1). Change-Id: I19a98ad2cac0a66b9bd7b72620180addb3f7fec4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146375 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-31sd: use XTheme to transport the theme to xmloff import/exportTomaž Vajngerl
Refactor the existing places and tests in Impress code (sd) to use it instead. Also keep the old property of construction and view of the theme with a sequence of property values, but under the new property named "ThemeUnoRepresentation". This is needed by the UI tests currently. Change-Id: I484567f4a603f1a5e2e03955fdd2b63132dcc66e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146225 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-31svx: Refactor (sdr) views to access the SdrModel by referenceTomaž Vajngerl
In SdrPaintView (and subclasses) the mpModel variable is always the same as the input (reference) model, so there is no need for that extra variable. Change the strange and confusing var. name mrSdrModelFromSdrView (the input reference to SdrModel) to just mrModel and use that in GetModel(). Change the GetModel() to return a reference instead of a pointer and reactor the code to accomodate the change. This gets rid of many nullptr checks for the pointer that the GetModel() returns and makes the code more simple is some cases. Change-Id: I18351a417fd82f49262a83de036ec1420a65399c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146373 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-31SdrModel: we never set scale fraction to anything else than 1/1Tomaž Vajngerl
This removes the scale fraction on SdrModel - SetScaleFraction and the m_aObjUnit instance variable, as it is never set to anything else than 1/1 (and don't see it usefult to set it to anything else than this). Change-Id: I990d20f110b3be00e6770b68e39df212f9c576be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146348 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-30tdf#148810: sd: move UItest to CppUnittestXisco Fauli
Change-Id: I11c0ecfb628792ed0ce62916e01fe3b69cb0fc78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146363 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-01-30tdf#153185 PPTX: fix export of linked OLE objectsTünde Tóth
Linked OLE objects were not exported. Change-Id: If6e8c6e0d0c9917e8ec476ad14dcaa1602c74b29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146073 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-01-29tdf#124230 export subTnLst for event triggered nodes.Mark Hung
LibreOffice export all the child nodes of a timenode to childTnLst. It seems that PowerPoint anticipate there being fixed starting-time timenodes on childTnLst. This patch export event-triggered audio time nodes to subTnLst to make audio playback work. Other node types can be added in the future once more test cases are found. Change-Id: Ic96ec50876f568145bdde122d01dec10c1ac7c50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146295 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-29sd/filter/pptx-animations: store condition in NodeContext.Mark Hung
Change-Id: I80cc7209f5347562560590554a8aa9a61e410179 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146294 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-28sd/pptx-anmiations refactor NodeContext.Mark Hung
Change-Id: I6439882884b3808dec91eaaede50856b0afdd278 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-28sd/filter/pptx-anmiation refactor Cond class.Mark Hung
Change-Id: Iffb0eeb1454a858987680d402add3f5122f7b6db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146292 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-28sd/source/filter refactor pptx animation export.Mark Hung
Refactor "Any NodeContext::getCondition(bool bBegin) const" to "const Reference<XAnimationNode>& NodeContext::getNodeForCondition() const", to get rid of the bool arguement of getCondition. Change-Id: Ic61d2caecaad2d3ada38556346f66aedb258e554 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146291 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-27move Theme class to own file inside docmodelTomaž Vajngerl
Also move Theme from svx to model namespace so it is consistent with other classes in docmodel. Theme header also includes ThemeSupplementalFont, ThemeFont, FontScheme classes that are used by the Theme and were also moved to docmodel. These may be moved to its own file in the future when they are used in more places. Change-Id: Ic409bea8e5298adc2b039b529c4f7b01cf64f03e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146221 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-27move ColorSet class to own file inside docmodelTomaž Vajngerl
Also move ColorSet from svx to model namespace so it is consistent with other classes in docmodel. Change-Id: Iacbdbdf5ece4015c628a0e45adf6a732b2d27777 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146220 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-26tdf#153107 OOXML export: fix scale of tile of shape backgroundTibor Nagy
Relative scale values were exported as absolute values, resulting broken shape background. Change-Id: Ia38e125862e7f8ceff5d41754340723c3a9eb028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145996 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-01-26cid#1520593 Uncaught exceptionCaolán McNamara
Change-Id: I14f412e9dda71863036cd99bc29f86d31b947163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146177 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-26tdf#153161: sd: move UItest to CppUnittestXisco Fauli
Change-Id: I14c1bc76b6cf19e287ef57a0aa5f34d842c69309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146163 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-01-26use more concrete types in sd consoleNoel Grandin
Change-Id: I5ac9d084616563ba3ae67ee040b4f52156baea67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146159 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-26use more concrete types in sdNoel Grandin
Change-Id: Ia2903695ddb451e21b0ed4e8d0a149d912558a4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146158 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-26GetDrawController should return pointerNoel Grandin
since it may be nullptr Change-Id: Id618ef6a25a8432024a67170a7d1402cb0fa6b8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146157 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-26use more concrete types in sdNoel Grandin
Change-Id: I545858fe18e8a436fd2dda7402c825eac28fb2fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146156 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-26no need for sd::ModuleController to load these factories via UNONoel Grandin
Change-Id: I2ac1d29ff9cbd5c8676dc1957a62ea02454d052e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146122 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-26use more concrete types in sdNoel Grandin
Change-Id: I754847ac759fb7c946f2c021e898fc0139ca5226 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146116 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-25tdf#153161: (Ab)use a call to XTextRange::getString to flush editsMike Kaganski
Restore the call (without checking its returned value), removed in commit d194474aabd699806cb3631bc8641dd0548b8026 ("tdf#151100: xText->getString() may be empty for content needing export", 2022-09-22), side effects of which obviously allow some object's changes to get flushed and saved. Change-Id: I62f27cd056c32ad76f79a4862e2f4a0964eaadef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146106 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-24[API CHANGE] remove service sd::framework::ModuleControllerNoel Grandin
It makes no sense to be constructed externally. Change-Id: I7e756e225e7b6e1785194b2f73edd5a7d65ec0e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146056 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-24[API CHANGE] remove service sd::framework::ConfigurationControllerNoel Grandin
It makes no sense to be constructed externally. Change-Id: I6fb8f58ff8594c58d190f78e6f26b2703046a95b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146001 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-23[API CHANGE] sd::frame::Configuration does not need to be an UNO serviceNoel Grandin
It does not ever appear to have been used as such, and it makes no sense to be constructed externally. Change-Id: Ia1a0cccdaeb19ded1197ad8aae701ac86dd3bb48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145989 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-23Resolves tdf#113439 - Show/Hide menu item in Draw's layer menuHeiko Tietze
Introduces .uno:ToggleLayerVisibility duplicating the existing LayerTabBar::MouseButtonDown() function Change-Id: I726d9a620afe22c84e5f20e76fabdfeccbcfb083 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145558 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-01-22XUnoTunnel->dynamic_cast in SdXCustomPresentationNoel Grandin
Change-Id: I4841e93b9e15b3406f588bbbc6da9d91a2143350 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145971 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-22XUnoTunnel->dynamic_cast in SdLayerNoel Grandin
Change-Id: Id61d38dd9f3066d07ec325494753cd9096152e9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145970 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-22XUnoTunnel->dynamic_cast in SdLayerManagerNoel Grandin
Change-Id: Ibea94a8168538e59eea6312fd49b162534df8d8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145969 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-22XUnoTunnel->dynamic_cast in SdUnoPageBackgroundNoel Grandin
Change-Id: I67e911eba5333770b83a3b5e7e2c1a7bc96ef1c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145968 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-22XUnoTunnel->dynamic_cast in SdUnoSearchReplaceDescriptorNoel Grandin
Change-Id: I26038e7d57f30b8cca661a5b4d56b8bb685eedd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-21move presenter console from sdext/ to sd/Noel Grandin
It really wants to part of the main sd UI where it can interact nicely with the existing logic, instead of using awkward UNO APIs. Change-Id: I6e0d486275515d48abe3438b88d4f58d4bee58fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20[API CHANGE] remove unused SlideSorterServiceNoel Grandin
which was introduced in commit 8c4d7aa42dd4b3b08c3b4a9e4ba772737b7bd0c4 Author: Kurt Zenker <kz@openoffice.org> Date: Thu Apr 3 13:42:43 2008 +0000 INTEGRATION: CWS presenterview (1.1.2); FILE ADDED but does not appear to have ever been actually used. Change-Id: Icd33f81cfee246fe72a4b9e584f7a6ca96d6e38b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20[API CHANGE] PresenterTextView UNO service is deadNoel Grandin
Nothing constructs it, and it looks like it was never fully hooked up, various bits of it have been removed, starting with commit a38cbc58bbe3b385830a5287ea272e28a8ae3652 Author: Felix Zhang <fezhang@suse.com> Date: Mon Oct 24 17:50:01 2011 +0800 remove unused methods from sdext:presenter Change-Id: I61080fa589ab6b886b841d7be5eed892c4bd829a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145898 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20no need to load the list of impress/draw modules from configNoel Grandin
this is not something that changes Change-Id: Ie382665690a8baa31c916029de567cccdfdd0425 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145897 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>