summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2010-09-30 12:31:16 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-09-30 12:31:16 +0100
commit6e6cdb9b227675bf1bd61079949c9a340fb3efb8 (patch)
tree7a259e89603e6332c3270ff6be0b8b589f75544d /sc/source/ui
parenta027830bbb817e910937f126b310b547ad0e79e2 (diff)
Remove some //CHINA comments and dead code
Hi, I have removed some //CHINA comments, dead code, and reworked some comments in a few files under clone/calc. From Luke Symes <allsymes@gmail.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx7
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx4
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx2
-rw-r--r--sc/source/ui/dbgui/validate.cxx56
4 files changed, 21 insertions, 48 deletions
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index a6796739c841..ca22d6d694a6 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -49,7 +49,6 @@
#include "reffact.hxx"
#include "scresid.hxx"
#include "pvglob.hxx"
-//CHINA001 #include "pvfundlg.hxx"
#include "globstr.hrc"
#include "pivot.hrc"
#include "dpobject.hxx"
@@ -57,8 +56,8 @@
#include "dpshttab.hxx"
#include "scmod.hxx"
-#include "sc.hrc" //CHINA001
-#include "scabstdlg.hxx" //CHINA001
+#include "sc.hrc"
+#include "scabstdlg.hxx"
using namespace com::sun::star;
using ::rtl::OUString;
using ::std::vector;
@@ -1008,7 +1007,7 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex )
if( ScDPLabelData* pData = GetLabelData( (*pArr)[nFieldIndex]->mnCol, &nArrPos ) )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001
+ DBG_ASSERT(pFact, "ScAbstractFactory create fail!");
switch ( eType )
{
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index 96c9f120f5b1..58e153387e09 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -108,9 +108,9 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b
aComment.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ", " ));
aComment += String( ScResId( STR_ON ) );
aComment += ' ';
- aComment += ScGlobal::GetpLocaleData()->getDate( Date() );//CHINA001 aComment += ScGlobal::pLocaleData->getDate( Date() );
+ aComment += ScGlobal::GetpLocaleData()->getDate( Date() );
aComment.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ", " ));
- aComment += ScGlobal::GetpLocaleData()->getTime( Time() );//CHINA001 aComment += ScGlobal::pLocaleData->getTime( Time() );
+ aComment += ScGlobal::GetpLocaleData()->getTime( Time() );
aEdComment .SetText( aComment );
aEdName .SetText( rName );
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 171daa0ca882..e29e33e8fd64 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -101,7 +101,7 @@ sal_Unicode lcl_CharFromCombo( ComboBox& rCombo, const String& rList )
xub_StrLen nCount = rList.GetTokenCount('\t');
for ( xub_StrLen i=0; i<nCount; i+=2 )
{
- if ( ScGlobal::GetpTransliteration()->isEqual( aStr, rList.GetToken(i,'\t') ) )//CHINA001 if ( ScGlobal::GetpTransliteration()->isEqual( aStr, rList.GetToken(i,'\t') ) )
+ if ( ScGlobal::GetpTransliteration()->isEqual( aStr, rList.GetToken(i,'\t') ) )
c = (sal_Unicode)rList.GetToken(i+1,'\t').ToInt32();
}
if (!c && aStr.Len())
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 1ee02badefe1..7271929c5401 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -49,13 +49,13 @@
#include "validate.hrc"
#include "validate.hxx"
#include "compiler.hxx"
-#include "formula/opcode.hxx" //CHINA001
-//<!--Added by PengYunQuan for Validity Cell Range Picker
+#include "formula/opcode.hxx"
+
+// cell range picker
#include "tabvwsh.hxx"
#include <sfx2/viewfrm.hxx>
#include <sfx2/childwin.hxx>
#include "reffact.hxx"
-//-->Added by PengYunQuan for Validity Cell Range Picker
// ============================================================================
@@ -69,9 +69,6 @@ static USHORT pValueRanges[] =
// ============================================================================
-//<!--Modified by PengYunQuan for Validity Cell Range Picker
-//ScValidationDlg::ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet ) :
-// SfxTabDialog( pParent, ScResId( TAB_DLG_VALIDATION ), pArgSet )
ScValidationDlg::ScValidationDlg( Window* pParent,
const SfxItemSet* pArgSet,
ScTabViewShell *pTabViewSh,
@@ -81,7 +78,6 @@ ScValidationDlg::ScValidationDlg( Window* pParent,
m_bOwnRefHdlr( false ),
m_pTabVwSh( pTabViewSh ),
m_bRefInputting( false )
-//-->Modified by PengYunQuan for Validity Cell Range Picker
{
AddTabPage( TP_VALIDATION_VALUES, ScTPValidationValue::Create, 0 );
AddTabPage( TP_VALIDATION_INPUTHELP, ScTPValidationHelp::Create, 0 );
@@ -89,20 +85,18 @@ ScValidationDlg::ScValidationDlg( Window* pParent,
FreeResource();
}
-//<!--Added by PengYunQuan for Validity Cell Range Picker
void ScTPValidationValue::SetReferenceHdl( const ScRange&rRange , ScDocument* pDoc )
{
if ( rRange.aStart != rRange.aEnd )
if ( ScValidationDlg *pValidationDlg = GetValidationDlg() )
if( m_pRefEdit )
- pValidationDlg/*->GetRefHandler()*/->RefInputStart( m_pRefEdit );
+ pValidationDlg->RefInputStart( m_pRefEdit );
if ( m_pRefEdit )
{
String aStr;
rRange.Format( aStr, SCR_ABS_3D, pDoc );
m_pRefEdit->SetRefString( aStr );
- //m_pRefEdit->SetRefString( rRange.aStart != rRange.aEnd ? aStr : String::CreateFromAscii("=").Append( aStr ) );
}
}
@@ -113,7 +107,7 @@ void ScTPValidationValue:: SetActiveHdl()
if ( ScValidationDlg *pValidationDlg = GetValidationDlg() )
if( m_pRefEdit )
{
- pValidationDlg/*->GetRefHandler()*/->RefInputDone();
+ pValidationDlg->RefInputDone();
}
}
@@ -150,11 +144,9 @@ void ScTPValidationValue::RefInputDonePreHdl()
m_pRefEdit->SetParent( this );
m_btnRef.SetParent( m_pRefEdit ); //if Edit SetParent but button not, the tab order will be incorrect, need button to setparent to anthor window and restore parent later in order to restore the tab order
-// aExample1.SetParent( m_pRefEdit ); // the aExample1's child order will affect acc key
}
if( m_btnRef.GetParent()!=this ) m_btnRef.SetParent( this );
-// if( aExample1.GetParent()!=this ) aExample1.SetParent( this );
}
void ScTPValidationValue::RefInputDonePostHdl()
@@ -175,14 +167,11 @@ BOOL ScValidationDlg::Close()
return ScValidationDlgBase::Close();
}
-//-->Added by PengYunQuan for Validity Cell Range Picker
ScValidationDlg::~ScValidationDlg()
{
- //<!--Added by PengYunQuan for Validity Cell Range Picker
if( m_bOwnRefHdlr )
RemoveRefDlg( FALSE );
- //-->Added by PengYunQuan for Validity Cell Range Picker
}
@@ -343,21 +332,16 @@ ScTPValidationValue::ScTPValidationValue( Window* pParent, const SfxItemSet& rAr
maStrValue( ScResId( SCSTR_VALID_VALUE ) ),
maStrRange( ScResId( SCSTR_VALID_RANGE ) ),
maStrList ( ScResId( SCSTR_VALID_LIST ) ),
-//<!--Added by PengYunQuan for Validity Cell Range Picker
- m_btnRef( this, ScResId( RB_VALIDITY_REF ) )
-//-->Added by PengYunQuan for Validity Cell Range Picker
+ m_btnRef( this, ScResId( RB_VALIDITY_REF ) )
{
Init();
FreeResource();
// list separator in formulas
- //CHINA001 const String& rListSep = ScCompiler::pSymbolTableNative[ ocSep ];
- String aListSep = ::GetScCompilerNativeSymbol( ocSep ); //CHINA001
+ String aListSep = ::GetScCompilerNativeSymbol( ocSep );
DBG_ASSERT( aListSep.Len() == 1, "ScTPValidationValue::ScTPValidationValue - list separator error" );
mcFmlaSep = aListSep.Len() ? aListSep.GetChar( 0 ) : ';';
- //<!--Added by PengYunQuan for Validity Cell Range Picker
- m_btnRef.Hide();
- //-->Added by PengYunQuan for Validity Cell Range Picker
+ m_btnRef.Hide(); // cell range picker
}
ScTPValidationValue::~ScTPValidationValue()
@@ -369,13 +353,13 @@ void ScTPValidationValue::Init()
maLbAllow.SetSelectHdl( LINK( this, ScTPValidationValue, SelectHdl ) );
maLbValue.SetSelectHdl( LINK( this, ScTPValidationValue, SelectHdl ) );
maCbShow.SetClickHdl( LINK( this, ScTPValidationValue, CheckHdl ) );
- //<!--Added by PengYunQuan for Validity Cell Range Picker
+
+ // cell range picker
maEdMin.SetGetFocusHdl( LINK( this, ScTPValidationValue, EditSetFocusHdl ) );
maEdMin.SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillFocusHdl ) );
maEdMax.SetGetFocusHdl( LINK( this, ScTPValidationValue, EditSetFocusHdl ) );
m_btnRef.SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillFocusHdl ) );
maEdMax.SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillFocusHdl ) );
- //-->Added by PengYunQuan for Validity Cell Range Picker
maLbAllow.SelectEntryPos( SC_VALIDDLG_ALLOW_ANY );
maLbValue.SelectEntryPos( SC_VALIDDLG_DATA_EQUAL );
@@ -493,7 +477,6 @@ void ScTPValidationValue::SetSecondFormula( const String& rFmlaStr )
maEdMax.SetText( rFmlaStr );
}
-//<!--Added by PengYunQuan for Validity Cell Range Picker
ScValidationDlg * ScTPValidationValue::GetValidationDlg()
{
if( Window *pParent = GetParent() )
@@ -503,6 +486,7 @@ ScValidationDlg * ScTPValidationValue::GetValidationDlg()
}while ( NULL != ( pParent = pParent->GetParent() ) );
return NULL;
}
+
void ScTPValidationValue::SetupRefDlg()
{
if( ScValidationDlg *pValidationDlg = GetValidationDlg() )
@@ -595,7 +579,7 @@ void ScTPValidationValue::TidyListBoxes()
}
}
-IMPL_LINK( ScTPValidationValue, EditSetFocusHdl, Edit *, /*pEdit*/ )
+IMPL_LINK( ScTPValidationValue, EditSetFocusHdl, Edit * )
{
USHORT nPos=maLbAllow.GetSelectEntryPos();
@@ -619,7 +603,6 @@ IMPL_LINK( ScTPValidationValue, KillFocusHdl, Window *, pWnd )
return 0;
}
-//-->Added by PengYunQuan for Validity Cell Range Picker
// ----------------------------------------------------------------------------
@@ -630,7 +613,7 @@ IMPL_LINK( ScTPValidationValue, SelectHdl, ListBox*, EMPTYARG )
bool bRange = (nLbPos == SC_VALIDDLG_ALLOW_RANGE);
bool bList = (nLbPos == SC_VALIDDLG_ALLOW_LIST);
- maCbAllow.Enable( bEnable ); // Leerzellen
+ maCbAllow.Enable( bEnable ); // Empty cell
maFtValue.Enable( bEnable );
maLbValue.Enable( bEnable );
maFtMin.Enable( bEnable );
@@ -673,9 +656,7 @@ IMPL_LINK( ScTPValidationValue, SelectHdl, ListBox*, EMPTYARG )
maFtMax.Show( bShowMax );
maEdMax.Show( bShowMax );
maFtHint.Show( bRange );
- //<!--Added by PengYunQuan for Validity Cell Range Picker
- m_btnRef.Show( bRange );
- //-->Added by PengYunQuan for Validity Cell Range Picker
+ m_btnRef.Show( bRange ); // cell range picker
return 0;
}
@@ -719,8 +700,6 @@ __EXPORT ScTPValidationHelp::~ScTPValidationHelp()
void ScTPValidationHelp::Init()
{
- //aLb.SetSelectHdl( LINK( this, ScTPValidationHelp, SelectHdl ) );
-
aTsbHelp.EnableTriState( FALSE );
}
@@ -908,7 +887,6 @@ IMPL_LINK( ScTPValidationError, ClickSearchHdl, PushButton*, EMPTYARG )
return( 0L );
}
-//<!--Added by PengYunQuan for Validity Cell Range Picker
bool ScValidationDlg::EnterRefStatus()
{
ScTabViewShell *pTabViewShell = GetTabViewShell();
@@ -934,7 +912,6 @@ bool ScValidationDlg::LeaveRefStatus()
USHORT nId = SLOTID;
SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
- //SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
if ( pViewFrm->GetChildWindow( nId ) )
{
DoClose( nId );
@@ -948,7 +925,7 @@ bool ScValidationDlg::SetupRefDlg()
if( EnterRefMode() )
{
SetModal( FALSE );
- return /*SetChkShell( GetDocShell() ),*/ m_bOwnRefHdlr = true && EnterRefStatus();
+ return m_bOwnRefHdlr = true && EnterRefStatus();
}
return false;
@@ -987,8 +964,6 @@ bool ScValidationDlg::RemoveRefDlg( BOOL bRestoreModal /* = TRUE */ )
return true;
}
-//TYPEINIT1( ScTPValidationValue, SfxTabPage )
-
void ScTPValidationValue::ScRefButtonEx::Click()
{
if( ScTPValidationValue *pParent = dynamic_cast< ScTPValidationValue*>( GetParent() ) )
@@ -1018,4 +993,3 @@ bool ScValidationDlg::IsAlive()
{
return SC_MOD()->IsAliveRefDlg( SLOTID, this );
}
-//-->Added by PengYunQuan for Validity Cell Range Picker