diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-23 11:41:20 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-23 14:11:00 +0000 |
commit | df942dcf9d271cb95b17ad4b4616626e9b15b575 (patch) | |
tree | 985ac857c1af9ee64e71d07489dba6e068785af2 /cui/source/customize | |
parent | 272bc403e0803483e4f9d1d7b880b97e803d15b0 (diff) |
convert event assign page to .ui format
Change-Id: I99312fdba95a868c836af6452abec31565f2d067
Diffstat (limited to 'cui/source/customize')
-rw-r--r-- | cui/source/customize/acccfg.cxx | 4 | ||||
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 60 | ||||
-rw-r--r-- | cui/source/customize/macropg.cxx | 2 |
3 files changed, 55 insertions, 11 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 970d72ff264d..419eeadf368b 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -726,7 +726,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( Window* pParent, const SfxIt , aChangeButton (this , CUI_RES(BTN_ACC_CHANGE )) , aRemoveButton (this , CUI_RES(BTN_ACC_REMOVE )) , aGroupText (this , CUI_RES(TXT_ACC_GROUP )) - , pGroupLBox(new SfxConfigGroupListBox( this, CUI_RES(BOX_ACC_GROUP), SFX_SLOT_ACCELCONFIG )) + , pGroupLBox(new SfxConfigGroupListBox( this, CUI_RES(BOX_ACC_GROUP) )) , aFunctionText (this , CUI_RES(TXT_ACC_FUNCTION )) , pFunctionBox(new SfxConfigFunctionListBox( this, CUI_RES( BOX_ACC_FUNCTION ))) , aKeyText (this , CUI_RES(TXT_ACC_KEY )) @@ -1184,7 +1184,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, RadioHdl) aEntriesBox.SetUpdateMode( sal_True ); aEntriesBox.Invalidate(); - pGroupLBox->Init(m_xContext, m_xFrame, m_sModuleLongName); + pGroupLBox->Init(m_xContext, m_xFrame, m_sModuleLongName, true); // pb: #133213# do not select NULL entries SvTreeListEntry* pEntry = aEntriesBox.GetEntry( 0, 0 ); diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index ee0722a06030..a221b8a94b55 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -59,6 +59,7 @@ #include <unotools/configmgr.hxx> #include "dialmgr.hxx" #include <svl/stritem.hxx> +#include <vcl/builder.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -248,7 +249,7 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle) return lStyles; } -SfxConfigFunctionListBox::SfxConfigFunctionListBox( Window* pParent, const ResId& rResId) +SfxConfigFunctionListBox::SfxConfigFunctionListBox(Window* pParent, const ResId& rResId) : SvTreeListBox( pParent, rResId ) , pCurEntry( 0 ) , pStylesInfo( 0 ) @@ -262,6 +263,31 @@ SfxConfigFunctionListBox::SfxConfigFunctionListBox( Window* pParent, const ResId LINK( this, SfxConfigFunctionListBox, TimerHdl ) ); } +SfxConfigFunctionListBox::SfxConfigFunctionListBox(Window* pParent, WinBits nStyle) + : SvTreeListBox( pParent, nStyle ) + , pCurEntry( 0 ) + , pStylesInfo( 0 ) +{ + SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT ); + GetModel()->SetSortMode( SortAscending ); + + // Timer for the BallonHelp + aTimer.SetTimeout( 200 ); + aTimer.SetTimeoutHdl( + LINK( this, SfxConfigFunctionListBox, TimerHdl ) ); +} + +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSfxConfigFunctionListBox(Window *pParent, VclBuilder::stringmap &rMap) +{ + WinBits nWinBits = WB_TABSTOP; + + OString sBorder = VclBuilder::extractCustomProperty(rMap); + if (!sBorder.isEmpty()) + nWinBits |= WB_BORDER; + + return new SfxConfigFunctionListBox(pParent, nWinBits); +} + SfxConfigFunctionListBox::~SfxConfigFunctionListBox() { ClearAll(); @@ -398,15 +424,32 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() : FreeResource(); } -SfxConfigGroupListBox::SfxConfigGroupListBox( - Window* pParent, const ResId& rResId, sal_uLong nConfigMode ) - : SvTreeListBox( pParent, rResId ) - , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), nMode( nConfigMode ), pStylesInfo(0) +SfxConfigGroupListBox::SfxConfigGroupListBox(Window* pParent, const ResId& rResId) + : SvTreeListBox( pParent, rResId ) + , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), pStylesInfo(0) { SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT ); SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage ); } +SfxConfigGroupListBox::SfxConfigGroupListBox(Window* pParent, WinBits nStyle) + : SvTreeListBox(pParent, nStyle) + , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), pStylesInfo(0) +{ + SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT ); + SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage ); +} + +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSfxConfigGroupListBox(Window *pParent, VclBuilder::stringmap &rMap) +{ + WinBits nWinBits = WB_TABSTOP; + + OString sBorder = VclBuilder::extractCustomProperty(rMap); + if (!sBorder.isEmpty()) + nWinBits |= WB_BORDER; + + return new SfxConfigGroupListBox(pParent, nWinBits); +} SfxConfigGroupListBox::~SfxConfigGroupListBox() { @@ -539,8 +582,9 @@ namespace //----------------------------------------------- void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::frame::XFrame >& xFrame, - const OUString& sModuleLongName) + const css::uno::Reference< css::frame::XFrame >& xFrame, + const OUString& sModuleLongName, + bool bEventMode) { SetUpdateMode(sal_False); ClearAll(); // Remove all old entries from treelist box @@ -580,7 +624,7 @@ void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent if ( rootNode.is() ) { - if ( nMode ) + if ( bEventMode ) { //We call acquire on the XBrowseNode so that it does not //get autodestructed and become invalid when accessed later. diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 35427061b81a..fa2fbc93f6ee 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -164,7 +164,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeMacroEventListBox(Window *p Size MacroEventListBox::GetOptimalSize() const { - return LogicToPixel(Size(192, 200), MapMode(MAP_APPFONT )); + return LogicToPixel(Size(192, 72), MapMode(MAP_APPFONT )); } void MacroEventListBox::Resize() |