summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/navipi/content.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/navipi/content.cxx')
-rw-r--r--sc/source/ui/navipi/content.cxx226
1 files changed, 113 insertions, 113 deletions
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 0b991bb83220..7952d968e36c 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -74,7 +74,7 @@ using namespace com::sun::star;
// Reihenfolge der Kategorien im Navigator -------------------------------------
-static USHORT pTypeList[SC_CONTENT_COUNT] =
+static sal_uInt16 pTypeList[SC_CONTENT_COUNT] =
{
SC_CONTENT_ROOT, // ROOT (0) muss vorne stehen
SC_CONTENT_TABLE,
@@ -87,7 +87,7 @@ static USHORT pTypeList[SC_CONTENT_COUNT] =
SC_CONTENT_DRAWING
};
-BOOL ScContentTree::bIsInDrag = FALSE;
+sal_Bool ScContentTree::bIsInDrag = sal_False;
ScDocShell* ScContentTree::GetManualOrCurrent()
@@ -129,10 +129,10 @@ ScContentTree::ScContentTree( Window* pParent, const ResId& rResId ) :
aEntryImages ( ScResId( RID_IMAGELIST_NAVCONT ) ),
aHCEntryImages ( ScResId( RID_IMAGELIST_H_NAVCONT ) ),
nRootType ( SC_CONTENT_ROOT ),
- bHiddenDoc ( FALSE ),
+ bHiddenDoc ( sal_False ),
pHiddenDocument ( NULL )
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<SC_CONTENT_COUNT; i++)
pPosList[pTypeList[i]] = i; // invers zum suchen
@@ -153,7 +153,7 @@ ScContentTree::~ScContentTree()
{
}
-void ScContentTree::InitRoot( USHORT nType )
+void ScContentTree::InitRoot( sal_uInt16 nType )
{
if ( !nType )
return;
@@ -167,8 +167,8 @@ void ScContentTree::InitRoot( USHORT nType )
const Image& rImage = aEntryImages.GetImage( nType );
String aName( ScResId( SCSTR_CONTENT_ROOT + nType ) );
// wieder an die richtige Position:
- USHORT nPos = nRootType ? 0 : pPosList[nType]-1;
- SvLBoxEntry* pNew = InsertEntry( aName, rImage, rImage, NULL, FALSE, nPos );
+ sal_uInt16 nPos = nRootType ? 0 : pPosList[nType]-1;
+ SvLBoxEntry* pNew = InsertEntry( aName, rImage, rImage, NULL, sal_False, nPos );
const Image& rHCImage = aHCEntryImages.GetImage( nType );
SetExpandedEntryBmp( pNew, rHCImage, BMP_COLOR_HIGHCONTRAST );
@@ -180,11 +180,11 @@ void ScContentTree::InitRoot( USHORT nType )
void ScContentTree::ClearAll()
{
Clear();
- for (USHORT i=1; i<SC_CONTENT_COUNT; i++)
+ for (sal_uInt16 i=1; i<SC_CONTENT_COUNT; i++)
InitRoot(i);
}
-void ScContentTree::ClearType(USHORT nType)
+void ScContentTree::ClearType(sal_uInt16 nType)
{
if (!nType)
ClearAll();
@@ -200,7 +200,7 @@ void ScContentTree::ClearType(USHORT nType)
}
}
-void ScContentTree::InsertContent( USHORT nType, const String& rValue )
+void ScContentTree::InsertContent( sal_uInt16 nType, const String& rValue )
{
if (nType >= SC_CONTENT_COUNT)
{
@@ -217,7 +217,7 @@ void ScContentTree::InsertContent( USHORT nType, const String& rValue )
}
}
-void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, SvLBoxEntry* pEntry ) const
+void ScContentTree::GetEntryIndexes( sal_uInt16& rnRootIndex, sal_uLong& rnChildIndex, SvLBoxEntry* pEntry ) const
{
rnRootIndex = SC_CONTENT_ROOT;
rnChildIndex = SC_CONTENT_NOCHILD;
@@ -227,7 +227,7 @@ void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, S
SvLBoxEntry* pParent = GetParent( pEntry );
bool bFound = false;
- for( USHORT nRoot = 1; !bFound && (nRoot < SC_CONTENT_COUNT); ++nRoot )
+ for( sal_uInt16 nRoot = 1; !bFound && (nRoot < SC_CONTENT_COUNT); ++nRoot )
{
if( pEntry == pRootNodes[ nRoot ] )
{
@@ -240,7 +240,7 @@ void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, S
rnRootIndex = nRoot;
// search the entry in all child entries of the parent
- ULONG nEntry = 0;
+ sal_uLong nEntry = 0;
SvLBoxEntry* pIterEntry = FirstChild( pParent );
while( !bFound && pIterEntry )
{
@@ -258,10 +258,10 @@ void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, S
}
}
-ULONG ScContentTree::GetChildIndex( SvLBoxEntry* pEntry ) const
+sal_uLong ScContentTree::GetChildIndex( SvLBoxEntry* pEntry ) const
{
- USHORT nRoot;
- ULONG nChild;
+ sal_uInt16 nRoot;
+ sal_uLong nChild;
GetEntryIndexes( nRoot, nChild, pEntry );
return nChild;
}
@@ -272,8 +272,8 @@ String lcl_GetDBAreaRange( ScDocument* pDoc, const String& rDBName )
if (pDoc)
{
ScDBCollection* pDbNames = pDoc->GetDBCollection();
- USHORT nCount = pDbNames->GetCount();
- for ( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pDbNames->GetCount();
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
ScDBData* pData = (*pDbNames)[i];
if ( pData->GetName() == rDBName )
@@ -290,8 +290,8 @@ String lcl_GetDBAreaRange( ScDocument* pDoc, const String& rDBName )
IMPL_LINK( ScContentTree, ContentDoubleClickHdl, ScContentTree *, EMPTYARG )
{
- USHORT nType;
- ULONG nChild;
+ sal_uInt16 nType;
+ sal_uLong nChild;
SvLBoxEntry* pEntry = GetCurEntry();
GetEntryIndexes( nType, nChild, pEntry );
@@ -370,7 +370,7 @@ void ScContentTree::MouseButtonDown( const MouseEvent& rMEvt )
void ScContentTree::KeyInput( const KeyEvent& rKEvt )
{
- BOOL bUsed = FALSE;
+ sal_Bool bUsed = sal_False;
const KeyCode aCode = rKEvt.GetKeyCode();
if (aCode.GetCode() == KEY_RETURN)
@@ -379,15 +379,15 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt )
{
case KEY_MOD1:
ToggleRoot(); // toggle root mode (as in Writer)
- bUsed = TRUE;
+ bUsed = sal_True;
break;
case 0:
{
SvLBoxEntry* pEntry = GetCurEntry();
if( pEntry )
{
- USHORT nType;
- ULONG nChild;
+ sal_uInt16 nType;
+ sal_uLong nChild;
GetEntryIndexes( nType, nChild, pEntry );
if( (nType != SC_CONTENT_ROOT) && (nChild == SC_CONTENT_NOCHILD) )
@@ -402,7 +402,7 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt )
ContentDoubleClickHdl(0); // select content as if double clicked
}
- bUsed = TRUE;
+ bUsed = sal_True;
}
break;
}
@@ -413,12 +413,12 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt )
SvTreeListBox::KeyInput(rKEvt);
}
-//BOOL __EXPORT ScContentTree::Drop( const DropEvent& rEvt )
+//sal_Bool __EXPORT ScContentTree::Drop( const DropEvent& rEvt )
//{
// return pParentWindow->Drop(rEvt); // Drop auf Navigator
//}
-//BOOL __EXPORT ScContentTree::QueryDrop( DropEvent& rEvt )
+//sal_Bool __EXPORT ScContentTree::QueryDrop( DropEvent& rEvt )
//{
// return pParentWindow->QueryDrop(rEvt); // Drop auf Navigator
//}
@@ -444,7 +444,7 @@ void ScContentTree::DragFinished( sal_Int8 /* nAction */ )
void __EXPORT ScContentTree::Command( const CommandEvent& rCEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
switch ( rCEvt.GetCommand() )
{
@@ -458,7 +458,7 @@ void __EXPORT ScContentTree::Command( const CommandEvent& rCEvt )
Application::PostUserEvent( STATIC_LINK( this, ScContentTree, ExecDragHdl ) );
- bDone = TRUE;
+ bDone = sal_True;
break;
case COMMAND_CONTEXTMENU:
@@ -475,8 +475,8 @@ void __EXPORT ScContentTree::Command( const CommandEvent& rCEvt )
ScPopupMenu aDocMenu;
aDocMenu.SetMenuFlags( aDocMenu.GetMenuFlags() | MENU_FLAG_NOAUTOMNEMONICS );
- USHORT i=0;
- USHORT nPos=0;
+ sal_uInt16 i=0;
+ sal_uInt16 nPos=0;
// geladene Dokumente
ScDocShell* pCurrentSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
SfxObjectShell* pSh = SfxObjectShell::GetFirst();
@@ -519,13 +519,13 @@ void __EXPORT ScContentTree::Command( const CommandEvent& rCEvt )
if ( aDropMenu.WasHit() ) // Drag-Drop Modus
{
- USHORT nId = aDropMenu.GetSelected();
+ sal_uInt16 nId = aDropMenu.GetSelected();
if ( nId >= RID_DROPMODE_URL && nId <= RID_DROPMODE_COPY )
pParentWindow->SetDropMode( nId - RID_DROPMODE_URL );
}
else if ( aDocMenu.WasHit() ) // angezeigtes Dokument
{
- USHORT nId = aDocMenu.GetSelected();
+ sal_uInt16 nId = aDocMenu.GetSelected();
String aName = aDocMenu.GetItemText(nId);
SelectDoc( aName );
}
@@ -539,14 +539,14 @@ void __EXPORT ScContentTree::Command( const CommandEvent& rCEvt )
void __EXPORT ScContentTree::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
SvLBoxEntry* pEntry = GetEntry( aPos );
if ( pEntry )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String aHelpText;
SvLBoxEntry* pParent = GetParent(pEntry);
if ( !pParent ) // Top-Level ?
@@ -554,23 +554,23 @@ void __EXPORT ScContentTree::RequestHelp( const HelpEvent& rHEvt )
aHelpText = String::CreateFromInt32( GetChildCount(pEntry) );
aHelpText += ' ';
aHelpText += GetEntryText(pEntry);
- bRet = TRUE;
+ bRet = sal_True;
}
else if ( pParent == pRootNodes[SC_CONTENT_NOTE] )
{
aHelpText = GetEntryText(pEntry); // Notizen als Help-Text
- bRet = TRUE;
+ bRet = sal_True;
}
else if ( pParent == pRootNodes[SC_CONTENT_AREALINK] )
{
- ULONG nIndex = GetChildIndex(pEntry);
+ sal_uLong nIndex = GetChildIndex(pEntry);
if( nIndex != SC_CONTENT_NOCHILD )
{
const ScAreaLink* pLink = GetLink(nIndex);
if (pLink)
{
aHelpText = pLink->GetFile(); // Source-Datei als Help-Text
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -588,7 +588,7 @@ void __EXPORT ScContentTree::RequestHelp( const HelpEvent& rHEvt )
Rectangle aItemRect( aPos, aSize );
Help::ShowQuickHelp( this, aItemRect, aHelpText );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -611,7 +611,7 @@ ScDocument* ScContentTree::GetSourceDocument()
return NULL;
}
-void ScContentTree::Refresh( USHORT nType )
+void ScContentTree::Refresh( sal_uInt16 nType )
{
if ( bHiddenDoc && !pHiddenDocument )
return; // anderes Dokument angezeigt
@@ -631,7 +631,7 @@ void ScContentTree::Refresh( USHORT nType )
if (!DrawNamesChanged(SC_CONTENT_DRAWING))
return;
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
ClearType( nType );
@@ -653,7 +653,7 @@ void ScContentTree::Refresh( USHORT nType )
GetLinkNames();
ApplySettings();
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
}
void ScContentTree::GetTableNames()
@@ -684,12 +684,12 @@ void ScContentTree::GetAreaNames()
return;
ScRangeName* pRangeNames = pDoc->GetRangeName();
- USHORT nCount = pRangeNames->GetCount();
+ sal_uInt16 nCount = pRangeNames->GetCount();
if ( nCount > 0 )
{
- USHORT nValidCount = 0;
+ sal_uInt16 nValidCount = 0;
ScRange aDummy;
- USHORT i;
+ sal_uInt16 i;
for ( i=0; i<nCount; i++ )
{
ScRangeData* pData = (*pRangeNames)[i];
@@ -699,7 +699,7 @@ void ScContentTree::GetAreaNames()
if ( nValidCount )
{
ScRangeData** ppSortArray = new ScRangeData* [ nValidCount ];
- USHORT j;
+ sal_uInt16 j;
for ( i=0, j=0; i<nCount; i++ )
{
ScRangeData* pData = (*pRangeNames)[i];
@@ -730,11 +730,11 @@ void ScContentTree::GetDbNames()
return;
ScDBCollection* pDbNames = pDoc->GetDBCollection();
- USHORT nCount = pDbNames->GetCount();
+ sal_uInt16 nCount = pDbNames->GetCount();
if ( nCount > 0 )
{
String aStrNoName( ScGlobal::GetRscString(STR_DB_NONAME) );
- for ( USHORT i=0; i<nCount; i++ )
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
ScDBData* pData = (*pDbNames)[i];
String aStrName = pData->GetName();
@@ -744,7 +744,7 @@ void ScContentTree::GetDbNames()
}
}
-bool ScContentTree::IsPartOfType( USHORT nContentType, USHORT nObjIdentifier ) // static
+bool ScContentTree::IsPartOfType( sal_uInt16 nContentType, sal_uInt16 nObjIdentifier ) // static
{
bool bRet = false;
switch ( nContentType )
@@ -764,7 +764,7 @@ bool ScContentTree::IsPartOfType( USHORT nContentType, USHORT nObjIdentifier )
return bRet;
}
-void ScContentTree::GetDrawNames( USHORT nType )
+void ScContentTree::GetDrawNames( sal_uInt16 nType )
{
if ( nRootType && nRootType != nType ) // ausgeblendet ?
return;
@@ -832,8 +832,8 @@ void ScContentTree::GetLinkNames()
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?");
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -843,18 +843,18 @@ void ScContentTree::GetLinkNames()
}
}
-const ScAreaLink* ScContentTree::GetLink( ULONG nIndex )
+const ScAreaLink* ScContentTree::GetLink( sal_uLong nIndex )
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
return NULL;
- ULONG nFound = 0;
+ sal_uLong nFound = 0;
sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager();
DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?");
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nCount = rLinks.Count();
- for (USHORT i=0; i<nCount; i++)
+ sal_uInt16 nCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -897,13 +897,13 @@ void ScContentTree::GetNoteStrings()
}
}
-ScAddress ScContentTree::GetNotePos( ULONG nIndex )
+ScAddress ScContentTree::GetNotePos( sal_uLong nIndex )
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
return ScAddress();
- ULONG nFound = 0;
+ sal_uLong nFound = 0;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
{
@@ -925,19 +925,19 @@ ScAddress ScContentTree::GetNotePos( ULONG nIndex )
return ScAddress();
}
-BOOL ScContentTree::NoteStringsChanged()
+sal_Bool ScContentTree::NoteStringsChanged()
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
- return FALSE;
+ return sal_False;
SvLBoxEntry* pParent = pRootNodes[SC_CONTENT_NOTE];
if (!pParent)
- return FALSE;
+ return sal_False;
SvLBoxEntry* pEntry = FirstChild( pParent );
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
SCTAB nTabCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount && bEqual; nTab++)
{
@@ -948,11 +948,11 @@ BOOL ScContentTree::NoteStringsChanged()
if( const ScPostIt* pNote = pCell->GetNote() )
{
if ( !pEntry )
- bEqual = FALSE;
+ bEqual = sal_False;
else
{
if ( lcl_NoteString( *pNote ) != GetEntryText(pEntry) )
- bEqual = FALSE;
+ bEqual = sal_False;
pEntry = NextSibling( pEntry );
}
@@ -962,27 +962,27 @@ BOOL ScContentTree::NoteStringsChanged()
}
if ( pEntry )
- bEqual = FALSE; // kommt noch was
+ bEqual = sal_False; // kommt noch was
return !bEqual;
}
-BOOL ScContentTree::DrawNamesChanged( USHORT nType )
+sal_Bool ScContentTree::DrawNamesChanged( sal_uInt16 nType )
{
ScDocument* pDoc = GetSourceDocument();
if (!pDoc)
- return FALSE;
+ return sal_False;
SvLBoxEntry* pParent = pRootNodes[nType];
if (!pParent)
- return FALSE;
+ return sal_False;
SvLBoxEntry* pEntry = FirstChild( pParent );
// iterate in flat mode for groups
SdrIterMode eIter = ( nType == SC_CONTENT_DRAWING ) ? IM_FLAT : IM_DEEPNOGROUPS;
- BOOL bEqual = TRUE;
+ sal_Bool bEqual = sal_True;
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
SfxObjectShell* pShell = pDoc->GetDocumentShell();
if (pDrawLayer && pShell)
@@ -1001,11 +1001,11 @@ BOOL ScContentTree::DrawNamesChanged( USHORT nType )
if ( IsPartOfType( nType, pObject->GetObjIdentifier() ) )
{
if ( !pEntry )
- bEqual = FALSE;
+ bEqual = sal_False;
else
{
if ( ScDrawLayer::GetVisibleName( pObject ) != GetEntryText(pEntry) )
- bEqual = FALSE;
+ bEqual = sal_False;
pEntry = NextSibling( pEntry );
}
@@ -1017,15 +1017,15 @@ BOOL ScContentTree::DrawNamesChanged( USHORT nType )
}
if ( pEntry )
- bEqual = FALSE; // kommt noch was
+ bEqual = sal_False; // kommt noch was
return !bEqual;
}
-BOOL lcl_GetRange( ScDocument* pDoc, USHORT nType, const String& rName, ScRange& rRange )
+sal_Bool lcl_GetRange( ScDocument* pDoc, sal_uInt16 nType, const String& rName, ScRange& rRange )
{
- BOOL bFound = FALSE;
- USHORT nPos;
+ sal_Bool bFound = sal_False;
+ sal_uInt16 nPos;
if ( nType == SC_CONTENT_RANGENAME )
{
@@ -1033,7 +1033,7 @@ BOOL lcl_GetRange( ScDocument* pDoc, USHORT nType, const String& rName, ScRange&
if (pList)
if (pList->SearchName( rName, nPos ))
if ( (*pList)[nPos]->IsValidReference( rRange ) )
- bFound = TRUE;
+ bFound = sal_True;
}
else if ( nType == SC_CONTENT_DBAREA )
{
@@ -1046,22 +1046,22 @@ BOOL lcl_GetRange( ScDocument* pDoc, USHORT nType, const String& rName, ScRange&
SCROW nRow1, nRow2;
(*pList)[nPos]->GetArea(nTab,nCol1,nRow1,nCol2,nRow2);
rRange = ScRange( nCol1,nRow1,nTab, nCol2,nRow2,nTab );
- bFound = TRUE;
+ bFound = sal_True;
}
}
return bFound;
}
-void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, USHORT nType, Window* pWin )
+void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, sal_uInt16 nType, Window* pWin )
{
ScDocument* pSrcDoc = pSrcShell->GetDocument();
ScDrawLayer* pModel = pSrcDoc->GetDrawLayer();
if (pModel)
{
- BOOL bOle = ( nType == SC_CONTENT_OLEOBJECT );
- BOOL bGraf = ( nType == SC_CONTENT_GRAPHIC );
- USHORT nDrawId = sal::static_int_cast<USHORT>( bOle ? OBJ_OLE2 : ( bGraf ? OBJ_GRAF : OBJ_GRUP ) );
+ sal_Bool bOle = ( nType == SC_CONTENT_OLEOBJECT );
+ sal_Bool bGraf = ( nType == SC_CONTENT_GRAPHIC );
+ sal_uInt16 nDrawId = sal::static_int_cast<sal_uInt16>( bOle ? OBJ_OLE2 : ( bGraf ? OBJ_GRAF : OBJ_GRUP ) );
SCTAB nTab = 0;
SdrObject* pObject = pModel->GetNamedObject( rName, nDrawId, nTab );
if (pObject)
@@ -1091,10 +1091,10 @@ void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, USHORT nType,
}
}
-void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, USHORT nFlags, Window* pWin )
+void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, sal_uInt16 nFlags, Window* pWin )
{
ScMarkData aMark;
- aMark.SelectTable( rRange.aStart.Tab(), TRUE );
+ aMark.SelectTable( rRange.aStart.Tab(), sal_True );
aMark.SetMarkArea( rRange );
ScDocument* pSrcDoc = pSrcShell->GetDocument();
@@ -1105,7 +1105,7 @@ void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, USHORT nFlag
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
ScClipParam aClipParam(rRange, false);
pSrcDoc->CopyToClip(aClipParam, pClipDoc, &aMark);
- // pClipDoc->ExtendMerge( rRange, TRUE );
+ // pClipDoc->ExtendMerge( rRange, sal_True );
TransferableObjectDescriptor aObjDesc;
pSrcShell->FillTransferableObjectDescriptor( aObjDesc );
@@ -1127,12 +1127,12 @@ void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, USHORT nFlag
void ScContentTree::DoDrag()
{
ScDocumentLoader* pDocLoader = NULL;
- bIsInDrag = TRUE;
+ bIsInDrag = sal_True;
ScModule* pScMod = SC_MOD();
- USHORT nType;
- ULONG nChild;
+ sal_uInt16 nType;
+ sal_uLong nChild;
SvLBoxEntry* pEntry = GetCurEntry();
GetEntryIndexes( nType, nChild, pEntry );
@@ -1160,11 +1160,11 @@ void ScContentTree::DoDrag()
}
}
- BOOL bDoLinkTrans = FALSE; // use ScLinkTransferObj
+ sal_Bool bDoLinkTrans = sal_False; // use ScLinkTransferObj
String aLinkURL; // for ScLinkTransferObj
String aLinkText;
- USHORT nDropMode = pParentWindow->GetDropMode();
+ sal_uInt16 nDropMode = pParentWindow->GetDropMode();
switch ( nDropMode )
{
case SC_DROPMODE_URL:
@@ -1183,7 +1183,7 @@ void ScContentTree::DoDrag()
aLinkURL = aUrl;
aLinkText = aText;
}
- bDoLinkTrans = TRUE;
+ bDoLinkTrans = sal_True;
}
break;
case SC_DROPMODE_LINK:
@@ -1196,12 +1196,12 @@ void ScContentTree::DoDrag()
{
case SC_CONTENT_TABLE:
pScMod->SetDragLink( aDocName, aText, EMPTY_STRING );
- bDoLinkTrans = TRUE;
+ bDoLinkTrans = sal_True;
break;
case SC_CONTENT_RANGENAME:
case SC_CONTENT_DBAREA:
pScMod->SetDragLink( aDocName, EMPTY_STRING, aText );
- bDoLinkTrans = TRUE;
+ bDoLinkTrans = sal_True;
break;
// other types cannot be linked
@@ -1270,7 +1270,7 @@ void ScContentTree::DoDrag()
}
}
- bIsInDrag = FALSE; // static Member
+ bIsInDrag = sal_False; // static Member
delete pDocLoader; // falls Dokument zum Draggen geladen wurde
}
@@ -1295,19 +1295,19 @@ IMPL_STATIC_LINK(ScContentTree, ExecDragHdl, void*, EMPTYARG)
//UNUSED2008-05 pParentWindow->SetText(aTitle);
//UNUSED2008-05 }
-BOOL ScContentTree::LoadFile( const String& rUrl )
+sal_Bool ScContentTree::LoadFile( const String& rUrl )
{
String aDocName = rUrl;
xub_StrLen nPos = aDocName.Search('#');
if ( nPos != STRING_NOTFOUND )
aDocName.Erase(nPos); // nur der Name, ohne #...
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
String aFilter, aOptions;
ScDocumentLoader aLoader( aDocName, aFilter, aOptions );
if ( !aLoader.IsError() )
{
- bHiddenDoc = TRUE;
+ bHiddenDoc = sal_True;
aHiddenName = aDocName;
aHiddenTitle = aLoader.GetTitle();
pHiddenDocument = aLoader.GetDocument();
@@ -1327,7 +1327,7 @@ BOOL ScContentTree::LoadFile( const String& rUrl )
return bReturn;
}
-void ScContentTree::InitWindowBits( BOOL bButtons )
+void ScContentTree::InitWindowBits( sal_Bool bButtons )
{
WinBits nFlags = GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL;
if (bButtons)
@@ -1336,7 +1336,7 @@ void ScContentTree::InitWindowBits( BOOL bButtons )
SetStyle( nFlags );
}
-void ScContentTree::SetRootType( USHORT nNew )
+void ScContentTree::SetRootType( sal_uInt16 nNew )
{
if ( nNew != nRootType )
{
@@ -1351,14 +1351,14 @@ void ScContentTree::SetRootType( USHORT nNew )
void ScContentTree::ToggleRoot() // nach Selektion
{
- USHORT nNew = SC_CONTENT_ROOT;
+ sal_uInt16 nNew = SC_CONTENT_ROOT;
if ( nRootType == SC_CONTENT_ROOT )
{
SvLBoxEntry* pEntry = GetCurEntry();
if (pEntry)
{
SvLBoxEntry* pParent = GetParent(pEntry);
- for (USHORT i=1; i<SC_CONTENT_COUNT; i++)
+ for (sal_uInt16 i=1; i<SC_CONTENT_COUNT; i++)
if ( pEntry == pRootNodes[i] || pParent == pRootNodes[i] )
nNew = i;
}
@@ -1370,7 +1370,7 @@ void ScContentTree::ToggleRoot() // nach Selektion
void ScContentTree::ResetManualDoc()
{
aManualDoc.Erase();
- bHiddenDoc = FALSE;
+ bHiddenDoc = sal_False;
ActiveDocChanged();
}
@@ -1435,7 +1435,7 @@ void ScContentTree::SelectDoc(const String& rName) // rName wie im Menue/Li
//
- BOOL bLoaded = FALSE;
+ sal_Bool bLoaded = sal_False;
// ist es ein normal geladenes Doc ?
@@ -1444,13 +1444,13 @@ void ScContentTree::SelectDoc(const String& rName) // rName wie im Menue/Li
{
if ( pSh->ISA(ScDocShell) )
if ( pSh->GetTitle() == aRealName )
- bLoaded = TRUE;
+ bLoaded = sal_True;
pSh = SfxObjectShell::GetNext( *pSh );
}
if (bLoaded)
{
- bHiddenDoc = FALSE;
+ bHiddenDoc = sal_False;
SetManualDoc(aRealName);
}
else if (aHiddenTitle.Len()) // verstecktes ausgewaehlt
@@ -1469,15 +1469,15 @@ void ScContentTree::ApplySettings()
const ScNavigatorSettings* pSettings = pParentWindow->GetNavigatorSettings();
if( pSettings )
{
- USHORT nRootSel = pSettings->GetRootSelected();
- ULONG nChildSel = pSettings->GetChildSelected();
+ sal_uInt16 nRootSel = pSettings->GetRootSelected();
+ sal_uLong nChildSel = pSettings->GetChildSelected();
- for( USHORT nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry )
+ for( sal_uInt16 nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry )
{
if( pRootNodes[ nEntry ] )
{
// expand
- BOOL bExp = pSettings->IsExpanded( nEntry );
+ sal_Bool bExp = pSettings->IsExpanded( nEntry );
if( bExp != IsExpanded( pRootNodes[ nEntry ] ) )
{
if( bExp )
@@ -1504,13 +1504,13 @@ void ScContentTree::StoreSettings() const
ScNavigatorSettings* pSettings = pParentWindow->GetNavigatorSettings();
if( pSettings )
{
- for( USHORT nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry )
+ for( sal_uInt16 nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry )
{
- BOOL bExp = pRootNodes[ nEntry ] && IsExpanded( pRootNodes[ nEntry ] );
+ sal_Bool bExp = pRootNodes[ nEntry ] && IsExpanded( pRootNodes[ nEntry ] );
pSettings->SetExpanded( nEntry, bExp );
}
- USHORT nRoot;
- ULONG nChild;
+ sal_uInt16 nRoot;
+ sal_uLong nChild;
GetEntryIndexes( nRoot, nChild, GetCurEntry() );
pSettings->SetRootSelected( nRoot );
pSettings->SetChildSelected( nChild );