summaryrefslogtreecommitdiff
path: root/unotools
ModeNameSize
-rw-r--r--JunitTest_unotools_complex.mk1873logplain
-rw-r--r--Makefile1418logplain
-rw-r--r--Module_unotools.mk1369logplain
d---------inc104logplain
d---------prj70logplain
d---------qa / complex / tempfile34logplain
d---------source283logplain
d---------util120logplain
unit (pixel) can heavily vary - it just covers a much larger logical area than the 'real' line/poly would do. All this needs to be handled (also for bound ranges) and can only be in a good way using primitives. Adapted to no longer do view-dependent changes in BorderLinePrimitive2D. Adapted to do these now at SdrFrameBorderPrimitive2D. Currently used to force the existing border partial lines (up to three) to not get taller than one logical unit. Adapted to no longer switch off AntiAliased rendering in VclPixelProcessor2D for processBorderLinePrimitive2D, this is problematic with various renderers on various systems (e.g. vcl still falls back to render multiple one-pixel-lines when taller than 3.5 pixels which looks horrible combined with other parts like filled polygons) All this needs fine balancing on - all systems - all renderers - all apps (which all have their own table implementation) - all render targets (pixel/PDF/print/slideshow/...) Done as thorough as possible, but may need additional finetuning. May also be a motivation to move away from vcl and implement these urgetly needed system-dependent primitive renderers... Adapted UnitTest testDoublePixelProcessing with the needed comments. Change-Id: Ie88bb76c2474b6ab3764d45a9cd1669264492acd Reviewed-on: https://gerrit.libreoffice.org/62344 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> 2018-10-24Reorganize FrameBorderPrimitive creationArmin Le Grand Step1: Basic concept, move stuff to svx and new SdrFrameBorderPrimitive2D Step2: Adapt all creators/usages to use SdrFrameBorderData/SdrFrameBorderPrimitive2D, check functionality Step3: Re-implement mergre of BorderLinePrimitive2D during decomposition of SdrFrameBorderPrimitive2D to keep the number of primitives low from the start, make merge optional (not urgently needed) Step4: Migrate and isolate all helper methods and classes involved in geometry creation of border lines to the implementation (.cxx) of the new primitive Change-Id: I840b6765439bd995f2c57ef36315427b1f0f3e21 Reviewed-on: https://gerrit.libreoffice.org/62247 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> 2018-10-08loplugin:constfields in svxNoel Grandin Change-Id: I643e8686e015ca85dd96221f1c93038f4fddf27b Reviewed-on: https://gerrit.libreoffice.org/61182 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-09-17New loplugin:externalStephan Bergmann ...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2018-08-20Simplify containers iterations, tdf#96099 follow-upArkadiy Illarionov Use range-based loop or replace with std::any_of, std::find and std::find_if where applicable. Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6 Reviewed-on: https://gerrit.libreoffice.org/59143 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-06-25tdf#96099 Remove trivial container typedefs in stoc, svl, svx, swArkadiy Illarionov Change-Id: I0b4d18d2120ba2ce7d2526332bec199f52393290 Reviewed-on: https://gerrit.libreoffice.org/56363 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-02-21loplugin:changetoolsgen in svxNoel Grandin and fix the regex in the plugin for matching += operator Change-Id: I26b3e3fac1d4ef3e756cc9431b983b5f27ee76d6 Reviewed-on: https://gerrit.libreoffice.org/50037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-01-30Fix typoAndrea Gelmini Change-Id: I8204875e480356cdb5ce7bc26996884eb1f4c131 Reviewed-on: https://gerrit.libreoffice.org/48859 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> 2018-01-29Fix typosAndrea Gelmini Change-Id: I67ea0d54a06f1280ccdbc1ce65b940d78df701b3 Reviewed-on: https://gerrit.libreoffice.org/48827 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> 2018-01-29BorderlineFix: Use svx::frame::Array tooling in Draw/ImpressArmin Le Grand For creating the needed BorderPrimitives for TableCells for the Tables used in Draw/Impress, adapt the ViewContactOfTableObj doing this to use svx::frame::Array tooling now. This will correct the error for not taking the neighboured connects for merged cells into account and unify one more space to the same tooling. Change-Id: I2e6f732985e9b963359f156628bd29ddfec1a80c 2018-01-29BorderlineFix: Fixed visual updates when scrollingArmin Le Grand For Cells with DoubleLine the connections to perpendicular DoubleLine-Styles may have to be displayed in a Cell which is 'around' the orig cell in a Cell-Border of one. To represent that and to avoid repaint errors when scrolling in, the preparation of Primitives has to take accordingly more neighbour cells into account. Tested this change with the usages in Calc, UI (Dialogs) and Calc exports Print/PrintPreview/PDF. This does not affect Tables in Writer and/or Draw/Impress. Change-Id: I3bcc68cdf7b4fc1825a87a9773892c359421024e 2018-01-29BorderlineFix: Corrected handling for 'rotated' CellBordersArmin Le Grand CellBorders can be rotated (including their Text) and need special visualization that is based on an own sheared/rotated coordinate system. Currently only possible for single cells (not merged ones) and needs to handle all borders (also bottom-right directly in the rotated cell, not in the neighboured ones to have the geometry, plus avoiding these in the non-rotated neighbour cells. Also corrected adding CellRotation data to svx::frame::Array in calc using SetCellRotations() which now gets called in the ScOutputData constructor to ensure it gets called in all places where it is used. Change-Id: I47bdfc29ba5ca76bbc07d98cb64733f867b1ee20 2018-01-29BorderlineFix: Avoid BorderLines to be too prolongedArmin Le Grand For MergedCells there was an effect that the BorderLines were painted too far in PrintPreview/Print/PDF visualization, found reason and changed. Checked (hopefully) all usages, looks good. Change-Id: I0acf8dcb20548a98533f3ab317ac72c0d0f0a947 2018-01-29BorderlineFix: Corrected missing borders in printArmin Le Grand In Print/PDF/PrintPreview border lines were missing, this happened for merged cells. It has to do with access to the involved Styles and/or 'Clip' set (to avoid creating everything). Thus a 'mixed' usage of cell and merged-cell stuff was needed. As it turns out support for this is already there, need to use it. Change-Id: Ic16085b97eef5c79a4501279432f43491bca350e 2018-01-29BorderlineFix: Need to redesign Borderline paint for CalcArmin Le Grand To fix some errors, need to change svx::frame::Array conversion to Primitives, especially regarding handling of merged cells. These make problems in the currtent form where the full extended merged cell tries to be converted. This is bad for cropped stuff and also wrong for double-line stuff attaching to a merged cell. The solution is to handle cells single and merge created primitives which is more expensive but will work. This will involve special handling for X-Ed (crossed) and 'roated' Cells. Also need to be very careful since all this is used in the meantime for all visualizations of Tables in multiple apps/situations. Change-Id: If0652a3ba97a6f27dd5d782ea22b1514303f3710 2017-12-29loplugin:passstuffbyref improved return in svxNoel Grandin Change-Id: I33bdbd416709ce46afb3c17aeab0d2e19a68ab30 Reviewed-on: https://gerrit.libreoffice.org/47150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-09-26Rename the basegfx::tools namespace to basegfx::utilsTor Lillqvist Reduce potential confusion with the global tools namespace. Will hopefully make it possible to remove the annoying initial :: when referring to the global tools namespace. Unless we have even more tools subnamespaces somewhere. Thorsten said it was OK. Change-Id: Id088dfe8f4244cb79df9aa988995b31a1758c996 Reviewed-on: https://gerrit.libreoffice.org/42644 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> 2017-09-25borderline: Refinement of line end overlapsArmin Le Grand Change-Id: Ifb1a061ed39f92a13ad5c7b2daf103f3a48938a5 Reviewed-on: https://gerrit.libreoffice.org/42712 Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> Tested-by: Armin Le Grand <Armin.Le.Grand@cib.de> 2017-09-18borderline: restuctured used classesArmin Le Grand Restructuring for more efficcient usage of helper values, some obstacles removed with that Change-Id: Ia8c4b2d4c423db9500cda507107d87913b79e23c Reviewed-on: https://gerrit.libreoffice.org/42409 Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> Tested-by: Armin Le Grand <Armin.Le.Grand@cib.de> 2017-09-15borderline: extended the expand logicArmin Le Grand Extended and checked the expand logic for creating the line extends. Now creating quite the right lines, will need to check some speccial cases. Also some cleanups. Change-Id: I3a3bd4d23c7017ecd873147df2d93af61de39fa6 2017-09-15borderline: Added merge BorderLinePrimitive2DArmin Le Grand Added BorderLinePrimitive2D merges for Writer and fixes. 2017-09-15borderline: merge redefined, mirrored StylesArmin Le Grand Redefined merge of BorderlinePrimitives, removed old Writer stuff for it. Also added support for handling Styles mirrored for extension calculations. 2017-09-15borderline: Adapted BorderLinePrimitive2D and usagesArmin Le Grand Big changes to BorderLinePrimitive2D and BorderLine, freeing it from one/three entries, going to a free definition using gaps with width but without color. Adapted usages and creation, not yet tested much Change-Id: Ic1255a790401901c3166d200205bc23322b37185 2017-09-15borderline: Adapt ViewContactOfTableObjArmin Le Grand Adapted to usage of svx::frame::Style helpers for primitive creation, need much less SvxBorderLine classes and less overhead. Class SdrBorderlinePrimitive2D completely removed. Working on Array::DrawRange to get it using the Coodinate Systems which are available and include the rotation. Solved problems in BorderLinePrimitive creation in DrawRange and DrawArray by completely restucturing these. Also changed to now return a sequence of primitives to the caller instead of handing over a primitive renderer and using it for each single primitve. This is a preparation for later buffering these and not re-create for each paint. Have now a working version that uses the Cell used by the Style and creates all info on the fly, so that the correct coordinate systems will be used. Works in Calc and it's dialogs with one or multiple cells. 2017-09-15borderline: Adapted Writer to use CreateBorderPrimitivesArmin Le Grand Also further refined svx::frame::Style, some more cleanups in svx using CreateBorderPrimitives, got rid of one implementation of CreateBorderPrimitives Change-Id: I4c2481181df4fc4aa0dbb4cb9f4352066b9d8ec0 2017-09-15borderline: move geometry creation to linear algebraArmin Le Grand Adapted Array::DrawRange to Style/Vector usages, feeding new CreateBorderPrimitives method. That one roughly feeds the old implementations to test and check (and keep working) Change-Id: I09557f826cd023d27db6b53e53aa69c149308711 2017-09-15borderline: Preparing further to use CellCoordinateSystemArmin Le Grand Multiple cleanups, made svx::frame::Style a std::shared_ptr class, preparing basing all border stuff on transformations, so it will need a CellCoordinateSystem. Added stuff to get this Coordinate System from the svx::frame::Cell using the Frame and knowledge about ownerships Change-Id: Ic2cb59cc92e648ac2fef72f22f8913479769d3e2 2017-09-15borderline: Abstraction of BorderLinePrimitiveArmin Le Grand As preparation for more detailed definition of BorderLine primitives I have adapted the BorderLine definition to work with motre possibilities to define the LineStartEnd definitions in a BorderLineExtend class. That one is flexible to hold all kinds of definitions - from none to all four possible extends (Start/End, Left/Right of vector) Cleanup of DiagStyle and others: DiagStyle is not needed anymore due to no longer using angles calculated, but being based on vectors defining the geometry. Also cleaned up quite a bit of no longer needed calculation stuff for the control. 2017-08-25loplugin:unusedmethodsNoel Grandin Change-Id: Iaaf9092ec4d6189492906648b84494d087fed81f Reviewed-on: https://gerrit.libreoffice.org/41539 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-08-05Fix typosAndrea Gelmini Change-Id: Ib7f43bf17ab8b9fb9d961a908d7620b50826a975 Reviewed-on: https://gerrit.libreoffice.org/40688 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> 2017-07-28borderline: corrections for calc and writerArmin Le Grand Made corrections/finetuning for Calc and Writer. Had to remove some former code which tried to do corrections. Change-Id: Id9fc687b9a709d250faaad76c37ecfda8d8feb9b 2017-07-28borderline: adaptions to primitivesArmin Le Grand Handling and paint of borderlines greatly adapted to primitive usage. Solved the double paint mechanisn to no longer use the sc-local special cases. The svx tooling for borderline paint is now the only one and was extended to also handle diagonal lines. Big cleanups/removals of old paint to OutputDevice and sc-specific rendering. All other app-usages of borderline also adapted. Preparations for careful line-start/end adaption prepared and possible due to unified coordinate-system usages and basegfx class-usage Change-Id: If9e4efcfc0fe25e14d4052907038ca5cf222a432 2017-07-28borderline: abstractions of primitive creationsArmin Le Grand Abstracted and adapted CreateBorderPrimitives further, added CreateDiagFrameBorderPrimitives for diagonal geometry. Change-Id: Ia2b20d197e1fd29ad9e9eb40a5194efdeac9872e 2017-07-12borderline: correct problems with border displayArmin Le Grand Borderline display with direct paint and with primitive direct paint has quite some errors in the current state. Started to unify usages, check deeper with creation/usage. borderline: deep changes to BorderLine Found basic error in determining the offset values for BorderLinePrimitive creation, these were not centered on the lines. Corrected that. This makes it possible to remove the formally used clipping which seems to have been used to correct that. Also allows to go back to a 'normal' decomposition that creates line primitives as expected. That again can then be painted quite normally. Also added view-dependent case to the decomposition to guarantee a gap of one discrete unit (pixel). Removed the direct painter, too. Checked and corrected stroking. borderline: Adapted previews to primitives Added code to use the primitive representation in all dialogs and apps using tables. The edit views use these mostly, so the preview should do that, too. Currently missing is a good visualization of diagonals, but this is also true for edit views. Checked all apps and table usages to not get worse borderline: correct line dash visualization When a dashed line is used, a factor of 10.0 was applied in the original coded, added that. Also the orientation of vertical borders was inverted since it was simpler to exchange Start/End, but this also mirrors the line dash visualisation, corrected that Change-Id: I4c1b380a76cb37389fab1259a53fb7cc9da982d1 e95e246d5563360617a2a2213e4d5ec7d0e736b9 62369b4de58fb0264aeb710ec6983ceddca5701d 77418cc6c84ebb0632f8c3448976e82ce612d6b6 b4eb28dc86ce05eb89b26517167305b994158ef8 borderline: adapt cppunittest and clang 2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> 2017-03-03Remove redundant 'inline' keywordStephan Bergmann ...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2016-03-17loplugin:constantparam in svxNoel Grandin Change-Id: I50fa7e4c7525d2f8107a11d8203957a47680eb80 Reviewed-on: https://gerrit.libreoffice.org/23303 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> 2016-03-15loplugin:constantparamNoel Grandin Change-Id: I270e068b3c83e966e741b0a072fecce9d92d53f5 2016-03-09loplugin:constantparam in svxNoel Grandin Change-Id: Ib2a432fc334898c75ab5e5cf629a21fd310bd467 2016-03-07loplugin:unuseddefaultparamsNoel Grandin Change-Id: Ia414f7845425ef73859ed04853378e96cc738795 Reviewed-on: https://gerrit.libreoffice.org/22971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> 2016-03-04loplugin:unuseddefaultparam in svxNoel Grandin Change-Id: Iacd4ed12c6c5dfdc2f31f85c8c1ce2cee8a8641f 2016-03-01loplugin:unuseddefaultparam in svx (part2)Noel Grandin Change-Id: I99e3d6137ec17e3fc782253c85e5fa4f1da4cec4 2016-02-09Remove excess newlinesChris Sherlock A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> 2015-05-15tdf#62475: partial handmade fixesAndrea Gelmini Change-Id: Ib9af202c43b916b9af4b4e18db35d470a8692fe4 Reviewed-on: https://gerrit.libreoffice.org/15712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> 2014-10-13create a macro library for implementing bit-flags typesNoel Grandin Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, changed from a macro- to a template-based solution. (Unfortunately MSVC 2012 does not support explicit conversion operators. Worked around that with explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a baseline that requires unconditional support for them.) Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396