summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2021-06-23tdf#141311: Rotation spinbox in sidebar used to have 2 decimal placesKatarina Behrens
regression from weld-ing (c85fcc6e1994eb8e079aaca85066ab4d67149c15) Change-Id: Iad0725fd4542ecdddb65092846dbf9d103016d9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117408 Tested-by: Jenkins Reviewed-by: Katarina Behrens <bubli@bubli.org> (cherry picked from commit 7a717c8b9319edcc12e50ab78554b8e0e7049cbf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117419 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit 1bec8a3d3b16bb8881bd49f58d8786421ff5f839) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117554 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-17Resolves: tdf#142767 cannot use itemid of 0 in ValueSetsCaolán McNamara
Change-Id: I2c2b655b512e4e7869fe3784f1b073ecdbd0dac9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117123 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-16memcpy-param-overlapStephan Bergmann
At least UITest_impress_tests started to fail at > ==608818==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x6020000ef270,0x6020000ef276) and [0x6020000ef274, 0x6020000ef27a) overlap > #0 in __asan_memcpy at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3 > #1 in RemoveWhichRange(unsigned short const*, unsigned short, unsigned short) at svx/source/svdraw/svdetc.cxx:413:17 > #2 in SdrObjEditView::SetAttributes(SfxItemSet const&, bool) at svx/source/svdraw/svdedxv.cxx:2222:19 > #3 in SdrCreateView::SetAttributes(SfxItemSet const&, bool) at svx/source/svdraw/svdcrtv.cxx:883:29 > #4 in SdrView::SetAttributes(SfxItemSet const&, bool) at include/svx/svdview.hxx:193:96 > #5 in sd::View::SetAttributes(SfxItemSet const&, bool, bool, bool) at sd/source/ui/view/sdview.cxx:488:28 > #6 in sd::DrawView::SetAttributes(SfxItemSet const&, bool, bool, bool) at sd/source/ui/view/drawview.cxx:288:27 > #7 in sd::TextObjectBar::Execute(SfxRequest&) at sd/source/ui/view/drtxtob1.cxx:819:21 > #8 in SfxStubTextObjectBarExecute(SfxShell*, SfxRequest&) at workdir/SdiTarget/sd/sdi/sdslots.hxx:17883:1 [...] (followed by > ==647521==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000258856 at pc 0x0000002f7b0a bp 0x7f7f7a69fdb0 sp 0x7f7f7a69f560 > READ of size 6 at 0x602000258856 thread T9 (cppu_threadpool) > #0 in __asan_memmove at /data/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:30:3 > #1 in RemoveWhichRange(unsigned short const*, unsigned short, unsigned short) at svx/source/svdraw/svdetc.cxx:413:17 > #2 in SdrObjEditView::SetAttributes(SfxItemSet const&, bool) at svx/source/svdraw/svdedxv.cxx:2222:19 > #3 in SdrCreateView::SetAttributes(SfxItemSet const&, bool) at svx/source/svdraw/svdcrtv.cxx:883:29 > #4 in SdrView::SetAttributes(SfxItemSet const&, bool) at include/svx/svdview.hxx:193:96 > #5 in sd::View::SetAttributes(SfxItemSet const&, bool, bool, bool) at sd/source/ui/view/sdview.cxx:488:28 > #6 in sd::DrawView::SetAttributes(SfxItemSet const&, bool, bool, bool) at sd/source/ui/view/drawview.cxx:288:27 > #7 in sd::TextObjectBar::Execute(SfxRequest&) at sd/source/ui/view/drtxtob1.cxx:819:21 > #8 in SfxStubTextObjectBarExecute(SfxShell*, SfxRequest&) at workdir/SdiTarget/sd/sdi/sdslots.hxx:17883:1 [...] > 0x602000258856 is located 0 bytes to the right of 6-byte region [0x602000258850,0x602000258856) > allocated by thread T9 (cppu_threadpool) here: [...] if the memcpy were replaced with memmove) after 8aaa28ed43978a9a4a20d62368410a57ec05c23f "Assert on valid order of which ids in ranges on SfxItemSet creation": Where in the past it had called RemoveWhichRange({10951, 10951, 4007, 4007, 0}, 4007, 4062) and RemoveWhichRange({10950, 10950, 4007, 4007, 0}, 4007, 4062) on wrongly sorted ranges, for which the implementation of RemoveWhichRange happened to work, it now calls RemoveWhichRange({4007, 4007, 10951, 10951, 0}, 4007, 4062) and RemoveWhichRange({4007, 4007, 10950, 10950, 0}, 4007, 4062) on correctly sorted ranges, which uncovered the broken implementation. Given that RemoveWhichRange is presumably not hot (e.g., being called just two times during UITest_impress_tests), turn it into a less sophisticated, but also likely less error-prone algorithm. (Leaving unit tests as a TODO, given that RemoveWhichRange is not currently exported from Library_svxcore, and the existing CppunitTest_svx_unit links against Library_svxcore rather than using gb_CppunitTest_use_library_objects.) Change-Id: I8a1c1d5db8073928ad2f6e88d581f24a0e882925 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117264 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 541f94df85756d3a383b1f9ba49841ca0011b52e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117293 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-14global-buffer-overflowStephan Bergmann
...down in svl::detail::CountRanges during e.g. CppunitTest_sd_tiledrendering, after 8aaa28ed43978a9a4a20d62368410a57ec05c23f "Assert on valid order of which ids in ranges on SfxItemSet creation" and 90cb57eb53e28ecb983001bf8f018577abb6d145 "Workaround internal compiler error on tb77" Change-Id: I8ff49384a86676a97ec876ef08426b978e39f6d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117168 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit d3e51bce28a759916e9a3988172ba02b1db66641) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117128 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-14Workaround internal compiler error on tb77Mike Kaganski
As reported in https://ci.libreoffice.org/job/gerrit_windows/98360/console : C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/svx/source/svdraw/svdedxv.cxx(2639): fatal error C1001: Internal compiler error. (compiler file 'msc1.cpp', line 1591) To work around this problem, try simplifying or changing the program near the locations listed above. If possible please provide a repro here: https://developercommunity.visualstudio.com Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/svx/source/svdraw/svdedxv.cxx(2631): note: while evaluating constexpr function 'svl::ItemsArray' INTERNAL COMPILER ERROR in 'C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1427~1.291\bin\Hostx64\x86\cl.exe' Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information tb77 uses VS 16.7.7 (cl.exe is under Tools/MSVC/14.27.29110); tb68 with cl.exe under Tools/MSVC/14.28.29910 has no problems compiling this. Let's make the code simple for now, until we upgrade the tooling on CI. Change-Id: I10aaf289454c89b2f49b4be947627a9a3be30fde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117137 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 90cb57eb53e28ecb983001bf8f018577abb6d145) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117125 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-06-14Assert on valid order of which ids in ranges on SfxItemSet creationMike Kaganski
This allows to make sure we actually use sorted which ranges, and then it's safe to call SfxItemSet::MergeRange when needed. Also this change relaxes the previous requirement that ranges must be separated by at least one; this allows to have adjacent ranges, like in RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_GRFATR_BEGIN, RES_GRFATR_END-1, where RES_FRMATR_END is equal to RES_GRFATR_BEGIN. Allowing this makes possible to (1) self-document the ranges, so it's clear which ranges are included; and (2) be safe in case when these constants would change, so that the one merged range would not unexpectedly contain everything inserted between RES_FRMATR_END and RES_GRFATR_BEGIN. Change-Id: Iaad0f099b85059b3aa318a347aa7fbd3f6d455c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116909 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117106 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-06-10svxcore: provide UNO constructor for com.sun.star.text.TextColumnsMike Kaganski
This allows to create it e.g. in Basic macros using CreateUnoService Change-Id: I949d3b92c83cd9e763244f70b22f0f367b93cb48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116970 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 01379acedcdad4fc08c61b73b8500e758b88d5ae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116903 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-06-10editengine-columns: Implement layoutMike Kaganski
This changes the way how different parts access positions of lines and paragraphs. Now there is ImpEditEngine::IterateLineAreas, which performs uniform iteration over all ParaPortions and lines in order, calling a user-provided callback function for each portion and line; it passes all information about current portion, line, area, and column to the callback, and checks the return from the callback, to decide if it needs to continue iteration (in case when callback indicated that if doesn't need further data), and if it needs calling the callback for the rest of current portion's lines. This allows to have the code that calculates and iterates dimensions of lines in one central place, without the need to have duplicating logic in several places. One important exception is ImpEditEngine::Paint, which iterates without ImpEditEngine::IterateLineAreas, because it does many atomic paint operations in different points of iteration process, and implementing ImpEditEngine::IterateLineAreas to call callback in the required places would require increased complexity, which is left for a future change. To make that possible, ImpEditEngine::IterFlag should be extended to indicate additional requirements. Note that in fact, ImpEditEngine::Paint was taken as the model for implementation of ImpEditEngine::IterateLineAreas, with its detailed handling of all the vertical offsets like additional line spacing and interparagraph spacings that depend on context. The notable result of the centralization of the iteration code is slight change of heights reported by ImpEditEngine::CalcTextHeight. Previously it simply added all pre-calculated heights of portions, and not taking into account all the spacing handling that ImpEditEngine::Paint did, which was inconsistent (calculated height was different from painted height). Now ImpEditEngine::CalcTextHeight should provide more accurate results, which required small changes in the unit tests. Change-Id: I33cbb978deb974b314d36fda8674186a03991107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116034 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116876 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-10editengine-columns: ODF support [API CHANGE]Mike Kaganski
This uses existing ODF markup, as used by Writer's text frame: style::columns child element of style:graphic-properties, its fo:column-count and fo:column-gap attributes. No ODF extension is required. Since currently only columns with same width and spacing are implemented, without additional settings, style:column child elements are exported, but ignored on import. This adds new property to css::drawing::TextProperties service: TextColumns (of type css::text::XTextColumns). Change-Id: I7e63293e5814b281ceec8a9632e696322d3629e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116035 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116871 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-10editengine-columns: Create document model and dialog pageMike Kaganski
Change-Id: I056aad9474ca18134d1f1686a53618cc9ab3d525 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116038 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116868 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-09jsdialog: hide adv search options on mobileSzymon Kłos
Change-Id: Ide206d602992c49a3a54c8635d97a1ce43cc216e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116912 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-06-07Fix and unify the two methods that get scaled text sizeMike Kaganski
GetTextFitToSizeScale and SdrTextObj::GetFontScaleY both didn't initialize outliners properly, and thus returned wrong results. Change-Id: I6fe63c51ed838a0d0fafdfa03597cac97ce29831 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116765 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit a1ae30166e92a0a40dff06740f0bb8e9ee63f70a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116704 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2021-05-31Extended MoveShapeHandle command for Anchors as wellmerttumer
Change-Id: I0e2811802f17831097a86103571b505a7557717a Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116040 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116310
2021-05-31Implemented Delete key deletes the table when all the cells are selectedmerttumer
Change-Id: I8a17c73781a3399b214d5655b83036652933a90a Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115689 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116309
2021-05-25weld the sidebar deckCaolán McNamara
Change-Id: Idc6710df7e59bcb5f61fca783e0cc0666cb13a1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112404 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-25remove intermediate containers in sidebarsCaolán McNamara
tested extension sidebars of: a) Wollmux extension sidebars b) Analog Clock Extension demo https://wiki.openoffice.org/wiki/Sidebar_for_Developers#Example:_Analog_Clock_Extension Change-Id: If9729e20526681928137989f01a8ae733a9b0cb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112035 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-25use weld::WaitObjectCaolán McNamara
Change-Id: I726429b1af2b27310153c069b350ee18c7dea47c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112033 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-25replace stock button imagesCaolán McNamara
Change-Id: I9be83856c0dd15552a042f009464c279bf239848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109199 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-25rename get_vscroll_width to get_scroll_thicknessCaolán McNamara
and add split customize_scrollbars to form a separate set_scroll_thickness Change-Id: Ia4b1c85d6ae85b0fb7aeb852d3a91b36b63143db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111207 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-25split WeldEditView::Paint so a subclass can render a specific bgCaolán McNamara
Change-Id: Id502b98c6754db9dd6314c4bd960ca8065a0fa42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107473 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-25restructure WeldEditView for reuse in SwAnnotationWinCaolán McNamara
Change-Id: I9474553e595780fa61bac955d2d5ebf691408ede Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107437 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-16lok: Edit the click selected cell on table selectionmerttumer
for LOK case, it should start editing when table is selected from the cell that is under the cursor instead of selecting the table object. Change-Id: Ibb3fa41377b76edcdcc2be7419838a151ff765fe Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114386 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114646 Tested-by: Jenkins
2021-05-16lok: remove frame action listener when disposingHenry Castro
In order to prevent that the frame action listener holds the object reference count when removed, ensure they are removed when disposing the object. Change-Id: If83574e31230d9c683adaf36af36485650fd2c50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113389 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-05-16Fix Row size change is not updatedmerttumer
Row size is not taken into account when there is a change Only if column size/position changes, it starts updating Change-Id: I99f3aa9fe0e7f3428234062a2520ca8a61984067 Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114130 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114645 Tested-by: Jenkins
2021-05-16Implemented CTRL + A selects all the cellsmerttumer
When the table is selected, ctrl + a should select all the cells unless text editing is enabled. The previous behavior was deselecting the table and marking all the objects. However, for table it should select all the cells instead. Change-Id: I9fb512618a61a96ff21daa74c5a4ae9b31e3906e Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114129 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114644 Tested-by: Jenkins
2021-05-16Fix ESC key selects all the cells of the table objectmerttumer
Selecting the table should not necessarily mean selecting all the cells. If all the cells are selected which ESC key does the same thing, it is impossible to delete the table with the delete key, only after an input following by an ESC deleselects them and deleting becomes possible. Change-Id: I33f182d330f1cbc411d47b86098a4aea544a90ae Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114128 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114643 Tested-by: Jenkins
2021-05-16fix some VirtualDevice leaksNoel Grandin
Change-Id: I645543fa27ca8b75b36ed7798f0af7b81fd09f49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115488 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-10svx: fix crash with active text edit vs slide deleteMiklos Vajna
The problem is that SdrObjEditView::HideSdrPage() may delete SdrPaintView::mpPageView when it calls SdrGlueEditView::HideSdrPage(). But SdrObjEditView::pTextEditPV is a non-owning reference to that. GetTextEditBackgroundColor() in svx/ calls SdrObjEditView::GetTextEditPageView(), so in case SdrObjEditView::pTextEditPV is not cleared, we would access a deleted SdrPageView. (cherry picked from commit 014f33066a99488c52d10d8f5ff470ca6e2242f6) Change-Id: I948bae8e0e8d557e38aa8f243e9eea522b21a043 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115334 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-05-10Fix style previews widget with multiple languagesSzymon Kłos
Broadcast also universal name (English identifier) for styles on change. This allows to select correct style without knowledge about all languages that other users use in other views. Fixes style previews widget in online with multiple sessions in different languages Change-Id: I9b9bcc92d96b5a5482a97a5947f148a638f257d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115093 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115300 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-05-06do not apply line dashing in drawinglayer (tdf#136957)Luboš Luňák
basegfx::utils::applyLineDashing() is not as good as the actual VCL backend dashing, and there are some rounding errors because of all the canvas transformation matrices or whatever, which leads to the drawing problem. So use LineInfo to carry the dashing information. As a part of this change, also make LineInfo use doubles instead of ints. The use of transformation matrices means that the values may be fractional and less than one. Change-Id: Ia5ac7d266cab344b7137052c81fbd96c1ce28003 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114710 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit b71d9a6d15cfb8a50afdea5ac064f40d84c561f8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115038 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-05-05tdf#139500 svx: fix crash on changing table properties during active text editMiklos Vajna
Regression from commit fdeb04f7c59cf8032fe17072ed779e70505cc6ab (tdf#129961 svx: finish UI for table shadow as direct format, 2020-12-15), the problem was that the BegUndo() / EndUndo() pair can be only used if we know that the text edit of a cell of a table shape is not started or ended in-between. The bugreport scenario was an active text edit, where setting attributes on the shape ends the text edit: #9 0x7f6dbb417121 in SdrEditView::EndTextEditAllViews() const /svx/source/svdraw/svdedtv.cxx:1079:20 #10 0x7f6dbb466798 in SdrEditView::SetAttrToMarked(SfxItemSet const&, bool) /svx/source/svdraw/svdedtv1.cxx:1095:9 #11 0x7f6dbc34b0af in sdr::table::SvxTableController::SetAttrToSelectedShape(SfxItemSet const&) /svx/source/table/tablecontroller.cxx:2738:12 Which also means that the underlying edit engine is deleted. But then undo/redo would still reference that edit engine: ==31830==ERROR: AddressSanitizer: heap-use-after-free on address 0x60c0001fc300 at pc 0x7f6dd73a9cb9 bp 0x7fff788db4b0 sp 0x7fff788db4a8 READ of size 8 at 0x60c0001fc300 thread T0 #0 0x7f6dd73a9cb8 in EditUndo::GetComment() const /editeng/source/editeng/editundo.cxx:147:34 Fix the problem by not grouping in case there is an active text edit, that's not something I considered when I added the original grouping. (cherry picked from commit ece86ef173cbc070c76f180d02ac80c65e07fff9) Change-Id: I4f3583e21a27f8380c35b3f4563ce496819bcb81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115142 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-29notebookbar: fix welded controls in onlineSzymon Kłos
Additional parameter was introduced for InterimItemWindow and value for it was missing. Change-Id: I9dad0e4d60205db0c8cabfcf5c98fabc2d8fdefe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114801 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-27tdf#141902 Fix domain in ui files (found with ui-checkdomain.sh)Julien Nabet
Backport to 7-1 to fix a user visible problem Change-Id: I6ec07748616c6ddbe12a48077a777c91ffb8f96f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108046 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114682 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-27tdf#136058: remove some cachingNoel Grandin
if we going to recreate it every time we call this method, there is no point in caching the result. Change-Id: Ie1f7bde86eca5cdd998fa8626303d3dead479ad3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114231 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit b236b36475ed9a204ac931c34ccc23205296a0a6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114508 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-27Revert "tdf#130326 related, speed up drawing"Noel Grandin
This reverts commit 91385bbc7cccfdf59f60a24eaf81894772134af0. Reason for revert: had to be reverted in master because it caused a regression Change-Id: I8ec5e2df4f3b8154fa4dfca8f5bee62f6d731156 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114507 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-04-27tdf#130326 related, speed up drawingNoel Grandin
if we create the list every time we call ViewContact::getViewIndependentPrimitive2DContainer then caching the result is rather worthless. So make the caching worthwhile, which means invalidating it when something changes. Change-Id: I081e9501255ec1c87454bfcc1e0a741109afa99f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113891 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 44711d9eb53eb6247ebdb9293a3eb5e643f78059) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114505
2021-04-27tdf#141419 restore use any explicitly set background color in previewsCaolán McNamara
regression since... commit 6f3899b27156591e65f62649a92c727eb6f5dd03 Date: Thu Oct 29 15:03:44 2020 +0100 Resolves tdf#137059 - Use application colors for font preview but continue to use the doc-color setting when there isn't an explicit bg setting in the input propertyset Change-Id: I531b5ddea7700fcd4a731f32d4830b4d0b767d7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114418 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-21svx: fix crash in DefaultProperties::dumpAsXml()Michael Stahl
mpItemSet can be null Change-Id: I4192f84639116c550bba5303a5fc70528cb3e8c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114263 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 832b23d9376019619929764606276aacde1e329a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114268 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-21Related tdf#139804 Allow activating btn on first clickSamuel Mehrbrodt
Change-Id: I3bcdf8bdd6f25fd30106214f40e72bf1506f6bbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114398 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> (cherry picked from commit 8d633320df3fb58e6e9ac12dcf9983ad5d5db75e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114416 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-21Resolves: tdf#141765 set 'color' GtkToolbar to small-button sizeCaolán McNamara
so its height is as small as possible so it won't force the surrounding toolbar's height to stretch to fit it in Change-Id: Ibfbcfb551cdd82df05faf382d8cb8fcaa142ec14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114415 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-21cid#1474166 Deference null return valueCaolán McNamara
Change-Id: I725eff105f963b139ae8646cd1cb193ce737d313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112760 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 229558c0bf257e4e559cc1b84bd2918b04c68305) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114365 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-04-21tdf#131634 Don't redo actions created before text edit begins.Mark Hung
In SdrObjEditView::SdrEndTextEdit(), pSdrUndoManager->Redo() was invoked until all the redo actions created after text edit began were converted to undo actions. Without checking, all the redo actions include the ones created before text edit began were moved to undo stack, and caused the SdrTextObj to be destroyed in SdrUndoManager::SetEndTextEditHdl when removing the undo actions and a use after release problem. The patch add GetRedoActionCountBeforeTextEdit() so the program won't invoke pSdrUndoManager->Redo() on actions created before text edit begin. Change-Id: Ic010bc6e71ee78ef2cb20a5259dc9d6d6579ccaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114102 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com> (cherry picked from commit 7a641c71f8191e83bb6c408d3ff51a58d7dd4af9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114360 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-21tdf#86321: Revert "Resolves: #i123539# some optimizations for 3D chart..."Xisco Fauli
This reverts commit db1d2af02861b49e4f53d726d59cd71c20cee9b1 The commit was already partically reverted in bca8d8985666d3fd22b91eb280f9baaeb933c2d0 < Resolves: tdf#90583 3D pie-chart missing guide handles >. This partial revert broke the optimization introduced in db1d2af02861b49e4f53d726d59cd71c20cee9b1 <Resolves: #i123539# some optimizations for 3D chart...> for 3D charts like https://bz.apache.org/ooo/attachment.cgi?id=81810 Later, 3D charts were optimized again in 55a7e836a2db662a53adc4f8b98d08b06790c758 < chart2: When creating objects prevent setting object rects dirty > so the remaining code originally introduced can go. Import time of https://bz.apache.org/ooo/attachment.cgi?id=81810 is the same with and without this patch Change-Id: I25338d0dfb4b41651dfe05e7bfbd74c86091dacb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114313 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit eec03e848cb6874ce6d64dc0b8f45dbaf52e6c2b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114277 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-21a11y tests show we should use GetOutputDevice for pixel/logic conversionsCaolán McNamara
Change-Id: I229ffb376b03ff2479385632319661dd35a63fea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114188 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-04-21Destroy properly FontworkPropertyPanelSzymon Kłos
Change-Id: Ie320bd1a37ab352e9fc981cb87c8dc56cf659081 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114405 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-20Add missing popover for fontwork properties popup controllersSzymon Kłos
Change-Id: I293a88a681b55e123c45edc9c3034b73417d7af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113418 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-20fontwork: add sidebar panelSzymon Kłos
Change-Id: I092e40c17dd814d0b18f06aea01d7afa29cbad2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110024 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112275 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-20lok: Pass object ord num in the uno commandmerttumer
When multiple objects' glue points collide the ordnum will be used to decide which glue point to connect to for the connectors. Without that the default logic chooses the lowest ordered object which is searched and found in the object list Change-Id: I64579d28bbe6cbd92bab745838fe2995585b6a3f Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113517 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114032 Tested-by: Jenkins
2021-04-20Improve dumpGluePointsAsJSONmerttumer
added gridoffset for the shape for calc changed the logic, now the ordnum would be enough Change-Id: Iebe7d29c569a4cb968fe2e5ef1692b59f0c4b2d8 Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114031 Tested-by: Jenkins
2021-04-20Get Glue Points in the selection callbackmerttumer
Change-Id: I0d038517710c68f80f8e35b8ebebd34f264434f3 Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112324 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114030 Tested-by: Jenkins