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-28 14:54:50 +0000 |
commit | bc36476a50687a31e2934a5b52502f2f24424ce1 (patch) | |
tree | c4b195eac16204e82f43408f241f8394e9cbdf23 | |
parent | e76ac490a9dfc0ae1f6de3639179eac98ec1cb88 (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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149513
Tested-by: Sarper Akdemir <sarper.akdemir@collabora.com>
-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 = |