Kaydet (Commit) 39366b11 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert macro assign page to .ui

as seen in calc->right click on tab->sheet events

Change-Id: I4df1e1c7f79f4f6431905bfc286a0f9d214ccf6c
üst 89b0017b
......@@ -66,6 +66,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/linetabpage \
cui/uiconfig/ui/lineendstabpage \
cui/uiconfig/ui/linestyletabpage \
cui/uiconfig/ui/macroassignpage \
cui/uiconfig/ui/macroselectordialog \
cui/uiconfig/ui/messbox \
cui/uiconfig/ui/movemenu \
......
......@@ -61,14 +61,14 @@ SvxEventConfigPage::SvxEventConfigPage( Window *pParent, const SfxItemSet& rSet,
aSaveInListBox( this, CUI_RES( LB_SAVEIN ) ),
bAppConfig ( sal_True )
{
mpImpl->pStrEvent = new OUString( CUI_RES( STR_EVENT ));
mpImpl->pAssignedMacro = new OUString( CUI_RES( STR_ASSMACRO ));
mpImpl->sStrEvent = OUString( CUI_RES( STR_EVENT ));
mpImpl->sAssignedMacro = OUString( CUI_RES( STR_ASSMACRO ));
mpImpl->pEventLB = new MacroEventListBox( this, CUI_RES( LB_EVENT ));
mpImpl->pAssignFT = new FixedText( this, CUI_RES( FT_ASSIGN ));
mpImpl->pAssignPB = new PushButton( this, CUI_RES( PB_ASSIGN ));
mpImpl->pDeletePB = new PushButton( this, CUI_RES( PB_DELETE ));
mpImpl->pMacroImg = new Image( CUI_RES( IMG_MACRO) );
mpImpl->pComponentImg = new Image( CUI_RES( IMG_COMPONENT) );
mpImpl->aMacroImg = Image( CUI_RES( IMG_MACRO) );
mpImpl->aComponentImg = Image( CUI_RES( IMG_COMPONENT) );
FreeResource();
......@@ -108,7 +108,10 @@ void SvxEventConfigPage::LateInit( const uno::Reference< frame::XFrame >& _rxFra
SvxEventConfigPage::~SvxEventConfigPage()
{
//DF Do I need to delete bools?
delete mpImpl->pEventLB;
delete mpImpl->pAssignFT;
delete mpImpl->pAssignPB;
delete mpImpl->pDeletePB;
}
// -----------------------------------------------------------------------
......@@ -213,11 +216,4 @@ sal_Bool SvxEventConfigPage::FillItemSet( SfxItemSet& rSet )
return _SvxMacroTabPage::FillItemSet( rSet );
}
// -----------------------------------------------------------------------
void SvxEventConfigPage::Reset( const SfxItemSet& )
{
_SvxMacroTabPage::Reset();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -55,8 +55,6 @@ public:
protected:
virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
using _SvxMacroTabPage::Reset;
private:
void ImplInitDocument();
......
......@@ -26,75 +26,6 @@
#define MASKCOLOR MaskColor = \
Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
TabPage RID_SVXPAGE_MACROASSIGN
{
HelpID = "cui:TabPage:RID_SVXPAGE_MACROASSIGN" ;
Hide = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
Text [ en-US ] = "Assign action" ;
String STR_EVENT
{
Text [ en-US ] = "Event" ;
};
String STR_ASSMACRO
{
Text [ en-US ] = "Assigned Action" ;
};
Control LB_EVENT
{
Border = TRUE ;
TabStop = TRUE;
Pos = MAP_APPFONT ( COL0 , ROW0 ) ;
Size = MAP_APPFONT ( WIDTH1_2 , HEIGHT0 ) ;
HelpID = HID_SVX_MACRO_LB_EVENT ;
};
FixedText FT_ASSIGN
{
Pos = MAP_APPFONT ( COL4 , ROW0 ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "Assign:" ;
};
PushButton PB_ASSIGN
{
HelpID = "cui:PushButton:RID_SVXPAGE_MACROASSIGN:PB_ASSIGN";
Pos = MAP_APPFONT ( COL4 , ROW0A ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
Text [ en-US ] = "M~acro..." ;
Disable = TRUE ;
TabStop = TRUE ;
};
PushButton PB_ASSIGN_COMPONENT
{
HelpID = "cui:PushButton:RID_SVXPAGE_MACROASSIGN:PB_ASSIGN_COMPONENT";
Pos = MAP_APPFONT ( COL4 , ROW2 ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
Disable = TRUE ;
TabStop = TRUE ;
Text [ en-US ] = "Com~ponent..." ;
};
PushButton PB_DELETE
{
HelpID = "cui:PushButton:RID_SVXPAGE_MACROASSIGN:PB_DELETE";
Pos = MAP_APPFONT ( COL4 , ROW5_REMOVE ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
Text [ en-US ] = "~Remove" ;
Disable = TRUE ;
TabStop = TRUE ;
};
Image IMG_MACRO
{
ImageBitmap = Bitmap { File = "id018.png"; };
MASKCOLOR
};
Image IMG_COMPONENT
{
ImageBitmap = Bitmap { File = "component_16.png"; };
MASKCOLOR
};
};
ModalDialog RID_SVXDLG_ASSIGNCOMPONENT
{
HelpID = "cui:ModalDialog:RID_SVXDLG_ASSIGNCOMPONENT";
......
......@@ -23,20 +23,19 @@
class _SvxMacroTabPage_Impl
{
public:
_SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet );
~_SvxMacroTabPage_Impl();
_SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet );
FixedText* pAssignFT;
PushButton* pAssignPB;
PushButton* pAssignComponentPB;
PushButton* pDeletePB;
Image* pMacroImg;
Image* pComponentImg;
OUString* pStrEvent;
OUString* pAssignedMacro;
Image aMacroImg;
Image aComponentImg;
OUString sStrEvent;
OUString sAssignedMacro;
MacroEventListBox* pEventLB;
sal_Bool bReadOnly;
sal_Bool bIDEDialogMode;
sal_Bool bReadOnly;
sal_Bool bIDEDialogMode;
};
class AssignComponentDialog : public ModalDialog
......
......@@ -34,8 +34,10 @@ protected:
virtual bool Notify( NotifyEvent& rNEvt );
public:
MacroEventListBox( Window* pParent, const ResId& rId );
MacroEventListBox( Window* pParent, WinBits nStyle );
void Resize();
virtual void Resize();
virtual Size GetOptimalSize() const;
SvHeaderTabListBox& GetListBox()
{
......
......@@ -72,7 +72,8 @@ protected:
bool bReadOnly, bDocModified, bAppEvents, bInitialized;
EventDisplayNames aDisplayNames;
_SvxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet );
_SvxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet );
_SvxMacroTabPage( Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet& rItemSet );
void EnableButtons();
::com::sun::star::uno::Any GetPropsByName( const OUString& eventName, EventsHash& eventsHash );
......@@ -86,8 +87,7 @@ public:
void InitAndSetHandler( ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > xAppEvents, ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > xDocEvents, ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifiable > xModifiable );
virtual sal_Bool FillItemSet( SfxItemSet& rSet );
using SfxTabPage::Reset;
virtual void Reset();
virtual void Reset( const SfxItemSet& );
void DisplayAppEvents( bool appEvents);
void SetReadOnly( sal_Bool bSet );
......@@ -104,33 +104,18 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > xNameReplace,
sal_uInt16 nSelectedIndex
);
virtual ~SvxMacroTabPage();
};
// class SvxMacroAssignDlg --------------------------------------------------
typedef sal_uInt16* (*GetTabPageRanges)(); // gives international Which-values
class SvxMacroAssignSingleTabDialog : public SfxModalDialog
class SvxMacroAssignSingleTabDialog : public SfxSingleTabDialog
{
public:
SvxMacroAssignSingleTabDialog( Window* pParent, const SfxItemSet& rOptionsSet, sal_uInt16 nUniqueId );
virtual ~SvxMacroAssignSingleTabDialog();
void SetTabPage( SfxTabPage* pTabPage );
SvxMacroAssignSingleTabDialog(Window* pParent, const SfxItemSet& rOptionsSet);
private:
FixedLine* pFixedLine;
OKButton* pOKBtn;
CancelButton* pCancelBtn;
HelpButton* pHelpBtn;
SfxTabPage* pPage;
const SfxItemSet* pOptions;
SfxItemSet* pOutSet;
DECL_DLLPRIVATE_LINK( OKHdl_Impl, Button * );
};
......@@ -145,7 +130,6 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace >& xNameReplace,
sal_uInt16 nSelectedIndex
);
virtual ~SvxMacroAssignDlg();
};
#endif
......
This diff is collapsed.
......@@ -18,6 +18,9 @@
<glade-widget-class title="Font PickListBox" name="smlo-SmFontPickListBox"
generic-name="SmFontPickListBox" parent="GtkComboBoxText"
icon-name="widget-gtk-comboboxtext"/>
<glade-widget-class title="Macro EventListBox" name="cuilo-MacroEventListBox"
generic-name="Macro EventListBox" parent="GtkComboBoxText"
icon-name="widget-gtk-comboboxtext"/>
<glade-widget-class title="Thesaurus View" name="cuilo-ThesaurusAlternativesCtrl"
generic-name="ThesaurusAlternativesCtrl" parent="GtkTextView"
icon-name="widget-gtk-textview"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment