summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-08-29 22:49:51 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-08-29 22:49:51 -0400
commitd8acdc5fa8d688087d453b7c2bad6cf85af73745 (patch)
treeaadd38a05c764fdbd899a21e47eeea6ef4bfc354 /sc
parenta74bb447e6ff702db7e9f5fdaf897858ff1190fc (diff)
Some cleanups & removed lazy macros.
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx15
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx31
-rw-r--r--sc/source/ui/inc/filtdlg.hxx78
4 files changed, 70 insertions, 56 deletions
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 99001ccff970..3d039437f08c 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -690,7 +690,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG )
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
//SFX_APPWINDOW->Enable();
- bRefInputMode = sal_True;
+ bRefInputMode = true;
}
return 0;
}
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index d05f2d23c313..03de6ca539ae 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -103,7 +103,20 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
aBtnHelp ( this, ScResId( BTN_HELP ) ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
- _INIT_COMMON_FILTER_RSCOBJS
+ aBtnCase ( this, ScResId( BTN_CASE ) ),
+ aBtnRegExp ( this, ScResId( BTN_REGEXP ) ),
+ aBtnHeader ( this, ScResId( BTN_HEADER ) ),
+ aBtnUnique ( this, ScResId( BTN_UNIQUE ) ),
+ aBtnCopyResult ( this, ScResId( BTN_COPY_RESULT ) ),
+ aLbCopyArea ( this, ScResId( LB_COPY_AREA ) ),
+ aEdCopyArea ( this, this, ScResId( ED_COPY_AREA ) ),
+ aRbCopyArea ( this, ScResId( RB_COPY_AREA ) ),
+ aBtnDestPers ( this, ScResId( BTN_DEST_PERS ) ),
+ aFtDbAreaLabel ( this, ScResId( FT_DBAREA_LABEL ) ),
+ aFtDbArea ( this, ScResId( FT_DBAREA ) ),
+ aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ),
+ aStrNoName ( ScGlobal::GetRscString(STR_DB_NONAME) ),
+ aStrNone ( ScResId( SCSTR_NONE ) ),
aStrEmpty ( ScResId( SCSTR_EMPTY ) ),
aStrNotEmpty ( ScResId( SCSTR_NOTEMPTY ) ),
aStrRow ( ScResId( SCSTR_ROW ) ),
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index e50f91df3d1d..caf931ff71ab 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -77,7 +77,20 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
aRbFilterArea ( this, ScResId( RB_CRITERIA_AREA ), &aEdFilterArea, this ),
//
aFlOptions ( this, ScResId( FL_OPTIONS ) ),
- _INIT_COMMON_FILTER_RSCOBJS
+ aBtnCase ( this, ScResId( BTN_CASE ) ),
+ aBtnRegExp ( this, ScResId( BTN_REGEXP ) ),
+ aBtnHeader ( this, ScResId( BTN_HEADER ) ),
+ aBtnUnique ( this, ScResId( BTN_UNIQUE ) ),
+ aBtnCopyResult ( this, ScResId( BTN_COPY_RESULT ) ),
+ aLbCopyArea ( this, ScResId( LB_COPY_AREA ) ),
+ aEdCopyArea ( this, this, ScResId( ED_COPY_AREA ) ),
+ aRbCopyArea ( this, ScResId( RB_COPY_AREA ) ),
+ aBtnDestPers ( this, ScResId( BTN_DEST_PERS ) ),
+ aFtDbAreaLabel ( this, ScResId( FT_DBAREA_LABEL ) ),
+ aFtDbArea ( this, ScResId( FT_DBAREA ) ),
+ aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ),
+ aStrNoName ( ScGlobal::GetRscString(STR_DB_NONAME) ),
+ aStrNone ( ScResId( SCSTR_NONE ) ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) ),
@@ -214,9 +227,9 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
aBtnHeader.Disable();
// Modal-Modus einschalten
-// SetDispatcherLock( sal_True );
+// SetDispatcherLock( true );
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Disable(false); //! allgemeine Methode im ScAnyRefDlg
}
@@ -315,7 +328,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
String theAreaStr( aEdFilterArea.GetText() );
ScQueryParam theOutParam( theQueryData );
ScAddress theAdrCopy;
- sal_Bool bEditInputOk = sal_True;
+ sal_Bool bEditInputOk = true;
sal_Bool bQueryOk = false;
ScRange theFilterArea;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
@@ -332,7 +345,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( SCA_VALID != (nResult & SCA_VALID) )
{
if ( !aBtnMore.GetState() )
- aBtnMore.SetState( sal_True );
+ aBtnMore.SetState( true );
ERRORBOX( STR_INVALID_TABREF );
aEdCopyArea.GrabFocus();
@@ -376,14 +389,14 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
}
else
{
- theOutParam.bInplace = sal_True;
+ theOutParam.bInplace = true;
theOutParam.nDestTab = 0;
theOutParam.nDestCol = 0;
theOutParam.nDestRow = 0;
}
theOutParam.bHasHeader = aBtnHeader.IsChecked();
- theOutParam.bByRow = sal_True;
+ theOutParam.bByRow = true;
theOutParam.bCaseSens = aBtnCase.IsChecked();
theOutParam.bRegExp = aBtnRegExp.IsChecked();
theOutParam.bDuplicate = !aBtnUnique.IsChecked();
@@ -443,12 +456,12 @@ IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer )
if( aEdCopyArea.HasFocus() || aRbCopyArea.HasFocus() )
{
pRefInputEdit = &aEdCopyArea;
- bRefInputMode = sal_True;
+ bRefInputMode = true;
}
else if( aEdFilterArea.HasFocus() || aRbFilterArea.HasFocus() )
{
pRefInputEdit = &aEdFilterArea;
- bRefInputMode = sal_True;
+ bRefInputMode = true;
}
else if( bRefInputMode )
{
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index c8fce8662d92..61e1e2a5b345 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -47,44 +47,6 @@ class ScDocument;
class ScQueryItem;
class TypedScStrCollection;
-//==================================================================
-// Shared resource objects:
-
-#define _COMMON_FILTER_RSCOBJS \
- CheckBox aBtnCase; \
- CheckBox aBtnRegExp; \
- CheckBox aBtnHeader; \
- CheckBox aBtnUnique; \
- CheckBox aBtnCopyResult; \
- ListBox aLbCopyArea; \
- formula::RefEdit aEdCopyArea; \
- formula::RefButton aRbCopyArea; \
- CheckBox aBtnDestPers; \
- FixedText aFtDbAreaLabel; \
- FixedInfo aFtDbArea; \
- const String aStrUndefined; \
- const String aStrNoName; \
- const String aStrNone;
-
-
-#define _INIT_COMMON_FILTER_RSCOBJS \
- aBtnCase ( this, ScResId( BTN_CASE ) ), \
- aBtnRegExp ( this, ScResId( BTN_REGEXP ) ), \
- aBtnHeader ( this, ScResId( BTN_HEADER ) ), \
- aBtnUnique ( this, ScResId( BTN_UNIQUE ) ), \
- aBtnCopyResult ( this, ScResId( BTN_COPY_RESULT ) ), \
- aLbCopyArea ( this, ScResId( LB_COPY_AREA ) ), \
- aEdCopyArea ( this, this, ScResId( ED_COPY_AREA ) ), \
- aRbCopyArea ( this, ScResId( RB_COPY_AREA ), &aEdCopyArea, this ), \
- aBtnDestPers ( this, ScResId( BTN_DEST_PERS ) ), \
- aFtDbAreaLabel ( this, ScResId( FT_DBAREA_LABEL ) ), \
- aFtDbArea ( this, ScResId( FT_DBAREA ) ), \
- aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ), \
- aStrNoName ( ScGlobal::GetRscString(STR_DB_NONAME) ), \
- aStrNone ( ScResId( SCSTR_NONE ) ),
-
-
-//============================================================================
class ScFilterDlg : public ScAnyRefDlg
{
public:
@@ -139,7 +101,20 @@ private:
OKButton aBtnOk;
CancelButton aBtnCancel;
- _COMMON_FILTER_RSCOBJS
+ CheckBox aBtnCase;
+ CheckBox aBtnRegExp;
+ CheckBox aBtnHeader;
+ CheckBox aBtnUnique;
+ CheckBox aBtnCopyResult;
+ ListBox aLbCopyArea;
+ formula::RefEdit aEdCopyArea;
+ formula::RefButton aRbCopyArea;
+ CheckBox aBtnDestPers;
+ FixedText aFtDbAreaLabel;
+ FixedInfo aFtDbArea;
+ const String aStrUndefined;
+ const String aStrNoName;
+ const String aStrNone;
const String aStrEmpty;
const String aStrNotEmpty;
@@ -213,12 +188,25 @@ public:
private:
FixedText aFtFilterArea;
ListBox aLbFilterArea;
- formula::RefEdit aEdFilterArea;
- formula::RefButton aRbFilterArea;
+ formula::RefEdit aEdFilterArea;
+ formula::RefButton aRbFilterArea;
FixedLine aFlOptions;
- _COMMON_FILTER_RSCOBJS
+ CheckBox aBtnCase;
+ CheckBox aBtnRegExp;
+ CheckBox aBtnHeader;
+ CheckBox aBtnUnique;
+ CheckBox aBtnCopyResult;
+ ListBox aLbCopyArea;
+ formula::RefEdit aEdCopyArea;
+ formula::RefButton aRbCopyArea;
+ CheckBox aBtnDestPers;
+ FixedText aFtDbAreaLabel;
+ FixedInfo aFtDbArea;
+ const String aStrUndefined;
+ const String aStrNoName;
+ const String aStrNone;
OKButton aBtnOk;
CancelButton aBtnCancel;
@@ -227,14 +215,14 @@ private:
ScFilterOptionsMgr* pOptionsMgr;
- const sal_uInt16 nWhichQuery;
+ const sal_uInt16 nWhichQuery;
const ScQueryParam theQueryData;
ScQueryItem* pOutItem;
ScViewData* pViewData;
ScDocument* pDoc;
- formula::RefEdit* pRefInputEdit;
- sal_Bool bRefInputMode;
+ formula::RefEdit* pRefInputEdit;
+ bool bRefInputMode;
// Hack: RefInput control
Timer* pTimer;