This is similar to SwDoc::s_pLast, but for the layout.
Change-Id: I48bb53a7595a4cec3fe47c563e91db671643d6b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148529
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
* Update helpcontent2 from branch 'master'
to d1b4263237f2cb02929156ff556cc12f6460380f
- tdf#153561 adjustments for "Format" because of widget name change
Change-Id: Iaead2cc332a8889f8c174f1ccf84e9cdfbfc154c
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/148507
Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
Tested-by: Jenkins
Hyperlink with target frame and anchor didn't work after export.
Change-Id: I84980e30d2e1d6d53cfe201cf4cac60354151aba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148041
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
* Update helpcontent2 from branch 'master'
to 6a25d11512dc078fc47c546585c9663b5804a3eb
- tdf#153561 "Chapter No." -> "Numbering" because of widget name change
also corrections to "Numbering" and "Entry text" descriptions
refactor <h2>,<h3> and remove <xml-lang>
Change-Id: I19fe8d8ecf74f3526a4d10b18a76ad1da47ad5c3
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/147370
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
since:
commit d062f097cc
Date: Wed Mar 8 02:14:11 2023 +0300
Simplify usage of BinaryDataContainer
It is always used to store data read from streams
Change-Id: I33d237a801b1cdf47b85b3fd3522c398ba08068b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148524
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This patch replaces sal_uLong usages in cui directory.
changed m_nOldCount in cui/source/inc/dbregister.hxx to size_t.
m_nOldCount has been used in dbregister.cxx where it is initially
assigned a value 0, later on it has been assigned the value
returned by registration.size() which returns type size_t.
Line 272 in cuigaldlg.cxx mrTakenList with type TokenList_impl
is pushed back with variable nPos of type sal_Int32 hence
changed TokenList_impl to store sal_Int32 types.
Change-Id: Ie0ba284dc4592cc69a1ded2fe232d18aaec3c92a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148237
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
ever since
commit af4e20426a
Author: Michael Stahl <michael.stahl@allotropia.de>
Date: Tue Dec 21 15:19:33 2021 +0100
tdf#135061 sw_redlinehide: create frames following hidden table
Specifically, remove the line
pFrameNd = &aIdx.GetNode();
because the pFrameNd is then immediately overwritten with nullptr.
Also re-indent the resulting code and removing an unnecessary block scope.
Change-Id: Ic4d40ee7835ed73038eba9da7ec72670cf0b97b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148384
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
...that hit at least with GCC 13 trunk and --enable-optimized,
> In file included from sw/inc/tox.hxx:35,
> from sw/inc/doc.hxx:35,
> from sw/source/core/inc/AccessibilityCheck.hxx:14,
> from sw/source/core/access/AccessibilityCheck.cxx:11:
> In constructor ‘sw::ClientIteratorBase::ClientIteratorBase(const SwModify&)’,
> inlined from ‘SwIterator<E, S, <anonymous> >::SwIterator(const TSource&) [with TElementType = SwTextFrame; TSource = SwTextNode; sw::IteratorMode eMode = sw::IteratorMode::UnwrapMulti]’ at sw/inc/calbck.hxx:364:68,
> inlined from ‘virtual void sw::{anonymous}::FakeCaptionCheck::check(SwNode*)’ at sw/source/core/access/AccessibilityCheck.cxx:937:99:
> sw/inc/calbck.hxx:295:32: error: storing the address of local variable ‘aIter’ in ‘sw::ClientIteratorBase::s_pClientIters’ [-Werror=dangling-pointer=]
> 295 | s_pClientIters = this;
> | ~~~~~~~~~~~~~~~^~~~~~
> sw/source/core/access/AccessibilityCheck.cxx: In member function ‘virtual void sw::{anonymous}::FakeCaptionCheck::check(SwNode*)’:
> sw/source/core/access/AccessibilityCheck.cxx:937:14: note: ‘aIter’ declared here
> 937 | auto aIter = SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti>(*pTextNode);
> | ^~~~~
> sw/inc/calbck.hxx:289:53: note: ‘sw::ClientIteratorBase::s_pClientIters’ declared here
> 289 | static SW_DLLPUBLIC ClientIteratorBase* s_pClientIters;
> | ^~~~~~~~~~~~~~
(And -Wdangling-pointer is unknown to older GCC versions, so would cause
-Werror=pragmas there.)
Change-Id: I64e53b52e04ab34da42c7adc54b8d8cb46123dfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148515
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
There is only a single SwDoc instance in many cases, having an easy
to access pointer to that is helpful when the backtrace doesn't include
a frame in sw/ code.
This allows something like 'print SwDoc::s_pLast->dumpAsXml(0)' in gdb,
even if e.g. the current frame is xmloff/, without hunting for a parent
that is in sw/.
Change-Id: Id70baf7919ef6fde7b834704741dab70531e7e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148522
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
FillGradient, which is a awt::Gradient, has many features which cannot
be represented in the <w14:textFill> element in docx. Therefore often
only workarounds are possible.
ELLIPTICAL and RADIAL are exported to 'circle', SQUARE and RECT to
'rect'. 'Angle' is ignored. A focus point is used instead of a focus
line.
LINEAR and AXIAL are exported to 'lin'. AXIAL is done be compress and
mirroring the color stops. Using Words feature of reflecting a gradient
would prevent detecting 'axial' in the current import filter.
'Border' is exported by introducing additional color stops.
'StepCount' is ignored. A workaround using additional color stops is
possible, but would require a simultaneous change of the import filter.
'StartIntensity' and 'EndIntensity' are exported as 'lumMod'.
Theme colors are considered where they can currently occur. But
tdf#151882 is yet not fixed, so Word will not render them because of
missing Theme folder.
To allow 'lumMod' and theme color and RGB color as well, the color of
a color stop is hold in a struct.
In case of two color stops, the color stop at position 0% is doubled.
That way Word uses the same linear color transition as LO and not its
quadratic one. AXIAL too introduces two color stops at position 50%.
Emulating 'StepCount' would produce two color stops at same position
too. Therefore a std::multimap is used for the color stops.
The implementation has a lot local parts. If they should be useful
for Fontwork shapes in Impress/Draw, they can be moved and adapted
later. The implementation separates the calculation of the required
color stops from the generation of the markup, so using parts in
Impress/Draw is likely possible.
Change-Id: I1032ab8d37b6f112d66f85a30210ebda3ae54486
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148354
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
The bugdoc has a single table cell, and widow control is meant to move
the last 2 lines to the second page, but only one page was moved there.
The problem is that widow / orphan control was completely disabled
inside split table rows, but Word does this.
We know when a table comes from a Word document, so in that case enable
widow / orphan control inside split rows as well.
Do this only for in-fly tables for now, doing this in general would need
more work, as pointed out by CppunitTest_sw_layoutwriter's
testForcepoint76. It is an RTF file that doesn't open in Word, but we
would layout-loop on it if this would be enabled in general right now.
Change-Id: Ie37be61443a274f408e1124983d1d495de5636c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148521
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Add newline after certain tags in head section and paragraphs, to make generated xhtml easier to read.
Change-Id: I9562ef48d9dd1283110be4a45527616dce186681
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148026
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* Update helpcontent2 from branch 'master'
to d399273cdb7cfb2b90260d40e49e81ac75398718
- Update more references to the Extensions dialog
Change-Id: I478df514a784bac03c4acdca935df184accd6b6b
Regression of 48ca233625
("tdf#125040 Avoid flickering on context change").
Before that commit the state of toolbar commands was
updating async, which is how it managed to not crash.
Change-Id: I07e2ce25faf848c7db33dd029b54a98bafcf8fa9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148518
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
It is so much easier to work with if a test failure's line number unambiguously
points at the code's sole execution. (That is, test code is necessarily non-
DRY.)
Change-Id: I75919c55671348f6190e9e108e72e24ec18ce986
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148514
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
It had originally been disabled by a037f6338c
"Disable CppunitTest_vcl_wmf_test under --enable-merglibs for now" because "the
problems caused by that test having the vcl objects linked into both the test's
library and the mergedlib (which the test's library links against) are just not
manageable", which is no longer an issue at least since
29cdfa3fc3 "no need to statically link against the
emfio library in the tests".
But the test code apparently uses WinMtfFontStyle, which can thus no longer be
hidden under --enable-mergelibs.
Change-Id: Ie807b19f0cb44408c69d03faca01fabe88239ca0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148493
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
It's updates, not insert. One has to dispatch .uno:UpdateBookmarks to see
this in action, which does something if the document already contains at
least one bookmark.
Change-Id: I32d259b0b5c18cbbec2969cd189ca7ba4dd0dde4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148487
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
When a column break or page break split occurs,
the split off paragraph should keep (most of) the properties
of the original paragraph. This already happened for page breaks.
Exceptions are first line indents, and numbering
if there was a run to apply them to already.
This commit:
-tells lcl_startParagraph when column breaks are m_bIsParaSplit,
resulting in the paragraph properties being copied over
-clears the para properties that shouldn't apply twice.
[Top Margin was more complicated and handled separately.]
make CppunitTest_sw_ooxmlexport18 \
CPPUNIT_TEST_NAME=testTdf153964_firstIndentAfterBreak14
make CppunitTest_sw_ooxmlexport18 \
CPPUNIT_TEST_NAME=testTdf153964_numberingAfterBreak14
Change-Id: I5ecd25da831894536044c6dbffbb0a262f8b6828
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148452
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Undo/Redo crash resulted by the workaround for anonymized
w:del in w:ins. Anonymized (no time stamp) redlines
are loaded with Epoch time (1970-01-01) since
commit 2c51746997
"tdf#146171 DOCX: fix loss of change tracking, if no date",
so it's possible to fix the original DOCX import problem
using this value: don't combine anonymized deletion
inside/over anonymized insertion, and remove all the
workaround, keeping only their adjusted unit tests,
and add new tests for the export fixed finally, which
keeps anonymized w:del in anonymized w:ins.
Revert commit 2de1fd7d8b
"tdf#125187 DOCX track changes: fix w:del within w:ins",
commit df4f405a15
"tdf#121176 DOCX track changes: same size w:del in w:ins" and
commit 7a810d6a9f
"tdf#116084 DOCX track changes: fix w:del within w:ins".
Regression from commit 2de1fd7d8b
"tdf#125187 DOCX track changes: fix w:del within w:ins".
See also commit 64dcedcf7c
"tdf#147760 tdf#142902 DOCX export: anonymize date and moveFromRangeStart".
Change-Id: Id6e41187e7f94154389f24dd525067ac47ec7e58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148479
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
"Chapter Info" -> "Heading Info" (in Entries tab)
add tooltip; revise extended tip
"CI" -> "HI" (on Structure widget)
and its tooltip
"Chapter entry" -> "Heading info"
add accelerator
change labels in dropdown box to number and contents
(consistent with 'Heading' type field variable)
add tooltip; revise extended tip
Change-Id: Ic937d0db6af28c9fc416e6a960c0f22a69bfbadb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148406
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
Implemented import + export for "Zip64 Extended Information Extra Field",
(in "Local file header" and "Central directory file header")
and for Data descriptor.
Focused only to be able to handle files with over 4GB uncompressed size,
in the zip archive.
The 64k filecount, and the 4GB compressed size limit is probably still present
Tried to follow pkware .ZIP File Format Specification,
Some cases were not clear to me and/or some zip compressing tool may not
perfectly follow the standard, like 'extra field' should be 28 bytes long,
but its reader now can read shorter (or longer) 'extra field'.
Replaced some 32bit codes with 64bit codes, in stream handling, in deflater.
Tested with an ods file that contained a content.xml that bigger then 4BG+
(import + export + reimport) on windows.
I think 4GB+ files import/export would be too slow fot unittest.
So, for unit test, used the small but zip64 format files,
that was attached to the bugzilla tickets
Note: It helps with Bug 128244 too (1 of the unittest tests it),
but that ods file missing manifest.xml, so LO won't be able to import it.
Change-Id: Idfeb90594388fd34ae719677f5d268ca9a484fb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147306
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
ISO 14289-1:2014 adds a new feature:
7.4.3 Additional headings
If a PDF that contains the tags H1, H2, H3, H4, H5, and H6 (in any
permissible sequence) requires more headings, tags numbered from
H7 upward (without limit) may be defined and used.
Do not add new enum values H7..H10 to StructElement, because this
approach results in veraPDF complaining:
Specification: ISO 14289-1:2014, Clause: 7.1, Test number: 5
All non-standard structure types shall be mapped to the nearest
functionally equivalent standard type, as defined in ISO
32000-1:2008, 14.8.4, in the role map dictionary of the structure
tree root.
Change-Id: Icf39667dee3847f6b755bfa592a9d30ce872c26e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148431
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
* Update helpcontent2 from branch 'master'
to 717e288c98b181fe9a49e86f7fa6d4f594df4ab5
- tdf#153637 update "use level..." option label and explanation
correction to description about what appears in Type box when new
user-defined index is created, and adding link to relevant help page.
refactor <h1>,<h2>,<h3>,<relatedtopics>
Change-Id: I35ccb871f6da435fac2cdf95f0a47e77baf75476
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/148413
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
These help when debugging the LanguageTool issues.
Change-Id: I04bb84dbffc8e4c4e0b353f8e830fe66d8dff576
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148199
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
there are two very similar classes, standardise on the one in
include/comphelper
Change-Id: If85729dcea01e65a2d095bb211fe643c783ebf1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148442
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
The problem was that the top margin was being applied
to the new paragraph after the split.
This is absolutely attrocious in MS Word before 2013.
If I am going to be in error, I want to error on the side
of being compliant with compat15, since all other versions
of MS Word are now unsupported.
I think I have the logic of it mostly figured out.
In compat15, the top margin never applies after the break.
In compat14, if the paragraph properties are not applied
to a run before the break, then they can be applied after the break.
make CppunitTest_sw_ooxmlexport18 \
CPPUNIT_TEST_NAME=testTdf153964_topMarginAfterBreak14
make CppunitTest_sw_ooxmlexport18 \
CPPUNIT_TEST_NAME=testTdf153964_topMarginAfterBreak15
Change-Id: I8816b391e898cfea58c2e0dbf01c881f87bbc4c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148451
Tested-by: Justin Luth <jluth@mail.com>
Reviewed-by: Justin Luth <jluth@mail.com>