summaryrefslogtreecommitdiff
path: root/sw/source/ui
AgeCommit message (Collapse)AuthorFilesLines
2024-01-16cool#1770 sw: make Edit Sections dialog async and mark it a jsdialogMéven Car3-2/+11
We want our dialogs to be async so they don't lock documents when opened and to allow concurrent edition. In SwEditRegionDlg, we need to make sure the reference to the SwWrtShell isn't read from 'this' after `response()`, as it is now the dialog is disposed of earlier in the async case. How to test: Create a new Writer document, insert a section, right-click inside the section, pick the 'edit section' menu item to trigger this dialog. Change-Id: Ibafca69542f13d16beef5a8fca006428cbcfe5c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161828 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161830 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2024-01-16sw Edit Sections: hide Link section in LOK caseMéven Car1-0/+2
In the LibreOfficeKit case the section does not make sense as the application has only restricted access to files, so hide it. Test: In Writer new document, insert a section, right click on section, Edit section..., Link section is visible. In LOK case the Link section is not present. Change-Id: I7aab8b384909d25e52f5fca2bf54f86e5c662b54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161878 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit f9546a5e9e204fc058365aaddfb0dfa8f9a26418) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162130 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2024-01-13cid#1546488 COPY_INSTEAD_OF_MOVECaolán McNamara1-1/+1
Change-Id: I80b843351641e38af6b9f9d6001b89206e37991c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162024 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-12tdf#158783 Correct compares of SwTOXMark ItemsArmin Le Grand (allotropia)1-17/+20
That item was never 'pooled', so operator== was not really ever used. It just compared the 'type', so pretty many instances were assumed to be equal, what is wrong. We discussed to implement it (there is quite some content), but we came to the point that it's only safe to say instances are equal when same instance -> fallback to ptr compare. This came into play since I identified/changed many (160?) places where SfxPoolItems were ptr-compared when doing that paradigm change in Items. This leads to the two methods 'areSfxPoolItemPtrsEqual' which just makes ptr compare and 'SfxPoolItem::areSame' which also will use op==. For the initial adaption I chose the wrong function adapting places where SwTOXMark were involved. Change-Id: I7df029ad4542719681b1455de17ed5990d248395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161963 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-01-11tdf#158783 sw: add some asserts for calling SelectTextAttr() ...Michael Stahl1-0/+1
... with mismatched point node and SwTextAttr. Unfortunately SwTextAttr doesn't have a member that points to the node, just half of its subclasses do... Change-Id: I78193ac47a9287f01b236b71934053299d0ffb23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161928 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-01-08cid#1545370 COPY_INSTEAD_OF_MOVECaolán McNamara1-1/+1
and cid#1545364 COPY_INSTEAD_OF_MOVE cid#1545363 COPY_INSTEAD_OF_MOVE cid#1545344 COPY_INSTEAD_OF_MOVE cid#1545299 COPY_INSTEAD_OF_MOVE cid#1545287 COPY_INSTEAD_OF_MOVE cid#1545267 COPY_INSTEAD_OF_MOVE cid#1545256 COPY_INSTEAD_OF_MOVE cid#1545226 COPY_INSTEAD_OF_MOVE cid#1545500 COPY_INSTEAD_OF_MOVE cid#1545538 COPY_INSTEAD_OF_MOVE cid#1545618 COPY_INSTEAD_OF_MOVE cid#1545681 COPY_INSTEAD_OF_MOVE cid#1545750 COPY_INSTEAD_OF_MOVE cid#1545778 COPY_INSTEAD_OF_MOVE cid#1545785 COPY_INSTEAD_OF_MOVE cid#1545799 COPY_INSTEAD_OF_MOVE cid#1545847 COPY_INSTEAD_OF_MOVE cid#1545958 COPY_INSTEAD_OF_MOVE cid#1545963 COPY_INSTEAD_OF_MOVE cid#1545990 COPY_INSTEAD_OF_MOVE cid#1546013 COPY_INSTEAD_OF_MOVE cid#1546029 COPY_INSTEAD_OF_MOVE cid#1546079 COPY_INSTEAD_OF_MOVE cid#1546104 COPY_INSTEAD_OF_MOVE cid#1546127 COPY_INSTEAD_OF_MOVE cid#1546133 COPY_INSTEAD_OF_MOVE cid#1546155 COPY_INSTEAD_OF_MOVE cid#1546190 COPY_INSTEAD_OF_MOVE cid#1546216 COPY_INSTEAD_OF_MOVE cid#1546273 COPY_INSTEAD_OF_MOVE cid#1546315 COPY_INSTEAD_OF_MOVE cid#1546326 COPY_INSTEAD_OF_MOVE cid#1546387 COPY_INSTEAD_OF_MOVE accept some reasonable suggestions Change-Id: I7b004086d490c7618d8fe7a21a53cfa8ac1f8408 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161748 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-04tdf#155649: EDITING Writer some position parameters cannot go beyond 17 mmJulien Nabet1-3/+4
Change-Id: I70a80527dcc1c714fbe8783d1c4594bcc26b0624 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161528 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-31cid#1559993 Division or modulo by float zeroCaolán McNamara1-2/+3
Change-Id: I071d576fc998022c76364778423e0346f69cb051 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161500 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-30cid#1545965 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1545849 COPY_INSTEAD_OF_MOVE cid#1545814 COPY_INSTEAD_OF_MOVE cid#1545685 COPY_INSTEAD_OF_MOVE cid#1545583 COPY_INSTEAD_OF_MOVE cid#1545575 COPY_INSTEAD_OF_MOVE cid#1545517 COPY_INSTEAD_OF_MOVE cid#1545474 COPY_INSTEAD_OF_MOVE Change-Id: I79a47ee34dace3a4664bfece26c59e719f469cab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161448 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-28Use emplace_back instead of push_back (sw)Julien Nabet1-1/+1
Change-Id: I0a7f70ca0e5cc022425bee3661495cf1104f6521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161384 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-28Added boolean op's to SfxPoolItemHolderArmin Le Grand (allotropia)1-1/+1
...and adapted code to make use of it. This makes checking if the SfxPoolItemHolder instance contains an Item or not simpler and thus more readable, no need to access the Item* every time using getItem() - is okay, but not intuitive. Change-Id: I8042267cce670aca2641a91cd36285058f17ffbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161380 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-12-21Remove DeleteItemOnIdlexArmin Le Grand (allotropia)1-3/+3
There are some CrashReports in 7.6 which have DeleteItemOnIdle on the stack, but there is nothing reproducable. So I took a look... I first thought it's a MCGR regression, due to classes on the stack. But the Item involved is just random, can happen with any Item. Then I thought it may have to do with ITEM refactorings, but it happens with DeleteItemOnIdle involved, so also not the case. I already saw DeleteItemOnIdle when doing these and qualified as 'hack' in the way. already It is only on Windows and DeleteItemOnIdle is involved. This again (took a deeper look now) is an old hack to keep an SfxPoolItem 'alive' for some 'time'. For that, it triggers an async reschedule which then deletes the Item when being called. If the Item will be used after that is pure coincidence - seems to work in most cases. It seems as if for Windows the timing slightly changed for some scenarios, so a reschedule is too early. This can happen with this hack anytime. DeleteItemOnIdle is used in scenarios where SfxPoolItem* is e.g. returned, but is *not* anchored, so e.g. not member of an SfxItemSet. Or in short: Lifetime is not safe. DeleteItemOnIdle exists since 1st import, but was changed to AsyncEvent ca. 4 months ago (see 57145acf9ec47c23e307b7a5c0029d21d937cc35), so that may have caused it. It is possible that these errors happen on Windows since then. Before something more complicated was used to delete it late, but surely also not really safe. Due to ITEM refactor I have the knowledge/tooling to solve this. It will not be a 1-5 lines fix, but it is a hack and in the way for further ITEM refactor anyways. What we have nowadays is a SfxPoolItemHolder -> it's like an SfxItemSet for a single Item. It safely holds/ controls the lifetime of an SfxPoolItem. It is already used in quite some places. It helps to solve many hacks, also the ones putting Items directly to the Pool - due to there never was an alternative for that. In principle the ItemPool/ItemSet/Item paradigm was never complete without SfxPoolItemHolder. Thus I started to fix that (and remove that hack for good, sooo many changes over the years, sigh), but as said is not straightforward. Will have to change retvals of involved stuff to SfxPoolItemHolder - it's just two pointers and designed to be copied (one is a Pool, needed to cleanup when destructing). CopyConstruct/destroy just counts the RefCnt up/down, so cheap. 1st version compiling, let's check on gerrit... Corrected one error in QueryState for securitypage, also added some security features/asserts. Change-Id: Ida49fd35ca88ead84b11d93e18b978cb9e395090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161083 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-12-20cid#1545835 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1545830 COPY_INSTEAD_OF_MOVE cid#1545798 COPY_INSTEAD_OF_MOVE cid#1545784 COPY_INSTEAD_OF_MOVE cid#1545753 COPY_INSTEAD_OF_MOVE cid#1545752 COPY_INSTEAD_OF_MOVE cid#1545672 COPY_INSTEAD_OF_MOVE Change-Id: Iaf2f77cb27ae0ea1585416a0c500f7c50d04e3fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161007 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-18[API CHANGE] tdf#158041 Remove unused reverse printing option from swSamuel Mehrbrodt1-1/+0
Change-Id: I8b4597dbafc78e881fe556de8ce8221e50a673bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160777 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-18[API CHANGE] tdf#158041 Remove unused drawing printing option from swSamuel Mehrbrodt1-2/+1
Change-Id: I95f81f166ab9d75622c83672101925894b2f2e7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160774 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-18[API CHANGE] tdf#158041 Remove unused table printing option from swSamuel Mehrbrodt1-1/+0
"for now it was decided that tables should always be printed" -> make this decision from 2015 permanent Change-Id: Ica5958a74ec6766040ab59f2c91224b75df4d807 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160766 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-18[API CHANGE] tdf#158041 Remove unused SinglePrintJobs config option from swSamuel Mehrbrodt2-12/+0
This is handled by the print dialog directly Change-Id: Ieb4221d97444216f332501da9a3aba7dc6b8500a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160762 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-15sw floattable: disable UI to enable this when anchored inside TextBoxMiklos Vajna1-0/+30
Similar to headers or footers, shape text is another area where multi-page floating tables don't make sense, the Word UI to float a table in shape text is even disabled. Our UI to create a floating table is to select a table and then insert frame, and that already refused to make a new frame around a table to split. However, one could be creative and enable the split only later, and that was allowed. Fix the problem by extending SwFramePage::Reset(), so in case the currently selected frame is edited and it's anchored in a Word-style shape+text, then the checkbox to allow the split is hidden. This is meant to help users to not create document model that would be later problematic to export to Word formats. Change-Id: I63e981bd93fd16195ccdac2d5a5ec785e7c18b97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160814 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-12-14cid#1545734 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1545723 COPY_INSTEAD_OF_MOVE cid#1545708 COPY_INSTEAD_OF_MOVE cid#1545705 COPY_INSTEAD_OF_MOVE cid#1545684 COPY_INSTEAD_OF_MOVE cid#1545674 COPY_INSTEAD_OF_MOVE cid#1545673 COPY_INSTEAD_OF_MOVE cid#1545667 COPY_INSTEAD_OF_MOVE cid#1545661 COPY_INSTEAD_OF_MOVE cid#1545660 COPY_INSTEAD_OF_MOVE cid#1545657 COPY_INSTEAD_OF_MOVE cid#1545653 COPY_INSTEAD_OF_MOVE cid#1545636 COPY_INSTEAD_OF_MOVE cid#1545624 COPY_INSTEAD_OF_MOVE cid#1546124 COPY_INSTEAD_OF_MOVE Change-Id: I7d50594e046a022147d9ddf077b8b2d8027f9bca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160721 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-11cid#1545577 COPY_INSTEAD_OF_MOVECaolán McNamara1-1/+1
and cid#1545679 COPY_INSTEAD_OF_MOVE cid#1545691 COPY_INSTEAD_OF_MOVE cid#1545697 COPY_INSTEAD_OF_MOVE cid#1545711 COPY_INSTEAD_OF_MOVE cid#1545730 COPY_INSTEAD_OF_MOVE Change-Id: Ic0777a8ba532b00b021ffed81243505fbb7250f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160568 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1545789 COPY_INSTEAD_OF_MOVECaolán McNamara1-1/+1
and cid#1545791 COPY_INSTEAD_OF_MOVE cid#1545800 COPY_INSTEAD_OF_MOVE cid#1545806 COPY_INSTEAD_OF_MOVE cid#1545817 COPY_INSTEAD_OF_MOVE cid#1545832 COPY_INSTEAD_OF_MOVE cid#1545834 COPY_INSTEAD_OF_MOVE cid#1545841 COPY_INSTEAD_OF_MOVE cid#1545848 COPY_INSTEAD_OF_MOVE cid#1545852 COPY_INSTEAD_OF_MOVE cid#1545854 COPY_INSTEAD_OF_MOVE cid#1545864 COPY_INSTEAD_OF_MOVE cid#1545875 COPY_INSTEAD_OF_MOVE cid#1545882 COPY_INSTEAD_OF_MOVE cid#1545900 COPY_INSTEAD_OF_MOVE cid#1545901 COPY_INSTEAD_OF_MOVE cid#1545908 COPY_INSTEAD_OF_MOVE cid#1545921 COPY_INSTEAD_OF_MOVE cid#1546054 COPY_INSTEAD_OF_MOVE cid#1546145 COPY_INSTEAD_OF_MOVE cid#1546146 COPY_INSTEAD_OF_MOVE Change-Id: I8b23d0457cb293aa0e33593131224c1cdd1d8eb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160545 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1545177 COPY_INSTEAD_OF_MOVECaolán McNamara2-6/+6
and cid#1545179 COPY_INSTEAD_OF_MOVE cid#1545187 COPY_INSTEAD_OF_MOVE cid#1545188 COPY_INSTEAD_OF_MOVE cid#1545189 COPY_INSTEAD_OF_MOVE cid#1545196 COPY_INSTEAD_OF_MOVE cid#1545197 COPY_INSTEAD_OF_MOVE cid#1545204 COPY_INSTEAD_OF_MOVE cid#1545223 COPY_INSTEAD_OF_MOVE cid#1545236 COPY_INSTEAD_OF_MOVE cid#1545239 COPY_INSTEAD_OF_MOVE cid#1545253 COPY_INSTEAD_OF_MOVE cid#1545274 COPY_INSTEAD_OF_MOVE cid#1545286 COPY_INSTEAD_OF_MOVE cid#1545309 COPY_INSTEAD_OF_MOVE cid#1545311 COPY_INSTEAD_OF_MOVE cid#1545345 COPY_INSTEAD_OF_MOVE cid#1545358 COPY_INSTEAD_OF_MOVE cid#1545361 COPY_INSTEAD_OF_MOVE cid#1545365 COPY_INSTEAD_OF_MOVE cid#1545367 COPY_INSTEAD_OF_MOVE cid#1545372 COPY_INSTEAD_OF_MOVE cid#1545373 COPY_INSTEAD_OF_MOVE cid#1545377 COPY_INSTEAD_OF_MOVE cid#1545392 COPY_INSTEAD_OF_MOVE cid#1545399 COPY_INSTEAD_OF_MOVE cid#1545404 COPY_INSTEAD_OF_MOVE cid#1545408 COPY_INSTEAD_OF_MOVE cid#1545430 COPY_INSTEAD_OF_MOVE cid#1545439 COPY_INSTEAD_OF_MOVE cid#1545449 COPY_INSTEAD_OF_MOVE Change-Id: I3afe836a0bbc8bd70937035e60eb020435e413d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160539 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1546281 COPY_INSTEAD_OF_MOVECaolán McNamara1-1/+1
and cid#1546278 COPY_INSTEAD_OF_MOVE cid#1546276 COPY_INSTEAD_OF_MOVE cid#1546247 COPY_INSTEAD_OF_MOVE cid#1546244 COPY_INSTEAD_OF_MOVE cid#1546243 COPY_INSTEAD_OF_MOVE cid#1546220 COPY_INSTEAD_OF_MOVE cid#1546209 COPY_INSTEAD_OF_MOVE cid#1546207 COPY_INSTEAD_OF_MOVE cid#1546206 COPY_INSTEAD_OF_MOVE cid#1546205 COPY_INSTEAD_OF_MOVE cid#1546197 COPY_INSTEAD_OF_MOVE cid#1546180 COPY_INSTEAD_OF_MOVE cid#1546172 COPY_INSTEAD_OF_MOVE cid#1546165 COPY_INSTEAD_OF_MOVE cid#1546164 COPY_INSTEAD_OF_MOVE cid#1546158 COPY_INSTEAD_OF_MOVE cid#1546151 COPY_INSTEAD_OF_MOVE cid#1546135 COPY_INSTEAD_OF_MOVE cid#1546132 COPY_INSTEAD_OF_MOVE cid#1546129 COPY_INSTEAD_OF_MOVE cid#1546128 COPY_INSTEAD_OF_MOVE cid#1546122 COPY_INSTEAD_OF_MOVE cid#1546117 COPY_INSTEAD_OF_MOVE cid#1546113 COPY_INSTEAD_OF_MOVE cid#1546106 COPY_INSTEAD_OF_MOVE cid#1546099 COPY_INSTEAD_OF_MOVE cid#1546091 COPY_INSTEAD_OF_MOVE cid#1546085 COPY_INSTEAD_OF_MOVE cid#1546069 COPY_INSTEAD_OF_MOVE cid#1546063 COPY_INSTEAD_OF_MOVE cid#1546062 COPY_INSTEAD_OF_MOVE cid#1546058 COPY_INSTEAD_OF_MOVE cid#1546056 COPY_INSTEAD_OF_MOVE cid#1546051 COPY_INSTEAD_OF_MOVE cid#1546040 COPY_INSTEAD_OF_MOVE cid#1546030 COPY_INSTEAD_OF_MOVE cid#1546028 COPY_INSTEAD_OF_MOVE cid#1546015 COPY_INSTEAD_OF_MOVE cid#1546001 COPY_INSTEAD_OF_MOVE Change-Id: Ib954c92a300fc323b29f27880fdf8bc46ed98862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160520 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-08use same formatting for "Lines" as the other numbers in doc statisticsCaolán McNamara1-1/+2
Change-Id: I16991ceab68a33f154975e47145f50795ddfbcc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160455 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-08tdf#156379 Fix Line count width in the Properties dialogRafael Lima1-1/+5
In Writer, the "Lines" property in File - Properties - Statistics does not have enough width to handle numbers with 4 digits or more. This patch fixes the issue by adjusting the label width when it is updated. Change-Id: I1a56da106f7c80ffbbaa8bdfb93932a3974b1ee0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160367 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-04cid#1546497 COPY_INSTEAD_OF_MOVECaolán McNamara1-1/+1
Change-Id: I9bcbbdef1521dc77ccaca2734c662c12ac188b60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160272 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-01Related: tdf#158450 use SfxTabPage::GetFrameWeldCaolán McNamara1-1/+1
to get the parent window. SfxTabPage::GetDialogController returns mpImpl->mpSfxDialogController and that is set in SfxTabPage::SfxTabPage ctor with mpImpl->mpSfxDialogController = dynamic_cast<SfxOkDialogController*>(m_pDialogController); and GetDialogController returns that mpImpl->mpSfxDialogController while nearly everything is derived from OKDialogController, not everything, like this column dialog case is, so mpImpl->mpSfxDialogController is null and it all fails. This same page is inside format, page styles as "columns" but that's the usual multi-page dialog derived from SfxOkDialogController, its just this single page dialog that is different. The original idea was to wait until this parent dialog is needed to figure out what to use. We have this SfxTabPage::SetDialogController so the dialog controller and page can theoretically change after the ctor, though maybe that doesn't happen in this case. Looking at SfxTabPage::GetFrameWeld that one always returns the current parent (of m_pDialogController, not the dynamically casted mpImpl->mpSfxDialogController) so in the best choice to use in general. Change-Id: I4617212fb27fdeeb0afc41123f7bc1b73f495c32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160223 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-01tdf#158450: fix crash when picking custom colour for column separator lineJulien Nabet1-1/+1
bt: 0x00007ffeed9c4a2b in SwColumnPage::SwColumnPage(weld::Container*, weld::DialogController*, SfxItemSet const&)::$_0::operator()() const (this=0x5555574a8e38) at /home/julien/lo/libreoffice/sw/source/ui/frmdlg/column.cxx:396 396 [this]{ return GetDialogController()->getDialog(); })) 0 0x00007ffeed9c4a2b in SwColumnPage::SwColumnPage(weld::Container*, weld::DialogController*, SfxItemSet const&)::$_0::operator()() const (this=0x5555574a8e38) at /home/julien/lo/libreoffice/sw/source/ui/frmdlg/column.cxx:396 1 0x00007ffeed9c4a05 in std::__invoke_impl<weld::Dialog*, SwColumnPage::SwColumnPage(weld::Container*, weld::DialogController*, SfxItemSet const&)::$_0&>(std::__invoke_other, SwColumnPage::SwColumnPage(weld::Container*, weld::DialogController*, SfxItemSet const&)::$_0&) (__f=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:61 2 0x00007ffeed9c4985 in std::__invoke_r<weld::Window*, SwColumnPage::SwColumnPage(weld::Container*, weld::DialogController*, SfxItemSet const&)::$_0&>(SwColumnPage::SwColumnPage(weld::Container*, weld::DialogController*, SfxItemSet const&)::$_0&) (__fn=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/invoke.h:114 3 0x00007ffeed9c489d in std::_Function_handler<weld::Window* (), SwColumnPage::SwColumnPage(weld::Container*, weld::DialogController*, SfxItemSet const&)::$_0>::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:290 4 0x00007ffff1cb89e5 in std::function<weld::Window* ()>::operator()() const (this=0x5555574a8e38) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_function.h:591 5 0x00007ffff1c94604 in ColorWindow::OpenPickerClickHdl(weld::Button&) (this=0x5555574a8db0) at /home/julien/lo/libreoffice/svx/source/tbxctrls/tbcontrl.cxx:2283 6 0x00007ffff1c9356d in ColorWindow::LinkStubOpenPickerClickHdl(void*, weld::Button&) (instance=0x5555574a8db0, data=...) at /home/julien/lo/libreoffice/svx/source/tbxctrls/tbcontrl.cxx:2279 See complete bt here: https://bugs.documentfoundation.org/attachment.cgi?id=191146 Regression from: 862fd2fa19b64972247bde9b171ec828a30e1676 defer getting toplevel for color picker until we need it Change-Id: I2932281cb3b1cb510013a19f6bcf3d9f9c6cdb7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160164 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-25loplugin:fieldcast in SwOneExampleFrameNoel Grandin1-2/+3
Change-Id: Ic00ad388b2c18d90075db8e8d0d6b114ed13841a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-21tdf#158145 - UI: Part 37 - Unify lockdown behavior of Options dialogBalazs Varga1-33/+60
for Writer/Web - Table Page. Change-Id: I3a8333684d1c4bfeea869581b33354385838111f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159795 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-21tdf#158144 - UI: Part 36 - Unify lockdown behavior of Options dialogBalazs Varga1-35/+62
for Writer/Web - Print Page. Change-Id: I1fb2f52966843297fcb415c02946d7ce38097332 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159788 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-21tdf#158141 - UI: Part 34 - Unify lockdown behavior of Options dialogBalazs Varga1-13/+27
for Writer/Web - Formatting Aids Page. Change-Id: I8e67ac65add2aab50fe1db2d071ce731be80f946 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159783 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-21tdf#158140 - UI: Part 33 - Unify lockdown behavior of Options dialogBalazs Varga1-9/+27
for Writer/Web - View Page. Change-Id: Idcd271493461bbd7a945e0ad5484715279a19c98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159780 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-21tdf#115871 - Reset outline and list options to parent settingsAndreas Heinisch1-1/+5
Added the various items of the controls in the outline and list options tab to the range container. Otherwise, the main dialog does not have any knowledge about the options to reset to the parent settings. Change-Id: Icc9f862e741eb0457cfb1c74e64324809c143ab3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159787 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-11-21tdf#158137 - UI: Part 32 - Unify lockdown behavior of Options dialogBalazs Varga1-8/+77
for Writer - Mail Merge, Email Page. Change-Id: Ibd484a4ae815ad94dd6c418fbe66901a9b84c7fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159741 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-20tdf#158136 - UI: Part 31 - Unify lockdown behavior of Options dialogBalazs Varga1-1/+502
for Writer - AutoCaption Page. Change-Id: Ia3c37510477542556c3302d2013fe10a4ae00545 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159594 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-20c++20: use std::erase(_if) instead of std::remove(_if)+erase (sw)Julien Nabet2-4/+2
Change-Id: I67c231441b56f05da001beab5b893bc6a6a6a392 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159704 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-19Extended loplugin:ostr: swStephan Bergmann1-28/+28
Change-Id: I210f61f6d90776b086b7058fb1a831d235699fb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159670 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-17tdf#158135 - UI: Part 30 - Unify lockdown behavior of Options dialogBalazs Varga1-1/+17
for Writer - Compatibility Page. Change-Id: Id9ad445b451b332314f72f54e183730097584a74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159513 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-14tdf#158134 - UI: Part 29 - Unify lockdown behavior of Options dialogBalazs Varga1-0/+31
for Writer - Comparison Page. Change-Id: I33cfb499bf9026db1e2b8a359ad619c760e09abe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159420 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-14tdf#158133 - UI: Part 28 - Unify lockdown behavior of Options dialogBalazs Varga1-0/+24
for Writer - Changes Page. Change-Id: I1cb26c6387c9483b6c99fa800a7d7c0529456cd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159414 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-14tdf#158131 - UI: Part 27 - Unify lockdown behavior of Options dialogBalazs Varga1-3/+56
for Writer - Table Page. Change-Id: Ic2fbec7dd5520a48bb1b6bf85a2277268cf36611 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159405 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-14loplugin:unusedfieldsNoel Grandin1-1/+0
Change-Id: I5869e9974c37b1b525d316367f1dc5051d8aa197 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159404 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-14tdf#158130 - UI: Part 26 - Unify lockdown behavior of Options dialogBalazs Varga1-1/+64
for Writer - Print Page. Change-Id: Id6bc4da75cba3daf83a9709233eaafea372bb600 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159392 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-14tdf#158010 - UI: Part 25 - Unify lockdown behavior of Options dialogBalazs Varga1-0/+49
for Writer - Basic Fonts Page. Change-Id: I73276c0bf3dc190098781e427cf32c753aae23ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159377 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-13tdf#135266 - Remember last used entry level depending on the index typeAndreas Heinisch1-1/+15
Change-Id: I4fe9342c28fc9135b73286e67464b16a1d910a9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159217 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-11-13don't need this in the endCaolán McNamara1-1/+0
Change-Id: Iebb5131209c289bd797682c8f79d925449b551e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159350 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-13tdf#158009 - UI: Part 24 - Unify lockdown behavior of Options dialogBalazs Varga1-0/+57
for Writer - Format Aids Page. Change-Id: Ia51094f86c47d154ec6e8b4d961a9db6a5005a03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159305 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-12tdf#158171: fix crash when double-clicking DeepL translation dialog OK buttonJulien Nabet1-0/+3
Change-Id: I4954357c59c7134d882fb19e9949ecbd5d60345a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159322 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-10sw floattable, insert UI: default to at-char for non-split flysMiklos Vajna1-1/+0
Inserting new images defaulted to the at-char anchor type, but inserting a new frame defaulted to at-para, which is inconsistent. This is now more visible, since LOK exposes the insert frame dialog. An additional problem is that the LOK case hides anything other than at-char and as-char in the frame properties dialog since commit 4154d281fbecaadf6cd118c00cc6cff929e339a4 (sw lok: hide UI to set Word-incompatible anchor types, 2019-07-05), which was intended for images, but also affects text frames as well. But floating tables want to-para anchored frames to be able to split. Fix the problem by defaulting to at-char anchoring, unless we deal with floating tables. And show the to-para anchor widget in the LOK case again, given that all of to-para, to-char and as-char have their use-cases, even when editing Word documents. Change-Id: I89b0973183a750d86f56e0cccd7b0fbcb3dc070d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159261 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins