summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)Author
2022-06-24tdf#149311 PPTX export: fix internal hyperlink on textsTibor Nagy
by converting "Slide [digits]" URLs to slide[digits].xml See also commit 4142d728f003166ebe520bfdaf672505e585b807 "tdf#149314 PPTX import: fix internal hyperlink on texts". Change-Id: I39e095c960b04e728b3e28fa0a657d37d9c71ba1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135250 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-23tdf#149314 PPTX import: fix internal hyperlink in editorTibor Nagy
Hyperlinks on text weren't imported correctly if the linked slides have default slide name, resulting broken links in the editor (hyperlinks work well in slide shows without this fix, too). Change-Id: I797fa94134c1346bc83729c713e65b2a268a14c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135245 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-23tdf#149126 fix export of PPTX preset shapesTibor Nagy
Follow-up to commit 63cd67e5e18f01aca303131e148c80398a181a41 "tdf#92525 tdf#142398: fix export of simple custom shapes" and commit 744e6c0b758fefe6011f09860b44f03ab70fbcfe "tdf#147459 PPTX: add "glue points" to some basic shapes". Thanks to Regina Henschel for the code pointer. Change-Id: I378ffffc2ba09fcffcaa4e5dcf74bfd19e9f704d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135361 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-22tdf#128150 Adapt sidebar to new "use slide background" propertySamuel Mehrbrodt
Change-Id: Idce049a7498f98b0079c708236cfeff7fddd6e95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135963 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-06-22Document SD_DEBUG env varSamuel Mehrbrodt
Change-Id: Ia1a71ba5ff4fcf4196899209f8d85c2975ed8e55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136225 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-06-21tdf#128150 Only show "Use background" btn in Impress & DrawSamuel Mehrbrodt
Change-Id: I5d14f651af55b51a8a02a8a4ddbb1c0921b15d81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136182 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-06-20sd theme: consider accent1 color when inserting shape with solid fillMiklos Vajna
Once a theme is defined for the master page of the current slide, PowerPoint inserts a shapes with their fill color & line color set based on that theme (so this color is master-page-specific), while Impress sets the fill & line color based on the default shape style. The Impress behavior has the benefit of doing the usual style-based formatting, but now a document-level style overwrites a (master-)slide-specific theme, which is inconsistent. Fix the problem by extending sd::FuConstruct::SetStyleSheet(): if we construct a shape with fill, then not only apply the style sheet, but also set the fill & line color based on the theme (if there is any). Note that this works both in case the shape is instantly created on click (LOK case) or when the user first draws a top-left -> bottom-right point pair to define the position / size of the shape. At the same time line colors don't support themes yet, so that color is just a plain value for now. Change-Id: Ic6ae8f91bd719bd80f2b56f12b001d29b0961e6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136138 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-06-20tdf#128150 xmloff: ODF import/export of fill-use-slide-backgroundMichael Stahl
This would be better as a value of draw:fill, but we can't add values as an extension. Change-Id: I05db879a8cb5018e0261f049ae91a5b9aaa760b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135814 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-06-17tdf#134210: Reimplement cropping from srcRect and fillRectMike Kaganski
This avoids the scaling after the crop, since scaling is performed anyway when applying BitmapMode_STRETCH. This improves resulting bitmap quality. Also consider the "crop to zero" case (when the sum of cropped parts is equal to 100%). In that case, just use an empty graphic as the fill bitmap. This makes the differences between srcRect and fillRect processing explicit, simplifies the code, avoids extra rounding inaccuracies, and takes care of the edge cases that were considered in commit 2859ec288f2c1323ea3123d82cb1684b349ff598 Author Miklos Vajna <vmiklos@collabora.com> Date Wed Jun 15 15:52:18 2022 +0200 oox: fix div by zero in lclCalculateCropPercentage() The change in SdImportTest2::testTdf134210 is because we now don't scale the cropped image. The previous value was an interpolated color, while the new value is the actual color of pixel [0, 41] of the original image. Change-Id: I24fa9928cff32bcaa6a7b3e34def14700fddd7ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135917 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-16tdf#128150 Add OOXML import/export for "use background fill"Samuel Mehrbrodt
and allow editing this fill property in area dlg Change-Id: Ic63ba11e9d499d4a0fb22f6739587e3e25140b8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134406 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-06-16loplugin:moveitNoel Grandin
Change-Id: Ic593974a44d9e327e0385c7ffaaa6d42576ae01a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135911 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-15Fix customslideshows.ui extended tipOlivier Hallot
Change-Id: I72b861144e2634d074e7b6f7f91e27e4875304a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135613 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-06-14tdf#149351 Add a 'Turn off mouse as pen' shortcutGabor Kelemen
for UX compatibility with PP: Ctrl-A turns off 'mouse as pen' mode Change-Id: I0379580f4034f07f044dc1079c14898f3014face Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135579 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2022-06-13loplugin:mergeclasses sd::TitledDockingWindow with sd::PaneDockingWindowNoel Grandin
Change-Id: I77314048173ebba0dc0e03f710607b74e73f0bde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135719 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-11Bump customslideshow.ui to latest GladeOlivier Hallot
Change-Id: I15bb8c7bfde9df109af3e9466763ff70c0e0a526 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135612 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-06-10CppunitTest_sd_shape_import_export_tests also needs the ASan hackStephan Bergmann
...from e854abe076155fc085b56549ced50b3ee9a095d2 "Avoid external processes picking up instdir/program/libnspr4.so", to avoid > Test name: ShapeImportExportTest::testTextDistancesOOXML_Export > equality assertion failed > - Expected: 0 > - Actual : 32512 > - failed to execute: sh .../bin/officeotron.sh .../tmp/ShapeImportExportTest__testTextDistancesOOXML_Export_2l2moj.tmp > .../tmp/ShapeImportExportTest__testTextDistancesOOXML_Export_2l2mol.tmp 2>&1 > java: symbol lookup error: .../instdir/program/libnspr4.so: undefined symbol: __asan_init Change-Id: If7f3f9de14c7122b4a08b5a4807b4d28dffb9e06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135595 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-10new loplugin:moveitNoel Grandin
look for local variables that can be std::move'd to parameters off by default, since it doesn't do proper data flow analysis Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-08tdf148321: convert OOXML inset values to text distance valuesTomaž Vajngerl
Inset values for top, bottom are calcualted differently in OOXML and need to be coverted on import to the text distance LO values, that place the text relative to the shape correctly. At export, the values can be converted back to the OOXML inset compatible values, but the values are not always converted back to the same values as the conversion is not bijective, however they do render the same. This also adds the test for the conversion when importing and checks that the exported values are expected. Change-Id: Ic64eec1a2a80ddad997f916da3e87dc30aaa12be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135463 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-06-07Resolves tdf#146928 - Redesign charnamedialogHeiko Tietze
Dialog was changed in d73602dc51aa8829fc88e5e67e2b0c4da6b8f715 to fit vertical size on small screens by placing Western/CJK/CTL into a notebook. But for CJK and CTL it's required to have Western fonts visible in parallel. * dual solution for western with nocjk and cjk dropped western scales to the dialog width if no CJK nor CTL is enabled * CJK and CTL placed in a notebook, Western as well for proper alignment * font names are presented in lists but size and style per simple dropdowns * info text sized at 80% * variables renamed to keep track of controls (old names kept in l10n descriotion) * UITests adjusted for variable names and tab positioning Change-Id: I45b40e9bc37565f6364f1dfc1b5d837270fe4644 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134666 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-06-02Fix typosAndrea Gelmini
Change-Id: I9b7800610a04d0c3e1d241531049fbab06943ce3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135208 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-06-02std::move SfxPoolItem into SfxItemSet where possibleNoel Grandin
found with the help of a temporary loplugin (which i have put into the store/ folder) Change-Id: Ide40d09bef6993ace50039a8fd0439b7e29c09a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135288 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-01tdf#148736 improve labels for Arrow style popup dialogsSeth Chaiklin
Change-Id: Ifc43650a3008cbd96cac8f994675e680368a215b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133287 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2022-05-31Advanced Diagram support: UI visualization & simple interactionsArmin Le Grand (Allotropia)
Added visualization to show an imminently recognizable additional visualization for DynamicDiagrams that can also be used to show/hide the DiagramDialog by the user. It is also used as additional drag/move handle for the object. Change-Id: I56292cebe7c7a6f79be920c17edafdd7e453b6eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135183 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-05-31tdf#147991 PPTX export: fix bullet indent regressionAttila Bakos (NISZ)
Instead of exporting the inherited master slide indent values of the placeholders, export 0 indent value for removed/disabled bullets to fix interoperability. Regression from commit f57cfddb51b7d7409b7b425dc200aa73406a13bd "tdf#145162 PPTX export: fix extra bullet regression". Change-Id: Icbf823adc07f19fd10d1a60da9cff17616a2aef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135025 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-05-31CppunitTest_sd_tiledrendering: reduce test doc size in testTdf104405Miklos Vajna
The actual image content is not interesting, so it can be a tiny one. Change-Id: I74e404f53b9674b44963313b096ddd8e1c40e146 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135141 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-05-30CppunitTest_sd_filter_eppt also needs the ASan hackStephan Bergmann
...from e854abe076155fc085b56549ced50b3ee9a095d2 "Avoid external processes picking up instdir/program/libnspr4.so", to avoid > Test name: (anonymous namespace)::testThemeExport::TestBody > equality assertion failed > - Expected: 0 > - Actual : 32512 > - failed to execute: sh .../bin/officeotron.sh .../tmp/_anonymous_namespace___testThemeExport__TestBody_w8epm.tmp > .../tmp/_anonymous_namespace___testThemeExport__TestBody_w8epo.tmp 2>&1 > java: symbol lookup error: .../instdir/program/libnspr4.so: undefined symbol: __asan_init Change-Id: Id6f49c08a8bcd0ad9b5600de147624d5cfc6019b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135122 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-30tdf#149128 PPTX export: fix <stCxn> and <endCxn> connector propertiesTibor Nagy
to avoid of detaching connections between shapes, when these connections were created in Impress. Change-Id: I1bc90bb8a408546b303b70bcfb27d3549d5e72d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134940 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-05-28use the new SfxWhichIter::GetItemState featureNoel Grandin
to speed up other places that are iterating over SfxItemSets Change-Id: I646bae12420d15e67effdd279e071cdf8a8afffd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-27tdf#148965 PPTX import: fix internal hyperlinks on shapesTibor Nagy
Locale dependent code path resulted broken hyperlinks on shapes in a non-English build. Change-Id: I045bbe4246ab5336e2b967bf252b5fbca5b17706 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134266 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-05-27tdf#149124 PPTX import: fix broken connectors in grouped shapesTibor Nagy
Previously connector lines of grouped shapes were detached after the import losing the original layout (without ungrouping and moving the shapes). Change-Id: I660629d9d1c2cb0ab68de275ca5406f4c48e9145 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134943 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-05-26sd theme: add UI (sidebar) for shape fill color effectsMiklos Vajna
Which was perhaps the last missing piece of the "sd theme: shape fill color" story. Change-Id: Ice75d91412aa56afe0c9995086097d491ebf7299 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134952 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-05-25directly instantiate IndexedPropertyValuesContainerNoel Grandin
without the overhead of the UNO service engine Change-Id: I4a02fda2b3c92a897634374bf72cfffee4f531f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-25Advanced Diagram support: Isolated IDiagramHelper, selection visualizationArmin Le Grand (Allotropia)
Moved and isolated IDiagramHelper to own file to get SdrObjGroup smaller and less dependent again, all places adapted. isDiagram() now available at SdrObject directly, adapted and have less places which need to cast for SdrObjGroup for check. Started to add SdrHdl/selection visualization to seleced Diagram. Only as a start, will need to be extended to look good/better, plus evtl. functionality in handles/UI. Corrected error(s) found by failing UnitTests More clang-notes (static, namespace) I nneeded to follow Change-Id: If4675b3270d3ee30259fce49deb017dbbaf5c0c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134825 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-05-25tdf#149205 sd theme: fix PPTX export loosing dk1 and lt1 colorsMiklos Vajna
Document theme of Impress documents were exported to PPTX only partially: dk1 and lt1 was hardcoded to the SYS_COLOR_SCHEMES define, while the rest was written from master-slide-specific svx::Theme. The benefit of this is that our theme is just a set of colors (<a:srgbClr> markup in OOXML), while dk1 and lt1 is more dynamic by default in PowerPoint (<a:sysClr> in OOXML). The downside is that this way a custom dk1 and lt1 color was lost on export. Fix the problem by switching to <a:srgbClr> markup even for dk1 and lt1: not using the <a:sysClr> markup doesn't seem to be a problem in practice, or at least much less problematic than rendering with bad colors. If there is a need, dedicated <a:sysClr> markup support can be still added later by extending svx::ColorSet::maColors to not only store a list of colors, but also some additional properties of those colors. Change-Id: I26df3fd8c891c217df0d36382f6599805198f4bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134883 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-05-24Use o3tl::make_unsigned in some placesStephan Bergmann
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24modernize and improve PropertySetInfoNoel Grandin
(*) use o3tl::span for the array param, which means we don't need a null entry to terminate the array (*) use std::unordered_map to speed things up (*) mark the array as static at a few more call sites Change-Id: I05b6cae7552f44459e183ec05cb94e60edb3bfe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134832 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24reserve vector in FrameView::WriteUserDataSequenceNoel Grandin
Change-Id: Ia66fd26d9697467c58b2d17a0e511604795a4316 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134836 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24tdf#149206: sd_import_tests2: Add unittestXisco Fauli
Change-Id: I1ff0974d1fa2ae6eb45fc95115fad665eecc45bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134818 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2022-05-23tdf#149141 - Added default object creation when drag size too lowAshSinc
Change-Id: Ibbc0fab14c0bcb18a979d6364b04c236c8c5e29e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134499 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-05-23tdf#66228 PPTX export: fix lost U-shaped connectorsTibor Nagy
which were replaced with straight connector lines. The "Line Connector" has no equivalent in OOXML. So far it has been saved as a "Straight connector". In most cases, the better solution is to change it to "Standard connector", keeping the original layout with U-shaped connectors. Change-Id: I9d6b6174d0556ba2478c6a9837c500b3cc794c82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134284 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-05-20tdf#135843: sd_export_tests-ooxml3: Add unittest for the export partXisco Fauli
3faf005a367cbd28077403bf93810bbaf4805851 "tdf#135843 Implement inside horizontal vertical borders." also fixed a problem when exporting to PPTX. Before the patch, if attachment from tdf#106011 was exported to PPTX and then opened in Powerpoint, the table was visible there. Change-Id: Iaa06a0ab9d6421916eccd4944fd4a8f041046907 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134683 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-20new loplugin:unnecessary lockingNoel Grandin
off by default, since each warning needs careful inspection Change-Id: I805c1d1cdde531a1afdc76e87b22f879fc3c9753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-18Extend loplugin:redundantcast to trivial reinterpret_cast from T to itselfStephan Bergmann
Change-Id: I7c0be7b435d6b5f97bdd40484023584146638d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134506 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-17Resolves: tdf#149093 connect_value_change if we will query its valueCaolán McNamara
and not the text_change which is called before the value is parsed from the new text Change-Id: Ib6bd5647139f1b79f299beb42b704b465ddf535c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134412 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-13add SvStream::ReadLine(OStringBuffer... to reduce OString allocationNoel Grandin
and use it where possible Change-Id: I3efc7a642f73661ce606c917c0323ba9948521c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134265 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-11tdf#149029 Scroll to the selected object in the Animation panel on selectingCaolán McNamara
Change-Id: I2c14f9c6df74d4534c936b392f0e066dabebea9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134172 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-11Advanced Diagram support: UNDO/REDO support for Diagram DataModelArmin Le Grand (Allotropia)
Added support for UNDO/REDO for changes in Diagram ModelData. This is currenly applied/used in the DiagramDialog for it's Add/Remove actions (also supports Cancel of that dialog 1st time ever). But it is defined more general to add/support manipulating actions like clone/change_text etc. Also the UI/dialog at he end will not be/stay modal, so this is a test implemenation how to use it. It uses an extract/apply mechanism to get/set the Diagram ModelData at/for the UNDO action. That may be expanded as needed for additional data in he future. It may also be considered to modify the Connection/Point ModelData to shared_ptr internally completely to avoid copying these at all. OTOH it is not that much data to handle at all. Change-Id: I4702ed908b79a476177fe66c0e3284898c6adda5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134118 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-05-10tdf#147919 PPTX export: fix curved and bent connector shapeTibor Nagy
by calculating and exporting adjustment values to avoid of connector lines with bad turns overlapping the connected shapes. Change-Id: I0441508f4fe98b3482e2955df5f41f2cfc2ffb4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134109 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-05-09Resolves: tdf#148985 crash on searching for non-existing prefixCaolán McNamara
Change-Id: Ib89af12e75910adbd32abab5afceb9013dc51df2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134039 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-07Revert "tdf#147919 PPTX export: fix curved and bent connector shape"Stephan Bergmann
This reverts commit 1f8c6efbfea10997f188962d036f5c7db4c13f8a, as it caues > warn:legacy.tools:12871:12871:tools/source/generic/poly.cxx:1581: Polygon::[]: nPos >= nPoints > ================================================================= > ==12871==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000445080 at pc 0x7f6303ec7854 bp 0x7ffd23271600 sp 0x7ffd232715f8 > READ of size 8 at 0x603000445080 thread T0 > #0 0x7f6303ec7853 in Point::X() const /include/tools/gen.hxx:83:51 > #1 0x7f63045baaa1 in oox::drawingml::lcl_GetConnectorAdjustValue(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&, tools::Polygon, com::sun::star::drawing::ConnectorType, std::__debug::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >&) /oox/source/export/shapes.cxx:1556:27 > #2 0x7f63045b731f in oox::drawingml::ShapeExport::WriteConnectorShape(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) /oox/source/export/shapes.cxx:1701:13 > #3 0x7f63045984e7 in oox::drawingml::ShapeExport::WriteShape(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) /oox/source/export/shapes.cxx:1956:5 > #4 0x7f62b399ad3b in oox::core::PowerPointExport::WriteShapeTree(std::shared_ptr<sax_fastparser::FastSerializerHelper> const&, PageType, bool) /sd/source/filter/eppt/pptx-epptooxml.cxx:1658:22 during CppunitTest_sd_export_tests-ooxml3 CPPUNIT_TEST_NAME=SdOOXMLExportTest3::testTdf114848 (<https://ci.libreoffice.org/job/lo_ubsan/2388/consoleFull#-1714579836d893063f-7f3d-4b7e-b56f-4e0f225817cd>) Change-Id: I7eab9d3ef8e6604a57d3e59a77905edf6ce6e6ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133870 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>