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 /sfx2/source/dialog | |
parent | f8897e4ed69d5620ae70ede2ecf0790828e4f759 (diff) |
de-src CustomPropertiesTypeBox widgetry
Change-Id: If98c76ec38708b73158456f4a2c93b5afbe825cd
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.src | 9 |
2 files changed, 13 insertions, 8 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 ; > ; |