summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-23 11:41:20 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-23 14:11:00 +0000
commitdf942dcf9d271cb95b17ad4b4616626e9b15b575 (patch)
tree985ac857c1af9ee64e71d07489dba6e068785af2 /cui
parent272bc403e0803483e4f9d1d7b880b97e803d15b0 (diff)
convert event assign page to .ui format
Change-Id: I99312fdba95a868c836af6452abec31565f2d067
Diffstat (limited to 'cui')
-rw-r--r--cui/AllLangResTarget_cui.mk1
-rw-r--r--cui/UIConfig_cui.mk1
-rw-r--r--cui/source/customize/acccfg.cxx4
-rw-r--r--cui/source/customize/cfgutil.cxx60
-rw-r--r--cui/source/customize/macropg.cxx2
-rw-r--r--cui/source/inc/cfgutil.hxx14
-rw-r--r--cui/source/inc/macroass.hxx6
-rw-r--r--cui/source/tabpages/macroass.cxx115
-rw-r--r--cui/source/tabpages/macroass.hrc71
-rw-r--r--cui/source/tabpages/macroass.src107
-rw-r--r--cui/uiconfig/ui/eventassignpage.ui246
11 files changed, 352 insertions, 275 deletions
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index 4d16fd803dda..3650b3d72be4 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -58,7 +58,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/tabpages/autocdlg.src \
cui/source/tabpages/border.src \
cui/source/tabpages/frmdirlbox.src \
- cui/source/tabpages/macroass.src \
cui/source/tabpages/page.src \
cui/source/tabpages/paragrph.src \
cui/source/tabpages/strings.src \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 87ed9afe820e..71fa803b745d 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/cuiimapdlg \
cui/uiconfig/ui/dimensionlinestabpage \
cui/uiconfig/ui/editdictionarydialog \
+ cui/uiconfig/ui/eventassignpage \
cui/uiconfig/ui/formatnumberdialog \
cui/uiconfig/ui/gradientpage \
cui/uiconfig/ui/colorconfigwin \
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()
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 666cc8831285..2325aaaf6d45 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -111,8 +111,9 @@ class SfxConfigFunctionListBox : public SvTreeListBox
virtual void MouseMove( const MouseEvent& rMEvt );
public:
- SfxConfigFunctionListBox( Window*, const ResId& );
- ~SfxConfigFunctionListBox();
+ SfxConfigFunctionListBox(Window*, const ResId&);
+ SfxConfigFunctionListBox(Window*, WinBits nStyle);
+ ~SfxConfigFunctionListBox();
void ClearAll();
using Window::GetHelpText;
@@ -130,7 +131,6 @@ class SfxConfigGroupListBox : public SvTreeListBox
SvxConfigGroupBoxResource_Impl* pImp;
SfxConfigFunctionListBox* pFunctionListBox;
SfxGroupInfoArr_Impl aArr;
- sal_uLong nMode;
OUString m_sModuleLongName;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
@@ -165,15 +165,15 @@ protected:
virtual sal_Bool Expand( SvTreeListEntry* pParent );
public:
- SfxConfigGroupListBox ( Window* pParent,
- const ResId&,
- sal_uLong nConfigMode = 0 );
+ SfxConfigGroupListBox(Window* pParent, const ResId&);
+ SfxConfigGroupListBox(Window* pParent, WinBits nStyle);
~SfxConfigGroupListBox();
void ClearAll();
void Init(const css::uno::Reference< css::uno::XComponentContext >& xContext,
const css::uno::Reference< css::frame::XFrame >& xFrame,
- const OUString& sModuleLongName);
+ const OUString& sModuleLongName,
+ bool bEventMode);
void SetFunctionListBox( SfxConfigFunctionListBox *pBox )
{ pFunctionListBox = pBox; }
void Open( SvTreeListEntry*, sal_Bool );
diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx
index 149197ab8719..abe82544e02d 100644
--- a/cui/source/inc/macroass.hxx
+++ b/cui/source/inc/macroass.hxx
@@ -47,7 +47,7 @@ class _SfxMacroTabPage : public SfxTabPage
protected:
_SfxMacroTabPage_Impl* mpImpl;
- _SfxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet );
+ _SfxMacroTabPage( Window* pParent, const SfxItemSet& rItemSet );
void InitAndSetHandler();
void FillEvents();
@@ -91,7 +91,6 @@ class SfxMacroTabPage : public _SfxMacroTabPage
public:
SfxMacroTabPage(
Window* pParent,
- const ResId& rId,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
const SfxItemSet& rSet
);
@@ -100,14 +99,13 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
};
-class SfxMacroAssignDlg : public SfxNoLayoutSingleTabDialog
+class SfxMacroAssignDlg : public SfxSingleTabDialog
{
public:
SfxMacroAssignDlg(
Window* pParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
const SfxItemSet& rSet );
- virtual ~SfxMacroAssignDlg();
};
#endif
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index f1ec3a58d5ae..f968f25b9f4d 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -29,7 +29,6 @@
#include <sfx2/app.hxx>
#include <sfx2/evntconf.hxx>
#include <sfx2/objsh.hxx>
-#include "macroass.hrc"
#include "cuires.hrc"
#include <vcl/fixed.hxx>
#include "headertablistbox.hxx"
@@ -42,60 +41,39 @@ using ::com::sun::star::frame::XFrame;
class _SfxMacroTabPage_Impl
{
public:
- _SfxMacroTabPage_Impl( void );
- ~_SfxMacroTabPage_Impl();
+ _SfxMacroTabPage_Impl();
OUString maStaticMacroLBLabel;
PushButton* pAssignPB;
PushButton* pDeletePB;
- OUString* pStrEvent;
- OUString* pAssignedMacro;
+ OUString sStrEvent;
+ OUString sAssignedMacro;
MacroEventListBox* pEventLB;
+ VclFrame* pGroupFrame;
SfxConfigGroupListBox* pGroupLB;
- FixedText* pFT_MacroLBLabel;
+ VclFrame* pMacroFrame;
SfxConfigFunctionListBox* pMacroLB;
- FixedText* pMacroFT;
- OUString* pMacroStr;
-
sal_Bool bReadOnly;
Timer maFillGroupTimer;
sal_Bool bGotEvents;
bool m_bDummyActivated; ///< has this tab page already been activated
};
-_SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) :
- pAssignPB( NULL ),
- pDeletePB( NULL ),
- pStrEvent( NULL ),
- pAssignedMacro( NULL ),
- pEventLB( NULL ),
- pGroupLB( NULL ),
- pFT_MacroLBLabel( NULL ),
- pMacroLB( NULL ),
- pMacroFT( NULL ),
- pMacroStr( NULL ),
- bReadOnly( sal_False ),
- bGotEvents( sal_False )
+_SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl()
+ : pAssignPB(NULL)
+ , pDeletePB(NULL)
+ , pEventLB(NULL)
+ , pGroupFrame(NULL)
+ , pGroupLB(NULL)
+ , pMacroFrame(NULL)
+ , pMacroLB(NULL)
+ , bReadOnly(false)
+ , bGotEvents(false)
, m_bDummyActivated(false)
{
}
-_SfxMacroTabPage_Impl::~_SfxMacroTabPage_Impl()
-{
- delete pAssignPB;
- delete pDeletePB;
- delete pStrEvent;
- delete pAssignedMacro;
- delete pEventLB;
- delete pGroupLB;
- delete pMacroLB;
- delete pFT_MacroLBLabel;
- delete pMacroFT;
- delete pMacroStr;
-}
-
-
static sal_uInt16 aPageRg[] = {
SID_ATTR_MACROITEM, SID_ATTR_MACROITEM,
0
@@ -157,9 +135,8 @@ void _SfxMacroTabPage::EnableButtons()
mpImpl->pAssignPB->Enable( sal_False );
}
-_SfxMacroTabPage::_SfxMacroTabPage( Window* pParent, const ResId& rResId, const SfxItemSet& rAttrSet )
- : SfxTabPage( pParent, rResId, rAttrSet )
-
+_SfxMacroTabPage::_SfxMacroTabPage(Window* pParent, const SfxItemSet& rAttrSet)
+ : SfxTabPage(pParent, "EventAssignPage", "cui/ui/eventassignpage.ui", rAttrSet)
{
mpImpl = new _SfxMacroTabPage_Impl;
}
@@ -189,11 +166,8 @@ void _SfxMacroTabPage::AddEvent( const OUString & rEventName, sal_uInt16 nEventI
void _SfxMacroTabPage::ScriptChanged()
{
// get new areas and their functions
- {
- mpImpl->pGroupLB->Show();
- mpImpl->pMacroLB->Show();
- mpImpl->pMacroFT->SetText( *mpImpl->pMacroStr );
- }
+ mpImpl->pGroupFrame->Show();
+ mpImpl->pMacroFrame->Show();
EnableButtons();
}
@@ -307,7 +281,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox*, EMPTYARG )
OUString aLabelText;
if( !sScriptURI.isEmpty() )
aLabelText = pImpl->maStaticMacroLBLabel;
- pImpl->pFT_MacroLBLabel->SetText( aLabelText );
+ pImpl->pMacroFrame->set_label( aLabelText );
pThis->EnableButtons();
return 0;
@@ -404,9 +378,9 @@ void _SfxMacroTabPage::InitAndSetHandler()
rListBox.SetSelectionMode( SINGLE_SELECTION );
rListBox.SetTabs( &nTabs[0], MAP_APPFONT );
Size aSize( nTabs[ 2 ], 0 );
- rHeaderBar.InsertItem( ITEMID_EVENT, *mpImpl->pStrEvent, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
+ rHeaderBar.InsertItem( ITEMID_EVENT, mpImpl->sStrEvent, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
aSize.Width() = 1764; // don't know what, so 42^2 is best to use...
- rHeaderBar.InsertItem( ITMEID_ASSMACRO, *mpImpl->pAssignedMacro, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
+ rHeaderBar.InsertItem( ITMEID_ASSMACRO, mpImpl->sAssignedMacro, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );
rListBox.SetSpaceBetweenEntries( 0 );
mpImpl->pEventLB->Show();
@@ -426,7 +400,7 @@ void _SfxMacroTabPage::FillMacroList()
::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >(),
GetFrame(),
- OUString() );
+ OUString(), false);
}
void _SfxMacroTabPage::FillEvents()
@@ -459,22 +433,19 @@ void _SfxMacroTabPage::FillEvents()
}
}
-SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet )
- : _SfxMacroTabPage( pParent, rResId, rSet )
+SfxMacroTabPage::SfxMacroTabPage(Window* pParent, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet )
+ : _SfxMacroTabPage( pParent, rSet )
{
- mpImpl->pStrEvent = new OUString( CUI_RES( STR_EVENT ) );
- mpImpl->pAssignedMacro = new OUString( CUI_RES( STR_ASSMACRO ) );
- mpImpl->pEventLB = new MacroEventListBox( this, CUI_RES( LB_EVENT ) );
- mpImpl->pAssignPB = new PushButton( this, CUI_RES( PB_ASSIGN ) );
- mpImpl->pDeletePB = new PushButton( this, CUI_RES( PB_DELETE ) );
- mpImpl->pMacroFT = new FixedText( this, CUI_RES( FT_MACRO ) );
- mpImpl->pGroupLB = new SfxConfigGroupListBox_Impl( this, CUI_RES( LB_GROUP ) );
- mpImpl->pFT_MacroLBLabel = new FixedText( this, CUI_RES( FT_LABEL4LB_MACROS ) );
- mpImpl->maStaticMacroLBLabel= mpImpl->pFT_MacroLBLabel->GetText();
- mpImpl->pMacroLB = new SfxConfigFunctionListBox_Impl( this, CUI_RES( LB_MACROS ) );
- mpImpl->pMacroStr = new OUString( CUI_RES( STR_MACROS ) );
-
- FreeResource();
+ mpImpl->sStrEvent = get<FixedText>("eventft")->GetText();
+ mpImpl->sAssignedMacro = get<FixedText>("assignft")->GetText();
+ get(mpImpl->pEventLB , "assignments");
+ get(mpImpl->pAssignPB, "assign");
+ get(mpImpl->pDeletePB, "delete");
+ get(mpImpl->pGroupFrame, "groupframe");
+ get(mpImpl->pGroupLB, "libraries");
+ get(mpImpl->pMacroFrame, "macroframe");
+ mpImpl->maStaticMacroLBLabel = mpImpl->pMacroFrame->get_label();
+ get(mpImpl->pMacroLB, "macros");
SetFrame( rxDocumentFrame );
@@ -487,7 +458,7 @@ namespace
{
SfxMacroTabPage* CreateSfxMacroTabPage( Window* pParent, const SfxItemSet& rAttrSet )
{
- return new SfxMacroTabPage( pParent, CUI_RES( RID_SVXPAGE_EVENTASSIGN ), NULL, rAttrSet );
+ return new SfxMacroTabPage( pParent, NULL, rAttrSet );
}
}
@@ -496,18 +467,14 @@ SfxTabPage* SfxMacroTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet
return CreateSfxMacroTabPage(pParent, rAttrSet);
}
-SfxMacroAssignDlg::SfxMacroAssignDlg( Window* pParent, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet )
- : SfxNoLayoutSingleTabDialog( pParent, rSet, 0 )
+SfxMacroAssignDlg::SfxMacroAssignDlg(Window* pParent,
+ const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet)
+ : SfxSingleTabDialog(pParent, rSet)
{
- SfxMacroTabPage* pPage = CreateSfxMacroTabPage(this, rSet);
+ SfxMacroTabPage* pPage = CreateSfxMacroTabPage(get_content_area(), rSet);
pPage->SetFrame( rxDocumentFrame );
- SetTabPage( pPage );
+ setTabPage( pPage );
pPage->LaunchFillGroup();
}
-SfxMacroAssignDlg::~SfxMacroAssignDlg()
-{
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/macroass.hrc b/cui/source/tabpages/macroass.hrc
deleted file mode 100644
index 0eb1cb5f766b..000000000000
--- a/cui/source/tabpages/macroass.hrc
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _MACROASS_HRC
-#define _MACROASS_HRC
-
-#include <svtools/controldims.hrc>
-
-#define LB_EVENT 2
-#define PB_ASSIGN 3
-#define PB_DELETE 4
-#define FT_MACRO 5
-#define LB_GROUP 6
-#define LB_MACROS 7
- // FREE
-#define FT_LABEL4LB_MACROS 9
-#define STR_MACROS 11
-#define STR_EVENT 13
-#define STR_ASSMACRO 14
-
-
-// COL0<---------------WIDTH_1_2--------------->COL3<->COL4<----WIDTH4---->COL5
-// <--WIDTH1-->COL1<-SPACE1->COL2<--WIDTH2->
-
-#define WIDTH_TP 260 // of whole tabpage
-#define COL5 (WIDTH_TP-RSC_SP_DLG_INNERBORDER_RIGHT)
-#define COL4 (COL5-RSC_CD_PUSHBUTTON_WIDTH)
-#define COL3 (COL4-RSC_SP_CTRL_X)
-#define COL0 (RSC_SP_TBPG_INNERBORDER_LEFT)
-#define WIDTH1_2 (COL3-COL0) // width of upper listbox
-#define SPACE1 4 // space between lower listboxes
-#define WIDTH1 ((WIDTH1_2-SPACE1)/2) // width of lower left listbox
-#define WIDTH2 (WIDTH1_2-WIDTH1-SPACE1) // width of lower right listbox
-#define COL1 (COL0+WIDTH1)
-#define COL2 (COL1+SPACE1)
-
-#define HEIGHT_TP 185 // of whole tabpage
-#define HEIGHT0 62 // of upper listbox
-#define ROW0 6 // more than RSC_SP_FLGR_INNERBORDER_TOP cause of bad design
-#define ROW1 (ROW0+RSC_CD_PUSHBUTTON_HEIGHT) // Assign button
-#define ROW2 (ROW1+RSC_SP_CTRL_GROUP_Y)
-#define ROW3 (ROW2+RSC_CD_PUSHBUTTON_HEIGHT) // Remove button
-#define ROW4 (ROW3+RSC_SP_CTRL_GROUP_Y)
-#define ROW5 (ROW4+RSC_CD_DROPDOWN_HEIGHT) // script type listbox (hidden)
-#define ROW6 (ROW0+HEIGHT0)
-#define ROW7 (ROW6+RSC_SP_CTRL_Y)
-#define HEIGHT_EXTRA7 (RSC_CD_FIXEDTEXT_HEIGHT) // additional height for FT_LABEL4LB_MACROS
-#define ROW7A (ROW7+HEIGHT_EXTRA7)
-#define ROW8 (ROW7+RSC_CD_FIXEDTEXT_HEIGHT+HEIGHT_EXTRA7)// label for lower listboxes (2 lines!)
-#define ROW9 (HEIGHT_TP-RSC_SP_TBPG_INNERBORDER_BOTTOM)
-#define HEIGHT8 (ROW9-ROW8) // of lower listboxes
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/macroass.src b/cui/source/tabpages/macroass.src
deleted file mode 100644
index 1d95bd3bab18..000000000000
--- a/cui/source/tabpages/macroass.src
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "macroass.hrc"
-#include "cuires.hrc"
-#include "helpid.hrc"
-#include <svx/dialogs.hrc>
-
-TabPage RID_SVXPAGE_EVENTASSIGN
-{
- HelpID = "cui:TabPage:RID_SVXPAGE_EVENTASSIGN";
- Hide = TRUE ;
- SVLook = TRUE ;
- DialogControl = TRUE ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- Text [ en-US ] = "Assign Macro" ;
- String STR_EVENT
- {
- Text [ en-US ] = "Event" ;
- };
- String STR_ASSMACRO
- {
- Text [ en-US ] = "Assigned macro";
- };
- Control LB_EVENT
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( COL0 , ROW0 ) ;
- Size = MAP_APPFONT ( WIDTH1_2 , HEIGHT0 ) ;
- TabStop = TRUE ;
- DialogControl = TRUE ;
- ClipChildren = TRUE ;
- Disable = TRUE ;
- Group = TRUE ;
- HelpID = HID_MACRO_LB_EVENT ;
- };
- FixedText FT_MACRO
- {
- Pos = MAP_APPFONT ( COL0 , ROW7A ) ;
- Size = MAP_APPFONT ( WIDTH1 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
- Group = TRUE ;
- };
- Control LB_GROUP
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( COL0 , ROW8 ) ;
- Size = MAP_APPFONT ( WIDTH1 , HEIGHT8 ) ;
- TabStop = TRUE ;
- Group = TRUE ;
- HelpId = HID_MACRO_GROUP ;
- };
- FixedText FT_LABEL4LB_MACROS
- {
- Pos = MAP_APPFONT ( COL2 , ROW7 ) ;
- Size = MAP_APPFONT ( WIDTH1 , RSC_CD_FIXEDTEXT_HEIGHT + HEIGHT_EXTRA7 ) ;
- WordBreak = TRUE;
- Text [ en-US ] = "~Existing macros\n" ;
- };
- Control LB_MACROS
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( COL2 , ROW8 ) ;
- Size = MAP_APPFONT ( WIDTH2 , HEIGHT8 ) ;
- TabStop = TRUE ;
- HelpId = HID_MACRO_MACROS ;
- };
- PushButton PB_ASSIGN
- {
- HelpID = "cui:PushButton:RID_SVXPAGE_EVENTASSIGN:PB_ASSIGN";
- Pos = MAP_APPFONT ( COL4 , ROW0 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- Disable = TRUE ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Assign" ;
- };
- PushButton PB_DELETE
- {
- HelpID = "cui:PushButton:RID_SVXPAGE_EVENTASSIGN:PB_DELETE";
- Pos = MAP_APPFONT ( COL4 , ROW2 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- Disable = TRUE ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Remove" ;
- };
- String STR_MACROS
- {
- Text [ en-US ] = "Macros" ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/eventassignpage.ui b/cui/uiconfig/ui/eventassignpage.ui
new file mode 100644
index 000000000000..b7e2c644eb28
--- /dev/null
+++ b/cui/uiconfig/ui/eventassignpage.ui
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Thu Jan 23 11:55:04 2014 -->
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkGrid" id="EventAssignPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">12</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="macroframe">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="cuilo-SfxConfigFunctionListBox" id="macros:border">
+ <property name="width_request">280</property>
+ <property name="height_request">300</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="Tree List-selection"/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="existingmacrosft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Existing macros</property>
+ <property name="track_visited_links">False</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="groupframe">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="cuilo-SfxConfigGroupListBox" id="libraries:border">
+ <property name="width_request">280</property>
+ <property name="height_request">300</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="Macro Library List-selection"/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="macrotoft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Macro from</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="cuilo-MacroEventListBox" id="assignments:border">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="column_homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="eventft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Event</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="assignft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Assigned Action</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="libraryft1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Assignments</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox" id="buttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="assign">
+ <property name="label" translatable="yes">Assign</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="delete">
+ <property name="label">Remove</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">2</property>
+ </packing>
+ </child>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="macroframe"/>
+ <widget name="groupframe"/>
+ </widgets>
+ </object>
+</interface>