summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)AuthorFilesLines
2023-05-22put floating frames under managed links controlCaolán McNamara3-21/+111
like we do for sections and ole objects that link to their content individual commits in trunk are: extract a OCommonEmbeddedObject::SetInplaceActiveState for reuse no behaviour change intended Change-Id: Ia1d12aa5c9afdc1347f6d4364bc6a0b7f41ee168 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150341 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 183e34a3f8c429c0698951e24c17844e416a3825) use parent window as dialog parent it makes no odds, but is more convenient for upcoming modification Change-Id: Ibc5333b137d2da089b3b701ff615c6ddf43063d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150342 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit f93edf343658abd489bde3639d2ffaefd50c0f99) adjust IFrameObject so it could reuse mxFrame for a reload of content Change-Id: I7eec3132a23faafd9a2878215a0a117a67bc9bf2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150343 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 3a727d26fd9eb6fa140bc3f5cadf3db079d42206) query getUserAllowsLinkUpdate for the case of content in a floating frame similarly to how it works for the more common "normal" embedded objects Change-Id: I83e38dfa2f84907c2de9680e91f779d34864a9ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149971 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 52aa46468531918eabfa2031dedf50377ae72cf7) add a route to get writer Floating Frame links under 'manage links' Change-Id: If90ff71d6a96342574799312f764badaf97980eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150349 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 8b8a2844addbd262befb1a2d193dfb590dfa20be) allow SvxOle2Shape::resetModifiedState to survive having no SdrObject Change-Id: Iea059262c124e3f44249e49b4189732310d28156 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150538 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 02379929bd0e1d1676635f0ca1920422702ebb7c) create the FloatingFrameShape in a separate step to inserting it this is derived from the path taken by the AddShape(const OUString&) function for this case. No change in behavior is intended. Change-Id: Id09ae0c65a55a37743ad7c184070fb8dd97d8a7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit bafec47847a0b9697b3bbe9358e53f8118af3024) add a route to get calc Floating Frame links under 'manage links' much harder than writer because the organization and ordering of properties and object activation etc is different. This ended up ugly, but functions. We set FrameURL before AddShape, we have to do it again later because it gets cleared when the SdrOle2Obj is attached to the XShape. But we want FrameURL to exist when AddShape triggers SetPersistName which itself triggers SdrOle2Obj::CheckFileLink_Impl and at that point we want to know what URL will end up being used. So bodge this by setting FrameURL to the temp pre-SdrOle2Obj attached properties and we can smuggle it eventually into SdrOle2Obj::SetPersistName at the right point after PersistName is set but before SdrOle2Obj::CheckFileLink_Impl is called in order to inform the link manager that this is an IFrame that links to a URL Change-Id: I67fc199fef9e67fa12ca7873f0fe12137aa16d8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150539 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 07179a5a5bd00f34acfa8a3f260dd834ae003c63) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150755 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152118 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-05-09Change text auto-fit alg. to also increase the scalingTomaž Vajngerl1-2/+18
When in edit mode, the text can be deleted, so the text box size can become smaller, but the auto-fit algorithm didn't take into account. In this case we already have the font and spacing scaling already set to a specific value and we need to find a scaling value where the margin is the smallest. This change also adds a test for the issue. Change-Id: I6c52f06dfbf5a1e582f7b31aceabf4736498ee90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151412 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 6c042848b688f64b3c56d65dd9dc5fe85412660a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151446 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-05-01Prevent to get 0 font size in the auto-fitting algorithmTomaž Vajngerl1-0/+3
When the text box is empty, the size of the box can be returned as (0,0) so the auto-fitting algorithm will calculate the scaling to 0%, which means the text is shrinked to very small size or is invisible. This change fixes the issue so that if the size is (0,0) we just return and leave the scaling at 100%. Change-Id: Ie359461f23a1f7a496eb03b5670f588ad48bbf49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151178 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit fd99725abdeea92e8cd46bb3e8e6fdcad8180e8a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151180 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-04-19tdf#154501 - Fileopen PPTX: Table with rotated text wrongNoel Grandin1-18/+18
regression from commit eec42f0dbcc79a4c9f456ce97fa1066b8031ea28 Author: Noel Grandin <noelgrandin@gmail.com> Date: Sun Aug 15 17:35:58 2021 +0200 pass OutlinerParaObject around by value where some of code I converted needed to be mutating the OutlinerParaObject that something else held, rather than mutating a local copy. Change-Id: Ib91dddb3fc0d4190868f9fd59becb0d366af5e19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150376 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit ad97694737c99889bc0eb21efccb83768d510361) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150555 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-19oox: tcPr vert roundtrip, introduce interopability grab bag for table cellSarper Akdemir3-0/+27
To properly roundtrip all possible values of <a:tcPr vert="..."> + Introduce grab bag for table cell + on import: Store the unsupported values in the grab bag: + (e.g. wordArtVert, mongolianVert, wordArtVertRtl) + on export: if nothing is being exported from the doc model, export the value from the grabbag Also adds a unit test covering this behavior. Change-Id: I791ed2d992b0a554ef6da37200f027cffd8c5f2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149737 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150521 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-12pptx import/export: consider TextClipVerticalOverflow for vertOverflowSarper Akdemir2-0/+45
Also adds a unit test that tests TextClipVerticalOverflow on 4 different scenarios. Change-Id: I6232935765641c796046d90fe2207d67ae4b3eb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150107 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150237 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-04-12editeng, svx: introduce ability to clip vertical text overflowSarper Akdemir2-5/+10
Introduces editeng text property TextClipVerticalOverflow. Which when set causes vertical text that is overflown out of a frame/shape truncated. (Only when text isn't being edited) This is implemented as two steps: (if text overflows) 1 - Vertical adjust is forced to top. (Forcing vert adjust to top isn't the desired behavior normally, but good enough for a first cut I'd say.) -> The desired behavior would be after the overflown text is truncated, doing a vertical adjust (of center/bottom/top) on that piece of text. 2 - ClipRange is set to the height of the frame/shape. This appears to work with different text directions too (vertical etc.). Change-Id: I697715a7d28bde94a6650609b16505ffab92173f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150106 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150236 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-04-07tdf#90407 Change the auto-fit alg. to match better with OOXMLTomaž Vajngerl4-18/+132
The auto-fit algorithm has been tweaked to be more in-line with the expectations of OOXML. This means a couple of changes to what properties are scaled by the algorithm have been made: - most properties that influence the X axis position or size (for example indent) are not scaled down or changed by scaling. - properties that influence y axis position and size are scaled by a separate parameter (like in the OOXML). This is used in the auto-fit algorithm in a different way. - if line spacing is proportional, it is now scaled with the spacing parameter. Fixed line spacing doesn't get scaled. - the main scaling X,Y parameter only scales the fonts. - trying hard to scale the fonts to the nearest pt (point) value With this change the scaling is much more stable than it was before - for example it doesn't matter what the unscaled font size is, when it is scaled down to the text box size, it (should) always look the same (for example scaling from 32pt -> 10pt or 64pt -> 10pt or even 999pt -> 10pt). The algorithm is also rewritten to be better at finding a fit and is also better at find a good fit, but it can take more iterations by doing so (there are ways to improve it however). Previous algorithm used a linear search to converge to the best fit in less iterations, but the issue with that was that it could in some cases miss a solution (especially since change to floating point scaling parameter). The new algorithm now uses a binary search - always trying the middle of the search space. OOXML export and import was also changed to take advantage of the font scaling and spacing scaling parameters. The additional scaling at export that was needed to have consistent OOXML support was removed. Change-Id: I8f3bb8d43a01931f18bd7ffdf8e0ba40caa73d8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149207 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149934 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-04-07optimize text fitting algorithm to correctly calculate the fitTomaž Vajngerl1-8/+7
As we converted the chart stretching variable from int to double this can cause the text fitting algorithm to calculate the fit wrong. This commit changes the text fitting algorithm a bit so that it produces similar result as before the change. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142186 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Change-Id: Idac1da3624799b6950ed356e9c76fc4f037f900e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149932 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-07fix rendering of text when "fit to frame" is enabledTomaž Vajngerl2-40/+72
This changes the nStretchX and nStretchY from sal_uInt16 to double so the text in text boxes is rendered correctly (text should be resized to the same size as the textbox). Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142064 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Change-Id: Ifdf2481ddbaac0e9cf62a6ddf8a83984be134855 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149931 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2023-02-14lok: draw textboxes under editSzymon Kłos1-1/+1
This fixes bug in impress: - open in 2 views - start editing textbox in 2. view on 2. slide - start editing textbox in 1. view on 1. slide Result: slide 2 textbox was dissapearing We need to allow drawing textboxes edited by other views so if we select non-editor for rendering we will see the full content. It was regression from commit e496b55a592caf0ca07f5477285a72d50cee6501 lok: masterpage: don't render text edits from different mode Change-Id: I7645496aec77d11d16621129dd6644d3b54a6010 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146999 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
2023-02-14lok: only publish MEDIA_SHAPE to selecting viewAshod Nakashian2-33/+21
We now publish the url for the media shape in the LOK_CALLBACK_GRAPHIC_SELECTION message. This has many advantages, most notably that it only sends the URL to the view selecting the media. Also, it is now easier to handle the message as there is no need for both a LOK_CALLBACK_GRAPHIC_SELECTION and a LOK_CALLBACK_MEDIA_SHAPE. However, the latter is still defined as we might still use it at some point. Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> Change-Id: I8d4b8794d8e590628630f2b0bfbfb5debe02515f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146848 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-02-14tdf#148818 Fix missing text in boxes with empty first paragraphHossein1-4/+5
Text was lost from the text boxes with empty first paragraph. The problem was happening when there was 2 paragraphs in a text box, in which the first paragraph was completely empty. The regression was introduced in cf2449aac0141711a7610d67f7c50cd108e12443 because of the bad handling of the paragraphs, and only looking at the size of the text of the first paragraph. This is fixed by looking at mpOutliner->GetEditEngine().GetTextLen(i) for all i=1..k where k=min(2,mpOutliner->GetParagraphCount()). I have negated the condition to provide a better explanation of what the condition should be. Change-Id: Id5d8787df5111c734760afdd98a6fbe832047f32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133527 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org> (cherry picked from commit 759792e40aceb17a621c37ed725d1e998acbd30d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146390 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2023-02-07lok: form controls: rendering and mouse event forwardingMarco Cecchetti2-1/+8
What we got - Most controls rendered on Writer and Impress (on Calc already implemented by Tomaž Vajngerl) - Text labels rendered correctly - Mouse events forwarded to controls - Control state changed on click for Writer and Calc - Control invalidation for all apps - Fixed broken LOK_CALLBACK_MOUSE_POINTER msg - Correct pointer style when mouse is hovering over a control Need to be improved - in impress click method for a control is not executed even if the mouse event is forwarded correctly - avoid not needed control invalidations (as the one occurring on document autosaving) Change-Id: I4d5012af7f90a2c726b6b6b5b068e2be1ed5568a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146569 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-02-06tdf#150102 Correct PrefSize for UNO API Metafile exporterArmin Le Grand (allotropia)1-3/+9
Checked that in aBound is indeed the size - 1 (probably due to old integer stuff using Size()/Rectangle() and getWidth()/GetWidth() with the old one-less paradigm somewhere), so just correct to the correct size. Be aware that checking of tdf#126319 is needed, but looks good in my tests. Still: Changing the central UNO API Metafile export is always a risky thing, so it will have to show if this will not influence something else. Adapted a unit test to take into account that the exported object as PNG no longer has an empty column at the right and lo longer an empty row at the bottom. That test testTdf126319 uses now the same test-indexing as the test testTdf105998 already used. This shows a more correct PNG conversion, it was curious anyways that two identical exports of objects with a light-red border from dfferent apps had that difference at all. Change-Id: I8513688dc062025c5d931b75602f4fdbd924a32a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139596 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> (cherry picked from commit 392b2cd4889cf944ed47b3473c6dd2cc1f89e7e7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146561 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2023-01-24tdf#151060 sw PDF export: don't paint off-page part of drawing objectMiklos Vajna3-1/+38
Reported to be a regression from c12358166a9bd88fe10feabca45a6ad3f65dff8e (DOCX import: fix lost objects anchored to an empty linked header, 2020-01-10), the 3rd page of the PDF export result contains an unexpected line shape. This was "working" before as all objects anchored to the empty header were lost. Fix the problem by clipping the rendering to the page frame when handling shapes, similar to what 689cead9e0837dc932e3a4cd765f7d319b529018 (tdf#91260 svx, sw: don't paint off-page part of drawing object, 2016-12-06) did to fix the normal rendering of the document. The testcase document just has 2 pages, so there the unexpected shape was on the 2nd page. Change-Id: Ica24cd15717a1ee97dff448d385a10536671103e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141167 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit bab44a97d21d0ac8a8a06678e71024c1a830943f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141180 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 475e698826e2103bdc78ac286e1fc8970363638e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146050 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-01-23Hide fill attribute widget if fill style is noneGülşah Köse1-5/+3
When fill style is none we can not use fill attribute element. So It is better to hide. Change-Id: I88d5e49448040b3afa18fbf66377d254716e7415 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145817 Tested-by: Jenkins Tested-by: Pedro Silva <pedro.silva@collabora.com> Reviewed-by: Pedro Silva <pedro.silva@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145876 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2023-01-18ThemeDialog added which allows to change the theme used by the doc.Tomaž Vajngerl5-0/+210
ThemeDialog is a common dialog that can be used to select the theme used by the document. Currently it only implements colors but in the future also the fonts and formats (for shapes) will be adde. The IThemeColorChanger interface is used by the dialog to change the actual color values inside the document. For the writer the existing ThemeColorChanger is now implementing the interface. The dialog is accessible in Writer at Format -> Theme... in the main menu. Change-Id: I23c7dc9668cdc5427f36d604a76c433d6dbef497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145264 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit d4e4a2b96a787b4f99d68d7a417c37c97b47c170) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145695 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-18sw: rework ThemePanel, theme color ValueSet drawing as custom drawTomaž Vajngerl2-0/+99
Rework the ThemePanel to only work with theme colors, as fonts are uing an old mock implemntation of themes. To do this properly it is needed to remove the implementation for now. The theme colors entries were rendered as a bitmap and then shown in the ValueSet. This has the problem that it doesn't look sharp on a HiDPI screen, so replace that with a ThemeColorValueSet, which uses custom draw to render the theme color entries directly. The ThemeColorValueSet was added to th svx component as it will be used in other components as well. Change-Id: I1a727ef4cf4be4e215db57ac33f571f43aaddc15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145087 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 8bc22ed6899bcbafc3020f0af6c939019506a5fd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145693 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-18svx: add UX defined theme color setsTomaž Vajngerl1-2/+98
Change-Id: I82cbe16fcfaa8367dacda7ff977e18b0ed39ec2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145086 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 2ec4a66b6d049f5d11f4ceb993ed907c790ed592) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145692 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-18svx: add resolveColor that resolves the color for input themeTomaž Vajngerl1-4/+24
resolveColor added to ColorSet resolves the color for the input ThemeColor, which contains the index for the color in the ColorSet and applies all the additional tranformations defined in the ThemeColor. Change-Id: I5c6d53d5e1d2c61bdb22b0e58c034ec91fbeb2d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145085 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 4d17d06279d3bceee8d4b92f444b5e425412c576) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145653 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-18svx: change ColorSet add method to use ThemeColorTyp enumTomaž Vajngerl1-73/+36
Change-Id: I2034a7e915d41c6b55c8344d44be4f6a60e8287e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145072 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 0b35b239c0ff1adad2c4544d8692b5b13a0d363b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145652
2023-01-18support theme color for lines + oox support + testsTomaž Vajngerl3-8/+58
Extended XLineColor to handle model::ThemeColor which then maps to the newly added LineColorThemeData property. Extended oox import and export to map the scheme color elements to and from ThemeColor. Added a new test to check the theme line color in impress shapes. Change-Id: I23ecc18c88b5b47608c9110f5681f189d02e2f36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145071 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit af8fdba1194e657237f9abc460381a1c4bc49982) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145651 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-17introduce {Char,Fill}ColorThemeReference which uses XThemeColorTomaž Vajngerl8-77/+109
Adds a unified UNO property for theme colors *ColorTheme (CharColorTheme and FillColorTheme) which uses XThemeColor, that replaces the properties *Theme, *TintOrShade, *LumOff, *LumMod. The properties are still present for backwards compatibility and to keep ODF support working in tests as that needs a bigger change. Reactor the code and tests to accomodate for this change. Change-Id: If7983decb4ba528b49fe7b5968aa9efc696a9efc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144783 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 197e5f81213d14fdcbff40edf73385ecd4cd9815) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145553 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-16introduce docmodel comp., model::ThemeColor, use it in SvxColorItemTomaž Vajngerl9-31/+100
Added a new component docmodel, that has the document model types, which only depend on other basic components. This is needed so the types can be used in every relevant component - xmloff, oox, svx, editeng,... Introduces model::ThemeColor, which is a class used to store the theme color data, including transformations (svx::Transformation). For UNO use XThemeColor is added, and the implementation UnoThemeColor which wraps svx::ThemeColor, so it can be tranported around. Reactor all the code and tests to accomodate for this change. Change-Id: I7ce6752cdfaf5e4d3b8e4d90314afa469dd65cfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144847 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit bd0f526f2d3e1ffe43a74672485815768eee6e9e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145528 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-16sw: add the ColorSet from SdrPage into ColorSets in ThemePanelTomaž Vajngerl1-0/+5
Change-Id: I7c4ef103b2be65a8adbad5d4f00304ee22be668f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143997 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 7c10e3b120ba75a2db75342fdc68040a179404b8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145399 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-15oox: add support for importing font scheme into a svx::ThemeTomaž Vajngerl2-0/+41
Change-Id: I862256a17ce84c85174678f3fd03c8ef6661f2c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143995 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit d5a71bc6a28f8a3d726b2ac4688c7cef9d77ddf0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145387 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-15svx: use array for colors in ColorSet, add consts, rename varsTomaž Vajngerl1-13/+17
Use std::array for colors in ColorSet as there are always only 12 colors for a color scheme. Add "const" to getters where appropriate. Rename maColorSetName to maName in ColorSet - long variable name is not needed. Change-Id: Iacb976a22af2d2585d627b0ba65d98cbe1b825c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143994 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 29c2bba1f3ef216d226c97197185066880fc1ab5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145386 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2023-01-12svx: rename ThemeColorType enum values, use enum instead of indexTomaž Vajngerl1-17/+15
Change-Id: I81c1553205365c4076562474078b3b0aa834b249 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143990 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 1386e26b2d7fc5173266ffbfb94bc82b1d3f7bb9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145369 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-12-24sw: add a menu option to enable/disable online a11y checkTomaž Vajngerl1-0/+18
Change-Id: I656037ef4e40e7c79daef5dd73f8f10c9818ac25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142215 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 00128f14c400b661444676410b2088aca357291c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144495
2022-12-05jsdialogs: fix generic color label nameSzymon Kłos2-3/+3
update event was triggering other widget change: when opened calc and selected shape first time we saw color text next to other color label Change-Id: I71670ac1273ce96fafc8d20126d9f32151e96d89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143471 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pedro Silva <pedro.silva@collabora.com>
2022-11-29tdf#148017 harmonize sidebar .ui filesandreas kainz12-1518/+1357
Change-Id: Ia5139f7255ba0e78f7089a4313a41d583ae62961 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141380 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pedro Silva <pedro.silva@collabora.com>
2022-11-12lokCalcRTL: chart-edit: no bounding boxDennis Francis1-0/+8
Fix for selections(svx-marks) similar to the fix for chart edit mode tile painting ``` 4fd2a14c6ee68f0574766ec7ec3dca35debe9d20 lokCalcRTL: global RTL: fix chart edit mode rendering ``` Change-Id: I2b5a2af7023b09254b8471b750122bec10126bde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131091 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142610 Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-11-01svx: minor simplificationAshod Nakashian1-2/+2
Hoping this might help the iOS build, which says: Undefined symbols for architecture arm64: "avmedia::MediaItem::getTempURL() const", referenced from: SdrMediaObj::notifyPropertiesForLOKit() in libsvxcorelo.a(svdomedia.o) ld: symbol(s) not found for architecture arm64 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> Change-Id: Ie12ac09063a07cea566cdda066b03ca1e3cd5296 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141971 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-10-25Guard against no HAVE_FEATURE_AVMEDIA in one more placeTor Lillqvist1-0/+2
Fixes build of the iOS app. Change-Id: I4a9e6f18e7b17664e5aed36233d5ccde44cf1194 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141796 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-10-25svg: export embedded videoAshod Nakashian1-0/+10
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> Change-Id: Ie5dcd1fb4abbaf53f48107e7def0f42daad24596 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141690 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-10-24lok: support embedded mediaAshod Nakashian3-0/+47
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> Change-Id: Ie8f3ed188cec0050a10a5d49325756931b902ef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141502 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-10-22Set InstallLOKNotifier handler for CrashReportDialogMike Kaganski2-0/+11
This prevents assertion failure in Window::SetLOKNotifier called from Dialog::ImplStartExecute in gtktiledviewer. Change-Id: I5c67d85728a34e47c36c73dafa616df45afa8092 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141589 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 7b04e44d4e909e4a6e48a894ec5ad00cacbbcbf5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141592 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-10-21lok: masterpage: don't render text edits from different modeSzymon Kłos1-13/+16
In Impress we can have 2 different EditMode : Page and MasterPage. Don't render text edits from other views in Page mode on Master Page. Change-Id: I62341941215165281d2663af3d3b7cca034762a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138803 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-10-16tdf#150987 calc crash pasting contentNoel Grandin1-2/+4
regression from commit d0119ff7f2c68aa05286bd303128f3a69c6bbd6a improve tools::Rectangle->basegfx::B2?Rectangle conversion which resulted in Fraction throwing an exception because of divide-by-zero Change-Id: I90a92a644c5fb40e9b93237c79f6760d4bb73d0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140064 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit ab5928517639e49dbcab2c2de195849d611124b9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139991 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-09-30lok: impress: clear selection when exited the textboxSzymon Kłos1-0/+2
it was sill visible in other views Change-Id: I75ce566a17fa1080d6e3008b964e367825225a09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140086 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2022-09-28Fix build [-Werror=reorder]Mike Kaganski1-2/+2
In file included from /home/mike/libreoffice/svx/source/items/hlnkitem.cxx:22: /home/mike/libreoffice/include/svx/hlnkitem.hxx: In constructor ‘SvxHyperlinkItem::SvxHyperlinkItem(sal_uInt16, const rtl::OUString&, const rtl::OUString&, const rtl::OUString&, const rtl::OUString&, SvxLinkInsertMode, HyperDialogEvent, const SvxMacroTableDtor*, const rtl::OUString&)’: /home/mike/libreoffice/include/svx/hlnkitem.hxx:60:22: error: ‘SvxHyperlinkItem::nMacroEvents’ will be initialized after [-Werror=reorder] 60 | HyperDialogEvent nMacroEvents; | ^~~~~~~~~~~~ /home/mike/libreoffice/include/svx/hlnkitem.hxx:55:14: error: ‘rtl::OUString SvxHyperlinkItem::sReplacementText’ [-Werror=reorder] 55 | OUString sReplacementText; | ^~~~~~~~~~~~~~~~ /home/mike/libreoffice/svx/source/items/hlnkitem.cxx:43:1: error: when initialized here [-Werror=reorder] 43 | SvxHyperlinkItem::SvxHyperlinkItem( sal_uInt16 _nWhich, const OUString& rName, const OUString& rURL, | ^~~~~~~~~~~~~~~~ after commit fb3597932ad9322feb58115528ca1dae070edfa5 Author rash419 <rashesh.padia@collabora.com> Date Thu Sep 15 18:02:06 2022 +0530 svx: extended SvxHyperlinkItem to have a new property sReplacementText Change-Id: Ia8be467919ac6f617a19f310535c6fff9b5e178e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140686 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-09-27svx: extended SvxHyperlinkItem to have a new property sReplacementTextrash4192-8/+20
this property is use to pass text that needs to be replaced when executing uno:SetHyperlink command in online for inserting the mention Signed-off-by: rash419 <rashesh.padia@collabora.com> Change-Id: I48fba347bda0652f7b657524f23c2dd837cd8186 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140015 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-09-23Put transparency label and slider into one grid.Gökay Şatır1-41/+42
Three items related to transparency were in different places. Now they are in one single container for future improvements. Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I936a9292d6a9816ebffdcaa6ae4545bab100fb98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140475 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-09-19tdf#144092 tdf#139511: revert parts of tdf#91762 tdf#137949 tdf#139511Sarper Akdemir1-33/+2
Reverts parts that have wrong assumptions wrt layouting a table in svx. The problems reverted commits solved previously, were refixed by commits: - tdf#144092 pptx import: correct table height during import (a5126a21351c87138ff86a6636326eb6cd6a0f8c) - tdf#144092 pptx import: fix import of empty cell and shape text properties (57f9b4b7d1ad164c56af12009ef1dafbc1be8369) So hopefully, reverting these now won't cause many regressions. Change-Id: Ie96293810b033dc86e41c200f10cf63326511cea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138653 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 1a0ceb76e2fe12cdfff7cabf06ef43cfba296a34) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139223 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Sarper Akdemir <sarper.akdemir@collabora.com>
2022-09-19tdf#144092 pptx import: correct table height during importSarper Akdemir2-3/+15
It appears PowerPoint can export rows of a table with row heights that is less than the minimum height (for that row). And also export the total table height wrong with it. If PowerPoint imports such a table, those rows are individually expanded to the minimum height. (Also increasing the table's total height) In Impress import we calculate table height by adding up individual row heights. Table layouting code depends on the table height being correct. This is why rows with less than minimum height lead to layouting problems. To compensate for this, while importing tables, layouting is skipped until the table height is updated with the corrected height. The correct height is calculated by layouting the table without fitting to an area (i.e with bFit = false). Change-Id: I79187882470a4e285b45bca1eabb469a084067f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138652 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit a5126a21351c87138ff86a6636326eb6cd6a0f8c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139222 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Sarper Akdemir <sarper.akdemir@collabora.com>
2022-09-13new uno command uno:Translate with deepl apiMert Tumer1-0/+17
New Uno command added for translation right now it is only using deepl translation api There's a section in the options > language settings for setting up the api url and auth key uno:Translate is a menu button under Format tab which will bring up Language Selection dialog for translation. DeepL can accept html as the input for translation, this new feature leverages that by exporting paragraphs/selections to html and paste them back without losing the formatting (in theory) This works good in general but we may lose formatting in very complex styled sentences. Translation works in two ways; 1) Whole document when there is no selection, it assumes that we want to translate whole document. Each paragraphs is sent one by one so that the output timeout can be minimum for each paragraph. 2) Selection Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137199 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-08-29avmedia: implement video crop support in the ODP filterMiklos Vajna1-0/+25
And also import/export the video preview as well. The naming follows the style used for table shape previews. The preview is important, since the cropping is relative to the bitmap's preferred logic size. (cherry picked from commit cbc6e67d3c88fb6ae39c304604a98eaa504f19cc) Conflicts: xmloff/qa/unit/draw.cxx xmloff/source/draw/shapeexport.cxx Change-Id: I6115284c1f4cf342b3296cd0ac3beb70a809fd1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138970 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-08-29tdf#149971 avmedia: implement video crop support in the gsteamer backendMiklos Vajna2-2/+2
If a media shape had cropping defined, we already took that into account when presenting a preview for it, but not during video playback. The reason for this is that the preview may be set by a file importer (e.g. PPTX) explicitly, in which case the preview is a bitmap we get without any video processing. As a start, implement video crop for the gstreamer backend (used on Linux), and also pass in the media item (containing crop and other properties) both during the edit view (MediaWindowImpl) and presenting (ViewMediaShape). We pass in the whole media item, so in case later other filters (e.g. black-and-white) are wanted, we have all that info in the backends already. Other backends (avmediaMacAVF and avmediawin) are untouched so far. svx/qa/unit/data/video-snapshot.pptx is modified to have a yellow border when cropping is unimplemented, which is now not visible with the gtreamer backend, matching PowerPoint behavior. PPTX export was working out of the box already. (cherry picked from commit 916848d877a788d02e2e7c980872314839101798) Conflicts: avmedia/source/viewer/mediawindow_impl.cxx Change-Id: If26b7a4391bcffe9cbddd9933e1bab69be52924e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138969 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-08-29Related: tdf#149971 avmedia: add doc model and render for crop of media objectsMiklos Vajna5-2/+54
It is possible to provide an explicit preview of media objects since commit 8fa1d453c94cdbb03dac646fb8db2ebd1a0e84bd (Related: tdf#149971 svx: support explicitly provided snapshots for media shapes, 2022-08-24), however they can't be cropped. This means that media shapes from PPTX with cropping show unexpected content and can also have a buggy aspect ratio. Extend avmedia::MediaItem to store cropping and take it into account when returning the preview bitmap in SdrMediaObj::getSnapshot(). PPTX import works out of the box, as oox/ already tried to set a cropping property on the media shape. This is just the preview, the cropping of the video itself is not yet implemented. (cherry picked from commit b6f0fd6a2f459ead2268e07bfd86db7e303b323f) Conflicts: svx/source/unodraw/unoprov.cxx Change-Id: I8db3e0dcf252613d56eb0e6139adf097e53b15cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138968 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>