diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-30 16:24:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-30 16:24:51 +0000 |
commit | f42d83b986fda93ba54222b730eacd5d253fdae7 (patch) | |
tree | e922785d067a3e6360e14b927e709e92ff9babb1 /cui | |
parent | 9f5df4cda93eb470fb79fc4b8014d9a6dde2284b (diff) |
add borders to macro/configuration listboxes
Change-Id: Ia028b19fa0e0eae0bb5e3cbc63bde2fac0785ef2
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/selector.cxx | 28 | ||||
-rw-r--r-- | cui/source/inc/selector.hxx | 8 | ||||
-rw-r--r-- | cui/uiconfig/ui/macroselectordialog.ui | 15 |
3 files changed, 35 insertions, 16 deletions
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index ea8f32c666d9..bb37627de0ea 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -73,8 +73,8 @@ using namespace ::com::sun::star::container; * The implementations of SvxConfigFunctionListBox and * SvxConfigGroupListBox are copied from sfx2/source/dialog/cfg.cxx */ -SvxConfigFunctionListBox::SvxConfigFunctionListBox(Window* pParent) - : SvTreeListBox(pParent, WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT | WB_TABSTOP) +SvxConfigFunctionListBox::SvxConfigFunctionListBox(Window* pParent, WinBits nStyle) + : SvTreeListBox(pParent, nStyle | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT | WB_TABSTOP) , pCurEntry(0) , m_pDraggingEntry(0) { @@ -86,9 +86,15 @@ SvxConfigFunctionListBox::SvxConfigFunctionListBox(Window* pParent) LINK( this, SvxConfigFunctionListBox, TimerHdl ) ); } -extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxConfigFunctionListBox(Window *pParent, VclBuilder::stringmap &) +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxConfigFunctionListBox(Window *pParent, VclBuilder::stringmap &rMap) { - return new SvxConfigFunctionListBox(pParent); + WinBits nWinBits = WB_TABSTOP; + + OString sBorder = VclBuilder::extractCustomProperty(rMap); + if (!sBorder.isEmpty()) + nWinBits |= WB_BORDER; + + return new SvxConfigFunctionListBox(pParent, nWinBits); } SvxConfigFunctionListBox::~SvxConfigFunctionListBox() @@ -187,8 +193,8 @@ SvxConfigFunctionListBox::AcceptDrop( const AcceptDropEvent& /*rEvt*/ ) return DND_ACTION_NONE; } -SvxConfigGroupListBox::SvxConfigGroupListBox(Window* pParent) - : SvTreeListBox(pParent, +SvxConfigGroupListBox::SvxConfigGroupListBox(Window* pParent, WinBits nStyle) + : SvTreeListBox(pParent, nStyle | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT | WB_TABSTOP) , m_bShowSlots(false) , m_hdImage(CUI_RES(RID_CUIIMG_HARDDISK)) @@ -206,9 +212,15 @@ SvxConfigGroupListBox::SvxConfigGroupListBox(Window* pParent) ); } -extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxConfigGroupListBox(Window *pParent, VclBuilder::stringmap &) +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxConfigGroupListBox(Window *pParent, VclBuilder::stringmap &rMap) { - return new SvxConfigGroupListBox(pParent); + WinBits nWinBits = WB_TABSTOP; + + OString sBorder = VclBuilder::extractCustomProperty(rMap); + if (!sBorder.isEmpty()) + nWinBits |= WB_BORDER; + + return new SvxConfigGroupListBox(pParent, nWinBits); } SvxConfigGroupListBox::~SvxConfigGroupListBox() diff --git a/cui/source/inc/selector.hxx b/cui/source/inc/selector.hxx index 924301070ab4..fc10f5434ee6 100644 --- a/cui/source/inc/selector.hxx +++ b/cui/source/inc/selector.hxx @@ -100,8 +100,8 @@ friend class SvxConfigGroupListBox; virtual void MouseMove( const MouseEvent& rMEvt ); public: - SvxConfigFunctionListBox(Window* pParent); - ~SvxConfigFunctionListBox(); + SvxConfigFunctionListBox(Window* pParent, WinBits nStyle); + ~SvxConfigFunctionListBox(); void ClearAll(); OUString GetHelpText( SvTreeListEntry *pEntry ); using Window::GetHelpText; @@ -161,8 +161,8 @@ protected: using SvListView::Expand; public: - SvxConfigGroupListBox(Window* pParent); - ~SvxConfigGroupListBox(); + SvxConfigGroupListBox(Window* pParent, WinBits nStyle); + ~SvxConfigGroupListBox(); void Init(bool bShowSlots, const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >& xFrame); diff --git a/cui/uiconfig/ui/macroselectordialog.ui b/cui/uiconfig/ui/macroselectordialog.ui index 1734426b60da..5a2278de4d1c 100644 --- a/cui/uiconfig/ui/macroselectordialog.ui +++ b/cui/uiconfig/ui/macroselectordialog.ui @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> <!-- interface-requires gtk+ 3.0 --> + <!-- interface-requires LibreOffice 1.0 --> <object class="GtkDialog" id="MacroSelectorDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> @@ -150,11 +151,14 @@ <property name="top_padding">6</property> <property name="left_padding">12</property> <child> - <object class="cuilo-SvxConfigGroupListBox" id="categories"> - <property name="height_request">300</property> + <object class="cuilo-SvxConfigGroupListBox" id="categories:border"> <property name="width_request">280</property> + <property name="height_request">300</property> <property name="visible">True</property> <property name="can_focus">True</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="SvxConfigGroupListBox-selection1"/> + </child> </object> </child> </object> @@ -215,11 +219,14 @@ <property name="top_padding">6</property> <property name="left_padding">12</property> <child> - <object class="cuilo-SvxConfigFunctionListBox" id="commands"> - <property name="height_request">300</property> + <object class="cuilo-SvxConfigFunctionListBox" id="commands:border"> <property name="width_request">280</property> + <property name="height_request">300</property> <property name="visible">True</property> <property name="can_focus">True</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="SvxConfigFunctionListBox-selection1"/> + </child> </object> </child> </object> |