summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)AuthorFilesLines
2021-06-11loplugin:unnecessaryreturn in SvxColorValueSet::layoutToGivenHeightNoel Grandin1-6/+1
Change-Id: Ia42158597588fe802a2f06a6e8e59f372c62c022 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117031 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-11tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWNArmin Le Grand (Allotropia)1-6/+8
ParaLineSpacingControl::Initialize() is another place where SfxItemState::UNKNOWN was just used as a placeholder for a non-set SfxItemState (aka could not be queried) Change-Id: I95ad01579e5aa4c86ace619e2201481742297c2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2021-06-11tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWNArmin Le Grand (Allotropia)1-49/+15
FontworkBar::getState does not need to check for SfxItemState::UNKNOWN at all, actions solely depend on FontWork object being selected. This also greatly simplifies that method. Also, the optimization by passing in a variable to checkForSelectedFontWork and remember if already computed can be removed - also in other places where it had to be given, but was not re-used at all Change-Id: I35b1f36195feb1d645619665d2dd65a84b75b118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117014 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2021-06-10Add extended tips to document classification dialogOlivier Hallot1-129/+181
Change-Id: I41ffe5c66e56ec7add2d4fcbb129ae2e3ff13b20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116915 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2021-06-10svxcore: provide UNO constructor for com.sun.star.text.TextColumnsMike Kaganski2-1/+12
This allows to create it e.g. in Basic macros using CreateUnoService Change-Id: I949d3b92c83cd9e763244f70b22f0f367b93cb48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116970 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-10tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWNArmin Le Grand (Allotropia)1-83/+23
No need to check for SfxItemState::UNKNOWN, all states depend on selected SdrObejcts/E3DObjects anyways Change-Id: I13be6494229c18f514da3e0229d0896b237508c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116939 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2021-06-10Simplify Sequences initializations (sot/stock/svl/svtools/svx)Julien Nabet4-23/+15
Change-Id: Iec21851d69f4a8d5f557e9ed2d30e5f680cd62c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116943 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-09Missing includeMike Kaganski1-0/+2
Change-Id: I020424db94a6fbdba22ff887b912d3f7bb459502 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116709 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-08editengine-columns: Implement layoutMike Kaganski2-0/+6
This changes the way how different parts access positions of lines and paragraphs. Now there is ImpEditEngine::IterateLineAreas, which performs uniform iteration over all ParaPortions and lines in order, calling a user-provided callback function for each portion and line; it passes all information about current portion, line, area, and column to the callback, and checks the return from the callback, to decide if it needs to continue iteration (in case when callback indicated that if doesn't need further data), and if it needs calling the callback for the rest of current portion's lines. This allows to have the code that calculates and iterates dimensions of lines in one central place, without the need to have duplicating logic in several places. One important exception is ImpEditEngine::Paint, which iterates without ImpEditEngine::IterateLineAreas, because it does many atomic paint operations in different points of iteration process, and implementing ImpEditEngine::IterateLineAreas to call callback in the required places would require increased complexity, which is left for a future change. To make that possible, ImpEditEngine::IterFlag should be extended to indicate additional requirements. Note that in fact, ImpEditEngine::Paint was taken as the model for implementation of ImpEditEngine::IterateLineAreas, with its detailed handling of all the vertical offsets like additional line spacing and interparagraph spacings that depend on context. The notable result of the centralization of the iteration code is slight change of heights reported by ImpEditEngine::CalcTextHeight. Previously it simply added all pre-calculated heights of portions, and not taking into account all the spacing handling that ImpEditEngine::Paint did, which was inconsistent (calculated height was different from painted height). Now ImpEditEngine::CalcTextHeight should provide more accurate results, which required small changes in the unit tests. Change-Id: I33cbb978deb974b314d36fda8674186a03991107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116034 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-08editengine-columns: ODF support [API CHANGE]Mike Kaganski6-0/+397
This uses existing ODF markup, as used by Writer's text frame: style::columns child element of style:graphic-properties, its fo:column-count and fo:column-gap attributes. No ODF extension is required. Since currently only columns with same width and spacing are implemented, without additional settings, style:column child elements are exported, but ignored on import. This adds new property to css::drawing::TextProperties service: TextColumns (of type css::text::XTextColumns). Change-Id: I7e63293e5814b281ceec8a9632e696322d3629e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116035 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-08editengine-columns: Create document model and dialog pageMike Kaganski12-3/+36
Change-Id: I056aad9474ca18134d1f1686a53618cc9ab3d525 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116038 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-08-Werror,-Wunused-but-set-variable (Clang 13 trunk)Stephan Bergmann1-2/+0
...ever since the code's introduction in ea1ca189b561e47d3b872f40628e6af224355626 "added api for glue points" Change-Id: I221632d243c8c778c711c3f001676ff26043d0fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-08Remove SfxItemState::READONLYArmin Le Grand2-2/+0
As I experimented with redesigning the whole Item/ItemSet/ItemPool paradigm, I alredy checked that SfxItemState::READONLY is not used (and no one really knows what it should do or stands for). Since a removal of complexity is needed to get forward with that redesign and I already made some experiences in branch item_refactor2, I propose to remove this state. It is not really used (gets never set). It is mirrored/used in the UNO API in css::frame::status::ItemState as 'READ_ONLY', but also not used in the office's code. ItenmState itself is used in three places, but all set the Item involved by using a SfxVoidItem to state SfxItemState::DISABLED, which I described in ItemState.idl. This means that no state of READ_ONLY in UNO API is ever imported to office code as DISABLED state at all, so not used. I also marked it as deprecated in the *.idl file. I think - including the experimenting in the mentioned branch - that this is safe for now. I already run a full 'make check' on the changed stuff. Change-Id: I8c15cf7b4f803076ecaaea67659f6e022ac7ef70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116752 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2021-06-06Fix and unify the two methods that get scaled text sizeMike Kaganski2-66/+8
GetTextFitToSizeScale and SdrTextObj::GetFontScaleY both didn't initialize outliners properly, and thus returned wrong results. Change-Id: I6fe63c51ed838a0d0fafdfa03597cac97ce29831 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116765 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-04sw HTML export: allow custom DPI for the bitmaps of shapesMiklos Vajna1-2/+3
But leave the CSS pixel size of them unchanged in the HTML markup. Also add some documentation on the various options, so one doesn't have to dig them out from testcases. Change-Id: I6c6ee4e9c98d674f44e7c5835f2e6a6737e13f34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116722 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-06-04sw HTML export: fix pixel size of shapesMiklos Vajna1-1/+10
- the twips logic size was set, but it was consumed as mm100 logic size, so the pixel size was about half of the correct one - the HTML export didn't write a logic size ("CSS pixels size") for shapes Change-Id: I37f6b4acde9d1298fae81f9975e9db95485631ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116691 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-06-04Fix typoAndrea Gelmini1-1/+1
Change-Id: I4dcb23dc5773c4ea198d1327f88d931afb1f3483 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116688 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-04Extended MoveShapeHandle command for Anchors as wellmerttumer1-5/+16
Change-Id: I0e2811802f17831097a86103571b505a7557717a Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116040 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116299 Tested-by: Jenkins
2021-06-04Implemented Delete key deletes the table when all the cells are selectedmerttumer1-8/+22
Change-Id: I8a17c73781a3399b214d5655b83036652933a90a Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115689 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116298 Tested-by: Jenkins
2021-06-03svx: remove pdfium dependencyMiklos Vajna1-1/+0
This is no longer needed, we only call VCL functions in svx/ today. Change-Id: I741ed9bc4c66067ea423211b8f16305b0e4099fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116622 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-02uniformly remove label-fill from GtkExpandersCaolán McNamara2-2/+0
Change-Id: Ife68cef7eeab0010c4d233c81e3bee808c2c1c28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116615 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-02resave with latest gladeCaolán McNamara1-123/+120
Change-Id: Ia69d4feb059ece2068d0229887749e258bcacf70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116608 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-02this is not worth warning aboutNoel Grandin1-2/+0
calling code seems to think it's quite fine to do, and is happy with a nullptr return Change-Id: Ia003364ad91a56f2f80ada3076a69d79b30e9c35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116573 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-01This intermediate variable is redundantMike Kaganski1-2/+1
Change-Id: I856aab424bd4378d8c115e36971fd76fe7a7feed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116458 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-31no need to allocate SvxNumRule separately in SvxNumBulletItemNoel Grandin1-3/+3
Change-Id: I7903565a468fc0fbec603c88b92cca6560a86728 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116424 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-31Clean redundant SvxBackgroundColorItem and use SvxColorItem instead.Gülşah Köse2-3/+2
SvxBackgroundColorItem is just copied from SvxColorItem. There is nothing special to SvxBackgroundColorItem class. SvxColorItem is a generic item and it's used on many places related with colors. We can use SvxColorItem for background colors too. Change-Id: Iacea31a7557b806e95f5859ff60add9a2626ec05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116282 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins
2021-05-31no need to allocate these vectors separatelyNoel Grandin1-31/+19
Change-Id: I015df0308696da3c4fe1ed45afd01185d0ce7d76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116403 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-30don't check isDisposed inside dispose()Noel Grandin1-9/+6
my fault, from a recent commit. besides defeating the dispose(), it should also be checked from the call sites. Change-Id: Ia09580d4224bcf78e5684015c747105fa6606878 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116383 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-29std::unique_ptr -> std::optionalNoel Grandin2-19/+18
Change-Id: I15779eca607f27a758575f4f095910277aa85eda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-29no need to allocate these on the heapNoel Grandin5-22/+22
Change-Id: Ia839a25cb75782b7b92372d876a41a7fd2e830d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116370 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-28IsDisposed->isDisposed in svxNoel Grandin1-1/+1
Change-Id: I986cf078004a292eb3560857274e5542330d203d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116329 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-28no need to allocate these SfxItemSet on the heapNoel Grandin3-9/+9
use std::optional where the code needs to control the lifetime of the object explicitly Change-Id: Ia550ce051360f68911abc68c945a97d62a637b06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116291 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-27no need to make copies hereNoel Grandin1-6/+6
Change-Id: If3cd60bd48f640c353fd4c28449faed2cdcebdda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116243 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-26gbuild: Handle glxtest + vclmain usage via macrosJan-Marek Glogowski1-24/+2
Use a macro to do the same checks for all Executable with glxtest or vclmain usage. Both are static libraries, so every user has the same dependencies. Introduces: * gb_Executable_use_vclmain * gb_Executable_use_glxtest Change-Id: Ib80b4e7c6f5078d47ad8f1ec5708a7174415f705 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116145 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-05-26Refactor module media item handlingJan-Marek Glogowski2-0/+104
Move common functionality into svx::MediaShellHelpers. Change-Id: I6f5db59bdcff7cad00a64e76f6aad7b8ecb4ffa9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116126 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-05-26add privacy URL to crashreport dialog & updatecheck tab in optionsChristian Lohmaier3-1/+25
Change-Id: I35cda87c35876469bf581be223bc608e29f07b09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116105 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-05-26clang-format crashreportdlgChristian Lohmaier1-9/+6
Change-Id: I58031cafaa9481ba6e8d77a7106485d8274e5bc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116104 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-05-25ofz#34601 teardown crash under oss-fuzzCaolán McNamara1-3/+8
Change-Id: Icbb1500a85f956c8100878d6a0bef30b98440c32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116114 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-25tdf#138141 sw: fix textbox z-orderAttila Bakos (NISZ)1-1/+4
Textboxes are implemented as loosely connected shape-text frame pairs. Missing synchronization of their z-orders resulted e.g invisible or only partially visible textbox content using Arrange options with textboxes (see in local menu or on Drawing Object Properties toolbar). Note: because it's not possible to send frames to the background, Arrange->To Background hasn't supported, so likely it's worth to remove that option later from local menu of textboxes. Change-Id: I1aa50903ba55dd5b9e72ef203c4e30218bee68fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115227 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-05-21Simplify GetModuleFieldUnit a bitMike Kaganski1-9/+4
Change-Id: I34ed20387104cbfa0e9b894a5862d7f0543adfd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115849 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-21add Toggleable as a separate thing to a ButtonCaolán McNamara24-54/+54
and inherit ToggleButton from both it and Button Change-Id: If0e500aca8d0ffa087cb5e2bfc1786372fbff4eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115921 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-20move some headers inside modulesNoel Grandin23-14/+450
Change-Id: I2baa9e9334850cf72e8ea1e96a2177a1c052e589 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115868 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-20fix crash when del in textbox in drawNoel Grandin1-1/+1
regression from commit 9090dc1f3b27195f5defd35586ac79357992be21 split OutputDevice from Window Change-Id: Ib0df6b691f2281c366126c3a0cf3aae985e706be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-20use toggle instead of click for RadioButtonCaolán McNamara4-39/+70
Change-Id: I8de3daf3799a78c63be2c560afa4a7cc02d63daa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115852 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-20use toggle instead of click for RadioButtonCaolán McNamara2-4/+3
only listen for one toggle for the button grouping Change-Id: Ie977045288906791319d7df30b3d7737253e3671 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115828 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-19use toggle instead of click for RadioButtonCaolán McNamara6-60/+34
Change-Id: I8fb4a28f4be701858af0ae8e95ff0f45a5401490 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115821 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-19pass CheckButton argument instead of its Button baseclassCaolán McNamara2-5/+5
Change-Id: I76f446266fcc74ba2db928ef1c5e764eead57997 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115801 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-19SetPhysFont always dereferences its OutputDevice* argCaolán McNamara2-4/+4
which is also the case for ChgPhysFont and GetTextSize Change-Id: I7e6a1a7eaa77646c53506a73d8946f8df7593e72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115768 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-19ImplPlayWithRenderer never checks its OutputDevice against nullptrCaolán McNamara8-13/+13
just pass a reference instead and spread that around to some similar cases Change-Id: Ifb2dee8c7bf02a9f01982b928c90666cbbdd84fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115759 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-17split OutputDevice from WindowNoel Grandin24-94/+98
as part of a longer-term goal of doing our widget rendering only inside a top-level render- context. I moved all of the OutputDevice-related code that existed in vcl::Window into a new subclass of OutputDevice called WindowOutputDevice. Notes for further work (*) not sure why we are getting an 1x1 surface in SvpSalGraphics::releaseCairoContext, but to fix it I clamp the size there (*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice (*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code? Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>