over a tracked paragraph insertion (both in Show Changes and
Hide Changes modes).
Note: we needed a Python UI test, because uiwriter doesn't crash
on Linux without this fix.
Likely regression from commit a19dc0d9cc
"sw_redlinehide_3: update frames in MoveParagraph()".
Change-Id: I3026c9136e2fa6dcc1f6b5bad1677846a6cfe614
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123551
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
...save/restore character format on selection overwrite"
which might also fix tdf#144638 as well.
This reverts LO 6.3 commit 6abed0ea00.
This 6.3 fix for bug 79717 has caused too many other problems
that are not being looked at, so it should just be reverted.
It is spamming document with direct formatting which
is a terrible thing to have happen by accident.
It completely wrecks the proper use of styles.
Also revert asscoiated follow-up commits:
Revert "tdf#79717 save/restore character style on selection overwrite"
This reverts commit 04bd192570.
Revert "tdf#79717: sw_uiwriter: Add unittest"
This reverts commit b05955b480.
These effectively revert 12eac5bcbc
but its unit test is left intact.
Change-Id: Ideced4d38bfdf4c82f1744534afbaad29689fded
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123566
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
this was added in dc83c34989
< tdf#124770 sw layout: handle Word's take on italic formatting vs text
break >
but never used
Change-Id: Icf97e7fc9554c0762a91e7eab0841449cdc7fd02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123564
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Move ensureSpace code to json_writer.cxx, and merge with reallocBuffer.
The methods are private, and are only used in methods in the same .CXX,
so the code will get inlined as compiler decides anyway, but becomes
simpler.
Make extractDataAs* to consider the known size of the data, to avoid
calculating null-terminated size. To do that, the code is moved from
extractData to private extractDataImpl, which returns both pointer
and size.
Change-Id: I7c0e425b5c584089c6e866c31d4cfdb5e242d66b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123568
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
The scenarios are:
1. Calling sequence's begin() and end() in pairs to pass to algorithms
(both calls use getArray(), which does the COW checks)
2. In addition to #1, calling end() again when checking result of find
algorithms, and/or begin() to calculate result's distance
3. Using non-const sequences in range-based for loops, which internally
do #1
4. Assigning sequence to another sequence variable, and then modifying
one of them
In many cases, the sequences could be made const, or treated as const
for the purposes of the algorithms (using std::as_const, std::cbegin,
and std::cend). Where algorithm modifies the sequence, it was changed
to only call getArray() once. For that, css::uno::toNonConstRange was
introduced, which returns a struct (sublclass of std::pair) with two
iterators [begin, end], that are calculated using one call to begin()
and one call to getLength().
To handle #4, css::uno::Sequence::swap was introduced, that swaps the
internal pointer to uno_Sequence. So when a local Sequence variable
should be assigned to another variable, and the latter will be modified
further, it's now possible to use swap instead, so the two sequences
are kept independent.
The modified places were found by temporarily removing non-const end().
Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
it was added in 2211a67cc5
< Rewrite import and export of custom dashes in ooxml filter (fix) >
The test was later removed in f3d6c44c9c
< tdf#108064 OOXML export: keep preset dashes with any line width >
and it fails if it's reintroduced. No explanation why it was removed
though, sigh.
Change-Id: Ie7409f64d4f8912634d3871c75d16448de0f5211
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123561
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
it was added in 598d8194b0
< Visible function type RTTI for Clang -fsanitize=function >
which doesn't seem to be related at all
Change-Id: Id74affa131f871b047b7ac4e99964c993908c0b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123562
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
basegfx::B2DPolygon version of DrawPolyLine() doesn't set the metafile
line cap or join, this fixes this issue.
Change-Id: Id5d73537b0fc5e580789a98b7c5214d586da3cc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122974
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
sw/qa/core/data/doc/tdf124937.doc was added in
96acebb722
< tdf#124937 reset m_pFirstOfBorderMerge before truncate. >
but no unittest was added with it.
Simplify the document and add the test
Change-Id: I505df15d701c2061b33dfb9cd7cfdf95817c1f5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123559
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Creating an SwXTextFrame for a graphic node will result in a wrapper
that has no underlying SwTextNode, as the downcast from SwNode fails in
SwXParagraphEnumerationImpl::NextElement_Impl(). This is certainly not
intended, similar code in SwFmDrawPage::CreateShape() handles the text
node, graphic node and OLE node cases separately.
To make this more problematic, this corrupted wrapper can be still alive
by the time we try to save to ODT, but the wrapper without an underlying
SwTextNode will be unable to enumerat the paragraphs of the text frame,
so it throws, making it impossible to save the document.
Fix this by limiting the TextFrame property of the cursor to actual text
frames any returning an empty reference in other cases.
If there is a need to access graphic or OLE frames via that API, then
dedicated properties can be added to expose those different nodes.
Change-Id: I5e97a826271b0d8a1bf262e43cd8516656b37c3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123560
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
In the process, it turned out that there was unnecessary conversion
of OStringBuffer to OString and back to OStringBuffer when using
putRaw, which is avoided now.
Change-Id: I1e3ee685679df0b025bee8f4430624ee5bc9ccb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123547
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
like table layout of MSO does, e.g. 20 pt to 19.5 pt.
Changing table row height is only for interoperability.
To avoid of regressions, apply this workaround only for
documents created in MSO.
Note: likely this is an old adjustment for low-resolution
monitors, where 0.75 is the factor between 96 ppi of Windows
resolution and (originally) 72 ppi of monitor resolutions.
Co-authored-by: Tibor Nagy (NISZ)
Change-Id: Ie1e2c781d21174a877b18cd3250eb445222bd1c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122428
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
it was removed in ac84e4ff61
< tdf#94011: load&save more border types > for no apparent reason
Change-Id: I18c4c974de5e519df6f6e7539f95dfb734e4b0aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123557
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This reverts commit 8280491bec.
Wrap options are not available for Shapes, Media files etc.
When we insert a shape and select any wrap option from the sidebar - app
crashes.
This feature should be implemented first in the code before beeing
visible.
Change-Id: I1110939e9ee40509e380d003665478889e7a2c24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123374
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123448
Tested-by: Jenkins
The passwords for editing in PPTX documents
created with PowerPoint weren't asked and verified.
Change-Id: I62eb4fd68aac6422c1221a639f4815459ab556c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123130
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Added in 817b35a9c3
< New test files added, tests run for the 1st time >
and commented out in 744969c4f6
< improved shapes-test.odp (but not finished), unlocked assertion(false) >
back in 2012
Change-Id: I8d5d7ae5e0a72c62b2ce01ea1130dc9f5825b166
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123553
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
they were added in 2704821c6b
< smartart : test documents > but never used
Remove them until the tests are actually implemented
Change-Id: I5e4f7685f782bf7e7ebae5304b9fb6292fad722c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123552
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
<https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms#Pass-Arguments-to-Functions-Correctly>
only mentions function arguments, not return values in "The caller of a function
is responsible for signing or zero-extending any argument with fewer than
32 bits. The standard ABI expects the callee to sign or zero-extend those
arguments." But this appears to also be relevant for return values, where the
callee apparently has to provide properly extended values: Without this change,
in an --enable-optimized build, e.g. selecting "Tools - Macros - Organize Macros
- BeanShell... - LibreOffice Macros - Capitalize - capitalize.bsh" would not
enable the "Run" button, as in SvxScriptOrgDialog::CheckButtons
(cui/source/dialogs/scriptdlg.cxx) node->getType() (which returns a sal_Int16
value, and which calls DefaultBrowseNode::getType,
scripting/source/provider/BrowseNodeFactoryImpl.cxx, which in turn calls
m_xWrappedBrowseNode->getType() on a proxied Java object via the UNO bridge)
would return a value in r0 with bits > 16 left with random values, while the
calling code assumes them to be zero (and exploits that violated assumption with
--enable-optimized).
Change-Id: Ic99dd9e62b49b44e13cdde6158bef7e2296547f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123550
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
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>
because I can never remember how to run this script
Change-Id: I7782846d192f477096fb315e0b5416d4715d319a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123546
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Without this, LTO gcc build may fail while linking libmerged because
of an undefined reference to `std::string::append(char const*)',
which looks like a gcc bug because std::string should be a template,
but whatever, this makes it build.
Change-Id: I173cc0c773d5957a0c4a9cecc74c1ab33afad7db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123541
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
I'm not sure if all gcc versions support the value, but if older
ones do not they at least silently accept it.
Change-Id: If18ce1cbf6122cf9ded00eee5c2058d70e486c0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123540
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
The original idea was to enable gdb index for debug builds, but
this by mistake enabled it even for optimized symbol builds. Those
are presumably mostly release builds that also provide debug symbols
for distributions, but there having a gdb index seems to be a waste
of space.
Change-Id: I585941aaed1af9e2e4ad85bb278c99c6f12cd858
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123538
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
See commit a226cec52e
(CppunitTest_sw_rtfimport: convert one testcase to use
CPPUNIT_TEST_FIXTURE(), 2019-11-05) for motivation.
Change-Id: I56fc863978ba24cd95d86cb0c5ab5d645bbc6614
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123532
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
...that was introduced with b14107dd0e "tdf#133858
reduce the double-ref range to data content", but which can only ever be either
true or invoke undefined behavior (as gets reported as
> sc/source/core/tool/compiler.cxx:6412:27: error: comparing the result of pointer addition ‘(((ScCompiler*)this)->ScCompiler::<anonymous>.formula::FormulaCompiler::pCode + -8)’ and NULL [-Werror=address]
> 6412 | if (!pCode || !(pCode -1) || !(*(pCode - 1)))
> | ~~~~~~~^~~
with recent GCC 12 trunk)
Change-Id: I72395f1874343a047afceaa5e342e9e67a51c44f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123531
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
So disable LTO for x64 code when building for 32bit.
Change-Id: I8445d8307b3b797b78cea12e6322e0d792c71dfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123537
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Update helpcontent2 from branch 'master'
to c0b8265b7148b1860bd47c77e072c3c605b208da
- tdf#144924 - Change return type of array elements of the split function
If VBA is not enabled, allow the assignment of variables with different data types to the individual array elements created by the split function.
Change-Id: I2acd2088cb4d805c57c25acad9268cb0d703177e
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/123164
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
oddly right arrow works, but left arrow seems to get stuck and pass
focus into the main window sometimes, but get this partially working
anyway
Change-Id: I3aca1b8f25bdda5684ce7124b8564233e40d9f1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123528
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>