summaryrefslogtreecommitdiff
path: root/extensions/source/propctrlr
diff options
context:
space:
mode:
authorShubham Goyal <22shubh22@gmail.com>2019-02-26 23:02:40 +0530
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-03-08 15:51:23 +0100
commit732d630c3d2a168c725c18e4dd8df7a0a4f85566 (patch)
treeaf02abe6e0b2346c46a464b8063faa81ee11ed7d /extensions/source/propctrlr
parentcfdba2b94fd7c0a2ec0250ddc9212d367db50c8c (diff)
tdf#53524 Create UNO grid control- dialog editor
The commit is based on the patch in https://bz.apache.org/ooo/show_bug.cgi?id=120066. Change-Id: Ia4ad536331954679940104adf5d6178228c90854 Reviewed-on: https://gerrit.libreoffice.org/68814 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'extensions/source/propctrlr')
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx29
-rw-r--r--extensions/source/propctrlr/formmetadata.cxx14
-rw-r--r--extensions/source/propctrlr/formmetadata.hxx11
-rw-r--r--extensions/source/propctrlr/formstrings.hxx11
4 files changed, 64 insertions, 1 deletions
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 78719cce93d6..b856fe7db6e6 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -21,6 +21,7 @@
#include "controltype.hxx"
#include "pcrservices.hxx"
#include <propctrlr.h>
+#include <helpids.h>
#include "fontdialog.hxx"
#include "formcomponenthandler.hxx"
#include "formlinkdialog.hxx"
@@ -998,6 +999,13 @@ namespace pcr
case PROPERTY_ID_FILLCOLOR:
case PROPERTY_ID_SYMBOLCOLOR:
case PROPERTY_ID_BORDERCOLOR:
+ case PROPERTY_ID_GRIDLINECOLOR:
+ case PROPERTY_ID_HEADERBACKGROUNDCOLOR:
+ case PROPERTY_ID_HEADERTEXTCOLOR:
+ case PROPERTY_ID_ACTIVESELECTIONBACKGROUNDCOLOR:
+ case PROPERTY_ID_ACTIVESELECTIONTEXTCOLOR:
+ case PROPERTY_ID_INACTIVESELECTIONBACKGROUNDCOLOR:
+ case PROPERTY_ID_INACTIVESELECTIONTEXTCOLOR:
nControlType = PropertyControlType::ColorListBox;
switch( nPropId )
@@ -1010,6 +1018,20 @@ namespace pcr
aDescriptor.PrimaryButtonId = UID_PROP_DLG_SYMBOLCOLOR; break;
case PROPERTY_ID_BORDERCOLOR:
aDescriptor.PrimaryButtonId = UID_PROP_DLG_BORDERCOLOR; break;
+ case PROPERTY_ID_GRIDLINECOLOR:
+ aDescriptor.PrimaryButtonId = HID_PROP_GRIDLINECOLOR; break;
+ case PROPERTY_ID_HEADERBACKGROUNDCOLOR:
+ aDescriptor.PrimaryButtonId = HID_PROP_HEADERBACKGROUNDCOLOR; break;
+ case PROPERTY_ID_HEADERTEXTCOLOR:
+ aDescriptor.PrimaryButtonId = HID_PROP_HEADERTEXTCOLOR; break;
+ case PROPERTY_ID_ACTIVESELECTIONBACKGROUNDCOLOR:
+ aDescriptor.PrimaryButtonId = HID_PROP_ACTIVESELECTIONBACKGROUNDCOLOR; break;
+ case PROPERTY_ID_ACTIVESELECTIONTEXTCOLOR:
+ aDescriptor.PrimaryButtonId = HID_PROP_ACTIVESELECTIONTEXTCOLOR; break;
+ case PROPERTY_ID_INACTIVESELECTIONBACKGROUNDCOLOR:
+ aDescriptor.PrimaryButtonId = HID_PROP_INACTIVESELECTIONBACKGROUNDCOLOR; break;
+ case PROPERTY_ID_INACTIVESELECTIONTEXTCOLOR:
+ aDescriptor.PrimaryButtonId = HID_PROP_INACTIVESELECTIONTEXTCOLOR; break;
}
break;
@@ -1405,6 +1427,13 @@ namespace pcr
case PROPERTY_ID_FILLCOLOR:
case PROPERTY_ID_SYMBOLCOLOR:
case PROPERTY_ID_BORDERCOLOR:
+ case PROPERTY_ID_GRIDLINECOLOR:
+ case PROPERTY_ID_HEADERBACKGROUNDCOLOR:
+ case PROPERTY_ID_HEADERTEXTCOLOR:
+ case PROPERTY_ID_ACTIVESELECTIONBACKGROUNDCOLOR:
+ case PROPERTY_ID_ACTIVESELECTIONTEXTCOLOR:
+ case PROPERTY_ID_INACTIVESELECTIONBACKGROUNDCOLOR:
+ case PROPERTY_ID_INACTIVESELECTIONTEXTCOLOR:
if ( impl_dialogColorChooser_throw( nPropId, _rData, aGuard ) )
eResult = InteractiveSelectionResult_ObtainedValue;
break;
diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx
index 0c6a3a36f2ae..4b727c29083b 100644
--- a/extensions/source/propctrlr/formmetadata.cxx
+++ b/extensions/source/propctrlr/formmetadata.cxx
@@ -338,7 +338,18 @@ namespace pcr
DEF_INFO_2( EDITABLE, EDITABLE, 199, EDITABLE, DIALOG_VISIBLE, COMPOSEABLE ),
DEF_INFO_2( INVOKES_STOP_NOT_EDITING, INVOKES_STOP_NOT_EDITING, 200, INVOKES_STOP_NOT_EDITING, DIALOG_VISIBLE, COMPOSEABLE ),
DEF_INFO_2( DECORATION, DECORATION, 201, DECORATION, DIALOG_VISIBLE, COMPOSEABLE ),
- DEF_INFO_2( NOLABEL, NOLABEL, 202, NOLABEL, DIALOG_VISIBLE, COMPOSEABLE )
+ DEF_INFO_2( NOLABEL, NOLABEL, 202, NOLABEL, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_3( SELECTIONMODEL, SELECTIONMODEL, 203, SELECTIONMODEL, DIALOG_VISIBLE, ENUM, COMPOSEABLE ),
+ DEF_INFO_2( USEGRIDLINE, USEGRIDLINE, 204, USEGRIDLINE, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_2( GRIDLINECOLOR, GRIDLINECOLOR, 205, GRIDLINECOLOR, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_2( SHOWCOLUMNHEADER, SHOWCOLUMNHEADER, 206, SHOWCOLUMNHEADER, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_2( SHOWROWHEADER, SHOWROWHEADER, 207, SHOWROWHEADER, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_2( HEADERBACKGROUNDCOLOR, HEADERBACKGROUNDCOLOR, 208, HEADERBACKGROUNDCOLOR, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_2( HEADERTEXTCOLOR, HEADERTEXTCOLOR, 209, HEADERTEXTCOLOR, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_2( ACTIVESELECTIONBACKGROUNDCOLOR, ACTIVESELECTIONBACKGROUNDCOLOR, 210, ACTIVESELECTIONBACKGROUNDCOLOR, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_2( ACTIVESELECTIONTEXTCOLOR, ACTIVESELECTIONTEXTCOLOR, 211, ACTIVESELECTIONTEXTCOLOR, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_2( INACTIVESELECTIONBACKGROUNDCOLOR, INACTIVESELECTIONBACKGROUNDCOLOR, 212, INACTIVESELECTIONBACKGROUNDCOLOR, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_2( INACTIVESELECTIONTEXTCOLOR, INACTIVESELECTIONTEXTCOLOR, 213, INACTIVESELECTIONTEXTCOLOR, DIALOG_VISIBLE, COMPOSEABLE )
};
s_pPropertyInfos = aPropertyInfos;
@@ -496,6 +507,7 @@ namespace pcr
nElements = SAL_N_ELEMENTS(RID_RSC_ENUM_WHITESPACE_HANDLING);
break;
case PROPERTY_ID_SELECTION_TYPE:
+ case PROPERTY_ID_SELECTIONMODEL:
pStringItemsResId = RID_RSC_ENUM_SELECTION_TYPE;
nElements = SAL_N_ELEMENTS(RID_RSC_ENUM_SELECTION_TYPE);
break;
diff --git a/extensions/source/propctrlr/formmetadata.hxx b/extensions/source/propctrlr/formmetadata.hxx
index 2cc6f5dbb399..feba2f780639 100644
--- a/extensions/source/propctrlr/formmetadata.hxx
+++ b/extensions/source/propctrlr/formmetadata.hxx
@@ -326,6 +326,17 @@ namespace pcr
#define PROPERTY_ID_SCROLL_TOP 205
#define PROPERTY_ID_SCROLL_LEFT 206
#define PROPERTY_ID_TYPEDITEMLIST 207
+ #define PROPERTY_ID_SELECTIONMODEL 208
+ #define PROPERTY_ID_USEGRIDLINE 209
+ #define PROPERTY_ID_GRIDLINECOLOR 210
+ #define PROPERTY_ID_SHOWCOLUMNHEADER 211
+ #define PROPERTY_ID_SHOWROWHEADER 212
+ #define PROPERTY_ID_HEADERBACKGROUNDCOLOR 213
+ #define PROPERTY_ID_HEADERTEXTCOLOR 214
+ #define PROPERTY_ID_ACTIVESELECTIONBACKGROUNDCOLOR 215
+ #define PROPERTY_ID_ACTIVESELECTIONTEXTCOLOR 216
+ #define PROPERTY_ID_INACTIVESELECTIONBACKGROUNDCOLOR 217
+ #define PROPERTY_ID_INACTIVESELECTIONTEXTCOLOR 218
} // namespace pcr
diff --git a/extensions/source/propctrlr/formstrings.hxx b/extensions/source/propctrlr/formstrings.hxx
index ad06d8989b32..341cc2d5c8cf 100644
--- a/extensions/source/propctrlr/formstrings.hxx
+++ b/extensions/source/propctrlr/formstrings.hxx
@@ -275,6 +275,17 @@ namespace pcr
#define PROPERTY_TEXTTYPE "TextType"
#define PROPERTY_RICHTEXT "RichText"
#define PROPERTY_ROWSET "RowSet"
+ #define PROPERTY_SELECTIONMODEL "SelectionModel"
+ #define PROPERTY_USEGRIDLINE "UseGridLines"
+ #define PROPERTY_GRIDLINECOLOR "GridLineColor"
+ #define PROPERTY_SHOWCOLUMNHEADER "ShowColumnHeader"
+ #define PROPERTY_SHOWROWHEADER "ShowRowHeader"
+ #define PROPERTY_HEADERBACKGROUNDCOLOR "HeaderBackgroundColor"
+ #define PROPERTY_HEADERTEXTCOLOR "HeaderTextColor"
+ #define PROPERTY_ACTIVESELECTIONBACKGROUNDCOLOR "ActiveSelectionBackgroundColor"
+ #define PROPERTY_ACTIVESELECTIONTEXTCOLOR "ActiveSelectionTextColor"
+ #define PROPERTY_INACTIVESELECTIONBACKGROUNDCOLOR "InactiveSelectionBackgroundColor"
+ #define PROPERTY_INACTIVESELECTIONTEXTCOLOR "InactiveSelectionTextColor"
// services
#define SERVICE_COMPONENT_GROUPBOX "com.sun.star.form.component.GroupBox"