[Libreoffice-commits] core.git: include/editeng include/sfx2 include/svl include/svx sc/inc sfx2/source svl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sun Jul 4 14:12:51 UTC 2021


 include/editeng/scripttypeitem.hxx |    2 -
 include/sfx2/tabdlg.hxx            |    1 
 include/svl/poolitem.hxx           |   28 -------------------
 include/svl/setitem.hxx            |   52 +++++++++++++++++++++++++++++++++++++
 include/svx/pageitem.hxx           |    2 -
 include/svx/xflasit.hxx            |    2 -
 include/svx/xlnasit.hxx            |    2 -
 sc/inc/patattr.hxx                 |    2 -
 sfx2/source/control/shell.cxx      |    1 
 svl/source/items/itempool.cxx      |    1 
 svl/source/items/itemset.cxx       |    1 
 svl/source/items/poolcach.cxx      |    1 
 svl/source/items/sitem.cxx         |    1 
 13 files changed, 63 insertions(+), 33 deletions(-)

New commits:
commit 9f669d2271d5ac64e4cd38ba450fb4ce3dadd5f2
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sat Jul 3 21:18:24 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jul 4 16:12:17 2021 +0200

    move SfxSetItem to own header file
    
    Change-Id: I77ba873ed236091443627e26e6127e89cd8e15bd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118360
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/editeng/scripttypeitem.hxx b/include/editeng/scripttypeitem.hxx
index e69ea0bdc4da..bfe84f5f6a9a 100644
--- a/include/editeng/scripttypeitem.hxx
+++ b/include/editeng/scripttypeitem.hxx
@@ -20,7 +20,7 @@
 #define INCLUDED_EDITENG_SCRIPTTYPEITEM_HXX
 
 #include <svl/languageoptions.hxx>
-#include <svl/poolitem.hxx>
+#include <svl/setitem.hxx>
 #include <editeng/editengdllapi.h>
 
 class EDITENG_DLLPUBLIC SvxScriptSetItem final : public SfxSetItem
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index e6aee128f4bf..7d338e40c342 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -30,6 +30,7 @@
 #include <vcl/builderpage.hxx>
 #include <svl/itempool.hxx>
 #include <svl/itemset.hxx>
+#include <svl/setitem.hxx>
 #include <o3tl/typed_flags_set.hxx>
 
 class SfxTabPage;
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 7dbd7d85c24b..ba22aed9a9cc 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -305,34 +305,6 @@ public:
     virtual bool            IsVoidItem() const override;
 };
 
-class SVL_DLLPUBLIC SfxSetItem: public SfxPoolItem
-{
-    std::unique_ptr<SfxItemSet>  pSet;
-
-    SfxSetItem & operator=( const SfxSetItem& ) = delete;
-
-public:
-                            SfxSetItem( sal_uInt16 nWhich, std::unique_ptr<SfxItemSet> &&pSet );
-                            SfxSetItem( sal_uInt16 nWhich, const SfxItemSet &rSet );
-                            SfxSetItem( const SfxSetItem&, SfxItemPool *pPool = nullptr );
-                            virtual ~SfxSetItem() override;
-
-    virtual bool            operator==( const SfxPoolItem& ) const override;
-
-    virtual bool GetPresentation( SfxItemPresentation ePres,
-                                    MapUnit eCoreMetric,
-                                    MapUnit ePresMetric,
-                                    OUString &rText,
-                                    const IntlWrapper& ) const override;
-
-    // create a copy of itself
-    virtual SfxSetItem*     Clone( SfxItemPool *pPool = nullptr ) const override = 0;
-
-    const SfxItemSet&       GetItemSet() const
-                            { return *pSet; }
-    SfxItemSet&             GetItemSet()
-                            { return *pSet; }
-};
 
 class SVL_DLLPUBLIC SfxPoolItemHint final : public SfxHint
 {
diff --git a/include/svl/setitem.hxx b/include/svl/setitem.hxx
new file mode 100644
index 000000000000..81f832b756ae
--- /dev/null
+++ b/include/svl/setitem.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <svl/poolitem.hxx>
+#include <memory>
+
+class SVL_DLLPUBLIC SfxSetItem : public SfxPoolItem
+{
+    std::unique_ptr<SfxItemSet> pSet;
+
+    SfxSetItem& operator=(const SfxSetItem&) = delete;
+
+public:
+    SfxSetItem(sal_uInt16 nWhich, std::unique_ptr<SfxItemSet>&& pSet);
+    SfxSetItem(sal_uInt16 nWhich, const SfxItemSet& rSet);
+    SfxSetItem(const SfxSetItem&, SfxItemPool* pPool = nullptr);
+    virtual ~SfxSetItem() override;
+
+    virtual bool operator==(const SfxPoolItem&) const override;
+
+    virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric,
+                                 MapUnit ePresMetric, OUString& rText,
+                                 const IntlWrapper&) const override;
+
+    // create a copy of itself
+    virtual SfxSetItem* Clone(SfxItemPool* pPool = nullptr) const override = 0;
+
+    const SfxItemSet& GetItemSet() const { return *pSet; }
+    SfxItemSet& GetItemSet() { return *pSet; }
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/pageitem.hxx b/include/svx/pageitem.hxx
index b22eb15e1e47..f35bfea46ee3 100644
--- a/include/svx/pageitem.hxx
+++ b/include/svx/pageitem.hxx
@@ -23,7 +23,7 @@
 
 #include <memory>
 
-#include <svl/poolitem.hxx>
+#include <svl/setitem.hxx>
 #include <svx/svxdllapi.h>
 #include <editeng/svxenum.hxx>
 
diff --git a/include/svx/xflasit.hxx b/include/svx/xflasit.hxx
index 59a5c7e3d9bf..d20cf280bdc3 100644
--- a/include/svx/xflasit.hxx
+++ b/include/svx/xflasit.hxx
@@ -24,7 +24,7 @@
 
 #include <memory>
 
-#include <svl/poolitem.hxx>
+#include <svl/setitem.hxx>
 #include <svx/svxdllapi.h>
 
 // SetItem with all ItemSets of fill-attributes
diff --git a/include/svx/xlnasit.hxx b/include/svx/xlnasit.hxx
index 206250f5411a..abc095cd8864 100644
--- a/include/svx/xlnasit.hxx
+++ b/include/svx/xlnasit.hxx
@@ -24,7 +24,7 @@
 
 #include <memory>
 
-#include <svl/poolitem.hxx>
+#include <svl/setitem.hxx>
 #include <svx/svxdllapi.h>
 
 // SetItem with all ItemSets of line-attributes
diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx
index fdaa53e89dd4..99d0f64b28ad 100644
--- a/sc/inc/patattr.hxx
+++ b/sc/inc/patattr.hxx
@@ -19,7 +19,7 @@
 
 #pragma once
 
-#include <svl/poolitem.hxx>
+#include <svl/setitem.hxx>
 #include <svl/itemset.hxx>
 #include <svl/languageoptions.hxx>
 #include <tools/degree.hxx>
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 5726343bb290..118e205cd3ff 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -24,6 +24,7 @@
 #include <sal/log.hxx>
 #include <osl/diagnose.h>
 #include <svl/itempool.hxx>
+#include <svl/setitem.hxx>
 #include <svl/undo.hxx>
 #include <itemdel.hxx>
 #include <svtools/asynclink.hxx>
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 99e0949e38df..6d090d8556bd 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -27,6 +27,7 @@
 #include <svl/SfxBroadcaster.hxx>
 #include <svl/hint.hxx>
 #include <svl/itemset.hxx>
+#include <svl/setitem.hxx>
 
 #include <items_helper.hxx>
 #include <poolio.hxx>
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 207d0634a811..5b986167686f 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -30,6 +30,7 @@
 #include <svl/itemset.hxx>
 #include <svl/itempool.hxx>
 #include <svl/itemiter.hxx>
+#include <svl/setitem.hxx>
 #include <svl/whiter.hxx>
 
 #include <items_helper.hxx>
diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx
index 2d406e18c08e..e1516bc80926 100644
--- a/svl/source/items/poolcach.cxx
+++ b/svl/source/items/poolcach.cxx
@@ -20,6 +20,7 @@
 
 #include <svl/itempool.hxx>
 #include <svl/itemset.hxx>
+#include <svl/setitem.hxx>
 #include <svl/poolcach.hxx>
 #include <tools/debug.hxx>
 
diff --git a/svl/source/items/sitem.cxx b/svl/source/items/sitem.cxx
index 79a6aa93d414..57eb5436ea56 100644
--- a/svl/source/items/sitem.cxx
+++ b/svl/source/items/sitem.cxx
@@ -23,6 +23,7 @@
 
 #include <rtl/ustring.hxx>
 #include <svl/itemset.hxx>
+#include <svl/setitem.hxx>
 #include <svl/poolitem.hxx>
 #include <tools/debug.hxx>
 


More information about the Libreoffice-commits mailing list