From 56f84749b8fd51963a50c5bf069f62b70c9494d9 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 12 Oct 2016 12:38:03 +0100 Subject: de-src CustomPropertiesTypeBox widgetry Change-Id: If98c76ec38708b73158456f4a2c93b5afbe825cd --- sfx2/source/dialog/dinfdlg.cxx | 12 +++++++++++- sfx2/source/dialog/dinfdlg.src | 9 ++------- sfx2/source/inc/sfxlocal.hrc | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 1d3a2f01fab1..23d7a92a3f0e 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1421,9 +1422,18 @@ namespace } CustomPropertiesTypeBox::CustomPropertiesTypeBox(vcl::Window* pParent, CustomPropertyLine* pLine) - : ListBox(pParent, SfxResId(SFX_LB_PROPERTY_TYPE)) + : ListBox(pParent, WB_BORDER|WB_DROPDOWN) , m_pLine(pLine) { + SetPosSizePixel(LogicToPixel(Point(63, 2), MapUnit::MapAppFont), + LogicToPixel(Size(60, 80), MapUnit::MapAppFont)); + ResStringArray aStrArr(SfxResId(SFX_LB_PROPERTY_STRINGARRAY)); + for (sal_uInt32 i = 0; i < aStrArr.Count(); ++i) + { + InsertEntry(aStrArr.GetString(i)); + SetEntryData(i, reinterpret_cast(aStrArr.GetValue(i))); + } + SelectEntryPos(0); } // struct CustomPropertyLine --------------------------------------------- diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src index 30cf6f94c0e3..996096a73e57 100644 --- a/sfx2/source/dialog/dinfdlg.src +++ b/sfx2/source/dialog/dinfdlg.src @@ -152,14 +152,9 @@ Resource RID_STR_TYPE_CONST }; }; -ListBox SFX_LB_PROPERTY_TYPE +StringArray SFX_LB_PROPERTY_STRINGARRAY { - Pos = MAP_APPFONT ( 63 , 2 ) ; - Size = MAP_APPFONT ( 60 , 80 ) ; - DropDown = TRUE; - Border = TRUE; - CurPos = 0; - StringList [ en-US ] = + ItemList [ en-US ] = { < "Text" ; CUSTOM_TYPE_TEXT ; > ; < "DateTime" ; CUSTOM_TYPE_DATETIME ; > ; diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc index 1cfca1fac456..41fc033c81bc 100644 --- a/sfx2/source/inc/sfxlocal.hrc +++ b/sfx2/source/inc/sfxlocal.hrc @@ -35,9 +35,9 @@ #define STR_SFX_DOCK (RID_SFX_SFXLOCAL_START + 7) #define STR_SFX_UNDOCK (RID_SFX_SFXLOCAL_START + 8) #define STR_SFX_QUERY_WRONG_TYPE (RID_SFX_SFXLOCAL_START + 11) +#define SFX_LB_PROPERTY_STRINGARRAY (RID_SFX_SFXLOCAL_START + 12) // Controls -------------------------------------------------------------- -#define SFX_LB_PROPERTY_TYPE (RID_SFX_SFXLOCAL_START + 4) #define SFX_WIN_PROPERTY_YESNO (RID_SFX_SFXLOCAL_START + 6) #define SFX_ST_DURATION_FORMAT (RID_SFX_SFXLOCAL_START + 13) -- cgit