summaryrefslogtreecommitdiff
path: root/sc/source/ui/pagedlg/areasdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/pagedlg/areasdlg.cxx')
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx128
1 files changed, 64 insertions, 64 deletions
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index d80e5062f2e9..5ff14b2779ae 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,15 +69,15 @@ const USHORT SC_AREASDLG_RR_OFFSET = 2;
//============================================================================
-#define HDL(hdl) LINK( this, ScPrintAreasDlg, hdl )
-#define ERRORBOX(nId) ErrorBox( this, WinBits(WB_OK|WB_DEF_OK), \
+#define HDL(hdl) LINK( this, ScPrintAreasDlg, hdl )
+#define ERRORBOX(nId) ErrorBox( this, WinBits(WB_OK|WB_DEF_OK), \
ScGlobal::GetRscString( nId ) ).Execute()
-#define SWAP(x1,x2) { int n=x1; x1=x2; x2=n; }
+#define SWAP(x1,x2) { int n=x1; x1=x2; x2=n; }
// globale Funktionen (->am Ende der Datei):
bool lcl_CheckRepeatString( const String& rStr, ScDocument* pDoc, bool bIsRow, ScRange* pRange );
-void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIsRow, String& rStr );
+void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIsRow, String& rStr );
#if 0
// this method is useful when debugging address flags.
@@ -107,40 +107,40 @@ static void printAddressFlags(USHORT nFlag)
#endif
//============================================================================
-// class ScPrintAreasDlg
+// class ScPrintAreasDlg
//----------------------------------------------------------------------------
ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent )
- : ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_AREAS),
+ : ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_AREAS),
//
- aLbPrintArea ( this, ScResId( LB_PRINTAREA ) ),
+ aLbPrintArea ( this, ScResId( LB_PRINTAREA ) ),
aFlPrintArea ( this, ScResId( FL_PRINTAREA ) ),
aEdPrintArea ( this, this, ScResId( ED_PRINTAREA ) ),
- aRbPrintArea ( this, ScResId( RB_PRINTAREA ), &aEdPrintArea, this ),
+ aRbPrintArea ( this, ScResId( RB_PRINTAREA ), &aEdPrintArea, this ),
//
- aLbRepeatRow ( this, ScResId( LB_REPEATROW ) ),
+ aLbRepeatRow ( this, ScResId( LB_REPEATROW ) ),
aFlRepeatRow ( this, ScResId( FL_REPEATROW ) ),
aEdRepeatRow ( this, this, ScResId( ED_REPEATROW ) ),
- aRbRepeatRow ( this, ScResId( RB_REPEATROW ), &aEdRepeatRow, this ),
+ aRbRepeatRow ( this, ScResId( RB_REPEATROW ), &aEdRepeatRow, this ),
//
- aLbRepeatCol ( this, ScResId( LB_REPEATCOL ) ),
+ aLbRepeatCol ( this, ScResId( LB_REPEATCOL ) ),
aFlRepeatCol ( this, ScResId( FL_REPEATCOL ) ),
aEdRepeatCol ( this, this, ScResId( ED_REPEATCOL ) ),
- aRbRepeatCol ( this, ScResId( RB_REPEATCOL ), &aEdRepeatCol, this ),
+ aRbRepeatCol ( this, ScResId( RB_REPEATCOL ), &aEdRepeatCol, this ),
//
- aBtnOk ( this, ScResId( BTN_OK ) ),
- aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
- aBtnHelp ( this, ScResId( BTN_HELP ) ),
+ aBtnOk ( this, ScResId( BTN_OK ) ),
+ aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
+ aBtnHelp ( this, ScResId( BTN_HELP ) ),
//
- bDlgLostFocus ( FALSE ),
- pRefInputEdit ( &aEdPrintArea ),
- pDoc ( NULL ),
- pViewData ( NULL ),
- nCurTab ( 0 )
+ bDlgLostFocus ( FALSE ),
+ pRefInputEdit ( &aEdPrintArea ),
+ pDoc ( NULL ),
+ pViewData ( NULL ),
+ nCurTab ( 0 )
{
ScTabViewShell* pScViewSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
- ScDocShell* pScDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
+ ScDocShell* pScDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
DBG_ASSERT( pScDocSh, "Current DocumentShell not found :-(" );
@@ -189,8 +189,8 @@ BOOL ScPrintAreasDlg::Close()
BOOL ScPrintAreasDlg::IsTableLocked() const
{
- // Druckbereiche gelten pro Tabelle, darum macht es keinen Sinn,
- // bei der Eingabe die Tabelle umzuschalten
+ // Druckbereiche gelten pro Tabelle, darum macht es keinen Sinn,
+ // bei der Eingabe die Tabelle umzuschalten
return TRUE;
}
@@ -205,14 +205,14 @@ void ScPrintAreasDlg::SetReference( const ScRange& rRef, ScDocument* /* pDoc */
if ( rRef.aStart != rRef.aEnd )
RefInputStart( pRefInputEdit );
- String aStr;
+ String aStr;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
if ( &aEdPrintArea == pRefInputEdit )
{
rRef.Format( aStr, SCR_ABS, pDoc, eConv );
-// aEdPrintArea.ReplaceSelected( aStr );
+// aEdPrintArea.ReplaceSelected( aStr );
String aVal = aEdPrintArea.GetText();
Selection aSel = aEdPrintArea.GetSelection();
@@ -287,24 +287,24 @@ void ScPrintAreasDlg::SetActive()
void ScPrintAreasDlg::Impl_Reset()
{
- String aStrRange;
- const ScRange* pRepeatColRange = pDoc->GetRepeatColRange( nCurTab );
- const ScRange* pRepeatRowRange = pDoc->GetRepeatRowRange( nCurTab );
+ String aStrRange;
+ const ScRange* pRepeatColRange = pDoc->GetRepeatColRange( nCurTab );
+ const ScRange* pRepeatRowRange = pDoc->GetRepeatRowRange( nCurTab );
- aEdPrintArea.SetModifyHdl ( HDL(Impl_ModifyHdl) );
- aEdRepeatRow.SetModifyHdl ( HDL(Impl_ModifyHdl) );
- aEdRepeatCol.SetModifyHdl ( HDL(Impl_ModifyHdl) );
+ aEdPrintArea.SetModifyHdl ( HDL(Impl_ModifyHdl) );
+ aEdRepeatRow.SetModifyHdl ( HDL(Impl_ModifyHdl) );
+ aEdRepeatCol.SetModifyHdl ( HDL(Impl_ModifyHdl) );
aEdPrintArea.SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
aEdRepeatRow.SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
aEdRepeatCol.SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
aLbPrintArea.SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
aLbRepeatRow.SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
aLbRepeatCol.SetGetFocusHdl( HDL(Impl_GetFocusHdl) );
- aLbPrintArea.SetSelectHdl ( HDL(Impl_SelectHdl) );
- aLbRepeatRow.SetSelectHdl ( HDL(Impl_SelectHdl) );
- aLbRepeatCol.SetSelectHdl ( HDL(Impl_SelectHdl) );
- aBtnOk .SetClickHdl ( HDL(Impl_BtnHdl) );
- aBtnCancel .SetClickHdl ( HDL(Impl_BtnHdl) );
+ aLbPrintArea.SetSelectHdl ( HDL(Impl_SelectHdl) );
+ aLbRepeatRow.SetSelectHdl ( HDL(Impl_SelectHdl) );
+ aLbRepeatCol.SetSelectHdl ( HDL(Impl_SelectHdl) );
+ aBtnOk .SetClickHdl ( HDL(Impl_BtnHdl) );
+ aBtnCancel .SetClickHdl ( HDL(Impl_BtnHdl) );
Impl_FillLists();
@@ -347,7 +347,7 @@ void ScPrintAreasDlg::Impl_Reset()
if( pDoc->IsPrintEntireSheet( nCurTab ) )
aLbPrintArea.SelectEntryPos( SC_AREASDLG_PR_ENTIRE );
- aEdPrintArea.SaveValue(); // fuer FillItemSet() merken:
+ aEdPrintArea.SaveValue(); // fuer FillItemSet() merken:
aEdRepeatRow.SaveValue();
aEdRepeatCol.SaveValue();
}
@@ -357,8 +357,8 @@ void ScPrintAreasDlg::Impl_Reset()
BOOL ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
{
- String aRangeStr = pEd->GetText();
- BOOL bDataChanged = (pEd->GetSavedValue() != aRangeStr);
+ String aRangeStr = pEd->GetText();
+ BOOL bDataChanged = (pEd->GetSavedValue() != aRangeStr);
if ( (aRangeStr.Len() > 0) && &aEdPrintArea != pEd )
{
@@ -378,10 +378,10 @@ BOOL ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
BOOL ScPrintAreasDlg::Impl_CheckRefStrings()
{
- BOOL bOk = FALSE;
- String aStrPrintArea = aEdPrintArea.GetText();
- String aStrRepeatRow = aEdRepeatRow.GetText();
- String aStrRepeatCol = aEdRepeatCol.GetText();
+ BOOL bOk = FALSE;
+ String aStrPrintArea = aEdPrintArea.GetText();
+ String aStrRepeatRow = aEdRepeatRow.GetText();
+ String aStrRepeatCol = aEdRepeatCol.GetText();
BOOL bPrintAreaOk = TRUE;
if ( aStrPrintArea.Len() )
@@ -443,8 +443,8 @@ void ScPrintAreasDlg::Impl_FillLists()
//------------------------------------------------------
// Selektion holen und String in PrintArea-ListBox merken
//------------------------------------------------------
- ScRange aRange;
- String aStrRange;
+ ScRange aRange;
+ String aStrRange;
BOOL bSimple = TRUE;
if ( pViewData )
@@ -466,15 +466,15 @@ void ScPrintAreasDlg::Impl_FillLists()
//------------------------------------------------------
// Ranges holen und in ListBoxen merken
//------------------------------------------------------
- ScRangeName* pRangeNames = pDoc->GetRangeName();
- const USHORT nCount = pRangeNames ? pRangeNames->GetCount() : 0;
+ ScRangeName* pRangeNames = pDoc->GetRangeName();
+ const USHORT nCount = pRangeNames ? pRangeNames->GetCount() : 0;
if ( nCount > 0 )
{
- String aName;
- String aSymbol;
+ String aName;
+ String aSymbol;
// ScRange aRange;
- ScRangeData* pData = NULL;
+ ScRangeData* pData = NULL;
for ( USHORT i=0; i<nCount; i++ )
{
@@ -530,11 +530,11 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn )
{
if ( Impl_CheckRefStrings() )
{
- BOOL bDataChanged = FALSE;
- String aStr;
- SfxStringItem aPrintArea( SID_CHANGE_PRINTAREA, aStr );
- SfxStringItem aRepeatRow( FN_PARAM_2, aStr );
- SfxStringItem aRepeatCol( FN_PARAM_3, aStr );
+ BOOL bDataChanged = FALSE;
+ String aStr;
+ SfxStringItem aPrintArea( SID_CHANGE_PRINTAREA, aStr );
+ SfxStringItem aRepeatRow( FN_PARAM_2, aStr );
+ SfxStringItem aRepeatCol( FN_PARAM_3, aStr );
//-------------------------
// Druckbereich veraendert?
@@ -670,15 +670,15 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, formula::RefEdit*, pEd )
return 0;
// set list box selection according to edit field
- USHORT nEntryCount = pLb->GetEntryCount();
- String aStrEd( pEd->GetText() );
- String aEdUpper = aStrEd;
+ USHORT nEntryCount = pLb->GetEntryCount();
+ String aStrEd( pEd->GetText() );
+ String aEdUpper = aStrEd;
aEdUpper.ToUpperAscii();
if ( (nEntryCount > nFirstCustomPos) && aStrEd.Len() > 0 )
{
- BOOL bFound = FALSE;
- String* pSymbol = NULL;
+ BOOL bFound = FALSE;
+ String* pSymbol = NULL;
USHORT i;
for ( i=nFirstCustomPos; i<nEntryCount && !bFound; i++ )
@@ -709,10 +709,10 @@ bool lcl_CheckOne_OOO( const String& rStr, bool bIsRow, SCCOLROW& rVal )
// Row: [$]1-MAXTAB
// Col: [$]A-IV
- String aStr = rStr;
+ String aStr = rStr;
xub_StrLen nLen = aStr.Len();
- SCCOLROW nNum = 0;
- BOOL bStrOk = ( nLen > 0 ) && ( bIsRow ? ( nLen < 6 ) : ( nLen < 4 ) );
+ SCCOLROW nNum = 0;
+ BOOL bStrOk = ( nLen > 0 ) && ( bIsRow ? ( nLen < 6 ) : ( nLen < 4 ) );
if ( bStrOk )
{