summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)Author
2022-03-09Fix some mistakes in strings reported by translatorsAdolfo Jayme Barrientos
Change-Id: I56defd20865ddfcefd51dae624f3331abc8dd93c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131228 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-03-08tdf#112126 Added Unit TestVaibhavMalik4187
Change-Id: Ia02d0846ee932188a90687a2f29183e34e01c4c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129922 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-03-07tdf#136632: sd_png_export_tests: Add unittestXisco Fauli
Change-Id: I1d85f989dd2a56f693befcf995985a69f62354cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131114 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-03-07Resolves: tdf#146825 select under mouse on right clickCaolán McNamara
if something isn't already selected Change-Id: Ifa692cd71bb71ecb5c7af732deef510f2bac5fce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131111 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-07do not pass XComponentContext to officecfg::...::get() callsLuboš Luňák
It's used only for the ConfigurationWrapper singleton, so it's used only the first time and then ignored. It also causes calls to comphelper::getProcessComponentContext() for every single invocation despite the value not being needed, and the calls may not be cheap (it's ~5% CPU during ODS save because relatively frequent calls to officecfg::Office::Common::Save::ODF::DefaultVersion::get()). Change-Id: I02c17a1a9cb498aeef220ddd5a0bde5523cb0ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131056 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-07Fix some DPI-dependent testsMike Kaganski
Change-Id: I3c669802ac558379498c877c8ac4796bbff80f82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131096 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-03-06clear UserCall in SdPage destructorNoel Grandin
because I want to ref-count SdrObject, which changes the lifecycles of these objects, and then if an SdPage dies before an SdrObject we have a dangling m_pUserCall pointer. Change-Id: Ia08178c1b2f288f6d9d489fb9fd79e67bc3ea61c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131065 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-05tdf#136632: Use 'Save transparency' when exporting selected objects for PNGJulien Nabet
To avoid some regression, consider that transparency should be enabled by default. So only remove transparency if it's required explicitely. + change QA test since "Translucent" property isn't a bool but a sal_Int32 In officecfg/registry/schema/org/openoffice/Office/Common.xcs: <prop oor:name="Translucent" oor:type="xs:int" oor:nillable="false"> Change-Id: I9bfb6aae8e2e8a31dee82f73a9165989129f222a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131057 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-05tdf#38669 - Create the key event using a Unicode characterAndreas Heinisch
Instead of using a plain char, create a key event using a Unicode character, otherwise the key event creates texts including rectangles or wrong characters. Change-Id: I9ec0d64998927d54eb3ae90a192c3b28e235f56d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130721 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-03-05AccessibleShape::GetStyle can be constNoel Grandin
Change-Id: Ic71ae0645c85ec27cc6a172d379070fe88a9f452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131045 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-04Advanced Diagram support: Allow reLayout without keeping oox::ShapeArmin Le Grand (Allotropia)
Goal is to minimize dependencies on oox classes. For that pupose I redesigned the Diagram class to work without remembering an oox::Shape at all. For reLayout, a new temporary one is created and used. That was a bit tricky, I needed to find out what data at the oox::Shape is needed to sucessfully do that with the not-originally-imported one. Another necessary change was to move the DiagramFontHeights adapting mechanism away from oox::Shape, too. It fits better to Diagram class. That way it can also be used for reLayout and the oox::Shape gets a little bit smaller, too. This opens the path to move needed Mode-Data Diagam core claasses to other libs where changing/im/exPorting them will be possible. Change-Id: I40bc4b190d2abc797f5c56f9e476d22155d21422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131004 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-03-04Fix typosAndrea Gelmini
Change-Id: I4b26b105e4c16b1860389deb7a629ff139bd260c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130976 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-02cid#1485150 silence Uncaught exceptionCaolán McNamara
Change-Id: Ib7aa5dc2cd7e32d31e9da84e6dcb9e6ce5b472d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130888 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-02Advanced Diagram support: Extend UI to all applicationsArmin Le Grand (Allotropia)
As a preparation make the currently available minimal UI to interact with Diagrams available to all LO apps Change-Id: Idd0a4c187a295cd264ebd09be2b574a3d2a93e44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130837 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-03-02tdf#113197: sd_png_export_tests: Add unittestXisco Fauli
Change-Id: I1e5a6818f7d540153a50cc42c9c12e17a41409ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130846 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-03-02tdf#135843 Implement inside horizontal vertical borders.Gülşah Köse
wholeTbl as TableStylePart should be handled in different way. Before left border of the whole table was handling like all cells left border but it should be left border of the first column. insideV and and insideH properties are imported but never handled. I added the inside vertical and horizontal borders handling. Change-Id: I5aea5cbefc746db637eac6c1438fa70a7d741bc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128971 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2022-03-02Advanced Diagram support: Disable enter Diagram (Groups)Armin Le Grand (Allotropia)
Groups which are in Diagram mode should not be entered, to do so disable at UI and - for security reasons - also at the executing mehod. Groups in Diagram mode can still be UnGrouped (which will remove the Diagram status & data) Adapted testRegenerateDiagram() to directly act on the model data to test the same as before. Using triggering of UI events to enter the diagram group object needs reorganization, but model op's will always be possible Change-Id: I199f3821c2a8308a6f015997ce9eaef87623c46a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130541 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-03-02use SfxItemSet::GetItemIfSet in sdNoel Grandin
Change-Id: I198b6101c1d62e81a70bac6a57faa2adc2dd36f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130820 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01Fix typosAndrea Gelmini
Change-Id: I9a98bac7c570f25ff7d77df98e93aaeed2665038 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130720 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-01gtk4: media dimensions are only reliably available asyncCaolán McNamara
this is also the case for the direct gstreamer use in gtk3 but more egregious when abstracted away from it in gtk4 Change-Id: If90069308d67929585722c079c482cd4ad196e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130468 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-01fix assert when changing fill on impress shapeNoel Grandin
reverts part of commit 31e7845339b30a69f06a04619660398fe4267268 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Feb 17 12:19:49 2022 +0200 use more SfxItemSet::CloneAsValue Change-Id: I5f385525adcdb73199a6eb4b057e275341fb85b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130765 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-01tdf#147459 PPTX: add "glue points" to some basic shapesTibor Nagy
(ellipse, triangle, right triangle, trapezoid, parallelogram, diamond, pentagon, hexagon, heptagon, octagon). These glue points allow to add and use connectors on basic shapes, e.g. by specifying 8 glue points on outline of ellipses (and not 4 glue points only on their bounding boxes). Usage: insert a basic shape from the list above, select it, and click on the icon Connectors to show and use the new glue points on the outline of the shape. Note: PPTX import doesn't import connectors connected to the glue points – only ODP export keeps them for the planned editing, i.e. moving the connected shapes without losing the connecting lines and arrows. Change-Id: Iaef21ce8dc3f6677fa2fd6a484adf6d546e72ad1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130281 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-02-28tdf#103800 PPTX shape import: fix regression of text colorTünde Tóth
defined by list styles. Properties in a:lstStyle of p:txBody should take precedence over the same properties defined in a:fontRef of style elements. Change-Id: I02cc886eb9eba94f49fe413a63bf7c46c9e3c127 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130237 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-02-28tdf#147121 PPTX: fix regression of font size export of empty linesAttila Bakos (NISZ)
If the empty line has got direct formatted font size, don't forget to export it, unless the master setting is applied. Regression from commit b6b02e0b4c9d739836e1f61a886ea45b01e6696e "tdf#111903 tdf#137152 PPTX export: fix placeholders". Change-Id: If686e487bca9c198fd7c96860a21e4efe91381bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130005 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-02-28tdf#128596 PPTX import: fix default tiled bitmap fillTünde Tóth
OOXML bitmap fill element a:blipFill has got default tiled area setting without explicit a:tile in MSO. Previous import of bitmap fill as "BitmapMode_NO_REPEAT" instead of BitmapMode_REPEAT resulted missing or incomplete area fill of shapes and other objects. Change-Id: Idf94f4450980f67172a0126784b3e08cc5c178c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129483 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-02-27use more SfxItemSet::CloneAsValueNoel Grandin
to reduce heap allocations Change-Id: Ia755c3e7f9610a5441a447cc74ea38ebcef068bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130066 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-26cid#1362689 Uninitialized scalar fieldCaolán McNamara
Change-Id: I14bb8fce8bb2d8aa744463da4a065dec6a15f3ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130599 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-26cid#1500598 Uninitialized scalar fieldCaolán McNamara
Change-Id: I732117dae2b383356dc58b5f47e52f6e722e991d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130595 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-25uitest: introduce wait_until_file_is_availableXisco Fauli
For export - import tests See https://gerrit.libreoffice.org/c/core/+/124654/5/sw/qa/uitest/writer_tests6/edit_file_properties_before_saving.py#91 Change-Id: I3c2537a43cc69067355f18162d6463e268420090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130530 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-25uitest: remove debug optionXisco Fauli
it does nothing Change-Id: I6fa67aa42b1de6199cbb49100624826f5b3b77d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130524 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-25Advanced Diagram support: cleanup/consolidate with existing codeArmin Le Grand (Allotropia)
Reorganized and streamlined, use IDiagramHelper as main interface now also for existing code. Had to adapt oox::Shape && Diagram handling since there the import gets handled very different. This ensures that a Diagram is detected at export and that the same happens for now as before Had to add a detection that resetting the GrabBag is meant to disable the Diagam functionality. That is very indirect, but has to stay for compaibility reasons for now Change-Id: I620b7d61cd84b5f9dd8ae4dc890ebf70ce779cdf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130389 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-02-24uitest: check the value and not the textXisco Fauli
This fails for me with AssertionError: '90%' != '90\xa0%' - 90% + 90 % Change-Id: Ieec52a4aff721705451a0545eb606c97235b1248 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130507 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-24use more TypedWhichIdNoel Grandin
Change-Id: I6ab3ca829bc08e672736dd8dd41ba714d7172090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130498 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-23cid#1500550 Dereference after null checkCaolán McNamara
Change-Id: I0e0e17026fed5e12dacbdd0900dc305a74543e03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130429 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-22Advanced Diagram support: first additions/reorganizationsArmin Le Grand (Allotropia)
To allow advanced Diagram/SmartArt support in the future this is a first step to organize imported SmartArt Data in a way that will allow to re-layout loaded SmartArts, under re-usage of the oox::Theme (held available). It is designed to work without holding available the original XML snippets defining the imported Diagram in any way, also for performance reasons. It tries to re-use some of the already basically added functionality, including the systematic layouting using the generic layout algorithm, plus some already available text extraction. Before being sure that the former state can be completely replaced this is optoinal and used when SAL_ENABLE_ADVANCED_SMART_ART is defined. Some new stuff is already done but e.g. the redefined reLayout method will not (yet) be triggered. It works and reliably produces a re-layouted identical version, also preserving transformations. Change-Id: I08cfbae04afa663d0589530aae549216d853128d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130171 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-02-21CppunitTest_sd_uiimpress: Remove duplicated dispatchCommandXisco Fauli
SdUiImpressTest already inherits from unotest::MacrosTest Change-Id: If9683cf6ddb9c56913e19d9c7d1ebbf09864b742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130280 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-21Recheck modules sd* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I97c1a0e8c7f26807b12e6062581066d09ea13086 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130114 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-17Use Dragonbox to implement doubleTo*String*Mike Kaganski
This header-only library is accurate in decimal representation of doubles; provides API that allows to create custom representation - so it's possible to use custom decimal separators and grouping. This allows to unify all corner cases: integers, numbers close to DBL_MAX, up-rounding to the next decade. Note that Dragonbox creates the shortest decimal representation of the number, that is unambiguously convertible back to the same number; thus it may hide trailing digits that are unneeded for such conversion. The functional changes are minimal, and beneficial: 1. Rounding numbers close to DBL_MAX now takes into account the bEraseTrailingDecZeros argument, as it should, allowing to have "1.8E+308" for rounding DBL_MAX to 2 decimals without trailing zeroes, instead of previous "1.80E+308". 2. Incorrect rounding is fixed in some cases, e.g. 9.9999999999999929 rounded to 10 previously using rtl_math_DecimalPlaces_Max. 3. Representing the number in the shortest way may change display of some printed numbers. E.g., 5th greatest double is represented as "1.797693134862315E+308" instead of a bit longer, but giving the same double on roundtrip, "1.7976931348623149E+308". This would generally look better for some numbers similar to the famous 0.1, where users would likely expect more "round" representation where it's unambiguous (but we still truncate to 15 significant decimals anyway - so there's no point in pretending to provide exact digits for actual binary representation). These are reflected in the unit tests affected by the change. Change-Id: I05e20274a30eec499593ee3e9ec070e1269232a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129948 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-17sd theme: add doc model for shape fill colorMiklos Vajna
In preparation of adding UNO API for this. Change-Id: Iecb2e44c43bca9e892fcb6242870ec12faa48be5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130050 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-11svx::PropertyChangeNotifier improvementsNoel Grandin
(*) rename the enum to make it's purpose more obvious (*) remove the enum header - it belongs to this class, no need to have it somewhere else (*) return property name by const&, no need to copy here (*) use a o3tl::enumarray instead of a std::unordered_map - there are only 3 entries here, and two of them are ALWAYS used, so just flatten the data structure. Change-Id: Ic496bd5220d55be1209a3243c095d461df0a02ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129788 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-10tdf#137571 use XActionGuard to lock blocks that don't need updatingCaolán McNamara
so we can avoid constantly generating new TextForwarders which are the same as the one they replace. The underlying problem is that of tdf#123470 but this solution should be safe to backport Change-Id: I742f2a9ce0024adf9bd0acc5bb8edb9372fc0af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129775 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-10rename some SID to FN_PARAMNoel Grandin
because they are not slots, they are only being used as parameters Change-Id: I539f4832b884d1ea7dc14ce4ef6c79feec6681cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129732 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-10add more TypedWhichIdNoel Grandin
Change-Id: I6401dcf2507ac53a71dbe4de4ba774aed905961e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129731 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-08tdf#126319: sd_png_export_tests: Add unittestXisco Fauli
Change-Id: I36cdd81fcb70d5383519c22b92a3d6366b719b8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129380 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-07tdf#145868 sd replace: if search changes, restart find/replaceJustin Luth
REPLACE is really a replaceAndFind instead of a findAndReplace. Thus, when you changed your search parameter and did a replace, it replaced the previously searched for item, and then found the first instance of the new search parameter. That of course is just wrong. So make sure to verify that the previous search matches the current search competely. However, that doesn't mean that the entire searchItem matches, since we don't want to restart the search just because the replace parameter changed. In my testing, this wasn't an issue for REPLACE_ALL. So the only time we need to worry about the last search result is in a replace once situation. P.S. This commit exposed that mpSearchItem can point to a destructed SvxSearchItem, so this patches unit test will crash if the other 7.4 commit is missing. Change-Id: I7be14d64534018718145c6ac5f8629ff5f2e5611 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129385 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-02-05WaE: storing the address of local variable [-Wdangling-pointer]Caolán McNamara
this is presumably what was intended Change-Id: I0c436c1440207140158ae902b17b43549a94d8c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129536 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-05tdf#145835: typo in customanimationeffecttab|text_delay_labelJulien Nabet
Change-Id: Ib3d42ab54ec855af5a922f4dd47cedd96bdf10c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129529 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-05tdf#123658 sd search: restart search start on slide changeJustin Luth
When the user switches between slides and then re-starts a search, they expect that the search will begin on the current slide. This fixes a somewhat 5.2 regression. Before that time, the first search attempt failed, but the second attempt started at the current slide. After 5.2 fixed the first-attempt-failure, the starting position was "the slide after the last find". This patch resets the starting position to the current slide, which I saw was done in every case by DetectChange(). I thought about moving all this logic into DetectChange, but it doesn't make much sense to affect a spell-checking dialog run by moving around in the slides, so just keep the logic here. I submitted the unit test in a PRIOR patch. The basic search was failing on WIN/MAC platforms and so I wanted to confirm that this was NOT my fault. Indeed, on those OSes the testing fails, so I just run it under Linux where it works fine. Change-Id: I4d1af3049bb2c0a59ec46f005c4b1773aefffb6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129204 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-02-05be more stylistically standardCaolán McNamara
Change-Id: I8fa978a5b58faa79c9c07b2c832a56b4d5230dd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129504 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-04related tdf#145868 sd: Clone SvxSearchItem to avoid use after freeJustin Luth
I tested "if (mpSearchItem)" which passed, but then it crashed when trying to access (*mpSearchItem) == (*pSearchItem) because the mpSearchItem's DTOR had already been called prior to the if(mpSearchItem). Since mpSearchItem is never compared to another memory pointer, it is safe to assign it to a Clone. Steps to reproduce: 1.) open Impress and search for something 2.) change the search string to something else 3.) search again. Note that there isn't currently any code that hits this. I discovered it trying to craft a fix for bug 145868. Change-Id: Idc5f5a3e812ed3e49631347c35c3f4b2d8bb4127 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129347 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>