Age | Commit message (Collapse) | Author |
|
Change-Id: If747870121e3fc8c2d97b5fc769b2d928a4c3f9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176777
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
We can use hashing to do an O(1) lookup instead of O(n)
linear scanning, this class is sometimes a bottleneck
in laying out large spreadsheets.
Change-Id: I4d27e8f339a8732535d832442a9d4a649da19e88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159801
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Removed some special stuff in the ItemSet/Item tooling regarding
ScPatternAttr. There are still quite a view (grep for
isExceptionalSCItem), but all these are identified and isolated.
Only for that Item (of over 500) are these exceptions, so that raelly
does not fit into the Item schemata in any way. Not even the pool
default of ScPatternAttr is without trouble. It is the only and last
Item that needs to be 'pooled' in the sense to avoid copies on any
price. That is OK, but should not be done in the ItemSet schemata.
In short: It should not be an Item at all. It should be changed
and renamed to something describing it's role (CellAttributes..?)
and get helped/assisted by something called CellAttributeHelper at
SC's model or Pool. It should not even be derived from SetItem, it
could just contain an shared_ptr of SfxItemSet (allows more and better
optimizations - think about Clone() and op==).
In parallel, all these hacks in the ItemSet/Item stuff could be
removed, making that faster and easier. Also quite some usages of
DirectPutItemInPool could be cleaned-up, this only exists since
there *is* no defined place to hold that data (coud be
CellAttributeHelper in the future). Putting Items directly to the
pool (and in most cases never remove them again) is just nonsense
and another hint that all this does not fit to the Item/ItemSet
schema at all.
This is now - after hard isolation of problems and have all working -
doable. It may be one of the next things to do, but there are
other candidates, too. Doing this would mostly only help SC...
Found another hack that uses DirectPutItemInPool and *never* removes
any Item again, see comments framelinkarray.cxx
And another one: PoolItemTest::testPool() explicitely tests
DirectPutItemInPool stuff - which makes no sense long-term,
but for now keep it and make it work by marking the slots used
as _bNeedsPoolRegistration == true
Have now overhauled the framelinkarray stuff to work without
DirectPutItemInPool and Cell not being a SfxPoolItem. That will
be much less complex and use much less calls/checks. Since this
is the data structure created for every calc repaint that should
get faster, too.
Also for now and memory loss security I added code to
DirectPutItemInPool to behave the same as with the unchanged
implCreateItemEntry: register Items so that the garbage collection
still is used. This will/can be removed when all usages of
DirectPutItemInPool is cleaned up.
Directly registering in DirectPutItemInPoolImpl is more tricky
than thought, but a good thing to do. Looking at that I saw that
tryRegisterSfxPoolItem is not used anymore, so rearranged some stuff.
Change-Id: If07762b0a25e2739027f81872441772dc82a25d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159685
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
ScDocument: :FillInfo() may result in calling it often.
Change-Id: I05d0582befc57c4959c33fae6dec3d340b8a49ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131338
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
no need to use shared_ptr here, this class is not doing copy-on-write.
Change-Id: I4e921bfc789cc5989d98b5f9ab7074eb7d5ac33e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100022
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Turns out we can save about 500Mb of preprocessor input if we use
rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper
rtl::math::approxEqual from rtl/math.hxx
and manage the fallout accordingly.
Before:
bin/includebloat.awk | head
sum total bytes included (excluding system headers): 19017296671
After:
$ bin/includebloat.awk | head
sum total bytes included (excluding system headers): 18535432672
Change-Id: I1691171f3a309405a7099882ad9989d147f59118
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
We always compared border width and other aspects only after that, Word
works with border weight according to their implementer notes.
So extend svx::frame::Style to be able to collapse borders using weights
and opt in for that from sw/ in case a compat mode (which is related to
tables, off by default and is set by the DOC/DOCX import) is set.
Change-Id: I1f682789302c88a0d326c6c0263ad3007441cb24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89052
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
check indentation of braces in namespace decls,
and the comments that often appear with them.
This is my penance for messing up the indentation with
clang-tidy-modernize-namespaces.
As such I have limited it to new-style namespaces for now,
and the check is off by default.
Change-Id: I4db7f10a81c79bc0eece8f8e3ee564da8bc7f168
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87723
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I067ea2f3cb651fdc5c3d1a09b0c55583618b9d1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87355
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I68110cdc5cff99a3bc15184c04ae309412511f9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86633
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I8a00f2823aa956afb995ee68c9f995bf08ad5239
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86824
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
...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>
|
|
using
git grep -lwP "Color\s*\(\s*(COL_\w+)\s*\)"
| xargs perl -pi -e "s/Color\s*\(\s*(COL_\w+)\s*\)//g"
and then some manual fixup where the resulting expression no longer
compiled
Change-Id: I0e268d78611c3be40bba9f60ecfdc087a36c0df4
Reviewed-on: https://gerrit.libreoffice.org/50372
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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
|
|
... at least since other single line styles than SOLID and DASHED
were added some years ago.
This causes an assertion from MSVC std::max in CppunitTest_sw_odfexport.
Change-Id: I2e0833b3d5c5afab259108be1c8782c4c4d26978
|
|
Adapted PaintCharacterBorder to also use new, enhanced
FrameBorders. Adapted some places, cleaned up old code,
enhanced tooling method CreateBorderLinePrimitivesForRectangle,
tested including PDF, Pint, PrintPreview.
Change-Id: If7b793b6520e899bde6f4211c993847af21ce7b9
|
|
Change-Id: I2c9ea6c38b75dcafeb36931b6c2e94489819144f
Reviewed-on: https://gerrit.libreoffice.org/45336
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Idc4d0186ecc6f0722c2b1358486a2430f037ae29
Reviewed-on: https://gerrit.libreoffice.org/45036
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I543b0943f0bc918d59debc8ee051f88c29d18454
Reviewed-on: https://gerrit.libreoffice.org/44553
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id8f863963cb2f34d81f2ad82353caaa2d03d59be
Reviewed-on: https://gerrit.libreoffice.org/42807
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
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>
|
|
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>
|
|
Change-Id: I59c6ca2af7a3aab55da6a29afa02dcd611492a59
Reviewed-on: https://gerrit.libreoffice.org/42452
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
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>
|
|
Decompose of BorderLinePrimitive2D extended to take care
of non-perpendicular line endings for matching. Improved
matching, one error in calc fixed
Change-Id: I869a75385711b58e6725daba0f22be8a98158ad9
|
|
The applied PatternScale factor was not consequently used in
svx::frame::Style so that the Previews in the Dialogs look weird.
Fixed that and stumbled over Writer applying it's own scale
which then was leading to double scaling, ceaned that up.
Change-Id: I89f41bfd7884e5e743080301e219491e215054c3
|
|
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
|
|
Redefined merge of BorderlinePrimitives, removed old Writer
stuff for it. Also added support for handling Styles mirrored
for extension calculations.
|
|
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
|
|
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.
|
|
Also further refined svx::frame::Style, some more cleanups
in svx using CreateBorderPrimitives, got rid of one
implementation of CreateBorderPrimitives
Change-Id: I4c2481181df4fc4aa0dbb4cb9f4352066b9d8ec0
|
|
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
|
|
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
|
|
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.
|
|
Change-Id: I52f062bf0b4c1af44576546d0593699758d71084
Reviewed-on: https://gerrit.libreoffice.org/42232
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: Ib7f43bf17ab8b9fb9d961a908d7620b50826a975
Reviewed-on: https://gerrit.libreoffice.org/40688
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Made corrections/finetuning for Calc and Writer.
Had to remove some former code which tried to do
corrections.
Change-Id: Id9fc687b9a709d250faaad76c37ecfda8d8feb9b
|
|
Overhauled the edge extension calculations to better
use all existing cuts, for cases with single and double
lines. Also a preparation for more complex edge cuts.
Changed BorderLine paint in Writer, it was setting the
svx::frame::RefMode attribute at the Style *and*
was manually moving the geometry which lead to a
double applying of the offsets
Change-Id: I446d04632050272849f43accb8dcbde574d10cf4
|
|
Overhauled BorderLinePrimitive to use two constructors
offering using one or three edge definitions for
construction to better refrlect possibilities. Adapted
usages. Better processing, less memory. Preparation
for using more decent LineExtend values (four per line
needed)
Change-Id: Iac9d9ae64874fea38fd6e2a04221698481cc0d0e
|
|
Added usage of defined extensions to the BorderLinePrimitive,
also added a first version to detect all cuts with adjacent
borders and produce the correct extensions, for single and
double lines. Not completely happy with it, but a first
version
Change-Id: I4b12a6cc0a70278bd5c506e9b3b2c5c126930dad
|
|
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
|
|
Abstracted and adapted CreateBorderPrimitives further,
added CreateDiagFrameBorderPrimitives for diagonal
geometry.
Change-Id: Ia2b20d197e1fd29ad9e9eb40a5194efdeac9872e
|
|
Change-Id: I0fec2abc1bed9c0cfcd78d1b0f6daebc335831be
Reviewed-on: https://gerrit.libreoffice.org/39982
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
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
|
|
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>
|
|
Change-Id: I77cf7fe3a57c031877facf5252b5a900526db48b
Reviewed-on: https://gerrit.libreoffice.org/35646
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
and rename to SvxBorderLineStyle
Change-Id: I19e530f162e4ca6290a0ad076e7fe3d5775ae6bc
Reviewed-on: https://gerrit.libreoffice.org/35265
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...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>
|