Add a (non-gui) setting GeneratorOverride that, if set, is used
for odt/docx/pdf generator string identifying the application that
has written it instead of the normal productname etc. string.
Change-Id: Ibe12a063e7e6b5a09c69cdf66cba073793650d62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132495
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
LO doesn't provide any way to notify screen changes / scaling
factors of a window and in fact doesn't really handle scaling
factors in VCL. The QWidget doesn't receive a resize event,
because it's size doesn't change, just the scaling factor.
So we trigger a faked resize on QWindow::screenChanged signal.
Change-Id: I6928c4c62d1c0995c70fea0088cff17849bcd1d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132650
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
"Regression" introduced with de4d296619 "Avoid
overflow in ScColumn::GetOptimalColWidth", which, for this bug document's
nWidth/nPPTX = 6004/0.0647708 = 92696.1, changed the calculation of nTwips from
the undefined-behavior 92696 % 65536 = 27161 to the clamped 65535, but which is
apparently a value large enough to cause "silent" issues (i.e., not causing
further undefined behavior) down the road, leading to a super-narrow column.
That commit already wondered whether sal_uInt16 is a useful choice here, but
lets keep that question unanswered and just clamp at half the previous value,
which happens to cause presumably more pleasing results.
Change-Id: I1df642b2b9d6818c8be0f8d8f4567a00c399c154
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132734
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
DFKai-SB (ukai.ttf) is a built-in font under tradtional Chinese
Windows. The font is very common, especially for official documents.
It is one of the so-called tricky fonts in FreeType[1].
DFKai-SB has incorrect extent in the glyf table[2]. It results in
incorrect glyph positions in vertical writing.
FreeType recalculates the extents based on the
glyph outline, but LibreOffice uses Harfbuzz with
built-in ot font functions instead of ft (FreeType).
This patch decides if the fix is necessary by
checking the family name of the font and the y-offset
value, and recaculates the glyph offset based on glyph
height and top bearing obtained from the glyph bound rect.
[1]https://freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_face_flag_tricky
[2]https://github.com/harfbuzz/harfbuzz/issues/3521
Change-Id: If632dd38c462c229837e1efb5446e2142f8f0639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132511
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
Some traditional Chinese IMEs ( Input Method Editors ) under
Windows10 send WM_IME_NOTIFY with IMN_OPENCANDIDATE but not
IMN_CLOSECANDIDATE. The behavior is different if users configure
the IME and enable "legacy" option.
That caused the cursor been hidden, misled by mbCandidateMode.
The patch ignores the candidate window mode in case the length
of the composition string is 0, assume in that case candidate
window is useless, and resets the candidate window mode when
composition ended to maintain the state as much as we can.
Change-Id: I91a1c23ee1a031313243e032653f50f39b0f2a3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132512
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
Wrap the text portions inside the content control in a
<loext:content-control> XML element. Also map the (so far) single UNO
property of it to <loext:content-control
loext:showing-place-holder="...">.
This is just initial export for inline text content controls, more
properties are to be added in follow-up commits.
Change-Id: I5d928255b925ed7e08fb635ba39f546e9a4879de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132717
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Reportedly make 3.81 already fails since commit:
b04be559dd "gbuild: implement static
partial build"
<sberg> mst___, the `/usr/bin/make --version` "GNU Make 3.81" I have on macOS does not work to build LO (Some LinkTarget.mk:913 erroneous endef error is the first I encounter)
There was an ESC decision years ago to drop support for make 3.81.
Change-Id: I2e0ebec9eeb326df8c5a4d89ce1d53da6ed332ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132716
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
This adds an overlay that shows/selects all sparklines in a
sparkline group for the cursor cell sparkline, if the cursor cell
has an associated sparkline.
Change-Id: I60a5873ebdf8606f262d217caf6011c4a003801a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132692
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
In Manage Changes dialog window, selecting items
of list of changes results selection of the associated
text changes in the main text, as a visual feedback.
From commit eebe4747d2,
text changes of deleted/inserted rows or tables are
listed under a single "tracked row" list item, as its
children. Selecting a "tracked row" list item in
Manage Changes resulted incomplete text selection in
the main text: only the first text change in the first
cell was selected instead of all associated text changes
of tracked row(s) or table.
Note: Manage Changes supports multiple selections,
i.e. it's possible to select multiple list items by
Ctrl + click, and select ranges by Shift + click.
This commit does the same with redlines of tracked
row changes.
Follow-up to commit eebe4747d2
"tdf#144270 sw: manage tracked table (row) deletion/insertion".
Change-Id: If7b12e8d3c0e437495e1fcae0e8f04e34301c516
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132685
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
While font name in font table should end with semicolon
({\fonttbl{\f42 Arial;}}) it is not always true and
MS Word is tolerant to it: it still able to parse this
correctly. Seems LO also should not require strict spec
conformance.
So idea of font parsing is changed: instead of inserting
font on semicolon, it is done on next \fN or destination
end. All collected text to this moment is a font name.
Change-Id: I6b41951217442a71fd2ebbfc58a3fc79f6f913db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132686
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Unit test related to the fix
lok: avoid validation-dialog yield when saving
e0175ee821eaff56c4b8e0a1b7afa1cabe0ab593
The test ensures that the document is marked unmodified after save has
been executed in the middle of entering partial data to a validation
cell.
Change-Id: Idffd6d647034e128d0d800fe8e29efc333c03db6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132655
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Disable error dialog box when about to save in lok mode as this
ultimately invokes SvpSalInstance::DoYield() when we want to save
immediately without committing any erroneous input in possibly a cell
with validation rules. After save is complete the user can continue
editing.
Conflicts:
sc/source/ui/app/inputhdl.cxx
Change-Id: Iffa0766ad594db75f57158986c4e1d2646f71da4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132410
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit e0175ee821eaff56c4b8e0a1b7afa1cabe0ab593)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132654
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
This is a follow-up to
7.4 commit daef39352b008fc1f903fd8c09288ff5e772fa42
There is only one place in which DI_SUB_MASK is used,
so I'm just changing it to what it could have always been,
since it never was actually used to mask out DI_SUB_FIXED.
Otherwise, I might have made this a MASK2 or whatever.
The issue here is that AUTHOR was not being recognized
when it was paired with FIXED, so every FIXEDFLD was
ended up being considered as a date/time.
In practice, this didn't really change anything
because bWriteExpand already ignored any of
these areas of the code. It is only when I turn off
bWriteExpand as I implement fixes that I am seeing
the wrong field type being created.
And regardless, since the field is FIXED, the visible
content remains the same anyway (until someone in MS Word
refreshes the field with F9).
Both Author and date have the same field name ":Created"
so I couldn't super easily test this.
Change-Id: Icd2d0be2d3fbe24dc4763e0e25801569bcca471b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132660
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
The contents of SwTextFrames are currently dumped two times in the sw
xml layout dump: the first is misusing a11y's SwPortionHandler interface
for testing purposes (older approach), the second is visiting the
portions inside the text frame directly (newer approach).
The advantage of the second is that it can show information inside
multi-portions, and also extending it won't affect a11y. This commit
updates some asserts to use the second -- the first can be removed once
no asserts depend on it.
Change-Id: I5112946a964f338fc873ba13300023de9418e837
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132687
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This among others prevents opening the "Exchange Database"
dialog from the mail merge wizard, then closing
the mail merge wizard while the "Exchange Dialog" is
still open, resulting in a crash.
Change-Id: I86bd80d0bfa6084bf0f772bb430b2a871e9b5ef0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132678
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
It seems that the intention is to reset properties which are possible to
set in a style when applying a style. For example the paragraph
alignment can be defined in a paragraph style, so reset that on style
apply.
URLs on frames can't be defined for frame styles, so it looks incorrect
to reset the URL of a frame/image on style apply, fix this.
Change-Id: Ie3a57b654cf06b9512b25d2dc103d15cd83727b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132675
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
* Update helpcontent2 from branch 'master'
to ad82ae5f3d9c01f46ecab00a767be9bbbac76872
- tdf#141237 Improve text on PDF security
Change-Id: I76e179b30fce9d4a9af3c1c86a2bf55e524a62fb
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132613
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
* Update helpcontent2 from branch 'master'
to d6ba91f1d3a845fb6684b296ce23077981ef307e
- tdf#148443 corrections to print icons and labels
Basic problem was that the wrong icon was shown for Print Directly
and wrong label was shown for the Print icon. The following changes
correct these problems.
text/shared/00/00000401.xhp
* correction to Print icon label
text/shared/02/01110000.xhp
*refactor to <h1>
*add correct icon table for print directly, with section label
text/shared/main0201.xhp
*change the icon embed to the newly added print directly
Change-Id: I7a094f016c5e30881abee3db5d13589f1512ba36
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132611
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
To reproduce the Impress crash, you need an IM, e.g. fcitx / ibus.
This is triggered by having an active input, like double-clicking
one of a presentations text fields, then leaving the window and
switching back to it.
This results in a stack exhaustion in a few seconds. The backtrace
is basically:
QWidget::setFocus
QtFrame::ToTop
sd::Window::GrabFocus
ImplHandleExtTextInputPos
QtWidget::inputMethodQuery
QInputMethod::cursorRectangle
QWidget::setFocus
QApplication::setActiveWindow
QtInstance::DoYield
main
I scratched my head over the longer backtrace for while, but there
seems to be no good way to prevent this from LO's POV. The only
alternative from the Qt VCL plugin is QtFrame::ToTop. That code
is less ugly (no mutable or cached result), but QtWidget::
inputMethodQuery is earlier in the backtrace.
Change-Id: Ief3a8e44bca295cc676e75050d52d70a1da98a88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132643
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Font names like "Arial CE", "Times New Roman Cyr" are not special
fonts. They are classical Arial, Times New Roman... And these
suffixes can be used to detect encoding used for RTF text.
Most interesting: for MS Word these suffixes have priority:
{\f34\cpg1253\fcharset161 Arial Baltic;} will have cp1257
and not cp1253.
Looks like compatibility issue came from dark ages.
Change-Id: Ife8e781d5d04c3f6a8c11fcf604357c74bf33055
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132584
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* Update helpcontent2 from branch 'master'
to d5de0b43d57142eca8fab90fca1ca119cffb6039
- Remove a Germanism
Change-Id: I92f009369c2081c5085e07651948c0085aecfeef
If the user selects an entire cell by a single click, and inserts an URL
via the hyperlink dialog, the entire content of the corresponding cell
will be replaced instead of inserting a duplicate, or appending the URL.
If the cell contains more than one URL or an URL including some
additional text within the cell, the hyperlink dialog will only
preselect the text field when opening. If this is not the case, it fill the URL field as well.
Change-Id: I9a10c3f302a6cf91a4d9dfadfbe775075eb00fad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131156
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
- teach SwCursorShell::GetContentAtPos() about a new IsAttrAtPos::ContentControl
- add a new SwCursorShell::GotoFormatContentControl() to select a
content control, and a SwWrtShell::GotoContentControl() wrapper around
it
- combine these together in SwEditWin::MouseButtonUp()
The intention is that when you open a document and you click on a
placeholder text like "Click here to enter text", then this content is
pre-selected (so typing overwrites it), but typing real content there
disables this behavior.
Change-Id: Ia539865da7b18c41cbfb398282842bdb2e25f0bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132652
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Issues can happen when saving a document with sparklines where a
sparkline is deleted and then undo-ed. The reason for this is
because the SparlineList wasn't correctly updated when deleting,
copying or adding sparklines. This change adds hooks when new
sparklines are created or when sparklines are deleted to report
this into SparlineList.
SparklineList garbage-collects itself but this is not enough when
we rely that the non-deleted weak pointers to the sparkline groups
contain the correct non-deleted weak pointers to the correct
sparklines.
Change-Id: I976cbe7e6168813d3dd5089c036cc7fe4e357fb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132554
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This requires extending .uno:FillColor with a new parameter, and then
merging that parameter into the fill color item in sd/. The sidebar's
color picker already generated these parameters.
Change-Id: I83e3c4fc37b8d7bd34f0ef9c0cb96e164f7f0b99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132646
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>