[Libreoffice-commits] core.git: 2 commits - include/svl sw/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sat Aug 14 06:36:16 UTC 2021


 include/svl/zforlist.hxx           |    9 ++++-----
 sw/source/filter/html/htmlcss1.cxx |    6 +++---
 2 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 17d2247a66b6a9e3105b0a8b8e6d6b5bea5e3ed4
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Fri Aug 13 19:03:23 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Aug 14 08:35:46 2021 +0200

    formatter maps can use unordered_map
    
    Change-Id: I733537e98cccc1a5dcb2c275b3baeb56af5f15c4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120468
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 9445f10a006b..a9b9fa37748a 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -31,7 +31,7 @@
 #include <svl/ondemand.hxx>
 #include <svl/nfkeytab.hxx>
 
-#include <map>
+#include <unordered_map>
 #include <memory>
 
 namespace com::sun::star::i18n { class XNumberFormatCode; }
@@ -291,10 +291,9 @@ enum NfEvalDateFormat
 };
 
 
-typedef std::map<sal_uInt32, SvNumberformat*> SvNumberFormatTable;
-typedef std::map<sal_uInt16, sal_uInt32> SvNumberFormatterIndexTable;
-
-typedef ::std::map< sal_uInt32, sal_uInt32> SvNumberFormatterMergeMap;
+typedef std::unordered_map<sal_uInt32, SvNumberformat*> SvNumberFormatTable;
+typedef std::unordered_map<sal_uInt16, sal_uInt32> SvNumberFormatterIndexTable;
+typedef std::unordered_map< sal_uInt32, sal_uInt32> SvNumberFormatterMergeMap;
 
 
 /** Language/country dependent currency entries
commit da76d817400242934fdaebcdb226abf3d6595f56
Author:     Emircan Agac <thesadson at gmail.com>
AuthorDate: Thu Aug 12 18:44:53 2021 +0300
Commit:     Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
CommitDate: Sat Aug 14 08:35:36 2021 +0200

    tdf#140226: use StaticWhichCast
    
    Change-Id: I013b6ff371992a31a1ee11f93072eeb49566fe52
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120401
    Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>

diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 267996f4ea01..110fc35e4cfe 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -390,7 +390,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
                                                    &pItem ) )
         {
             // set a background
-            aBrushItem.reset(static_cast<SvxBrushItem*>(pItem->Clone()));
+            aBrushItem.reset(&pItem->Clone()->StaticWhichCast(RES_BACKGROUND));
             pItemSet2->ClearItem( RES_BACKGROUND );
             bSetBrush = true;
         }
@@ -398,7 +398,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
         if( SfxItemState::SET == pItemSet2->GetItemState( RES_BOX, false, &pItem ) )
         {
             // set a border
-            aBoxItem.reset(static_cast<SvxBoxItem*>(pItem->Clone()));
+            aBoxItem.reset(&pItem->Clone()->StaticWhichCast(RES_BOX));
             pItemSet2->ClearItem( RES_BOX );
             bSetBox = true;
         }
@@ -406,7 +406,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
         if( SfxItemState::SET == pItemSet2->GetItemState( RES_FRAMEDIR, false, &pItem ) )
         {
             // set a frame
-            aFrameDirItem.reset(static_cast<SvxFrameDirectionItem*>(pItem->Clone()));
+            aFrameDirItem.reset(&pItem->Clone()->StaticWhichCast(RES_FRAMEDIR));
             pItemSet2->ClearItem( RES_FRAMEDIR );
             bSetFrameDir = true;
         }


More information about the Libreoffice-commits mailing list