This patch replaces SwFEShell::SetTableStyle use to resolve tdf#108227
with SwTable::SetTableStyleName. The gain in insert speed is a result of
eliminating SwFEShell::SetTableStyle call to the time consuming
SwFEShell::UpdateTableStyleFormatting function which is somewhat
redundant when inserting a table.
Change-Id: Ide1e003d9709a6758e021b52fcf9e40a7b0fcba0
Reviewed-on: https://gerrit.libreoffice.org/68372
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Add test XNameContainer::testRemoveByNameNoneExistingElement to get the
same coverage as before when these case where split with commit
4b98337699e5e59a543d95c73ea7c64b3d9a1caf.
Change-Id: I45ba5af4e2b3137d9379623556ce4129a860e696
Reviewed-on: https://gerrit.libreoffice.org/68477
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Unintentionally formatted these files with commit
4b98337699e5e59a543d95c73ea7c64b3d9a1caf with my Vim set up (better keep
them formatted then revert everything).
Change-Id: Ie017fae2bdf952a5d0313d8b5654813ff8d402ad
Reviewed-on: https://gerrit.libreoffice.org/68476
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
The queried media duration for gstreamer isn't ready at the beginning.
Instead of deactivate the audio node immediately after querying the
duration, schedule to update the media duration and use the updated
duration to schedule deactivation.
Change-Id: I8bfa69377fbc18b21baf48bc293d2d0853e8805a
Reviewed-on: https://gerrit.libreoffice.org/68451
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
* Update helpcontent2 from branch 'master'
- This paragraph just repeats what the paragraph immediately above says
Change-Id: Iccc9fb41811a4914fdda0f346f9bd32049932448
Now that OOXML reveiled that the formula expression containing a
TRANSPOSE() call shall be in array mode, the old comment about
Excel not forcing array on the argument (in BIFF token class)
makes sense. Use ForceArray and remove now moot comment.
Change-Id: Iab2bced788de3429aab2bb7c3ca7f24d5dbf0340
Reviewed-on: https://gerrit.libreoffice.org/68509
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Remove the Background tabpage in "Border/Background" dialog accessed
from Border and Background menu item in Header/Footer drop-down list
and replace it with the tabpages "Area" and "Transparency" of the dialog
accessed from Page Style > Header > "More.." button.
The old dialog does not have the tabpages "Area" and "Transparency".
In simpler words, the patch is to match both the dialogs
when accessed in two different ways.
Change-Id: Ib84435854389360eba41aecb8578a9a67a92ca1e
Reviewed-on: https://gerrit.libreoffice.org/67483
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
this is the single biggest chunk of stuff my upcoming paramtypedef
loplugin will warn about, so do it separately
Change-Id: I412e69e76406d6d947101885d4cd92c65e021508
Reviewed-on: https://gerrit.libreoffice.org/68486
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Once the constraints determine the size, the aspect ratio may shrink one
dimension to achieve the requested ratio. Implement the case where a >1
ratio shrinks the width, so the container of the image-text shape pair
has correct aspect ratio.
Change-Id: I7bac764c031e80bac532c4f97ebd5b5096401096
Reviewed-on: https://gerrit.libreoffice.org/68510
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
GetClock() needs it to properly scale and round the floating point
value. It also handles negative values, fiddling with that is only
needed for the [] formats.
Regression from
commit e2e47898180e547cad7ccde1e5890385d573e551
CommitDate: Fri Aug 31 12:50:52 2018 +0200
Use tools::Time::GetClock() in number formatter for wall clock time
Change-Id: I05fe9e22886d4e59f110c0a826dadb43234d348a
Reviewed-on: https://gerrit.libreoffice.org/68508
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
if "if (aOldColSize==0)" check can never be hit since we pre-allocate
these columns to some size.
Also move the cold part of the function out-of-line, doesn't seem useful
to have all of it in a header
Change-Id: If8675ca17d70ee55dde8418ff75e2ddb3c931c58
Reviewed-on: https://gerrit.libreoffice.org/68506
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
m_nCurrentDataSet doesn't change, so it doesn't refill it, even
though m_nCurrentDataSet was deleted so it no refers to a new
entry
Change-Id: I0c68f407a23a28a7e55fb3cf691e5f07e5ed6729
Reviewed-on: https://gerrit.libreoffice.org/68497
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Speed is more important than size in the use case where this showed up
in a profile of the iOS app (inserting an image). This change causes
zlib's deflate_fast() being used instead of its deflate_slow(). For a
specific image I tested with the former takes 1.5 s, the latter 3.4 s.
This is just one aspect of the slowness of image insertio. The
resizing operations mentioned in the bug report is not yet
investigated.
Change-Id: Icf023522b965cb0265000c821a478610d098cd0a
Reviewed-on: https://gerrit.libreoffice.org/68434
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/68488
Tested-by: Jenkins
Calling GetLastDataRow/Pos() with MAXROW as the last row is apparently
fine, but if that's an invalid row, but anything beyond that is not ok.
ScDependantsCalculator::trimLength() may use such larger "last" row
value because it works on a range of cells.
Change-Id: I819a4d20a4765e23af6208df5f2e208ac44b694c
Reviewed-on: https://gerrit.libreoffice.org/68349
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
This basically reverts b6b1ded0a0539e7be1b5338de378a3276a6ff445, since it
introduces tdf#118707, and I cannot reproduce any of the original problems
when reverting.
The patch itself is technically correct, but the problem is in the Windows
implementation of clipboard handling, which uses delayed processing
of setting clipboard contents. This leads to previous clipboard contents
being deleted too late, and with shared_ptr instances of SdrCaptionObj may
get deleted after the related SdrModel has already been deleted.
A proper fix would be to remove the stupid delayed processing from
the clipboard code, but that's non-trivial. If that gets fixed, the change
removing ScCaptionPtr may most probably be applied again.
Change-Id: I29634847486aa955b20483c9eb38bba4fed87187
Reviewed-on: https://gerrit.libreoffice.org/67725
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Extra style is causing editing problem near footnote/endnote
references. This behavior is a side effect of
eaa9cf6a3069fba3d82c046f0041bfb537d9e648, allowing emission
of these "technical" styles.
Change-Id: I1885b92814746e7b5cd19f3ddd7bc22eb691615e
Reviewed-on: https://gerrit.libreoffice.org/68304
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
And move some code pieces, related to the redaction functionality,
from objserv.cxx to the new SfxRedactionHelper.cxx file.
Change-Id: I6491c9b581ea6d3a05a72117c5b72e1dc19025dc
Reviewed-on: https://gerrit.libreoffice.org/68338
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
As in f2afa2af10d9d30d7160e73881ca6fe5a409f35a
Change-Id: I54323e4b993d4c584932608c9d3721becacddb60
Reviewed-on: https://gerrit.libreoffice.org/68247
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Given SwColumn::m_nWish is documented as "Desired width, borders included."
(sw/inc/fmtclds.hxx), it appears that the invariant
GetWishWidth() >= GetLeft() + GetRight()
should always hold for SwColumn instances.
However, during UITest_writer_tests4's test_tdf113284 loading of
sw/qa/uitest/writer_tests/data/tdf113284.odt, it appears that some five-column
table is created for which initially all SwColumns'
GetWishWidth() = 13107
GetLeft() = 144 (except for first SwColumn, where it's 0)
GetRight() = 144 (except for last SwColumn, where it's 0)
and later FitToActualSize is called reducing each SwColunn to
GetWishWidth() = 286
so that for most SwColumns (except first and last), GetLeft() + GetRight() = 288
would exceed GetWishWidth(). And then (still during loading of the test's
document), SwFormatCol::CalcPrtColWidth (sw/source/core/layout/atrfrm.cxx) is
called for such a problematic SwColumn, trying to subtract from its
GetWishWidth() (the result of SwFormatCol::CalcColWidth) both GetLeft() and
GetRight(), and store that into sal_uInt16 nRet. Which triggers Clang's
-fsanitize=implicit-signed-integer-truncation "runtime error: implicit
conversion from type 'int' of value -2 (32-bit, signed) to type 'sal_uInt16'
(aka 'unsigned short') changed the value to 65534 (16-bit, unsigned)".
So make sure that FitToAcutalSize upholds that presumed SwColumns invariant,
shrinking the borders as necessary.
Change-Id: I3f6fc07e65a0fc5d5f58c99f1dcdea4467b825f0
Reviewed-on: https://gerrit.libreoffice.org/68463
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Fix aVerticalLeftToRightBottomToTop:
- fnXDiff takes "logically larger, logically smaller" arguments, so it's
first - second for top to bottom text (existing directions) but it's
second - first for btlr
- fnXInc was effectively unused before, but it probably meant to provide
logical left + width, so set that to physical left - width for btlr
And then port 3 places in lcl_UpDown() to use aRectFnSet, so we get
correct behavior for both ttb and btt directions.
With this, pressing the left/right arrow jumps to the previous / next
paragraph correctly.
Change-Id: I1323e95e2ce0ab2d66a3ea6e02bd50df2cebf232
Reviewed-on: https://gerrit.libreoffice.org/68462
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
As stated in
ECMA-376-1:2016 OOXML 18.17.7.327 TRANSPOSE
"The formula containing the call to TRANSPOSE shall be an array
formula [...]"
Similar to
commit d0ded163d8e93dc5b10d7a7c9bdab1d0a6a50bac
CommitDate: Wed Jan 16 11:17:14 2019 +0100
Related: tdf#122301 FREQUENCY() with ForceArrayReturn on caller
Change-Id: I617bfcc0b8ecb244df3441ab885ec926efd77e3f
Reviewed-on: https://gerrit.libreoffice.org/68436
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
When we save the document we get a SwXShape for the SdrObject and call
getShapeText on it, which creates a TextForwarder for it. The SwXShape
is temporary and is discarded afterwards. If we modify the text and
save again we get a new SwXShape and a new TextForwarder.
If a11y is active, then when the textbox is inserted a11y gets a SwXShape
for the object and the SwXShape stays alive while the a11y view of the
Sdrobject stays around.
The SdrObject will keep a weak ref to the current SwXShape for it, so
on save we get the already existing SwXShape instead of a new one. On the
first save this is ok, as the TextForwarder is created on demand.
On the second save, the problem is that the SvxTextEditSourceImpl of the
TextForwarded was initially created without a SdrView so its in sort of a
"snapshot" mode, so first time the text is queried, that sticks as the result.
So a cached text forwarder cannot be trusted when its for a SdrTextObj
that's being edited and HasView is false
Change-Id: Ib3d500752f1876086ef1996885a2b86b581f5bc4
Reviewed-on: https://gerrit.libreoffice.org/68457
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
it only uses the color subtab, so just measure
ones which can be visible
Change-Id: Id09419480fd920b242f4d0d65e9ac5fbfb619784
Reviewed-on: https://gerrit.libreoffice.org/68431
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>