You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2021/01/26 16:20:49 UTC

[openoffice] branch AOO42X updated: Adding missing SfxItemSet ranges and initialize them (#118)

This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new 4e6971e  Adding missing SfxItemSet ranges and initialize them (#118)
4e6971e is described below

commit 4e6971e21453a61df6f9699a58c985d4b7f739de
Author: Arrigo Marchiori <ar...@yahoo.it>
AuthorDate: Tue Jan 26 17:15:15 2021 +0100

    Adding missing SfxItemSet ranges and initialize them (#118)
    
    This is a copy (with very small adaptations) of the same logic from
    file frmsh.cxx starting at line 422
    (cherry picked from commit f6624c039825d02292dcdd46b4cea8bf9e9b9642)
---
 main/sw/source/ui/shells/textsh.cxx | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/main/sw/source/ui/shells/textsh.cxx b/main/sw/source/ui/shells/textsh.cxx
index 280433a..9f20d3e 100644
--- a/main/sw/source/ui/shells/textsh.cxx
+++ b/main/sw/source/ui/shells/textsh.cxx
@@ -123,7 +123,8 @@ using ::rtl::OUString;
 #include <table.hrc>
 #include <frmui.hrc>
 #include <unomid.h>
-
+#include <svx/drawitem.hxx>
+#include <drawdoc.hxx>
 
 
 /*--------------------------------------------------------------------
@@ -597,11 +598,20 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
             static sal_uInt16 __READONLY_DATA aFrmAttrRange[] =
             {
                 RES_FRMATR_BEGIN,       RES_FRMATR_END-1,
+                XATTR_FILL_FIRST,       XATTR_FILL_LAST,
+                SID_DOCFRAME,           SID_DOCFRAME,
+                SID_ATTR_BRUSH,         SID_ATTR_BRUSH,
                 SID_ATTR_BORDER_INNER,  SID_ATTR_BORDER_INNER,
-                FN_GET_PRINT_AREA,      FN_GET_PRINT_AREA,
+                SID_ATTR_LRSPACE,       SID_ATTR_ULSPACE,
                 SID_ATTR_PAGE_SIZE,     SID_ATTR_PAGE_SIZE,
-                FN_SET_FRM_NAME,        FN_SET_FRM_NAME,
+                SID_COLOR_TABLE,        SID_BITMAP_LIST,
                 SID_HTML_MODE,          SID_HTML_MODE,
+                FN_GET_PRINT_AREA,      FN_GET_PRINT_AREA,
+                FN_SURROUND,            FN_HORI_ORIENT,
+                FN_SET_FRM_NAME,        FN_KEEP_ASPECT_RATIO,
+                FN_SET_FRM_ALT_NAME,    FN_SET_FRM_ALT_NAME,
+                FN_OLE_IS_MATH,         FN_MATH_BASELINE_ALIGNMENT,
+                FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT,
                 0
             };
 
@@ -617,6 +627,12 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
             aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA));
             aSet.Put(aPrtSize);
 
+            const SwDrawModel* pDrawModel = GetShell().GetView().GetDocShell()->GetDoc()->GetDrawModel();
+            aSet.Put(SvxColorTableItem(pDrawModel->GetColorTableFromSdrModel(), SID_COLOR_TABLE));
+            aSet.Put(SvxGradientListItem(pDrawModel->GetGradientListFromSdrModel(), SID_GRADIENT_LIST));
+            aSet.Put(SvxHatchListItem(pDrawModel->GetHatchListFromSdrModel(), SID_HATCH_LIST));
+            aSet.Put(SvxBitmapListItem(pDrawModel->GetBitmapListFromSdrModel(), SID_BITMAP_LIST));
+
             aSet.Put(aMgr.GetAttrSet());
             aSet.SetParent( aMgr.GetAttrSet().GetParent() );