diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-12 12:38:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-12 12:56:36 +0100 |
commit | 56f84749b8fd51963a50c5bf069f62b70c9494d9 (patch) | |
tree | 4a82df3dc13f716ca1cc786804a4b811ce2901f7 | |
parent | f8897e4ed69d5620ae70ede2ecf0790828e4f759 (diff) |
de-src CustomPropertiesTypeBox widgetry
Change-Id: If98c76ec38708b73158456f4a2c93b5afbe825cd
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.src | 9 | ||||
-rw-r--r-- | sfx2/source/inc/sfxlocal.hrc | 2 |
3 files changed, 14 insertions, 9 deletions
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 <svl/eitem.hxx> #include <svl/urihelper.hxx> #include <tools/datetime.hxx> +#include <tools/resary.hxx> #include <tools/urlobj.hxx> #include <tools/StringListResource.hxx> #include <vcl/layout.hxx> @@ -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<void*>(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) |