[Libreoffice-commits] core.git: editeng/inc editeng/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 8 04:35:42 UTC 2021


 editeng/inc/editdoc.hxx             |    2 +-
 editeng/source/editeng/editdoc.cxx  |    2 +-
 editeng/source/editeng/editobj.cxx  |    4 ++--
 editeng/source/editeng/editobj2.hxx |    2 +-
 editeng/source/editeng/impedit2.cxx |    2 +-
 editeng/source/uno/unofdesc.cxx     |    6 ++----
 6 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 8167cc226960d635c9e68f603cb1ab2c57426828
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Wed Oct 6 16:21:20 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Oct 8 06:35:09 2021 +0200

    use SfxItemSetFixed in editeng
    
    Change-Id: I892a69d50f7d641f9a941a55c7b3952d1c59c435
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123144
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx
index 3fb103532f38..d56b4b385d7d 100644
--- a/editeng/inc/editdoc.hxx
+++ b/editeng/inc/editdoc.hxx
@@ -154,7 +154,7 @@ class ContentAttribs
 {
 private:
     SfxStyleSheet*  pStyle;
-    SfxItemSet      aAttribSet;
+    SfxItemSetFixed<EE_PARA_START, EE_CHAR_END> aAttribSet;
 
 public:
                     ContentAttribs( SfxItemPool& rItemPool );
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index a4ae6f064448..f04edc314abb 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1780,7 +1780,7 @@ void ContentNode::dumpAsXml(xmlTextWriterPtr pWriter) const
 
 ContentAttribs::ContentAttribs( SfxItemPool& rPool )
 : pStyle(nullptr)
-, aAttribSet( rPool, svl::Items<EE_PARA_START, EE_CHAR_END> )
+, aAttribSet( rPool )
 {
 }
 
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 39e2bcbd22d8..6e0982b27dc0 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -93,7 +93,7 @@ const XParaPortion& XParaPortionList::operator [](size_t i) const
 
 ContentInfo::ContentInfo( SfxItemPool& rPool ) :
     eFamily(SfxStyleFamily::Para),
-    aParaAttribs(rPool, svl::Items<EE_PARA_START, EE_CHAR_END>)
+    aParaAttribs(rPool)
 {
 }
 
@@ -102,7 +102,7 @@ ContentInfo::ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse
     maText(rCopyFrom.maText),
     aStyle(rCopyFrom.aStyle),
     eFamily(rCopyFrom.eFamily),
-    aParaAttribs(rPoolToUse, svl::Items<EE_PARA_START, EE_CHAR_END>)
+    aParaAttribs(rPoolToUse)
 {
     // this should ensure that the Items end up in the correct Pool!
     aParaAttribs.Set( rCopyFrom.GetParaAttribs() );
diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx
index 005624ede6e6..250341fd4283 100644
--- a/editeng/source/editeng/editobj2.hxx
+++ b/editeng/source/editeng/editobj2.hxx
@@ -122,7 +122,7 @@ private:
 
     std::vector<XEditAttribute> maCharAttribs;
     SfxStyleFamily      eFamily;
-    SfxItemSet          aParaAttribs;
+    SfxItemSetFixed<EE_PARA_START, EE_CHAR_END> aParaAttribs;
     std::unique_ptr<WrongList>
                         mpWrongs;
 
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 5a3fc449a9e3..c54405b3c30f 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -726,7 +726,7 @@ const SfxItemSet& ImpEditEngine::GetEmptyItemSet() const
 {
     if ( !pEmptyItemSet )
     {
-        pEmptyItemSet = std::make_unique<SfxItemSet>(const_cast<SfxItemPool&>(aEditDoc.GetItemPool()), svl::Items<EE_ITEMS_START, EE_ITEMS_END>);
+        pEmptyItemSet = std::make_unique<SfxItemSetFixed<EE_ITEMS_START, EE_ITEMS_END>>(const_cast<SfxItemPool&>(aEditDoc.GetItemPool()));
         for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
         {
             pEmptyItemSet->ClearItem( nWhich );
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index 238bdc82320f..722ae7d7f9db 100644
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -192,12 +192,10 @@ void SvxUnoFontDescriptor::setPropertyToDefault( SfxItemSet& rSet )
 
 uno::Any SvxUnoFontDescriptor::getPropertyDefault( SfxItemPool* pPool )
 {
-    SfxItemSet aSet(
-        *pPool,
-        svl::Items<
+    SfxItemSetFixed<
             EE_CHAR_FONTINFO, EE_CHAR_FONTHEIGHT,
             EE_CHAR_WEIGHT, EE_CHAR_ITALIC,
-            EE_CHAR_WLM, EE_CHAR_WLM>);
+            EE_CHAR_WLM, EE_CHAR_WLM>  aSet(*pPool);
 
     uno::Any aAny;
 


More information about the Libreoffice-commits mailing list