Kaydet (Commit) 0cf14968 authored tarafından Szymon Kłos's avatar Szymon Kłos Kaydeden (comit) Caolán McNamara

RID_FORMULADLG_FORMULA conversion to .ui

Change-Id: I098c9ee9d22ac0401faf7fc6d65e91bf5b4b2bf8
Reviewed-on: https://gerrit.libreoffice.org/9797Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 55561240
...@@ -608,6 +608,15 @@ ...@@ -608,6 +608,15 @@
<glade-widget-class title="Reference Edit" name="foruilo-RefEdit" <glade-widget-class title="Reference Edit" name="foruilo-RefEdit"
generic-name="Reference Edit" parent="GtkEntry" generic-name="Reference Edit" parent="GtkEntry"
icon-name="widget-gtk-textentry"/> icon-name="widget-gtk-textentry"/>
<glade-widget-class title="Edit" name="foruilo-ArgEdit"
generic-name="Edit" parent="GtkEntry"
icon-name="widget-gtk-textentry"/>
<glade-widget-class title="Value entry" name="foruilo-ValWnd"
generic-name="Value entry" parent="GtkEntry"
icon-name="widget-gtk-textentry"/>
<glade-widget-class title="Edit Box" name="foruilo-EditBox"
generic-name="Edit Box" parent="GtkTextView"
icon-name="widget-gtk-textview"/>
<glade-widget-class title="Another NoSpace Edit" name="cuilo-SvxNoSpaceEdit" <glade-widget-class title="Another NoSpace Edit" name="cuilo-SvxNoSpaceEdit"
generic-name="Another NoSpace Edit" parent="GtkEntry" generic-name="Another NoSpace Edit" parent="GtkEntry"
...@@ -712,5 +721,12 @@ ...@@ -712,5 +721,12 @@
generic-name="DriverListControl" parent="GtkEntry" generic-name="DriverListControl" parent="GtkEntry"
icon-name="widget-gtk-combobox"/> icon-name="widget-gtk-combobox"/>
<glade-widget-class title="Formula ListBox" name="foruilo-FormulaListBox"
generic-name="Formula ListBox" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="Formula ListBox" name="foruilo-StructListBox"
generic-name="Formula ListBox" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
</glade-widget-classes> </glade-widget-classes>
</glade-catalog> </glade-catalog>
...@@ -17,6 +17,7 @@ $(eval $(call gb_Module_add_targets,formula,\ ...@@ -17,6 +17,7 @@ $(eval $(call gb_Module_add_targets,formula,\
$(eval $(call gb_Module_add_l10n_targets,formula,\ $(eval $(call gb_Module_add_l10n_targets,formula,\
AllLangResTarget_for \ AllLangResTarget_for \
AllLangResTarget_forui \ AllLangResTarget_forui \
UIConfig_formula \
)) ))
# vim: set noet sw=4 ts=4: # vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
#
$(eval $(call gb_UIConfig_UIConfig,formula))
$(eval $(call gb_UIConfig_add_uifiles,formula,\
formula/uiconfig/ui/formuladialog \
formula/uiconfig/ui/functionpage \
formula/uiconfig/ui/structpage \
formula/uiconfig/ui/parameter \
))
# vim: set noet sw=4 ts=4:
...@@ -29,12 +29,14 @@ namespace formula ...@@ -29,12 +29,14 @@ namespace formula
class ValWnd : public Window class ValWnd : public Window
{ {
public: public:
ValWnd( Window* pParent, const ResId& rId ); ValWnd( Window* pParent, WinBits nBits );
void SetValue( const OUString& rStrVal ); void SetValue( const OUString& rStrVal );
protected: protected:
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
virtual Size GetOptimalSize() const SAL_OVERRIDE;
private: private:
OUString aStrValue; OUString aStrValue;
...@@ -62,7 +64,7 @@ protected: ...@@ -62,7 +64,7 @@ protected:
public: public:
EditBox( Window* pParent, const ResId& rResId ); EditBox( Window* pParent, WinBits nBits );
virtual ~EditBox(); virtual ~EditBox();
...@@ -80,7 +82,7 @@ public: ...@@ -80,7 +82,7 @@ public:
class ArgEdit : public RefEdit class ArgEdit : public RefEdit
{ {
public: public:
ArgEdit( Window* pParent, const ResId& rResId ); ArgEdit( Window* pParent, WinBits nBits );
void Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit, void Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
ScrollBar& rArgSlider, sal_uInt16 nArgCount ); ScrollBar& rArgSlider, sal_uInt16 nArgCount );
...@@ -111,7 +113,7 @@ private: ...@@ -111,7 +113,7 @@ private:
Link aEdModifyLink; Link aEdModifyLink;
FixedText* pFtArg; FixedText* pFtArg;
ImageButton* pBtnFx; PushButton* pBtnFx;
ArgEdit* pEdArg; ArgEdit* pEdArg;
RefButton* pRefBtn; RefButton* pRefBtn;
...@@ -138,7 +140,7 @@ public: ...@@ -138,7 +140,7 @@ public:
virtual ~ArgInput() {} virtual ~ArgInput() {}
void InitArgInput ( FixedText* pftArg, void InitArgInput ( FixedText* pftArg,
ImageButton* pbtnFx, PushButton* pbtnFx,
ArgEdit* pedArg, ArgEdit* pedArg,
RefButton* prefBtn); RefButton* prefBtn);
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#define FT_RESULT 1 #define FT_RESULT 1
#define WND_RESULT 2 #define WND_RESULT 2
#define FT_EDITNAME 3 #define FT_EDITNAME 3
#define STR_TITLE1 4
#define STR_TITLE2 5
#define BTN_HELP 6 #define BTN_HELP 6
#define BTN_CANCEL 7 #define BTN_CANCEL 7
#define BTN_BACKWARD 8 #define BTN_BACKWARD 8
...@@ -39,29 +37,9 @@ ...@@ -39,29 +37,9 @@
#define RB_REF 20 #define RB_REF 20
#define FT_FORMULA_RESULT 21 #define FT_FORMULA_RESULT 21
#define WND_FORMULA_RESULT 22 #define WND_FORMULA_RESULT 22
#define STR_END 23
// Fuer Tabpage // Fuer Tabpage
#define TP_FUNCTION 1 #define TP_FUNCTION 1
#define TP_STRUCT 2 #define TP_STRUCT 2
// Funktions-Tabpage
#define FT_FUNCTION 1
#define FT_CATEGORY 2
#define LB_CATEGORY 3
#define LB_FUNCTION 4
// Struktur-Tabpage
#define FT_STRUCT 1
#define TLB_STRUCT 2
// Bitmaps
#define BMP_STR_CLOSE 1
#define BMP_STR_OPEN 2
#define BMP_STR_END 3
#define BMP_STR_ERROR 4
// Texte
#define STR_STRUCT_ERR1 1
#define STR_STRUCT_ERR2 2
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -23,97 +23,40 @@ ...@@ -23,97 +23,40 @@
#define STD_MASKCOLOR Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; } #define STD_MASKCOLOR Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; }
TabPage RID_FORMULATAB_FUNCTION Image BMP_STR_CLOSE
{ {
Hide = TRUE ; ImageBitmap = Bitmap { File = "fapclose.bmp"; };
Size = MAP_APPFONT ( 96 , 180 ) ; MaskColor = STD_MASKCOLOR;
HelpId = HID_FORMULATAB_FUNCTION ;
// Titel wird dynamisch gesetzt (s.u.)
// 1. Seite
ListBox LB_CATEGORY
{
HelpId = HID_FORMULA_LB_CATEGORY;
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 86 , 112 ) ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "Last Used" ; Default ; > ;
< "All" ; Default ; > ;
};
};
ListBox LB_FUNCTION
{
HelpId = HID_FORMULA_LB_FUNCTION;
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 43 ) ;
Size = MAP_APPFONT ( 86 , 133 ) ;
Sort = TRUE;
};
FixedText FT_CATEGORY
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 84 , 8 ) ;
Text [ en-US ] = "~Category" ;
};
FixedText FT_FUNCTION
{
Pos = MAP_APPFONT ( 6 , 32 ) ;
Size = MAP_APPFONT ( 72 , 8 ) ;
Text [ en-US ] = "~Function" ;
};
}; };
TabPage RID_FORMULATAB_STRUCT
Image BMP_STR_OPEN
{ {
Hide = TRUE ; ImageBitmap = Bitmap { File = "fapopen.bmp"; };
Size = MAP_APPFONT ( 96 , 180 ) ; MaskColor = STD_MASKCOLOR;
HelpId = HID_FORMULATAB_STRUCT ; };
// Titel wird dynamisch gesetzt (s.u.)
// 1. Seite Image BMP_STR_END
Control TLB_STRUCT {
{ ImageBitmap = Bitmap { File = "fapok.bmp"; };
Border = TRUE ; MaskColor = STD_MASKCOLOR;
TabStop = TRUE ; };
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 86 , 162 ) ; Image BMP_STR_ERROR
HelpId = HID_FORMULA_FAP_STRUCT ; {
}; ImageBitmap = Bitmap { File = "faperror.bmp"; };
FixedText FT_STRUCT MaskColor = STD_MASKCOLOR;
{ };
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 86 , 8 ) ; String STR_STRUCT_ERR1
Text [ en-US ] = "~Structure" ; {
}; Text [ en-US ] = "=?" ;
Image BMP_STR_CLOSE };
{
ImageBitmap = Bitmap { File = "fapclose.bmp"; }; String STR_STRUCT_ERR2
MaskColor = STD_MASKCOLOR; {
}; Text [ en-US ] = "Error" ;
Image BMP_STR_OPEN
{
ImageBitmap = Bitmap { File = "fapopen.bmp"; };
MaskColor = STD_MASKCOLOR;
};
Image BMP_STR_END
{
ImageBitmap = Bitmap { File = "fapok.bmp"; };
MaskColor = STD_MASKCOLOR;
};
Image BMP_STR_ERROR
{
ImageBitmap = Bitmap { File = "faperror.bmp"; };
MaskColor = STD_MASKCOLOR;
};
String STR_STRUCT_ERR1
{
Text [ en-US ] = "=?" ;
};
String STR_STRUCT_ERR2
{
Text [ en-US ] = "Error" ;
};
}; };
ModalDialog RID_FORMULADLG_FORMULA_MODAL ModalDialog RID_FORMULADLG_FORMULA_MODAL
{ {
SVLook = TRUE ; SVLook = TRUE ;
...@@ -280,170 +223,20 @@ ModalDialog RID_FORMULADLG_FORMULA_MODAL ...@@ -280,170 +223,20 @@ ModalDialog RID_FORMULADLG_FORMULA_MODAL
}; };
}; };
ModelessDialog RID_FORMULADLG_FORMULA
String STR_TITLE1
{ {
Hide = TRUE ; Text [ en-US ] = "Function Wizard" ;
SVLook = TRUE ; };
Size = MAP_APPFONT ( 321 , 228 ) ;
HelpId = HID_FORMULADLG_FORMULA ; String STR_TITLE2
Moveable = TRUE ; {
TabControl TC_FUNCTION Text [ en-US ] = "Function Wizard -" ;
{ };
HelpID = "formula:TabControl:RID_FORMULADLG_FORMULA:TC_FUNCTION";
Pos = MAP_APPFONT ( 6 , 5 ) ; String STR_END
Size = MAP_APPFONT ( 102 , 199 ) ; {
PageList = Text [ en-US ] = "~End" ;
{
PageItem
{
Identifier = TP_FUNCTION ;
Text [ en-US ] = "Functions" ;
};
PageItem
{
Identifier = TP_STRUCT ;
Text [ en-US ] = "Structure" ;
};
};
};
FixedText FT_HEADLINE
{
Pos = MAP_APPFONT ( 115 , 24 ) ;
Size = MAP_APPFONT ( 194 , 8 ) ;
WordBreak = TRUE ;
};
FixedText FT_FUNCNAME
{
Pos = MAP_APPFONT ( 115 , 38 ) ;
Size = MAP_APPFONT ( 194 , 24 ) ;
WordBreak = TRUE ;
};
FixedText FT_FUNCDESC
{
Pos = MAP_APPFONT ( 115 , 68 ) ;
Size = MAP_APPFONT ( 194 , 64 ) ;
WordBreak = TRUE ;
};
FixedText FT_EDITNAME
{
Pos = MAP_APPFONT ( 113 , 6 ) ;
Size = MAP_APPFONT ( 83 , 10 ) ;
};
GroupBox GB_EDIT
{
Pos = MAP_APPFONT ( 112 , 18 ) ;
Size = MAP_APPFONT ( 203 , 128 ) ;
};
FixedText FT_FORMULA
{
Pos = MAP_APPFONT ( 112 , 151 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
WordBreak = TRUE ;
Text [ en-US ] = "For~mula" ;
};
Control ED_FORMULA
{
Border = TRUE ;
Pos = MAP_APPFONT ( 112 , 161 ) ;
Size = MAP_APPFONT ( 203 , 43 ) ;
HelpId = HID_FORMULA_FAP_FORMULA ;
};
FixedText FT_RESULT
{
Pos = MAP_APPFONT ( 198 , 6 ) ;
Size = MAP_APPFONT ( 55 , 10 ) ;
Right = TRUE ;
Text [ en-US ] = "Function result" ;
};
Window WND_RESULT
{
Border = TRUE ;
Pos = MAP_APPFONT ( 255 , 4 ) ;
Size = MAP_APPFONT ( 60 , 12 ) ;
};
FixedText FT_FORMULA_RESULT
{
Pos = MAP_APPFONT ( 217 , 149 ) ;
Size = MAP_APPFONT ( 35 , 10 ) ;
Text [ en-US ] = "Result" ;
Right = TRUE ;
};
Window WND_FORMULA_RESULT
{
Border = TRUE ;
Pos = MAP_APPFONT ( 255 , 147 ) ;
Size = MAP_APPFONT ( 60 , 12 ) ;
};
CheckBox BTN_MATRIX
{
HelpID = "formula:CheckBox:RID_FORMULADLG_FORMULA:BTN_MATRIX";
Pos = MAP_APPFONT ( 6 , 208 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Array" ;
};
Edit ED_REF
{
HelpID = "formula:Edit:RID_FORMULADLG_FORMULA:ED_REF";
Border = TRUE ;
Pos = MAP_APPFONT ( 76 , 205 ) ;
Size = MAP_APPFONT ( 66 , 12 ) ;
};
ImageButton RB_REF
{
HelpID = "formula:ImageButton:RID_FORMULADLG_FORMULA:RB_REF";
Pos = MAP_APPFONT ( 144 , 205 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
QuickHelpText [ en-US ] = "Maximize" ;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 72 , 208 ) ;
Size = MAP_APPFONT ( 45 , 14 ) ;
TabStop = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 121 , 208 ) ;
Size = MAP_APPFONT ( 45 , 14 ) ;
TabStop = TRUE ;
};
PushButton BTN_BACKWARD
{
HelpID = "formula:PushButton:RID_FORMULADLG_FORMULA:BTN_BACKWARD";
Pos = MAP_APPFONT ( 171 , 208 ) ;
Size = MAP_APPFONT ( 45 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "<< ~Back" ;
};
PushButton BTN_FORWARD
{
HelpID = "formula:PushButton:RID_FORMULADLG_FORMULA:BTN_FORWARD";
Pos = MAP_APPFONT ( 219 , 208 ) ;
Size = MAP_APPFONT ( 45 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Next >>" ;
};
OKButton BTN_END
{
Pos = MAP_APPFONT ( 270 , 208 ) ;
Size = MAP_APPFONT ( 45 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
String STR_TITLE1
{
Text [ en-US ] = "Function Wizard" ;
};
String STR_TITLE2
{
Text [ en-US ] = "Function Wizard -" ;
};
String STR_END
{
Text [ en-US ] = "~End" ;
};
}; };
Image RID_BMP_REFBTN1 Image RID_BMP_REFBTN1
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
namespace formula namespace formula
{ {
FormulaListBox::FormulaListBox( Window* pParent, const ResId& rResId ): FormulaListBox::FormulaListBox( Window* pParent, WinBits nBits ):
ListBox(pParent,rResId) ListBox(pParent, nBits)
{} {}
void FormulaListBox::KeyInput( const KeyEvent& rKEvt ) void FormulaListBox::KeyInput( const KeyEvent& rKEvt )
...@@ -57,6 +57,11 @@ bool FormulaListBox::PreNotify( NotifyEvent& rNEvt ) ...@@ -57,6 +57,11 @@ bool FormulaListBox::PreNotify( NotifyEvent& rNEvt )
return nResult; return nResult;
} }
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeFormulaListBox(Window *pParent, VclBuilder::stringmap &)
{
return new FormulaListBox(pParent, WB_BORDER | WB_SORT);
}
inline sal_uInt16 Lb2Cat( sal_uInt16 nLbPos ) inline sal_uInt16 Lb2Cat( sal_uInt16 nLbPos )
{ {
// Category 0 == LRU, otherwise Categories == LbPos-1 // Category 0 == LRU, otherwise Categories == LbPos-1
...@@ -67,16 +72,17 @@ inline sal_uInt16 Lb2Cat( sal_uInt16 nLbPos ) ...@@ -67,16 +72,17 @@ inline sal_uInt16 Lb2Cat( sal_uInt16 nLbPos )
} }
FuncPage::FuncPage(Window* pParent,const IFunctionManager* _pFunctionManager): FuncPage::FuncPage(Window* pParent,const IFunctionManager* _pFunctionManager):
TabPage(pParent,ModuleRes(RID_FORMULATAB_FUNCTION)), TabPage(pParent, "FunctionPage", "formula/ui/functionpage.ui"),
aFtCategory ( this, ModuleRes( FT_CATEGORY ) ),
aLbCategory ( this, ModuleRes( LB_CATEGORY ) ),
aFtFunction ( this, ModuleRes( FT_FUNCTION ) ),
aLbFunction ( this, ModuleRes( LB_FUNCTION ) ),
m_pFunctionManager(_pFunctionManager) m_pFunctionManager(_pFunctionManager)
{ {
FreeResource(); get(m_pLbCategory, "category");
m_aHelpId = aLbFunction.GetHelpId(); get(m_pLbFunction, "function");
aLbFunction.SetUniqueId(m_aHelpId); m_pLbFunction->SetStyle(m_pLbFunction->GetStyle() | WB_SORT);
Size aSize(LogicToPixel(Size(86 , 133), MAP_APPFONT));
m_pLbFunction->set_height_request(aSize.Height());
m_pLbFunction->set_width_request(aSize.Width());
m_aHelpId = m_pLbFunction->GetHelpId();
m_pLbFunction->SetUniqueId(m_aHelpId);
InitLRUList(); InitLRUList();
...@@ -84,14 +90,14 @@ FuncPage::FuncPage(Window* pParent,const IFunctionManager* _pFunctionManager): ...@@ -84,14 +90,14 @@ FuncPage::FuncPage(Window* pParent,const IFunctionManager* _pFunctionManager):
for(sal_uInt32 j= 0; j < nCategoryCount; ++j) for(sal_uInt32 j= 0; j < nCategoryCount; ++j)
{ {
const IFunctionCategory* pCategory = m_pFunctionManager->getCategory(j); const IFunctionCategory* pCategory = m_pFunctionManager->getCategory(j);
aLbCategory.SetEntryData(aLbCategory.InsertEntry(pCategory->getName()),(void*)pCategory); m_pLbCategory->SetEntryData(m_pLbCategory->InsertEntry(pCategory->getName()),(void*)pCategory);
} }
aLbCategory.SelectEntryPos(1); m_pLbCategory->SelectEntryPos(1);
UpdateFunctionList(); UpdateFunctionList();
aLbCategory.SetSelectHdl( LINK( this, FuncPage, SelHdl ) ); m_pLbCategory->SetSelectHdl( LINK( this, FuncPage, SelHdl ) );
aLbFunction.SetSelectHdl( LINK( this, FuncPage, SelHdl ) ); m_pLbFunction->SetSelectHdl( LINK( this, FuncPage, SelHdl ) );
aLbFunction.SetDoubleClickHdl( LINK( this, FuncPage, DblClkHdl ) ); m_pLbFunction->SetDoubleClickHdl( LINK( this, FuncPage, DblClkHdl ) );
} }
void FuncPage::impl_addFunctions(const IFunctionCategory* _pCategory) void FuncPage::impl_addFunctions(const IFunctionCategory* _pCategory)
...@@ -100,22 +106,22 @@ void FuncPage::impl_addFunctions(const IFunctionCategory* _pCategory) ...@@ -100,22 +106,22 @@ void FuncPage::impl_addFunctions(const IFunctionCategory* _pCategory)
for(sal_uInt32 i = 0 ; i < nCount; ++i) for(sal_uInt32 i = 0 ; i < nCount; ++i)
{ {
TFunctionDesc pDesc(_pCategory->getFunction(i)); TFunctionDesc pDesc(_pCategory->getFunction(i));
aLbFunction.SetEntryData( m_pLbFunction->SetEntryData(
aLbFunction.InsertEntry(pDesc->getFunctionName() ),(void*)pDesc ); m_pLbFunction->InsertEntry(pDesc->getFunctionName() ),(void*)pDesc );
} }
} }
void FuncPage::UpdateFunctionList() void FuncPage::UpdateFunctionList()
{ {
sal_Int32 nSelPos = aLbCategory.GetSelectEntryPos(); sal_Int32 nSelPos = m_pLbCategory->GetSelectEntryPos();
const IFunctionCategory* pCategory = static_cast<const IFunctionCategory*>(aLbCategory.GetEntryData(nSelPos)); const IFunctionCategory* pCategory = static_cast<const IFunctionCategory*>(m_pLbCategory->GetEntryData(nSelPos));
sal_Int32 nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos ) sal_Int32 nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
? Lb2Cat( nSelPos ) : 0; ? Lb2Cat( nSelPos ) : 0;
(void)nCategory; (void)nCategory;
aLbFunction.Clear(); m_pLbFunction->Clear();
aLbFunction.SetUpdateMode( false ); m_pLbFunction->SetUpdateMode( false );
if ( nSelPos > 0 ) if ( nSelPos > 0 )
...@@ -143,35 +149,35 @@ void FuncPage::UpdateFunctionList() ...@@ -143,35 +149,35 @@ void FuncPage::UpdateFunctionList()
const IFunctionDescription* pDesc = *aIter; const IFunctionDescription* pDesc = *aIter;
if (pDesc) // may be null if a function is no longer available if (pDesc) // may be null if a function is no longer available
{ {
aLbFunction.SetEntryData( m_pLbFunction->SetEntryData(
aLbFunction.InsertEntry( pDesc->getFunctionName() ), (void*)pDesc ); m_pLbFunction->InsertEntry( pDesc->getFunctionName() ), (void*)pDesc );
} }
} }
} }
aLbFunction.SetUpdateMode( true ); m_pLbFunction->SetUpdateMode( true );
aLbFunction.SelectEntryPos(0); m_pLbFunction->SelectEntryPos(0);
if(IsVisible()) SelHdl(&aLbFunction); if(IsVisible()) SelHdl(m_pLbFunction);
} }
IMPL_LINK( FuncPage, SelHdl, ListBox*, pLb ) IMPL_LINK( FuncPage, SelHdl, ListBox*, pLb )
{ {
if(pLb==&aLbFunction) if(pLb==m_pLbFunction)
{ {
const IFunctionDescription* pDesc = GetFuncDesc( GetFunction() ); const IFunctionDescription* pDesc = GetFuncDesc( GetFunction() );
if ( pDesc ) if ( pDesc )
{ {
const OString sHelpId = pDesc->getHelpId(); const OString sHelpId = pDesc->getHelpId();
if ( !sHelpId.isEmpty() ) if ( !sHelpId.isEmpty() )
aLbFunction.SetHelpId(sHelpId); m_pLbFunction->SetHelpId(sHelpId);
} }
aSelectionLink.Call(this); aSelectionLink.Call(this);
} }
else else
{ {
aLbFunction.SetHelpId(m_aHelpId); m_pLbFunction->SetHelpId(m_aHelpId);
UpdateFunctionList(); UpdateFunctionList();
} }
return 0; return 0;
...@@ -185,49 +191,49 @@ IMPL_LINK_NOARG(FuncPage, DblClkHdl) ...@@ -185,49 +191,49 @@ IMPL_LINK_NOARG(FuncPage, DblClkHdl)
void FuncPage::SetCategory(sal_Int32 nCat) void FuncPage::SetCategory(sal_Int32 nCat)
{ {
aLbCategory.SelectEntryPos(nCat); m_pLbCategory->SelectEntryPos(nCat);
UpdateFunctionList(); UpdateFunctionList();
} }
sal_Int32 FuncPage::GetFuncPos(const IFunctionDescription* _pDesc) sal_Int32 FuncPage::GetFuncPos(const IFunctionDescription* _pDesc)
{ {
return aLbFunction.GetEntryPos(_pDesc); return m_pLbFunction->GetEntryPos(_pDesc);
} }
void FuncPage::SetFunction(sal_Int32 nFunc) void FuncPage::SetFunction(sal_Int32 nFunc)
{ {
aLbFunction.SelectEntryPos(nFunc); m_pLbFunction->SelectEntryPos(nFunc);
} }
void FuncPage::SetFocus() void FuncPage::SetFocus()
{ {
aLbFunction.GrabFocus(); m_pLbFunction->GrabFocus();
} }
sal_Int32 FuncPage::GetCategory() sal_Int32 FuncPage::GetCategory()
{ {
return aLbCategory.GetSelectEntryPos(); return m_pLbCategory->GetSelectEntryPos();
} }
sal_Int32 FuncPage::GetFunction() sal_Int32 FuncPage::GetFunction()
{ {
return aLbFunction.GetSelectEntryPos(); return m_pLbFunction->GetSelectEntryPos();
} }
sal_Int32 FuncPage::GetFunctionEntryCount() sal_Int32 FuncPage::GetFunctionEntryCount()
{ {
return aLbFunction.GetSelectEntryCount(); return m_pLbFunction->GetSelectEntryCount();
} }
OUString FuncPage::GetSelFunctionName() const OUString FuncPage::GetSelFunctionName() const
{ {
return aLbFunction.GetSelectEntry(); return m_pLbFunction->GetSelectEntry();
} }
const IFunctionDescription* FuncPage::GetFuncDesc( sal_Int32 nPos ) const const IFunctionDescription* FuncPage::GetFuncDesc( sal_Int32 nPos ) const
{ {
// not pretty, but hopefully rare // not pretty, but hopefully rare
return (const IFunctionDescription*) aLbFunction.GetEntryData(nPos); return (const IFunctionDescription*) m_pLbFunction->GetEntryData(nPos);
} }
void FuncPage::InitLRUList() void FuncPage::InitLRUList()
......
...@@ -50,7 +50,7 @@ protected: ...@@ -50,7 +50,7 @@ protected:
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
public: public:
FormulaListBox( Window* pParent, const ResId& rResId ); FormulaListBox( Window* pParent, WinBits nBits );
}; };
...@@ -64,10 +64,8 @@ private: ...@@ -64,10 +64,8 @@ private:
OModuleClient m_aModuleClient; OModuleClient m_aModuleClient;
Link aDoubleClickLink; Link aDoubleClickLink;
Link aSelectionLink; Link aSelectionLink;
FixedText aFtCategory; ListBox *m_pLbCategory;
ListBox aLbCategory; FormulaListBox *m_pLbFunction;
FixedText aFtFunction;
FormulaListBox aLbFunction;
const IFunctionManager* const IFunctionManager*
m_pFunctionManager; m_pFunctionManager;
......
...@@ -33,13 +33,15 @@ namespace formula ...@@ -33,13 +33,15 @@ namespace formula
{ {
// class ValWnd // class ValWnd
ValWnd::ValWnd( Window* pParent, const ResId& rId ) : Window( pParent, rId ) ValWnd::ValWnd(Window* pParent, WinBits nBits)
: Window(pParent, nBits)
{ {
Font aFnt( GetFont() ); Font aFnt( GetFont() );
aFnt.SetTransparent( true ); aFnt.SetTransparent( true );
aFnt.SetWeight( WEIGHT_LIGHT ); aFnt.SetWeight( WEIGHT_LIGHT );
if ( pParent->IsBackground() ) if ( pParent->IsBackground() )
{ {
fprintf(stderr, "one\n");
Wallpaper aBack = pParent->GetBackground(); Wallpaper aBack = pParent->GetBackground();
SetFillColor( aBack.GetColor() ); SetFillColor( aBack.GetColor() );
SetBackground( aBack ); SetBackground( aBack );
...@@ -47,12 +49,25 @@ ValWnd::ValWnd( Window* pParent, const ResId& rId ) : Window( pParent, rId ) ...@@ -47,12 +49,25 @@ ValWnd::ValWnd( Window* pParent, const ResId& rId ) : Window( pParent, rId )
} }
else else
{ {
fprintf(stderr, "two\n");
SetFillColor(); SetFillColor();
SetBackground(); SetBackground();
} }
SetFont( aFnt ); SetFont( aFnt );
SetLineColor(); SetLineColor();
SetAccessibleRole( ::com::sun::star::accessibility::AccessibleRole::LABEL );
}
Size ValWnd::GetOptimalSize() const
{
return LogicToPixel(Size(60, 12), MAP_APPFONT);
}
void ValWnd::Resize()
{
Window::Resize();
Size aSzWnd = GetOutputSizePixel(); Size aSzWnd = GetOutputSizePixel();
long nHeight = GetTextHeight(); long nHeight = GetTextHeight();
long nDiff = aSzWnd.Height()-nHeight; long nDiff = aSzWnd.Height()-nHeight;
...@@ -60,7 +75,11 @@ ValWnd::ValWnd( Window* pParent, const ResId& rId ) : Window( pParent, rId ) ...@@ -60,7 +75,11 @@ ValWnd::ValWnd( Window* pParent, const ResId& rId ) : Window( pParent, rId )
aRectOut = Rectangle( Point( 1, ( nDiff<2 ) ? 1 : nDiff/2), aRectOut = Rectangle( Point( 1, ( nDiff<2 ) ? 1 : nDiff/2),
Size ( aSzWnd.Width()-2, nHeight ) ); Size ( aSzWnd.Width()-2, nHeight ) );
SetClipRegion( Region( aRectOut ) ); SetClipRegion( Region( aRectOut ) );
SetAccessibleRole( ::com::sun::star::accessibility::AccessibleRole::LABEL ); }
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeValWnd(Window *pParent, VclBuilder::stringmap &)
{
return new ValWnd(pParent, WB_BORDER);
} }
void ValWnd::Paint( const Rectangle& ) void ValWnd::Paint( const Rectangle& )
...@@ -80,8 +99,8 @@ void ValWnd::SetValue( const OUString& rStrVal ) ...@@ -80,8 +99,8 @@ void ValWnd::SetValue( const OUString& rStrVal )
// class ArgEdit // class ArgEdit
ArgEdit::ArgEdit( Window* pParent, const ResId& rResId ) ArgEdit::ArgEdit( Window* pParent, WinBits nBits )
: RefEdit( pParent, NULL, NULL, rResId ), : RefEdit( pParent, NULL, nBits ),
pEdPrev ( NULL ), pEdPrev ( NULL ),
pEdNext ( NULL ), pEdNext ( NULL ),
pSlider ( NULL ), pSlider ( NULL ),
...@@ -89,6 +108,11 @@ ArgEdit::ArgEdit( Window* pParent, const ResId& rResId ) ...@@ -89,6 +108,11 @@ ArgEdit::ArgEdit( Window* pParent, const ResId& rResId )
{ {
} }
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeArgEdit(Window *pParent, VclBuilder::stringmap &)
{
return new ArgEdit(pParent, WB_BORDER);
}
void ArgEdit::Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit, void ArgEdit::Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
ScrollBar& rArgSlider, sal_uInt16 nArgCount ) ScrollBar& rArgSlider, sal_uInt16 nArgCount )
{ {
...@@ -183,7 +207,7 @@ ArgInput::ArgInput() ...@@ -183,7 +207,7 @@ ArgInput::ArgInput()
pRefBtn=NULL; pRefBtn=NULL;
} }
void ArgInput::InitArgInput( FixedText* pftArg, ImageButton* pbtnFx, void ArgInput::InitArgInput( FixedText* pftArg, PushButton* pbtnFx,
ArgEdit* pedArg, RefButton* prefBtn) ArgEdit* pedArg, RefButton* prefBtn)
{ {
pFtArg =pftArg; pFtArg =pftArg;
...@@ -374,8 +398,9 @@ IMPL_LINK( ArgInput, EdModifyHdl,ArgEdit*, pEd ) ...@@ -374,8 +398,9 @@ IMPL_LINK( ArgInput, EdModifyHdl,ArgEdit*, pEd )
} }
// class EditBox // class EditBox
EditBox::EditBox( Window* pParent, const ResId& rResId )
:Control(pParent,rResId), EditBox::EditBox( Window* pParent, WinBits nBits )
:Control(pParent,nBits),
bMouseFlag(false) bMouseFlag(false)
{ {
WinBits nStyle=GetStyle(); WinBits nStyle=GetStyle();
...@@ -395,6 +420,11 @@ EditBox::EditBox( Window* pParent, const ResId& rResId ) ...@@ -395,6 +420,11 @@ EditBox::EditBox( Window* pParent, const ResId& rResId )
SetHelpId( "" ); SetHelpId( "" );
} }
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeEditBox(Window *pParent, VclBuilder::stringmap &)
{
return new EditBox(pParent, WB_BORDER);
}
EditBox::~EditBox() EditBox::~EditBox()
{ {
MultiLineEdit* pTheEdit=pMEdit; MultiLineEdit* pTheEdit=pMEdit;
...@@ -493,16 +523,6 @@ void EditBox::UpdateOldSel() ...@@ -493,16 +523,6 @@ void EditBox::UpdateOldSel()
#define SC_ENABLE_TIME 100 #define SC_ENABLE_TIME 100
RefEdit::RefEdit( Window* _pParent,IControlReferenceHandler* pParent,
Window* pShrinkModeLabel, const ResId& rResId )
: Edit( _pParent, rResId )
, pAnyRefDlg( pParent )
, pLabelWidget(pShrinkModeLabel)
{
aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) );
aTimer.SetTimeout( SC_ENABLE_TIME );
}
RefEdit::RefEdit( Window* _pParent, Window* pShrinkModeLabel, WinBits nStyle ) RefEdit::RefEdit( Window* _pParent, Window* pShrinkModeLabel, WinBits nStyle )
: Edit( _pParent, nStyle ) : Edit( _pParent, nStyle )
, pAnyRefDlg( NULL ) , pAnyRefDlg( NULL )
...@@ -608,18 +628,6 @@ IMPL_LINK_NOARG(RefEdit, UpdateHdl) ...@@ -608,18 +628,6 @@ IMPL_LINK_NOARG(RefEdit, UpdateHdl)
//class RefButton //class RefButton
RefButton::RefButton( Window* _pParent, const ResId& rResId) :
ImageButton( _pParent, rResId ),
aImgRefStart( ModuleRes( RID_BMP_REFBTN1 ) ),
aImgRefDone( ModuleRes( RID_BMP_REFBTN2 ) ),
aShrinkQuickHelp( ModuleRes( RID_STR_SHRINK ).toString() ),
aExpandQuickHelp( ModuleRes( RID_STR_EXPAND ).toString() ),
pAnyRefDlg( NULL ),
pRefEdit( NULL )
{
SetStartImage();
}
RefButton::RefButton( Window* _pParent, WinBits nStyle ) : RefButton::RefButton( Window* _pParent, WinBits nStyle ) :
ImageButton( _pParent, nStyle ), ImageButton( _pParent, nStyle ),
aImgRefStart( ModuleRes( RID_BMP_REFBTN1 ) ), aImgRefStart( ModuleRes( RID_BMP_REFBTN1 ) ),
...@@ -637,18 +645,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeRefButton(Window *pParent, ...@@ -637,18 +645,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeRefButton(Window *pParent,
return new RefButton(pParent, 0); return new RefButton(pParent, 0);
} }
RefButton::RefButton( Window* _pParent, const ResId& rResId, RefEdit* pEdit, IControlReferenceHandler* _pDlg ) :
ImageButton( _pParent, rResId ),
aImgRefStart( ModuleRes( RID_BMP_REFBTN1 ) ),
aImgRefDone( ModuleRes( RID_BMP_REFBTN2 ) ),
aShrinkQuickHelp( ModuleRes( RID_STR_SHRINK ).toString() ),
aExpandQuickHelp( ModuleRes( RID_STR_EXPAND ).toString() ),
pAnyRefDlg( _pDlg ),
pRefEdit( pEdit )
{
SetStartImage();
}
void RefButton::SetStartImage() void RefButton::SetStartImage()
{ {
SetModeImage( aImgRefStart ); SetModeImage( aImgRefStart );
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <vcl/settings.hxx> #include <vcl/settings.hxx>
#include "parawin.hxx" #include "parawin.hxx"
#include "parawin.hrc"
#include "helpids.hrc" #include "helpids.hrc"
#include "formula/formdata.hxx" #include "formula/formdata.hxx"
#include "formula/IFunctionDescription.hxx" #include "formula/IFunctionDescription.hxx"
...@@ -36,55 +35,69 @@ namespace formula ...@@ -36,55 +35,69 @@ namespace formula
{ {
ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos): ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg):
TabPage (pParent,ModuleRes(RID_FORMULATAB_PARAMETER)), TabPage (pParent, "ParameterPage", "formula/ui/parameter.ui"),
pFuncDesc ( NULL ), pFuncDesc ( NULL ),
pMyParent (_pDlg), pMyParent (_pDlg),
aFtEditDesc ( this, ModuleRes( FT_EDITDESC ) ),
aFtArgName ( this, ModuleRes( FT_PARNAME ) ),
aFtArgDesc ( this, ModuleRes( FT_PARDESC ) ),
aBtnFx1 ( this, ModuleRes( BTN_FX1 ) ),
aFtArg1 ( this, ModuleRes( FT_ARG1 ) ),
aEdArg1 ( this, ModuleRes( ED_ARG1 ) ),
aRefBtn1 ( this, ModuleRes( RB_ARG1 ) ),
aBtnFx2 ( this, ModuleRes( BTN_FX2 ) ),
aFtArg2 ( this, ModuleRes( FT_ARG2 ) ),
aEdArg2 ( this, ModuleRes( ED_ARG2 ) ),
aRefBtn2 ( this, ModuleRes( RB_ARG2 ) ),
aBtnFx3 ( this, ModuleRes( BTN_FX3 ) ),
aFtArg3 ( this, ModuleRes( FT_ARG3 ) ),
aEdArg3 ( this, ModuleRes( ED_ARG3 ) ),
aRefBtn3 ( this, ModuleRes( RB_ARG3 ) ),
aBtnFx4 ( this, ModuleRes( BTN_FX4 ) ),
aFtArg4 ( this, ModuleRes( FT_ARG4 ) ),
aEdArg4 ( this, ModuleRes( ED_ARG4 ) ),
aRefBtn4 ( this, ModuleRes( RB_ARG4 ) ),
aSlider ( this, ModuleRes( WND_SLIDER ) ),
m_sOptional ( ModuleRes( STR_OPTIONAL ) ), m_sOptional ( ModuleRes( STR_OPTIONAL ) ),
m_sRequired ( ModuleRes( STR_REQUIRED ) ), m_sRequired ( ModuleRes( STR_REQUIRED ) ),
bRefMode (false) bRefMode (false)
{ {
FreeResource(); get(m_pFtEditDesc, "editdesc");
aDefaultString=aFtEditDesc.GetText(); get(m_pFtArgName, "parname");
get(m_pFtArgDesc, "pardesc");
SetPosPixel(aPos);
//Space for two lines of text
m_pFtArgDesc->SetText("X\nX\n");
long nHeight = m_pFtArgDesc->GetOptimalSize().Height();
m_pFtEditDesc->set_height_request(nHeight);
m_pFtArgDesc->set_height_request(nHeight);
m_pFtArgDesc->SetText("");
get(m_pBtnFx1, "FX1");
m_pBtnFx1->SetModeImage(Image(ModuleRes( BMP_FX )));
get(m_pBtnFx2, "FX2");
m_pBtnFx2->SetModeImage(Image(ModuleRes( BMP_FX )));
get(m_pBtnFx3, "FX3");
m_pBtnFx3->SetModeImage(Image(ModuleRes( BMP_FX )));
get(m_pBtnFx4, "FX4");
m_pBtnFx4->SetModeImage(Image(ModuleRes( BMP_FX )));
get(m_pFtArg1, "FT_ARG1");
get(m_pFtArg2, "FT_ARG2");
get(m_pFtArg3, "FT_ARG3");
get(m_pFtArg4, "FT_ARG4");
get(m_pEdArg1, "ED_ARG1");
get(m_pEdArg2, "ED_ARG2");
get(m_pEdArg3, "ED_ARG3");
get(m_pEdArg4, "ED_ARG4");
get(m_pRefBtn1, "RB_ARG1");
get(m_pRefBtn2, "RB_ARG2");
get(m_pRefBtn3, "RB_ARG3");
get(m_pRefBtn4, "RB_ARG4");
get(m_pSlider, "scrollbar");
//lock down initial preferences
Window *pGrid = get<Window>("paramgrid");
pGrid->set_height_request(pGrid->get_preferred_size().Height());
Size aSize(get_preferred_size());
set_width_request(aSize.Width());
set_height_request(aSize.Height());
aDefaultString=m_pFtEditDesc->GetText();
nEdFocus=NOT_FOUND; nEdFocus=NOT_FOUND;
nActiveLine=0; nActiveLine=0;
Size aSize = aSlider.GetSizePixel();
aSize.Width() = GetSettings().GetStyleSettings().GetScrollBarSize(); m_pSlider->SetEndScrollHdl( LINK( this, ParaWin, ScrollHdl ) );
aSlider.SetSizePixel( aSize ); m_pSlider->SetScrollHdl( LINK( this, ParaWin, ScrollHdl ) );
aSlider.SetEndScrollHdl( LINK( this, ParaWin, ScrollHdl ) );
aSlider.SetScrollHdl( LINK( this, ParaWin, ScrollHdl ) ); InitArgInput( 0, *m_pFtArg1, *m_pBtnFx1, *m_pEdArg1, *m_pRefBtn1);
InitArgInput( 1, *m_pFtArg2, *m_pBtnFx2, *m_pEdArg2, *m_pRefBtn2);
InitArgInput( 0, aFtArg1, aBtnFx1, aEdArg1, aRefBtn1); InitArgInput( 2, *m_pFtArg3, *m_pBtnFx3, *m_pEdArg3, *m_pRefBtn3);
InitArgInput( 1, aFtArg2, aBtnFx2, aEdArg2, aRefBtn2); InitArgInput( 3, *m_pFtArg4, *m_pBtnFx4, *m_pEdArg4, *m_pRefBtn4);
InitArgInput( 2, aFtArg3, aBtnFx3, aEdArg3, aRefBtn3);
InitArgInput( 3, aFtArg4, aBtnFx4, aEdArg4, aRefBtn4);
ClearAll(); ClearAll();
} }
...@@ -211,10 +224,10 @@ ParaWin::~ParaWin() ...@@ -211,10 +224,10 @@ ParaWin::~ParaWin()
// #i66422# if the focus changes during destruction of the controls, // #i66422# if the focus changes during destruction of the controls,
// don't call the focus handlers // don't call the focus handlers
Link aEmptyLink; Link aEmptyLink;
aBtnFx1.SetGetFocusHdl( aEmptyLink ); m_pBtnFx1->SetGetFocusHdl( aEmptyLink );
aBtnFx2.SetGetFocusHdl( aEmptyLink ); m_pBtnFx2->SetGetFocusHdl( aEmptyLink );
aBtnFx3.SetGetFocusHdl( aEmptyLink ); m_pBtnFx3->SetGetFocusHdl( aEmptyLink );
aBtnFx4.SetGetFocusHdl( aEmptyLink ); m_pBtnFx4->SetGetFocusHdl( aEmptyLink );
} }
...@@ -309,20 +322,20 @@ void ParaWin::SetFunctionDesc(const IFunctionDescription* pFDesc) ...@@ -309,20 +322,20 @@ void ParaWin::SetFunctionDesc(const IFunctionDescription* pFDesc)
} }
nArgs = pFuncDesc->getSuppressedArgumentCount(); nArgs = pFuncDesc->getSuppressedArgumentCount();
pFuncDesc->fillVisibleArgumentMapping(aVisibleArgMapping); pFuncDesc->fillVisibleArgumentMapping(aVisibleArgMapping);
aSlider.Hide(); m_pSlider->Hide();
OString sHelpId = pFuncDesc->getHelpId(); OString sHelpId = pFuncDesc->getHelpId();
SetHelpId( sHelpId ); SetHelpId( sHelpId );
aEdArg1.SetHelpId( sHelpId ); m_pEdArg1->SetHelpId( sHelpId );
aEdArg2.SetHelpId( sHelpId ); m_pEdArg2->SetHelpId( sHelpId );
aEdArg3.SetHelpId( sHelpId ); m_pEdArg3->SetHelpId( sHelpId );
aEdArg4.SetHelpId( sHelpId ); m_pEdArg4->SetHelpId( sHelpId );
// Unique-IDs muessen gleich bleiben fuer Automatisierung // Unique-IDs muessen gleich bleiben fuer Automatisierung
SetUniqueId( HID_FORMULA_FAP_PAGE ); SetUniqueId( HID_FORMULA_FAP_PAGE );
aEdArg1.SetUniqueId( HID_FORMULA_FAP_EDIT1 ); m_pEdArg1->SetUniqueId( HID_FORMULA_FAP_EDIT1 );
aEdArg2.SetUniqueId( HID_FORMULA_FAP_EDIT2 ); m_pEdArg2->SetUniqueId( HID_FORMULA_FAP_EDIT2 );
aEdArg3.SetUniqueId( HID_FORMULA_FAP_EDIT3 ); m_pEdArg3->SetUniqueId( HID_FORMULA_FAP_EDIT3 );
aEdArg4.SetUniqueId( HID_FORMULA_FAP_EDIT4 ); m_pEdArg4->SetUniqueId( HID_FORMULA_FAP_EDIT4 );
SetActiveLine(0); SetActiveLine(0);
} }
else else
...@@ -334,17 +347,17 @@ void ParaWin::SetFunctionDesc(const IFunctionDescription* pFDesc) ...@@ -334,17 +347,17 @@ void ParaWin::SetFunctionDesc(const IFunctionDescription* pFDesc)
void ParaWin::SetArgumentText(const OUString& aText) void ParaWin::SetArgumentText(const OUString& aText)
{ {
aFtArgName.SetText(aText); m_pFtArgName->SetText(aText);
} }
void ParaWin::SetArgumentDesc(const OUString& aText) void ParaWin::SetArgumentDesc(const OUString& aText)
{ {
aFtArgDesc.SetText(aText); m_pFtArgDesc->SetText(aText);
} }
void ParaWin::SetEditDesc(const OUString& aText) void ParaWin::SetEditDesc(const OUString& aText)
{ {
aFtEditDesc.SetText(aText); m_pFtEditDesc->SetText(aText);
} }
void ParaWin::SetArgName(sal_uInt16 no,const OUString& aText) void ParaWin::SetArgName(sal_uInt16 no,const OUString& aText)
...@@ -381,7 +394,7 @@ void ParaWin::SetEdFocus(sal_uInt16 no) ...@@ -381,7 +394,7 @@ void ParaWin::SetEdFocus(sal_uInt16 no)
} }
void ParaWin::InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBtnFx, void ParaWin::InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, PushButton& rBtnFx,
ArgEdit& rEdArg, RefButton& rRefBtn) ArgEdit& rEdArg, RefButton& rRefBtn)
{ {
...@@ -408,7 +421,7 @@ void ParaWin::ClearAll() ...@@ -408,7 +421,7 @@ void ParaWin::ClearAll()
void ParaWin::SetArgumentOffset(sal_uInt16 nOffset) void ParaWin::SetArgumentOffset(sal_uInt16 nOffset)
{ {
DelParaArray(); DelParaArray();
aSlider.SetThumbPos(0); m_pSlider->SetThumbPos(0);
aParaArray.resize(nArgs); aParaArray.resize(nArgs);
...@@ -421,22 +434,22 @@ void ParaWin::SetArgumentOffset(sal_uInt16 nOffset) ...@@ -421,22 +434,22 @@ void ParaWin::SetArgumentOffset(sal_uInt16 nOffset)
aArgInput[i].GetArgEdPtr()->Init( aArgInput[i].GetArgEdPtr()->Init(
(i==0) ? (ArgEdit *)NULL : aArgInput[i-1].GetArgEdPtr(), (i==0) ? (ArgEdit *)NULL : aArgInput[i-1].GetArgEdPtr(),
(i==3 || i==nArgs-1) ? (ArgEdit *)NULL : aArgInput[i+1].GetArgEdPtr(), (i==3 || i==nArgs-1) ? (ArgEdit *)NULL : aArgInput[i+1].GetArgEdPtr(),
aSlider, nArgs ); *m_pSlider, nArgs );
} }
} }
if ( nArgs < 5 ) if ( nArgs < 5 )
{ {
aSlider.Hide(); m_pSlider->Hide();
} }
else else
{ {
aSlider.SetPageSize( 4 ); m_pSlider->SetPageSize( 4 );
aSlider.SetVisibleSize( 4 ); m_pSlider->SetVisibleSize( 4 );
aSlider.SetLineSize( 1 ); m_pSlider->SetLineSize( 1 );
aSlider.SetRange( Range( 0, nArgs ) ); m_pSlider->SetRange( Range( 0, nArgs ) );
aSlider.SetThumbPos( nOffset ); m_pSlider->SetThumbPos( nOffset );
aSlider.Show(); m_pSlider->Show();
} }
UpdateParas(); UpdateParas();
...@@ -462,16 +475,16 @@ void ParaWin::UpdateParas() ...@@ -462,16 +475,16 @@ void ParaWin::UpdateParas()
sal_uInt16 ParaWin::GetSliderPos() sal_uInt16 ParaWin::GetSliderPos()
{ {
return (sal_uInt16) aSlider.GetThumbPos(); return (sal_uInt16) m_pSlider->GetThumbPos();
} }
void ParaWin::SetSliderPos(sal_uInt16 nSliderPos) void ParaWin::SetSliderPos(sal_uInt16 nSliderPos)
{ {
sal_uInt16 nOffset = GetSliderPos(); sal_uInt16 nOffset = GetSliderPos();
if(aSlider.IsVisible() && nOffset!=nSliderPos) if(m_pSlider->IsVisible() && nOffset!=nSliderPos)
{ {
aSlider.SetThumbPos(nSliderPos); m_pSlider->SetThumbPos(nSliderPos);
for ( sal_uInt16 i=0; i<4; i++ ) for ( sal_uInt16 i=0; i<4; i++ )
{ {
UpdateArgInput( nSliderPos, i ); UpdateArgInput( nSliderPos, i );
......
/* -*- 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 .
*/
#define FT_PARNAME 1
#define FT_PARDESC 2
#define FT_EDITDESC 3
#define FT_ARG1 4
#define FT_ARG2 5
#define FT_ARG3 6
#define FT_ARG4 7
#define BTN_FX1 8
#define BTN_FX2 9
#define BTN_FX3 10
#define BTN_FX4 11
#define ED_ARG1 12
#define ED_ARG2 13
#define ED_ARG3 14
#define ED_ARG4 15
#define RB_ARG1 16
#define RB_ARG2 17
#define RB_ARG3 18
#define RB_ARG4 19
#define WND_SLIDER 20
#define STR_OPTIONAL 1
#define STR_REQUIRED 2
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -56,31 +56,31 @@ private: ...@@ -56,31 +56,31 @@ private:
Font aFntBold; Font aFntBold;
Font aFntLight; Font aFntLight;
FixedInfo aFtEditDesc; FixedText *m_pFtEditDesc;
FixedText aFtArgName; FixedText *m_pFtArgName;
FixedInfo aFtArgDesc; FixedText *m_pFtArgDesc;
ImageButton aBtnFx1; PushButton *m_pBtnFx1;
FixedText aFtArg1; FixedText *m_pFtArg1;
ArgEdit aEdArg1; ArgEdit *m_pEdArg1;
RefButton aRefBtn1; RefButton *m_pRefBtn1;
ImageButton aBtnFx2; PushButton *m_pBtnFx2;
FixedText aFtArg2; FixedText *m_pFtArg2;
ArgEdit aEdArg2; ArgEdit *m_pEdArg2;
RefButton aRefBtn2; RefButton *m_pRefBtn2;
ImageButton aBtnFx3; PushButton *m_pBtnFx3;
FixedText aFtArg3; FixedText *m_pFtArg3;
ArgEdit aEdArg3; ArgEdit *m_pEdArg3;
RefButton aRefBtn3; RefButton *m_pRefBtn3;
ImageButton aBtnFx4; PushButton *m_pBtnFx4;
FixedText aFtArg4; FixedText *m_pFtArg4;
ArgEdit aEdArg4; ArgEdit *m_pEdArg4;
RefButton aRefBtn4; RefButton *m_pRefBtn4;
ScrollBar aSlider; ScrollBar *m_pSlider;
OUString m_sOptional; OUString m_sOptional;
OUString m_sRequired; OUString m_sRequired;
bool bRefMode; bool bRefMode;
...@@ -105,7 +105,7 @@ protected: ...@@ -105,7 +105,7 @@ protected:
virtual void ArgumentModified(); virtual void ArgumentModified();
virtual void FxClick(); virtual void FxClick();
void InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBtnFx, void InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, PushButton& rBtnFx,
ArgEdit& rEdArg, RefButton& rRefBtn); ArgEdit& rEdArg, RefButton& rRefBtn);
void DelParaArray(); void DelParaArray();
...@@ -123,7 +123,7 @@ protected: ...@@ -123,7 +123,7 @@ protected:
void UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i ); void UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i );
public: public:
ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos); ParaWin(Window* pParent,IControlReferenceHandler* _pDlg);
virtual ~ParaWin(); virtual ~ParaWin();
void SetFunctionDesc(const IFunctionDescription* pFDesc); void SetFunctionDesc(const IFunctionDescription* pFDesc);
......
...@@ -17,148 +17,25 @@ ...@@ -17,148 +17,25 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include "parawin.hrc"
#include "ForResId.hrc" #include "ForResId.hrc"
#include "helpids.hrc" #include "helpids.hrc"
#define STD_MASKCOLOR Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; } #define STD_MASKCOLOR Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; }
#define FT_ARGBLOCK( y ) \ Image BMP_FX
Pos = MAP_APPFONT (6 , y ) ; \
Size = MAP_APPFONT ( 74 , 8 ) ; \
Right = TRUE ;
#define FXBUTTONBLOCK( y ) \
Pos = MAP_APPFONT (83 , y-1 ) ; \
Size = MAP_APPFONT ( 13 , 15 ) ; \
TabStop = TRUE ; \
ButtonImage = Image\
{\
ImageBitmap = Bitmap\
{\
File = "fx.bmp" ; \
};\
MaskColor = STD_MASKCOLOR;\
};
#define ED_ARGBLOCK( y ) \
Border = TRUE; \
Pos = MAP_APPFONT( 98, y ); \
Size = MAP_APPFONT( 66, 12 ); \
TabStop = TRUE;
#define RB_ARGBLOCK( y ) \
Pos = MAP_APPFONT ( 166 , y-1 ) ; \
Size = MAP_APPFONT ( 13 , 15 ) ; \
TabStop = FALSE ; \
QuickHelpText [ en-US ] = "Select"; \
// jetzt alles zusammen
TabPage RID_FORMULATAB_PARAMETER
{ {
HelpID = "formula:TabPage:RID_FORMULATAB_PARAMETER"; ImageBitmap = Bitmap { File = "fx.bmp" ; };
Border = FALSE; MaskColor = STD_MASKCOLOR;
Size = MAP_APPFONT( 203, 128 ); };
DialogControl = TRUE;
SVLook = TRUE;
FixedText FT_EDITDESC
{
Pos = MAP_APPFONT (3 , 6 ) ;
Size = MAP_APPFONT ( 198 , 20 ) ;
WordBreak = TRUE ;
Text [ en-US ] = "Function not known";
};
FixedText FT_PARNAME
{
Pos = MAP_APPFONT ( 3, 29) ;
Size = MAP_APPFONT ( 198 , 10 ) ;
};
FixedText FT_PARDESC
{
Pos = MAP_APPFONT ( 3, 42 ) ;
Size = MAP_APPFONT ( 198 , 20 ) ;
WordBreak = TRUE ;
};
FixedText FT_ARG1 { FT_ARGBLOCK ( 66 ) };
FixedText FT_ARG2 { FT_ARGBLOCK ( 81 ) };
FixedText FT_ARG3 { FT_ARGBLOCK ( 96 ) };
FixedText FT_ARG4 { FT_ARGBLOCK ( 111 ) };
ImageButton BTN_FX1
{
HelpId=HID_FORMULA_FAP_BTN_FX1;
FXBUTTONBLOCK ( 64 )
};
ImageButton BTN_FX2
{
HelpId=HID_FORMULA_FAP_BTN_FX2;
FXBUTTONBLOCK ( 79 )
};
ImageButton BTN_FX3
{
HelpId=HID_FORMULA_FAP_BTN_FX3;
FXBUTTONBLOCK ( 94 )
};
ImageButton BTN_FX4
{
HelpId=HID_FORMULA_FAP_BTN_FX4;
FXBUTTONBLOCK ( 109 )
};
Edit ED_ARG1 { ED_ARGBLOCK ( 64 )
HelpID = "formula:Edit:RID_FORMULATAB_PARAMETER:ED_ARG1";
};
Edit ED_ARG2 { ED_ARGBLOCK ( 79 )
HelpID = "formula:Edit:RID_FORMULATAB_PARAMETER:ED_ARG2";
};
Edit ED_ARG3 { ED_ARGBLOCK ( 94 )
HelpID = "formula:Edit:RID_FORMULATAB_PARAMETER:ED_ARG3";
};
Edit ED_ARG4 { ED_ARGBLOCK ( 109 )
HelpID = "formula:Edit:RID_FORMULATAB_PARAMETER:ED_ARG4";
};
ImageButton RB_ARG1
{
HelpId=HID_FORMULA_FAP_BTN_REF1;
RB_ARGBLOCK ( 64 )
};
ImageButton RB_ARG2
{
HelpId=HID_FORMULA_FAP_BTN_REF2;
RB_ARGBLOCK ( 79 )
};
ImageButton RB_ARG3
{
HelpId=HID_FORMULA_FAP_BTN_REF3;
RB_ARGBLOCK ( 94 )
};
ImageButton RB_ARG4
{
HelpId=HID_FORMULA_FAP_BTN_REF4;
RB_ARGBLOCK ( 109 )
};
ScrollBar WND_SLIDER
{
Pos = MAP_APPFONT ( 183, 63 ) ;
Size = MAP_APPFONT ( 8 , 59 ) ;
VScroll = TRUE ;
};
String STR_OPTIONAL String STR_OPTIONAL
{ {
Text [ en-US ] = "(optional)" ; Text [ en-US ] = "(optional)" ;
}; };
String STR_REQUIRED String STR_REQUIRED
{ {
Text [ en-US ] = "(required)" ; Text [ en-US ] = "(required)" ;
};
}; };
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
namespace formula namespace formula
{ {
StructListBox::StructListBox(Window* pParent, const ResId& rResId ): StructListBox::StructListBox(Window* pParent, WinBits nBits ):
SvTreeListBox(pParent,rResId ) SvTreeListBox(pParent, nBits)
{ {
bActiveFlag=false; bActiveFlag=false;
...@@ -77,55 +77,59 @@ void StructListBox::LoseFocus() ...@@ -77,55 +77,59 @@ void StructListBox::LoseFocus()
SvTreeListBox::LoseFocus(); SvTreeListBox::LoseFocus();
} }
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeStructListBox(Window *pParent, VclBuilder::stringmap &)
{
return new StructListBox(pParent, WB_BORDER);
}
StructPage::StructPage(Window* pParent): StructPage::StructPage(Window* pParent):
TabPage(pParent,ModuleRes(RID_FORMULATAB_STRUCT)), TabPage(pParent, "StructPage", "formula/ui/structpage.ui"),
aFtStruct ( this, ModuleRes( FT_STRUCT ) ),
aTlbStruct ( this, ModuleRes( TLB_STRUCT ) ),
maImgEnd ( ModuleRes( BMP_STR_END ) ), maImgEnd ( ModuleRes( BMP_STR_END ) ),
maImgError ( ModuleRes( BMP_STR_ERROR ) ), maImgError ( ModuleRes( BMP_STR_ERROR ) ),
pSelectedToken ( NULL ) pSelectedToken ( NULL )
{ {
aTlbStruct.SetStyle(aTlbStruct.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN| get(m_pTlbStruct, "struct");
Size aSize(LogicToPixel(Size(86, 162), MAP_APPFONT));
m_pTlbStruct->set_height_request(aSize.Height());
m_pTlbStruct->set_width_request(aSize.Width());
m_pTlbStruct->SetStyle(m_pTlbStruct->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|
WB_HASBUTTONS|WB_HSCROLL|WB_NOINITIALSELECTION); WB_HASBUTTONS|WB_HSCROLL|WB_NOINITIALSELECTION);
aTlbStruct.SetNodeDefaultImages(); m_pTlbStruct->SetNodeDefaultImages();
aTlbStruct.SetDefaultExpandedEntryBmp( Image( ModuleRes( BMP_STR_OPEN ) ) ); m_pTlbStruct->SetDefaultExpandedEntryBmp( Image( ModuleRes( BMP_STR_OPEN ) ) );
aTlbStruct.SetDefaultCollapsedEntryBmp( Image( ModuleRes( BMP_STR_CLOSE ) ) ); m_pTlbStruct->SetDefaultCollapsedEntryBmp( Image( ModuleRes( BMP_STR_CLOSE ) ) );
FreeResource();
aTlbStruct.SetSelectHdl(LINK( this, StructPage, SelectHdl ) ); m_pTlbStruct->SetSelectHdl(LINK( this, StructPage, SelectHdl ) );
} }
void StructPage::ClearStruct() void StructPage::ClearStruct()
{ {
aTlbStruct.SetActiveFlag(false); m_pTlbStruct->SetActiveFlag(false);
aTlbStruct.Clear(); m_pTlbStruct->Clear();
} }
SvTreeListEntry* StructPage::InsertEntry( const OUString& rText, SvTreeListEntry* pParent, SvTreeListEntry* StructPage::InsertEntry( const OUString& rText, SvTreeListEntry* pParent,
sal_uInt16 nFlag,sal_uLong nPos,IFormulaToken* pIFormulaToken) sal_uInt16 nFlag,sal_uLong nPos,IFormulaToken* pIFormulaToken)
{ {
aTlbStruct.SetActiveFlag( false ); m_pTlbStruct->SetActiveFlag( false );
SvTreeListEntry* pEntry = NULL; SvTreeListEntry* pEntry = NULL;
switch( nFlag ) switch( nFlag )
{ {
case STRUCT_FOLDER: case STRUCT_FOLDER:
pEntry = aTlbStruct.InsertEntry( rText, pParent, false, nPos, pIFormulaToken ); pEntry = m_pTlbStruct->InsertEntry( rText, pParent, false, nPos, pIFormulaToken );
break; break;
case STRUCT_END: case STRUCT_END:
pEntry = aTlbStruct.InsertStaticEntry( rText, maImgEnd, pParent, nPos, pIFormulaToken ); pEntry = m_pTlbStruct->InsertStaticEntry( rText, maImgEnd, pParent, nPos, pIFormulaToken );
break; break;
case STRUCT_ERROR: case STRUCT_ERROR:
pEntry = aTlbStruct.InsertStaticEntry( rText, maImgError, pParent, nPos, pIFormulaToken ); pEntry = m_pTlbStruct->InsertStaticEntry( rText, maImgError, pParent, nPos, pIFormulaToken );
break; break;
} }
if( pEntry && pParent ) if( pEntry && pParent )
aTlbStruct.Expand( pParent ); m_pTlbStruct->Expand( pParent );
return pEntry; return pEntry;
} }
...@@ -133,13 +137,13 @@ OUString StructPage::GetEntryText(SvTreeListEntry* pEntry) const ...@@ -133,13 +137,13 @@ OUString StructPage::GetEntryText(SvTreeListEntry* pEntry) const
{ {
OUString aString; OUString aString;
if(pEntry!=NULL) if(pEntry!=NULL)
aString = aTlbStruct.GetEntryText(pEntry); aString = m_pTlbStruct->GetEntryText(pEntry);
return aString; return aString;
} }
SvTreeListEntry* StructPage::GetParent(SvTreeListEntry* pEntry) const SvTreeListEntry* StructPage::GetParent(SvTreeListEntry* pEntry) const
{ {
return aTlbStruct.GetParent(pEntry); return m_pTlbStruct->GetParent(pEntry);
} }
IFormulaToken* StructPage::GetFunctionEntry(SvTreeListEntry* pEntry) IFormulaToken* StructPage::GetFunctionEntry(SvTreeListEntry* pEntry)
{ {
...@@ -150,7 +154,7 @@ IFormulaToken* StructPage::GetFunctionEntry(SvTreeListEntry* pEntry) ...@@ -150,7 +154,7 @@ IFormulaToken* StructPage::GetFunctionEntry(SvTreeListEntry* pEntry)
{ {
if ( !(pToken->isFunction() || pToken->getArgumentCount() > 1 ) ) if ( !(pToken->isFunction() || pToken->getArgumentCount() > 1 ) )
{ {
return GetFunctionEntry(aTlbStruct.GetParent(pEntry)); return GetFunctionEntry(m_pTlbStruct->GetParent(pEntry));
} }
else else
{ {
...@@ -163,11 +167,11 @@ IFormulaToken* StructPage::GetFunctionEntry(SvTreeListEntry* pEntry) ...@@ -163,11 +167,11 @@ IFormulaToken* StructPage::GetFunctionEntry(SvTreeListEntry* pEntry)
IMPL_LINK( StructPage, SelectHdl, SvTreeListBox*, pTlb ) IMPL_LINK( StructPage, SelectHdl, SvTreeListBox*, pTlb )
{ {
if(aTlbStruct.GetActiveFlag()) if(m_pTlbStruct->GetActiveFlag())
{ {
if(pTlb==&aTlbStruct) if(pTlb==m_pTlbStruct)
{ {
SvTreeListEntry* pCurEntry=aTlbStruct.GetCurEntry(); SvTreeListEntry* pCurEntry=m_pTlbStruct->GetCurEntry();
if(pCurEntry!=NULL) if(pCurEntry!=NULL)
{ {
pSelectedToken=(IFormulaToken *)pCurEntry->GetUserData(); pSelectedToken=(IFormulaToken *)pCurEntry->GetUserData();
......
...@@ -48,7 +48,7 @@ protected: ...@@ -48,7 +48,7 @@ protected:
public: public:
StructListBox(Window* pParent, const ResId& rResId ); StructListBox(Window* pParent, WinBits nBits );
/** Inserts an entry with static image (no difference between collapsed/expanded). */ /** Inserts an entry with static image (no difference between collapsed/expanded). */
SvTreeListEntry* InsertStaticEntry( SvTreeListEntry* InsertStaticEntry(
...@@ -73,8 +73,7 @@ private: ...@@ -73,8 +73,7 @@ private:
OModuleClient m_aModuleClient; OModuleClient m_aModuleClient;
Link aSelLink; Link aSelLink;
FixedText aFtStruct; StructListBox *m_pTlbStruct;
StructListBox aTlbStruct;
Image maImgEnd; Image maImgEnd;
Image maImgError; Image maImgError;
......
...@@ -42,16 +42,24 @@ ...@@ -42,16 +42,24 @@
// strings // strings
#define RID_STR_SHRINK (RID_STRING_START + 0) #define RID_STR_SHRINK (RID_STRING_START + 0)
#define RID_STR_EXPAND (RID_STRING_START + 1) #define RID_STR_EXPAND (RID_STRING_START + 1)
#define STR_STRUCT_ERR1 (RID_STRING_START + 2)
#define STR_STRUCT_ERR2 (RID_STRING_START + 3)
#define STR_OPTIONAL (RID_STRING_START + 4)
#define STR_REQUIRED (RID_STRING_START + 5)
#define STR_END (RID_STRING_START + 6)
#define STR_TITLE1 (RID_STRING_START + 7)
#define STR_TITLE2 (RID_STRING_START + 8)
// bitmap // bitmap
#define RID_BMP_REFBTN1 (RID_BITMAP_START + 0) #define RID_BMP_REFBTN1 (RID_BITMAP_START + 0)
#define RID_BMP_REFBTN2 (RID_BITMAP_START + 2) #define RID_BMP_REFBTN2 (RID_BITMAP_START + 2)
#define BMP_STR_CLOSE (RID_BITMAP_START + 3)
#define BMP_STR_OPEN (RID_BITMAP_START + 4)
#define BMP_STR_END (RID_BITMAP_START + 5)
#define BMP_STR_ERROR (RID_BITMAP_START + 6)
#define BMP_FX (RID_BITMAP_START + 7)
// pages // pages
#define RID_FORMULATAB_STRUCT (RID_PAGE_START + 0)
#define RID_FORMULATAB_FUNCTION (RID_PAGE_START + 1)
#define RID_FORMULADLG_FORMULA (RID_PAGE_START + 2)
#define RID_FORMULATAB_PARAMETER (RID_PAGE_START + 3)
#define RID_FORMULADLG_FORMULA_MODAL (RID_PAGE_START + 4) #define RID_FORMULADLG_FORMULA_MODAL (RID_PAGE_START + 4)
#endif // FORMULA_FORRESID_HRC #endif // FORMULA_FORRESID_HRC
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkBox" id="FunctionPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">_Category</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">category</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="category">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<items>
<item translatable="yes">Last Used</item>
<item translatable="yes">All</item>
</items>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">_Function</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">function</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="foruilo-FormulaListBox" id="function">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Formula ListBox-selection1"/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</interface>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkBox" id="StructPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">_Structure</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">struct</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="foruilo-StructListBox" id="struct">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Formula ListBox-selection1"/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</interface>
...@@ -44,7 +44,6 @@ protected: ...@@ -44,7 +44,6 @@ protected:
virtual void LoseFocus() SAL_OVERRIDE; virtual void LoseFocus() SAL_OVERRIDE;
public: public:
RefEdit( Window* _pParent,IControlReferenceHandler* pParent, Window* pShrinkModeLabel, const ResId& rResId );
RefEdit( Window* _pParent, Window* pShrinkModeLabel, WinBits nStyle = WB_BORDER ); RefEdit( Window* _pParent, Window* pShrinkModeLabel, WinBits nStyle = WB_BORDER );
virtual ~RefEdit(); virtual ~RefEdit();
...@@ -95,10 +94,7 @@ protected: ...@@ -95,10 +94,7 @@ protected:
virtual void LoseFocus() SAL_OVERRIDE; virtual void LoseFocus() SAL_OVERRIDE;
public: public:
RefButton(Window* _pParent, const ResId& rResId);
RefButton(Window* _pParent, WinBits nStyle = 0); RefButton(Window* _pParent, WinBits nStyle = 0);
RefButton(Window* _pParent, const ResId& rResId,
RefEdit* pEdit, IControlReferenceHandler* pDlg);
void SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit ); void SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit );
......
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