summaryrefslogtreecommitdiff
path: root/sw/inc/docstyle.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-18 09:48:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-18 13:32:51 +0200
commitaf8bf1b96ac1d994fd0376cc1047febf29c0c33f (patch)
tree3e80160cd8239745c601cb7969506679b9ce01b4 /sw/inc/docstyle.hxx
parent4ba3abf003c195831c7100a89762e501b99888ff (diff)
remove translation from SfxStyleFamily to char
which seems unnecessary and just makes the code harder to read. This goes as far back as the 2001 "initial import" commit Change-Id: If98ce4da15e57ead9714a0796bfd8c182b9ca49a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117407 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc/docstyle.hxx')
-rw-r--r--sw/inc/docstyle.hxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index 0413fef7917c..049070da9c65 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -115,7 +115,7 @@ public:
/** Preset the members without physical access.
Used by StyleSheetPool. */
void PresetName(const OUString& rName) { aName = rName; }
- void PresetNameAndFamily(char cFamily, const OUString& rName);
+ void PresetNameAndFamily(SfxStyleFamily eFamily, const OUString& rName);
void PresetParent(const OUString& rName){ aParent = rName; }
void PresetFollow(const OUString& rName){ aFollow = rName; }
@@ -143,9 +143,9 @@ public:
namespace std {
template<>
-struct hash<std::pair<char,OUString>>
+struct hash<std::pair<SfxStyleFamily,OUString>>
{
- std::size_t operator()(std::pair<char,OUString> const & pair) const
+ std::size_t operator()(std::pair<SfxStyleFamily,OUString> const & pair) const
{ return static_cast<std::size_t>(pair.first) ^ std::size_t(pair.second.hashCode()); }
};
}
@@ -157,19 +157,19 @@ class SwStyleSheetIterator final : public SfxStyleSheetIterator, public SfxListe
// Local helper class.
class SwPoolFormatList
{
- std::vector<std::pair<char, OUString>> maImpl;
- typedef std::unordered_map<std::pair<char, OUString>, sal_uInt32> UniqueHash;
+ std::vector<std::pair<SfxStyleFamily, OUString>> maImpl;
+ typedef std::unordered_map<std::pair<SfxStyleFamily, OUString>, sal_uInt32> UniqueHash;
UniqueHash maUnique;
void rehash();
public:
SwPoolFormatList() {}
- void Append( char cChar, const OUString& rStr );
+ void Append( SfxStyleFamily eFam, const OUString& rStr );
void clear() { maImpl.clear(); maUnique.clear(); }
size_t size() { return maImpl.size(); }
bool empty() { return maImpl.empty(); }
sal_uInt32 FindName(SfxStyleFamily eFam, const OUString& rName);
void RemoveName(SfxStyleFamily eFam, const OUString& rName);
- const std::pair<char,OUString> &operator[](sal_uInt32 nIdx) { return maImpl[ nIdx ]; }
+ const std::pair<SfxStyleFamily,OUString> &operator[](sal_uInt32 nIdx) { return maImpl[ nIdx ]; }
};
rtl::Reference< SwDocStyleSheet > mxIterSheet;
@@ -183,7 +183,7 @@ class SwStyleSheetIterator final : public SfxStyleSheetIterator, public SfxListe
bool bTestHidden,
bool bOnlyHidden,
SwGetPoolIdFromName nSection,
- char cType);
+ SfxStyleFamily eFamily);
public:
SwStyleSheetIterator(SwDocStyleSheetPool& rBase,