diff options
author | Sarper Akdemir <sarper.akdemir@collabora.com> | 2023-02-28 23:03:12 +0300 |
---|---|---|
committer | Sarper Akdemir <sarper.akdemir@collabora.com> | 2023-03-17 11:06:43 +0000 |
commit | f92721bf182952be88b0349a17e46b684d630c29 (patch) | |
tree | ab81cf9eaa563cd0e2e12d73e08033018079708c /svx | |
parent | 0fc4f285b2578a68e30004baafc37ea189aa8c00 (diff) |
related tdf#102261: consider ParaTabStopDefaultDistance in SvxRuler
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>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/svxruler.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index be53a0c91c58..671afa9f6737 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -1027,7 +1027,10 @@ void SvxRuler::UpdateTabs() const tools::Long lPosPixel = ConvertHPosPixel(lParaIndent) + lLastTab; const tools::Long lRightIndent = ConvertHPosPixel(nRightFrameMargin - mxParaItem->GetRight()); - tools::Long nDefTabDist = ConvertHPosPixel(lDefTabDist); + tools::Long lCurrentDefTabDist = lDefTabDist; + if(mxTabStopItem->GetDefaultDistance()) + lCurrentDefTabDist = mxTabStopItem->GetDefaultDistance(); + tools::Long nDefTabDist = ConvertHPosPixel(lCurrentDefTabDist); const sal_uInt16 nDefTabBuf = lPosPixel > lRightIndent || lLastTab > lRightIndent ? 0 @@ -1063,13 +1066,13 @@ void SvxRuler::UpdateTabs() } // Adjust to previous-to-first default tab stop - lLastTabOffsetLogic -= lLastTabOffsetLogic % lDefTabDist; + lLastTabOffsetLogic -= lLastTabOffsetLogic % lCurrentDefTabDist; // fill the rest with default Tabs for (j = 0; j < nDefTabBuf; ++j) { //simply add the default distance to the last position - lLastTabOffsetLogic += lDefTabDist; + lLastTabOffsetLogic += lCurrentDefTabDist; if (bRTL) { mpTabs[nTabCount + TAB_GAP].nPos = |