diff options
Diffstat (limited to 'sc/source/ui/unoobj/cellsuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 45df3be40ddc..8696bda0a8ff 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -138,6 +138,8 @@ using namespace com::sun::star; +namespace { + class ScNamedEntry { OUString aName; @@ -151,6 +153,8 @@ public: const ScRange& GetRange() const { return aRange; } }; +} + // The names in the maps must be sorted according to strcmp! //! Instead of Which-ID 0 use special IDs and do not compare via names! @@ -9071,6 +9075,8 @@ void ScUniqueCellFormatsObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // Fill the list of formats from the document +namespace { + // hash code to access the range lists by ScPatternAttr pointer struct ScPatternHashCode { @@ -9080,11 +9086,15 @@ struct ScPatternHashCode } }; +} + // Hash map to find a range by its start row typedef std::unordered_map< SCROW, ScRange > ScRowRangeHashMap; typedef std::vector<ScRange> ScRangeVector; +namespace { + // Hash map entry. // The Join method depends on the column-wise order of ScAttrRectIterator class ScUniqueFormatsEntry @@ -9105,6 +9115,8 @@ public: void Clear() { aReturnRanges.clear(); } // aJoinedRanges and aCompletedRanges are cleared in GetRanges }; +} + void ScUniqueFormatsEntry::Join( const ScRange& rNewRange ) { // Special-case handling for single range @@ -9192,6 +9204,8 @@ const ScRangeList& ScUniqueFormatsEntry::GetRanges() typedef std::unordered_map< const ScPatternAttr*, ScUniqueFormatsEntry, ScPatternHashCode > ScUniqueFormatsHashMap; +namespace { + // function object to sort the range lists by start of first range struct ScUniqueFormatsOrder { @@ -9205,6 +9219,8 @@ struct ScUniqueFormatsOrder } }; +} + ScUniqueCellFormatsObj::ScUniqueCellFormatsObj(ScDocShell* pDocSh, const ScRange& rRange) : pDocShell( pDocSh ), aTotalRange( rRange ), |