summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2020-05-14loplugin:unusedfieldsNoel Grandin
Change-Id: I0ec89b56b339f26bb236887c904e6b5d14ceecea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94136 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-14tdf#49247: add sidebar panel for soft edges effectMike Kaganski
Shapes are handled in all modules; images only in draw/impress (TODO). Change-Id: Ib96eb4c36fdb69dd605f9b5a507f67a279797286 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94162 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-13tdf#49247: draw soft edgesMike Kaganski
This factors out the common code for blurring used both in glow and soft edges into ProcessAndBlurAlphaMask. Also this reverts commit a98bdbae459ad7341bf7f484c402e77e4062cd16, since its use was removed from VclPixelProcessor2D. Change-Id: Icd7fdb06bef3932ff3b9ce7e283b515b15d246a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94087 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-13Fix translation domains in .ui filesGabor Kelemen
Found with bin/ui-checkdomain.sh Change-Id: I2a3ec2593b9ce0a19efced9020b95dff796e4702 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94153 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
2020-05-13surround switch is keyed on m_nControlClass so set directly to known true/falseCaolán McNamara
Change-Id: Ia1fa2439a88912a933bc90e3b16bea3b30a403f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94142 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-13Resolves tdf#132435 - Font selection drop down too narrowHeiko Tietze
Showing 18 chars now Change-Id: If6482cd25c74c4fea9eefca76b4828eff0ede220 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94112 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-05-13loplugin:unusedmethodsNoel Grandin
Change-Id: Id813d95a90fdbb360dfc8670c0b55b635f633965 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-12Area fill bitmap presets invoice paper language fixandreas kainz
Change-Id: I57c6df6de2b27b342547b48370e0b19ad132859d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94036 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2020-05-12Drop unused variableMike Kaganski
Change-Id: Ib92dc7c9f728eb40015ca96dd3c8708366bcf950 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93991 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-12always use the LinkManager's persist as the known refererCaolán McNamara
Change-Id: Ibb1bd9138993adbd8391b524c0cd654ba523cad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94006 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-12use the LinkManager persist to determine the RefererCaolán McNamara
Change-Id: I4e93878972492a93af368ffa0560412132431a24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93984 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-12Rename attributes to reflect that they represent different effectsMike Kaganski
... not only shadow. In preparation to add soft edge effect (tdf#49247). Change-Id: Ia5b17fff00e1c2d7f717179687dbd44410795a71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94007 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-11added clear Direct Formatting button in calc sidebarPranam Lashkari
Change-Id: I7f18c696eb32332d9c65145e7788370304d91ea6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93969 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-05-11fixed clear Direct Formatting button to sidebar in impressPranam Lashkari
Change-Id: I81cd30b3ce7087122c260dca99e86a3c857447b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93813 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-05-11Adapt to be able to build against ICU 66Eike Rathke
In case building against system ICU 66 is wanted. Otherwise an interim step on the way to ICU 67. Change-Id: I8c559ee3206afd4f61af4fd3af7dd85911198f3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93985 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2020-05-11tdf#129916 svx: fix origin of scaled shadowMiklos Vajna
We assumed that the top left corner is the origin for scaling, but that is not necessarily the case. The intention is that the shadow direction can be determined from its x and y offset, and the origin is the opposite corner of the shape. Change-Id: I6759302767d20739b6e2be79d379740dd06f70f5 (cherry picked from commit a1dde1a85a8d1c54521a0ac6310571ffcdd4bb5a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93974 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-05-11tdf#49247: no need in extra boolean property, radius is enoughMike Kaganski
When soft edge has radius 0, the effect is disabled. Change-Id: I7d66ea7b87e0ed59129a83885d52906b8edf75f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93971 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-11Limit utility function's visibilityMike Kaganski
Change-Id: I1d1a89a197d90dcb1e7de9b4090e1fe6baf53e1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93972 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-11tdf#36158 Fix a lurking last instance of old “Notes” nameAdolfo Jayme Barrientos
This completes commit 1288a1985894a5aa8819223feb4ec3da204c5352 (from 2011-05-22). Change-Id: Ic0950c9500870a68d3e0c17b77e7fcebdc787c11
2020-05-11Related: tdf#129916 svx: clean up duplicated matrix decompose for shadow sizeMiklos Vajna
Pass the object's transform matrix to createEmbeddedShadowPrimitive(), this allows decomposing it only at a single place. Also, this will allow creating the shadow based on the object size. Change-Id: I8d8bf59934b00e13cda1da0398910aa9f1ce3c59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93950 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-05-11tdf#49247: implement soft edges document model and import/exportMike Kaganski
... for ODF and OOXML. Two object properties added: SoftEdge (boolean, effect enabled/disabled) SoftEdgeRad (sal_Int32, effect radius in 100ths of mm) Two corresponding ODF attributes added: loext:softedge ("visible"/"hidden") loext:softedge-radius (metric) Change-Id: I0dc4d7fc3e5b0c2c36092d430568ebcfd3a68c9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93833 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-10lok: replace name Neutro to NeutralHenry Castro
This commit was split because it has to be in sync with cp-6.2 branch Change-Id: I849b63f34297a6876d5a3ab83bb6ce551bb156d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93687 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10compact namespace in svxNoel Grandin
Change-Id: I9229775999aa70c2b37c0527ba1c332143f9f2cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93877 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10lok: set device form factor of the client on view creationMarco Cecchetti
This patch allows the lok core to know about the device form facor of the client requesting the creation of new view, immediately instead of a later time. When a new view is needed a "DeviceFormFactor" parameter is forwarded to lo_documentLoadWithOptions and doc_createViewWithOptions from the client. This parameter can have one of the following values: 'desktop', 'tablet','mobile' and it is used to set a global variable accessible by SfxLokHelper::setDeviceFormFactor and SfxLokHelper::getDeviceFormFactor. This global variable is retrived in the SfxViewShell constructor for setting SfxViewShell::maLOKDeviceFormFactor attribute. In SfxViewShell we have the following 3 methods: - bool isLOKDesktop() - bool isLOKTablet() - bool isLOKMobilePhone() which replace the following boolean functions: - comphelper::LibreOfficeKit::isTablet - comphelper::LibreOfficeKit::::isMobilePhone Change-Id: I9b36f354278df8c216fcb90f6a9da8256ec9c1e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93340 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-05-09remove "using std::vector" in SdrEditViewTomaž Vajngerl
Change-Id: Ide7e72effd4568a988b9c8c942daf2ec3a3b0479 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93820 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-09lok: fix wrong metric conversion of the metric input controlHenry Castro
The client side does not work well if the browser has different locale, and the input element conversion fails or change to a different value, so the value is converted to a neutral locale. Change-Id: I89f96844603a8552609d486590c7de752cb5a95c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92395 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93069 Tested-by: Jenkins
2020-05-08Related: tdf#129916 svx: improve shadow size of custom shapesMiklos Vajna
There are multiple problems with this bug document, the first is that the shadow primitive got the default position (0) of the owning shape. Do it the same way as commit 6454b6336b8de9a4c5899adeab552af6f794cdc4 (tdf#130058 Import shadow size., 2020-04-14) did for graphic objects. This requires constructing a transform matrix in ViewContactOfSdrObjCustomShape::createViewIndependentPrimitive2DSequence(), include position and size in that as a start. Change-Id: Ia51df555c1984971afe7c52ba3f2658099a4e7b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93771 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-05-08tdf#111535 - Add First-line indent, paragraph indent, and tab spaces/Core partgokaysatir
Change-Id: Ib340e74646299c344dd770977497f59a030c86f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93165 Tested-by: Jenkins Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-07tdf#132199: put glow before shadow, to have shadow of the glowMike Kaganski
Also take modified color into account when drawing glow. Change-Id: Iba136d2695cb783d13ff251d087066c2e8803d63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93605 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-07tdf#101181: store glow radius in 100ths of mm instead of EMUsMike Kaganski
... as we do for all metric values. This fixes storing values like "190.5cm" in ODF for 15 pt (should be "0.529cm"). Change-Id: I382756af56464424dcb24ed8801d0a4203658c11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-07tdf#101181: improve glow effectMike Kaganski
The shadow of objects must not be scaled: this displaces any internal areas that need blur, e.g. holes. Instead, it needs to dilate the shadow using kernel with radius equal to blur radius: this allows the borders of dilated objects to be in the middle of the blur area. The following blur makes those new margin points to have 50% intensity, and full glow intensity at the point of old object margins. This also removed artifacts when moving objects with glow effect caused by mismatch between scaling and D2D range calculation. The D2D range therefore is not calculated by scaling, but using grow. Blur filter's "extend bitmap by blur radius" option got obsoleted and removed. There's no need to blur the glow color (24-bit RGB). Instead, glow bitmap must be filled by glow color, and have an alpha mask that is blurred accordingly. This makes the glow properly transparent, and also reduces the blur complexity which now only needs to process 8 bits of alpha channel. The object shadow is created using basegfx::BColorModifier_replace inserted into the 2d decomposition of the effect, as before. To make sure that any non-fully-transparent pixel will become black pixel in the shadow, black color is used, and the result is further processed in VclPixelProcessor2D::processGlowPrimitive2D with monochrome filter using threshold 255. Glow transparency attribute is taken into account: the initial value at the margins of the objects. Color replacement filter is used to replace the object shadow with the attribute value before blur pass. Correct blur radius is used, calculated from glow effect radius, instead of hardcoded value of 5 pixels. This makes the glow to fade gradually along the full width of the effect, instead of only fading in narrow outer border previously. Since blur filter is only implemented for radius up to 254 pixels, and since downsampling the shadow before blur increases performance without noticeable quality loss, the image is downsampled before filtering. It should be noted that the glow effect is almost identical to soft shadow effect, likely with the only difference of using dilation in the former, but not in the latter. The code might be reused later to implement soft shadow as well. Change-Id: I728c532f9df7ccf85f353c23c6c7d8352d7b2086 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93235 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-07replace ODFDefaultVersion usage with ODFSaneDefaultVersionMichael Stahl
Compare with ODFSVER_012 mostly works the same, except for places where namespaces are defined where the ODFSVER_EXTENDED bit should be checked. Change-Id: I86469b763bc2f903632976bc9d6ec04d543d705e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92727 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-05-07tdf#118418 implement scrollSubstringTo() for gtkColomban Wendling
Define & use new accessibility scroll type compatible with IAccessible2 and extend the XAccessibleText interface to require scrollSubstringTo(). Co-authored-by: Martin Pieuchot <mpi@grenadille.net> Change-Id: Id3b2e8616892d7dcbfb41a14b72a8a457fd1dbf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89851 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-07fix memory leak of xmlDoc objectsNoel Grandin
in unit tests Change-Id: Id16731bbbe2f1b0e3642722d77aba04fc98db4cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93508 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-06tdf#131956 dispose progressbar when its target is destroyedCaolán McNamara
Change-Id: Id54ac3a0ebfd360e4107583af7fb978aa69d3288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93590 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-06tdf#101181: support for transparency attribute of glow effectMike Kaganski
Read/write support for ODF and OOXML (in ODF, loext:glow-transparency attribute of style:graphic-properties has been added). Added UI on glow sidebar panel. Not used in actual painting yet. Change-Id: I21b25d9c52c8611cd796f056374377ebf13cc2f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93565 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-06allow disabling Skia's Vulkan use in safe mode (tdf#132439)Luboš Luňák
Change-Id: I2991ace387356f049fba1a730041bbb4c62c876c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93562 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-05-06tdf#101181: implement glow effect also for SdrGrafPrimitive2DMike Kaganski
... using the implementation from f9fc420dceb1ece2c98767da16a21aaff771f140 that is already functional for SdrCustomShapePrimitive2D. For now, only for Draw/Impress. Change-Id: I4936e8276df2b21cb5c438e89c215b819e9b8a40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92636 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-05tdf90341 Clean up excessive const_cast'ingMesut Çifci
Change-Id: I6ab4f077325b7d8b9651475a5b776e7c3ddd9636 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93472 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-05tdf#118655:Move Wildcard/Comments option above Regular expressionsAditya
Place "Wildcard/Comments" option in find and replace dialog above "Regular expressions" option and the "sounds like (Japanese)" option in place of the older location of "Wildcard/Comments". Change-Id: I83dffb0689f128ad31b9223bc98ecc5914e4bf41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93410 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2020-05-05remove unused nSearchFamily and nMask membersCaolán McNamara
and so SetSearchMask which doesn't have any effect anymore Change-Id: I0b7f402ce0317971d5196fc448fe2945a6a292f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93393 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-05sw from-bottom relative orientation: add UIMiklos Vajna
And fix the value of LAST: it seems this went wrong in commit c2fc91664f71c447209d2cd29c0df1d7faba4927 (Convert LB flags to scoped enum, 2016-05-14), where the upper limit went from 0x80000000 to 0x080000, which means it started to matter if we allow equality or not. Other places compare LAST without allowing equality, so leave that unchanged and instead give LAST its own value. Change-Id: I0ceac18475f5f50b792c7a8442648c9ba2a25236 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93477 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-05-05make the family and mask explicit in SfxStyleSheetBasePool::FirstCaolán McNamara
Change-Id: I36655b65ca00e5f7b8779a28d4a1778c8e35dc4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93461 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-05SdrPdfImport: add a test class to sd and write a simple testTomaž Vajngerl
Open a simple PDF document, run the "break" action, check that we get the expected text as a text object. Change-Id: Iadb458f06b437689202eb013cb900edaabf17673 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93395 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-05drop SfxStyleSheetBasePool::CountCaolán McNamara
and use CreateIterator to make it explicit what is being counted Change-Id: I8d76aef601533960a23c056b83a48c4f130bbe75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93446 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-04SdrPdfImport: use convertPointToMm100 for all unit conversionTomaž Vajngerl
Change-Id: I78b3512cc0b9aea1fa4e9a810ec71eadd00b7635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93391 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-04Fix typosAndrea Gelmini
Change-Id: I63ae6adec1967bcf888538437e5e88f0acdea66e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93392 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2020-05-03SdrPdfImport: rename ImportText to InsertTextObjectTomaž Vajngerl
There are two ImportText methods, so rename one to something else to avoid confusion. Change-Id: I1ccc491fca47b2d72ba1f7bd5a75d325819ec041 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93333 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-03SdrPdfImport: fix garbled text at breaking the PDF graphicTomaž Vajngerl
The text size of OUString expects no. of characters, but we give the number of bytes as that is what we get from PDFium. Best to just not give the text size at all and let OUString determine that as the text shouldbe terminated correctly. Change-Id: Icc5cd6e851a9d2920faa9ca2eb6d827465483e72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93330 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>