summaryrefslogtreecommitdiff
path: root/include/editeng
diff options
context:
space:
mode:
authorSarper Akdemir <sarper.akdemir@collabora.com>2023-02-28 16:13:48 +0300
committerMiklos Vajna <vmiklos@collabora.com>2023-03-16 11:20:48 +0000
commitcced51a1ed7c140276aabfe857510afb974fcef5 (patch)
treee0721ef743caec53daeb3a0d116c6ccb9a00c8fa /include/editeng
parent910226f2916b271a496daa6920843bf8d82238a6 (diff)
tdf#102261: introduce editeng paragraph tab stop default distance
Adds mnDefaultDistance to SvxTabStopItem that if defined will set a paragraph wide tab stop default distance and override the document wide setting. Also makes editeng consider mnDefaultDistance while getting tab stop default distance. Change-Id: I0fa098f874d6b9c91ddbaa2634224ff55cafcc95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148058 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include/editeng')
-rw-r--r--include/editeng/memberids.h1
-rw-r--r--include/editeng/tstpitem.hxx3
-rw-r--r--include/editeng/unoprnms.hxx1
-rw-r--r--include/editeng/unotext.hxx1
4 files changed, 6 insertions, 0 deletions
diff --git a/include/editeng/memberids.h b/include/editeng/memberids.h
index 6003ce394ba0..0db3c27d0128 100644
--- a/include/editeng/memberids.h
+++ b/include/editeng/memberids.h
@@ -40,6 +40,7 @@
// SvxTabStop
#define MID_TABSTOPS 0
#define MID_STD_TAB 1
+#define MID_TABSTOP_DEFAULT_DISTANCE 2
//SvxHyphenZoneItem
#define MID_IS_HYPHEN 0
diff --git a/include/editeng/tstpitem.hxx b/include/editeng/tstpitem.hxx
index b5aab04bc92d..4c015d6677ec 100644
--- a/include/editeng/tstpitem.hxx
+++ b/include/editeng/tstpitem.hxx
@@ -92,6 +92,7 @@ typedef o3tl::sorted_vector<SvxTabStop> SvxTabStopArr;
class EDITENG_DLLPUBLIC SvxTabStopItem final : public SfxPoolItem
{
SvxTabStopArr maTabStops;
+ sal_Int32 mnDefaultDistance = 0;
public:
static SfxPoolItem* CreateDefault();
@@ -107,6 +108,8 @@ public:
// Returns index of the tab at nPos, or TAB_NOTFOUND
sal_uInt16 GetPos( const sal_Int32 nPos ) const;
+ void SetDefaultDistance(sal_Int32 nDefaultDistancenDefTabSize);
+ sal_Int32 GetDefaultDistance() const;
// unprivatized:
sal_uInt16 Count() const { return maTabStops.size(); }
diff --git a/include/editeng/unoprnms.hxx b/include/editeng/unoprnms.hxx
index 300a0a2b7765..a321e54e5a73 100644
--- a/include/editeng/unoprnms.hxx
+++ b/include/editeng/unoprnms.hxx
@@ -295,6 +295,7 @@ inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_LMARGIN = u"ParaLeftMargin";
inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_LINESPACING = u"ParaLineSpacing";
inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_RMARGIN = u"ParaRightMargin";
inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_TAPSTOPS = u"ParaTabStops";
+inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_TABSTOP_DEFAULT_DISTANCE = u"ParaTabStopDefaultDistance";
inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_TMARGIN = u"ParaTopMargin";
inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_IS_HYPHEN = u"ParaIsHyphenation";
inline constexpr OUStringLiteral UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION = u"ParaIsHangingPunctuation";
diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx
index dec8c4cc50a5..5231219b5a1a 100644
--- a/include/editeng/unotext.hxx
+++ b/include/editeng/unotext.hxx
@@ -147,6 +147,7 @@ struct SfxItemPropertyMapEntry;
{ UNO_NAME_EDIT_PARA_LINESPACING, EE_PARA_SBL, cppu::UnoType<css::style::LineSpacing>::get(), 0, CONVERT_TWIPS}, \
{ UNO_NAME_EDIT_PARA_RMARGIN, EE_PARA_LRSPACE, ::cppu::UnoType<sal_Int32>::get(), 0, MID_R_MARGIN, PropertyMoreFlags::METRIC_ITEM }, \
{ UNO_NAME_EDIT_PARA_TAPSTOPS, EE_PARA_TABS, cppu::UnoType<css::uno::Sequence< css::style::TabStop >>::get(), 0, 0 }, \
+ { UNO_NAME_EDIT_PARA_TABSTOP_DEFAULT_DISTANCE, EE_PARA_TABS, ::cppu::UnoType<sal_Int32>::get(), 0, MID_TABSTOP_DEFAULT_DISTANCE }, \
{ UNO_NAME_EDIT_PARA_TMARGIN, EE_PARA_ULSPACE, ::cppu::UnoType<sal_Int32>::get(), 0, MID_UP_MARGIN, PropertyMoreFlags::METRIC_ITEM },\
{ UNO_NAME_EDIT_PARA_FIRST_LINE_INDENT, EE_PARA_LRSPACE, ::cppu::UnoType<sal_Int32>::get(), 0, MID_FIRST_LINE_INDENT, PropertyMoreFlags::METRIC_ITEM}, \
{ UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION,EE_PARA_HANGINGPUNCTUATION, cppu::UnoType<bool>::get(), 0 ,0 }, \