diff options
Diffstat (limited to 'sfx2/source/view/orgmgr.cxx')
-rwxr-xr-x[-rw-r--r--] | sfx2/source/view/orgmgr.cxx | 218 |
1 files changed, 109 insertions, 109 deletions
diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx index a1ba8ac7ef67..5979d64e1b7b 100644..100755 --- a/sfx2/source/view/orgmgr.cxx +++ b/sfx2/source/view/orgmgr.cxx @@ -48,7 +48,7 @@ #include "docvor.hxx" #include "orgmgr.hxx" #include "sfxtypes.hxx" -#include "sfxresid.hxx" +#include "sfx2/sfxresid.hxx" #include "view.hrc" #include <sfx2/docfilt.hxx> #include "fltfnc.hxx" @@ -70,12 +70,12 @@ struct _FileListEntry const CollatorWrapper* pCollator; SfxObjectShellLock aDocShell; // ObjectShell als Ref-Klasse - BOOL bFile; // als Datei auf Platte + sal_Bool bFile; // als Datei auf Platte // (!= unbenannt1, nicht als Dok. geladen; // diese werden nicht gespeichert!) - BOOL bOwner; // selbst erzeugt - BOOL bNoName; - BOOL bOwnFormat; + sal_Bool bOwner; // selbst erzeugt + sal_Bool bNoName; + sal_Bool bOwnFormat; _FileListEntry( const String& rFileName, const CollatorWrapper* pColl, const String* pTitle = NULL ); @@ -83,7 +83,7 @@ struct _FileListEntry int operator==( const _FileListEntry &rCmp) const; int operator< ( const _FileListEntry &rCmp) const; - BOOL DeleteObjectShell(); + sal_Bool DeleteObjectShell(); }; //------------------------------------------------------------------------- @@ -109,10 +109,10 @@ _FileListEntry::_FileListEntry( const String& rFileName, aFileName ( rFileName ), pCollator ( pColl ), - bFile ( FALSE ), - bOwner ( FALSE ), - bNoName ( TRUE ), - bOwnFormat ( TRUE ) + bFile ( sal_False ), + bOwner ( sal_False ), + bNoName ( sal_True ), + bOwnFormat ( sal_True ) { if ( pTitle ) aBaseName = *pTitle; @@ -137,20 +137,20 @@ SV_IMPL_OP_PTRARR_SORT(_SfxObjectList, _FileListEntry*) //========================================================================= -BOOL _FileListEntry::DeleteObjectShell() +sal_Bool _FileListEntry::DeleteObjectShell() /* [Beschreibung] Freigabe der DokumentShell - [Returnwert] TRUE: alles Ok - FALSE: es ist ein Fehler aufgetreten (das + [Returnwert] sal_True: alles Ok + sal_False: es ist ein Fehler aufgetreten (das Dokument konnte nicht gesichert werden) */ { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; //Falls wir die Shell angelegt haben und sie veraendert wurde if(bOwner && aDocShell.Is() && aDocShell->IsModified()) { @@ -158,7 +158,7 @@ BOOL _FileListEntry::DeleteObjectShell() if( bOwnFormat ) { if(!aDocShell->Save() ) - bRet = FALSE; + bRet = sal_False; else { try { @@ -210,14 +210,14 @@ SfxObjectList::~SfxObjectList() //------------------------------------------------------------------------- -const String &SfxObjectList::GetBaseName(USHORT i) const +const String &SfxObjectList::GetBaseName(sal_uInt16 i) const { return (*this)[i]->aBaseName; } //------------------------------------------------------------------------- -const String& SfxObjectList::GetFileName( USHORT i ) const +const String& SfxObjectList::GetFileName( sal_uInt16 i ) const { return (*this)[i]->aFileName; } @@ -273,7 +273,7 @@ SfxOrganizeMgr::~SfxOrganizeMgr() //------------------------------------------------------------------------- -SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx ) +SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( sal_uInt16 nIdx ) /* [Beschreibung] @@ -289,17 +289,17 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx ) if ( !pEntry->aDocShell.Is() ) { INetURLObject aFileObj( pEntry->aFileName ); - BOOL bDum = FALSE; + sal_Bool bDum = sal_False; SfxApplication* pSfxApp = SFX_APP(); String aFilePath = aFileObj.GetMainURL( INetURLObject::NO_DECODE ); - pEntry->aDocShell = pSfxApp->DocAlreadyLoaded( aFilePath, FALSE, bDum ); + pEntry->aDocShell = pSfxApp->DocAlreadyLoaded( aFilePath, sal_False, bDum ); if ( !pEntry->aDocShell.Is() ) { - pEntry->bOwner = TRUE; + pEntry->bOwner = sal_True; SfxMedium* pMed = new SfxMedium( - aFilePath, ( STREAM_READ | STREAM_SHARE_DENYWRITE ), FALSE, 0 ); + aFilePath, ( STREAM_READ | STREAM_SHARE_DENYWRITE ), sal_False, 0 ); const SfxFilter* pFilter = NULL; - pMed->UseInteractionHandler(TRUE); + pMed->UseInteractionHandler(sal_True); if ( pSfxApp->GetFilterMatcher().GuessFilter(*pMed, &pFilter, SFX_FILTER_TEMPLATE, 0) || (pFilter && !pFilter->IsOwnFormat()) || @@ -307,7 +307,7 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx ) ) { pSfxApp->LoadTemplate( pEntry->aDocShell, aFilePath ); - pEntry->bOwnFormat = FALSE; + pEntry->bOwnFormat = sal_False; delete pMed; if ( pEntry->aDocShell.Is() ) return (SfxObjectShellRef)(SfxObjectShell*)(pEntry->aDocShell); @@ -316,7 +316,7 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx ) { if ( pFilter ) { - pEntry->bOwnFormat = TRUE; + pEntry->bOwnFormat = sal_True; pEntry->aDocShell = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SFX_CREATE_MODE_ORGANIZER ); if ( pEntry->aDocShell.Is() ) { @@ -334,14 +334,14 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx ) //------------------------------------------------------------------------- -BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nIdx) +sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nIdx) /* [Beschreibung] Freigabe der DokumentShell an der Position nIdx - [Returnwert] TRUE: alles Ok - FALSE: es ist ein Fehler aufgetreten (das + [Returnwert] sal_True: alles Ok + sal_False: es ist ein Fehler aufgetreten (das Dokument konnte nicht gesichert werden) */ @@ -351,8 +351,8 @@ BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nIdx) //------------------------------------------------------------------------- -SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(USHORT nRegion, - USHORT nIdx) +SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(sal_uInt16 nRegion, + sal_uInt16 nIdx) /* [Beschreibung] Zugriff auf die DokumentShell an der Position nIdx im Bereich @@ -367,15 +367,15 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(USHORT nRegion, //------------------------------------------------------------------------- -BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nRegion, USHORT nIdx) +sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nRegion, sal_uInt16 nIdx) /* [Beschreibung] Freigabe der DokumentShell an der Position nIdx im Bereich nRegion (Dokumentvorlage) - [Returnwert] TRUE: alles Ok - FALSE: es ist ein Fehler aufgetreten (das + [Returnwert] sal_True: alles Ok + sal_False: es ist ein Fehler aufgetreten (das Dokument konnte nicht gesichert werden) */ @@ -386,10 +386,10 @@ BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nRegion, USHORT nIdx) //------------------------------------------------------------------------- -BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion, - USHORT nTargetIdx, - USHORT nSourceRegion, - USHORT nSourceIdx) +sal_Bool SfxOrganizeMgr::Copy(sal_uInt16 nTargetRegion, + sal_uInt16 nTargetIdx, + sal_uInt16 nSourceRegion, + sal_uInt16 nSourceIdx) /* [Beschreibung] @@ -397,10 +397,10 @@ BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion, [Parameter] - USHORT nTargetRegion Index des Zielbereiches - USHORT nTargetIdx Index Zielposition - USHORT nSourceRegion Index des Quellbereiches - USHORT nSourceIdx Index der zu kopierenden / z uverschiebenden + sal_uInt16 nTargetRegion Index des Zielbereiches + sal_uInt16 nTargetIdx Index Zielposition + sal_uInt16 nSourceRegion Index des Quellbereiches + sal_uInt16 nSourceIdx Index der zu kopierenden / z uverschiebenden Dokumentvorlage [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) @@ -408,17 +408,17 @@ BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion, [Querverweise] - <SfxDocumentTemplates::Copy(USHORT nTargetRegion, - USHORT nTargetIdx, - USHORT nSourceRegion, - USHORT nSourceIdx)> + <SfxDocumentTemplates::Copy(sal_uInt16 nTargetRegion, + sal_uInt16 nTargetIdx, + sal_uInt16 nSourceRegion, + sal_uInt16 nSourceIdx)> */ { if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse kopieren - return FALSE ; - const BOOL bOk = pTemplates->Copy(nTargetRegion, nTargetIdx, + return sal_False ; + const sal_Bool bOk = pTemplates->Copy(nTargetRegion, nTargetIdx, nSourceRegion, nSourceIdx); if(bOk) bModified = 1; @@ -427,10 +427,10 @@ BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion, //------------------------------------------------------------------------- -BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion, - USHORT nTargetIdx, - USHORT nSourceRegion, - USHORT nSourceIdx) +sal_Bool SfxOrganizeMgr::Move(sal_uInt16 nTargetRegion, + sal_uInt16 nTargetIdx, + sal_uInt16 nSourceRegion, + sal_uInt16 nSourceIdx) /* [Beschreibung] @@ -438,10 +438,10 @@ BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion, [Parameter] - USHORT nTargetRegion Index des Zielbereiches - USHORT nTargetIdx Index Zielposition - USHORT nSourceRegion Index des Quellbereiches - USHORT nSourceIdx Index der zu kopierenden / z uverschiebenden + sal_uInt16 nTargetRegion Index des Zielbereiches + sal_uInt16 nTargetIdx Index Zielposition + sal_uInt16 nSourceRegion Index des Quellbereiches + sal_uInt16 nSourceIdx Index der zu kopierenden / z uverschiebenden Dokumentvorlage [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) @@ -449,17 +449,17 @@ BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion, [Querverweise] - <SfxDocumentTemplates::Move(USHORT nTargetRegion, - USHORT nTargetIdx, - USHORT nSourceRegion, - USHORT nSourceIdx)> + <SfxDocumentTemplates::Move(sal_uInt16 nTargetRegion, + sal_uInt16 nTargetIdx, + sal_uInt16 nSourceRegion, + sal_uInt16 nSourceIdx)> */ { if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse verschieben - return FALSE ; - const BOOL bOk = pTemplates->Move(nTargetRegion, nTargetIdx, + return sal_False ; + const sal_Bool bOk = pTemplates->Move(nTargetRegion, nTargetIdx, nSourceRegion, nSourceIdx); if(bOk) bModified = 1; @@ -468,8 +468,8 @@ BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion, //------------------------------------------------------------------------- -BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller, - USHORT nRegion, USHORT nIdx) +sal_Bool SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller, + sal_uInt16 nRegion, sal_uInt16 nIdx) /* [Beschreibung] @@ -482,20 +482,20 @@ BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller, durch das Keyboard angetriggert wird, mu"s das Model der ListBox anschlie"send aktualisiert werden. - USHORT nRegion Index des Bereiches - USHORT nIdx Index der Dokumentvorlage + sal_uInt16 nRegion Index des Bereiches + sal_uInt16 nIdx Index der Dokumentvorlage [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) [Querverweise] - <SfxDocumentTemplates::Delete(USHORT nRegion, USHORT nIdx)> + <SfxDocumentTemplates::Delete(sal_uInt16 nRegion, sal_uInt16 nIdx)> */ { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; if ( USHRT_MAX == nIdx ) { @@ -504,11 +504,11 @@ BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller, SvLBoxEntry *pGroupToDelete = pCaller->SvLBox::GetEntry(nRegion); if ( pGroupToDelete ) { - USHORT nItemNum = (USHORT)( pCaller->GetModel()->GetChildCount( pGroupToDelete ) ); - USHORT nToDeleteNum = 0; + sal_uInt16 nItemNum = (sal_uInt16)( pCaller->GetModel()->GetChildCount( pGroupToDelete ) ); + sal_uInt16 nToDeleteNum = 0; SvLBoxEntry **pEntriesToDelete = new SvLBoxEntry*[nItemNum]; - USHORT nInd = 0; + sal_uInt16 nInd = 0; for ( nInd = 0; nInd < nItemNum; nInd++ ) pEntriesToDelete[nInd] = NULL; @@ -553,7 +553,7 @@ BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller, //------------------------------------------------------------------------- -BOOL SfxOrganizeMgr::InsertDir +sal_Bool SfxOrganizeMgr::InsertDir ( SfxOrganizeListBox_Impl* pCaller,/* rufende ListBox; da dieses Event durch das Men"u oder durch das @@ -561,7 +561,7 @@ BOOL SfxOrganizeMgr::InsertDir mu\s das Model der ListBox anschlie\send aktualisiert werden */ const String& rText, // logischer Name des Bereiches - USHORT nRegion // Index des Bereiches + sal_uInt16 nRegion // Index des Bereiches ) /* [Beschreibung] @@ -571,23 +571,23 @@ BOOL SfxOrganizeMgr::InsertDir [R"uckgabewert] - Erfolg (TRUE) oder Mi\serfolg (FALSE) + Erfolg (sal_True) oder Mi\serfolg (sal_False) [Querverweise] - <SfxDocumentTemplates::InsertDir(const String &, USHORT nRegion)> + <SfxDocumentTemplates::InsertDir(const String &, sal_uInt16 nRegion)> */ { - const BOOL bOk = pTemplates->InsertDir(rText, nRegion); + const sal_Bool bOk = pTemplates->InsertDir(rText, nRegion); if(bOk) { bModified = 1; SvLBoxEntry *pEntry = pCaller->InsertEntry(rText, pCaller->GetOpenedBmp(0), pCaller->GetClosedBmp(0), - 0, TRUE, nRegion); + 0, sal_True, nRegion); pCaller->Update(); pCaller->EditEntry(pEntry); } @@ -596,8 +596,8 @@ BOOL SfxOrganizeMgr::InsertDir //------------------------------------------------------------------------- -BOOL SfxOrganizeMgr::SetName(const String &rName, - USHORT nRegion, USHORT nIdx) +sal_Bool SfxOrganizeMgr::SetName(const String &rName, + sal_uInt16 nRegion, sal_uInt16 nIdx) /* [Beschreibung] @@ -606,20 +606,20 @@ BOOL SfxOrganizeMgr::SetName(const String &rName, [Parameter] const String &rName der neue Name - USHORT nRegion Index des Bereiches - USHORT nIdx Index der Dokumentvorlage + sal_uInt16 nRegion Index des Bereiches + sal_uInt16 nIdx Index der Dokumentvorlage [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) [Querverweise] - <SfxDocumentTemplates::SetName(const String &, USHORT nRegion, USHORT nIdx)> + <SfxDocumentTemplates::SetName(const String &, sal_uInt16 nRegion, sal_uInt16 nIdx)> */ { - const BOOL bOk = pTemplates->SetName(rName, nRegion, nIdx); + const sal_Bool bOk = pTemplates->SetName(rName, nRegion, nIdx); if(bOk) bModified = 1; return bOk; @@ -627,7 +627,7 @@ BOOL SfxOrganizeMgr::SetName(const String &rName, //------------------------------------------------------------------------- -BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) const +sal_Bool SfxOrganizeMgr::CopyTo(sal_uInt16 nRegion, sal_uInt16 nIdx, const String &rName) const /* [Beschreibung] @@ -635,8 +635,8 @@ BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) co [Parameter] - USHORT nRegion Index des Bereiches - USHORT nIdx Index der Dokumentvorlage + sal_uInt16 nRegion Index des Bereiches + sal_uInt16 nIdx Index der Dokumentvorlage const String &rName Dateiname [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) @@ -644,7 +644,7 @@ BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) co [Querverweise] - <SfxDocumentTemplates::CopyTo( USHORT nRegion, USHORT nIdx, const String &)> + <SfxDocumentTemplates::CopyTo( sal_uInt16 nRegion, sal_uInt16 nIdx, const String &)> */ @@ -654,8 +654,8 @@ BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) co //------------------------------------------------------------------------- -BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller, - USHORT nRegion, USHORT nIdx, String &rName) +sal_Bool SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller, + sal_uInt16 nRegion, sal_uInt16 nIdx, String &rName) /* [Beschreibung] @@ -667,8 +667,8 @@ BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller, Event durch das Men"u angetriggert wird, mu"s das Model der ListBox anschlie"send aktualisiert werden. - USHORT nRegion Index des Bereiches - USHORT nIdx Index der Dokumentvorlage + sal_uInt16 nRegion Index des Bereiches + sal_uInt16 nIdx Index der Dokumentvorlage String &rName Dateiname [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE) @@ -676,7 +676,7 @@ BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller, [Querverweise] - <SfxDocumentTemplates::CopyFrom( USHORT nRegion, USHORT nIdx, const String &)> + <SfxDocumentTemplates::CopyFrom( sal_uInt16 nRegion, sal_uInt16 nIdx, const String &)> */ @@ -695,20 +695,20 @@ BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller, pCaller->GetOpenedBmp(1), pCaller->GetClosedBmp(1), pParent, - TRUE, + sal_True, nIdx); pCaller->Update(); // pCaller->EditEntry( pEntry ); pCaller->Expand( pParent ); - bModified = TRUE; - return TRUE; + bModified = sal_True; + return sal_True; } - return FALSE; + return sal_False; } //------------------------------------------------------------------------- -BOOL SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName ) +sal_Bool SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName ) /* [Beschreibung] @@ -731,18 +731,18 @@ BOOL SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& _FileListEntry* pEntry = new _FileListEntry( rFileName, pCollator ); if ( pImpl->pDocList->C40_PTR_INSERT( _FileListEntry, pEntry ) ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; pImpl->pDocList->Seek_Entry( pEntry, &nPos ); pCaller->InsertEntry( pEntry->aBaseName, pCaller->GetOpenedBmp(1), - pCaller->GetClosedBmp(1), 0, TRUE, nPos ); - return TRUE; + pCaller->GetClosedBmp(1), 0, sal_True, nPos ); + return sal_True; } - return FALSE; + return sal_False; } //------------------------------------------------------------------------- -BOOL SfxOrganizeMgr::Rescan() +sal_Bool SfxOrganizeMgr::Rescan() /* [Beschreibung] @@ -750,7 +750,7 @@ BOOL SfxOrganizeMgr::Rescan() [R"uckgabewert] - TRUE es bestanden Unterschiede + sal_True es bestanden Unterschiede FALSE keine "Anderung [Querverweise] @@ -761,10 +761,10 @@ BOOL SfxOrganizeMgr::Rescan() { if(pTemplates->Rescan()) { - bModified = TRUE; - return TRUE; + bModified = sal_True; + return sal_True; } - return FALSE; + return sal_False; } //------------------------------------------------------------------------- @@ -782,14 +782,14 @@ void SfxOrganizeMgr::SaveAll(Window *pParent) */ { - USHORT nRangeCount = pTemplates->GetRegionCount(); - USHORT i; + sal_uInt16 nRangeCount = pTemplates->GetRegionCount(); + sal_uInt16 i; for(i = 0; i < nRangeCount; ++i) { if( pTemplates->IsRegionLoaded( i )) { - const USHORT nCount = pTemplates->GetCount(i); - for(USHORT j = 0; j < nCount; ++j) + const sal_uInt16 nCount = pTemplates->GetCount(i); + for(sal_uInt16 j = 0; j < nCount; ++j) { if(!pTemplates->DeleteObjectShell(i, j)) { |