aboutsummaryrefslogtreecommitdiff
path: root/source/en-GB/shell
ModeNameSize
d---------source / win32 / shlxthandler32logplain
e/print_revamp'>feature/print_revamp LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/svx/source/dialog/svxruler.cxx
AgeCommit message (Collapse)Author
2024-11-28tdf#163913 Implement font-relative marginsJonathan Clark
This change adds loext:margin-left and loext:margin-right, which implement margins that support font-relative units. See tdf#36709 for additional details. Change-Id: I31b0dd2b6f98cb5b02fd4dca3608db6fdee4054c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177473 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-11-13tdf#36709 editeng: Layout for font-relative first-line indentJonathan Clark
This change extends layout for font-relative paragraph first-line indentation into Edit Engine. Change-Id: I5906f493b91fbcb87ded165709fb132b33ce1906 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176487 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-06-20svx: adjust the values for impress/draw ruler to work with LOKitTomaž Vajngerl
The values in impress/draw don't need to be converted to 100th mm as the vales are already in 100th mm. However the null offset and page size needs to be adjusted, because in impress/draw the actual document doesn't start at 0,0 but there is one document width or 1/2 document height margin to the left, right, up and down of the document. So the null offset returns the number of the document width or 1/2 document height. For LOKit the null offset needs to be subtracted. Similar needs to be done for page width and height. The page width is docuemnt width * 3 and page height is document height * 2. So to get expected numbers for LOKit, the page width needs to be divided by 3 and page height divided by 2. Change-Id: I8d5561d5273b4bbeab475565504fa64c7f882fd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168276 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 54d8c1b8f2934d6196a8b19400879fb6b67c255b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168986 Tested-by: Jenkins
2024-06-20svx: move lok's NotifyKit in the ruler to the SvxRuler super-classTomaž Vajngerl
We want to make the ruler work in other components and also not only for horizontal orientation. For this we want the NotifyKit already in the SvxRuler, which is used by all rulers. This change moves the functionality to the from SwCommentRuler to SvxRuler and partially reverts the previous attempt as changing the ruler instance for vertical ruelr to SwCommentRuler caused test failures. Change-Id: Ie618b5dc5b936f9dc53d09b624eefdbc506d98f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167740 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 9f26e04c8f97af9139e2f4be335fe6999d26a387) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168985 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-05-11loplugin:ostr in svxNoel Grandin
Change-Id: Ia765a03e033acb82e367873380d289587ea87d6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167449 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-04-25svx: Avoid divide by 0Xisco Fauli
See https://crashreport.libreoffice.org/stats/signature/SvxRuler::UpdateTabs() Change-Id: Ie08c54d1a1b40bcc42da9f81c893f496fff433a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166626 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-21Remove DeleteItemOnIdlexArmin Le Grand (allotropia)
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-07-13tdf#142808: use SvxLRSpaceItem::GetTextLeft instead of GetLeftMike Kaganski
Because we need the value without the negative (hanging) indent. Change-Id: I65f779476be5e8a57b723c289c6c3a9c75875bb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154398 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-17related tdf#102261: consider ParaTabStopDefaultDistance in SvxRulerSarper Akdemir
If there's a paragraph scoped tab default distance defined, use that as the default tab distance in the SvxRuler instead of the document wide setting. Change-Id: I9b0e7d0db0b25aee08bd27948b2e462b4a4ee496 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148060 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir@collabora.com>
2023-01-14svx: avoid divide by zero in SvxRuler::UpdateTabs()Xisco Fauli
Prevent lDefTabDist from ending up in a zero state. See https://crashreport.libreoffice.org/stats/signature/SvxRuler::UpdateTabs() Change-Id: I9335f3be12de5db4f4f0c3f434057d91f96733ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145457 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-27cid#1500455 Dereference after null checkCaolán McNamara
Change-Id: I5cbc1d182821b88514077db5ff2c436f62372bef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138923 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-16cid#1500455 Dereference after null checkCaolán McNamara
Change-Id: I2ef903eaf4df4fbd225d01e394ba11ffa43386e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138346 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-14Simplify vcl::EnglishStringToMetricStephan Bergmann
Change-Id: I10b93a073a58c175d487b7aac3a65d461974eb6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131514 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-03Recheck modules sv* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I25779cbfb1aa93c31d6e12ac95e136b3bdbbc058 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130403 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-24tdf#95882 svxruler: restore adjustment for bordersJustin Luth
This restores the clause removed from LO 3.6's commit 47a77d7dbc427e51421e2df8d59695834cb74980 Ruler: disable snapping, tooltips [Because that removal left behind dead code, which was later cleared out, of course this patch restores that as well. commit 8303e7ed668fbcbd0ba75bd9dd259f03073ffd46 Author: Noel Grandin on Fri Jun 14 10:41:11 2019 +0200 ] Basic borders on the paragraph itself do not affect where LO ends the tabstop, and thus the removal of that clause was partially justified. But the table/frame/page/headers definitely need to be adjusted in order for the tabstops to show in the correct position. RightFrameMargin needed this as well, especially now that RTL is supported by the ruler since LO 3.6, although the Left/Right functions are very different. [Frames never worked because the aCoreSet wasn't accepting RES_BOX items. Interesting error considering all of the other sections of code created a new CoreSet.] Change-Id: Ic24839dbbd730e66d8b0d588bfbd73bc7cb260bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130125 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2022-02-03tdf#125849 cannot modify the ruler unit of measure in translated UICaolán McNamara
Change-Id: Ica74dd5e55d30605ee03affa4b724ffa4ec65b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129357 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>