summaryrefslogtreecommitdiff
path: root/svx/source
AgeCommit message (Collapse)Author
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-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-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-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-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-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-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>
2020-05-03SdrPdfImport: rename some variables to non-abbreviated namesTomaž Vajngerl
Change-Id: I1cb004a8e426f8ea26bb930d4897db3763433b31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93329 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-01improve loplugin:makesharedNoel Grandin
to find places where we are converting stuff to unique_ptr instead of using std::make_shared. As a bonus, this tends to find places where we are using shared_ptr where we can instead be using unique_ptr avoiding the locking overhead. Change-Id: I1b57bbc4a6c766b48bba8e25a55161800e149f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-29tdf#132338 better match the original width of the font name comboboxCaolán McNamara
using entry_width_chars to specify how much characters in the Entry to use to show the font name makes the most logical sense. Doing that would make the widget wider under gtk that is currently is, which is arguably too narrow, but being wider would probably mean some toolbar contents wouldn't fit on small screens generating complaint churn. So, match the original width using LogicToPixel rather than get_approximate_digit_width where the latter uses the width of the widest digit in the font, and the former uses 1/8th the width of "aemnnxEM" Change-Id: I1bb6970faa6fc34830681902640fe1f61e3cc55e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93151 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-29Remove tango icon theme, tdf#132022Rizal Muttaqin
Change-Id: Ifd1d3999d1c6eb9aba7919850859e6b7cb652e3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92055 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-04-29simplify handling of comparing XML_NAMESPACE valuesNoel Grandin
Change-Id: I18bbf1ee206285842250891ce556d523489855b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-28move the castToFastAttributeList functionNoel Grandin
to the slightly higher namespace, to make it easy and more readable to use directly in a for-loop-range expression. And make it return a reference rather than a pointer, since it is never allowed to be nullptr. Change-Id: I15d0b32493ef65cfc601b247c272b318f1eadfd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93049 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-28resolved clashing of two idsPranam Lashkari
Multiple SvxFillAttrBox objects having the same ID 'fillattr' caused the problem in online making it hard to distinguish for different function Change-Id: Ic5a29ea75fb442d7e495761faf4a10d6ab212829 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92977 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-27drop unused usingCaolán McNamara
Change-Id: I89c6892b51d651a25aff9c36c02c93374138635f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-26move PanelLayout to sfx2Caolán McNamara
Change-Id: If29ccb67835adba3ff6cf2eb53f348bbe71d6463 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92933 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-26all ItemWindows are now weldedCaolán McNamara
where native widgetery is hostable in a vcl toolbar or a native one Change-Id: I942ada335bb4bd6ced0f3352f632e25787f68597 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88598 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25rename SvtValueSet back to ValueSetCaolán McNamara
Change-Id: I51ab96ffef7acc0d416d13ac8e380e49381f4d1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92902 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25rename ColorValueSet back to SvxColorValueSetCaolán McNamara
Change-Id: I2036a8986d2d53fc97f1c7724e4e0ab837edc1ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92900 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-25remove newly unused ValueSetCaolán McNamara
Change-Id: Ia2c587af9846129278caf66ab504d1a1a1ac6256 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92897 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>