100 Commits
Author SHA1 Message Date
Oliver Specht 5dd328effe Support of page styles without header/footer on first page
Import/export to/from docx/rtf supported.
Unit test available.

Change-Id: I12065ba4fb050d7dfc013eda704ebe2acb53c88e
Signed-off-by: Oliver Specht <oliver.specht@cib.de>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3580
Tested-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit b8af8f046a098c67d7caf44dc70d1db5cabf24e2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206698
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-18 12:17:01 +02:00
Oliver Specht bc3e8b4817 tdf#33338 provide object type in AutoCaption
Checking the selection type while pasting does not work and
returns either frame or text. When pasting OLE objects
the selection type must be preset.

Change-Id: I11229d45ba71c148e93c06093f12902cb69f2452
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206235
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Tested-by: Jenkins
2026-06-09 11:19:30 +02:00
Oliver Specht e8b1893fcf tdf#171999 fixes field editing
Editing fields with conditional/hidden text and (previous/next) page number
resets required sub type which invalidates the fields.
Came in with
commit 9257e94e5d
Author: Noel Grandin <noelgrandin@gmail.com>
Date:   Sat Jul 5 16:35:17 2025 +0200

Change-Id: Ie07186be2fecad713dceb92f45e29621c99fe41e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204899
Tested-by: Jenkins
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2026-05-08 09:49:13 +02:00
Oliver Specht 4c957e514c tdf#171046: fix update of document statistics
Document statistics should be considered as initialized only
if the call to IncrementalDocStatCalculate() came to an end.

Change-Id: I3d83e99fb8b1cfa6c63ca0ee120275fe80c00e47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202041
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Tested-by: Jenkins
2026-03-20 13:39:13 +01:00
Oliver Specht bb496f5494 tdf#167973 Fixes case rotation in selection in multiple paragraphs
Broken in commit b1170251fb because it checked
the selection in a single paragraph only.

Change-Id: If84aca87c9fee5750751cd91cb08372714f17eba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191472
Tested-by: Jenkins
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2025-09-25 09:15:57 +02:00
Oliver Specht 2081fc359b tdf#164676 fix modify handler in variables tab page
Change-Id: Ifb5e71bd14b7938d714873616dd63794e8e1d87b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189393
Tested-by: Jenkins
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2025-08-12 09:59:55 +02:00
Oliver Specht 80877c7dc4 tdf#166850 Apply converted style name to StyleRef field
As a result of e45f187870362ed4448f4a9fb96883b8431887fb the StyleRef
field needs to use the modified style name with (suffix " (user)")
The related JUnit test requires a German locale to detect the
related issue. Otherwise there is no suffix that needs to be
applied to the field.

Change-Id: Iad4257568ad05900df63a6098ba81e926df701e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186150
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2025-06-05 10:26:14 +02:00
Oliver Specht f8eb5d8503 tdf#164202 Update gallery data on insert/remove
Fixes crashes introduced with 09c6204b63

Change-Id: Ifca32646c8ba5abce647934e1d2ddac8a8eba2ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185584
Tested-by: Jenkins
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2025-05-22 07:53:33 +02:00
Oliver Specht 7075178198 Scroll selection in combination with pictures fixed
Follow-up to 7fc7dc679d
In documents containing pictures the selection does now grow
continuously instead of flickering before/after pictures.

Change-Id: I2e2c521cc74a65b98027856f1ac2ebfdf78cba2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185522
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2025-05-20 00:45:52 +02:00
Oliver Specht f8cbc8eae2 Improve labels/help text of page range field controls
Follow-up to 4882974799
Changes related labels in field dialog an in header/footer dropdown
menu.

Change-Id: I663676e6b352377b21bc2fde1d49acb30fe8f26a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185292
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2025-05-15 14:57:38 +02:00
Oliver Specht 4882974799 Improve labels/help text of page break related controls
Change-Id: I5b40606c1b498d33df1569c7ad63f6b0102f5201
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185009
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2025-05-08 17:17:20 +02:00
Oliver Specht 90ce84a5dd tdf#165564 RTF:Fix export and import of footnotes/endnotes
Removes additional spaces in export and wrong insertions of custom
footnote/endnote symbols in import.

Change-Id: I2e79e87a5b644b116a87602332e09cde89b64ba5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184978
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-05-08 11:38:05 +02:00
Oliver Specht 7fc7dc679d tdf#50743 improve scrolling with selection
Delay calculation of scrolling timeout for the first 5 calls to
make it easier to scroll even if you put the mouse cursor too far
outside of the document window.

Change-Id: If370f87cc439e7e3321078c1334c0a17e6ec6046
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184745
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-05-06 02:18:13 +02:00
Oliver Specht 5268e13d39 tdf#166191 character style properties only applied if repeated
Reset character properties that are not repated at run level also if
- the text run is in a table
- there is no style with the index 0 ('Normal')
Change-Id: I840178d727a157b628cb359e5c2798c1455cd555

Change-Id: Id04a501e156e33804e6b99b13688eef1cb899e6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184277
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-04-23 17:12:24 +02:00
Oliver Specht 6ea60a38f8 tdf#166230 Switch off page number of page breaks
Makes is possible to switch off the page number of page breaks
in paragraph dialog.

Change-Id: Ic185e492080630ffd9906492e0a00e7d8b87d028
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184336
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-04-23 15:49:48 +02:00
Oliver Specht bac7665f78 tdf#165083 Remove of wrong page margin export code
With 8ef9573f08 import and export
of page margins has been changed. The export part was wrong so
it is removed here.

Change-Id: I00ab7854cb7ee0baa81bfffcd7f07dea3b84f2f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183146
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-04-23 09:57:04 +02:00
Oliver Specht 677e40c8b8 tdf#166177 Fixes unintended switch to rotate mode
Fixes switch to rotate mode after inserting or
moving a shape.

Change-Id: I4e8ce8b5891a08c6c3f20a9c29fa4bef4428eb84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184141
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-04-22 17:03:43 +02:00
Oliver Specht 53d9f2712f Close copy field dialog directly if 'Copy' is pressed
Change-Id: If4482c9c6c931fa6cf205ce999a56d9990930537
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184142
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-04-17 09:33:39 +02:00
Oliver Specht 8624833866 tdf#50743 improve scrolling with selection
Second attempt to improve scrolling whith selection after
47bf215cc7

Change-Id: I46b321b7e0706ef0975e7078018d75ef64d65897
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183361
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-03-29 08:14:53 +01:00
Oliver Specht a22f832496 tdf#133352 Undo HasDirectFormatting flag of table box
With 09fc6fef2d a mbDirectFormatting flag
has been added to table boxes. This is now also restored in undo.

Change-Id: I3b8c22c0c452be3dd4b2f203a0ac5b9fdc7488d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183347
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2025-03-28 00:41:49 +01:00
Oliver Specht 80e7e76b25 tdf#165329 Improve fix of tdf#163634
Broken loading of text boxes with relatives sizes is fixed here.

Change-Id: I180850d746aa9e92d0de13b3eb594f3bb754899e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183341
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-03-27 22:34:15 +01:00
Oliver Specht 1a081416db tdf#165923 top margin import fixed
Top paragraph margin needs to be reset to default if not repeated
at the paragraph itself.

Change-Id: I02b92a6893122add3a7aa59d58e0c4fe52aba98a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183390
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-03-27 22:17:24 +01:00
Oliver Specht eaac1bfe00 tdf#164318 Call copy field dialog on double click
In read only documents a double click on a field executes the
copy field dialog if the field contains text to be copied.

Change-Id: I83042a95c4320f7fa94b04e53f880d0bc5af92a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183323
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2025-03-27 05:07:59 +01:00
Oliver Specht ff81c82851 tdf#158709 Update cell formula if cells change from value to text
Modification of cells that are part of formulas notify
also if numeric content is changed to text - even if they have
 multiple paragraphs.

Change-Id: Ifb6a35f4c162388d4fadd73e5207a6d3719a9a04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180013
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-03-26 15:24:49 +01:00
Oliver Specht fadcf3d1a4 tdf#165829 Shortcut Shift+Ctrl+F2 assigned to ConvertFieldToText
Change-Id: I42af5bc081e6618789988446d9011f78541b599d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183263
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-03-24 21:01:07 +01:00
Oliver Specht bf52841f33 tdf#165748 re-save state of portrait/landscape buttons on apply
Change-Id: I7e525d41ce7b46c5086e3ef2112a74485cd46793
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183273
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Tested-by: Jenkins
2025-03-24 19:14:15 +01:00
Oliver Specht ec8ea01600 tdf#165827 Assign id to ConvertFieldToText undo action
Fixes "Replace $1 $2 $3" entry in undo dropdown.

Change-Id: I108cf408ac4f703677d1b013864e6295f7b52e6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183173
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-03-21 09:35:40 +01:00
Oliver Specht 00fd41ace1 tdf#165805 RTF import of \page at table end fixed
With 7d3778e0ef page breaks
in tables were ignored in docx import. That is not done in
RTF import anymore.

Change-Id: I7a0fa859360323376f84570a289ba91079f171cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183096
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-03-20 19:05:35 +01:00
Oliver Specht a2a88f0073 tdf#165717, tdf#165718 additional hack to apply continuous section breaks
Keeps reference to range in front of the current range to
apply page style to an already available page break in cases
where the section starts with a table.
Page number restart is also applied in the old and the new code.
Remove of dummy section paragraphs introduced with
b696600821 is now only performed
if it is no RTF import.

This causes:

  Test name: testHiddenParaBreaks::TestBody
  equality assertion failed
  - Expected: 3
  - Actual  : 4
  - In <>, XPath '/root/page[2]/body/txt' number of nodes is incorrect

But the file is not imported correctly anyway and this is actually
fixing a bug, so adapt the test file.

  rtfimport.cxx:910:Assertion
  Test name: (anonymous namespace)::testContSectionPageBreak::TestBody
  equality assertion failed
  - Expected: THIRD
  - Actual  :

The problem here is that the extra paragraph that is inserted for \sect
if m_bIgnoreNextContSectBreak is now wrong as it was previously removed
but no longer is, so don't insert the extra paragraph any more.

But leave the extra paragraph in case it's a frame, otherwise we get:

  rtfexport8.cxx:91:(anonymous namespace)::testTdf158586_0::TestBody
  equality assertion failed
  - Expected: 1
  - Actual  : 2

testTd112202 fails, but Oliver says that extra page 6 is an improvement.

Change-Id: Ie9a22f00e75c797762f52e6b865e32002051988c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182830
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-03-18 11:46:42 +01:00
Oliver Specht e846c8e5ed tdf#45946 Add function to convert field to text
The current field can be converted to it's representing text.
Exceptions are fields in header or footer that have multiple representations
like page number or chapter fields.

Change-Id: I62b92b2d0b2ed766a2722ffd804496008b72e792
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167900
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2025-03-17 15:39:22 +01:00
Oliver Specht 816a4ede2c tdf#165315 Store field:fieldmark in a text::span
Store automatic style around fieldmark to keep character attributes

Change-Id: I902c90d9bfbbc964c3f0567042ea7f7bc993471f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182582
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-03-13 17:43:05 +01:00
Oliver Specht d4bde4c979 tdf#90293 switch on rotation of shapes
Adds Writer images not handled by c628a26cd3

Change-Id: Icaf046df0eef9cf3722a00bb1d7761c849f03734
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182592
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-03-13 13:12:29 +01:00
Oliver Specht bf557f6c18 tdf#165064 fix regression from tdf#161233
Change-Id: I07953d4569542774c8012b879f3894e7da61e0ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182487
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2025-03-08 14:59:53 +01:00
Oliver Specht 554d2769d1 tdf#71583 Add page count of ranges with consecutive page numbering
Adds a field that counts the pages in ranges defined by page number restarts

Change-Id: Ie0727ab20c81464918ad5fb9aa42046bf00aa63c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178141
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-03-08 14:59:16 +01:00
Oliver Specht 38464825c8 tdf#165483 style inherits only repated properties
Each attribute a style inherits from a parent style needs to be
repeated at that style. Otherwise it is overwritten by a default
attribute.

Change-Id: I9cef60b0d1eaa16d212f091434e9896bfd4a44c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182284
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-03-07 15:45:20 +01:00
Oliver Specht 0a31206b38 tdf#165596 Fix format paintbrush in Impress with lists
Follow-up to dbb05dc818 to copy
paragraph attributes from the source also if no selection is
set.

Change-Id: I05bea3fcaf8cf7a9c7ed341d2a7171d3f8a28131
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180277
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-03-05 21:06:09 +01:00
Oliver Specht c628a26cd3 tdf#90293 switch draw selection to rotate mode
Clicking a draw object(selection) switches to rotate mode and
back in Calc/Writer like it is done in Draw/Impress already.
By default this function is off an can be activated in
via toolbar Drawing

Change-Id: I4a11d008e7df97c5278cae987d5c47fa50cddf14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181169
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-02-27 11:13:38 +01:00
Oliver Specht 7957b996cf tdf#165077 Align applied options to dialog
Options in tools/.../draw|impress/general do not overwrite
flags not supported in the dialog any longer.

Change-Id: Ia1e8e678dd47e58d6201a36e4c57501d27429759
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181440
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-02-26 18:01:05 +01:00
Oliver Specht 9ceac9e0c4 tdf#164949 regression fixed
Fixes regression introduced with 3e4aa12741

Change-Id: I065c626358b19f74d1838ae79717b0b630532dc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181624
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-02-24 17:30:50 +01:00
Oliver Specht 330efa9db3 tdf#165333 RTF: import SYMBOL fields correctly
Úsing XTextAppend to insert SYMBOL fields fixes wrongly extended
character properties.

Change-Id: I14f187e63e2c72d3c2cf27ab99cdced108797057
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181892
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-02-21 19:42:00 +01:00
Oliver Specht 44d1dd3a25 tdf#118465 RTF: import repeated headers of tables
Change-Id: Idc0cd36e1ca55a0c0cc60faf455919af645bb747
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181792
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-02-18 12:53:15 +01:00
Oliver Specht fe1a74c68b tdf#164921 Renaming list styles fixed
User defined list styles are now correctly updated in paragraph
styles that are using them and only directly applied to paragraphs
that had a direct formating before.

Change-Id: I9b671655ffa430d643c48fc35f15f38b41de4b9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180892
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-02-11 23:05:52 +01:00
Oliver Specht 0e0ae62ded tdf#164266 RTF: border distance in style is not applied to table
Attributes from styles are only valid if they are repeated at the
location where the style is applied.

Change-Id: I0083b833266346084d51aaf78a162b96012a0dab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180835
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-02-11 21:26:30 +01:00
Oliver Specht 9647aded12 tdf#164176 Import multiline document variable with break
Converts the '_x000d_' or '_x000d__x000a_' to a paragraph break in docx import.

Change-Id: Ib8b5203338e987028279711928d3aecb9cedd836
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177838
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-02-11 16:33:21 +01:00
Oliver Specht d723103ff8 tdf#153192 support read protection in RTF documents
The keyword \readprot sets the document to read-only mode.

Change-Id: Idef47e9f93d3891d491cada18a9646b9f1b56cb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179826
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-02-05 11:27:09 +01:00
Oliver Specht 527f81f271 fix regression from 075560420a
Applying a paragraph style with an attached list style does now
overwrites a list style at a paragraph that had a list(style) applied

Change-Id: I0dc124dc2db167370dab8416a6cc97d563bcc03c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177842
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2025-02-03 23:19:10 +01:00
Oliver Specht e72919a301 tdf#151278 tdf#164724 tdf#164728 tdf#164729 switch off charts number format from source
Labels get their number format usually from source. When copy/pasted
the chart has no connection to a source format anymore.
The related LinkNumberFormatToSource flag is therefore reset.
The label (data series) number format used is now also saved.

Change-Id: I640083ec0036f116dec94cc982317e1e7992328b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180600
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-01-30 15:44:54 +01:00
Oliver Specht 875bb514b9 tdf#163340 fixes regression
Pasting a single paragraph with a list into an empty paragraph
with a different list should keep that target list and not apply
the source list.

Change-Id: Ife81aa9553bb2396082d23cc86336ad773b83a16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180536
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-01-28 18:14:47 +01:00
Oliver Specht a45428d4bd tdf#164318 Add dialog to show content of fields in readonly documents
Change-Id: I0036e8c02b57dab91361213489c5a6189149b553
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179953
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-01-24 15:37:29 +01:00
Oliver Specht 5337205fdc tdf#105083 Support status of numbering and bullet list
Shows the status of bullet/numbering in the current text selection
in the toolbar buttons ToggleUnorder/OrderedList.

Change-Id: I458896293c502da8142ad9cb43b5ea62a9f3b558
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180238
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-01-21 13:21:26 +01:00
Oliver Specht 530f51fd27 tdf#160621 Variable field dialog size of value field
The size of the value field is now set to 6 rows.

Change-Id: I298a0dfc5c61c18a170b2e8f7a700dab17b5ee66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180173
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-01-21 13:17:30 +01:00
Oliver Specht 60b64338c2 tdf#117946 Mouse zoom support added to slide sorter
Change-Id: I3d532f14f25d31a90971ace262ddf88df3c33eac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180020
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-01-21 12:25:54 +01:00
Oliver Specht 47bf215cc7 tdf#50743 tdf#37507 Improve scrolling while selecting
If the mouse leaves the document window scrolling of selections
happens now in smaller steps so the user is able to stop at the
intended position easier.

Change-Id: Ifd21c92936021f8e2213d34446672e2a8eab568f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178724
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-01-21 12:13:16 +01:00
Oliver Specht 853ddebc0b tdf#164183 Add hyperlink entries to context menu of tables
Table objects in Draw/Impress now have Open/Edit/Copy/Remove hyperlink
entries in context menu of text in table objects.

Change-Id: Id3a5346eb3227871a06d2ea7fdb3ed38c07654c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177849
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2025-01-09 13:27:12 +01:00
Oliver Specht fa9d3f5706 tdf#164621 Fix regression from 3e9658a201
Change-Id: I1026ae18bf9bb86b506e4ef1782b9f3aa5ae7125
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179874
Tested-by: Jenkins
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2025-01-08 07:19:14 +01:00
Oliver Specht 728f5eb01d tdf#164299 fix crash in pasting HTML table
Supports <colgroup> element now.

Change-Id: I4fe49f3c79c567e9364a1642e716846256c6070b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178536
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-12-16 11:25:23 +01:00
Oliver Specht fdb13df0cb tdf#163634 Format empty paragraph if they have a bullet/numbering
Some optimization in commit 52abeff6d5836b29dbefe69f284bbd89f6672ae2
ignores paragph attributes if the paragraph is empty.
But it is not empty if it has an active list.

Change-Id: I8885d0f201fc48279263a3d41ec6d660b534ded2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178311
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-12-11 16:10:53 +01:00
Oliver Specht 5fb8e29926 tdf#164065 load vml textbox in a group shape
Store (vml) textbox elements to determine whether to load shape text or
Writer frame. Replay elements in second step and process depending
on the outcome.
- result flag not yet available while processing
- The text shape in docx bugdoc of tdf#152878 can now be loaded as Writer frame
but with wrong size/position.
- should also be applied to drawing ml shapes currently always loaded as Writer
frame

Change-Id: I0778057f9985f5523d91a9d757e00f2968aba350
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174902
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-12-10 17:18:10 +01:00
Oliver Specht add6efb409 tdf#160621 Variable field dialog size of value field
The size of the value field is now set to 5 rows.

Change-Id: I808ffbb64d71a0707857cf80d1c0b73419ac7b90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177893
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-12-06 14:26:03 +01:00
Oliver Specht ef4452663d tdf#161341 show/hide controls/shapes/pictures in view/print
Controls/shapes and images/objects have a display option in tools/options/
Writer/View and in print dialog there is "Form controls" and
"Images and other graphic objects". With this change the options
will actually be applied again.

Change-Id: I52389a8519d863792a7cd126a95a389c90c05a5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171905
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-12-02 07:36:20 +01:00
Oliver Specht 40436e1dfd tdf#146553 Enable additonal functions in editable section while in r/o mode
Insert/Edit table, insert lists, insert AutoText
automatic spell checking

Change-Id: Iccef3965316dc6079ea56a0283023c5a658512cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165031
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-11-29 01:15:51 +01:00
Oliver Specht 7c7e7da153 tdf#152839 remove paragraph spacing attributes in fill cells
Invisible cells in Word are added to Writer tables to get regular
tables. Borders of such cells are allready switched off. Now also
paragraph spacing is removed to not determine the row height.

Change-Id: I27d3d033de54f051527cf29e2655e7a564d1a5ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176219
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2024-11-25 23:17:00 +01:00
Oliver Specht 29a95e4b90 tdf#163870 remove list attribute on style apply
Follow-up to 075560420a
Removes hard list attribute also if the applied paragraph
style is applied again.

Change-Id: Ic08241b5e244690825dfe79c419298c5d5f7c17e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177270
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-11-25 23:16:05 +01:00
Oliver Specht 1ed564ecb7 tdf#163967 RTF: Pasting/loading hyperlink imports font color and underline
Hyperlinks are typically colored and underlined. The RTF import
- also used when pasting from clipbard - now evaluates font color
and underline in the field result.

Change-Id: I725fc3e94746c96d68379c021fb0c12cd3750096
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176714
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-11-20 21:29:59 +01:00
Oliver Specht f5cb83c033 tdf#160621 tdf#162702 Variable field dialog page resize
Reduce the size of the upper boxes to get more space for the
field value input.
Fixes also tdf#162702 by setting the size also to the number
format list box.

Change-Id: I96cc38b30fa7afccf6ca009aad3b15f1f051d381
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176106
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-11-19 09:16:01 +01:00
Oliver Specht 3e9658a201 tdf#163340 pasting paragraphs with lists changed again
Pasting paragraph with a list into an empty or completely selected
paragraph with lists has been changed:
If the pasted paragraph(s) are all formatted with a list from the
paragraph style then this list will be preferred.
If some the pasted paragraphs including the first one are formatted
with a hard list then these attributes will be preferred.
If all paragraphs have a hard list or no list at all the list at
the target position will be preferred.

Change-Id: I5aa6834d32f7c69b2eb9f8330b282c0ae6fca559
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176478
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2024-11-19 01:15:43 +01:00
Oliver Specht 43b9ab55a3 tdf#163956 calculate line height differently in FORMTEXT
Lines containing EN_SPACES only ignore character height
while calculating line height. In FORMTEXT fieldmarks the character
height of the default EN_SPACES is not ignored.

Change-Id: I8a89f13875f61ed287ce1697a91b42f20bd17192
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176147
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2024-11-19 01:15:00 +01:00
Oliver Specht c4aa95310d tdf#160267 Fix SVG and add PNG format from the clipboard
Since 6c04b8356c SVG was added
to the supported clipboard formats but it did not work.
SVG support is now fixed and PNG format is added in the gallery.

Change-Id: Ic9cb2eebfc37bd38605dfaa3a1c353a7532af357
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165908
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-11-19 01:14:11 +01:00
Oliver Specht 0313b56b93 tdf#162198 Reset default cell padding in RTF
66b4bfe302 introduced a default left/right
cell margin of 0.19 cm in DOCX import but is was also applied in RTF.
This is no longer applied in RTF import.

Change-Id: I192b2d17018c234837b926be64fdf27554b024e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173981
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-11-19 01:13:36 +01:00
Oliver Specht 075560420a tdf# 162326 reset paragraph list attributes on style apply
Follow-up to a593c27e88.
If Ctrl key is presseed then remove list attributes of the paragraph, too.

Change-Id: I29ea97ff08f45061d532b11cb981c534cc786f0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174977
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-11-19 01:13:17 +01:00
Oliver Specht 44edd65685 tdf#160621 follow-up to fix height of field value
With 2b45427a56 the height and width
of the edit variable field dialog has been increased but that
didn't always work. Here the grid structure has been changed to
give more space to the value field.

Change-Id: I1ab0ee7cd31a046db95578801d435e988f039ac5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174714
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-10-25 15:30:32 +02:00
Oliver Specht b310be24bc tdf#161538 update page preview on changed printer settings
Updates the print preview if show/hide automatically
generated empty pages is changed.

Change-Id: I8ee53c575edb31f16556a66037260cf79f0fb4a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175416
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-10-25 15:29:49 +02:00
Oliver Specht a157f82649 tdf#159286 FORMTEXT selection changed
As long as FORMTEXT has default content of 5 en spaces a click
selects the content. If the content has changed then the cursor is
placed at the mouse position.

Change-Id: If0e7717d04d29887b63ec20ed6b82c625400421a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173812
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-10-16 13:12:11 +02:00
Oliver Specht 038473595e tdf#152839 add fill cells to tables imported wrongly from RTF
In Word 'invisible' cells at the end of the row are usually marked
with \trwWidthAN. If that information is missing the table needs to
get addtional cells to smaller rows. This prevents extension of
exisition cell to the full width of the table.

Change-Id: I064f3da55665302d8198ed44d9f640a7707c34e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174385
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-10-11 19:07:49 +02:00
Oliver Specht 2321626477 tdf#163340 replace list on paste
Pasting paragraph with list should apply the source list to the target
paragraph if the target is empty or completely selected.

Change-Id: I27d462f121c03b6c5625f8c0967bc975d3ac2f88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174606
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-10-10 01:19:45 +02:00
Oliver Specht 9400c0cf10 tdf#132274 follow-up fix to Writer zoom options
Applying the zoom value works now as expected. The prior
fix mixed up zoom value and 100% and didn't always apply
special zoom values.

Change-Id: I7cf1f34fca5724eea14339535e7614cfecffdd79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174688
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2024-10-09 20:15:46 +02:00
Oliver Specht 3800ab5835 tdf#161233 paint pictures completely also with contour wrap
Pictures/shapes with contour wrap are clipped in Writer.
Word paints the pictures completely while the text flows above
around the contour. This is implemented here for imported documents.

Change-Id: I2a5fd89c18cbb3e88b65bc63e8105cc07b95af82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173869
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-10-04 00:05:42 +02:00
Oliver Specht 348efa75b9 tdf#132274 follow-up fix
Width of zoom radio buttons increased to prevent overwriting
of zoom value control in e.g. German translation.

Change-Id: I1e78840ede6aa1899ec7b62fdd0ce2bc92edea9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173948
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-09-26 20:48:02 +02:00
Oliver Specht ba02bfc98a Revert "tdf#162268: Import - add zero width space after line break"
This reverts commit d6f2f115c7.

Reason for revert: While the change improves the document attached to tdf#162268 it breaks other documents with similar but slightly different settings e.g. https://bugs.documentfoundation.org/attachment.cgi?id=191094&action=edit

Change-Id: Ic1f17307118979586287f000d460caa16e26367d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173394
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-09-26 18:01:06 +02:00
Oliver Specht a593c27e88 tdf#162326 remove character formats and styles on style apply
Removes the character attributes and character styles when a paragraph
or a character style is applied and the Ctrl button is pressed.

Change-Id: I8b2809d1a2b91e501ed8a11ac9f3aebec6c12c47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173154
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-09-23 20:20:28 +02:00
Oliver Specht 1ea2bbae1a tdf#163003 increment frame y position
In RTF vertical position of paragraphs in frames is handled differenty
than in docx. y position is incremented in docx. To get the same result
in RTF import the y position needs to be incremented, too.
Additionally the state of '\hyphcaps' needs to be imported to fix
the formatting of the wrapped paragraph of the bugdoc tdf#152865.

Change-Id: Ibb9851eb11a0e57ec7b9b1114264456d941cec24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173525
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-09-23 15:06:41 +02:00
Oliver Specht 4855bbfa4d tdf#132274 add zoom defaults to Writer options
Zoom value is sometimes stored at documents. But users
might prefer local zoom settings over stored values.
Users are now able to set preferred values in Writer's
option dialog.

Change-Id: Ia1c3926aac3dd236f15f84d8dc535d8aa3758238
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171482
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-09-17 03:44:46 +02:00
Oliver Specht 3e8183e0c4 tdf#134902 Test added
Import test added as follow-up to
0d512cb887
to check that the imported shape is not visible.

Change-Id: I9671930a5613021be20c75e021213dfda5e763cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171587
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-09-10 01:01:27 +02:00
Oliver Specht d6f2f115c7 tdf#162268: Import - add zero width space after line break
If a paragraph ends with a line break Word applies the paragraph
properties to the last line. Writer extends the properties of the
las run.
The new line could be smaller or bigger as it would be in Word.
To prevent that a zero width space is added at the end of the
paragraph if the character properties of the run differ to
the properties of the paragraph.
Additionally attributes are not applied to the current font if the
portion is hidden.

Change-Id: I128d67bb621fb99d9db008cccbb93733f255294e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170629
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-09-09 11:09:52 +02:00
Oliver Specht b59df05712 tdf#137335 follow-up to f806fc136b
Fixes 'always true'  part in else statement

Change-Id: Ie8a8926601a23ee3259469452619ab5dde2e5132
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171266
Tested-by: Jenkins
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2024-09-09 07:12:44 +02:00
Oliver Specht 497d328042 tdf#159027 test added
Test added as follow-up to f60126a6bf
checking table calculation on page break

Change-Id: Icb4e8b8509db18d82647c66a6abdb87648ad4cb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171592
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-09-05 11:29:56 +02:00
Oliver Specht 4f5b896d00 tdf#155229 Calculate row height incl. border if 'atLeast' is set
Word includes the width of horizontal borders when calculating
row height in case the row height is set as "atLeast"

This is now handled via a compat flag for doc/rtf/docx formats.
The default for ODF is unspecified,
which (sanely) continues to treat the row size
of "atLeast" and "fixed" as measuring the same thing.

Change-Id: I37778e5cdc6e083e94a17f50bd0b75a291ededcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169611
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-08-30 15:47:49 +02:00
Oliver Specht f828a9fe44 tdf#162065 Fix format paintbrush in draw/impress
With tdf#160069 the format paintbrush was disabled outside of text
selection and with tdf#160069 target selection was reduced to
text only. The change of tdf#160069 is mostly undone with this
patch.

Change-Id: I8e23ef56206c6749913e2c95870537c3e378f946
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170672
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-08-05 16:44:04 +02:00
Oliver Specht f806fc136b tdf#137335 calculate paragraph height in RTF/DOCX
TabStops and spaces are not included in height calculation of paragraphs in Word.
With a compatibility option this is now also set in RTF import.
But if spaces or/or tabstops are the only parts of a line their font size
is taken into account.
The fix 89e7341025b607491c90efdb74708e63d875c1e5%5E%21 from tdf#142404
has been removed because it broke formatting of follow lines.

Change-Id: Id28488438462114bd54c4f8bd15e2ada606c4192
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168788
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-07-30 22:42:11 +02:00
Oliver Specht 3b8aad9781 tdf#161878 Ignore nested SYMBOL field inside IF field
Adds SYMBOL field to the list of content that cannot be nested into
an IF field. Prevents importing of SYMBOLs before the IF field.

Change-Id: I0c2f92d7893c189a42e835ffd4b9fd6e0e23a17b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169900
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2024-07-30 22:41:17 +02:00
Oliver Specht 0d512cb887 tdf#134902 evaluate visibility of VML shapes
VML shapes from docx should be invisible if "visibility:hidden" is set.

Change-Id: I8299a5c3a7fca8deae2ec37523c3f2e240376893
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167989
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-07-30 00:30:05 +02:00
Oliver Specht 2b45427a56 related tdf#160621: request extra height for field value entry
With this, both edit and add fields dialog should look near-identical
at this spot (seems extra rows are needed for native dialogs like gtk,
while Windows wants the extra height-request).

Change-Id: Iafee3d60d33c9eee6020e9ef49aaac900222a0e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170835
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-07-30 00:29:17 +02:00
Oliver Specht 44d1298707 Use NDEBUG to show/hide m_bDeleted
"#ifndef NDEBUG" is now always used to hide/show member m_bDeleted

Change-Id: I10f5111cd36e13b8101d2a69ed9268bee622344a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171012
Tested-by: Jenkins
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2024-07-29 13:30:23 +02:00
Oliver Specht dce68b5f9f tdf#161264 don't hide paragraph with empty mail merge fields
With tdf#35798 db04be037b
paragraphs containing empty mail merge fields are hidden by default
to remove empty lines in address blocks.
This is now switched off when importing Word documents.

Change-Id: I0f550ff3d29ac499446df9a04676a08d914d12f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169469
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-07-15 21:24:46 +02:00
Oliver Specht 0b7201bc42 tdf#161864 Apply character properties to SYMBOL field
In RTF import character attributes are applied to symbols
imported from \field{ SYMBOL }.

Change-Id: I088c47e799380813dce19fd9823cdba6b8048af1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169864
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2024-07-15 21:12:06 +02:00
Oliver Specht 13cd362480 tdf#148554 RTF import - reset borders on fill cells
In documents containing tables with rows having different right margins
an additional cell is added to fill the gap.
These cells should be 'invisible' and therefore need to have no border.

Change-Id: I802310251f36fb6b2c00f3cb38786f438e4565a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170179
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-07-15 20:14:29 +02:00
Oliver Specht 3e4aa12741 tdf#122756 clone formatting includes table number format
In clone formatting the number format of the current cell(s)
is copied and applied if the target is a table

Change-Id: I0b7dc1d5015aeb2262c8d37f76442519c5b6d655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168184
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2024-07-15 20:10:24 +02:00
Oliver Specht 52b95cfbb0 Add warning and progress to AutoFormat
Applying AutoFormat to large selections may take really long.
A warning has been added to warn users.
Additionally a progress is shown while AutoFormat is working.

Change-Id: I74909a6243748ebfe0089406ebe947bb48eb93d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167950
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2024-06-18 22:06:42 +02:00
Oliver Specht c39e4f6b8a Add SfxItemType to SfxPoolItem
The SfxPoolItem has a new member SfxItemType m_eItemType to
compare types based on enums instead of typeinfo() which
consumes a lot of time e.g. while AutoFormat is running

Change-Id: I033ce67bc9a28ee4790f162380314de85fb4154e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166452
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-06-18 01:07:42 +02:00
Oliver Specht 8ef9573f08 tdf#161521 fix page margins on first page with mirrord layout
Documents starting with an even page on a mirrored layout need
to switch left/right margin on the first page.
Applies also to docx export.
JUnit test included

Change-Id: Ia363941c6a7a25f9208acc7e40b77baa88080780
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168658
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-06-18 00:59:10 +02:00