In case the margin (distance between body frame and page frame) is
smaller than the border spacing (distance between border and page
frame), then we can map that to a negative border distance during the
import of DOCX files since commit
1f127a2b9e (sw layout: allow negative page
border distances, 2022-06-07), but DOC import had the same problem.
The above commit intentionally kept the default behavior of
BorderDistanceFromWord() unchanged to avoid side effects in other
clients of that function (not DOCX import), but means that DOC import
was still broken.
Given that it turns out there are only 2 callers of
BorderDistanceFromWord(), fix the problem by allowing negative border
distances unconditionally: this simplifies code & SetBorderDistance() in
the DOC import will now get the correct border distance out of the box.
DOC export works out of the box without any additional work.
Change-Id: I6bf15b3c73823c9265218b7b3a7b869e131818db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135484
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Inset values for top, bottom are calcualted differently in OOXML
and need to be coverted on import to the text distance LO values,
that place the text relative to the shape correctly.
At export, the values can be converted back to the OOXML inset
compatible values, but the values are not always converted back to
the same values as the conversion is not bijective, however they
do render the same.
This also adds the test for the conversion when importing and
checks that the exported values are expected.
Change-Id: Ic64eec1a2a80ddad997f916da3e87dc30aaa12be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135463
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Once a dropdown content control is inserted, the properties dialog can
modify list items. The desktop case updates these list items when
SfxViewFrame::Enable() calls SwView::ShowCursor(), but for some reason
the same implicit update doesn't happen in the LOK case.
This means adding new list items requires leaving the content control &
entering again, then the dropdown shows the new list items, which is
confusing. And also the update (when it works) is implicit, so it can
break without us noticing.
Fix the problem by explicitly updating the cursor before ending the
properties dialog: this will scroll to the cursor position, but that's
not a problem since the properties dialog is always editing the content
control at the current position anyway.
Show / hide is used because that's an easy way to call
SwCursorShell::UpdateCursor(), which is private to us.
Change-Id: I43aca24c2961ef6c4cc14f895edd6f3f22980148
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135483
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
A one-pixel image will do the job.
Change-Id: Ied9b51c104a39b0bcf5401d8486c11f87c979805
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135477
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
I can't see any reason for this code to be this way. I can
see that Jim has tried to make some dialogs retain window size and
position. Surely all dialogs should be able to do this?
Unfortunately, it has been this way since initial commit.
Let us live dangerously and see what happens if we give
power to ALL the dialogs.
VIVA LA REVOLUTION!!!
Change-Id: I44e389ba3cb46793365607d36a05474584ee6490
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135478
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
1. Create Justify::SnapToGridEdge() to adjust kern array
under CJK textgrid GRID_LINES_CHARS mode when snap to chars is off.
This function can handle a) Unicode IVS b) rInf.GetSpace() like
what CJKJustify() does. c) rInf.GetKern() value for letter spacing.
Excluded parts comparing to original kern array adjustment:
a) Kana compression under textgrid mode has been removed. Kana compression
is used to compress space of punctuation. It doesn't make sense to
perform that under textgrid node.
b) Inserting nSpaceAdd for CH_BLANK is removed. I don't know its
purpose.
2. Use Justify::SnapToGridEdge() in GetTextSize(), GetTextBreak(),
DrawText(), GetModelPositionForViewPoint() to adjust kern array
consistently.
Change-Id: I136a92f513fae05af2fb429e747356ba7eedec7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135086
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* Update helpcontent2 from branch 'master'
to 40ee3181de08d372b5a25bb691644a94d3ffe9bd
- Related tdf#38948 Warn that Calc Solver does not save model to file
Based on Comment 36 from bug 38948, the help should make it clearer that Solver models are not saved to the file by LO Calc.
This patch changes the current <note> into a <warning> and makes it clearer that solver settings are not saved.
Change-Id: Ie1cdf5a82c105c371e05b85ccad6736ed5e74a3f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/135272
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Testing it locally, I could download 52.000 documents
Reuse mimetypes dictionary from get-bugzilla-attachments-by-mimetype
by putting it into an external file
Change-Id: I875d90f6119c3c3bdfea6a0efd3bbc8c5be1eb63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135457
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
in View->Formatting Marks mode instead of hiding them
This way it's possible to avoid interoperability issues
better, when these (now visible) spaces are stripped only
in Writer, but not in MSO, resulting different layout,
i.e. bad paragraph alignment, because the users can
notice the extra spaces and remove them in Writer.
Extend SwHolePortion::Paint() to paint its text,
what is probably just a bunch of spaces.
It's an initial fix for tdf#43100, tdf#120715 and tdf#104683
(cursor movement on the hidden spaces, end of paragraph sign
before the hidden spaces, unable to select spaces after the margin).
Follow-up to commit 93d7bdcb85
"fdo#33167, i#20878: Show spaces at the end of line".
Co-authored-by: Tibor Nagy (NISZ)
Change-Id: I48df3b41af37c77fd594bb6776ca30e845c51490
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135104
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Hyphenation is a document-level setting in OOXML (only
disabling hyphenation is a paragraph-level setting),
import/export hyphenation zone in Standard style, similar
to IsHyphenation.
Note: Remove HyphenationZone from grab bag to allow its
modification in Writer.
Fix also grayed out hyphenation zone input box in
Text Flow, when enabling hyphenation.
Follow-up to commit 7a1d4b7d1d
"tdf#149420 sw offapi xmloff: add hyphenation zone".
Change-Id: Ic1a3f13ba4e80338227c3206a0ed619589809328
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135474
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
> instdir/share/config/soffice.cfg/modules/swriter/ui/fldfuncpage.ui:723:1 Duplicate object ID 'liststore4' (previously on line 30)
since 7e2a8abf0c "liststore used twice by
different widgets"
Change-Id: I9e1b90ae352ba5c1fd5e634401096c70cdafb2bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135472
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Update translations from branch 'master'
to 1cb47d77ece911852b9fc5ff728b92ac779e39bf
- Updated Slovenian translation
Change-Id: Ie86b805a08a629c9acb045cd083b6e0f326c47c1
Both the checks test whether a follow-up rectangle can be merged
with the previous one by merging it at the bottom or the right of it,
so the previous one should be always the top-left and the follow-up
one should be the bottom-right.
Change-Id: Ie5809595ec9bf28bd169fc503a6b391c6188d0b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135468
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
* Update helpcontent2 from branch 'master'
to ba3b8d5bc6416cec3ab2d86ba8452c292681086e
- Include metacharacters fragment in ICU regexp URI
So it leads to Regular Expression Metacharacters instead of just the
page that starts with all sort of developer information not relevant to
users.
Change-Id: Id1efca75302d023a83b45a4bc81654ffe8c2980f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/135471
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Insert command in menu Sheet > Navigate
(alongs with To Previous/Next Sheet)
Use .uno:JumpToTable command from Navigator
Use its own Go To Sheet dialog
Add a Search entry to type partial name of sheet
Menu translation missing?
Change-Id: I16b8b56a688c8396159617f04a2a7e034721ce31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134714
Tested-by: Jenkins
Reviewed-by: Laurent Balland-Poirier <laurent.balland@mailo.fr>
This was most recently fixed in 3cfd63cb55
but that didn't take into account that now with Ctrl+A multiple flys can
be selected and copied, and all of them should be pasted; remove the odd
restriction to paste only one text frame.
This reveals that pasting a text frame will actually select the text
frame, so subsequent flys end up anchored inside the text frame; delay
selection until all flys have been pasted.
Change-Id: I049f60ca9656e5075d481d4501bb1ffdd28a4e21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135366
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Dialog was changed in d73602dc51 to fit
vertical size on small screens by placing Western/CJK/CTL into a notebook.
But for CJK and CTL it's required to have Western fonts visible in parallel.
* dual solution for western with nocjk and cjk dropped
western scales to the dialog width if no CJK nor CTL is enabled
* CJK and CTL placed in a notebook, Western as well for proper alignment
* font names are presented in lists but size and style per simple dropdowns
* info text sized at 80%
* variables renamed to keep track of controls (old names kept in l10n descriotion)
* UITests adjusted for variable names and tab positioning
Change-Id: I45b40e9bc37565f6364f1dfc1b5d837270fe4644
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134666
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
* Update translations from branch 'master'
to 40da1e34cabf93b04d900b7b6ab501fb3160efef
- Updated Slovenian translation
Change-Id: If7fea40ad58b893757b644d670f1470c40dcbfde
in Justify::SnapToGrid correctly, and use it in
SwFntObj::GetTextBreak() and SwFntObj::GetModelPositionForViewPoint()
to get correct text positions before any further calculation.
In fntcache.cxx a simple formula was used to calculate the average
width of text grids occupied by ideographs. That's incorrect because 1)
for strings containing Unicode IVS, a ideograph is composed of several
sal_Unicode and the length of the string is not the same as the number
of ideographs contained. 2) The average width doesn't work because
character width varies, like ideograph and half-width kana in the
test case.
Change-Id: I863e8d8e346f555ff184a2f47d615e513b965b34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135342
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Writer follows the CSS box model when it comes to page borders: there
can be a positive distance between the edge of the page and the border,
and again a positive distance between the border and the body frame.
This ensures that the page border never intersect with the body frame,
which is usually what users expect. Word, however, can work with 2
distances for border and text, both measured from the edge of the page,
leading to a page border, which is inside the body text. This is
described at great detail at
<https://wiki.openoffice.org/wiki/Writer/MSInteroperability/PageBorder#Importing_case_3:>.
Fix the problem by allowing negative border distances: this doesn't
influence the position or the size of the body frame, but it gives us a
way to position the border more towards the center of the page, leading
the matching layout between Writer and Word.
The doc model (to allow negative border distances), UNO API and DOCX
filter is updated in this commit. The ODT filter works without explicit
effort. Other filters are not yet updated in this commit.
Change-Id: I723e1bdb8dc6391129f1686f88826cc089f6fd67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135462
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
A regression of
commit e247262327
CommitDate: Tue Jul 30 23:49:55 2013 -0400
More on avoiding direct access to data members.
that changed, for example, invalid sheet references
- aRef.nTab = MAXTAB+3;
+ aRef.SetTabDeleted(true);
The then following
commit 8a19af57bb
CommitDate: Tue Jul 30 23:50:03 2013 -0400
Now nobody accesses reference members directly. Make them private.
changed ScSingleRefData::Valid()
- return nCol >= 0 && nCol <= MAXCOL &&
- nRow >= 0 && nRow <= MAXROW &&
- nTab >= 0 && nTab <= MAXTAB;
+ return ColValid() && RowValid() && TabValid();
without taking the deleted flags into account, where previous to
commit e247262327 nTab > MAXTAB
fulfilled the condition of not valid.
This makes it necessary to adjust the
TestFormula::testFuncRangeOp() test case that relied on the broken
behaviour.
Change-Id: I42e769ca0d56a2eb786bb6f65917f0c15d082763
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135453
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
When e.g. having one image selected and then double-clicking on
the other one Execute_Impl() gets called with SfxStateCache still
having bSlotDirt and mxDispatch out of date.
I originally tried to make all mxDispatch accesses first ensure
!bSlotDirty, but then unit tests started failing with hard-to-debug
crashes because GetSlotServer() also sets bCtrlDirty, which leads
SfxBindings to handle that in idle timers. So at least handle this
case, where it really is necessary.
Change-Id: I4ec5908bc955c562e14cd813e269536924ce6f2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135344
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
we never do this deliberately
Change-Id: I6d6d8ea13fb5f09bcf631c0474e671d4605f4c69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135427
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
The original problem was that %PRODUCTNAME wasn't replaced for
accessibility descriptions (which are reused for extended tips) under
gtk.
Universally querying all a11y descs on load to potentially replace
%PRODUCTNAME in a11y descs at runtime led to tdf146971 which was a huge
startup slowdown.
The half way 7.3 fix was to leave a11y descs alone, but do the
replacement when querying for the extended tip case. So the extended
tooltips were ok, but screen readers would still say a raw
"%PRODUCTNAME" text, hence the rewording effort to remove %PRODUCTNAME
from the a11y descs entirely for 7.4.
But there is now a few cases where some options paths exists in the a11y
descs which is not exactly correct wrt to the text shown in the options
dialog.
Reworking the options dialog to not have %PRODUCTNAME there at all and
updating everything to fit that sort of change would not be popular. So
move the cases where a11y descs really should have %PRODUCTNAME in them
out of the .ui files and into .hrc files and use specific
set_accessibility_description calls for them via ResID which will do
the %PRODUCTNAME replacement automatically.
Hopefully the a11y runtime cost for just this handful of cases is
negligible in the overall scheme of things.
Change-Id: Ieb17d26fd581cd5804a52b371b3bb5ea43023aa3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135432
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>