summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail..com>2019-11-18 19:43:29 -0900
committerJim Raykowski <raykowj@gmail.com>2019-11-20 22:50:33 +0100
commitb8bbe9a3ca4758102ce6aa5d1e0fbb077eedbe64 (patch)
tree676b66ecc37c7b82a4515c2983d820ce5342f758 /sw
parent1906f3f2f7c39ea9a3e04f1081dbfc24a1de3212 (diff)
tdf#128557 Add tooltips to styles lists
Change-Id: Ia8f00cd882c1c8c239b95de8e917ff317a6485e8 Reviewed-on: https://gerrit.libreoffice.org/83152 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/docstyle.hxx2
-rw-r--r--sw/inc/numrule.hxx1
-rw-r--r--sw/source/core/doc/number.cxx12
-rw-r--r--sw/source/uibase/app/docstyle.cxx5
4 files changed, 20 insertions, 0 deletions
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index 609cee5c9426..d3160b6e54a7 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -127,6 +127,8 @@ public:
virtual bool HasClearParentSupport() const override;
virtual OUString GetDescription(MapUnit eUnit) override;
+ virtual OUString GetUsedBy() override;
+
SwCharFormat* GetCharFormat();
SwTextFormatColl* GetCollection();
SwFrameFormat* GetFrameFormat();
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index 3702ce2b71bd..6152e6bee99f 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -172,6 +172,7 @@ public:
OUString MakeRefNumString( const SwNodeNum& rNodeNum,
const bool bInclSuperiorNumLabels,
const int nRestrictInclToThisLevel ) const;
+ OUString MakeParagraphStyleListString() const;
/** @return list of associated text nodes */
void GetTextNodeList( SwNumRule::tTextNodeList& rTextNodeList ) const;
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index e1a5af928d68..f57933440278 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -795,6 +795,18 @@ OUString SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum,
return aRefNumStr;
}
+OUString SwNumRule::MakeParagraphStyleListString() const
+{
+ OUString aParagraphStyleListString;
+ for (const auto& rParagraphStyle : maParagraphStyleList)
+ {
+ if (!aParagraphStyleListString.isEmpty())
+ aParagraphStyleListString += ", ";
+ aParagraphStyleListString += rParagraphStyle->GetName();
+ }
+ return aParagraphStyleListString;
+}
+
/** Copy method of SwNumRule
A kind of copy constructor, so that the num formats are attached to the
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index fae87682edf0..4326445cd8ec 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -2259,6 +2259,11 @@ bool SwDocStyleSheet::IsUsed() const
return rDoc.IsUsed( *pMod );
}
+OUString SwDocStyleSheet::GetUsedBy()
+{
+ return pNumRule ? pNumRule->MakeParagraphStyleListString() : OUString();
+}
+
sal_uLong SwDocStyleSheet::GetHelpId( OUString& rFile )
{
sal_uInt16 nId = 0;