cui/source/tabpages/numpages.cxx          |    4 ++--
 include/svx/svxids.hrc                    |    2 +-
 sd/source/ui/dlg/BulletAndPositionDlg.cxx |    4 ++--
 sd/source/ui/dlg/dlgolbul.cxx             |    5 +++--
 sw/source/ui/fmtui/tmpdlg.cxx             |    4 ++--
 sw/source/ui/misc/num.cxx                 |    5 +++--
 6 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 01619f03f3b369e2ccdd42b53eb275d3048807d1
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Thu Oct 3 21:35:10 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Oct 4 10:24:24 2019 +0200

    use SfxUInt16Item for SID_METRIC_ITEM
    
    because we aren't using the array of values in SfxAllEnumItem
    
    Change-Id: I67ccb7737c52f9949495c53881e052d5005882aa
    Reviewed-on: https://gerrit.libreoffice.org/80165
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 0208d6f9c5b4..03c431cfdd9e 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -3313,7 +3313,7 @@ void SvxNumOptionsTabPage::PageCreated(const 
SfxAllItemSet& aSet)
     const SfxStringListItem* pListItem = 
aSet.GetItem<SfxStringListItem>(SID_CHAR_FMT_LIST_BOX, false);
     const SfxStringItem* pNumCharFmt = 
aSet.GetItem<SfxStringItem>(SID_NUM_CHAR_FMT, false);
     const SfxStringItem* pBulletCharFmt = 
aSet.GetItem<SfxStringItem>(SID_BULLET_CHAR_FMT, false);
-    const SfxAllEnumItem* pMetricItem = 
aSet.GetItem<SfxAllEnumItem>(SID_METRIC_ITEM, false);
+    const SfxUInt16Item* pMetricItem = 
aSet.GetItem<SfxUInt16Item>(SID_METRIC_ITEM, false);
 
     if (pNumCharFmt &&pBulletCharFmt)
         SetCharFmts( pNumCharFmt->GetValue(),pBulletCharFmt->GetValue());
@@ -3331,7 +3331,7 @@ void SvxNumOptionsTabPage::PageCreated(const 
SfxAllItemSet& aSet)
 
 void SvxNumPositionTabPage::PageCreated(const SfxAllItemSet& aSet)
 {
-    const SfxAllEnumItem* pMetricItem = 
aSet.GetItem<SfxAllEnumItem>(SID_METRIC_ITEM, false);
+    const SfxUInt16Item* pMetricItem = 
aSet.GetItem<SfxUInt16Item>(SID_METRIC_ITEM, false);
 
     if (pMetricItem)
         SetMetric(static_cast<FieldUnit>(pMetricItem->GetValue()));
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index cd7a1698b987..3f18a7fb70ec 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -810,7 +810,7 @@ class SvxSetItem;
 #define SID_OBJECT_LIST                                 ( SID_SVX_START + 1021 
)
 #define SID_ATTR_SET                                    ( SID_SVX_START + 1022 
)
 #define SID_CHAR_FMT_LIST_BOX                           ( SID_SVX_START + 1023 
)
-#define SID_METRIC_ITEM                                 ( SID_SVX_START + 1024 
)
+#define SID_METRIC_ITEM                                 
TypedWhichId<SfxUInt16Item>( SID_SVX_START + 1024 )
 #define SID_NUM_CHAR_FMT                                ( SID_SVX_START + 1025 
)
 #define SID_BULLET_CHAR_FMT                             ( SID_SVX_START + 1026 
)
 #define SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK    ( SID_SVX_START + 1027 
)
diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx 
b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index e1daf7661942..7ce6a227fe3f 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -185,11 +185,11 @@ 
SvxBulletAndPositionDlg::SvxBulletAndPositionDlg(weld::Window* pWindow, const Sf
     // PageCreated
     FieldUnit eMetric = pView->GetDoc().GetUIUnit();
     SfxAllItemSet aSet(*(rSet.GetPool()));
-    aSet.Put(SfxAllEnumItem(SID_METRIC_ITEM, 
static_cast<sal_uInt16>(eMetric)));
+    aSet.Put(SfxUInt16Item(SID_METRIC_ITEM, static_cast<sal_uInt16>(eMetric)));
 
     const SfxStringItem* pNumCharFmt = 
aSet.GetItem<SfxStringItem>(SID_NUM_CHAR_FMT, false);
     const SfxStringItem* pBulletCharFmt = 
aSet.GetItem<SfxStringItem>(SID_BULLET_CHAR_FMT, false);
-    const SfxAllEnumItem* pMetricItem = 
aSet.GetItem<SfxAllEnumItem>(SID_METRIC_ITEM, false);
+    const SfxUInt16Item* pMetricItem = 
aSet.GetItem<SfxUInt16Item>(SID_METRIC_ITEM, false);
 
     if (pNumCharFmt && pBulletCharFmt)
         SetCharFmts(pNumCharFmt->GetValue(), pBulletCharFmt->GetValue());
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index f62057f8ce41..0f8f46c4a5fd 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -31,6 +31,7 @@
 #include <View.hxx>
 #include <svx/svdobj.hxx>
 #include <svl/style.hxx>
+#include <svl/intitem.hxx>
 #include <drawdoc.hxx>
 
 #include <strings.hxx>
@@ -135,14 +136,14 @@ void OutlineBulletDlg::PageCreated(const OString& rId, 
SfxTabPage &rPage)
     {
         FieldUnit eMetric = m_pSdView->GetDoc().GetUIUnit();
         SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
-        aSet.Put ( 
SfxAllEnumItem(SID_METRIC_ITEM,static_cast<sal_uInt16>(eMetric)));
+        aSet.Put ( 
SfxUInt16Item(SID_METRIC_ITEM,static_cast<sal_uInt16>(eMetric)));
         rPage.PageCreated(aSet);
     }
     else if (rId == "position")
     {
         FieldUnit eMetric = m_pSdView->GetDoc().GetUIUnit();
         SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
-        aSet.Put ( 
SfxAllEnumItem(SID_METRIC_ITEM,static_cast<sal_uInt16>(eMetric)));
+        aSet.Put ( 
SfxUInt16Item(SID_METRIC_ITEM,static_cast<sal_uInt16>(eMetric)));
         rPage.PageCreated(aSet);
     }
 }
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 9794d9b76a7d..41f8d0948d6e 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -309,7 +309,7 @@ void SwTemplateDlgController::PageCreated(const OString& 
rId, SfxTabPage &rPage
             SwDocShell* pDocShell = 
::GetActiveWrtShell()->GetView().GetDocShell();
             FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebDocShell*>( 
pDocShell) !=  nullptr );
 
-            aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 
>(eMetric)));
+            aSet.Put ( SfxUInt16Item(SID_METRIC_ITEM, static_cast< sal_uInt16 
>(eMetric)));
             rPage.PageCreated(aSet);
         }
     }
@@ -481,7 +481,7 @@ void SwTemplateDlgController::PageCreated(const OString& 
rId, SfxTabPage &rPage
 
         aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
         FieldUnit eMetric = ::GetDfltMetric(dynamic_cast< const SwWebDocShell 
*>( pDocShell ) !=  nullptr);
-        aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 
>(eMetric)));
+        aSet.Put ( SfxUInt16Item(SID_METRIC_ITEM, static_cast< sal_uInt16 
>(eMetric)));
         rPage.PageCreated(aSet);
     }
     else if (rId == "indents")
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index b5bccf498633..b2eef82f6580 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -48,6 +48,7 @@
 #include <svl/stritem.hxx>
 #include <svl/aeitem.hxx>
 #include <svl/slstitm.hxx>
+#include <svl/intitem.hxx>
 
 static bool bLastRelative = false;
 
@@ -931,7 +932,7 @@ void SwSvxNumBulletTabDialog::PageCreated(const OString& 
rPageId, SfxTabPage& rP
         aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
 
         FieldUnit eMetric = ::GetDfltMetric(dynamic_cast< const SwWebDocShell 
*>( pDocShell ) !=  nullptr);
-        aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 
>(eMetric) ) );
+        aSet.Put ( SfxUInt16Item(SID_METRIC_ITEM, static_cast< sal_uInt16 
>(eMetric) ) );
         rPage.PageCreated(aSet);
     }
     else if (rPageId == "position")
@@ -939,7 +940,7 @@ void SwSvxNumBulletTabDialog::PageCreated(const OString& 
rPageId, SfxTabPage& rP
         SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell();
         FieldUnit eMetric = ::GetDfltMetric(dynamic_cast< const SwWebDocShell 
*>( pDocShell ) !=  nullptr);
         SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
-        aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 
>(eMetric)) );
+        aSet.Put ( SfxUInt16Item(SID_METRIC_ITEM, static_cast< sal_uInt16 
>(eMetric)) );
         rPage.PageCreated(aSet);
     }
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to