summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2023-03-27tdf#152234 drawinglayer,svx: PDF/UA export: add Alt text to form controlsMichael Stahl
Specification: ISO 14289-1:2014, Clause: 7.18.1, Test number: 3 A form field whose hidden flag is not set and whose rectangle is not outside the crop-box shall have a TU key present or all its Widget annotations shall have alternative descriptions (in the form of an Alt entry in the enclosing structure elements) Form controls are weird because they have an SdrObject with the usual name/title/description plus a property "HelpText" on the control itself which is already exported as "/TU" on the /Annot unless it's empty. Exporting the SdrObject properties via ObjectInfoPrimitive2D doesn't work as tragically that is only created for form controls when painting to the screen while PDF export takes a detour that needs special handling. Change-Id: Id96f7dd13f190ab439c099cd1f4acb70c1c9fdc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149554 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-26tdf#90407 Change the auto-fit alg. to match better with OOXMLTomaž Vajngerl
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>
2023-03-26svx: don't overwrite the first cell's styleMaxim Monastirsky
i.e. new Draw document, change the char formatting in the default drawing style (e.g. font size), insert a table and fill its cells with text. Save and reload. After reload the first cell inherits the formatting of the default DS, instead of its assigned cell style. But dragging the table around shows the correct formatting in the dragging overlay, and it's also correct when copy & pasting the table. This is caused by the order of things at import, as a table is created initially with a single cell at least, and it gets its cell style assignment too early. There is also similar code to what is changed here in SdrTextObj:: BegTextEdit, and it's rightfully overridden by SdrTableObj. This appears to be a regression from 4-0, but I'm not sure which commit and what exactly changed there. Change-Id: Id096c7b5f330d6abd8f5b01c96448a9d8aac8001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149616 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2023-03-24Delete temporary variableAndreas Heinisch
Change-Id: I5d0fc2a4b078e49be684b4a9b8a27f6059d9e5c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149475 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-03-23tdf#142978 Remove a11y check dialogSamuel Mehrbrodt
in favor of sidebar deck Change-Id: I2daf34edbe71341ebc44ca9b966c97f8e494d583 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149433 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-03-23tdf#154322 select the first entry of the current page by defaultCaolán McNamara
rather than default to nothing selected, if we switch pages and then back to page 1 this will be selected anyway, so start off that way Change-Id: Ia684a5e44b12c984df3920f18b34c99693a2702c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149426 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-23Resolves: tdf#154322 if entries are disabled while menu is active, update itCaolán McNamara
Change-Id: Id5cad5f2f4ac21db8675de16f1bc0ceeff39fe6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149424 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-23tdf#142978 Improve a11y check sidebar panelSamuel Mehrbrodt
* Set minimum size * Wrap long texts Change-Id: I4c23ebd47d26fe628187143eeda43efe467b911a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149429 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-03-22tdf#154307 remove instead of hide these menu entriesCaolán McNamara
because on kf5 they are getting shown, which suggests a wider more generic bug on that variant, but use remove for this specific case because that's ok for this usage and works around the problem for now. Change-Id: Ib2bc316cc33894253a0b6335ae8643d0c8d78794 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149325 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-22MCGR: Corrected error with Case16 wrong gradient shortcutArmin Le Grand (allotropia)
Also simplified using the test cases, these now depend on an ENV VAR called MCGR_TEST. Fallback is no test. For seeing a multi-color gradient use 1, for Case16 use 16. If active, all gradients are replaced with the one active for the test, 2D and 3D. This is temporary but also for pro build to check for speed there. Change-Id: I90f3c7e59d9d0a3e070a849af3f9ea1c9e5462a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149316 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-03-22vcl,drawinglayer,svx,sw,sd: PDF/UA export: Annot StructElem for SdrMediaObjMichael Stahl
veraPDF complains: Specification: ISO 14289-1:2014, Clause: 7.18.1, Test number: 1 An annotation, excluding annotations of subtype Widget, Popup or Link, shall be nested within an Annot tag This is very similar to Link annotations, that is to say, extremely complicated to get it thought the convoluted PDF export code, with additional complication that the StructElem is produced by drawinglayer and the page annotation by sw. Put another map into PDFExtOutDevData where sw code puts stuff for the SdrObject that drawinglayer can find. The test had the problem that PDFObjectParser::parse() could not handle: <</Nums[ 0 [ 6 0 R ] 1 6 0 R ]>> Fix dropping the "1". Change-Id: If5bf7c552e26ebb7e631030b8aaecd4281e77acc (cherry picked from commit c78e90bd28cc4d6d3bde473535107784b12d9c0d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149008 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-22tdf#38890 Remove hard-coded URLs in source FilesAdoche Onaji
Project URLs are extracted to the Common.xcu files and read in the source files. Change-Id: I0da72ff033af6c155195b2f91177e7bf7d554daa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149115 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2023-03-21MCGR: Model data changes for ColorSteps (II)Armin Le Grand (allotropia)
The biggest change here is to allow multiple ColorStops with the same Offset. That allows to define gradients with 'hard' color changes at any place using two ColorStops with the same Offset and different Colors. This required quite some adaptions, but works well. Also removed in this context checking for all Colors being the same to not mix up things. Also works well. Also changed the need for having Start/EndColors AKA ColorStops for 0.0 and 1.0 in place, instead 'imply' the 1st ColorStop to also define the StartColor and the last one the EndColor. This allows e.g. Gradient definitions with two GradientStops at the same Offset e.g. 0.5 with different colors to already define a full Gradient. Also added a tooling method to reverse ColorSteps, which changes the order and mirrors the Offsets (what even keeps an existing sort valid). This is useful e.g. for GradientAxial which is the only one where for decomposition the Gradient had to be interpreted 'reverse' since it's defined from center to edge, but for creating correct filled polygons to represent this the inverse order had to be used, creating polygons from edge to center. This led to 'wild' code for this one of six cases and prevented unifications with the other cases (also made your brain flip). Thus I adapted this now to use the reversed ColorSteps consequently, and the same principle loops than the other implementations to make things easier for the future and to use common tooling. Change-Id: If2943348d17d5b9cd165f4d78f22638a1dff5237 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149208 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-03-20tdf#154071 UI rename gradient back to 'Rectangular'...Regina Henschel
Commit e97e62a4707e09739f9c00f8fc4a943f0123a9cf had wrongly changed 'Rectangular' to 'Square' (API RECT, ODF rectangle) and 'Square' to 'Quadratic' (API SQUARE, ODF square). This patch reverts 'Square' to 'Rectangular' and 'Quadratic' to 'Square (Quadratic)'. It uses 'Square (Quadratic)' instead of simple 'Square' to help users to find the correct type. In addition, use of the wrong type names in comments is fixed. Change-Id: Ibbd90be2cceb65c9857e473cb74c39df1b9530f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149004 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2023-03-20tdf#142978 Add a11y check sidebarSamuel Mehrbrodt
Change-Id: I6d9d6dca0118567f68db11b7c0cce60643211ab2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149000 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-03-19MCGR: Model data changes for ColorStepsArmin Le Grand (allotropia)
Added tooling replaceStart/EndColor to allow simple transition for code that does not immediately adapt to multi color gradients. Also added createColorStepsFromStartEndColor for the same purpose. Adapted XGradient to no longer have Start/EndColor at all, but only use ColorSteps. Adapted all usages of XGradient to no longer use Get/Set/Start/EndColor, but access the ColorSteps instead. Replaced quite some XGradient constructors that used XGradient() as Start/EndColor since this is already the default. Adapted ColorBlending to black AKA Start/EndIntens in XGradient to work now on all ColorSteps in the required linearly-scaled manner. UNO API changes: Added com::sun::star::awt::ColorStep as basic data element that holds a pair of Offset and Color. Added com::sun::star::awt::ColorStepSequence to handle an array of sorted entries. Added com::sun::star::awt::Gradient2 derived from com::sun::star::awt::Gradient, extended by the needed com::sun::star::awt::ColorStepSequence. Added MID_GRADIENT_COLORSTEPSEQUENCE to UNO API to provide access to ColorSteps directly. Adapted XFillGradientItem::QueryValue/PutValue to make use of new UNO API data structures. To do so, added tooling methods for data transition: - fillColorStepSequenceFromColorSteps - fillGradient2FromXGradient - fillColorStepsFromAny - fillXGradientFromAny and adapted - case '0' (all data) - MID_FILLGRADIENT - MID_GRADIENT_COLORSTEPSEQUENCE - MID_GRADIENT_START/ENDCOLOR to make use of these. Tested usage of these in the office. Renamed from GradientStep to GradientStop after discussions with members on the list to make this closer related to other norms/definitions. Also renamed classes and class members to better reflect to GradientStop, so grepping/finding will be easier (e.g. 'Color' just exists pretty often, but 'StopColor' is more precise). Changed the used UNO API class for reprsenting the Color to better reflect to ranges [0.0 .. 1.0] and usage of RGB. Change-Id: I1eeb3e97e81d6785967615d1ff256551fc3b882d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148849 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-03-17store last five most recently used currencies in the currency toolbar drop-downDrGigioSan
Refactory Cause Currency must be added in the MRU list in SvxCurrencyToolBoxControl::execute method. Unfortunately in this point the only information available is the number format. It is not possibile to infer currency from number format (e.g: both USD and AUD use symbol $). Encapsulating currency data In order to solve the problem currency data is enacpsulated in a SvxCurrencyData struct. Added a vector of SvxCurrencyData to SvxCurrencyToolBoxControl. Static and non static call Former static SvxCurrencyToolBoxControl::GetCurrencySymbols has been preserved, as it is called by SvxNumberFormatShell. A new GetCurrencySymbols is used by the control. To avoid code duplication, both functions call a static private function inner_GetCurrencySymbols. MRU Currencies MRU currencies are stored in another member vector m_mru_curencies: During currencies vector population (inner_GetCurrencySymbols) a space is reserved on top of vector for mru currencies. A new method addMruCurrency updates m_currencies. This method is called in SvxCurrencyToolBoxControl::execute Change-Id: I6f86179efd1839e31b089e0086b6ddbdda358f31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148896 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-17related tdf#102261: consider ParaTabStopDefaultDistance in SvxRulerSarper Akdemir
If there's a paragraph scoped tab default distance defined, use that as the default tab distance in the SvxRuler instead of the document wide setting. Change-Id: I9b0e7d0db0b25aee08bd27948b2e462b4a4ee496 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148060 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@collabora.com>
2023-03-16tdf#153704: Make sure the last script segment is also addedKhaled Hosny
Change-Id: Id6381d77cdf05c24a1b557206f530f4e004e8e52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148986 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2023-03-15tdf#153167 Re-add ImageMap Editor dialog title againMichael Weghorn
Essentially reapply commit 66291d467be4bf0e841814111d57d1af76117f8e Date: Mon Jan 23 12:15:50 2023 -0600 tdf#153167 ImageMap Editor dialog had no title after it has been reverted in commit a90ef17809071b808a8c703e7e47e045ddabcd4a Date: Tue Jan 24 08:36:48 2023 +0000 Revert "tdf#153167 ImageMap Editor dialog had no title" This reverts commit 66291d467be4bf0e841814111d57d1af76117f8e. Reason for revert: didn't wait for jenkins and broke the build translatable strings need context attribute. , but this time add the required context attribute as well, as it used to be before commit 8a35ae3e6c5c45aa1426cfd81472b309d02a1b48 Date: Thu May 16 15:17:38 2019 +0100 weld SvxIMapDlg Co-authored-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Change-Id: Id777e457fe144b0f0746cfc19e7e13e6db7a89a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148914 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-03-15cid#1521990 silence Unchecked return valueCaolán McNamara
Change-Id: I7833b6ab19334ea17f5210a0381109aa55d6efd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148925 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-15tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctorYousef_Rabia
Change-Id: I37b5056026f29d2619a4f9d3da9251924c7f5fdd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148898 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-13make more use of OUStringBuffer::append(OUStringConcat)Noel Grandin
where we can avoid constructing temporary OUStrings Change-Id: I0eacd68a8d1b450894c2ea769055f16886b78ad0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148780 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-10Resolves: tdf#154087 update scrollbar range when search criteria changeCaolán McNamara
Change-Id: Iaf5f20c8952b15f3dcccb65277dadb171a705605 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148606 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-10improve loplugin:unnecessarylockingNoel Grandin
to find more locking we can remove Change-Id: Ief7bc5ec2a1ff31f22a0ad366910b7fcc4725818 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148599 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-10tdf#153657 a11y: Set tooltip/a11y desc for fontwork stylesMichael Weghorn
Add a map between ID and title and use that in a newly introduced tooltip query handler to return the item's title so it is shown as a tooltip. This also implies that the title is used as the accessible description for the items for the non-gtk case, see `SalInstanceIconView::EntryAccessibleDescriptionHdl`, introduced in commit 2a28ebeef5ea3e2b01d836a7233d2316b765bf38 Date: Wed Jun 1 11:18:26 2022 +0300 Accessibility for IconView Therefore, the NVDA screen reader on Windows now announces the items using their title when they receive focus. Change-Id: Ic77cf485ed4b2b413d3d3368c15b788d693111cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148523 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-10simplify initialisation of some pool defaultsNoel Grandin
Change-Id: I794e528a08a5a76cef1955f5c4f3e594f1e90f4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148537 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-08Vertically center statusbar imagesHeiko Tietze
Change-Id: Iecdeeda5c10b2322bdf71e84864ed8104581589f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148424 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-03-08tdf#153918 svx a11y: Drop old items when switching FontCharMapMichael Weghorn
Calling `rRenderContext.GetFontCharMap(mxFontCharMap)` in `SvxShowCharSet::RecalculateFont` means that a new `FontCharMapRef` gets assigned to `mxFontCharMap`. Therefore, clear the old items based on the previous one from the map, so that new ones will be created based on the new font char map in `SvxShowCharSet::ImplGetItem` as needed instead of still returning the old ones. Adapt the a11y UI test to check again that the "!" character now has the proper accessible name. The incorrect accessible name in the special characters dialog had actually been uncovered by the initial version of the test that failed on Windows due to this, and the test was adapted to workaround that, s. tdf#153918 and the discussion in the Gerrit change adding the test [1] for more details. [1] https://gerrit.libreoffice.org/c/core/+/142260/24..26/sw/qa/extras/accessibility/dialogs.cxx#b85 Change-Id: I0ac578750b1fa0a7e63e62a6937a125c7ceab510 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148423 Reviewed-by: Colomban Wendling <cwendling@hypra.fr> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-08svx: Stop manually counting map entriesMichael Weghorn
The `nCount` member counts the number of elements in `m_aItemList`, but `std::unordered_map::size()` also returns that, so just use that instead. Use `SvxSearchCharSet::getMaxCharCount` in most places and simplify to use `std::min` in `SvxSearchCharSet::LastInView`. Change-Id: I8b66b1d83c0327026b13147f201995c7d1df1238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148422 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-07lok: form controls: rendering and mouse event forwardingMarco Cecchetti
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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147320 Tested-by: Jenkins Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
2023-03-07improve variable nameNoel Grandin
until commit eec42f0dbcc79a4c9f456ce97fa1066b8031ea28 Author: Noel Grandin <noelgrandin@gmail.com> Date: Sun Aug 15 17:35:58 2021 +0200 pass OutlinerParaObject around by value it served two purposes, now it serves only one, so rename it to reflect that. Change-Id: Ifc4f9361fd562cc6c572cdc3ad90151d87f41501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-07no need to allocate these separatelyNoel Grandin
they are all one or two words in size Change-Id: Iebbe17f114b098337305d4f8f5c3835be4744c30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148376 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-07jsdialog: don't close dialog on tab page destroySzymon Kłos
was closing the whole dialog on tab switch in Format -> Characters -> Highlight when switching to "None" also avoid sending multiple "full updates" by using the same builder for sending message Change-Id: I4540c9c857acf2b9f40482678a30335edc24e7cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148314 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-03-06tdf#148776 for scrolling set step size as height of a rowCaolán McNamara
similar to FontFeaturesDialog. FWIW gtk's viewport implementation automatically overwrites the step size to be 10% of the visible height (and page size of 90% of the visible height) Change-Id: If356724a47b0a10069f129bed4a40cfdee57bfa8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148138 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-05make NbcRotate abstract as it's implementation is noopTomaž Vajngerl
During testing the NbcRotate function on SdrObject it turned out the the function is essentially a noop, because it uses normal equality to test the values of a double, which are a product of sin and cos functions (to determine the 90 degree angles). So because of this the input rectangle was never modified - noop. Because of this we can just remove the impl. of the function and declare it abstract, so that the actual implementations define a valid function to rotate. There were some subclasses that didn't override the NbcRotate so they used the one implementation in SdrObject. These subclasses now override the function and in the implementation we call assert(false), which is never called during a test run. It seems we never rotate those objects. Change-Id: I1b1a45a8e96ed2d061f9b9f80c5fdaa5a84d4c05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148266 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-05svx: make SdrObject abstract by making CloneSdrObject pure virtualTomaž Vajngerl
This change makes SdrObject an abstract class that can't be as we don't want it to be instantiated. With this the ClonseSdrObject became a pure virtual function. With this change also the SwFlyDrawObj needs a implementation of the CloneSdrFunction, which was previously provided by SdrObject. Change-Id: I2efb8c1e6fac12b17ce497285067029d7da1c1fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148239 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-05svx: add test for RotatePointTomaž Vajngerl
Change-Id: I62182fa02843d428d1b745c55ab695450ec4940a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148235 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-05svx: SdrRectObj move, rotate testsTomaž Vajngerl
Change-Id: I448f82d87be34c58d0abf4f6a0c1e6192567b807 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148234 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-05svx: remove unneeded rectangle initsTomaž Vajngerl
Change-Id: If430eace7e82ff52bb10c83b5f66148e2d9ade13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148248 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-04MCGR: ColorSteps handling moved to toolingArmin Le Grand (allotropia)
Due to the fact that handling of a vector GradientSteps will get used more often with ongoing changes I moved some handling to tooling, see sortAndCorrectColorSteps. That method sorts and corrects a vector of ColorSteps so that only valid entreis remain in a sorted order, for details please refer to the docu at function definition. I took the occasion to rearrange that to work on the single provided vector which is better for speed & ressources. Also changed the ColorStep constructor to not automatically correct constructed entries: While that is formally correct, it moves an invalid entry to 0.0 or 1.0, thus creating additional wrong Start/EndColor entries. Those may then 'overlay' the correct entry when corrections are applied to the vector of entries which leads to getting the wanted Start/EndColor to be factically deleted, what is an error. Also rearranged FillGradientAttribute to now work initially with ColorSteps, no longer requires the Start/EndColor, also adapted all usages. This securely allows start/end and in-between single-color sections in gradients. Also needed to re-formulate GradientRect & GradientElliptical ::appendTransformationsAndColors method for correct 2D mapping(s) - always incrementing from the start to end conflicts with the adaption of the start value for the inner loop mainly because increment is at start of inner loop (pre-increment). Corrected errors from clang plugin, but also some wrong initialiations for basegfx::ColorSteps. Change-Id: I292592ed9abcfa591f68a680479f4fcdda46cbeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148196 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-03-04tdf#141319 - Special Characters Dialog: mark empty/unused cellsAndreas Heinisch
Change-Id: I123aef9f9763b2ae88c4b4f6748b69f9d9c394af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148051 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-03-04svx: change Poly2Rect to return a rectangle, also clean-up the codeTomaž Vajngerl
There is no need to pass the rectangle by reference and to change it inside the function, better to return a new instance. Also clean-up the code of Poly2Rect and rename the function to svx::polygonToRectangle. Change-Id: I25e77c8abd12e2075939f55e06f40343ac23ca97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148211 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-04svx: SdrTextObj maRect - use getter and add funcs. for manipulationTomaž Vajngerl
Change-Id: I0a416fa2ac470650c2ef430dbb91bf8d5a8013cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148210 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-04Related tdf#153344 - Resize Selection Mode icon in statusbar to 16pxHeiko Tietze
Also removed the "_10x22" from the icons Change-Id: Iccdd5b784f43f1588aa1b5e72d01dd220209cc21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148120 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-03-03Related: tdf#94319 Revert "tdf#63956 clip 19km long line to some sane limit"Caolán McNamara
This reverts commit d1046e7c3f66e5f3384ee1ef534ef28346702fc6. and all its associated follow up fixes. Doesn't actually have any effect on the issue which isolated it as a source of the problem which has mutated in the meantime Revert "tdf#126184 Use max paper dimensions to calculate clip region" This reverts commit 1dccd6814f1fe7a06f3168d01d18d347269cd3c1. and: Revert "Resolves: tdf#101187 colossal page width wraps around if doubled" This reverts commit 2fd88ab1cbb4690a770ca2ca5d66157ec4906a2e. and: Revert "Resolves: tdf#98366 paste document has 10x10 sized SdPages..." This reverts commit 93efd7ebbad293d3729b8ea4b9726aff498f607f. and: Revert "Resolves: tdf#97276 don't clip out line if the underlying page size is unknown" This reverts commit ad99c633908f7c70d06812ebfb4e0696666f0158. Change-Id: I22d3e1592c172f137fcec8085ff3240428f0d248 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148170 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-01Related tdf#153344 - Resize Save icon in statusbar to 18pxHeiko Tietze
Also removed the "_14" from the yes/no icons Change-Id: Ic43219fe0e4555416b78831d45f9edc8060f73cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148063 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-03-01Remove duplicated includeAndrea Gelmini
Change-Id: I267f3655dcc41613db9de4952beceb34dffefbac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148061 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-01send theme info when changing color (in the picker) via UNO commandTomaž Vajngerl
Change-Id: I288f8fb3375e152b5ee746fab2c05d08150d6c99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146817 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-01tdf#109214 - Highlight the favorites in the grid of special charactersAndreas Heinisch
Remove visual artifacts around the corners by using horizontal and vertical round. Change-Id: I9821103c43dfbd93e6f295034b05da8b74e802e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148040 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>