summaryrefslogtreecommitdiff
path: root/svx/source/customshapes
AgeCommit message (Collapse)Author
2022-03-04cid#1500546 silence Explicit null dereferencedCaolán McNamara
Change-Id: I44b97965548bd84adf6dc3ec1c67f028a4b31075 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131000 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-03Recheck modules sv* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I25779cbfb1aa93c31d6e12ac95e136b3bdbbc058 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130403 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-01Fix typosAndrea Gelmini
Change-Id: I13e7f1dc5d93f352e79139acb64b46dee298c9fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130186 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-21cid#1500477 silence Explicit null dereferencedCaolán McNamara
Change-Id: Ic57c49ce1c65ecca4e87be970e76bf16ba234711 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130273 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-17tdf#145700 Improve lighting in extruded custom shapesRegina Henschel
The fix tries to make rendering similar to MS Office. The ODF standard follows closely the extrusion in RTF and MS binary format. Rendering uses the 3D scene engine. The main problem was, that the z-component of the direction was interpreted with opposite sign. As result the maximum of a light was at false position. Especially a direction from the observer to the object has produced a light behind the shape and so looks as if light was off. The wrong z-direction has produced lighting, which was less intensive than in MS Office. To compensate that, a third light source was added as workaround. That part is removed. Second problem was wrong use of 3D-scene D3DMaterialSpecularIntensity and D3DMaterialSpecular (= UI Specular color). That was not only wrong in OOo but in my previous patch too. D3DMaterialSpecularIntensity corresponds to MS property 'c3DShininess'. Relationship is Intensity = 2^c3DShininess. D3DMaterialSpecular is calculated from MS property c3DSpecularAmt and and c3DKeyIntensity. The light source was missing, but needs to be included, because c3DSpecularAmt is 'the ratio of incident to specular light that is reflected on a shape'. The old unit tests are adapted to this change. MS gives no information how it softens a light in case of harsh=false. ODF specifies it as 'implementation-defined'. The patch uses four additional lights, which have directions in 60° angle to the original light. The light intensity is distributed. That comes near to rendering in MS Office. Changing our 3D engine to provide 'soft' lights was not doable for me. The way MS Office renders a 'metal' surface is different from ODF specification. To distinguish the kinds, I have introduced a new property MetalType. I have discussed it with the ODF TC (see minutes from 2022-02-07) and got the advise to use namespaced values. Therefore the datatype is not boolean. The 'Surface' drop-down in the extrusion bar is changed to make the two kinds of rendering 'Metal' available to the user. If a user sets surface 'Metal' in the UI of MS Office, it sets not only fc3DMetallic but reduces the value of c3DDiffuseAmt in addition. Our 3D-scene engine has the corresponding ODF attribute dr3d:diffuse-color not implemented. To get a similar rendering I change the material color of the 3D-objects as workaround. Change-Id: Ia986b9c318b4c79688e0c0e2d858215b9d612fdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128449 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2022-01-07remove E3D_INVENTOR_FLAG and convert SdrObjKind to scoped enumNoel Grandin
We don't need E3D_INVENTOR_FLAG, we can just check if the SdrObjKind is in the right range. Which exposes some dodgy code in DrawViewShell::GetMenuStateSel SfxItemState::DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || SfxItemState::DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || which has been there ever since commit f47a9d9db3d06927380bb79b04bb6d4721a92d2b Date: Mon Sep 18 16:07:07 2000 +0000 initial import just remove that. In SwFEShell::ImpEndCreate() move some logic around to avoid using an out-of-range SdrObjKind value Change-Id: I4620bfe61aca8f7415503debe3c84bfe5f4368a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-16Fix typosAndrea Gelmini
Change-Id: I66feced8bed05c7859e36a6d2f746a7faf30c7a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126915 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-12-15tdf#145904,tdf#145956 improve extrusion of custom shapesRegina Henschel
The patch addressed these errors: The property Origin is relative to the bounding rectangle of the shape not to the snap rectangle. That error is visible e.g. for a block arc. Rotation center x- and y- values are relative to the snap rectangle and not absolute. Rotation center z-value is in Hmm and needs conversion to Twips in Writer. Rotation is around rotation center, which might be different from shape center. That has been ignored. I have moved calculation of the 2D logic rectangle of the scene to main method to be able to reuse the transformation and other values. I consider using a special local class as unneeded overhead. I have reordered some parts to bring geometry relevant parts together. Change-Id: I35ad0721091b365ae99cd3d7b2afb0ad7efe47fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126847 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-12-09VCL implement GetGlyphOutline fallbackArmin Le Grand (Allotropia)
Change-Id: Ia0b32f7fb9f39d8bea18afd12df3cc95ba8077ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126463 Tested-by: Jenkins Tested-by: Armin Le Grand <Armin.Le.Grand@me.com> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-11-19Drop F_PI1800/F_PI18000, and unify deg2rad/rad2deg conversionsMike Kaganski
Change-Id: Ib89b00c3dc8cd440e8a88906eea133becd1cef64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125509 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2021-11-19Drop F_2PIMike Kaganski
Change-Id: Ie98606607b2ce262e4eed76bb8cd86fbfe846f76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125506 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-19Use M_PI* instead of F_PI*Mike Kaganski
Change-Id: Ie2b7a1c74fc516781a17a20157b8217bc41e383d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125504 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-08Fix typosAndrea Gelmini
Change-Id: I945c72ce9065d0c59e7ebcb96c70995d5333b67f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124841 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-06tdf#140321 enable 'matte', 'metal' extrusion surfaceRegina Henschel
The patch makes extrusion surface presets 'matte', 'plastic' and 'metal' look different from another. That has been broken from the beginning of custom shape extrusion in OOo2. To get 'matte' ODF conform, property first-light-harsh is enable. To keep smooth rendering set by PowerPoint, forcing shade mode 'flat' is removed. For more details about the change see comment in bug tdf#140321. Change-Id: Idd1e0af19ea3f7e604da7f10330c6f9e640d08f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124720 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2021-10-31add o3tl::span ctor from std::vectorLuboš Luňák
Makes code simpler, and std::span can be constructed from std::vector too. Change-Id: Iae26b53c52148c19d9068a63126a7393d098d654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124507 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-10-31Prepare for removal of non-const operator[] from Sequence in svxMike Kaganski
Change-Id: Ib5fda9469f9a1987cf9071c0e228c582cfb3dfa1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124397 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30tools::Long->sal_Int32 in the DX arraysNoel Grandin
Change-Id: I36ddc11b39763dc77086591fe9bb756195b4294f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-29pass DX array around using o3tl::span instead of pointerNoel Grandin
so we get bounds checking in debug mode Note that I cannot just pass around the std::vectors involved because there is a place in editeng which calls with a subset of a vector. Change-Id: I5088a139593c27bf9cbe5d843ab4b0048ac6d508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124330 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-25ofz#40305 Divide-by-zeroCaolán McNamara
Change-Id: Ib865d880d51d5beef1f235e4a8d5d0c17adf8499 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124153 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-21tdf#145245 correct relative position of extrusionRegina Henschel
ODF specifies for draw:extrusion-depth, 'The draw:extrusion-depth attribute specifies the depth of an extrusion. It takes two white space separated values. The first value specifies the depth of the extrusion in units, the second value specifies the fraction of the extrusion that lies before a shape. The second value shall be in the range [0,1].' The default for the second value is 0. Because LibreOffice has no UI to change the value, the error becomes only visible, if you create own custom shapes. On import the ODF values are put in CustomShapeGeometry>Extrusion> Depth. Method GetExtrusionDepth() calculates from that the length values rBackwardDepth and rForwardDepth so that its sum is the depth. CreateCustomShapeProperties() in escherex.cxx#2699 and ApplyCustomShapeGeometryAttributes() in msdffimp.cxx#1684 use them in the same sence. But methods Create3DObject() and CalculateNewSnapRect() in EnhancedCustomShape3d.cxx have used these values as if they were coordinates. I have keept the calculation in GetExtrusionDepth(), because it reflects the meaning in ODF. I have corrected the signs in Create3DObject() and CalculateNewSnapRect(). Change-Id: If275bb263b6f3d790f5893a69f38f8433acfbe7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123997 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2021-10-17tdf#144988 correct font size in multiline Fontwork textRegina Henschel
The error happened if ScaleX in TextPath is true. In that case the original font size is used for rendering if possible. Only if a paragraph is longer as its sub-path length, the rendered font size for the whole text is reduced until the text fits. The error was, that in case the first paragraph was too long and the second paragraph fits, the fact that the first paragraph was too long was overwritten from the factor for the second paragraph. That resulted in wrong position and size of the text and overlapping characters. The meaning of fScalingFactor is related to the usual case, where ScaleX is false. Keeping original font size is not achieved by using value 1 for fScalingFactor (which would be obvious), but the adaption to case ScaleX==true is done in FitTextOutlinesToShapeOutlines() by tweaking the width from the text bounding rectangle. Change-Id: Icf5829018a83be0f1197304d17da10a88130f702 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123714 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2021-10-16tdf#145111 evaluate nVertDiff for HORZADJUST_LEFT tooRegina Henschel
In case of ScaleX=true in property TextPath, SDRTEXTVERTADJUST is evaluated and should shift the Fontwork text. That did not work for 'LeftTop' and 'LeftBottom'. Error was that in case of SDRTEXTHORZADJUST_LEFT the vertical shift was not considered. Change-Id: I4edb47515c4bf40e17b4054c3a10220df8468028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123613 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2021-10-13tdf#145004 remove fontwork text padding for case ScaleX=trueRegina Henschel
The setting ScaleX=true in property TextPath in CustomShapeGeometry is used in import of WortArt of kind 'Follow Path' from MS Office. The value 'true' means, that the text is not stretched to the path but its original font size is used as long as enough place is available. The method CalculateHorizontalScalingFactor() has increased the scaling factor by 10 percent to make a 'padding'. That results in a too short text and a gap at start and/or end. The problem is not only visible in imported shapes but in user designed Fontwork shapes too. PowerPoint has no 'padding'. Currently our own preset Fontwork shapes always use ScaleX=false and therefore are not affected. I have not found any reason for such padding. So this patch removes it. Change-Id: I7f2c4eb9101be1f13b006d4178ffbe75eb4ed55a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123295 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2021-09-28vcl: rename OutDevState to StackChris Sherlock
I have moved the header file to include/vcl/rendercontext as this will eventually be part of the RenderContext split from OutputDevice. State and associated enums have also been moved to the vcl namespace. I have also moved ComplexTextLayoutFlags into the vcl::text namespace. Change-Id: I0abbf560e75b45a272854b267e948c240cd69091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-22xtend loplugin:stringviewparam to starts/endsWith: svxStephan Bergmann
Change-Id: I998b5e7ba3580aabfc454ce3354bffd3d0cb7d61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122479 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1Mike Kaganski
The header got some changes: 1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace 2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace of uses of OImplementationId with it, including in XTypeProvider 3. Introduce convenience functions 'getSomething_cast' to cast between sal_Int64 and object pointers uniformly. 4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make it a bit shorter, and to reflect its function better. Templatize it to take also css::uno::Any for convenience. 5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it handle cases both with and without fallback to parent. 6. Adjust UNO3_GETIMPLEMENTATION_* macros TODO (in separate commits): - Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation - Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-08simplify static_cast after dynamic_castNoel Grandin
Change-Id: I53ae7f18519fdd878730d1d0316ebc408271c66d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04use std::vector for fetching DX array dataNoel Grandin
because I'm trying to track down a related heap corruption, and that is much easier if the access to the array is checked by the std::vector debug runtime Change-Id: Ia665f5cebb7f14d88942e88b4b400ad3c28ef5d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-19Drop GetSdrObjectFromXShape and use SdrObject::getSdrObjectFromXShapeMike Kaganski
Change-Id: I0d233878ee49fcdc1338ec3bd700e5482d558163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120694 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-18undo changes to TextAlignCaolán McNamara
revert commit 8689bd5490b473a7ffb149bbe5f7f0683f679c72 Author: Caolán McNamara <caolanm@redhat.com> Date: Thu Jul 29 20:49:29 2021 +0100 convert TextAlign to scoped enum lets leave this as it always was Change-Id: Id4d2a5644974cdd2b0ed6d361d5c52629674d057 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120626 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-17rename SetRectsDirty->SetBoundAndSnapRectsDirtyNoel Grandin
because there are lots of things being marked dirty, and I like to be sure I know what the code is doing Change-Id: Ifd0380c5560adc4a054495551885fe33af4f3e5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120460 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-16pass OutlinerParaObject around by valueNoel Grandin
since it uses o3tl::cow_wrapper, so it is really just a wrapper around a pointer, no point in allocating it on the heap Remove assert in SdrText::SetOutlinerParaObject, which was bogus anyhow, because it was comparing pointers, not deep equality. And since we are now being more efficient and avoiding copying of the internal data in OutlinerParaObject, we hit this assert. Change-Id: I6dbfaab5ee2ca05b2001baf63110041e469df9c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120510 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03simplify lookup maps in EnhancedCustomShapeTypeNamesNoel Grandin
simplify initialisation, and use OUString as the key to avoid conversions during lookup Change-Id: I0b1f1f461a4d2375cd92d13bb3333c8e0b887ee7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119897 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-30convert TextAlign to scoped enumCaolán McNamara
Change-Id: Id2c466eacb44f0ea6adba75a0ac0be8be8e7ed4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119682 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28tdf#139549 DOCX import: document got modified at import timeRegényi Balázs
Regression of bda05ba17362222b74727872579b65b3fa14e3d8 "tdf#41466 DOCX import: fix VML v:shape/v:textbox". Co-authored-by: Tünde Tóth Change-Id: I8762aa8a710c3a37290e1db854b8cc86db6757b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109436 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-05-03loplugin:unnecessaryparen small improvementNoel Grandin
when calling a function, and passing only one arg, but the function has defaulted args, we were ignoring this case. Change-Id: I86517f18e30531127664088ddc09ef96dbd8bdf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115033 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-29remove support for BITMASK in vcl backendsNoel Grandin
Rather use a proper alpha channel if we need transparency. This is another small step towards merged alpha in our vcl layer. I suspect the intent in a lot of this code was to save memory. Which have been a thing way back then, but these days our backends mostly end up doing a copy-and-convert to a real alpha channel anyway, so the existing code is actually now a pessimisation. Change-Id: I4a2bcbb2f76b841f05bc00580f364492829c69de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114808 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-14static_cast after dynamic_castNoel Grandin
Change-Id: I77cbf11e26c91bf634d708117eb801c8d8057050 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-23ofz: Integer-overflowCaolán McNamara
convert to double earlier Change-Id: I6d6a1bf3a09161772eb11a5ac260dc0cac2b6e0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112944 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-14Move unit conversion code to o3tl, and unify on that in more placesMike Kaganski
This also allows to easily add more units, both of length and for other unit categories. The conversion for "Line" unit (312 twip) is questionable. Corresponding entries in aImplFactor in vcl/source/control/field.cxx were inconsistent (45/11 in; 10/13 pc; 156/10 pt). They were added without explanation in commit c85db626029fd8a5e0dfcb312937279df32339a0. I haven't found a spec of the unit (https://en.wikipedia.org/wiki/Line_(unit) is not specific). I used the definition based on "by pt", "by mm/100", "by char" (they all were consistent); "by pc" seems inverted; "by twip" was half as much. This accepted conversion makes unit test for tdf#79236 pass. Change-Id: Iae5a21d915fa8e934a1f47f8ba9f6df03b79a9fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110839 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-03use more unique_ptr in EnhancedCustomShape2dNoel
and fix some leaks in the unit tests Change-Id: I8d324a24de11b14b4820e3cdd7f078d5877489e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110288 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-02introduce Degree100 strong_int typeNoel
Change-Id: I78f837a1340be0ca5c49097f543a481b7b43a632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108367 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-24custom literal for Degree10Noel Grandin
Change-Id: Id13869138a622e62d9ffebf2c89bddccda6aff01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-23add utility NbcRotate methodNoel Grandin
Change-Id: I66d016a22158f9f9ef68a80842e95e45516f0b4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108228 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-22rename members of GeoStat classNoel
to make it obvious what they are used for. Change-Id: I8ed825ea0131faa969fa3fd69cd64d195ef61b6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108145 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-25tdf#42949 Fix new IWYU warnings in directory svxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If578c5119b85f991825e91df37c42e28f16e9de5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100555 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-16Instead of labs, use overloaded absStephan Bergmann
...more likely to pick an appropriate version for the involved integer types, esp. after the recent long -> tools::Long changes Change-Id: Ia91259ca35aaf74b0e907de6831fc926f30057f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>