Allowing export of EditEngine document into flat XML from actual clipboard
by modifying SotClipboardFormatId
Change-Id: I9c7dfd3ca428d0fa355bd3dfb7bfa0f0e30dada6
Reviewed-on: https://gerrit.libreoffice.org/38226
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Replace SalLayout::Release() with normal destructor mechanism. Release()
uses reference counting for the layout. But in practice, the reference
counting variable is initialized in ctor and is not incremented elsewhere.
So I removed the Release() method and replaced all the Release() calls with
'delete'. It will make easier the use of smart pointers and decrease the
chance of memory leaks.
Change-Id: Ia2e142dea10b87e232d5757d84778e62d87cf081
Reviewed-on: https://gerrit.libreoffice.org/38488
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
The bugdoc uses LANGUAGE_USER_LATIN_VATICAN LanguageType(0x8076).
The UNO API uses signed "short" for these in various interfaces,
and so the LanguageType constructor complains about
out-of-(short)-range values.
Avoid this by deleting the problematic constructor, so that the places
that currently call it with API parameters can be changed to first
cast the parameter to unsigned.
(Yes, we need to write "template<>" twice in a row. Don't ask me why, i
just work here. sberg says we also need to omit the explict <short>.)
Change-Id: I2443a89bc8d579504fc707ded3d145f9a625597a
Reviewed-on: https://gerrit.libreoffice.org/38473
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
...in favor of gb_LinkTarget_add_generated_exception_objects. The former would
have needed any flags to be passed in explicitly (but no call sites did), so
e.g. StaticLibrary_graphite didn't have any debug information (when building
with --enable-debug). I guess there is no downside to having C++ exception
support enabled in these places, and using _add_generated_cxxobjects instead was
likely an oversight in the first place (at least in the case of
external/graphite/StaticLibrary_graphite.mk, it was that way ever since
1ceb47d96d "graphite: convert to gbuild", but for
no apparent reason).
Change-Id: I9986a6c5ec30a521095dbe5315e5ca649741a790
rtl_[u]String_newConcat now checks allocation result to return
early and avoid SIGSEGV. Other functions are not modified, to
keep old behavior relying on allocation success and crashing
early on OOM to avoid added overhead in performance-critical
places.
OUString operator+= now checks rtl_uString_newConcat result and
throws std::bad_alloc on failure, to specifically address BASIC
problem. It keeps strong exception guarantee of leaving this'
state unaltered.
Concatenation in BASIC now checks for bad string allocation
(previously SIGSEGV was generated).
Unit test included.
Change-Id: I1513311d3d58eac43b2d2ec9a230e22dff0b4245
Reviewed-on: https://gerrit.libreoffice.org/37965
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
* "wzName" should contain shape name
* MS Word watermark has text inside the "gtextUNICODE"
(do not create additional shptxt)
Change-Id: I7929ec83a9219d6087d36ccbf6d7e735acf63722
Reviewed-on: https://gerrit.libreoffice.org/38219
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Make sure that even if the text append stack is empty (and we return
early) the table manager push/pop operations are in sync with the shape
start/end, otherwise we'll have an empty table manager stack.
That is a problem as
writerfilter::dmapper::DomainMapper_Impl::getTableManager() assumes that
it always has at least one element.
Change-Id: I92b3381e820bc8eaeb351532a6ce8909490c0f30
Reviewed-on: https://gerrit.libreoffice.org/38490
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
There's a newline in case of heading, table or bibliography following text:p
ok but only if we're not in text:note node
Change-Id: I71172751a51e29abdd770e758d27b1bc8f15cb0d
Reviewed-on: https://gerrit.libreoffice.org/38470
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
The presence of an annotation anchor was causing number recognition
to fail in Writer's table cells. Formulas accessing the cell
read a value of zero.
Annotation anchors are only used in SW right now, so SVL didn't
want the overhead in their code. So this wrapper function should
be called first to cleanup SW specific things that interfere
with number recognition. Specifically known to be needed in
cellfml.cxx, but converted everywhere for consistency.
The formula in older documents is not "fixed" during document loading
since the table/formulas are not refreshed at load time.
Only documents saved with incorrect results will notice this,
and any cursor access inside the table will cause a refresh.
Printing also causes a refresh (but not print preview or PDF export).
So this patch only fixes document creation or modification, which
should be adequate for this bug.
Change-Id: Ib46f2b7899ae9a0fdc3aae5887bb2d61535d29f3
Reviewed-on: https://gerrit.libreoffice.org/32909
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Project: translations 633cd820822ba89da7d410cf8bed009c2ffd3d47
update translations for 5.4.0 Beta2
and force-fix errors using pocheck
Change-Id: I6d5e3a4c3d81bc5d1f7e324ddc4387b2228fdd3e
The plan is to drop the iterator functionality from FormulaTokenArray
and instead use separate iterator objects. This will make
parallelising code that uses these data structures easier. I call the
new separate iterator class FormulaTokenArrayPlainIterator for now,
feel free to come up with a better name.
No change to what code actually gets run yet, so yeah, this adds
"unused" code.
Change-Id: Ie86f80529354174f0ce8bde1085a54bc6c5ac67b
Using Calibri will allow to keep originally intended font
on round-trip. If Calibri is absent on a system, LO will
fallback to Carlito for rendering, but keep original font
intact.
Change-Id: I8f29bed29bc7f48912b2637053ff128ea904c7a1
Reviewed-on: https://gerrit.libreoffice.org/38456
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
1. Erase empty or corrupt lockfile, when reading it fails and
skip "Locked Document Dialog" in that case
2. Show Dialog (use LockFileIgnoreRequest -> LockFailedQueryBox)
when create lock file is not possible.
Two Dialogs: "lock file create error" and
"empty lockfile is present"
Set the document to read-only when creating lockfile is not
possible. If lockfile is corrupt or empty, inform the user.
They can interrupt loading the document or open it read-only,
which also erases the corrupt lock file after closing
the document
3. Handling for the two Dialogs
Use LockFileIgnoreRequst for create lockfile error and
add a new LockFileCorruptRequest, (lock file is corrupt).
Change and generate new messages for both dialogs in english
Change-Id: I35c377f85b5113e8ffb89d83b9544b8ebc81d89f
Reviewed-on: https://gerrit.libreoffice.org/36658
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
In OOXML (i.e. Word since 2007), the default document font is Calibri
11 pt. If a document doesn't contain font information, we should assume
our metric-compatible equivalent Carlito to provide best layout match.
A unit test included.
An existing unit test (testN766487) was corrected to match the font
size that Word uses (11; was 12 which doesn't match Word's size).
Change-Id: I3040f235696282dc7a124cd83fb34a6d95a29a17
Reviewed-on: https://gerrit.libreoffice.org/38421
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>