summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2022-11-15tdf#151548 vba FormFields: Add basic word::XDropDown supportJustin Luth
make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba This now allows MS Word Basic legacy list box form fields to be controlled by VBA basic. -allows getting and setting the text string/list entry -allows adding and deleting list entries Change-Id: Ia772c62395c40a6aa0afae2549f15f4ea3304dbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142396 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-11-15sw: document SwShellCursorMiklos Vajna
I.e. SwShellCursor is a cursor, while SwCursorShell is a base class of the edit shell/UI. Change-Id: I28e10360b2ef67ad599ec696a57f7bb30eabd33c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142719 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-11-15sw: Run a11y check for all content nodesTomaž Vajngerl
Change-Id: Icc3ff1be31a01b22242c48dec6d830e645ecb310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141784 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-11-15sw: add accessibility check statusbar controlTomaž Vajngerl
A11y check statusbar control, which reports the current status of the online a11y check. Change-Id: I07528f39ed84136f99bc1ce07c10aa6163649305 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141605 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-11-15sw: add online accessibility check implementationTomaž Vajngerl
Change-Id: Ic68aa91b1cbf23ac305ad4e361c56b91556757ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141604 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-11-14ww8import: 0 is a valid ODF_FORMDROPDOWN_RESULTJustin Luth
The correct response when there are no choices is to erase ODF_FORMDROPDOWN_RESULT. 0 points to the first entry in the list, so it is invalid to suggest that such an entry exists when it doesn't. Change-Id: I4cb20428c7448a24ae8801e15407d478286a96e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142409 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
2022-11-14sw: add new FieldType parameter for the .uno:TextFormField commandMiklos Vajna
Currently LOK clients can't insert fieldmarks which are comparable to the ones Zotero's Word extension inserts into DOCX files. There is already a .uno:TextFormField UNO command to insert fieldmarks, but it has a hardcoded field type set to ODF_FORMTEXT, which is not what we need. Fix this by adding a new, optional FieldType parameter to the existing UNO command. The field code/command and the result is not yet possible to customize. Change-Id: I5625858af950f718220eebeef8fb90267693db7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142709 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-14tdf#147802 don't trigger fade timer already shown/hiddenCaolán McNamara
once they widgets are created and hidden, they are getting triggered to update contents on pretty much all layout/draw events even though they are already in the visibility state they are asked to enter. Change-Id: I6078a5f322c88f0380ac42537b4921af1c56add5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142708 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-14sw: prefix members of SwAddStylesDlg_Impl, SwAutoMarkDlg_Impl, ...Miklos Vajna
... SwFramePage and SwWrapTabPage See tdf#94879 for motivation. Change-Id: I6f15fee117b9c05aeae7dfbb0b49c30d49018d49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142667 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-14tdf#152012 Fix assert fail on opening date pickerHossein
This patch fixes tdf#152012 which caused an assertion failure on opening date picker field in a DOCX file The assertion was: include/o3tl/span.hxx:83: constexpr o3tl::span<T>::value_type& o3tl:: span<T>::operator[](o3tl::span<T>::size_type) const [with T = const int; o3tl::span<T>::reference = const int&; o3tl::span<T>::size_type = long unsigned int]: Assertion `pos < size()' failed. And the backtrace was: 1 __pthread_kill_implementation pthread_kill.c:44 2 __pthread_kill_internal pthread_kill.c:78 3 __GI___pthread_kill pthread_kill.c:89 4 __GI_raise raise.c:26 5 __GI_abort abort.c:79 6 __assert_fail_base assert.c:92 7 __GI___assert_fail assert.c:101 8 o3tl::span<int const>::operator[] span.hxx:83 9 OutputDevice::ImplLayout text.cxx:1396 10 OutputDevice::DrawTextArray text.cxx:948 11 Calendar::ImplDraw calendar.cxx:71 12 Calendar::Paint calendar.cxx:1133 The problem was caused by an out of bound access to a vector of integers which was created for rendering calendar header consisting of the first letters of 7 days of week, when you clicked on the down arrow on the date field. The function OutputDevice::DrawTextArray() takes an 'rStr' string to draw, and 'pDXAry' array for the exact position of the the individual characters. It also takes 'nIndex' as the first index, and 'nLen' as the length of the array. 'nLen' has the default value of -1. In this case, the length is calculated from the size of the string passed to the function. This works well if the one who uses the function makes sure that the size of the array and the length of string are equal. Previously, for the 7 days of the week, a 7 letter string "smtwtfs" (depending on the week start day this can be different, but length is always 7) was sent to this method without providing the length, thus the string length: 7 was used. In this case, positions of the letters were calculated and used from other array named mnDayOfWeekAry[7]. mnDayOfWeekAry[k+1] was used as the position of letter k (k=0..5). In this case, there was 7 letters for 7 days, and only 6 positions provided by the array. This caused assertion failure in span.hxx:83 when trying to accesss mnDayOfWeekAry[7] via o3tl::span<T>::operator[]. Value of mnDayOfWeekAry[0] was used in other calculations, therefore to fix this problem, mnDayOfWeekAry was extended from 7 to 8, and the last position was set to the end of drawing rectangle. The other thing that is done in this patch to avoid this problem in the future is removing the default value from the function prototype, so that the use should always be done by providing the length of array and starting index. After removing these defaults, it became necessary to provide empty arrays for 'pKashidaAry' which provides the kashida positions, if needed. With this fix in place, the assertion failure no longer happens. A UI test is added to make sure the crash will not happen again. The test can be run by invoking: cd sw && make -srj1 UITest_writer_tests5 \ UITEST_TEST_NAME="DateFormFieldPropertiesDialog.dateFormFieldDialog.test_date_picker_drop_down" \ SAL_USE_VCLPLUGIN=gen Change-Id: I347afb358fbc4956524f7f0a0abc3a221bf42992 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142642 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-14tdf#151548 vba FormFields: Add basic word::XTextInput supportJustin Luth
make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba This now allows MS Word Basic legacy text form fields to be controlled by VBA basic. -allows getting and setting the text string Change-Id: Ib4601d4e087233a3db257728374b362bb34d1ecb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142262 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-11-14tdf#151993 DOCX import: convert decimal comma only if neededLászló Németh
E.g. convert en_US document with decimal comma, but not de_DE document with decimal comma. Regression from commit 94bf4908a6661101c270ef647e33dde09f16ac08 "tdf#148799 DOCX import: fix invalid formulas with comma". DOCX allows to set decimal symbol independently from the locale of the document, so if the DOCX document uses comma, but its locale ("language") has got a default decimal point in Writer, Writer formulas must contain decimal points instead of commas, otherwise automatic update of the formulas, e.g. moving text cursor in the table, results ** Expression is faulty ** instead of the recalculated value. The only way to get standard Writer formulas is to replace the commas with points in numbers in writerfilter, if document language has a default decimal point in Writer. Note: not only document language, but area setting of LibreOffice installation modifies formula handling. I.e. plain numbers recognized with comma only if area setting is modified to a language, which uses decimal comma (but formulas still need decimal points, if the language of the document is a locale with default decimal point). E.g. an en_US DOCX document with decimal comma, or a de_DE document with decimal comma loaded correctly now, but recognizing cell content with a single number with comma needs to set also the correct area setting. Change-Id: I16dba1e10bf4271a44c435b5b09345d8d698b91d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142611 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2022-11-14tdf#151605 Add option to not include hidden text in ASCII filterSamuel Mehrbrodt
When setting this option, hidden text will not get exported/copied to clipboard. Change-Id: Id31aafc28ffb61a81bdc1412892f9e7997512f58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141551 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-11-14tdf#115007 tdf#148672 bump libnumbertext 1.0.11László Németh
tdf#115007 fix missing currency of en-BZ, en-DK, en-IL, en-LK, en-ZM, en-ZW; es-PA, es-SV, es-VE; and ga (Irish). tdf#148672 fix of transliteration of parenthesized words of hu-Hung. – remove EmptyString.patch1 wich was merged up-stream; – add test for hu_Hung transliteration of parenthesized words; – add new Persian (Farsi) module; – fixes for Czech, English, Irish, Romanian, Russian, Slovenian, Spanish and Ukrainian. Follow-up to commit 2a1d2d42af7f365330479f4032ddfdd9eeba7c1d "tdf#115007 add NatNum12 number format list items, fix title case". Change-Id: I24aa32ad28c853e4c97a10dc8039ca6232eaed4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142657 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2022-11-14tdf#151912: sw: suppress exceptions during SDT evluationVasily Melenchuk
Failure in XPath processing during retrieving fresh value from data source is not a critical problem and should not cancel document loading. Just put warning in log and continue to eval further. Change-Id: I76ecf0e0e227f46a270db3e77d86c19f7e9ad21a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142428 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
2022-11-14sw: refactor to make a11y check for nodes independentTomaž Vajngerl
Add checkNodes, which will only check the current node for a11y issues. This prepares for online a11y check. Change-Id: I069cd200ceb58223b05baaafb7d796148e28398b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141603 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-11-12Resolves: tdf#145648 use the same reference device for comments as documentCaolán McNamara
so we get the same text measurements and so positioning matches. Change-Id: I7b3211cbd8eba41269688316d74a8f72ac734f13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142603 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-12tdf#151988: Enable "Characters per line" and "Character width" when switch...Kevin Suo
... back to grid type "lines and characters". Also enable "Snap to characters" for grid type "lines and characters" and disbale it for grid types "lines only" and "no grid". Change-Id: I101c8d80a79798fc6c992da766c658c3ba8802dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142513 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-11move password handling from SwModelTestBase to UnoApiTestXisco Fauli
so other places inheriting from UnoApiTest can also import/export protected documents Change-Id: I0e2716204dbb171c9e17e3939b266977e1b96dda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142592 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-11SwModelTestBase: get rid of getSwXTextDocumentXisco Fauli
no much value in having it around Change-Id: I864f039c0129a922c8d86b5db0a18158f2155add Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142588 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-11SwModelTestBase: use createSwDoc everywhereXisco Fauli
In order to unify the code Also call getSwDoc only when it's needed so move it outside createSwDoc Change-Id: I082d46108581e8f2e2e430e854980035f471ceac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142586 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-11cid#1516788 Uninitialized pointer fieldCaolán McNamara
Change-Id: I9565a995aa400fd391de70606b59c16e68a042c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142584 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-11SwModelTestBase: Check supportsServiceXisco Fauli
Also simplify code a bit Change-Id: I93b277116cd21f9e7e058fdf31e0defab8247f13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142581 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-11uiwriter7: simplify codeXisco Fauli
kudos to Mike Kaganski Change-Id: Ic10f794d09b882da95958ad42f3a02aaabbbe1f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142583 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-11Clean up some seeming copy/paste mistakesStephan Bergmann
...all introduced with 2a26f136a36791c06caa895d5a25f4633fd10651 "tdf#151548 vba FormFields: Add basic word::XFormField support": For the SwVbaFormField ctor, std::move of a const lvalue has no effect here. (And I just don't bother applying the move-from-pass-by-value-param optimization here.) For FormFieldCollectionHelper, consistently make the data members non-const (a const css::uno::Reference wouldn't make that much sense anyway, as it doesn't transitively apply const'ness also to the referenced object) and non-reference, and make the FormFieldCollectionHelper params non-const (and non-reference) to make the move-from-pass-by-value-param optimization actually work here. (I came across this code with an upcoming loplugin:constmove that flags suspicious uses of std::move involving const-qualified types.) Change-Id: Ib41d4671b33871eddff41bc20ea38de02d616046 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142568 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-11tdf#151980 sw content controls: fix RTL render of dropdownsMiklos Vajna
- check if this widget is meant to be RTL in SwSelPaintRects::HighlightContentControl() - route RTLness to the underlying tree view / drop-down in SwDropDownContentControlButton::InitDropdown() - fix up SwContentControlButton (positioning, rendering, hit testing) to assume the button on the left of the first text portion in the RTL case Change-Id: I637ee8f08311e1273f8b19ddf3ab572af839760b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142577 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-11CppunitTest_sw_ooxmlexport10: use more SwParaPortion::dumpAsXml()Miklos Vajna
See commit feeed3e762cf077fbd9cf48f82e949365108ccc1 (CppunitTest_sw_layoutwriter: avoid some a11y-based layout testing, 2022-04-07) for motivation. Change-Id: I3b33e6db9dca96cdeee3a569f7c5054132c4e02e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142569 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-11tdf#151548 vba FormFields: Add basic word::XCheckBox supportJustin Luth
make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba This now allows MS Word Basic legacy checkbox form fields to be controlled by VBA basic. -allows getting and setting the checkbox value TODO: -wire up entry and exit macros -wire up StarBASIC support (hmm, how would that be different?) -probably completely ignore this. formfields hidden from normal writer - only activeX and content controls shown. -setup tri-state for checkboxes: with a separate default value Change-Id: Ied47a507dd9acc2c8dfd1472e6704e9dd571b480 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142253 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-11-11SwModelTestBase: remove duplicated methodXisco Fauli
Change-Id: I343fe2711e232ffbdec13f0072ee31a7549f7da8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142546 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-11Fix code block indent in SwTextGridPage::PutGridItemKevin Suo
Use 4 spaces rather than 8. Change-Id: Ifdd72168c8ee7ec9b861f2e0ff24961f92747136 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142509 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-11-11tdf#151979: fix crash in Text Grid dialog when switching active viewKevin Suo
GetActiveView() may return a nullptr when previously we are in Calc window and then click the controls on the writer dialog. Change-Id: Ia4dcd58b19c40a3e6cd0a791b7645d5fd2dcb9f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142508 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-11-10Revert "tdf#126788 remove weak m_wThis reference"Noel Grandin
Causes race condition And add comment so I don't have think through this again. This reverts commit 2ae53eb5dcbe0a3c5b4dc5323639a11878a38101. Change-Id: Id18a7313e363a4ce4930b01fc760a3746b35a711 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142548 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-10SwModelTestBase: use exisiting createSwDocXisco Fauli
Change-Id: Ic55c245482d93f5ec26c90ca41fac29332bd807a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142549 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-10private field 'm_xModel' is not used [-Werror,-Wunused-private-field]Noel Grandin
ever since commit 2a26f136a36791c06caa895d5a25f4633fd10651 Author: Justin Luth <justin.luth@collabora.com> Date: Wed Nov 9 17:02:03 2022 -0500 tdf#151548 vba FormFields: Add basic word::XFormField support Plus, this code is std::move'ing a value into a "&" field, which is very wrong Change-Id: Ia8bbf6e0eaa524ca0f5bbf7624f4b9555920f993 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142545 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-11-10Fix typoAndrea Gelmini
Change-Id: Ie5d81113eaf4b5103d685f4273f4b4942468f067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142506 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-11-10sw content controls: drop not needed XServiceInfo implMiklos Vajna
As noted in <https://gerrit.libreoffice.org/c/core/+/142454/3#message-18fe8bb36fc24d317ad16dd25e236ed51c88a910>, introducing a dedicated css.text.ContentControls service is actually not needed and client code should be fine with just an "anonymous" object returned by getContentControls() + implementing XIndexAccess. Remove it before somebody starts to depend on it. Let's rather have a bit of inconsistency (e.g. SwXFootnotes implements XServiceInfo, while SwXContentControls not) than an XServiceInfo implementation that we'll have to support from now on, without a user. Change-Id: Ifde4fb6bcafdffabb189447415b89b01c9675296 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142511 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-10tdf#151548 vba FormFields: Add basic word::XFormField supportJustin Luth
Unit tests will come in the following commits that represent actual FormFields that have content/results. This lays the foundation for adding Checkboxes, Textinputs, and Dropdowns. Change-Id: If85ae25f881198d5a0699b3350a7eb20b1735c45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142507 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-11-10Avoid double conversionMike Kaganski
The division of twips by 56.7, that produces ~millimeters, appeared in commit 8fd87a90a5ebcc9d8c4ddc7ece6d20debd58e801 (cjk-character-units-imp.diff: add a new unit 'character unit', Mon Sep 13 14:37:51 2010 +0200). committer Cédric Bosdonnat <cedricbosdo@openoffice.org> Mon Sep 13 15:40:35 2010 +0200 tree 96c24aabf9ef9aeed4af9920b4283ce2b6edba4c parent 1f578e21a92b3532ddfd8e0fd007a7ec6b2ee240 [diff] Change-Id: I1f311d979613c3f4e06110739e6c1823891e7e13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142510 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-09a11y: Add check for tabs used for formattingParis Oplopoios
Add accessibility check and relevant test for a document that uses tabs for formatting Useful to detect fake tables made of tabs Change-Id: Ief765f25c8dc67405d0671e257cf0ba7aec9f16c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141732 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-11-09tdf#151544: Page grid: ruby height should be zero when not in square page modeKevin Suo
Ruby height is used to show the ruby line in square page mode only (e.g. to show the Pinyin etc above or below base line). When not in square page mode (i.e., when in normal mode), the ruby height should be zero. The code was trying to set the ruby height to zero by using the following: m_xRubySizeMF->set_value(0, FieldUnit::TWIP); and then pass this to aGridItem.SetRubyHeight in SwTextGridPage::PutGridItem. However, there seems to be always a conversion loss, thus each line will have a tiny ruby height, which makes the vertical space not enough to hold the desired number of lines on the page. Fix this by setting ruby height to zero directly in SwTextGridPage::PutGridItem if we are not in square page mode. Change-Id: I24a74b96c12eb58e46e163e2a9c73b540023ab39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142243 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-09UnoApiTest: factor out common codeXisco Fauli
Change-Id: I1d84d8c1e371016a4f4f068af1e9c76635f28cf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142490 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-09sw content controls: allow no list items in a dropdownMiklos Vajna
- Replace SwContentControl::HasListItems(), which assumed that the type is dropdown if we have list items. This is not valid, it's OK to have a dropdown with no list items. Add a GetDropDown() instead to check for the type, explicitly. - UNO API sets the dropdown bit when list items are set and the type is not expilcitly combo box or drop down, to keep backwards compatibility with existing documents. - No change to the edit shell, SwDropDownContentControlButton already checked if items are empty and used STR_DROP_DOWN_EMPTY_LIST in that case, but that was dead code previously. - ODT & DOCX filters are now updated, ODF has a new <loext:content-control loext:dropdown="..."> attribute to specify that the type is a dropdown, explicitly. Change-Id: Id577ba9639151549a8f953aab31685a73a898504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142491 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-09tdf#148799 DOCX import: fix invalid formulas with commaLászló Németh
Writer formulas must contain decimal points instead of commas, otherwise automatic update of the formulas, e.g. moving text cursor in the table, results ** Expression is faulty ** instead of the recalculated value. The only way to get standard Writer formulas is to replace the commas with points in numbers in writerfilter. Note: only formula cells support comma localization, but not formula fields yet, so the recalculated values show decimal point instead of decimal comma. Follow-up to commit 1abf4e6d07ca0ac31bc54f812df84efc82d2af1b "DOCX import: don't throw away cached value of SwHiddenTextField ...", see also tdf#136106. Change-Id: Id5e6dc2b87afc4e8fda0d5c4347ba7942a8989b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142488 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-11-09ofz#53154 TimeoutCaolán McNamara
Change-Id: Ibfd62447eb544f243b9917e20049ca1d06fbb0f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142476 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-09SwModelTestBase: inherit from UnoApiXmlTestXisco Fauli
it seems setUp/tearDown can also go as well. See the discussion in gerrit. Change-Id: I5e81dcdcb2e070eb4beb737f3cb25c86cb9d042b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142465 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-09SwModelTestBase: remove more duplicated codeXisco Fauli
Change-Id: Idf29e7202e777c1fe673f6fdc4f70ff1c2b3b469 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142466 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-09CppunitTest_sw_ww8export4: remove not needed mustTestImportOf()Miklos Vajna
Input was always DOC, so no need to filter out non-DOC. And if there will be a non-DOC, we can use CPPUNIT_TEST_FIXTURE(). Change-Id: I74d20b750e1ebe3449f1454b8772fae691bf78e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142467 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-11-08swmodeltestbase: Do not use a default parameter in parseExportXisco Fauli
For better readibility and to help to remove duplicated code in following commits Change-Id: I90745c54492544757e2174412bbb2f16d422a89c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142463 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-08sw: introduce an UNO manager for content controlsMiklos Vajna
This builds on top of commit ad950f10dc382ea169f94a0c301ca8c424e7103e (sw: introduce a manager for content controls, 2022-11-08) and exposes it on the UNO API: - add a new css.text.ContentControls service, backed by SwContentControlManager - add a new css.text.XContentControlsSupplier interface, implemented by SwXTextDocument - implement XIndexAccess in ContentControls This allows UNO (and later VBA) clients to have random access to the content controls in a document, which is much easier than the relatively complex traversal of the whole doc model. Change-Id: I26240c9ddbd06f4f57f5f65460ef75a2ace94825 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142454 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-08swmodeltestbase: remove duplicated codeXisco Fauli
Change-Id: Icc577cc50248cc8310262a09af5769faea1662b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142460 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>