summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)AuthorFilesLines
2021-05-12fix some VirtualDevice leaksNoel Grandin1-1/+1
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-06do not apply line dashing in drawinglayer (tdf#136957)Luboš Luňák1-6/+6
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 Vajna1-1/+1
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/+/114929 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-27tdf#141902 Fix domain in ui files (found with ui-checkdomain.sh)Julien Nabet1-1/+1
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-23tdf#136058: remove some cachingNoel Grandin1-13/+2
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-23Revert "tdf#130326 related, speed up drawing"Noel Grandin1-17/+13
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-23tdf#130326 related, speed up drawingNoel Grandin1-13/+17
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-22tdf#141419 restore use any explicitly set background color in previewsCaolán McNamara1-0/+10
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 Stahl1-1/+4
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 Mehrbrodt1-0/+1
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 McNamara1-0/+3
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 McNamara1-16/+18
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 Hung2-1/+5
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-20tdf#86321: Revert "Resolves: #i123539# some optimizations for 3D chart..."Xisco Fauli3-67/+25
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-19a11y tests show we should use GetOutputDevice for pixel/logic conversionsCaolán McNamara1-44/+28
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-10Resolves: tdf#139075 diagonal focus rects contain focus rects of old sizeCaolán McNamara1-0/+3
since... commit 356f6c5d89dd4dd92b2351898e07f99b96cb34cc Date: Tue Jan 15 08:55:00 2013 +0000 teach FrameSelector to be resizable Change-Id: I5ac4d1d12f60086349e7dbb3b78d29977f22c226 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113856 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-06tdf#141297 : remove link to the fileArnaud Versini1-0/+4
Change-Id: I5c14f46f5fbd51d95eeb58ea0a6d3aa39afef3cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113597 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 7289b9a90f5f8349875856c552330d512004925e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113642 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-06Revert "tdf#141127 Use ODF default values for draw:extrusion-skew"Regina Henschel2-18/+0
This reverts commit 2bf8c1e0e211601a70b6b28fdb92f636c7969513. Reason for revert: tdf#141268 LibreOffice uses -135deg skew angle as internal default. If a user does not touch the direction, the value is not written to file, although that would be necessary because it is not ODF default. With the patch applied the missing value will be interpreted as 45deg on opening. So the first step is, to write -135deg to file. And then after some time, when wrong files are unlikely, the patch can be applied. A suggestion for writing -135deg is from Julien Nabet in https://gerrit.libreoffice.org/c/core/+/113257. From code it looks good to me, but I have not tested it yet. I would only add some comments to explain the situation. Change-Id: I71673ad2e5376c2a78fa74900e95117b8543e268 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113538 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit f1b55d3f8e963069fc798bcf559ae9af2bf18b64) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113636 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-03-23tdf#141127 Use ODF default values for draw:extrusion-skewRegina Henschel2-0/+18
The default value for extrusion skew angle is 45 in ODF and -135 in binary MS Office. LO had used -135 in case the draw:extrusion-skew attribute was missing on import. This could be fixed in GetSkew() in EnhancedCustomShape3d.cxx#92. But that would break import of ppt files. So I have decided not to search, were the binary import would need to be tweaked, but I set the default values directly in file open in case the attribute is missing. Change-Id: Ieeffa64099fdbdbe0ba9d4dab7ed2f19d397a6e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112819 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 2bf8c1e0e211601a70b6b28fdb92f636c7969513) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112809 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-17tdf#141021 Correct sign in Origin in Extrusion NorthRegina Henschel4-1/+39
This is about customs shapes in 3D mode using direction floater. Shapes, which were created with older versions, keep their values until the direction is newly assigned. So the change will not automatically change existing documents. Change-Id: Ib1ce511de0f524bf59279fb4e976f66ed65bc080 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112474 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit fa8d00560bbfededec7f2c328f04eb2b369c00e2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112617 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-03-17tdf#136956 reorder undo actions in removeColumnsMark Hung1-26/+35
and removeRows. Inside the removeColumns and removeRows, undo actions are added first, and then cell spans are updated to reflect the removed columns or rows. Once undo the cell spans they become immediately invalid because the rows or columns are already removed, hence cause Impress to crash. Change-Id: I9d8641bdad43026eca03cbeaaa3a5907b516304f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112355 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com> (cherry picked from commit f3f7cc53efda828af8897fa45fa2a8f18cf3b48b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112526 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-16tdf#139804 Focus form controls inside document with Alt-<Mnemonic>Samuel Mehrbrodt1-0/+28
Change-Id: I710a23a53ca0eb256a477a78ce1b7ae01129f717 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111865 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> (cherry picked from commit 67ad205404211a2ae17c430a17ede6e9d04d0b7e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112431 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-03-01tdf#132368 svx: empty the interop grab-bag on ending text editMiklos Vajna3-0/+76
Regression from commit aafaf1f55fa413ad49d4556cf7c0a713dd206ae4 (PPTX export: save SmartArt as diagram instead of group of shapes, 2019-03-13), the idea of interop grab-bag was to carry additional information around as long as the object is not changed. However, actual clearing of the grab-bag was never implemented, do this when editing shape text. An alternative would be to do this in SdrObject::SetChanged(), but Writer sets the layer of SdrObjects during layout (when the import filter is already finished and undo is enabled), so that would mean loss of the smartart metadata for DOCX. Change-Id: I9ab205b4ef84169f4b5a16b86fe9a152e3370a6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111560 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111595
2021-02-17tdf#140387 grab focus to first panel widget on panel gaining focusCaolán McNamara12-3/+24
otherwise focus is getting lost in these currently mixed vcl+gtk widget panels. Change-Id: I6488ddfc98afdedb55bb3217f3877e96258dd65a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110956 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-02-16tdf#139511 Correct calculation of minimum row height during resize.Gülşah Köse1-1/+1
Change-Id: Id47b5877d56850c80395897a83daae8e24f5c099 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110662 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110974
2021-02-16svx: fix import of multiple paragraphs into title shapesMiklos Vajna2-12/+33
Title shapes try hard to have a single paragraph only, the Impress UI inserts linebreaks instead of paragraphs breaks in sd::FuText::KeyInput(), ever since commit f47a9d9db3d06927380bb79b04bb6d4721a92d2b (initial import, 2000-09-18). This matches the PowerPoint behavior. This is most visible when the paragraph has a bullet associated with it. Interestingly you can still put multiple paragraphs into title shapes using paste special -> plain text. In that case, it was inconsistent that we exported these multiple paragraphs to ODP, but merged them to a single paragraph on import since commit 0a783c1a041e2b74b7bf238d11ee2c303f6708f4 (#100190# don't allow more then one paragraph on title text objects, 2002-06-25). This results in loosing your bullets on save + open, both in the ODP and PPTX cases, since removeActionLock() on the XShape triggers this tweak. Also, PowerPoint does not do this merging on import. So fix the problem by removing the import-time tweak but leave the UI unchanged. (cherry picked from commit 043690eff82d5798774452a8364e1566b866a320) Change-Id: I6796f83c40e83f65cfb0f6c7e66069c3e08c1e2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110900 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-13tdf#140274 set an initial minimum sizeCaolán McNamara1-0/+1
Change-Id: I93f0ac3d63b4864a0a5d98370407f9444b58b75c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110687 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-31tdf#140013 change icon for list view in Remote Files dialogRizal Muttaqin1-1/+1
Change-Id: Ia91e17e6afeac56f5f770cee030ed63db6605529 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110191 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2021-01-27tdf#138590 use the highlighted menu entry, not the combobox active textCaolán McNamara1-1/+9
Change-Id: I2fb68c1491d129d5fd9b963ae4db1fb83171a154 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109981 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-26tdf#135550 ListBox should triger an event when changed non-interactivelyCaolán McNamara2-10/+20
not just when changed by the user Change-Id: If2238341ff8465fee6375dad1ea9b4d7ec0110e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109800 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-26tdf#139590 Drag and drop doesn't work in SdrObjEditViewCaolán McNamara1-0/+7
Change-Id: Id8deeee0c1a919f330bc6623f708453279a214c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109793 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-25similar to tdf#139774 for a combobox sx10601 is probably a better choiceCaolán McNamara1-1/+1
see extensions/inc/bitmaps.hlst and framework/inc/bitmaps.hlst for the two similar cases which use sx10601 too Change-Id: If44c0dcdbabc83cf35e9c1320c20aac9fdb68523 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109844 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 53486257c0a3aaf5559d5f336db2e4245a33277f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109807 Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2021-01-20Resolves: tdf#135617 grab focus to widget matching the line spacing stateCaolán McNamara1-1/+18
instead of leaving it at the first widget in the popup Change-Id: I0bc4c72f7972e339cd28cd6368a4784cdb11275f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109578 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-15tdf#138848 add truncate-multiline to all GtkEntries and GtkSpinButtonsCaolán McNamara50-74/+198
except for extensions/uiconfig/spropctrlr/ui/multiline.ui Change-Id: Ia2eca14332ffd4ac6e277c7529f17eca3ba29c0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109311 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-14tdf#139567 set no-show-all to TrueCaolán McNamara1-0/+2
so changing child vis to false before parent is shown 'sticks' as a final visibility of false Change-Id: Ieee4e4c7f7bddf6204c61ca788d316d52ef5a6dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109247 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-14tdf#137083 consider negative width in DrawPageViewGridRegina Henschel1-4/+14
SdrPageView::DrawPageViewGrid is called too for a ScDrawPage of a RTL-sheet. In that case both the width of the SdrPage and the left edge of the passed rectangle are negative. The x-values for drawing the grid were wrong and a right-to-left sheet did not show the grid. The patch adds a case distinction with correct x-values for case RTL. Change-Id: I6d0c15bf7bbe8aff6ab2e72a440ba81f2e0e2281 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108989 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 7635a475130a0e9e3b0dded853348659d07a00d7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109119 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-14tdf#83618 Make line spacing values agree crash fixJim Raykowski1-1/+1
The intent of this patch is to fix the crash reported at https:// bugzilla.redhat.com/show_bug.cgi?id=1913828 by reverting changes made to cui/source/tabpages/paragraph.cxx in commit 849b837d1a3b185a8dd893a8f6eaed53605bcab1 and changing the change made to svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx to use the already available pointer to the current SfxViewFrame instead of calling the SfxViewFrame::Current function again. Change-Id: I0c440c576c2afe4fb98ed54d51d91ea16a7f902a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109113 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-12rhbz#1913070 null derefCaolán McNamara1-18/+22
its plausible that SfxViewFrame::Current() has returned null, use pSh->GetDispatcher() instead protected by null check against pSh Change-Id: Ibefdcabea09cb3a1a411678585af33a99f8a1c61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109003 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-07tdf#134288 svx: fix rendering of text on a zero-width shapeMiklos Vajna3-13/+66
We have conflicting requirements here: on one hand, the shape is zero width, so the text area is also zero. On the other hand, we put some text on the shape, which should be visible. The result was that the left/right text margin (2x250 mm100) was counted as part of the text area, so we put a few (but not 1) characters / line for zero width. Fix this to be PowerPoint-compatible: as the width decreases, we break the text up to more and more lines, but if the width is 0, then we don't break it up at all. An alternative would be to do this later in SdrTextObj::impDecomposeBlockTextPrimitive(), but there we no longer know the width is really 0, because the text margins and some small increase (+1 to be an inclusive range, +1 to have a non-zero scale) is already added to the original width. (cherry picked from commit 65e2ef43f186164729e1cc071b805bc1a7125cfe) Conflicts: svx/qa/unit/sdr.cxx Change-Id: Ieaa3e726bc5d37983b6221452e14f01db315f790 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108872 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-12-17tdf#129961 svx: finish UI for table shadow as direct formatMiklos Vajna4-1/+97
Normally properties on an SdrObject is set using SetAttributes(), but that would take the selection controller into account, so we would call SvxTableController::SetAttributes(), which sets the item set on the selected cells instead. So use SetAttrToMarked() instead, which works on the shape's item set, even in the table case. Don't replace all existing items because we only have shadow properties here and also a disabled shadow is still a (set) SdrOnOffItem (with value=false), so no old SdrOnOffItem will be forgotten in the shape's item set. Also add an outer undo grouping, so once the user presses OK in the table properties dialog, we only create a single user-visible undo action, not two. (cherry picked from commit fdeb04f7c59cf8032fe17072ed779e70505cc6ab) Change-Id: I77b55ba1f07b8d0eeac5070e0ec07d39573d1f9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107864 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-12-17tdf#138945 update fObjectRotation for NbcResizeRegina Henschel3-0/+106
SdrObjCustomShape::NbcResize uses the inherited SdrTextObj::NbcResize. But a SdrTextObj does not know fObjectRotation. Explicit update to new rotation angle after resize is needed. The error became visible, if you changed width or height of a rotated or sheared custom shape in the Position&Size dialog. Then the shape handles were not on the shape outline. Change-Id: Idbe47a3b1ef2b34e9645d62830cb330f2e49bd3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107792 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit d4ca360f6632f03e9fb7e9af37aac40d23f1249a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107803 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-12-17tdf#129961 cui: start UI for table shadow as direct formatMiklos Vajna1-0/+12
It reads from the doc model and shows it, but doesn't write it back yet. (cherry picked from commit 74ba28fe238b7f15d1fb7d119e4cef3a7b544e0b) Change-Id: I6611229e71d0a49f09576ca452b901958c33db58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107863 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-12-11tdf#129961 svx: add rendering for table shadow as direct formatMiklos Vajna4-5/+81
There was already shadow support in ViewContactOfTableObj::createViewIndependentPrimitive2DSequence(), but the UNO API and UI could only set the shadow properties on a shape style, so shadow-as-direct-format is new. One difference between the PowerPoint shadow and our shadow is that we draw shadow for table text as well, while PowerPoint only does it for the borders / cell fill style. This means we're either backwards-compatible or compatible with PowerPoint. Solve this problem by leaving the style case unchanged, but render direct formatting like PowerPoint. (cherry picked from commit a75bf43a8d6c5dec6dcc86908c142ceec541aa8c) Change-Id: I2bc64fea8062f9d8162b95d1eaccb49c3466b5c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107565 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-12-11tdf#129961 svx: add UNO API for table shadow as direct formatMiklos Vajna2-0/+27
Adding it via a style was working already. (cherry picked from commit 55d4c6cfe5bd9b737698c6cd1f28ee8234abb5d0) Change-Id: I122c359716a404159d3521d63d44ef8bfe35c214 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107564 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-12-11tdf#129961 svx: add doc model xml dump for shadow-related pool itemsMiklos Vajna2-0/+70
It seems that sdr::table::SdrTableObj is already capable of storing shadow properties, but this is not easy to inspect, extend the xml dumper to improve the situation. Change-Id: Ideef43dfd6b844e0227632ec2cb6ab5d16171d8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106902 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit a7505356872f981c951b2ec64383a95538890876) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107563
2020-12-10Resolves: tdf#138789 disable widgets on 'none' when status changesCaolán McNamara2-12/+15
instead of when chage is dispatched, the chart case has its own dispatcher that disables the base class one. This fixes the reported problem, and the related problem of updating when moving focus from one line that has style 'none' to one that doesn't, and vice-versa, where no change is dispached on received on context change Change-Id: I6afb396e75ba93c13fcae71c52618cfce7f9cecb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107525 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-10Resolves tdf#138127 - Use document color for border widgetHeiko Tietze1-4/+6
Change-Id: I57fdbd37c23f3bd2c20ac04ef598cd8a182aac6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105577 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> (cherry picked from commit 6f7d1aaa8c375e6b7a9b80d1ae57efc176c6430f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107388 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-02Partially resolve: tdf#113286 Add https:// to URL in Crash ReportSeth Chaiklin1-2/+2
Also: "Don't" --> "Do Not" in another button label Change-Id: I320a2f3fbe1ad1d2ac3efff94c0195be15335a17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107018 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> (cherry picked from commit ea9863c0104bfa74e7542f850768c2c0ee63a577) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107026 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-12-02Resolves: tdf#138549 use GetSpecialTextBoxShadow to identify ScPostItCaolán McNamara1-2/+5
instead of a 'special' name which causes undo-related causes side effects Change-Id: Id36b0b5360ddde3469721a7c837fe3942af08209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106924 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 9c94bae963ef5019f6ca0394d076b1288969aa53) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107024 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-11-30tdf#138307 Chart import: fix lost custom shape textBalazs Varga2-5/+6
Do not set empty text to SdrOutliner, if it is already set. Note: Also fix the missing custom shape problem in tdf#72776 and tdf#93641. The wrong position (X:0, Y:0) of these shapes is another problem. Regression from commit 6f62a5c4ee2c1b7654c7fcaa618fb495e0d32f0a (tdf#128985: ODP: Style text directions revert to RTL on save and re-open) Change-Id: I07d8cb12836daf15db347f6bb19c17ed9373189e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104909 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106853 Tested-by: Jenkins