summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc/validate.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-01-12 13:29:17 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-01-12 13:29:17 -0500
commit647e57e69f70c19c58b39ca658a79dd4f0c2ec68 (patch)
treee98f586b60aaced8c828d5db0c13b7a69893bd60 /sc/source/ui/inc/validate.hxx
parentdc77d98400fb58d0f3d42222e581362df44f493f (diff)
De-contaminated code base a bit.
What's up with these useless comments anyway? Also, don't be lazy and replace all ScRef* with formula::Ref* *when* the classes get relocated, not after.
Diffstat (limited to 'sc/source/ui/inc/validate.hxx')
-rw-r--r--sc/source/ui/inc/validate.hxx55
1 files changed, 15 insertions, 40 deletions
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 1f7e714bb6e0..050c54a00121 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -34,13 +34,11 @@
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
#include <svtools/svmedit.hxx>
-//<!--Added by PengYunQuan for Validity Cell Range Picker
+
#include "anyrefdg.hxx"
-//-->Added by PengYunQuan for Validity Cell Range Picker
// ============================================================================
-//<!--Added by PengYunQuan for Validity Cell Range Picker
struct ScRefHandlerCaller{
virtual ~ScRefHandlerCaller(){}
};
@@ -50,15 +48,15 @@ protected:
ScRefHandlerCaller *m_pHandler;
void (ScRefHandlerCaller::*m_pSetReferenceHdl)( const ScRange& , ScDocument* );
void (ScRefHandlerCaller::*m_pSetActiveHdl)();
- void (ScRefHandlerCaller::*m_pRefInputStartPreHdl)( ScRefEdit* pEdit, ScRefButton* pButton );
- void (ScRefHandlerCaller::*m_pRefInputStartPostHdl)( ScRefEdit* pEdit, ScRefButton* pButton );
+ void (ScRefHandlerCaller::*m_pRefInputStartPreHdl)( formula::RefEdit* pEdit, formula::RefButton* pButton );
+ void (ScRefHandlerCaller::*m_pRefInputStartPostHdl)( formula::RefEdit* pEdit, formula::RefButton* pButton );
void (ScRefHandlerCaller::*m_pRefInputDonePreHdl)();
void (ScRefHandlerCaller::*m_pRefInputDonePostHdl)();
public:
typedef void (ScRefHandlerCaller::*PFUNCSETREFHDLTYPE)( const ScRange& , ScDocument* );
typedef void (ScRefHandlerCaller::*PCOMMONHDLTYPE)();
- typedef void (ScRefHandlerCaller::*PINPUTSTARTDLTYPE)( ScRefEdit* pEdit, ScRefButton* pButton );
+ typedef void (ScRefHandlerCaller::*PINPUTSTARTDLTYPE)( formula::RefEdit* pEdit, formula::RefButton* pButton );
PFUNCSETREFHDLTYPE SetSetRefHdl( PFUNCSETREFHDLTYPE pNewHdl )
{
@@ -87,33 +85,23 @@ public:
ScRefHandlerHelper():m_pHandler(NULL), m_pSetReferenceHdl( NULL ), m_pSetActiveHdl(NULL), m_pRefInputStartPreHdl( NULL ), m_pRefInputStartPostHdl( NULL ), m_pRefInputDonePreHdl( NULL ), m_pRefInputDonePostHdl( NULL ){}
};
-//-->Added by PengYunQuan for Validity Cell Range Picker
/** The "Validity" tab dialog. */
-//<!--Modified by PengYunQuan for Validity Cell Range Picker
-//class ScValidationDlg : public SfxTabDialog
class ScValidationDlg :public ScRefHdlrImpl<ScValidationDlg, SfxTabDialog, false>, public ScRefHandlerHelper
-//-->Modified by PengYunQuan for Validity Cell Range Picker
{
- //<!--Added by PengYunQuan for Validity Cell Range Picker
typedef ScRefHdlrImpl<ScValidationDlg, SfxTabDialog, false> ScValidationDlgBase;
- //Start_Moddify by liliang 03/26/2008 SODC_13677_2
DECL_LINK( OkHdl, Button * );
- //End_Moddify by liliang 03/26/2008 SODC_13677_2
+
bool m_bOwnRefHdlr:1;
ScTabViewShell *m_pTabVwSh;
bool m_bRefInputting:1;
bool EnterRefStatus();
bool LeaveRefStatus();
- //-->Added by PengYunQuan for Validity Cell Range Picker
+
public:
- //<!--Modified by PengYunQuan for Validity Cell Range Picker
- //explicit ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet );
explicit ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = NULL );
- //-->Modified by PengYunQuan for Validity Cell Range Picker
- //<!--Added by PengYunQuan for Validity Cell Range Picker
virtual ~ScValidationDlg();
inline static ScValidationDlg * Find1AliveObject( Window *pAncestor );
bool IsAlive();
@@ -148,7 +136,7 @@ public:
bool IsRefInputting(){ return m_bRefInputting; }
- virtual void RefInputStart( ScRefEdit* pEdit, ScRefButton* pButton = NULL )
+ virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL )
{
if( !CanInputStart( pEdit ) )
return;
@@ -181,17 +169,13 @@ public:
enum { SLOTID = SID_VALIDITY_REFERENCE };
BOOL Close();
- //-->Added by PengYunQuan for Validity Cell Range Picker
};
// ============================================================================
/** The tab page "Criteria" from the Validation dialog. */
-//<!--Modified by PengYunQuan for Validity Cell Range Picker
-//class ScTPValidationValue : public SfxTabPage
class ScTPValidationValue : public ScRefHandlerCaller, public SfxTabPage
-//-->Modified by PengYunQuan for Validity Cell Range Picker
{
public:
explicit ScTPValidationValue( Window* pParent, const SfxItemSet& rArgSet );
@@ -223,16 +207,10 @@ private:
FixedText maFtValue;
ListBox maLbValue;
FixedText maFtMin;
- //<!--Modified by PengYunQuan for Validity Cell Range Picker
- //Edit maEdMin;
- ScRefEdit maEdMin;
- //-->Modified by PengYunQuan for Validity Cell Range Picker
+ formula::RefEdit maEdMin;
MultiLineEdit maEdList; /// Entries for explicit list
FixedText maFtMax;
- //<!--Modified by PengYunQuan for Validity Cell Range Picker
- //Edit maEdMax;
- ScRefEdit maEdMax;
- //-->Modified by PengYunQuan for Validity Cell Range Picker
+ formula::RefEdit maEdMax;
FixedText maFtHint; /// Hint text for cell range validity.
String maStrMin;
@@ -241,33 +219,31 @@ private:
String maStrRange;
String maStrList;
sal_Unicode mcFmlaSep; /// List separator in formulas.
- //<!--Added by PengYunQuan for Validity Cell Range Picker
+
DECL_LINK( EditSetFocusHdl, Edit *);
DECL_LINK( KillFocusHdl, Window *);
void OnClick( Button *pBtn );
- ScRefEdit *m_pRefEdit;
- class ScRefButtonEx:public ::ScRefButton
+ formula::RefEdit* m_pRefEdit;
+ class ScRefButtonEx:public ::formula::RefButton
{
void Click();
public:
- ScRefButtonEx( Window* pParent, const ResId& rResId, ScRefEdit* pEdit = NULL, ScRefHandler *pRefHdlr = NULL ): ::ScRefButton( pParent, rResId, pEdit, pRefHdlr ){}
+ ScRefButtonEx( Window* pParent, const ResId& rResId, formula::RefEdit* pEdit = NULL, ScRefHandler *pRefHdlr = NULL ): ::formula::RefButton( pParent, rResId, pEdit, pRefHdlr ){}
}m_btnRef;
friend class ScRefButtonEx;
void SetReferenceHdl( const ScRange& , ScDocument* );
void SetActiveHdl();
- void RefInputStartPreHdl( ScRefEdit* pEdit, ScRefButton* pButton );
+ void RefInputStartPreHdl( formula::RefEdit* pEdit, formula::RefButton* pButton );
void RefInputDonePreHdl();
void RefInputDonePostHdl();
ScValidationDlg * GetValidationDlg();
- //TYPEINFO();
void TidyListBoxes();
public:
USHORT GetAllowEntryPos();
String GetMinText();
void SetupRefDlg();
void RemoveRefDlg();
- //-->Added by PengYunQuan for Validity Cell Range Picker
};
@@ -333,7 +309,6 @@ public:
virtual void Reset ( const SfxItemSet& rArgSet );
};
-//<!--Added by PengYunQuan for Validity Cell Range Picker
inline ScTabViewShell *ScValidationDlg::GetTabViewShell()
{
return m_pTabVwSh;
@@ -343,7 +318,7 @@ inline ScValidationDlg * ScValidationDlg::Find1AliveObject( Window *pAncestor )
{
return static_cast<ScValidationDlg *>( SC_MOD()->Find1RefWindow( SLOTID, pAncestor ) );
}
-//-->Added by PengYunQuan for Validity Cell Range Picker
+
#endif // SC_VALIDATE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */