[Libreoffice-commits] core.git: testtools/CustomTarget_uno_test.mk
testtools/CustomTarget_uno_test.mk |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 2eab74ab78b0b2a7a9c846251e2b79f595bc0878 Author: Stephan Bergmann AuthorDate: Tue Jan 3 16:46:48 2023 +0100 Commit: Stephan Bergmann CommitDate: Wed Jan 4 07:54:07 2023 + Missing test dependencies Change-Id: I048e5bf58c98c7597c229996a29eb7d53451c495 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144990 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/testtools/CustomTarget_uno_test.mk b/testtools/CustomTarget_uno_test.mk index 1a958c9b1209..04d600b17c64 100644 --- a/testtools/CustomTarget_uno_test.mk +++ b/testtools/CustomTarget_uno_test.mk @@ -19,7 +19,13 @@ $(call gb_CustomTarget_get_target,testtools/uno_test) : \ $(call gb_Rdb_get_target,uno_services) \ $(call gb_Rdb_get_target,ure/services) \ $(call gb_UnoApi_get_target,udkapi) \ - $(if $(ENABLE_JAVA),$(call gb_Jar_get_target,testComponent)) + $(if $(ENABLE_JAVA), \ + $(call gb_Jar_get_target,java_uno) \ + $(call gb_Jar_get_target,testComponent) \ + $(call gb_Library_get_target,java_uno) \ + $(call gb_Package_get_target,jvmfwk_javavendors) \ + $(call gb_Package_get_target,jvmfwk_jreproperties) \ + $(call gb_Package_get_target,jvmfwk_jvmfwk3_ini)) ifneq ($(gb_SUPPRESS_TESTS),) @true else
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 2 commits - cui/inc cui/source cui/uiconfig vcl/source
cui/inc/widgettestdlg.hxx| 10 + cui/source/dialogs/widgettestdlg.cxx | 39 +- cui/uiconfig/ui/widgettestdialog.ui | 200 +++ vcl/source/treelist/svtabbx.cxx | 10 + 4 files changed, 226 insertions(+), 33 deletions(-) New commits: commit df530f84f451765c4f2a6aabc9b40e327e35e1e5 Author: Szymon Kłos AuthorDate: Thu Dec 15 13:59:15 2022 +0100 Commit: Szymon Kłos CommitDate: Wed Jan 4 06:27:50 2023 + jsdialog: add TreeView to TestWidgetDialog Change-Id: I5c4f70d98dd8ea03c137cd368a2c097cd866609d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144222 Tested-by: Jenkins CollaboraOffice Reviewed-by: Rashesh Padia Reviewed-by: Szymon Kłos diff --git a/cui/inc/widgettestdlg.hxx b/cui/inc/widgettestdlg.hxx index 15a480d7119d..02ab7f317894 100644 --- a/cui/inc/widgettestdlg.hxx +++ b/cui/inc/widgettestdlg.hxx @@ -9,7 +9,7 @@ #pragma once -#include "tools/link.hxx" +#include #include #include @@ -18,13 +18,15 @@ class WidgetTestDialog final : public weld::GenericDialogController private: std::unique_ptr m_xOKButton; std::unique_ptr m_xCancelButton; +std::unique_ptr m_xTreeView; +std::unique_ptr m_xTreeView2; DECL_LINK(OkHdl, weld::Button&, void); DECL_LINK(CancelHdl, weld::Button&, void); +void FillTreeView(); + public: -WidgetTestDialog(weld::Window *pParent); +WidgetTestDialog(weld::Window* pParent); ~WidgetTestDialog(); }; - - diff --git a/cui/source/dialogs/widgettestdlg.cxx b/cui/source/dialogs/widgettestdlg.cxx index 891d3f542438..0fa6abe49390 100644 --- a/cui/source/dialogs/widgettestdlg.cxx +++ b/cui/source/dialogs/widgettestdlg.cxx @@ -8,29 +8,50 @@ */ #include +#include -WidgetTestDialog::WidgetTestDialog(weld::Window *pParent) - : GenericDialogController(pParent, "cui/ui/widgettestdialog.ui", "WidgetTestDialog") +WidgetTestDialog::WidgetTestDialog(weld::Window* pParent) +: GenericDialogController(pParent, "cui/ui/widgettestdialog.ui", "WidgetTestDialog") { m_xOKButton = m_xBuilder->weld_button("ok_btn"); m_xCancelButton = m_xBuilder->weld_button("cancel_btn"); +m_xTreeView = m_xBuilder->weld_tree_view("contenttree"); +m_xTreeView2 = m_xBuilder->weld_tree_view("contenttree2"); m_xOKButton->connect_clicked(LINK(this, WidgetTestDialog, OkHdl)); m_xCancelButton->connect_clicked(LINK(this, WidgetTestDialog, CancelHdl)); -} -WidgetTestDialog::~WidgetTestDialog() -{ +FillTreeView(); } -IMPL_LINK_NOARG(WidgetTestDialog, OkHdl, weld::Button&, void) -{ -m_xDialog->response(RET_OK); -} +WidgetTestDialog::~WidgetTestDialog() {} + +IMPL_LINK_NOARG(WidgetTestDialog, OkHdl, weld::Button&, void) { m_xDialog->response(RET_OK); } IMPL_LINK_NOARG(WidgetTestDialog, CancelHdl, weld::Button&, void) { m_xDialog->response(RET_CANCEL); } +void WidgetTestDialog::FillTreeView() +{ +OUString aImage1(RID_SVXBMP_CELL_LR); +OUString aImage2(RID_SVXBMP_SHADOW_BOT_LEFT); + +for (size_t nCount = 0; nCount < 4; nCount++) +{ +OUString sText = OUString("Test ") + OUString::Concat(OUString::number(nCount)); +std::unique_ptr xEntry = m_xTreeView->make_iterator(); +m_xTreeView->insert(nullptr, -1, &sText, &sText, nullptr, nullptr, false, xEntry.get()); +m_xTreeView->set_image(*xEntry, (nCount % 2 == 0) ? aImage1 : aImage2); + +m_xTreeView2->append(); +m_xTreeView2->set_image(nCount, (nCount % 2 == 0) ? aImage1 : aImage2); +m_xTreeView2->set_text(nCount, "First Column", 0); +m_xTreeView2->set_text(nCount, + OUString("Row ") + OUString::Concat(OUString::number(nCount)), 1); +m_xTreeView2->set_id(nCount, OUString::number(nCount)); +} +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/uiconfig/ui/widgettestdialog.ui b/cui/uiconfig/ui/widgettestdialog.ui index 787deda37171..4f4b3cfc23b9 100644 --- a/cui/uiconfig/ui/widgettestdialog.ui +++ b/cui/uiconfig/ui/widgettestdialog.ui @@ -8,11 +8,8 @@ dialog -True -False -vertical -5 - + vertical + False end @@ -46,9 +43,16 @@ False False -0 +1 + + + +True +False +5 +5 @@ -286,18 +290,8 @@ False True -0 - - - - -True -False - - -False -True -1 +0 +0 @@ -455,11 +449,151 @@ False True -2 +0 +1 + + + + +Tr
[Libreoffice-commits] dictionaries.git: sl_SI/description.xml sl_SI/package-description.txt sl_SI/README_th_sl_SI.txt sl_SI/th_sl_SI_v2.dat
sl_SI/README_th_sl_SI.txt |4 sl_SI/description.xml |2 sl_SI/package-description.txt |2 sl_SI/th_sl_SI_v2.dat | 1419 -- 4 files changed, 1240 insertions(+), 187 deletions(-) New commits: commit f191df059976deba5f60983bb4a87ab184835fd4 Author: Martin Srebotnjak AuthorDate: Wed Jan 4 06:28:46 2023 +0100 Commit: Andras Timar CommitDate: Wed Jan 4 05:30:14 2023 + Updated Slovenian thesaurus Change-Id: Id3b452928405a90e9a9fb9b3759030c7d3122a72 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/145032 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/sl_SI/README_th_sl_SI.txt b/sl_SI/README_th_sl_SI.txt index dc18c59..597c81d 100644 --- a/sl_SI/README_th_sl_SI.txt +++ b/sl_SI/README_th_sl_SI.txt @@ -2,7 +2,7 @@ The Slovenian thesaurus is developed as a part of project/ Slovenski tezaver nastaja v okviru projekta: OdprtiTezaver (www.tezaver.si) This dictionary pack includes version/Paket vsebuje različico: - 2.1.21000 + 2.1.21500 Thesaurus managed and edited by/Tezaver pripravlja in ureja: Martin Srebotnjak (miles at filmsi net) Thesaurus data licensed under both/Podatki tezavra so izdani pod licencama: @@ -18,7 +18,7 @@ Bug report/O napakah poročajte: http://external.openoffice.org/ form data: Product Name: Slovenian thesaurus -Product Version: 2.1.21000 +Product Version: 2.1.21500 Vendor or Owner Name: Martin Srebotnjak Vendor or Owner Contact: mi...@filmsi.net OpenOffice.org Contact: fil...@openoffice.org diff --git a/sl_SI/description.xml b/sl_SI/description.xml index 430ea15..f3f1c0c 100644 --- a/sl_SI/description.xml +++ b/sl_SI/description.xml @@ -1,6 +1,6 @@ http://openoffice.org/extensions/description/2006"; xmlns:d="http://openoffice.org/extensions/description/2006"; xmlns:xlink="http://www.w3.org/1999/xlink";> - + Slovenian spelling dictionary, hyphenation rules, and thesaurus diff --git a/sl_SI/package-description.txt b/sl_SI/package-description.txt index 1de2ad7..5b0c4ec 100644 --- a/sl_SI/package-description.txt +++ b/sl_SI/package-description.txt @@ -1,3 +1,3 @@ -Slovar za črkovanje 1.0 · Vzorci za deljenje besed 1.2.1 · Tezaver 2.1.21000 +Slovar za črkovanje 1.0 · Vzorci za deljenje besed 1.2.1 · Tezaver 2.1.21500 Razširitev vzdržuje ekipa slovenjenja LibreOffice, tezaver pa ekipa tezaver.si \ No newline at end of file diff --git a/sl_SI/th_sl_SI_v2.dat b/sl_SI/th_sl_SI_v2.dat index 86a639d..a44e06b 100644 --- a/sl_SI/th_sl_SI_v2.dat +++ b/sl_SI/th_sl_SI_v2.dat @@ -25,6 +25,8 @@ ISO8859-2 (sam.)|�aljivka|�toser (�argon)|�toserka (�argon)|lahkomiselne�|lahkomiselnica|neresne�|neresnica|obe�enjak|obe�enjakinja �aljivka|1 (sam.)|�aljivec|�toser (�argon)|�toserka (�argon)|lahkomiselne�|lahkomiselnica|neresne�|neresnica|obe�enjak|obe�enjakinja +�alter|1 +(sam.)|�alter (neknji�no)|lina (zastarelo)|linica (zastarelo)|okence|oken�ek (ekspresivno)|okno �aman|1 (sam.)|vra� �amoa|1 @@ -98,6 +100,8 @@ ISO8859-2 (sam.)|�ef|�efica (�argon)|�efija (sleng)|bos (�argon)|vodja �ega|1 (sam.)|�ega (starinsko)|navada|obi�aj +�egavost|1 +(sam.)|domislek|domislica|duhovitost|ideja|impromptu|namislek (starinsko)|umislek|zamisel ��ipalka|1 (sam.)|kljukica (pogovorno) ��ipalnik|1 @@ -164,6 +168,8 @@ ISO8859-2 (gl.)|�untati (nizko)|harangirati|hujskati �i�ka|1 (sam.)|cecidij +�ibati|1 +(gl.)|�ibati (ekspresivno)|�imfati (neknji�no)|cefrati (ekspresivno)|grajati|kritizirati|mesariti (ekspresivno)|napadati (ekspresivno)|obdelovati (ekspresivno)|zdelovati (ekspresivno) �ibek|1 (prid.)|plah|rahiti�en|slaboten|krepek (protipomenka) �ibrenica|1 @@ -176,6 +182,8 @@ ISO8859-2 (gl.)|�pi�iti (pogovorno)|ostriti �iljenje|1 (sam.)|�pi�enje (pogovorno)|ostrenje +�imfati|1 +(gl.)|�ibati (ekspresivno)|�imfati (neknji�no)|cefrati (ekspresivno)|grajati|kritizirati|mesariti (ekspresivno)|napadati (ekspresivno)|obdelovati (ekspresivno)|zdelovati (ekspresivno) �initi|1 (gl.)|�vigniti|blisniti (ekspresivno) �ipkova u�ica|1 @@ -326,6 +334,8 @@ ISO8859-2 (gl.)|�nofati (neknji�no)|duhati|vohati (gl.)|�nofati (neknji�no)|njuhati (gl.)|�nofati (neknji�no)|poizvedovati|povpra�evati|spra�evati +�nops|1 +(sam.)|�nops (neknji�no)|�ganje|rakija �ofer|1 (sam.)|voznik �ofirati|1 @@ -559,6 +569,8 @@ ISO8859-2 (gl.)|�initi|blisniti (ekspresivno) �aba|1 (sam.)|�abura (slab�alno)|rega (ekspresivno)|reglja� (ekspresivno) +�abe|1 +(sam.)|�abe (pogovorno)|hla�ne nogavice|hulahupke (pogovorno)|hulahupnogavice �abica|1 (sam.)|obe�anka �abogolt|1 @@ -569,6 +581,8 @@ ISO8859-2 (sam.)|krokus �ajfa|1 (sam.)|�ajfa (neknji�no)|milo +�akelj�ek|1 +(sam.)|�akelj�ek (pogovorno)|vre�ica|vre�ka �ale|1 (sam.)|britof (nizko)|pokopali��e �ale�e|1 @@ -660,6 +674,8 @@ ISO8859-2 (sam.)|�agra (nare�no)|�egen (nare�no)|�egnanje|cerkvanje (nare�no)|opasilo (nare�no)|patrocinij|pro��enje|shod (nare�no) �egnanje|1 (sam.)|�agra (nar
[Libreoffice-commits] core.git: dictionaries
dictionaries |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c8c5fce90170905280cec9c81f3ffd8ad905e6a0 Author: Martin Srebotnjak AuthorDate: Wed Jan 4 06:30:14 2023 +0100 Commit: Gerrit Code Review CommitDate: Wed Jan 4 05:30:14 2023 + Update git submodules * Update dictionaries from branch 'master' to f191df059976deba5f60983bb4a87ab184835fd4 - Updated Slovenian thesaurus Change-Id: Id3b452928405a90e9a9fb9b3759030c7d3122a72 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/145032 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/dictionaries b/dictionaries index 2b234ba64f43..f191df059976 16 --- a/dictionaries +++ b/dictionaries @@ -1 +1 @@ -Subproject commit 2b234ba64f43d16b9393fb0cfdc794814065e838 +Subproject commit f191df059976deba5f60983bb4a87ab184835fd4
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - dictionaries
dictionaries |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6d24ca0f210055aba19eab0bbb993ff307f2a056 Author: Martin Srebotnjak AuthorDate: Wed Jan 4 06:30:29 2023 +0100 Commit: Gerrit Code Review CommitDate: Wed Jan 4 05:30:29 2023 + Update git submodules * Update dictionaries from branch 'libreoffice-7-5' to 84f3e87ca52ea6ed164840db229fb45a3b6b6937 - Updated Slovenian thesaurus Change-Id: Id3b452928405a90e9a9fb9b3759030c7d3122a72 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/144999 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/dictionaries b/dictionaries index 908f704b..84f3e87ca52e 16 --- a/dictionaries +++ b/dictionaries @@ -1 +1 @@ -Subproject commit 908f704b798338332ddd79dd8c2d53dd6fd1 +Subproject commit 84f3e87ca52ea6ed164840db229fb45a3b6b6937
[Libreoffice-commits] dictionaries.git: Branch 'libreoffice-7-5' - sl_SI/description.xml sl_SI/package-description.txt sl_SI/README_th_sl_SI.txt sl_SI/th_sl_SI_v2.dat
sl_SI/README_th_sl_SI.txt |4 sl_SI/description.xml |2 sl_SI/package-description.txt |2 sl_SI/th_sl_SI_v2.dat | 1419 -- 4 files changed, 1240 insertions(+), 187 deletions(-) New commits: commit 84f3e87ca52ea6ed164840db229fb45a3b6b6937 Author: Martin Srebotnjak AuthorDate: Wed Jan 4 06:28:46 2023 +0100 Commit: Andras Timar CommitDate: Wed Jan 4 05:30:29 2023 + Updated Slovenian thesaurus Change-Id: Id3b452928405a90e9a9fb9b3759030c7d3122a72 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/144999 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/sl_SI/README_th_sl_SI.txt b/sl_SI/README_th_sl_SI.txt index dc18c59..597c81d 100644 --- a/sl_SI/README_th_sl_SI.txt +++ b/sl_SI/README_th_sl_SI.txt @@ -2,7 +2,7 @@ The Slovenian thesaurus is developed as a part of project/ Slovenski tezaver nastaja v okviru projekta: OdprtiTezaver (www.tezaver.si) This dictionary pack includes version/Paket vsebuje različico: - 2.1.21000 + 2.1.21500 Thesaurus managed and edited by/Tezaver pripravlja in ureja: Martin Srebotnjak (miles at filmsi net) Thesaurus data licensed under both/Podatki tezavra so izdani pod licencama: @@ -18,7 +18,7 @@ Bug report/O napakah poročajte: http://external.openoffice.org/ form data: Product Name: Slovenian thesaurus -Product Version: 2.1.21000 +Product Version: 2.1.21500 Vendor or Owner Name: Martin Srebotnjak Vendor or Owner Contact: mi...@filmsi.net OpenOffice.org Contact: fil...@openoffice.org diff --git a/sl_SI/description.xml b/sl_SI/description.xml index 430ea15..f3f1c0c 100644 --- a/sl_SI/description.xml +++ b/sl_SI/description.xml @@ -1,6 +1,6 @@ http://openoffice.org/extensions/description/2006"; xmlns:d="http://openoffice.org/extensions/description/2006"; xmlns:xlink="http://www.w3.org/1999/xlink";> - + Slovenian spelling dictionary, hyphenation rules, and thesaurus diff --git a/sl_SI/package-description.txt b/sl_SI/package-description.txt index 1de2ad7..5b0c4ec 100644 --- a/sl_SI/package-description.txt +++ b/sl_SI/package-description.txt @@ -1,3 +1,3 @@ -Slovar za črkovanje 1.0 · Vzorci za deljenje besed 1.2.1 · Tezaver 2.1.21000 +Slovar za črkovanje 1.0 · Vzorci za deljenje besed 1.2.1 · Tezaver 2.1.21500 Razširitev vzdržuje ekipa slovenjenja LibreOffice, tezaver pa ekipa tezaver.si \ No newline at end of file diff --git a/sl_SI/th_sl_SI_v2.dat b/sl_SI/th_sl_SI_v2.dat index 86a639d..a44e06b 100644 --- a/sl_SI/th_sl_SI_v2.dat +++ b/sl_SI/th_sl_SI_v2.dat @@ -25,6 +25,8 @@ ISO8859-2 (sam.)|�aljivka|�toser (�argon)|�toserka (�argon)|lahkomiselne�|lahkomiselnica|neresne�|neresnica|obe�enjak|obe�enjakinja �aljivka|1 (sam.)|�aljivec|�toser (�argon)|�toserka (�argon)|lahkomiselne�|lahkomiselnica|neresne�|neresnica|obe�enjak|obe�enjakinja +�alter|1 +(sam.)|�alter (neknji�no)|lina (zastarelo)|linica (zastarelo)|okence|oken�ek (ekspresivno)|okno �aman|1 (sam.)|vra� �amoa|1 @@ -98,6 +100,8 @@ ISO8859-2 (sam.)|�ef|�efica (�argon)|�efija (sleng)|bos (�argon)|vodja �ega|1 (sam.)|�ega (starinsko)|navada|obi�aj +�egavost|1 +(sam.)|domislek|domislica|duhovitost|ideja|impromptu|namislek (starinsko)|umislek|zamisel ��ipalka|1 (sam.)|kljukica (pogovorno) ��ipalnik|1 @@ -164,6 +168,8 @@ ISO8859-2 (gl.)|�untati (nizko)|harangirati|hujskati �i�ka|1 (sam.)|cecidij +�ibati|1 +(gl.)|�ibati (ekspresivno)|�imfati (neknji�no)|cefrati (ekspresivno)|grajati|kritizirati|mesariti (ekspresivno)|napadati (ekspresivno)|obdelovati (ekspresivno)|zdelovati (ekspresivno) �ibek|1 (prid.)|plah|rahiti�en|slaboten|krepek (protipomenka) �ibrenica|1 @@ -176,6 +182,8 @@ ISO8859-2 (gl.)|�pi�iti (pogovorno)|ostriti �iljenje|1 (sam.)|�pi�enje (pogovorno)|ostrenje +�imfati|1 +(gl.)|�ibati (ekspresivno)|�imfati (neknji�no)|cefrati (ekspresivno)|grajati|kritizirati|mesariti (ekspresivno)|napadati (ekspresivno)|obdelovati (ekspresivno)|zdelovati (ekspresivno) �initi|1 (gl.)|�vigniti|blisniti (ekspresivno) �ipkova u�ica|1 @@ -326,6 +334,8 @@ ISO8859-2 (gl.)|�nofati (neknji�no)|duhati|vohati (gl.)|�nofati (neknji�no)|njuhati (gl.)|�nofati (neknji�no)|poizvedovati|povpra�evati|spra�evati +�nops|1 +(sam.)|�nops (neknji�no)|�ganje|rakija �ofer|1 (sam.)|voznik �ofirati|1 @@ -559,6 +569,8 @@ ISO8859-2 (gl.)|�initi|blisniti (ekspresivno) �aba|1 (sam.)|�abura (slab�alno)|rega (ekspresivno)|reglja� (ekspresivno) +�abe|1 +(sam.)|�abe (pogovorno)|hla�ne nogavice|hulahupke (pogovorno)|hulahupnogavice �abica|1 (sam.)|obe�anka �abogolt|1 @@ -569,6 +581,8 @@ ISO8859-2 (sam.)|krokus �ajfa|1 (sam.)|�ajfa (neknji�no)|milo +�akelj�ek|1 +(sam.)|�akelj�ek (pogovorno)|vre�ica|vre�ka �ale|1 (sam.)|britof (nizko)|pokopali��e �ale�e|1 @@ -660,6 +674,8 @@ ISO8859-2 (sam.)|�agra (nare�no)|�egen (nare�no)|�egnanje|cerkvanje (nare�no)|opasilo (nare�no)|patrocinij|pro��enje|shod (nare�no) �egnanje|1 (sam.)|�agra (nar
[Libreoffice-commits] core.git: svx/source
svx/source/sidebar/nbdtmg.cxx | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) New commits: commit ec2f1d73936c9d8cee83c0887170e9ecb8f044ba Author: Justin Luth AuthorDate: Tue Jan 3 10:56:40 2023 -0500 Commit: Justin Luth CommitDate: Wed Jan 4 02:12:58 2023 + tdf#56258 svx: use last defined locale-outline for remaining levels When applying an outline numbering choice (one of the 8 predefined per-locale definitions) the toolbar/sidebar would only affect the spacing of 0 - 5 of the defined locale-levels, and only changed the num type of the remainder. Well, that can easily look bad if the indenting and spacing is only partially modified. [The Bullets and Numbering dialog outline grid does not affect spacing at all. That can be better or much worse, depending on the situation.] This "Outline Format" button is normally turned off on Writer's Formatting toolbar. You need to go to Tools - Customize - Toolbars to turn it on. It only seems to work for Writer - it was grayed out/disabled in Draw even when I had it show up in the toolbar. So almost nobody has ever seen or used this I expect. However, I think it is important to get this working, because I want to use this grid-choice code path to be usable for the B&N dialog as well, although that could upset people who already have their spacing right and just want to change the digits. In any case, this nbdtimg DOES already change some spacing, so it should be either all or none. Change-Id: Ib54b6ffe3497f09f0c57ff2db1ec2a946f692fc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145022 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 241b91673836..a4def326c80b 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -590,11 +590,14 @@ void OutlineTypeMgr::Init() pItemArr->sDescription = SvxResId( TranslateId(RID_SVXSTR_OUTLINENUM_DESCRIPTION_0.mpContext, id.getStr()) ); pItemArr->pNumSettingsArr = new NumSettingsArr_Impl; Reference xLevel = aOutlineAccess.getConstArray()[nItem]; -for(sal_Int32 nLevel = 0; nLevel < xLevel->getCount() && nLevel < 5; nLevel++) +for(sal_Int32 nLevel = 0; nLevel < SVX_MAX_NUM; nLevel++) { -Any aValueAny = xLevel->getByIndex(nLevel); +// use the last locale-defined level for all remaining levels. +sal_Int32 nLocaleLevel = std::min(nLevel, xLevel->getCount() - 1); Sequence aLevelProps; -aValueAny >>= aLevelProps; +if (nLocaleLevel >= 0) +xLevel->getByIndex(nLocaleLevel) >>= aLevelProps; + NumSettings_Impl* pNew = lcl_CreateNumberingSettingsPtr(aLevelProps); const SvxNumberFormat& aNumFmt( aDefNumRule.GetLevel( nLevel) ); pNew->eLabelFollowedBy = aNumFmt.GetLabelFollowedBy(); @@ -618,7 +621,7 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m { bool bNotMatch = false; OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[iDex]; -sal_uInt16 nCount = pItemArr->pNumSettingsArr->size(); +sal_uInt16 nCount = pItemArr ? pItemArr->pNumSettingsArr->size() : 0; for (sal_uInt16 iLevel=0;iLevel < nCount;iLevel++) { NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get(); @@ -633,7 +636,9 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m sal_UCS4 cChar = aFmt.GetBulletChar(); sal_UCS4 ccChar -= _pSet->sBulletChar.iterateCodePoints(&o3tl::temporary(sal_Int32(0))); += _pSet->sBulletChar.isEmpty() + ? 0 + : _pSet->sBulletChar.iterateCodePoints(&o3tl::temporary(sal_Int32(0))); if ( !((cChar == ccChar) && _pSet->eLabelFollowedBy == aFmt.GetLabelFollowedBy() &&
[Libreoffice-commits] core.git: editeng/source include/vcl vcl/inc vcl/source
editeng/source/items/svxfont.cxx |2 +- include/vcl/outdev.hxx|2 +- include/vcl/pdfwriter.hxx |2 +- vcl/inc/pdf/pdfwriter_impl.hxx|2 +- vcl/source/gdi/pdfwriter.cxx |2 +- vcl/source/gdi/pdfwriter_impl.cxx |2 +- vcl/source/outdev/text.cxx|2 +- 7 files changed, 7 insertions(+), 7 deletions(-) New commits: commit d3a5a97f77378421f17b1fa43d0b88dde8bc686a Author: Andrea Rosetti AuthorDate: Wed Nov 30 15:32:25 2022 +0100 Commit: Hossein CommitDate: Tue Jan 3 22:42:13 2023 + tdf#114441 Convert sal_uLong to a better type Used sal_Int32 instead of sal_uLong Change-Id: I229c4e59054b3aa1885698d1cd5332ebd9d162d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143513 Tested-by: Jenkins Reviewed-by: Hossein diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index b484a645a7f6..b57449f3c359 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -789,7 +789,7 @@ void SvxDoDrawCapital::DoSpace( const bool bDraw ) if ( !(bDraw || pFont->IsWordLineMode()) ) return; -sal_uLong nDiff = static_cast(aPos.X() - aSpacePos.X()); +sal_Int32 nDiff = static_cast(aPos.X() - aSpacePos.X()); if ( nDiff ) { bool bWordWise = pFont->IsWordLineMode(); diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index b2053f412b49..d550ecfce293 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1050,7 +1050,7 @@ public: voidGetCaretPositions( const OUString&, sal_Int32* pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, const SalLayoutGlyphs* pGlyphs = nullptr ) const; -voidDrawStretchText( const Point& rStartPt, sal_uLong nWidth, +voidDrawStretchText( const Point& rStartPt, sal_Int32 nWidth, const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1); sal_Int32 GetTextBreak( const OUString& rStr, tools::Long nTextWidth, diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index 8aeade99f504..f98f2c231261 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -769,7 +769,7 @@ The following structure describes the permissions used in PDF security o3tl::span pKashidaAry, sal_Int32 nIndex, sal_Int32 nLen ); -voidDrawStretchText( const Point& rStartPt, sal_uLong nWidth, +voidDrawStretchText( const Point& rStartPt, sal_Int32 nWidth, const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen ); voidDrawText( const tools::Rectangle& rRect, diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx index e8ce5163177f..ea7c3d3462ab 100644 --- a/vcl/inc/pdf/pdfwriter_impl.hxx +++ b/vcl/inc/pdf/pdfwriter_impl.hxx @@ -1231,7 +1231,7 @@ public: /* actual drawing functions */ void drawText( const Point& rPos, const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines = true ); void drawTextArray( const Point& rPos, const OUString& rText, KernArraySpan pDXArray, o3tl::span pKashidaArray, sal_Int32 nIndex, sal_Int32 nLen ); -void drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& rText, +void drawStretchText( const Point& rPos, sal_Int32 nWidth, const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen ); void drawText( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle ); void drawTextLine( const Point& rPos, tools::Long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove ); diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx index 8b206debfbc1..294d071db154 100644 --- a/vcl/source/gdi/pdfwriter.cxx +++ b/vcl/source/gdi/pdfwriter.cxx @@ -91,7 +91,7 @@ void PDFWriter::DrawTextArray( void PDFWriter::DrawStretchText( const Point& rStartPt, -sal_uLong nWidth, +sal_Int32 nWidth, const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen ) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index d95a74aeb6af..99c1b1e27e84 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6990,7 +6990,7 @@ void PDFWriterImpl::drawTextArray( const Point& rPo
[Libreoffice-commits] core.git: bin/find-autocorr-samevalue-beforeafter.py
bin/find-autocorr-samevalue-beforeafter.py | 45 + 1 file changed, 45 insertions(+) New commits: commit c95f7c6bf705ea84e1f8da40042b382189e7179a Author: Julien Nabet AuthorDate: Sun Jan 1 18:08:49 2023 +0100 Commit: Caolán McNamara CommitDate: Tue Jan 3 20:33:52 2023 + Add script to check DocumentList.xml in autocorrect Change-Id: I4c2d356c900ce7bde43d8e06af2fdda4f66c15ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144925 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/bin/find-autocorr-samevalue-beforeafter.py b/bin/find-autocorr-samevalue-beforeafter.py new file mode 100755 index ..7116100bdb87 --- /dev/null +++ b/bin/find-autocorr-samevalue-beforeafter.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 + +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +# Use this script to find the lines in extras/source/autocorr/lang//DocumentList.xml +# which contain the same value for abbreviated-name and name +# Usage sample: ./find-autocorr-samevalue-beforeafter.py + +import os +import xml.etree.ElementTree as ET + +root_dir = '../extras/source/autocorr/lang' + +bAllFilesOk = True + +for root, dirs, files in os.walk(root_dir): + for file in files: + +# just deal with DocumentList.xml, ignore the other files +if (file != "DocumentList.xml"): + continue +complete_file = os.path.join(str(root), file) +# parse the XML file +tree = ET.parse(complete_file) +root = tree.getroot() + +# find all elements X +elements_x = root.findall('.//block-list:block', namespaces={'block-list': "http://openoffice.org/2001/block-list"}) +for element in elements_x: + # get the value of the attribute "abbreviated-name" + value_a = element.get('{http://openoffice.org/2001/block-list}abbreviated-name') + # get the value of the attribute "name" + value_b = element.get('{http://openoffice.org/2001/block-list}name') + # check if the values are equal + if value_a == value_b: +print('In ' + complete_file + ' same value: ' + value_a) +bAllFilesOk = False + +if bAllFilesOk == True: + exit(0) +exit(1)
Re: Trouble with theme color in docx
Hi Tomaž, Tomaž Vajngerl schrieb am 03.01.2023 um 12:02: Yes, you can add the missing long keys here and map them to the dark/light variant. It turned out, that that was not the only place to change. Adding the missing long key gives the correct color, but the FillColorTheme property still has value -1. So I have added the values too to Color::getSchemeColorIndex(). I have added all of the key variants I have seen in the ISO standard. But I could not produce docx documents, which uses them. If you think, that only those key variants should be added, for which test documents exists, I can remove the others. Or perhaps you know how to generate (other than manually) documents that use them? To make it easier to discuss the problem I have put my suggestion into a patch, see https://gerrit.libreoffice.org/c/core/+/145021 The only kind of mapping with the long variants that I have found at all is TDefTableHandler::getThemeColorTypeIndex and those assignments look wrong to me (e.g. using 0 for background1 and for dark1). This is indeed wrong.. background should map to light and text to dark. I will fix this but it will take a while until it hits master, unless you need to change this too? That area is not touched by Fontwork. VML import/export is likely effected too, because it uses too > Yes, probably this needs to be changed also, but it's only for backwards compatibility. Unfortunately MS Word uses VML not only as fall back, but for example if Word opens an odf-file with a Fontwork with bitmap fill, Word converts it so to docx that VML is the main choice. Reason in this case is, that DrawingML is not able to express an 'abc Transform' with bitmap fill, VML can express it as WordArt. Another question: There exists no LineColorTheme. Will it come? Kind regards Regina
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 601a2d3b09fdf4332b257f2c0ebd01e19e47887f Author: Stéphane Guillou AuthorDate: Tue Jan 3 18:48:27 2023 + Commit: Gerrit Code Review CommitDate: Tue Jan 3 18:48:27 2023 + Update git submodules * Update helpcontent2 from branch 'master' to 068fa934185da6e9e6f93a7abddd02b6f22572d7 - fix section title to match Safe Mode dialog Change-Id: Ic2d7def17bf007780dcf336e4ecbd2847d819116 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144911 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index cedd7a3550c0..068fa934185d 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit cedd7a3550c09bef1e1b5d496431c7326e1bd1ec +Subproject commit 068fa934185da6e9e6f93a7abddd02b6f22572d7
[Libreoffice-commits] help.git: source/text
source/text/shared/01/profile_safe_mode.xhp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 068fa934185da6e9e6f93a7abddd02b6f22572d7 Author: Stéphane Guillou AuthorDate: Mon Jan 2 15:29:03 2023 + Commit: Olivier Hallot CommitDate: Tue Jan 3 18:48:27 2023 + fix section title to match Safe Mode dialog Change-Id: Ic2d7def17bf007780dcf336e4ecbd2847d819116 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144911 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/shared/01/profile_safe_mode.xhp b/source/text/shared/01/profile_safe_mode.xhp index 6abb949a5a..35d2b6713b 100644 --- a/source/text/shared/01/profile_safe_mode.xhp +++ b/source/text/shared/01/profile_safe_mode.xhp @@ -59,7 +59,7 @@ You can disable all extensions installed by the user. You can also disable hardware acceleration. Activate this option if you experience startup crashes or visual glitches, they are often related to hardware acceleration. -Uninstall extensions +Extensions Sometimes %PRODUCTNAME cannot be started due to extensions blocking or crashing. This option allows you to disable all extensions installed by the user as well as shared and bundled extensions. Uninstalling shared and bundled extensions should be used with caution. It will only work if you have the necessary system access rights.
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 675250baf91b5733a3a409edbb9bf17d26e0d1c0 Author: Stanislav Horacek AuthorDate: Tue Jan 3 19:44:38 2023 +0100 Commit: Gerrit Code Review CommitDate: Tue Jan 3 18:44:38 2023 + Update git submodules * Update helpcontent2 from branch 'master' to cedd7a3550c09bef1e1b5d496431c7326e1bd1ec - mark Basic code as not localizable Change-Id: Ic9ddc042c33c98fc5e73c2beb7ad65801adf9d38 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144966 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index 191a9d96b897..cedd7a3550c0 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 191a9d96b89735575cf352f7e8356c6bb6716ad6 +Subproject commit cedd7a3550c09bef1e1b5d496431c7326e1bd1ec
[Libreoffice-commits] help.git: source/text
source/text/sbasic/shared/03/sf_datasheet.xhp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit cedd7a3550c09bef1e1b5d496431c7326e1bd1ec Author: Stanislav Horacek AuthorDate: Mon Jan 2 20:42:03 2023 +0100 Commit: Olivier Hallot CommitDate: Tue Jan 3 18:44:38 2023 + mark Basic code as not localizable Change-Id: Ic9ddc042c33c98fc5e73c2beb7ad65801adf9d38 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144966 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/sbasic/shared/03/sf_datasheet.xhp b/source/text/sbasic/shared/03/sf_datasheet.xhp index ff0df518cb..77761d9395 100644 --- a/source/text/sbasic/shared/03/sf_datasheet.xhp +++ b/source/text/sbasic/shared/03/sf_datasheet.xhp @@ -43,7 +43,7 @@ The Datasheet service can be invoked in two different ways depending on whether the database file is open. The example below considers that the database file is open, hence the UI service can be used to retrieve the document and the OpenTable method from the Database service is used to get a Datasheet service instance. -Dim ui As Object, oBase As Object, oSheet As Object +Dim ui As Object, oBase As Object, oSheet As Object Set ui = CreateScriptService("UI") ' Object oBase is an instance of the Base service Set oBase = ui.GetDocument("C:\Documents\myDB.odb")
[Libreoffice-commits] core.git: i18npool/source
i18npool/source/localedata/data/dv_MV.xml | 59 i18npool/source/localedata/data/is_IS.xml | 59 i18npool/source/localedata/data/kmr_Latn_TR.xml | 59 i18npool/source/localedata/data/lt_LT.xml | 59 i18npool/source/localedata/data/mk_MK.xml | 59 i18npool/source/localedata/data/shs_CA.xml | 59 i18npool/source/localedata/data/sl_SI.xml | 59 i18npool/source/localedata/data/vi_VN.xml | 59 8 files changed, 8 insertions(+), 464 deletions(-) New commits: commit 87a4185fff1f9294fcdc6117761b1298632c95e5 Author: Justin Luth AuthorDate: Sat Dec 31 21:50:05 2022 -0500 Commit: Justin Luth CommitDate: Tue Jan 3 18:31:35 2023 + NFC tdf#56258 i18npool OutLineNumberingLevel: use ref="en_US" In preparing to see what improvements can be made to list defaults, it is helpful to see what customizations have been made to the US defaults. Those that match identically were changed to simple refs. Thanks to https://www.linuxtopia.org/online_books/ linux_tool_guides/the_sed_faq/sedfaq4_013.html The script there helped to generate sed expressions. sed -f ref.sed *.xml - ref.sed - \##,\## { :ack N; \##! b ack s#\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ##; } --- Change-Id: I6853c09ed10a9d71b39e79fb665f7d056e945864 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144945 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/i18npool/source/localedata/data/dv_MV.xml b/i18npool/source/localedata/data/dv_MV.xml index 4e2a2ec7e653..f15b7ac0d1e9 100644 --- a/i18npool/source/localedata/data/dv_MV.xml +++ b/i18npool/source/localedata/data/dv_MV.xml @@ -529,62 +529,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/i18npool/source/localedata/data/is_IS.xml b/i18npool/source/localedata/data/is_IS.xml index 4651fab38bab..26a534877105 100644 --- a/i18npool/source/localedata/data/is_IS.xml +++ b/i18npool/source/localedata/data/is_IS.xml @@ -359,62 +359,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/i18npool/source/localedata/data/kmr_Latn_TR.xml b/i18npool/source/localedata/data/kmr_Latn_TR.xml index 356aa36090e4..f60e4732f653 100644 --- a/i18npool/source/localedata/data/kmr_Latn_TR.xml +++ b/i18npool/source/localedata/data/kmr_Latn_TR.xml @@ -385,62 +385,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/i18npool/source/localedata/data/lt_LT.xml b/i18npool/source/localedata/data/lt_LT.xml index 36196e32d3b8..2c5b94bc4a7e 100644 --- a/i18npool/source/localedata/data/lt_LT.xml +++ b/i18npool/source/localedata/data/lt_LT.xml @@ -489,62 +489,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[Libreoffice-commits] core.git: i18npool/source
i18npool/source/localedata/localedata.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit b1226e1f225de4fa67a0d4f5a6aa4017284c7deb Author: Justin Luth AuthorDate: Mon Jan 2 10:48:33 2023 -0500 Commit: Justin Luth CommitDate: Tue Jan 3 18:29:41 2023 + tdf#56258 i18npool: should be a SvxAdjust, not a HoriOrient Although this is unused AFAICS, lets at least use the correct enum, because these two do not match up. HoriOrient::LEFT = 3, while SvxAdjust::Left = 0 (3 is Center) Change-Id: I1cd8cce6d4e223ac272d8d4ba5e22c52c7657499 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144977 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 4291df4809e9..933c9224a1eb 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -23,10 +23,10 @@ #include #include #include -#include #include #include #include +#include #include #include #include @@ -1487,7 +1487,6 @@ LocaleDataImpl::getAllInstalledLocaleNames() using namespace ::com::sun::star::container; using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::text; OutlineNumbering::OutlineNumbering(std::unique_ptr pOutlnLevels, int nLevels) : m_pOutlineLevels(std::move(pOutlnLevels)), @@ -1529,7 +1528,7 @@ Any OutlineNumbering::getByIndex( sal_Int32 nIndex ) pValues[8].Name = "FirstLineOffset"; pValues[8].Value <<= pTemp->nFirstLineOffset; pValues[9].Name = "Adjust"; -pValues[9].Value <<= sal_Int16(HoriOrientation::LEFT); +pValues[9].Value <<= sal_Int16(SvxAdjust::Left); pValues[10].Name = "Transliteration"; pValues[10].Value <<= pTemp->sTransliteration; pValues[11].Name = "NatNum";
[Libreoffice-commits] core.git: drawinglayer/source
drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) New commits: commit 2a4d722c5c8d416bcacb9befd939709f1736b83c Author: Armin Le Grand (allotropia) AuthorDate: Tue Jan 3 15:02:54 2023 +0100 Commit: Armin Le Grand CommitDate: Tue Jan 3 15:17:03 2023 + SDPR: Corrected some transformations in Direct2D renderer Change-Id: Icd478d61e0941edb6f3420267fe425ba1d5b8dc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144988 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx b/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx index b830f2c7a3e6..5de189f16244 100644 --- a/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx @@ -860,8 +860,11 @@ void D2DPixelProcessor2D::processBitmapPrimitive2D( // color gets completely replaced, get it const basegfx::BColor aModifiedColor( maBColorModifierStack.getModifiedColor(basegfx::BColor())); + +// use unit geometry as fallback object geometry. Do *not* +// transform, the below used method will use the already +// correctly initialized local ViewInformation basegfx::B2DPolygon aPolygon(basegfx::utils::createUnitPolygon()); -aPolygon.transform(aLocalTransform); rtl::Reference aTemp( new primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPolygon), @@ -1178,7 +1181,8 @@ void D2DPixelProcessor2D::processTransparencePrimitive2D( // apply MaskScale to Brush, maybe used if implCreateAlpha_B2DBitmap was needed pBitmapBrush->SetTransform(aMaskScale); -// need to set transform offset for Layer initialization +// need to set transform offset for Layer initialization, we work +// in discrete device coordinates getRenderTarget().SetTransform(D2D1::Matrix3x2F::Translation( floor(aVisibleRange.getMinX()), floor(aVisibleRange.getMinY(; @@ -1248,6 +1252,10 @@ void D2DPixelProcessor2D::processUnifiedTransparencePrimitive2D( if (SUCCEEDED(hr)) { +// need to set correct transform for Layer initialization, we work +// in discrete device coordinates +getRenderTarget().SetTransform(D2D1::Matrix3x2F::Identity()); + getRenderTarget().PushLayer( D2D1::LayerParameters(D2D1::InfiniteRect(), nullptr, D2D1_ANTIALIAS_MODE_PER_PRIMITIVE, D2D1::IdentityMatrix(), @@ -1305,6 +1313,10 @@ void D2DPixelProcessor2D::processMaskPrimitive2DPixel( if (SUCCEEDED(hr)) { +// need to set correct transform for Layer initialization, we work +// in discrete device coordinates +getRenderTarget().SetTransform(D2D1::Matrix3x2F::Identity()); + getRenderTarget().PushLayer( D2D1::LayerParameters(D2D1::InfiniteRect(), pTransformedMaskGeometry), pLayer); process(rMaskCandidate.getChildren());
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/filter/ww8/ww8.cxx | 30 sw/source/filter/ww8/attributeoutputbase.hxx |2 - sw/source/filter/ww8/docxattributeoutput.cxx | 33 ++- sw/source/filter/ww8/docxattributeoutput.hxx |2 - sw/source/filter/ww8/rtfattributeoutput.cxx |3 +- sw/source/filter/ww8/rtfattributeoutput.hxx |3 +- sw/source/filter/ww8/wrtw8nds.cxx| 31 ++--- sw/source/filter/ww8/ww8atr.cxx |2 - sw/source/filter/ww8/ww8attributeoutput.hxx |2 - 9 files changed, 89 insertions(+), 19 deletions(-) New commits: commit 87e82f80e87bb4a216ea83383864d494f3e92eea Author: Szymon Kłos AuthorDate: Tue Nov 29 10:09:10 2022 +0100 Commit: Szymon Kłos CommitDate: Tue Jan 3 15:01:05 2023 + docx: export symbol characters correctly Previously we had: after save: original content: This patch checks if paragraph has symbol font used and exports content using w:sym mark in that case Change-Id: I74f4bb0d249cbf5dfc930e931f7d91bd0d2e9821 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143455 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mike Kaganski Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144949 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/sw/qa/filter/ww8/ww8.cxx b/sw/qa/filter/ww8/ww8.cxx index 8a2f97438d7b..611d63259ae8 100644 --- a/sw/qa/filter/ww8/ww8.cxx +++ b/sw/qa/filter/ww8/ww8.cxx @@ -9,6 +9,7 @@ #include +#include #include #include @@ -159,6 +160,35 @@ CPPUNIT_TEST_FIXTURE(Test, testDocxContentControlDropdownEmptyDisplayText) // i.e. we wrote an empty attribute instead of omitting it. assertXPathNoAttribute(pXmlDoc, "//w:sdt/w:sdtPr/w:dropDownList/w:listItem", "displayText"); } + +CPPUNIT_TEST_FIXTURE(Test, testDocxSymbolFontExport) +{ +// Create document with symbol character and font Wingdings +mxComponent = loadFromDesktop("private:factory/swriter"); +uno::Reference xMSF(mxComponent, uno::UNO_QUERY); +uno::Reference xTextDocument(mxComponent, uno::UNO_QUERY); +uno::Reference xText = xTextDocument->getText(); +uno::Reference xCursor = xText->createTextCursor(); + +xText->insertString(xCursor, u"", true); + +uno::Reference xRange = xCursor; +uno::Reference xTextProps(xRange, uno::UNO_QUERY); +xTextProps->setPropertyValue("CharFontName", uno::Any(OUString("Wingdings"))); +xTextProps->setPropertyValue("CharFontNameAsian", uno::Any(OUString("Wingdings"))); +xTextProps->setPropertyValue("CharFontNameComplex", uno::Any(OUString("Wingdings"))); +xTextProps->setPropertyValue("CharFontCharSet", uno::Any(awt::CharSet::SYMBOL)); + +// When exporting to DOCX: +save("Office Open XML Text"); + +// Then make sure the expected markup is used: +xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); + +assertXPath(pXmlDoc, "//w:p/w:r/w:sym", 1); +assertXPath(pXmlDoc, "//w:p/w:r/w:sym[1]", "font", "Wingdings"); +assertXPath(pXmlDoc, "//w:p/w:r/w:sym[1]", "char", "f0e0"); +} } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index ac3164ae2de6..99cae10812cc 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -191,7 +191,7 @@ public: virtual void WritePostitFieldReference() {}; /// Output text (inside a run). -virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 ) = 0; +virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8, const OUString& rSymbolFont = OUString() ) = 0; /// Output text (without markup). virtual void RawText(const OUString& rText, rtl_TextEncoding eCharSet) = 0; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 8aec04ef8df0..03dd2aafce71 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3478,7 +3478,8 @@ bool DocxAttributeOutput::FootnoteEndnoteRefTag() the switch in DocxAttributeOutput::RunText() nicer ;-) */ static bool impl_WriteRunText( FSHelperPtr const & pSerializer, sal_Int32 nTextToken, -const sal_Unicode* &rBegin, const sal_Unicode* pEnd, bool bMove = true ) +const sal_Unicode* &rBegin, const sal_Unicode* pEnd, bool bMove = true, +const OUString& rSymbolFont = OUString() ) { const sal_Unicode *pBegin = rBegin; @@ -3489,22 +3490,34 @@ static bool impl_WriteRunText( FSHelperPtr const & pSerializer, sal_Int32 nTextT if ( pBegin >= pEnd ) return false; // we want to write at least one character -// we have to add 'preserve' when starting/ending with space -if ( *pBegin == ' ' || *( pEnd - 1 ) == ' ' ) +bool
[Libreoffice-commits] core.git: onlineupdate/source
onlineupdate/source/libmar/sign/nss_secutil.h |5 + 1 file changed, 1 insertion(+), 4 deletions(-) New commits: commit 8a96d90a890812d49ee4f3c45b99aa0110b94d69 Author: Douglas Guptill AuthorDate: Sun Jan 1 15:24:51 2023 -0400 Commit: Thorsten Behrens CommitDate: Tue Jan 3 14:26:39 2023 + tdf#143148 Use pragma once instead of include guards Change-Id: Id4b84b13bf6a467d07ba11ca6bd65495b172e606 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144928 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/onlineupdate/source/libmar/sign/nss_secutil.h b/onlineupdate/source/libmar/sign/nss_secutil.h index f599fcce573d..5b1772d17994 100644 --- a/onlineupdate/source/libmar/sign/nss_secutil.h +++ b/onlineupdate/source/libmar/sign/nss_secutil.h @@ -5,8 +5,7 @@ /* With the exception of GetPasswordString, this file was copied from NSS's cmd/lib/secutil.h hg revision 8f011395145e */ -#ifndef NSS_SECUTIL_H_ -#define NSS_SECUTIL_H_ +#pragma once #include "nss.h" #include "pk11pub.h" @@ -39,5 +38,3 @@ static char * quiet_fgets (char *buf, int length, FILE *input); char * SECU_GetModulePassword(PK11SlotInfo *slot, PRBool retry, void *arg); - -#endif
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit bb968d0bfa5cb40e648f2cb032a6a1109de13377 Author: Justin Luth AuthorDate: Thu Dec 22 20:20:24 2022 -0500 Commit: Miklos Vajna CommitDate: Tue Jan 3 12:43:18 2023 + tdf#152636 writerfilter: no w:br in DMLShapes Don't write postponed column and page breaks into DML shape paragraphs. No existing unit tests found that match this criteria. The example file I have is not appropriate as a unit test, and it too easily fails to match when any random change is made to minimize/scrub it. Change-Id: Iced1399f76caf97362a5ba47a325233b9f009fcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144779 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144824 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index d24f5f77393f..d3bdc6fa6164 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1539,7 +1539,8 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar m_pSerializer->endElementNS(XML_w, XML_smartTag); } -if ( m_nColBreakStatus == COLBRK_WRITE || m_nColBreakStatus == COLBRK_WRITEANDPOSTPONE ) +if ((m_nColBreakStatus == COLBRK_WRITE || m_nColBreakStatus == COLBRK_WRITEANDPOSTPONE) +&& !m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen()) { m_pSerializer->startElementNS(XML_w, XML_r); m_pSerializer->singleElementNS(XML_w, XML_br, FSNS(XML_w, XML_type), "column"); @@ -1551,7 +1552,8 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar m_nColBreakStatus = COLBRK_NONE; } -if ( m_bPostponedPageBreak && !m_bWritingHeaderFooter ) +if (m_bPostponedPageBreak && !m_bWritingHeaderFooter +&& !m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen()) { m_pSerializer->startElementNS(XML_w, XML_r); m_pSerializer->singleElementNS(XML_w, XML_br, FSNS(XML_w, XML_type), "page");
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sw/qa sw/source
sw/qa/extras/ooxmlexport/data/tdf152636_lostPageBreak2.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport18.cxx |6 ++ sw/source/filter/ww8/wrtw8sty.cxx | 11 +++ 3 files changed, 13 insertions(+), 4 deletions(-) New commits: commit 8079fc1cc94383b3345b6dfce8346e8c1f1c60fa Author: Justin Luth AuthorDate: Thu Dec 22 17:50:46 2022 -0500 Commit: Miklos Vajna CommitDate: Tue Jan 3 12:40:56 2023 + tdf#152636 writerfilter: handle breakcode on table page break We always have to handle two situations when dealing with page breaks - paragraphs and tables. Change-Id: Ie0347d70f9529ca2e846c4a5041e76da9bd03e30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144778 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144823 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/sw/qa/extras/ooxmlexport/data/tdf152636_lostPageBreak2.docx b/sw/qa/extras/ooxmlexport/data/tdf152636_lostPageBreak2.docx new file mode 100644 index ..255bf795a5e2 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf152636_lostPageBreak2.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx index a77e2ec98ca4..03d02ff7b725 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx @@ -63,6 +63,12 @@ CPPUNIT_TEST_FIXTURE(Test, testInlineSdtHeader) loadAndSave("inline-sdt-header.docx"); } +CPPUNIT_TEST_FIXTURE(Test, testTdf152636_lostPageBreak2) +{ +loadAndReload("tdf152636_lostPageBreak2.docx"); +CPPUNIT_ASSERT_EQUAL(2, getPages()); +} + CPPUNIT_TEST_FIXTURE(Test, testSdtDuplicatedId) { // Given a document with 2 inline , with each a : diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index cfce4172ce86..a36de19cbb2f 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -1648,12 +1648,15 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt // 0xfff -> Section terminated nBreakCode = 0; // consecutive section -if ( rSepInfo.pPDNd && rSepInfo.pPDNd->IsContentNode() ) +if (rSepInfo.pPDNd && (rSepInfo.pPDNd->IsContentNode() || rSepInfo.pPDNd->IsTableNode())) { -if ( !NoPageBreakSection( &rSepInfo.pPDNd->GetContentNode()->GetSwAttrSet() ) ) -{ +const SfxItemSet* pSet += rSepInfo.pPDNd->IsContentNode() + ? &rSepInfo.pPDNd->GetContentNode()->GetSwAttrSet() + : &rSepInfo.pPDNd->GetTableNode()->GetTable().GetFrameFormat()->GetAttrSet(); + +if (!NoPageBreakSection(pSet)) nBreakCode = 2; -} } if ( reinterpret_cast(sal_IntPtr(-1)) == rSepInfo.pSectionFormat )
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - solenv/clang-format sw/CppunitTest_sw_ww8export4.mk sw/Module_sw.mk sw/qa sw/source
solenv/clang-format/excludelist |1 sw/CppunitTest_sw_ww8export4.mk | 14 +++ sw/Module_sw.mk |1 sw/qa/extras/ww8export/data/tdf151548_formFieldMacros.doc |binary sw/qa/extras/ww8export/ww8export4.cxx | 57 ++ sw/source/filter/ww8/wrtww8.cxx | 16 +-- 6 files changed, 79 insertions(+), 10 deletions(-) New commits: commit e85070c43018fe64f3bcf48ff854e7a5560b15c4 Author: Justin Luth AuthorDate: Thu Aug 11 09:29:58 2022 -0400 Commit: Miklos Vajna CommitDate: Tue Jan 3 12:40:14 2023 + tdf#151548 ww8export: export formfield names This should have been looking for ODF_FORMCHECKBOX_NAME for checkboxes instead of a never-created grabbag "name". In any case, since LO 7.5 all the three true formfields preserve their name in the name property, so no grabbags are necessary any more. Unforunately the unit test is not very good. I copied it from the DOCX case, but I just can't get it to fail - even without any patching. Yet I know it is broken b/c it is broken in MS Word 2010, but now it isn't broken after the patch round-trips it. Change-Id: I88e92d4c6d0b0e26ba80c428e06e63859941a3ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144815 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144822 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index d3b97ee92735..e32a452a98d0 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -12327,6 +12327,7 @@ sw/qa/extras/uiwriter/uiwriter.cxx sw/qa/extras/ww8export/ww8export.cxx sw/qa/extras/ww8export/ww8export2.cxx sw/qa/extras/ww8export/ww8export3.cxx +sw/qa/extras/ww8export/ww8export4.cxx sw/qa/extras/ww8import/ww8import.cxx sw/qa/inc/bordertest.hxx sw/qa/inc/swmodeltestbase.hxx diff --git a/sw/CppunitTest_sw_ww8export4.mk b/sw/CppunitTest_sw_ww8export4.mk new file mode 100644 index ..47ac483ba688 --- /dev/null +++ b/sw/CppunitTest_sw_ww8export4.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#* +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +#* + +$(eval $(call sw_ww8export_test,4)) + +# vim: set noet sw=4 ts=4: diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index a9583fca3bb4..8ad8313c28ae 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -100,6 +100,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\ CppunitTest_sw_ww8export \ CppunitTest_sw_ww8export2 \ CppunitTest_sw_ww8export3 \ +CppunitTest_sw_ww8export4 \ CppunitTest_sw_ww8import \ CppunitTest_sw_rtfimport \ CppunitTest_sw_odfexport \ diff --git a/sw/qa/extras/ww8export/data/tdf151548_formFieldMacros.doc b/sw/qa/extras/ww8export/data/tdf151548_formFieldMacros.doc new file mode 100644 index ..4ea915f0afe4 Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf151548_formFieldMacros.doc differ diff --git a/sw/qa/extras/ww8export/ww8export4.cxx b/sw/qa/extras/ww8export/ww8export4.cxx new file mode 100644 index ..f686cd99d021 --- /dev/null +++ b/sw/qa/extras/ww8export/ww8export4.cxx @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +class Test : public SwModelTestBase +{ +public: +Test() +: SwModelTestBase("/sw/qa/extras/ww8export/data/", "MS Word 97") +{ +} + +bool mustTestImportOf(const char* filename) const override +{ +// If the testcase is stored in some other format, it's pointless to test. +return o3tl::ends_with(filename, ".doc"); +} +}; + + +DECLARE_WW8EXPORT_TEST(testTdf151548_formFieldMacros, "tdf151548_formFieldMacros.doc") +{ +SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); +SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); +IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess(); +for(auto aIter = pMarkAccess->getFieldmarksBegin(); aIter != pMar
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sw/inc sw/qa sw/source xmloff/source
sw/inc/unoprnms.hxx |1 sw/inc/unotextcursor.hxx|1 sw/qa/core/unocore/data/paragraph-marker-formatted-run.docx |binary sw/qa/core/unocore/unocore.cxx | 19 ++ sw/source/core/text/xmldump.cxx |5 sw/source/core/unocore/unoobj.cxx | 81 +++- xmloff/source/text/txtparai.cxx | 17 ++ 7 files changed, 121 insertions(+), 3 deletions(-) New commits: commit 21c8dc9a87a811fef0bc11da3f3448397a396d79 Author: Miklos Vajna AuthorDate: Tue Dec 20 12:14:16 2022 +0100 Commit: Miklos Vajna CommitDate: Tue Jan 3 12:37:25 2023 + sw: fix ODT import of paragraph marker formatting The DOCX bugdoc had a numbering portion which was not bold, even if all characters in the paragrpah was bold. This was rendered fine, but once it was saved to ODT + reloaded, the numbering portion became bold as well, which is buggy. What happens here is that there is one span that covers the entire paragraph (and is bold) and there is an empty span at paragraph end (which is not bold), so the ODT export is fine. But once we import it back, the first span gets "upgraded" to paragraph-level formatting (because SetAttrMode::NOFORMATATTR is not used when inserting the hints) and the second span is not mapped back to the original RES_PARATR_LIST_AUTOFMT in the text node. Fix the problem by 1) improving SwXTextCursor::setPropertyValue() to work with SetAttrMode::NOFORMATATTR when multiple spans are inserted and by 2) extending SwUnoCursorHelper::SetCursorPropertyValue() to create RES_PARATR_LIST_AUTOFMT for empty spans at paragraph end. This way the original doc model and the one created after ODT export + import is much closer to each other. This builds on top of 6249858a8972aef077e0249bd93cfe8f01bce4d6 (sw: ODT import/export of DOCX's paragraph marker formatting, 2022-12-19), previously the ODT export and import of paragraph marker formatting was completely missing. (cherry picked from commit 1feb1aa08421f9d0934ab65ce94cf6054818c0f3) Also includes commit de235fe13a2e5a4db043f44e6d5636e308f2b979 (sw layout xml dump: show numbering portion weight, 2022-12-19). Change-Id: I139e11217dcbc18744aeeb80638090781aa74933 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144676 Tested-by: Jenkins Reviewed-by: Mike Kaganski Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144961 Tested-by: Miklos Vajna Reviewed-by: Miklos Vajna diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index 12f839c2b16a..3c6b5d8464ab 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -502,6 +502,7 @@ #define UNO_NAME_IS_SKIP_HIDDEN_TEXT "IsSkipHiddenText" #define UNO_NAME_IS_SKIP_PROTECTED_TEXT "IsSkipProtectedText" #define UNO_NAME_RESET_PARAGRAPH_LIST_ATTRIBUTES "ResetParagraphListAttributes" +#define UNO_NAME_NO_FORMAT_ATTR "NoFormatAttr" #define UNO_NAME_DOCUMENT_INDEX_MARKS "DocumentIndexMarks" #define UNO_NAME_FOOTNOTE_IS_COLLECT_AT_TEXT_END "FootnoteIsCollectAtTextEnd" #define UNO_NAME_FOOTNOTE_IS_RESTART_NUMBERING "FootnoteIsRestartNumbering" diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx index b055f2d64504..25c71effa57c 100644 --- a/sw/inc/unotextcursor.hxx +++ b/sw/inc/unotextcursor.hxx @@ -76,6 +76,7 @@ private: const CursorTypem_eType; const css::uno::Reference< css::text::XText > m_xParentText; sw::UnoCursorPointer m_pUnoCursor; +SetAttrMode m_nAttrMode = SetAttrMode::DEFAULT; SwUnoCursor& GetCursorOrThrow() { if(!m_pUnoCursor) diff --git a/sw/qa/core/unocore/data/paragraph-marker-formatted-run.docx b/sw/qa/core/unocore/data/paragraph-marker-formatted-run.docx new file mode 100644 index ..c0635c157cc9 Binary files /dev/null and b/sw/qa/core/unocore/data/paragraph-marker-formatted-run.docx differ diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index 58723f829439..1566481157e8 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -781,6 +781,25 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testParagraphMarkerODFExport) getXPath(pXmlDoc, "//Special[@nType='PortionType::Number']/SwFont", "color")); } +CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testParagraphMarkerFormattedRun) +{ +// Given a document with a bold run and non-bold paragraph marker: +load(DATA_DIRECTORY, "paragraph-marker-formatted-run.docx"); + +// When saving that as ODT + reload: +reload("writer8", nullptr); + +// Then make sure that the numbering portion is still non-bold, matching Word: +xmlDocUniquePtr pXmlDoc = parseLayoutDump(); +// Without the accompanying fix in place, this test would have failed with: +// - Exp
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sw/qa sw/source
sw/qa/core/unocore/data/paragraph-marker.docx |binary sw/qa/core/unocore/unocore.cxx| 19 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx |3 - sw/source/core/inc/unoport.hxx|7 ++- sw/source/core/unocore/unoobj.cxx |7 ++- sw/source/core/unocore/unoport.cxx| 57 ++ sw/source/core/unocore/unoportenum.cxx|5 ++ 7 files changed, 86 insertions(+), 12 deletions(-) New commits: commit e48bf9b364c520eb68f9a3f962dc640eaa9e6661 Author: Miklos Vajna AuthorDate: Mon Dec 19 08:47:18 2022 +0100 Commit: Miklos Vajna CommitDate: Tue Jan 3 12:36:53 2023 + sw: ODT import/export of DOCX's paragraph marker formatting The bugdoc had a numbering, where the paragraph marker was explicitly formatted to a custom sans font, and this font is also used for the numbering portion's font. This was imported from DOCX correctly, but once you save to ODT and reload, the font used in the numbering portion changed from sans to serif, which is incorrect. The reason for this seems to be that earlier 5ba30f588d6e41a13d68b1461345fca7a7ca61ac (tdf#64222 sw: better DOCX import/export of paragraph marker formatting, 2019-09-06) introduced support for storing this paragraph marker formatting in RES_PARATR_LIST_AUTOFMT, but this was lost on ODT export / import. Fix the problem by 1) adding the autostyle to the autostyle pool, so the font gets written when writing automatic char styles 2) extending SwXTextPortion to have a mode where it exposes the RES_PARATR_LIST_AUTOFMT of the current text node and 3) improving lcl_CreatePortions() to expose a trailing empty text portion that works with these properties. This also required adjusting CppunitTest_sw_ooxmlexport2's testFdo64238_b, which explicitly asserted that the format of the paragraph marker is not exposed in the UNO API text portion enumeration. An additional improvement would be to go with a more explicit markup in the ODT output for RES_PARATR_LIST_AUTOFMT, but we would need to decide what name to use there, since currently we call this paragraph marker formatting RES_PARATR_LIST_AUTOFMT / ListAutoFormat, and somewhat confusingly this is primarily about paragraph marker formatting, not lists / numberings (that is just a consequence). Change-Id: I19c7eed19c6fc85c251ef87a5181c0719a0a382c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/17 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit 6249858a8972aef077e0249bd93cfe8f01bce4d6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144491 Reviewed-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144675 Reviewed-by: Mike Kaganski Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144960 Tested-by: Miklos Vajna diff --git a/sw/qa/core/unocore/data/paragraph-marker.docx b/sw/qa/core/unocore/data/paragraph-marker.docx new file mode 100644 index ..8dac2d96c76d Binary files /dev/null and b/sw/qa/core/unocore/data/paragraph-marker.docx differ diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index e26e227b059b..58723f829439 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -762,6 +762,25 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControls) CPPUNIT_ASSERT_EQUAL(OUString("tag2"), aTag); } +CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testParagraphMarkerODFExport) +{ +// Given a document with a red numbering portion, from the paragraph marker's format: +load(DATA_DIRECTORY, "paragraph-marker.docx"); + +// When saving that as ODT + reload: +reload("writer8", nullptr); + +// Then make sure that it still has the correct color: +xmlDocUniquePtr pXmlDoc = parseLayoutDump(); +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 00ff (COL_LIGHTRED) +// - Actual : (COL_AUTO) +// i.e. the custom "red" color was lost as RES_PARATR_LIST_AUTOFMT was not serialized to ODT. +CPPUNIT_ASSERT_EQUAL( +OUString("00ff"), +getXPath(pXmlDoc, "//Special[@nType='PortionType::Number']/SwFont", "color")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx index 7e4cce4ce6de..a14b0473ae08 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx @@ -854,7 +854,8 @@ DECLARE_OOXMLEXPORT_TEST(testFdo64238_b, "fdo64238_b.docx") xRunEnum->nextElement(); numOfRuns++; } -CPPUNIT_ASSERT_EQUAL(sal_Int32(5), numOfRuns); +// "This is the ", "ODD", " [", "LEFT", "] header" and the colored paragraph marker +CPPUNIT_AS
[Libreoffice-commits] core.git: desktop/source sw/qa sw/source
desktop/source/lib/init.cxx |3 +- sw/qa/uibase/uno/uno.cxx | 29 sw/source/uibase/uno/loktxdoc.cxx | 53 ++ 3 files changed, 84 insertions(+), 1 deletion(-) New commits: commit 3585d0414ffe08890856e5c09f453b9f566323df Author: Miklos Vajna AuthorDate: Tue Jan 3 11:28:04 2023 +0100 Commit: Miklos Vajna CommitDate: Tue Jan 3 11:58:27 2023 + sw, lok: implement a getCommandValues(Fields) There was no LOK API to get a list of all fields of a given type where the name matches a certain prefix. This is useful in case the API cilent wants to know what previously inserted refmarks were deleted by the user as part of deleting text content. Add a new getCommandValues(".uno:Fields") that returns the names of matching refmarks. Do not return the refmark text, assuming that would be updated by the API client anyway. In practice this is needed by Zotero in case it wants to model its citations with refmarks. Change-Id: Ie469253891896aa8ab00d434c9ab116adbe3864b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144985 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index f805f4a73322..6cb0c9493516 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5717,7 +5717,8 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo static const std::initializer_list vForward = { u"TextFormFields", u"SetDocumentProperties", -u"Bookmarks" +u"Bookmarks", +u"Fields" }; if (!strcmp(pCommand, ".uno:LanguageStatus")) diff --git a/sw/qa/uibase/uno/uno.cxx b/sw/qa/uibase/uno/uno.cxx index 64d2a70fe4e2..12f6124ec1f8 100644 --- a/sw/qa/uibase/uno/uno.cxx +++ b/sw/qa/uibase/uno/uno.cxx @@ -318,6 +318,35 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testGetBookmarks) CPPUNIT_ASSERT_EQUAL(static_cast(2), aTree.get_child("bookmarks").count("")); } +CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testGetFields) +{ +// Given a document with a refmark: +createSwDoc(); +uno::Sequence aArgs = { +comphelper::makePropertyValue("TypeName", uno::Any(OUString("SetRef"))), +comphelper::makePropertyValue( +"Name", uno::Any(OUString("ZOTERO_ITEM CSL_CITATION {} RNDpyJknp173F"))), +comphelper::makePropertyValue("Content", uno::Any(OUString("mycontent"))), +}; +dispatchCommand(mxComponent, ".uno:InsertField", aArgs); + +// When getting the refmarks: +tools::JsonWriter aJsonWriter; +std::string_view aCommand(".uno:Fields?typeName=SetRef&namePrefix=ZOTERO_ITEM%20CSL_CITATION"); +auto pXTextDocument = dynamic_cast(mxComponent.get()); +pXTextDocument->getCommandValues(aJsonWriter, aCommand); + +// Then make sure we get the 1 refmark: +std::unique_ptr pJSON(aJsonWriter.extractData()); +std::stringstream aStream(pJSON.get()); +boost::property_tree::ptree aTree; +boost::property_tree::read_json(aStream, aTree); +// Without the accompanying fix in place, this test would have failed with: +// - No such node (setRefs) +// i.e. the returned JSON was just empty. +CPPUNIT_ASSERT_EQUAL(static_cast(1), aTree.get_child("setRefs").count("")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uno/loktxdoc.cxx b/sw/source/uibase/uno/loktxdoc.cxx index 5381fd5c1dfe..d82fc8388775 100644 --- a/sw/source/uibase/uno/loktxdoc.cxx +++ b/sw/source/uibase/uno/loktxdoc.cxx @@ -34,6 +34,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -170,6 +171,53 @@ void GetBookmarks(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell, rJsonWriter.put("name", pMark->GetName()); } } + +/// Implements getCommandValues(".uno:Fields"). +/// +/// Parameters: +/// +/// - typeName: field type condition to not return all fields +/// - namePrefix: field name prefix to not return all fields +void GetFields(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell, + const std::map& rArguments) +{ +OUString aTypeName; +{ +auto it = rArguments.find("typeName"); +if (it != rArguments.end()) +{ +aTypeName = it->second; +} +} +// See SwFieldTypeFromString(). +if (aTypeName != "SetRef") +{ +return; +} + +OUString aNamePrefix; +{ +auto it = rArguments.find("namePrefix"); +if (it != rArguments.end()) +{ +aNamePrefix = it->second; +} +} + +SwDoc* pDoc = pDocShell->GetDoc(); +tools::ScopedJsonWriterArray aBookmarks = rJsonWriter.startArray("setRefs"); +for (sal_uInt16 i = 0; i < pDoc->GetRefMarks(); ++i) +{ +const SwFormatRefMark* pRefMark = pDoc->GetRefMark(i);
[Libreoffice-commits] core.git: testtools/CustomTarget_bridgetest.mk testtools/CustomTarget_uno_test.mk
testtools/CustomTarget_bridgetest.mk | 18 +- testtools/CustomTarget_uno_test.mk | 12 ++-- 2 files changed, 11 insertions(+), 19 deletions(-) New commits: commit 32c845cb4389aba9430ce471b04f2891f5ff630d Author: Stephan Bergmann AuthorDate: Tue Jan 3 11:16:03 2023 +0100 Commit: Stephan Bergmann CommitDate: Tue Jan 3 11:57:27 2023 + Move manual bridgetest_inprocess_java to automatic CustomTarget_uno_test check Change-Id: I38ae06444adba4eb924a19291f466548ec11b024 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144984 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/testtools/CustomTarget_bridgetest.mk b/testtools/CustomTarget_bridgetest.mk index 9329281d7a79..9e934f03498a 100644 --- a/testtools/CustomTarget_bridgetest.mk +++ b/testtools/CustomTarget_bridgetest.mk @@ -21,8 +21,7 @@ $(call gb_CustomTarget_get_target,testtools/bridgetest) : \ $(testtools_BRIDGEDIR)/bridgetest_server$(testtools_BATCHSUFFIX) \ $(testtools_BRIDGEDIR)/bridgetest_client$(testtools_BATCHSUFFIX) \ $(if $(ENABLE_JAVA),\ - $(testtools_BRIDGEDIR)/bridgetest_javaserver$(testtools_BATCHSUFFIX) \ - $(testtools_BRIDGEDIR)/bridgetest_inprocess_java$(testtools_BATCHSUFFIX)) + $(testtools_BRIDGEDIR)/bridgetest_javaserver$(testtools_BATCHSUFFIX)) $(testtools_BRIDGEDIR)/bridgetest_server$(testtools_BATCHSUFFIX) :| $(testtools_BRIDGEDIR)/.dir $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) @@ -59,21 +58,6 @@ $(testtools_BRIDGEDIR)/bridgetest_javaserver$(testtools_BATCHSUFFIX) :| $(testto $(if $(filter-out WNT,$(OS)),chmod +x $@) $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH) -$(testtools_BRIDGEDIR)/bridgetest_inprocess_java$(testtools_BATCHSUFFIX) :| $(testtools_BRIDGEDIR)/.dir - $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) - $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) - $(call gb_Helper_abbreviate_dirs,\ - echo "JAVA_HOME=$(JAVA_HOME)" \ - "$(call gb_Executable_get_target_for_build,uno)" \ - "-s com.sun.star.test.bridge.BridgeTest" \ - "-env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD))" \ - "-env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services))" \ - "-env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb)" \ - "-- com.sun.star.test.bridge.JavaTestObject noCurrentContext" \ - > $@) - $(if $(filter-out WNT,$(OS)),chmod +x $@) - $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH) - $(testtools_BRIDGEDIR)/bridgetest_client$(testtools_BATCHSUFFIX) :| $(testtools_BRIDGEDIR)/.dir $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) diff --git a/testtools/CustomTarget_uno_test.mk b/testtools/CustomTarget_uno_test.mk index 4850e5ca66b2..1a958c9b1209 100644 --- a/testtools/CustomTarget_uno_test.mk +++ b/testtools/CustomTarget_uno_test.mk @@ -18,7 +18,8 @@ $(call gb_CustomTarget_get_target,testtools/uno_test) : \ $(call gb_Package_get_target,instsetoo_native_setup_ure) \ $(call gb_Rdb_get_target,uno_services) \ $(call gb_Rdb_get_target,ure/services) \ - $(call gb_UnoApi_get_target,udkapi) + $(call gb_UnoApi_get_target,udkapi) \ + $(if $(ENABLE_JAVA),$(call gb_Jar_get_target,testComponent)) ifneq ($(gb_SUPPRESS_TESTS),) @true else @@ -28,7 +29,14 @@ else -- com.sun.star.test.bridge.CppTestObject \ -env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD)) \ -env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services)) \ - -env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb)) + -env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb) \ + $(if $(ENABLE_JAVA), && \ + $(call gb_Executable_get_command,uno) \ + -s com.sun.star.test.bridge.BridgeTest \ + -- com.sun.star.test.bridge.JavaTestObject noCurrentContext \ + -env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD)) \ + -env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services)) \ + -env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb))) endif # vim:set shiftwidth=4 tabstop=4 noexpandtab:
[Libreoffice-commits] core.git: sw/qa
sw/qa/uitest/writer_tests4/spellDialog.py |4 1 file changed, 4 insertions(+) New commits: commit d2614337e8291b9b6d114fda5ae914f6940c353a Author: László Németh AuthorDate: Mon Jan 2 18:57:48 2023 +0100 Commit: László Németh CommitDate: Tue Jan 3 11:25:41 2023 + tdf#65535 sw spellDialog.py: add same latency to fix lo-upsan build The problem reported by Stephan Bergmann: FAIL: test_tdf65535 (spellDialog.SpellingAndGrammarDialog) -- Traceback (most recent call last): File "/home/tdf/lode/jenkins/workspace/lo_ubsan/sw/qa/uitest/writer_tests4/spellDialog.py", line 237, in test_tdf65535 self.assertEqual("Bad baad", output_text) AssertionError: 'Bad baad' != 'Baad baad' - Bad baad + Baad baad ? + Change-Id: Icd656544946f3d6b67fefd9980872bbee6608fab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144964 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/uitest/writer_tests4/spellDialog.py b/sw/qa/uitest/writer_tests4/spellDialog.py index d7990cdf494e..9fd9d16cee74 100644 --- a/sw/qa/uitest/writer_tests4/spellDialog.py +++ b/sw/qa/uitest/writer_tests4/spellDialog.py @@ -233,6 +233,10 @@ frog, dogg, catt""" change = xDialog.getChild('change') change.executeAction("CLICK", ()) +# fix UPSAN build +import time +time.sleep(0.2) + output_text = document.Text.getString() self.assertEqual("Bad baad", output_text)
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - sw/qa sw/source
sw/qa/uitest/table/sheetToTable.py | 36 ++- sw/source/uibase/dochdl/swdtflvr.cxx | 19 ++ 2 files changed, 54 insertions(+), 1 deletion(-) New commits: commit 61312cb3ec89730e23ae90a86381e71a94c7d297 Author: László Németh AuthorDate: Mon Jan 2 13:36:42 2023 +0100 Commit: László Németh CommitDate: Tue Jan 3 11:23:59 2023 + tdf#152245 sw change tracking: fix copy from Calc to Writer tables Pasting Calc tables into Writer tables uses temporary table deletion, which never occured if change tracking was enabled, resulting freezing. Fix this by disabling change tracking during temporarily, also add a limit for other potential cases, where it's not possible to delete the table. Regression from commit 05366b8e6683363688de8708a3d88cf144c7a2bf "tdf#60382 sw offapi: add change tracking of table/row deletion". Change-Id: I57874fa658652b30fc78b267ab49a52d7277a838 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144946 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit c9129bd97a9514e5679ed65bdf5879718f1b476d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144913 diff --git a/sw/qa/uitest/table/sheetToTable.py b/sw/qa/uitest/table/sheetToTable.py index 11b9fe89b490..4a40b6966935 100644 --- a/sw/qa/uitest/table/sheetToTable.py +++ b/sw/qa/uitest/table/sheetToTable.py @@ -114,4 +114,38 @@ class sheetToTable(UITestCase): self.assertEqual(table.getCellByName("A3").getString(), "Test 3") self.assertEqual(table.getCellByName("A4").getString(), "Test 4") -# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file +def test_tdf152245(self): +with self.ui_test.create_doc_in_start_center("calc"): + +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") + +enter_text_to_cell(gridwin, "A1", "Test 1") +enter_text_to_cell(gridwin, "A2", "Test 2") +enter_text_to_cell(gridwin, "A3", "Test 3") +enter_text_to_cell(gridwin, "A4", "Test 4") + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"})) + +self.xUITest.executeCommand(".uno:Copy") + + +with self.ui_test.load_empty_file("writer") as writer_doc: + + self.xUITest.executeCommand(".uno:InsertTable?Columns:short=1&Rows:short=4") + +# redlining should be on +self.xUITest.executeCommand(".uno:TrackChanges") + +# This was freezing +self.xUITest.executeCommand(".uno:Paste") + +self.assertEqual(writer_doc.TextTables.getCount(), 1) +table = writer_doc.getTextTables()[0] +self.assertEqual(len(table.getRows()), 4) +self.assertEqual(table.getCellByName("A1").getString(), "Test 1") +self.assertEqual(table.getCellByName("A2").getString(), "Test 2") +self.assertEqual(table.getCellByName("A3").getString(), "Test 3") +self.assertEqual(table.getCellByName("A4").getString(), "Test 4") + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 8c6d6bda92eb..d9a6db5c1bb5 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1519,16 +1519,35 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt { SfxDispatcher* pDispatch = rSh.GetView().GetViewFrame()->GetDispatcher(); sal_uInt32 nLevel = 0; + // within Writer table cells, inserting worksheets using HTML format results only plain text, not a native table, // so remove all outer nested tables temporary to get a working insertion point // (RTF format has no such problem, but that inserts the hidden rows of the original Calc worksheet, too) + +// For this, switch off change tracking temporarily, if needed +RedlineFlags eOld = rSh.GetDoc()->getIDocumentRedlineAccess().GetRedlineFlags(); +if ( eOld & RedlineFlags::On ) +rSh.GetDoc()->getIDocumentRedlineAccess().SetRedlineFlags( eOld & ~RedlineFlags::On ); + +OUString sPreviousTableName; do { +// tdf#152245 add a limit to the loop, if it's not possible to delete the table +const SwTableNode* pNode = rSh.GetCursor()->GetPointNode().FindTableNode(); +const OUString sTableName = pNode->GetTable().GetFrameFormat()->GetName(); +if ( sTableName == sPreviousTableName ) +break; +sPreviousTableName = sTableName; // insert a random character to redo the place of the insertion at the end pDispatch->Execute(FN_INSERT_NNBSP, SfxCallMode:
Re: Trouble with theme color in docx
Hi Regina, On Mon, Jan 2, 2023 at 6:43 AM Regina Henschel wrote: > Hi Miklos, hi Tomaž, hi all, > > Tomaž, I have put you in CC because you are currently heavily working on > theme colors. > > I come across the problem, that my import in > https://gerrit.libreoffice.org/c/core/+/143615 does not get the correct > color, if theme colors other than 'accent1'..'accent6' are used. > > Colored text in shapes in PowerPoint and fill and stroke of shapes in > Word use e.g.: > > But colored text in shapes in Word uses e.g.: > > > The themeColor attribute uses ST_ThemeColor (ISO 17.18.97) and that are > the long variants of the color keys, e.g: > background1, dark1, light1 > > uses the ST_SchemeColorVal enumeration (ISO 20.1.10.54). > That one has the same items as the elements in in > but with the additional items 'bg1', 'bg2', 'tx1', 'tx2'. > The ClrScheme::getColor() method maps these additional items to 'lt1', > 'lt2', 'dk1' and 'dk2' respectively before searching the color. But it > does not catch the keys used with themeColor attribute. > Yes, you can add the missing long keys here and map them to the dark/light variant. > The only kind of mapping with the long variants that I have found at all > is TDefTableHandler::getThemeColorTypeIndex and those assignments look > wrong to me (e.g. using 0 for background1 and for dark1). > This is indeed wrong.. background should map to light and text to dark. I will fix this but it will take a while until it hits master, unless you need to change this too? > VML import/export is likely effected too, because it uses w:themeColor=".."> too. > Yes, probably this needs to be changed also, but it's only for backwards compatibility. > Where to fix it? > I think for this you will need to change the implementation in oox to just map the keys and it should work I guess. > Kind regards, > Regina Tomaž
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/uitest/table/sheetToTable.py | 36 ++- sw/source/uibase/dochdl/swdtflvr.cxx | 19 ++ 2 files changed, 54 insertions(+), 1 deletion(-) New commits: commit c9129bd97a9514e5679ed65bdf5879718f1b476d Author: László Németh AuthorDate: Mon Jan 2 13:36:42 2023 +0100 Commit: László Németh CommitDate: Tue Jan 3 09:54:27 2023 + tdf#152245 sw change tracking: fix copy from Calc to Writer tables Pasting Calc tables into Writer tables uses temporary table deletion, which never occured if change tracking was enabled, resulting freezing. Fix this by disabling change tracking during temporarily, also add a limit for other potential cases, where it's not possible to delete the table. Regression from commit 05366b8e6683363688de8708a3d88cf144c7a2bf "tdf#60382 sw offapi: add change tracking of table/row deletion". Change-Id: I57874fa658652b30fc78b267ab49a52d7277a838 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144946 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/uitest/table/sheetToTable.py b/sw/qa/uitest/table/sheetToTable.py index 11b9fe89b490..4a40b6966935 100644 --- a/sw/qa/uitest/table/sheetToTable.py +++ b/sw/qa/uitest/table/sheetToTable.py @@ -114,4 +114,38 @@ class sheetToTable(UITestCase): self.assertEqual(table.getCellByName("A3").getString(), "Test 3") self.assertEqual(table.getCellByName("A4").getString(), "Test 4") -# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file +def test_tdf152245(self): +with self.ui_test.create_doc_in_start_center("calc"): + +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") + +enter_text_to_cell(gridwin, "A1", "Test 1") +enter_text_to_cell(gridwin, "A2", "Test 2") +enter_text_to_cell(gridwin, "A3", "Test 3") +enter_text_to_cell(gridwin, "A4", "Test 4") + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"})) + +self.xUITest.executeCommand(".uno:Copy") + + +with self.ui_test.load_empty_file("writer") as writer_doc: + + self.xUITest.executeCommand(".uno:InsertTable?Columns:short=1&Rows:short=4") + +# redlining should be on +self.xUITest.executeCommand(".uno:TrackChanges") + +# This was freezing +self.xUITest.executeCommand(".uno:Paste") + +self.assertEqual(writer_doc.TextTables.getCount(), 1) +table = writer_doc.getTextTables()[0] +self.assertEqual(len(table.getRows()), 4) +self.assertEqual(table.getCellByName("A1").getString(), "Test 1") +self.assertEqual(table.getCellByName("A2").getString(), "Test 2") +self.assertEqual(table.getCellByName("A3").getString(), "Test 3") +self.assertEqual(table.getCellByName("A4").getString(), "Test 4") + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 8c6d6bda92eb..d9a6db5c1bb5 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1519,16 +1519,35 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt { SfxDispatcher* pDispatch = rSh.GetView().GetViewFrame()->GetDispatcher(); sal_uInt32 nLevel = 0; + // within Writer table cells, inserting worksheets using HTML format results only plain text, not a native table, // so remove all outer nested tables temporary to get a working insertion point // (RTF format has no such problem, but that inserts the hidden rows of the original Calc worksheet, too) + +// For this, switch off change tracking temporarily, if needed +RedlineFlags eOld = rSh.GetDoc()->getIDocumentRedlineAccess().GetRedlineFlags(); +if ( eOld & RedlineFlags::On ) +rSh.GetDoc()->getIDocumentRedlineAccess().SetRedlineFlags( eOld & ~RedlineFlags::On ); + +OUString sPreviousTableName; do { +// tdf#152245 add a limit to the loop, if it's not possible to delete the table +const SwTableNode* pNode = rSh.GetCursor()->GetPointNode().FindTableNode(); +const OUString sTableName = pNode->GetTable().GetFrameFormat()->GetName(); +if ( sTableName == sPreviousTableName ) +break; +sPreviousTableName = sTableName; // insert a random character to redo the place of the insertion at the end pDispatch->Execute(FN_INSERT_NNBSP, SfxCallMode::SYNCHRON); pDispatch->Execute(FN_TABLE_DELETE_TABLE, SfxCallMode::SYNCHRON); nLevel++; }
[Libreoffice-commits] core.git: vcl/osx
vcl/osx/salframeview.mm |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 88ebc324a51f16df0248d6a0d53d2169b1995dda Author: Stephan Bergmann AuthorDate: Tue Jan 3 08:23:26 2023 +0100 Commit: Stephan Bergmann CommitDate: Tue Jan 3 08:14:47 2023 + loplugin:fakebool Change-Id: I0d03e29e6290a0e7945b80538efa6b0467d37fad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144981 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm index de996654bc1d..5a28f647c451 100644 --- a/vcl/osx/salframeview.mm +++ b/vcl/osx/salframeview.mm @@ -1843,7 +1843,7 @@ static AquaSalFrame* getMouseContainerFrame() // the returned position won't be anywhere near the text cursor. So, // dispatch an empty SalEvent::ExtTextInput event, fetch the position, // and then dispatch a SalEvent::EndExtTextInput event. -BOOL bNeedsExtTextInput = ( mbInKeyInput && !mpLastMarkedText && mpLastEvent && [mpLastEvent type] == NSEventTypeKeyDown && [mpLastEvent isARepeat] ); +bool bNeedsExtTextInput = ( mbInKeyInput && !mpLastMarkedText && mpLastEvent && [mpLastEvent type] == NSEventTypeKeyDown && [mpLastEvent isARepeat] ); if ( bNeedsExtTextInput ) { SalExtTextInputEvent aInputEvent;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - include/xmloff sw/qa sw/source
include/xmloff/odffields.hxx |1 sw/qa/extras/ooxmlexport/data/tdf151548_activeContentDemo.docm |binary sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 12 ++ sw/source/filter/ww8/docxattributeoutput.cxx |4 --- sw/source/filter/ww8/ww8par3.cxx |1 5 files changed, 13 insertions(+), 5 deletions(-) New commits: commit 8520e970d81760d6a9c3931bd43f7d6d3d6ca9a4 Author: Justin Luth AuthorDate: Sat Dec 24 14:15:51 2022 -0500 Commit: Miklos Vajna CommitDate: Tue Jan 3 08:05:23 2023 + tdf#151548 DOCX formfield: export checkbox name The two other fields are exporting the name, (although it is getting somewhat lost in excess bookmarks), because they are just using the Fieldmark name property. See LO 7.5 8ad39b6f2aff3ca37aeff5373991e853c329 for tdf#151548 sw: use provided name for formfields which saved the name for checkboxes and dropdowns. ODF_FORMCHECKBOX_NAME was simply used as a grabbag for ww8import. Since that is obsolete, get rid of it. mostly introduced with --- commit b547c0c2aa901667fef85233282ec84f34b7e5f4 Author: Noel Power on Thu Feb 10 16:18:40 2011 + some form field import/export improvements ODF_FORMDROPDOWN_NAME was dropped early on. --- commit 79770ff55bd8c3bc5948c51373e8cb7867ce43d3 Author: Noel Power on Tue Mar 1 12:30:23 2011 + partial revert of 803409125f4ed896b391acb99266d50691c6fd4a remove currently unnecessary ( but possibly future ) odf attributes for form field controls to prevent those attributes from being written to odf Change-Id: I133028dce65361314e663bb5238f99c607f0ab14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144792 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144817 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/include/xmloff/odffields.hxx b/include/xmloff/odffields.hxx index 89c2e6174335..c4f9a2f788fc 100644 --- a/include/xmloff/odffields.hxx +++ b/include/xmloff/odffields.hxx @@ -25,7 +25,6 @@ #define ODF_FORMCHECKBOX u"vnd.oasis.opendocument.field.FORMCHECKBOX" #define ODF_FORMCHECKBOX_HELPTEXT "Checkbox_HelpText" -#define ODF_FORMCHECKBOX_NAME "Checkbox_Name" #define ODF_FORMCHECKBOX_RESULT "Checkbox_Checked" #define ODF_FORMDROPDOWN u"vnd.oasis.opendocument.field.FORMDROPDOWN" diff --git a/sw/qa/extras/ooxmlexport/data/tdf151548_activeContentDemo.docm b/sw/qa/extras/ooxmlexport/data/tdf151548_activeContentDemo.docm new file mode 100644 index ..80886d864a15 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf151548_activeContentDemo.docm differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx index 20c1fc95bdde..431fdb526713 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx @@ -1070,6 +1070,18 @@ DECLARE_OOXMLEXPORT_TEST(testN820509, "n820509.docx") } } +DECLARE_OOXMLEXPORT_TEST(testTdf151548_activeContentDemo, "tdf151548_activeContentDemo.docm") +{ +SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); +SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); +IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess(); +for(auto aIter = pMarkAccess->getFieldmarksBegin(); aIter != pMarkAccess->getFieldmarksEnd(); ++aIter) +{ +const OUString sName = (*aIter)->GetName(); +CPPUNIT_ASSERT(sName == "Check1" || sName == "Text1" || sName == "Dropdown1"); +} +} + DECLARE_OOXMLEXPORT_TEST(testN830205, "n830205.docx") { // Previously import just crashed (due to infinite recursion). diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index b190bf38e581..d24f5f77393f 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2254,11 +2254,9 @@ void DocxAttributeOutput::WriteFFData( const FieldInfos& rInfos ) } else if ( rInfos.eType == ww::eFORMCHECKBOX ) { -OUString sName; +const OUString sName = params.getName(); bool bChecked = false; -params.extractParam( ODF_FORMCHECKBOX_NAME, sName ); - const sw::mark::ICheckboxFieldmark* pCheckboxFm = dynamic_cast(&rFieldmark); if ( pCheckboxFm && pCheckboxFm->IsChecked() ) bChecked = true; diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index aab719c99d7d..89eb9833491c 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -231,7 +231,6 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, OUString& rStr ) if (pFieldmark!=nullptr) { IFieldmark::parameter_map_t*
[Libreoffice-commits] core.git: offapi/com oox/source sw/inc sw/qa sw/source writerfilter/source
offapi/com/sun/star/text/ContentControl.idl |6 oox/source/token/tokens.txt |1 sw/inc/formatcontentcontrol.hxx |7 + sw/inc/unoprnms.hxx |1 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx|2 + sw/source/core/txtnode/attrcontentcontrol.cxx |2 + sw/source/core/unocore/unocontentcontrol.cxx | 28 ++ sw/source/core/unocore/unomap1.cxx|1 sw/source/filter/ww8/docxattributeoutput.cxx | 18 ++ sw/source/filter/ww8/docxattributeoutput.hxx |1 writerfilter/source/dmapper/DomainMapper.cxx | 16 writerfilter/source/dmapper/DomainMapper_Impl.cxx |6 writerfilter/source/dmapper/SdtHelper.cxx |4 +++ writerfilter/source/dmapper/SdtHelper.hxx |6 writerfilter/source/ooxml/model.xml | 12 + 15 files changed, 111 insertions(+) New commits: commit a3d79543e0221ee810e0b2dd871d2afbf5ee198b Author: offtkp AuthorDate: Wed Dec 28 00:10:34 2022 +0200 Commit: Miklos Vajna CommitDate: Tue Jan 3 08:04:12 2023 + docx: Preserve w15:appearance SdtPr attribute Now roundtrips the w15:appearance value which dictates whether there's an effect when hovering a placeholder. Change-Id: I3c911a0cfe31e235b9d981bbff0c1bb5827a85ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144845 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/offapi/com/sun/star/text/ContentControl.idl b/offapi/com/sun/star/text/ContentControl.idl index cb980a24b0ff..c2fe46757656 100644 --- a/offapi/com/sun/star/text/ContentControl.idl +++ b/offapi/com/sun/star/text/ContentControl.idl @@ -92,6 +92,12 @@ service ContentControl */ [optional, property] string Color; +/** The appearance: just remembered. + +@since LibreOffice 7.5 +*/ +[optional, property] string Appearance; + /** Combo box that allows free-form text as well, i.e. not dropdown. @since LibreOffice 7.5 diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt index b66321243320..25951891d2a7 100644 --- a/oox/source/token/tokens.txt +++ b/oox/source/token/tokens.txt @@ -600,6 +600,7 @@ anyType anyURI appName appWorkspace +appearance apples applyAlignment applyAlignmentFormats diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx index 889faeb89a07..c27253a5aab8 100644 --- a/sw/inc/formatcontentcontrol.hxx +++ b/sw/inc/formatcontentcontrol.hxx @@ -170,6 +170,9 @@ class SW_DLLPUBLIC SwContentControl : public sw::BroadcastingModify /// The color: just remembered. OUString m_aColor; +/// The appearance: just remembered. +OUString m_aAppearance; + /// The alias: just remembered. OUString m_aAlias; @@ -353,6 +356,10 @@ public: const OUString& GetColor() const { return m_aColor; } +void SetAppearance(const OUString& rAppearance) { m_aAppearance = rAppearance; } + +const OUString& GetAppearance() const { return m_aAppearance; } + void SetAlias(const OUString& rAlias) { m_aAlias = rAlias; } const OUString& GetAlias() const { return m_aAlias; } diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index 17b13d02dc8e..42a38fdef0aa 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -915,6 +915,7 @@ inline constexpr OUStringLiteral UNO_NAME_DATA_BINDING_PREFIX_MAPPINGS inline constexpr OUStringLiteral UNO_NAME_DATA_BINDING_XPATH = u"DataBindingXpath"; inline constexpr OUStringLiteral UNO_NAME_DATA_BINDING_STORE_ITEM_ID = u"DataBindingStoreItemID"; inline constexpr OUStringLiteral UNO_NAME_COLOR = u"Color"; +inline constexpr OUStringLiteral UNO_NAME_APPEARANCE = u"Appearance"; inline constexpr OUStringLiteral UNO_NAME_ALIAS = u"Alias"; inline constexpr OUStringLiteral UNO_NAME_TAG = u"Tag"; inline constexpr OUStringLiteral UNO_NAME_ID = u"Id"; diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx index f3188551362a..86673055a0cd 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx @@ -421,6 +421,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDateContentControlExport) xContentControlProps->setPropertyValue("DataBindingXpath", uno::Any(OUString("/ns0:employees[1]/ns0:employee[1]/ns0:hireDate[1]"))); xContentControlProps->setPropertyValue("DataBindingStoreItemID", uno::Any(OUString("{241A8A02-7FFD-488D-8827-63FBE74E8BC9}"))); xContentControlProps->setPropertyValue("Color", uno::Any(OUString("008000"))); +xContentControlProps->setPropertyValue("Appearance", uno::Any(OUString("hidden"))); xContentControlProps->setPropertyValue("Alias", uno::Any(OUString("myalias"))); xContentControlProps->setPropertyValue("Tag", uno::Any(OUString("mytag"))); xContentControlProps->setPropertyValue("Id", uno