474805 Commits

Author SHA1 Message Date
Luboš Luňák
6c8dffc19e compute subset of glyphs in SalLayoutGlyphsCache (tdf#139604)
When OutputDevice::ImplLayout() computes glyphs, the result
is always the same for the same string (and font etc.),
and if the function is asked to work on just a subset of the string,
the returned glyphs are often also a subset of glyphs for the full
string. Since e.g. EditEngine breaks text into lines by first
laying out a full string and then repeatedly calls the same function
for a subset of the string with increasing starting index. So if
the full result is cached, it's faster to just make a subset of that,
adjust it as necessary and return that, instead of doing a layout
again.

This requires support from harfbuzz to tell us if it's safe to break
at a given position, and HB_GLYPH_FLAG_UNSAFE_TO_BREAK is that
(https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-glyph-flags-t).

I'm keeping the optimization for tdf#144515, as avoiding the extra
layout altogether is still useful.

Change-Id: I33f70f9af89be79056e464908eac0861f58d274a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132753
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-14 08:34:20 +02:00
Szymon Kłos
63abdec59d lok: send status update for .uno:SplitCell
Change-Id: Ic972d3ff3334f4c3a507868a95ac955c9ffbc614
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132585
Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132871
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-04-14 08:30:42 +02:00
Seth Chaiklin
3b222bcd75 tdf#147107 "chapter" -> "item" in B&N toolbar and menu
Changes to:  Move Chapter Up, Move Chapter Down,
               Move Chapter Up with Subpoints,
               Move Chapter Down with Subpoints

   Also capitalization correction ("With"->"with") for
   Demote Outline Level with Subpoints in Bullets & Numbering
   toolbar and menu.

Change-Id: Iacb0e798c54bf4101f7048454007bf58ec4081c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132869
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-04-14 04:27:05 +02:00
Xisco Fauli
187bf06aab tdf#114303: sw_rtfexport4: Add unittest
Change-Id: Id07c834a58db7aedada8a923a464f554f30f3013
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132973
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-04-14 00:41:51 +02:00
Caolán McNamara
056b81ff51 Resolves: tdf#148122 Celtic MD font appears wrong
Change-Id: Ib551f073b8ea0e0662660ccf01ebf56c2fd7f340
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132978
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-13 22:12:22 +02:00
Stephan Bergmann
58f533029b Clean up O[U]StringBuffer ctors taking a length parameter
For !LIBO_INTERNAL_ONLY, go back to the state before
d91d98a53612a972de368186415aa48698e074d9 "fix gcc-4.0.1 and/or 32bit build for
string literals" of having just a sal_Int32 overload.  (For !LIBO_INTERNAL_ONLY,
the current state was confusing, as the existence of further overloads depended
on __cplusplus >= 201103L.)

And for LIBO_INTERNAL_ONLY:

* Have overloads for all integral types, with an assert checking that they do
  not use out-of-bounds length arguments.  (The std::make_unsigned_t dance in
  the assert is needed to avoid signed/unsigned mismatch warnings as seen at
  least with MSVC.)  This removes the need for explicitly casting arguments that
  are larger than (unsigned) int.  (And I cleaned up two such places that I had
  become aware of with the abandoned previous attempt
  <https://gerrit.libreoffice.org/c/core/+/132825> "Let O[U]StringBuffer ctors
  take sal_Int32 length parameters"; there may be more places to clean up,
  though.)

* Have deleted overloads for all integral types that are not actually integer
  types.  (This excludes signed char and unsigned char, as at least

>                             OUStringBuffer aBuf( rToken.GetByte());

  in ScTokenConversion::ConvertToTokenSequence in
  sc/source/ui/unoobj/tokenuno.cxx does a legitimate call with an argument of
  type sal_Int8 aka signed char.)

Change-Id: I2df77429f25b74f19cc3de5064e6fd982e87b05e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132951
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-13 21:46:48 +02:00
Michael Stahl
ab65a74998 ucb: webdav-curl: oops, increment after checking
Change-Id: I8c51fa88253dbda595eb859d58408ad70ad661e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132982
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2022-04-13 21:33:29 +02:00
Noel Grandin
0d55188fbf use more string_view in xmloff
Change-Id: I0d860fa6e3d3261f3393e912b27930066dd93f7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132972
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 20:36:16 +02:00
Noel Grandin
902e81b1b0 use more string_view in configmgr
Change-Id: Ia8aab5ea1a03d1512a1da806d505ce06f6977828
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132971
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 20:35:21 +02:00
Tor Lillqvist
ab61263300 Follow-up fix to Collabora Online "addfont" handling: avoid assertion failure
Change-Id: Ib75954a39d515088dbd432d0aa0ca5893194ecc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132970
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-04-13 20:09:54 +02:00
Michael Stahl
2bc4d1d22f ucb: webdav-curl: only allow system credentials for auth once
... and in any case abort authentication after 10 failed attempts.

Apparently some PasswordContainer can turn this into an infinite loop.

Change-Id: Ib2333b371a770999e8407ce7e1af21512aadb70d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132974
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-04-13 20:09:18 +02:00
Noel Grandin
1aced94715 use more string_view in sfx2
Change-Id: I36db3d26a576adeb4d2427c28320096d5464f565
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132964
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 19:02:00 +02:00
Michael Weghorn
d2572dc9d6 android: Deduplicate LOKitThread#load{,New}Document
After Change-Id I15ecc2eba6c5ee441f6e14f8229594cab05dbba7
"tdf#148556 android: Don't delay refresh when loading doc",
the only thing that `LOKitThread#loadNewDocument` does
in addition to `LOKithThread#loadDocument` is to save the
newly created document (to a temp file) if loading was
successful.

So, have `loadDocument` return a boolean saying whether
loading was successful and call that method from
`loadNewDocument` to reduce duplication.

Change-Id: I9b99e011b3f5105bb60f95174de393462ff08271
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132966
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-13 18:23:02 +02:00
Michael Weghorn
4476fd51a3 tdf#148556 android: Don't delay refresh when loading doc
The previous way of using a separate Runnable
to do the refresh and posting that to the
main handler instead of doing the refresh
right away resulted in a timing issue, due
to which it could happen that a Calc document
would not be rendered when initally loaded
(but only after another tile reevaluation was
triggered, e.g. by tapping on the screen).

While this appears to happen mostly on fast hardware,
I could reproduce on my AVD as well when increasing
the minimum time that has to pass between
tile reevaluations to 100 ms:

    --- a/android/source/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java
    +++ b/android/source/src/java/org/mozilla/gecko/gfx/ComposedTileLayer.java
    @@ -157,7 +157,7 @@ public abstract class ComposedTileLayer extends Layer implements ComponentCallba
             }

             long currentReevaluationNanoTime = System.nanoTime();
    -        if ((currentReevaluationNanoTime - reevaluationNanoTime) < 25 * 1000000) {
    +        if ((currentReevaluationNanoTime - reevaluationNanoTime) < 100 * 1000000) {
                 return;
             }

For the bad case, the Runnable that triggers the
refresh would be taken from the message queue and
run on the main thread at a point in time that
resulted in `LOKitShell.sendTileReevaluationRequest`
not getting called in `ComposedTileLayer#reevaluateTiles`
due to the above-mentioned minimum time in between
tile reevaluations.

Avoid the problem and simplify the whole handling by
no longer posting a Runnable to the main handler, but
calling `refresh()` right away.

Posting to the main handler had been introduced in

    commit 27326e0f587c20d8dcf1595829233de1bd3fbe9e
    Date:   Fri Aug 3 07:13:00 2018 -0700

        tdf#119082 Exception wrong thread on Android Viewer

to avoid crashes due to things being done on the wrong thread
when switching to another app and then back to Android Viewer
(s. tdf#119082), but that is no longer a problem, because the
document is no longer loaded anew in that case since

    commit 1bc42472200c32c9a0a10dd1c3cd6c6a8a5d47d2
    Date:   Fri Apr 9 13:59:43 2021 +0200

        tdf#95517 android: Rework app/doc lifecycle handling

, so the code path is not used there any more, but only when
the document is initially loaded, triggered in
`LibreOfficeMainActivity#onCreate`.

After all, the problem seems to be a similar one as fixed in

    commit 128f67e0efa02294205a1abe1be874557ecdcecd
    Date:   Tue May 18 14:27:51 2021 +0200

        tdf#142348 android: Avoid extra refresh after loading doc

, where another timing issue in the handling of a refresh event could
result in a blank page instead of the Calc doc being rendered.

With the refresh being done right away, the synchronization added
in

    commit 55661298bb3e9087a89a08637e4285f090c4e0e8
    Date:   Wed Apr 1 09:00:13 2020 +0200

        tdf#131195 android: Don't destroy doc while loading it

is also no more needed, because the situation described in its
commit message no longer applies:

> Since the 'refresh()' in 'LOKitThread::loadDocument' is
> not executed synchronously but posted to the main handler,
> this needs to be synchronized to prevent the document from
> being deleted while it's being used.

Change-Id: I15ecc2eba6c5ee441f6e14f8229594cab05dbba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132965
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-13 18:22:49 +02:00
Michael Weghorn
827d97887a tdf#148553 liblo-native-code: Add services for numeric controls
Change-Id: I67727b8ced6c501f0e220fa2024976640ca7028a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132950
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-13 18:22:29 +02:00
Luboš Luňák
cd1b93aafa empty SalLayoutGlyphsImpl is not automatically invalid
Empty SalLayoutGlyphs is considered invalid, because otherwise
it should have at least one *Impl, but an empty *Impl is apparently
possible if it's a fallback but it doesn't find a single glyph.
This avoid the warning in OutputDevice::ImplLayout(), triggered
e.g. by CppunitTest_writerperfect_writer.

Change-Id: I410d269b07ffb73f9860806ede9cd0b809668342
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132968
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-13 17:42:46 +02:00
Hossein
3a641c344d Add info on limerest / dump drawyinglayer primitives
* Add information on dumping drawyinglayer primitives as xml
* Add link to a new tool named limerest on gitlab

Change-Id: I50a0018d9c3063281b2a761d437bb9def0f34bde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132936
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-04-13 17:04:35 +02:00
Noel Grandin
239752d358 use more string_view in vcl
Change-Id: Iabe6c14d17c7805fcc3697cd919234abe3f0a0f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132963
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 16:55:54 +02:00
Noel Grandin
dae0083c69 use more string_view in svl
Change-Id: I9b6a074eb6342808d02a69f3ed1fa713e81d2608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132958
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 16:55:35 +02:00
Noel Grandin
a5343a89f8 use more string_view in cppu
Change-Id: Ifd2ee4827e0083ffaff9120fee239fb16553380e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132957
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 16:11:49 +02:00
Noel Grandin
74957c7d2f use more string_view in l10ntools
Change-Id: I93958e8e2dc1e172413ff697d6b6be975cff064d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132956
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 16:11:27 +02:00
Caolán McNamara
e8c2ae74ea give SwParaPortion a const GetDelta() and non-const SetDelta()
instead of two GetDeltas() one of which is non-const and returning a
reference that can be used to modify the delta

no logic change intended

Change-Id: Ia5788bfffd169a589eb9b9b141b60575ab165391
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132953
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-13 15:52:08 +02:00
Mike Kaganski
064f4fe82c tdf#139991: move 0-byte file handling to SfxFrameLoader_Impl::load
This centralizes the code that handles templates, and allows the empty
files to use default templates.

This partially reverts commits:

ada07f303e7cd1e39c73abe0741aefe7d9d73a57
  Author Miklos Vajna <vmiklos@collabora.com>
  Date   Wed Oct 28 14:54:52 2020 +0100
    tdf#123476 filter: try to detect 0-byte files based on extension

2854362f429e476d4a1ab4759c6a1f1c04150280
  Author Mike Kaganski <mike.kaganski@collabora.com>
  Date   Wed Jan 27 16:05:54 2021 +0100
   tdf#123476 filter: Also handle empty ODF

dff586735b6618d9b011823594a33287d8f7f223
  Author Mike Kaganski <mike.kaganski@collabora.com>
  Date   Mon May 03 17:04:04 2021 +0200
    tdf#123476: also use filter by extension when its service is the same

The unit tests from these commits are retained and extended for templates.

Change-Id: I755738d2d5a6d6955d84d6e12f3accc017e0391f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132938
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-13 15:46:59 +02:00
Caolán McNamara
15f70da655 upgrade to libwebp-1.2.2
Change-Id: I76e11f21ecf2da7803407fa4bf6556b545f8f4a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132949
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-13 15:46:44 +02:00
xuenhua
0be4802393 Fix typo
Change-Id: I77ee60e6e7c5482f49cb671d793687f831856628
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132918
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-04-13 15:07:01 +02:00
Noel Grandin
05867c4e5f tdf#80633 speed up dialog layout
some small speedups when opening Format->Paragraph

Change-Id: If97725ecff45b9c2c01b405e153ec05b12882573
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132952
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 13:44:44 +02:00
Tor Lillqvist
5de22d1e55 Handle "addfont" from Collabora Online
We use the AddTempDevFont() API to add a new font. Sadly there is no
corresponding way to remove such a temporarily added font.

Change-Id: I6fe61919daa5af29e964cec1caf7293aefa8ea4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132948
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-04-13 12:54:04 +02:00
xuenhua
64c61aeb6b Fix the error message for GNU Make version
Change-Id: I65b2c02badf619da284a3d5191270e412ae2834e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132739
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-04-13 11:04:23 +02:00
Mike Kaganski
b210c45d19 Move extension preparation out of the loop
Change-Id: I6e4b5397e3d0ae9b943e261e9fca95735ccc9a73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132866
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-13 10:34:07 +02:00
Justin Luth
55c7691fad tdf#148380 doc: Import AUTHOR/CREATEDATE as FIXEDFLD
Writerfilter already did this earlier in the patch set.
So now change DOC format to do all the same things.

Change-Id: I8db2b4e3fc227b73c4d075ee624117e1b1f1d92e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132663
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-04-13 09:57:33 +02:00
Miklos Vajna
ada2d44917 sw content controls, DOCX export: handle SDT end at para end
Once the DOCX import maps Run SDTs to SwContentControl,

	make -C sw -sr CppunitTest_sw_ooxmlexport17 CPPUNIT_TEST_NAME=testTdf148361

starts to fail without this fix. Previously we only tested
SwContentControl end in the middle of a paragraph. Fix the paragraph end
case similar to how hyperlinks are handled to be consistent.

Change-Id: I0633ca8d7d909a2cb3c70e7edce3a85df5fac3f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132944
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-04-13 09:54:04 +02:00
Stephan Bergmann
634990f32c Fix copy/paste typo in comment
Change-Id: I90d350abefebf3545c47f9460627435b4a514e07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132940
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-13 09:47:11 +02:00
Szymon Kłos
b632135072 jsdialog: reenable after welding, unify with dialogs
Change-Id: I4a589f68fcdaa1c62ac08bd6075071d0fed0b28b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132538
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132915
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-04-13 09:19:30 +02:00
Miklos Vajna
6b92b14421 CppunitTest_sw_layoutwriter: use more SwParaPortion::dumpAsXml()
See commit feeed3e762cf077fbd9cf48f82e949365108ccc1
(CppunitTest_sw_layoutwriter: avoid some a11y-based layout testing,
2022-04-07) for motivation.

Change-Id: Ic0647b9e43517e80487c66e8ee13e48eeebbdabb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132939
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-04-13 08:52:47 +02:00
Noel Grandin
fdfd517a6f loplugin:stringviewparam whitelist some more functions
for which we have o3tl:: equivalents

Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 08:38:53 +02:00
Ilmari Lauhakangas
e568c9dca8 Update remaining DevGuide wiki links.
My Kate editor decided to do some whitespace cleanup, but maybe
it's fine as the main changes are not targeting functional bits anyway.

Change-Id: I5292e77e43055f94a6256a7f72d49fd59287d194
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132928
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-04-13 08:16:52 +02:00
Miklos Vajna
c7970e3204 sd theme: add UNO API for shape fill color effects
XColorItem::maThemeColor already provided the document model for this.

Change-Id: Iefbd0aeaa37a813bb4c86386801e0116e8fae40d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132933
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-04-13 08:05:09 +02:00
Tomaž Vajngerl
a98971ac97 vcl: move X11 drawing that uses cairo into X11CairoSalGraphicsImpl
If cairo is available we override drawPolyPolygon and drawPolyLine
with an implementation that uses cairo to draw instead of X11.
This override was previously done in X11SalGraphics, but as we want
to have all the drawing in backends (SalGraphicsImpl children) this
also needs to be moved to one. In this case we can just derive
X11SalGraphicsImpl and implement specifics there. As there is some
common stuff now betwee X11SalGraphics and X11SalGraphicsImpl,
also add X11Common, which includes those.

Change-Id: Id1e0c5227506e03d3dd0f937e4ef50d69b17bb22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132827
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-13 01:20:31 +02:00
Luboš Luňák
07745a031d don't ignore GetDefPattern() in ScHorizontalAttrIterator
As said in the previous commit, the default pattern is the default
style that can be edited by the user, so it's principially incorrect
to simply ignore it. If needed for performance, then it needs
to be done explicitly. This change currently should not affect
anything, as ScHorizontalAttrIterator is used only in tests.

Change-Id: I31f153d427cdfd6e98a4d7a3584cfa89676d4c33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132912
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-12 23:10:29 +02:00
Luboš Luňák
4d45d9886f don't artificially clamp attribute iterators range
Even ScDocument::GetDefPattern() can be modified by the user (it's
the default style that can be edited), so it's conceptually
incorrect to ignore it while iterating, and clamping to allocated
columns is also no longer needed. If this makes some code slow,
then that needs explicit handling in that code or some other
way of speeding things up.

Change-Id: I4a7c7fef0a8625b559bbce4580df19a5e9ed92a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132911
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-12 23:10:16 +02:00
Luboš Luňák
e3830b06a9 don't FormatDoc() a whole long text if not necessary (tdf#144515)
The testcase has a very long text in a cell that is really high
enough to hold only one line of text, yet EditEngine formats and
wraps the entire string. Which can be expensive because of calling
into text layout to find out width of a text portion, and this
is done repeatedly for the yet-unformatted text, so pretty much
O(N^2). For top-aligned text it's enough to format only as much
as will fit and ignore the rest, so implement that and add
EditEngine::EnableSkipOutsideFormat() to enable the optimization.

Change-Id: Ida87a1843737a368798ba2b3e60eedc99ee0f611
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132932
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-12 22:16:05 +02:00
Luboš Luňák
efb60b6fb5 treat Calc cells that don't fit as top-aligned rather than bottom
For cells it normally looks better to align them to the bottom,
but if the content doesn't fit, it looks better to align to top,
because that shows the start rather than the end of the content,
and it also logically goes together with the clip mark shown
to the right of it.

Change-Id: Iac51e9e59d5ab9f5c89374a3e638a4a572f8b1fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132931
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-12 22:15:41 +02:00
Stephan Bergmann
8e02f081ab Remove need for OPropertyAccessor default ctor
Change-Id: Ia5ae4e28aa880600ce80bd284cde5183c49e4b40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132929
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-12 21:03:10 +02:00
Caolán McNamara
01cb63b986 gtk4: GtkCellRendererPixbuf no longer takes a surface
so use our own replacement when we want to continue to use a cairo_surface

Change-Id: I4a1a0e7f5a86d27a4290cf71c0719ea017be3f0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132930
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-12 20:58:47 +02:00
Caolán McNamara
cbf9f63880 ofz#46352 Timeout
Change-Id: I4544c9c15ec26fb1c27ec0f28ef956320d06a149
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132900
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-12 20:52:53 +02:00
Caolán McNamara
e21fa6a5fd [loplugin:stringview] pass a 'std::string_view'
Change-Id: If2e355729f051cd5be517fb05e8909844a24c7f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132927
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-12 20:52:15 +02:00
Caolán McNamara
77bc0bcfb6 gtk4: add a surface_cell_renderer
to bridge our continuing usage of cairo and gtk4 GtkComboBox cell renderers
without dropping any existing hidpi wins

Change-Id: If5244766c13dd5d82445cb626ef4096e3c6ea244
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132926
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-12 20:51:47 +02:00
Caolán McNamara
8e0c199737 resave with latest glade
Change-Id: Ib84f706deccc1f71810abc97a4208d5106826235
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132901
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-12 20:51:15 +02:00
Caolán McNamara
9c47425041 ofz#46632 Direct-leak
Change-Id: I01fe4ae8907fb95708d54a39d1cc78d89b4d6e64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132893
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-12 20:50:39 +02:00
Caolán McNamara
f7fd2d4e3e gtk4: cairo_gobject_surface_get_type() needs to be called at least once
before "CairoSurface" can be resolved to its type, this worked in gtk3
because there was some fallback code which guessed what function name
was needed to call to get it, but that's not present in gtk4

Change-Id: I85a957ecd37e0e7a572578e8273152fbb19dac3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132920
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-12 20:50:03 +02:00