diff options
author | Carsten Driesner <cd@openoffice.org> | 2011-01-17 11:41:00 +0100 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2011-01-17 11:41:00 +0100 |
commit | 3d6bed44c8ca414f60c03223482b9f7b94d56c14 (patch) | |
tree | 9b015da930eaf9856b5f05707245327185fff884 /sd/source/ui/dlg/sdtreelb.cxx | |
parent | a4babcc4a08648e99d988fca640ab555da10048c (diff) |
removetooltypes01: #i112600# Remove tools types from sd
Diffstat (limited to 'sd/source/ui/dlg/sdtreelb.cxx')
-rwxr-xr-x | sd/source/ui/dlg/sdtreelb.cxx | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index c0a72d539add..99954c0557aa 100755 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -84,9 +84,9 @@ public: }; -BOOL SD_DLLPRIVATE SdPageObjsTLB::bIsInDrag = FALSE; +sal_Bool SD_DLLPRIVATE SdPageObjsTLB::bIsInDrag = sal_False; -BOOL SdPageObjsTLB::IsInDrag() +sal_Bool SdPageObjsTLB::IsInDrag() { return bIsInDrag; } @@ -103,7 +103,7 @@ SdPageObjsTLB::SdPageObjsTransferable::SdPageObjsTransferable( ::sd::DrawDocShell& rDocShell, NavigatorDragType eDragType, const ::com::sun::star::uno::Any& rTreeListBoxData ) - : SdTransferable(rDocShell.GetDoc(), NULL, TRUE), + : SdTransferable(rDocShell.GetDoc(), NULL, sal_True), mrParent( rParent ), maBookmark( rBookmark ), mrDocShell( rDocShell ), @@ -132,7 +132,7 @@ void SdPageObjsTLB::SdPageObjsTransferable::AddSupportedFormats() sal_Bool SdPageObjsTLB::SdPageObjsTransferable::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) { - ULONG nFormatId = SotExchange::GetFormat( rFlavor ); + sal_uLong nFormatId = SotExchange::GetFormat( rFlavor ); switch (nFormatId) { case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK: @@ -251,7 +251,7 @@ SdPageObjsTLB::SdPageObjsTLB( Window* pParentWin, const SdResId& rSdResId ) , maImgGraphic ( BitmapEx( SdResId( BMP_GRAPHIC ) ) ) , maImgOleH ( BitmapEx( SdResId( BMP_OLE_H ) ) ) , maImgGraphicH ( BitmapEx( SdResId( BMP_GRAPHIC_H ) ) ) -, mbLinkableSelected ( FALSE ) +, mbLinkableSelected ( sal_False ) , mpDropNavWin ( NULL ) , mbShowAllShapes ( false ) , mbShowAllPages ( false ) @@ -328,9 +328,9 @@ String SdPageObjsTLB::GetObjectName( |* \************************************************************************/ -BOOL SdPageObjsTLB::SelectEntry( const String& rName ) +sal_Bool SdPageObjsTLB::SelectEntry( const String& rName ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if( rName.Len() ) { @@ -342,7 +342,7 @@ BOOL SdPageObjsTLB::SelectEntry( const String& rName ) aTmp = GetEntryText( pEntry ); if( aTmp == rName ) { - bFound = TRUE; + bFound = sal_True; SetCurEntry( pEntry ); } } @@ -356,10 +356,10 @@ BOOL SdPageObjsTLB::SelectEntry( const String& rName ) |* \************************************************************************/ -BOOL SdPageObjsTLB::HasSelectedChilds( const String& rName ) +sal_Bool SdPageObjsTLB::HasSelectedChilds( const String& rName ) { - BOOL bFound = FALSE; - BOOL bChilds = FALSE; + sal_Bool bFound = sal_False; + sal_Bool bChilds = sal_False; if( rName.Len() ) { @@ -371,11 +371,11 @@ BOOL SdPageObjsTLB::HasSelectedChilds( const String& rName ) aTmp = GetEntryText( pEntry ); if( aTmp == rName ) { - bFound = TRUE; - BOOL bExpanded = IsExpanded( pEntry ); + bFound = sal_True; + sal_Bool bExpanded = IsExpanded( pEntry ); long nCount = GetChildSelectionCount( pEntry ); if( bExpanded && nCount > 0 ) - bChilds = TRUE; + bChilds = sal_True; } } } @@ -389,7 +389,7 @@ BOOL SdPageObjsTLB::HasSelectedChilds( const String& rName ) |* \************************************************************************/ -void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, BOOL bAllPages, +void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, sal_Bool bAllPages, const String& rDocName) { String aSelection; @@ -401,7 +401,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, BOOL bAllPages, mpDoc = pInDoc; maDocName = rDocName; - mbShowAllPages = (bAllPages == TRUE); + mbShowAllPages = (bAllPages == sal_True); mpMedium = NULL; SdPage* pPage = NULL; @@ -409,8 +409,8 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, BOOL bAllPages, IconProvider aIconProvider; // first insert all pages including objects - USHORT nPage = 0; - const USHORT nMaxPages = mpDoc->GetPageCount(); + sal_uInt16 nPage = 0; + const sal_uInt16 nMaxPages = mpDoc->GetPageCount(); while( nPage < nMaxPages ) { @@ -418,7 +418,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, BOOL bAllPages, if( (mbShowAllPages || pPage->GetPageKind() == PK_STANDARD) && !(pPage->GetPageKind()==PK_HANDOUT) ) //#94954# never list the normal handout page ( handout-masterpage is used instead ) { - BOOL bPageExluded = pPage->IsExcluded(); + sal_Bool bPageExluded = pPage->IsExcluded(); bool bPageBelongsToShow = PageBelongsToCurrentShow (pPage); bPageExluded |= !bPageBelongsToShow; @@ -432,7 +432,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, BOOL bAllPages, if( mbShowAllPages ) { nPage = 0; - const USHORT nMaxMasterPages = mpDoc->GetMasterPageCount(); + const sal_uInt16 nMaxMasterPages = mpDoc->GetMasterPageCount(); while( nPage < nMaxMasterPages ) { @@ -470,7 +470,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, SfxMedium* pInMedium, aImgDocOpen, aImgDocClosed, NULL, - TRUE, + sal_True, LIST_APPEND, reinterpret_cast< void* >( 1 ) ); @@ -504,7 +504,7 @@ void SdPageObjsTLB::AddShapeList ( aIcon, aIcon, pParentEntry, - FALSE, + sal_False, LIST_APPEND, pUserData); @@ -521,7 +521,7 @@ void SdPageObjsTLB::AddShapeList ( rList, !rList.HasObjectNavigationOrder() /* use navigation order, if available */, IM_FLAT, - FALSE /*not reverse*/); + sal_False /*not reverse*/); while( aIter.IsMore() ) { @@ -536,7 +536,7 @@ void SdPageObjsTLB::AddShapeList ( if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_OLE2 ) { SvLBoxEntry* pNewEntry = InsertEntry( aStr, maImgOle, maImgOle, pEntry, - FALSE, LIST_APPEND, pObj); + sal_False, LIST_APPEND, pObj); SetExpandedEntryBmp( pNewEntry, maImgOleH, BMP_COLOR_HIGHCONTRAST ); SetCollapsedEntryBmp( pNewEntry, maImgOleH, BMP_COLOR_HIGHCONTRAST ); @@ -544,7 +544,7 @@ void SdPageObjsTLB::AddShapeList ( else if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_GRAF ) { SvLBoxEntry* pNewEntry = InsertEntry( aStr, maImgGraphic, maImgGraphic, pEntry, - FALSE, LIST_APPEND, pObj ); + sal_False, LIST_APPEND, pObj ); SetExpandedEntryBmp( pNewEntry, maImgGraphicH, BMP_COLOR_HIGHCONTRAST ); SetCollapsedEntryBmp( pNewEntry, maImgGraphicH, BMP_COLOR_HIGHCONTRAST ); @@ -562,7 +562,7 @@ void SdPageObjsTLB::AddShapeList ( else { SvLBoxEntry* pNewEntry = InsertEntry( aStr, rIconProvider.maImgObjects, rIconProvider.maImgObjects, pEntry, - FALSE, LIST_APPEND, pObj ); + sal_False, LIST_APPEND, pObj ); SetExpandedEntryBmp( pNewEntry, rIconProvider.maImgObjectsH, BMP_COLOR_HIGHCONTRAST ); SetCollapsedEntryBmp( pNewEntry, rIconProvider.maImgObjectsH, BMP_COLOR_HIGHCONTRAST ); @@ -626,13 +626,13 @@ bool SdPageObjsTLB::GetShowAllShapes (void) const |* \************************************************************************/ -BOOL SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc ) +sal_Bool SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc ) { if( pInDoc ) mpDoc = pInDoc; if( !mpDoc ) - return( FALSE ); + return( sal_False ); SdrObject* pObj = NULL; SdPage* pPage = NULL; @@ -640,8 +640,8 @@ BOOL SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc ) String aName; // Alle Pages incl. Objekte vergleichen - USHORT nPage = 0; - const USHORT nMaxPages = mpDoc->GetPageCount(); + sal_uInt16 nPage = 0; + const sal_uInt16 nMaxPages = mpDoc->GetPageCount(); while( nPage < nMaxPages ) { @@ -649,11 +649,11 @@ BOOL SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc ) if( pPage->GetPageKind() == PK_STANDARD ) { if( !pEntry ) - return( FALSE ); + return( sal_False ); aName = GetEntryText( pEntry ); if( pPage->GetName() != aName ) - return( FALSE ); + return( sal_False ); pEntry = Next( pEntry ); @@ -671,12 +671,12 @@ BOOL SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc ) if( aObjectName.Len() ) { if( !pEntry ) - return( FALSE ); + return( sal_False ); aName = GetEntryText( pEntry ); if( aObjectName != aName ) - return( FALSE ); + return( sal_False ); pEntry = Next( pEntry ); } @@ -708,14 +708,14 @@ String SdPageObjsTLB::GetSelectEntry() |* \************************************************************************/ -List* SdPageObjsTLB::GetSelectEntryList( USHORT nDepth ) +List* SdPageObjsTLB::GetSelectEntryList( sal_uInt16 nDepth ) { List* pList = NULL; SvLBoxEntry* pEntry = FirstSelected(); while( pEntry ) { - USHORT nListDepth = GetModel()->GetDepth( pEntry ); + sal_uInt16 nListDepth = GetModel()->GetDepth( pEntry ); if( nListDepth == nDepth ) { if( !pList ) @@ -756,8 +756,8 @@ void SdPageObjsTLB::RequestingChilds( SvLBoxEntry* pFileEntry ) // document name already inserted // only insert all "normal" ? slides with objects - USHORT nPage = 0; - const USHORT nMaxPages = mpBookmarkDoc->GetPageCount(); + sal_uInt16 nPage = 0; + const sal_uInt16 nMaxPages = mpBookmarkDoc->GetPageCount(); while( nPage < nMaxPages ) { @@ -768,7 +768,7 @@ void SdPageObjsTLB::RequestingChilds( SvLBoxEntry* pFileEntry ) aImgPage, aImgPage, pFileEntry, - FALSE, + sal_False, LIST_APPEND, reinterpret_cast< void* >( 1 ) ); @@ -859,7 +859,7 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed) if( pMed ) { // in this mode the document is also owned and controlled by this instance - mxBookmarkDocShRef = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD, TRUE); + mxBookmarkDocShRef = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD, sal_True); if (mxBookmarkDocShRef->DoLoad(pMed)) mpBookmarkDoc = mxBookmarkDocShRef->GetDoc(); else @@ -928,12 +928,12 @@ void SdPageObjsTLB::SelectHdl() { SvLBoxEntry* pEntry = FirstSelected(); - mbLinkableSelected = TRUE; + mbLinkableSelected = sal_True; while( pEntry && mbLinkableSelected ) { if( NULL == pEntry->GetUserData() ) - mbLinkableSelected = FALSE; + mbLinkableSelected = sal_False; pEntry = NextSelected( pEntry ); } @@ -994,26 +994,26 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel) // Select all entries and disable them as drop targets. SetSelectionMode(MULTIPLE_SELECTION); - SetCursor(NULL, FALSE); - SelectAll(TRUE, FALSE); - EnableSelectionAsDropTarget(FALSE, TRUE); + SetCursor(NULL, sal_False); + SelectAll(sal_True, sal_False); + EnableSelectionAsDropTarget(sal_False, sal_True); // Enable only the entries as drop targets that are children of the // page under the mouse. SvLBoxEntry* pParent = GetRootLevelParent(pEntry); if (pParent != NULL) { - SelectAll(FALSE, FALSE); - Select(pParent, TRUE); + SelectAll(sal_False, sal_False); + Select(pParent, sal_True); // for (SvLBoxEntry*pChild=FirstChild(pParent); pChild!=NULL; pChild=NextSibling(pChild)) - // Select(pChild, TRUE); - EnableSelectionAsDropTarget(TRUE, TRUE);//FALSE); + // Select(pChild, sal_True); + EnableSelectionAsDropTarget(sal_True, sal_True);//sal_False); } // Set selection back to the entry under the mouse. - SelectAll(FALSE,FALSE); + SelectAll(sal_False,sal_False); SetSelectionMode(SINGLE_SELECTION); - Select(pEntry, TRUE); + Select(pEntry, sal_True); // Aus dem ExecuteDrag heraus kann der Navigator geloescht werden // (beim Umschalten auf einen anderen Dokument-Typ), das wuerde aber @@ -1052,7 +1052,7 @@ void SdPageObjsTLB::DoDrag() SvTreeListBox::ReleaseMouse(); - bIsInDrag = TRUE; + bIsInDrag = sal_True; SvLBoxDDInfo aDDInfo; memset(&aDDInfo,0,sizeof(SvLBoxDDInfo)); @@ -1131,7 +1131,7 @@ void SdPageObjsTLB::OnDragFinished( sal_uInt8 ) } mpDropNavWin = NULL; - bIsInDrag = FALSE; + bIsInDrag = sal_False; } /************************************************************************* @@ -1153,7 +1153,7 @@ sal_Int8 SdPageObjsTLB::AcceptDrop (const AcceptDropEvent& rEvent) SvLBoxEntry* pEntry = GetDropTarget(rEvent.maPosPixel); if (rEvent.mbLeaving || !CheckDragAndDropMode( this, rEvent.mnAction )) { - ImplShowTargetEmphasis( pTargetEntry, FALSE ); + ImplShowTargetEmphasis( pTargetEntry, sal_False ); } else if( !nDragDropMode ) { @@ -1166,16 +1166,16 @@ sal_Int8 SdPageObjsTLB::AcceptDrop (const AcceptDropEvent& rEvent) // Draw emphasis. if (pEntry != pTargetEntry || !(nImpFlags & SVLBOX_TARGEMPH_VIS)) { - ImplShowTargetEmphasis( pTargetEntry, FALSE ); + ImplShowTargetEmphasis( pTargetEntry, sal_False ); pTargetEntry = pEntry; - ImplShowTargetEmphasis( pTargetEntry, TRUE ); + ImplShowTargetEmphasis( pTargetEntry, sal_True ); } } } // Hide emphasis when there is no valid drop action. if (nResult == DND_ACTION_NONE) - ImplShowTargetEmphasis(pTargetEntry, FALSE); + ImplShowTargetEmphasis(pTargetEntry, sal_False); return nResult; } @@ -1195,7 +1195,7 @@ sal_Int8 SdPageObjsTLB::ExecuteDrop( const ExecuteDropEvent& rEvt ) if( !bIsInDrag ) { SdNavigatorWin* pNavWin = NULL; - USHORT nId = SID_NAVIGATOR; + sal_uInt16 nId = SID_NAVIGATOR; if( mpFrame->HasChildWindow( nId ) ) pNavWin = (SdNavigatorWin*)( mpFrame->GetChildWindow( nId )->GetContextWindow( SD_MOD() ) ); @@ -1242,7 +1242,7 @@ IMPL_STATIC_LINK(SdPageObjsTLB, ExecDragHdl, void*, EMPTYARG) bool SdPageObjsTLB::PageBelongsToCurrentShow (const SdPage* pPage) const { - // Return <TRUE/> as default when there is no custom show or when none + // Return <sal_True/> as default when there is no custom show or when none // is used. The page does then belong to the standard show. bool bBelongsToShow = true; @@ -1253,7 +1253,7 @@ bool SdPageObjsTLB::PageBelongsToCurrentShow (const SdPage* pPage) const List* pShowList = const_cast<SdDrawDocument*>(mpDoc)->GetCustomShowList(); if (pShowList != NULL) { - ULONG nCurrentShowIndex = pShowList->GetCurPos(); + sal_uLong nCurrentShowIndex = pShowList->GetCurPos(); void* pObject = pShowList->GetObject(nCurrentShowIndex); pCustomShow = static_cast<SdCustomShow*>(pObject); } @@ -1262,8 +1262,8 @@ bool SdPageObjsTLB::PageBelongsToCurrentShow (const SdPage* pPage) const if (pCustomShow != NULL) { bBelongsToShow = false; - ULONG nPageCount = pCustomShow->Count(); - for (USHORT i=0; i<nPageCount && !bBelongsToShow; i++) + sal_uLong nPageCount = pCustomShow->Count(); + for (sal_uInt16 i=0; i<nPageCount && !bBelongsToShow; i++) if (pPage == static_cast<SdPage*>(pCustomShow->GetObject (i))) bBelongsToShow = true; } @@ -1275,11 +1275,11 @@ bool SdPageObjsTLB::PageBelongsToCurrentShow (const SdPage* pPage) const -BOOL SdPageObjsTLB::NotifyMoving( +sal_Bool SdPageObjsTLB::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& rpNewParent, - ULONG& rNewChildPos) + sal_uLong& rNewChildPos) { SvLBoxEntry* pDestination = pTarget; while (GetParent(pDestination) != NULL && GetParent(GetParent(pDestination)) != NULL) @@ -1308,7 +1308,7 @@ BOOL SdPageObjsTLB::NotifyMoving( { rpNewParent = 0; rNewChildPos = 0; - return TRUE; + return sal_True; } else if (GetParent(pDestination) == NULL) { @@ -1322,10 +1322,10 @@ BOOL SdPageObjsTLB::NotifyMoving( rNewChildPos += nCurEntrySelPos; nCurEntrySelPos++; } - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } @@ -1432,7 +1432,7 @@ void SdPageObjsTLB::AddShapeToTransferable ( aObjectDescriptor.maDisplayName = pDocShell->GetMedium()->GetURLObject().GetURLNoPass(); else aObjectDescriptor.maDisplayName = String(); - aObjectDescriptor.mbCanLink = FALSE; + aObjectDescriptor.mbCanLink = sal_False; rTransferable.SetStartPos(aDragPos); rTransferable.SetObjectDescriptor( aObjectDescriptor ); |