summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/cellsh.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2011-02-08 11:49:29 +0100
committerMathias Bauer <mba@openoffice.org>2011-02-08 11:49:29 +0100
commit5797fb363dd638178463a1d9dd4aa1d66c67fc99 (patch)
treed3287f4b7c3025e5eb04df2ecd9fcbceeec04610 /sc/source/ui/view/cellsh.cxx
parent76f355864a8c03b64ebfc71139f525a1fc25836a (diff)
parent24684974fe50ca308a7af50a34c5f73d4b2d9d5f (diff)
CWS gnumake3: pull in cws removetooltypes01
Diffstat (limited to 'sc/source/ui/view/cellsh.cxx')
-rw-r--r--sc/source/ui/view/cellsh.cxx106
1 files changed, 53 insertions, 53 deletions
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index c3f763cf1a77..20f65bd03e93 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -85,7 +85,7 @@ SFX_IMPL_INTERFACE(ScCellShell, ScFormatShell , ScResId(SCSTR_CELLSHELL) )
ScCellShell::ScCellShell(ScViewData* pData) :
ScFormatShell(pData),
pImpl( new CellShell_Impl() ),
- bPastePossible(FALSE)
+ bPastePossible(sal_False)
{
SetHelpId(HID_SCSHELL_CELLSH);
SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Cell")));
@@ -95,7 +95,7 @@ ScCellShell::~ScCellShell()
{
if ( pImpl->m_pClipEvtLstnr )
{
- pImpl->m_pClipEvtLstnr->AddRemoveListener( GetViewData()->GetActiveWin(), FALSE );
+ pImpl->m_pClipEvtLstnr->AddRemoveListener( GetViewData()->GetActiveWin(), sal_False );
// #103849# The listener may just now be waiting for the SolarMutex and call the link
// afterwards, in spite of RemoveListener. So the link has to be reset, too.
@@ -116,9 +116,9 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
ScRange aMarkRange;
ScMarkType eMarkType = GetViewData()->GetSimpleArea( aMarkRange );
- BOOL bSimpleArea = (eMarkType == SC_MARK_SIMPLE);
- BOOL bOnlyNotBecauseOfMatrix;
- BOOL bEditable = pTabViewShell->SelectionEditable( &bOnlyNotBecauseOfMatrix );
+ sal_Bool bSimpleArea = (eMarkType == SC_MARK_SIMPLE);
+ sal_Bool bOnlyNotBecauseOfMatrix;
+ sal_Bool bEditable = pTabViewShell->SelectionEditable( &bOnlyNotBecauseOfMatrix );
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocShell = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -130,11 +130,11 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
nRow2 = aMarkRange.aEnd.Row();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
- BOOL bDisable = FALSE;
- BOOL bNeedEdit = TRUE; // muss Selektion editierbar sein?
+ sal_Bool bDisable = sal_False;
+ sal_Bool bNeedEdit = sal_True; // muss Selektion editierbar sein?
switch ( nWhich )
{
case FID_FILL_TO_BOTTOM: // Fuellen oben/unten
@@ -168,7 +168,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
case FID_FILL_SERIES: // Block fuellen
case SID_OPENDLG_TABOP: // Mehrfachoperationen, mind. 2 Zellen markiert?
if (pDoc->GetChangeTrack()!=NULL &&nWhich ==SID_OPENDLG_TABOP)
- bDisable = TRUE;
+ bDisable = sal_True;
else
bDisable = (!bSimpleArea) || (nCol1 == nCol2 && nRow1 == nRow2);
@@ -206,7 +206,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
//! muss man leben.. wird in Copy-Routine abgefangen, sonst
//! muesste hier nochmal Aufwand getrieben werden
if ( !(!bEditable && bOnlyNotBecauseOfMatrix) )
- bNeedEdit = FALSE; // erlaubt, wenn geschuetzt/ReadOnly
+ bNeedEdit = sal_False; // erlaubt, wenn geschuetzt/ReadOnly
break;
case SID_AUTOFORMAT: // Autoformat, mind. 3x3 selektiert
@@ -218,11 +218,11 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
{
if ( !bEditable && bOnlyNotBecauseOfMatrix )
{
- bNeedEdit = FALSE;
+ bNeedEdit = sal_False;
}
if ( pDocShell && pDocShell->IsDocShared() )
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
}
break;
@@ -233,14 +233,14 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
case SID_ENABLE_HYPHENATION :
// nur wegen Matrix nicht editierbar? Attribute trotzdem ok
if ( !bEditable && bOnlyNotBecauseOfMatrix )
- bNeedEdit = FALSE;
+ bNeedEdit = sal_False;
break;
case FID_VALIDATION:
{
if ( pDocShell && pDocShell->IsDocShared() )
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
}
break;
@@ -253,14 +253,14 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
break;
}
if (!bDisable && bNeedEdit && !bEditable)
- bDisable = TRUE;
+ bDisable = sal_True;
if (bDisable)
rSet.DisableItem(nWhich);
else if (nWhich == SID_ENABLE_HYPHENATION)
{
// toggle slots need a bool item
- rSet.Put( SfxBoolItem( nWhich, FALSE ) );
+ rSet.Put( SfxBoolItem( nWhich, sal_False ) );
}
nWhich = aIter.NextWhich();
}
@@ -278,11 +278,11 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
GetViewData()->GetTabNo() );
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
- BOOL bDisable = FALSE;
- BOOL bNeedEdit = TRUE; // muss Cursorposition editierbar sein?
+ sal_Bool bDisable = sal_False;
+ sal_Bool bNeedEdit = sal_True; // muss Cursorposition editierbar sein?
switch ( nWhich )
{
case SID_THESAURUS:
@@ -292,7 +292,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
if (!bDisable)
{
// test for available languages
- USHORT nLang = ScViewUtil::GetEffLanguage( pDoc, aCursor );
+ sal_uInt16 nLang = ScViewUtil::GetEffLanguage( pDoc, aCursor );
bDisable = !ScModule::HasThesaurusLanguage( nLang );
}
}
@@ -308,9 +308,9 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
if (!pDoc->IsBlockEditable( aCursor.Tab(), aRange.aStart.Col(),aRange.aStart.Row(),
aRange.aEnd.Col(),aRange.aEnd.Row() ))
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
- bNeedEdit=FALSE;
+ bNeedEdit=sal_False;
}
}
@@ -319,7 +319,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
{
if ( pDocShell && pDocShell->IsDocShared() )
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
}
break;
@@ -327,7 +327,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet )
if (!bDisable && bNeedEdit)
if (!pDoc->IsBlockEditable( aCursor.Tab(), aCursor.Col(),aCursor.Row(),
aCursor.Col(),aCursor.Row() ))
- bDisable = TRUE;
+ bDisable = sal_True;
if (bDisable)
rSet.DisableItem(nWhich);
nWhich = aIter.NextWhich();
@@ -371,7 +371,7 @@ sal_Bool lcl_TestFormat( SvxClipboardFmtItem& rFormats, const TransferableDataHe
void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats )
{
Window* pWin = GetViewData()->GetActiveWin();
- BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
@@ -399,11 +399,11 @@ void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats )
// Einfuegen, Inhalte einfuegen
-BOOL lcl_IsCellPastePossible( const TransferableDataHelper& rData )
+sal_Bool lcl_IsCellPastePossible( const TransferableDataHelper& rData )
{
- BOOL bPossible = FALSE;
+ sal_Bool bPossible = sal_False;
if ( ScTransferObj::GetOwnClipboard( NULL ) || ScDrawTransferObj::GetOwnClipboard( NULL ) )
- bPossible = TRUE;
+ bPossible = sal_True;
else
{
if ( rData.HasFormat( SOT_FORMAT_BITMAP ) ||
@@ -423,7 +423,7 @@ BOOL lcl_IsCellPastePossible( const TransferableDataHelper& rData )
rData.HasFormat( SOT_FORMATSTR_ID_HTML_SIMPLE ) ||
rData.HasFormat( SOT_FORMATSTR_ID_DIF ) )
{
- bPossible = TRUE;
+ bPossible = sal_True;
}
}
return bPossible;
@@ -456,14 +456,14 @@ void __EXPORT ScCellShell::GetClipState( SfxItemSet& rSet )
pImpl->m_pClipEvtLstnr = new TransferableClipboardListener( LINK( this, ScCellShell, ClipboardChanged ) );
pImpl->m_pClipEvtLstnr->acquire();
Window* pWin = GetViewData()->GetActiveWin();
- pImpl->m_pClipEvtLstnr->AddRemoveListener( pWin, TRUE );
+ pImpl->m_pClipEvtLstnr->AddRemoveListener( pWin, sal_True );
// get initial state
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
bPastePossible = lcl_IsCellPastePossible( aDataHelper );
}
- BOOL bDisable = !bPastePossible;
+ sal_Bool bDisable = !bPastePossible;
// Zellschutz / Multiselektion
@@ -474,11 +474,11 @@ void __EXPORT ScCellShell::GetClipState( SfxItemSet& rSet )
SCTAB nTab = GetViewData()->GetTabNo();
ScDocument* pDoc = GetViewData()->GetDocShell()->GetDocument();
if (!pDoc->IsBlockEditable( nTab, nCol,nRow, nCol,nRow ))
- bDisable = TRUE;
+ bDisable = sal_True;
ScRange aDummy;
ScMarkType eMarkType = GetViewData()->GetSimpleArea( aDummy);
if (eMarkType != SC_MARK_SIMPLE && eMarkType != SC_MARK_SIMPLE_FILTERED)
- bDisable = TRUE;
+ bDisable = sal_True;
}
if (bDisable)
@@ -516,8 +516,8 @@ void ScCellShell::GetState(SfxItemSet &rSet)
// removed: SID_BORDER_OBJECT (old Basic)
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
-// BOOL bOle = pTabViewShell->GetViewFrame()->GetFrame().IsInPlace();
-// BOOL bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo());
+// sal_Bool bOle = pTabViewShell->GetViewFrame()->GetFrame().IsInPlace();
+// sal_Bool bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo());
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScViewData* pData = GetViewData();
ScDocument* pDoc = pData->GetDocument();
@@ -532,7 +532,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -548,7 +548,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
if ( pData->GetSimpleArea( aRange ) == SC_MARK_SIMPLE )
{
String aStr;
- USHORT nFlags = SCA_VALID | SCA_TAB_3D;
+ sal_uInt16 nFlags = SCA_VALID | SCA_TAB_3D;
aRange.Format(aStr,nFlags,pDoc);
rSet.Put( SfxStringItem( nWhich, aStr ) );
}
@@ -612,7 +612,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
* 1: ER Click erweitert Selektion
* 2: ERG Click definiert weitere Selektion
*/
- USHORT nMode = pTabViewShell->GetLockedModifiers();
+ sal_uInt16 nMode = pTabViewShell->GetLockedModifiers();
switch ( nMode )
{
@@ -654,7 +654,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("...")) ) );
else
{
- USHORT nErrCode = 0;
+ sal_uInt16 nErrCode = 0;
ScBaseCell* pCell;
pDoc->GetCell( nPosX, nPosY, nTab, pCell );
if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA )
@@ -747,7 +747,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
if ( !pDoc->IsScenario(nTab) )
{
String aStr;
- USHORT nFlags;
+ sal_uInt16 nFlags;
SCTAB nScTab = nTab + 1;
String aProtect;
bool bSheetProtected = pDoc->IsTabProtected(nTab);
@@ -758,7 +758,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
aList.Insert( new String( aStr ), LIST_APPEND );
pDoc->GetScenarioData( nScTab, aStr, aDummyCol, nFlags );
aList.Insert( new String( aStr ), LIST_APPEND );
- // Protection is TRUE if both Sheet and Scenario are protected
+ // Protection is sal_True if both Sheet and Scenario are protected
aProtect = (bSheetProtected && (nFlags & SC_SCENARIO_PROTECT)) ? '1' : '0';
aList.Insert( new String( aProtect), LIST_APPEND );
++nScTab;
@@ -767,7 +767,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
else
{
String aComment;
- USHORT nDummyFlags;
+ sal_uInt16 nDummyFlags;
pDoc->GetScenarioData( nTab, aComment, aDummyCol, nDummyFlags );
DBG_ASSERT( aList.Count() == 0, "List not empty!" );
aList.Insert( new String( aComment ) );
@@ -775,8 +775,8 @@ void ScCellShell::GetState(SfxItemSet &rSet)
rSet.Put( SfxStringListItem( nWhich, &aList ) );
- ULONG nCount = aList.Count();
- for ( ULONG i=0; i<nCount; i++ )
+ sal_uLong nCount = aList.Count();
+ for ( sal_uLong i=0; i<nCount; i++ )
delete (String*) aList.GetObject(i);
}
break;
@@ -798,7 +798,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
if ( pDoc->IsTabProtected(nTab) )
{
const SfxItemSet& rAttrSet = GetSelectionPattern()->GetItemSet();
- const ScProtectionAttr& rProtAttr = (const ScProtectionAttr&)rAttrSet.Get( ATTR_PROTECTION, TRUE );
+ const ScProtectionAttr& rProtAttr = (const ScProtectionAttr&)rAttrSet.Get( ATTR_PROTECTION, sal_True );
if ( rProtAttr.GetProtection() )
rSet.DisableItem( nWhich );
}
@@ -824,7 +824,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
{
//! test for data pilot operation
}
- else if (!pTabViewShell->OutlinePossible(FALSE))
+ else if (!pTabViewShell->OutlinePossible(sal_False))
rSet.DisableItem( nWhich );
break;
@@ -834,7 +834,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
{
//! test for data pilot operation
}
- else if (!pTabViewShell->OutlinePossible(TRUE))
+ else if (!pTabViewShell->OutlinePossible(sal_True))
rSet.DisableItem( nWhich );
break;
@@ -847,7 +847,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
}
else
{
- BOOL bCol, bRow;
+ sal_Bool bCol, bRow;
pTabViewShell->TestRemoveOutline( bCol, bRow );
if ( !bCol && !bRow )
rSet.DisableItem( nWhich );
@@ -903,21 +903,21 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case SID_DELETE_NOTE:
{
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if ( rMark.IsMarked() || rMark.IsMultiMarked() )
{
if ( pDoc->IsSelectionEditable( rMark ) )
{
// look for at least one note in selection
ScRangeList aRanges;
- rMark.FillRangeListWithMarks( &aRanges, FALSE );
- ULONG nCount = aRanges.Count();
- for (ULONG nPos=0; nPos<nCount && !bEnable; nPos++)
+ rMark.FillRangeListWithMarks( &aRanges, sal_False );
+ sal_uLong nCount = aRanges.Count();
+ for (sal_uLong nPos=0; nPos<nCount && !bEnable; nPos++)
{
ScCellIterator aCellIter( pDoc, *aRanges.GetObject(nPos) );
for( ScBaseCell* pCell = aCellIter.GetFirst(); pCell && !bEnable; pCell = aCellIter.GetNext() )
if ( pCell->HasNote() )
- bEnable = TRUE; // note found
+ bEnable = sal_True; // note found
}
}
}