diff options
Diffstat (limited to 'sd/source/core')
-rwxr-xr-x[-rw-r--r--] | sd/source/core/CustomAnimationPreset.cxx | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/core/anminfo.cxx | 16 | ||||
-rwxr-xr-x | sd/source/core/cusshow.cxx | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/core/drawdoc.cxx | 88 | ||||
-rwxr-xr-x | sd/source/core/drawdoc2.cxx | 234 | ||||
-rwxr-xr-x | sd/source/core/drawdoc3.cxx | 326 | ||||
-rwxr-xr-x | sd/source/core/drawdoc4.cxx | 121 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/core/drawdoc_animations.cxx | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | sd/source/core/glob.src | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/core/pglink.cxx | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/core/sdattr.cxx | 14 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/core/sdiocmpt.cxx | 14 | ||||
-rwxr-xr-x | sd/source/core/sdpage.cxx | 220 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/core/sdpage2.cxx | 38 | ||||
-rwxr-xr-x | sd/source/core/stlpool.cxx | 103 | ||||
-rwxr-xr-x | sd/source/core/stlsheet.cxx | 68 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/core/undo/undomanager.cxx | 45 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/core/undo/undoobjects.cxx | 6 |
18 files changed, 645 insertions, 678 deletions
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index fb02f01480e7..4d29833e637a 100644..100755 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -219,8 +219,8 @@ Reference< XAnimationNode > CustomAnimationPreset::create( const rtl::OUString& UStringList CustomAnimationPreset::getProperties() const { String aProperties( maProperty ); - USHORT nTokens = aProperties.GetTokenCount(); - USHORT nToken; + sal_uInt16 nTokens = aProperties.GetTokenCount(); + sal_uInt16 nToken; UStringList aPropertyList; for( nToken = 0; nToken < nTokens; nToken++ ) aPropertyList.push_back( aProperties.GetToken( nToken ) ); @@ -233,8 +233,8 @@ bool CustomAnimationPreset::hasProperty( const OUString& rProperty )const { String aProperties( maProperty ); String aProperty( rProperty ); - USHORT nTokens = aProperties.GetTokenCount(); - USHORT nToken; + sal_uInt16 nTokens = aProperties.GetTokenCount(); + sal_uInt16 nToken; for( nToken = 0; nToken < nTokens; nToken++ ) { if( aProperties.GetToken( nToken ) == aProperty ) diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx index a2aed2388e28..97c41c8f2aff 100644..100755 --- a/sd/source/core/anminfo.cxx +++ b/sd/source/core/anminfo.cxx @@ -51,18 +51,18 @@ SdAnimationInfo::SdAnimationInfo(SdrObject& rObject) meEffect (presentation::AnimationEffect_NONE), meTextEffect (presentation::AnimationEffect_NONE), meSpeed (presentation::AnimationSpeed_SLOW), - mbActive (TRUE), - mbDimPrevious (FALSE), - mbIsMovie (FALSE), - mbDimHide (FALSE), - mbSoundOn (FALSE), - mbPlayFull (FALSE), + mbActive (sal_True), + mbDimPrevious (sal_False), + mbIsMovie (sal_False), + mbDimHide (sal_False), + mbSoundOn (sal_False), + mbPlayFull (sal_False), mpPathObj (NULL), meClickAction (presentation::ClickAction_NONE), meSecondEffect (presentation::AnimationEffect_NONE), meSecondSpeed (presentation::AnimationSpeed_SLOW), - mbSecondSoundOn (FALSE), - mbSecondPlayFull (FALSE), + mbSecondSoundOn (sal_False), + mbSecondPlayFull (sal_False), mnVerb (0), mnPresOrder (LIST_APPEND), mrObject (rObject) diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx index b9f23daedd90..11be351df596 100755 --- a/sd/source/core/cusshow.cxx +++ b/sd/source/core/cusshow.cxx @@ -107,7 +107,7 @@ void SdCustomShow::ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage ) } else { - ULONG nPos; + sal_uLong nPos; while( (nPos = GetPos( (void*)pOldPage )) != CONTAINER_ENTRY_NOTFOUND ) { Replace( (void*)pNewPage, nPos ); @@ -117,7 +117,7 @@ void SdCustomShow::ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage ) void SdCustomShow::RemovePage( const SdPage* pPage ) { - ULONG nPos; + sal_uLong nPos; while( (nPos = GetPos( (void*)pPage )) != CONTAINER_ENTRY_NOTFOUND ) { Remove( nPos ); diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index e2fdc2f805e5..4f865836f5c2 100644..100755 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -162,15 +162,15 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) , mpCustomShowList(NULL) , mpDocSh(static_cast< ::sd::DrawDocShell*>(pDrDocSh)) , mpCreatingTransferable( NULL ) -, mbHasOnlineSpellErrors(FALSE) -, mbInitialOnlineSpellingEnabled(TRUE) -, mbNewOrLoadCompleted(FALSE) +, mbHasOnlineSpellErrors(sal_False) +, mbInitialOnlineSpellingEnabled(sal_True) +, mbNewOrLoadCompleted(sal_False) , mbStartWithPresentation( false ) , meLanguage( LANGUAGE_SYSTEM ) , meLanguageCJK( LANGUAGE_SYSTEM ) , meLanguageCTL( LANGUAGE_SYSTEM ) , mePageNumType(SVX_ARABIC) -, mbAllocDocSh(FALSE) +, mbAllocDocSh(sal_False) , meDocType(eType) , mpCharClass(NULL) , mpLocale(NULL) @@ -187,11 +187,11 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) if (mpDocSh) { - SetSwapGraphics(TRUE); + SetSwapGraphics(sal_True); } // Masseinheit (von App) und Massstab (von SdMod) setzen - INT32 nX, nY; + sal_Int32 nX, nY; SdOptions* pOptions = SD_MOD()->GetSdOptions(meDocType); pOptions->GetScale( nX, nY ); @@ -251,12 +251,12 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) // for korean and japanese languages we have a different default for apply spacing between asian, latin and ctl text if( ( LANGUAGE_KOREAN == eRealCTLLanguage ) || ( LANGUAGE_KOREAN_JOHAB == eRealCTLLanguage ) || ( LANGUAGE_JAPANESE == eRealCTLLanguage ) ) { - GetPool().GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( FALSE, EE_PARA_ASIANCJKSPACING ) ); + GetPool().GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( sal_False, EE_PARA_ASIANCJKSPACING ) ); } // DefTab und SpellOptions setzen // Jetzt am Modul (SD) - USHORT nDefTab = pOptions->GetDefTab(); + sal_uInt16 nDefTab = pOptions->GetDefTab(); SetDefaultTabulator( nDefTab ); try @@ -283,7 +283,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) SetLinkManager( new sfx2::LinkManager(mpDocSh) ); } - ULONG nCntrl = rOutliner.GetControlWord(); + sal_uLong nCntrl = rOutliner.GetControlWord(); nCntrl |= EE_CNTRL_ALLOWBIGOBJS; nCntrl |= EE_CNTRL_URLSFXEXECUTE; @@ -332,7 +332,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) pHitTestOutliner->SetDefaultLanguage( Application::GetSettings().GetLanguage() ); - ULONG nCntrl2 = pHitTestOutliner->GetControlWord(); + sal_uLong nCntrl2 = pHitTestOutliner->GetControlWord(); nCntrl2 |= EE_CNTRL_ALLOWBIGOBJS; nCntrl2 |= EE_CNTRL_URLSFXEXECUTE; nCntrl2 &= ~EE_CNTRL_ONLINESPELLING; @@ -399,7 +399,7 @@ SdDrawDocument::~SdDrawDocument() mpOnlineSearchItem = NULL; CloseBookmarkDoc(); - SetAllocDocSh(FALSE); + SetAllocDocSh(sal_False); // #116168# ClearModel(sal_True); @@ -418,7 +418,7 @@ SdDrawDocument::~SdDrawDocument() ::sd::FrameView* pFrameView = NULL; - for (ULONG i = 0; i < mpFrameViewList->Count(); i++) + for (sal_uLong i = 0; i < mpFrameViewList->Count(); i++) { // Ggf. FrameViews loeschen pFrameView = @@ -433,7 +433,7 @@ SdDrawDocument::~SdDrawDocument() if (mpCustomShowList) { - for (ULONG j = 0; j < mpCustomShowList->Count(); j++) + for (sal_uLong j = 0; j < mpCustomShowList->Count(); j++) { // Ggf. CustomShows loeschen SdCustomShow* pCustomShow = (SdCustomShow*) mpCustomShowList->GetObject(j); @@ -477,10 +477,10 @@ SdrModel* SdDrawDocument::AllocModel() const if( meDocType == DOCUMENT_TYPE_IMPRESS ) mpCreatingTransferable->SetDocShell( new ::sd::DrawDocShell( - SFX_CREATE_MODE_EMBEDDED, TRUE, meDocType ) ); + SFX_CREATE_MODE_EMBEDDED, sal_True, meDocType ) ); else mpCreatingTransferable->SetDocShell( new ::sd::GraphicDocShell( - SFX_CREATE_MODE_EMBEDDED, TRUE, meDocType ) ); + SFX_CREATE_MODE_EMBEDDED, sal_True, meDocType ) ); pNewDocSh = static_cast< ::sd::DrawDocShell*>( pObj = mpCreatingTransferable->GetDocShell() ); pNewDocSh->DoInitNew( NULL ); @@ -496,7 +496,7 @@ SdrModel* SdDrawDocument::AllocModel() const pNewStylePool->CopyTableStyles(*pOldStylePool); - for (USHORT i = 0; i < GetMasterSdPageCount(PK_STANDARD); i++) + for (sal_uInt16 i = 0; i < GetMasterSdPageCount(PK_STANDARD); i++) { // Alle Layouts der MasterPage mitnehmen String aOldLayoutName(((SdDrawDocument*) this)->GetMasterSdPage(i, PK_STANDARD)->GetLayoutName()); @@ -511,9 +511,9 @@ SdrModel* SdDrawDocument::AllocModel() const { // Es wird eine DocShell erzeugt, welche mit GetAllocedDocSh() zurueckgegeben wird SdDrawDocument* pDoc = (SdDrawDocument*) this; - pDoc->SetAllocDocSh(FALSE); + pDoc->SetAllocDocSh(sal_False); pDoc->mxAllocedDocShRef = new ::sd::DrawDocShell( - SFX_CREATE_MODE_EMBEDDED, TRUE, meDocType); + SFX_CREATE_MODE_EMBEDDED, sal_True, meDocType); pDoc->mxAllocedDocShRef->DoInitNew(NULL); pNewModel = pDoc->mxAllocedDocShRef->GetDoc(); } @@ -536,7 +536,7 @@ SdrModel* SdDrawDocument::AllocModel() const SdrPage* SdDrawDocument::AllocPage(FASTBOOL bMasterPage) { - return new SdPage(*this, NULL, (BOOL)bMasterPage); + return new SdPage(*this, NULL, (sal_Bool)bMasterPage); } /************************************************************************* @@ -605,9 +605,9 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) CheckMasterPages(); if ( GetMasterSdPageCount(PK_STANDARD) > 1 ) - RemoveUnnecessaryMasterPages( NULL, TRUE, FALSE ); + RemoveUnnecessaryMasterPages( NULL, sal_True, sal_False ); - for ( USHORT i = 0; i < GetPageCount(); i++ ) + for ( sal_uInt16 i = 0; i < GetPageCount(); i++ ) { // Check for correct layout names SdPage* pPage = (SdPage*) GetPage( i ); @@ -623,7 +623,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) } } - for ( USHORT nPage = 0; nPage < GetMasterPageCount(); nPage++) + for ( sal_uInt16 nPage = 0; nPage < GetMasterPageCount(); nPage++) { // LayoutName and PageName must be the same SdPage* pPage = (SdPage*) GetMasterPage( nPage ); @@ -654,7 +654,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) // dokumentspezifisch wie StyleSheetPool und StyleRequestHandler ::Outliner& rDrawOutliner = GetDrawOutliner(); rDrawOutliner.SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool()); - ULONG nCntrl = rDrawOutliner.GetControlWord(); + sal_uLong nCntrl = rDrawOutliner.GetControlWord(); if (mbOnlineSpell) nCntrl |= EE_CNTRL_ONLINESPELLING; else @@ -680,7 +680,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) // Praesentationsobjekte muessen wieder Listener der entsprechenden // Vorlagen werden SdStyleSheetPool* pSPool = (SdStyleSheetPool*) GetStyleSheetPool(); - USHORT nPage, nPageCount; + sal_uInt16 nPage, nPageCount; // #96323# create missing layout style sheets for broken documents // that where created with the 5.2 @@ -707,15 +707,15 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) } } - mbNewOrLoadCompleted = TRUE; + mbNewOrLoadCompleted = sal_True; /************************************************************************** * Alle gelinkten Pages aktualisieren **************************************************************************/ SdPage* pPage = NULL; - USHORT nMaxSdPages = GetSdPageCount(PK_STANDARD); + sal_uInt16 nMaxSdPages = GetSdPageCount(PK_STANDARD); - for (USHORT nSdPage=0; nSdPage < nMaxSdPages; nSdPage++) + for (sal_uInt16 nSdPage=0; nSdPage < nMaxSdPages; nSdPage++) { pPage = (SdPage*) GetSdPage(nSdPage, PK_STANDARD); @@ -727,7 +727,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) UpdateAllLinks(); - SetChanged( FALSE ); + SetChanged( sal_False ); } /** updates all links, only links in this document should by resolved */ @@ -784,23 +784,23 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool if (pObj->GetObjInventor() == SdrInventor) { OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); - UINT16 nId = pObj->GetObjIdentifier(); + sal_uInt16 nId = pObj->GetObjIdentifier(); if (nId == OBJ_TITLETEXT) { if( pOPO && pOPO->GetOutlinerMode() == OUTLINERMODE_DONTKNOW ) pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT ); - // TRUE: harte Attribute dabei nicht loeschen + // sal_True: harte Attribute dabei nicht loeschen if (pTitleSheet) - pObj->SetStyleSheet(pTitleSheet, TRUE); + pObj->SetStyleSheet(pTitleSheet, sal_True); } else if (nId == OBJ_OUTLINETEXT) { if( pOPO && pOPO->GetOutlinerMode() == OUTLINERMODE_DONTKNOW ) pOPO->SetOutlinerMode( OUTLINERMODE_OUTLINEOBJECT ); - for (USHORT nSheet = 0; nSheet < 10; nSheet++) + for (sal_uInt16 nSheet = 0; nSheet < 10; nSheet++) { SfxStyleSheet* pSheet = (SfxStyleSheet*)pOutlineList->GetObject(nSheet); if (pSheet) @@ -809,7 +809,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool if( nSheet == 0) // Textrahmen hoert auf StyleSheet der Ebene1 - pObj->NbcSetStyleSheet(pSheet, TRUE); + pObj->NbcSetStyleSheet(pSheet, sal_True); } } } @@ -821,9 +821,9 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool if (aString.Len()) { - sd::Outliner* pInternalOutl = GetInternalOutliner(TRUE); + sd::Outliner* pInternalOutl = GetInternalOutliner(sal_True); pPage->SetObjText( (SdrTextObj*) pObj, pInternalOutl, ePresObjKind, aString ); - pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( ePresObjKind ), TRUE ); + pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( ePresObjKind ), sal_True ); pInternalOutl->Clear(); } } @@ -843,7 +843,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool |* \************************************************************************/ -::sd::Outliner* SdDrawDocument::GetOutliner(BOOL bCreateOutliner) +::sd::Outliner* SdDrawDocument::GetOutliner(sal_Bool bCreateOutliner) { if (!mpOutliner && bCreateOutliner) { @@ -868,7 +868,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool |* \************************************************************************/ -::sd::Outliner* SdDrawDocument::GetInternalOutliner(BOOL bCreateOutliner) +::sd::Outliner* SdDrawDocument::GetInternalOutliner(sal_Bool bCreateOutliner) { if ( !mpInternalOutliner && bCreateOutliner ) { @@ -876,9 +876,9 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool // MT: // Dieser Outliner wird nur fuer das Erzeugen spezieller Textobjekte // verwendet. Da in diesen Textobjekten keine Portion-Informationen - // gespeichert werden muessen, kann/soll der Update-Mode immer FALSE bleiben. - mpInternalOutliner->SetUpdateMode( FALSE ); - mpInternalOutliner->EnableUndo( FALSE ); + // gespeichert werden muessen, kann/soll der Update-Mode immer sal_False bleiben. + mpInternalOutliner->SetUpdateMode( sal_False ); + mpInternalOutliner->EnableUndo( sal_False ); if (mpDocSh) mpInternalOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) ); @@ -887,8 +887,8 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool mpInternalOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool()); } - DBG_ASSERT( !mpInternalOutliner || ( mpInternalOutliner->GetUpdateMode() == FALSE ) , "InternalOutliner: UpdateMode = TRUE !" ); - DBG_ASSERT( !mpInternalOutliner || ( mpInternalOutliner->IsUndoEnabled() == FALSE ), "InternalOutliner: Undo = TRUE !" ); + DBG_ASSERT( !mpInternalOutliner || ( mpInternalOutliner->GetUpdateMode() == sal_False ) , "InternalOutliner: UpdateMode = sal_True !" ); + DBG_ASSERT( !mpInternalOutliner || ( mpInternalOutliner->IsUndoEnabled() == sal_False ), "InternalOutliner: Undo = sal_True !" ); // MT: Wer ihn vollmuellt, macht ihn auch gleich wieder leer: // Vorteile: @@ -905,10 +905,10 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool |* \************************************************************************/ -void SdDrawDocument::SetOnlineSpell(BOOL bIn) +void SdDrawDocument::SetOnlineSpell(sal_Bool bIn) { mbOnlineSpell = bIn; - ULONG nCntrl = 0; + sal_uLong nCntrl = 0; if(mpOutliner) { diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index a3dff08902b8..e6b5bf9ae988 100755 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -102,8 +102,8 @@ SdrObject* SdDrawDocument::GetObj(const String& rObjName) const /************************************************************************** * Zuerst alle Pages durchsuchen **************************************************************************/ - USHORT nPage = 0; - const USHORT nMaxPages = GetPageCount(); + sal_uInt16 nPage = 0; + const sal_uInt16 nMaxPages = GetPageCount(); while (nPage < nMaxPages && !pObjFound) { @@ -130,7 +130,7 @@ SdrObject* SdDrawDocument::GetObj(const String& rObjName) const * Wenn nicht gefunden, dann alle MasterPages durchsuchen **************************************************************************/ nPage = 0; - const USHORT nMaxMasterPages = GetMasterPageCount(); + const sal_uInt16 nMaxMasterPages = GetMasterPageCount(); while (nPage < nMaxMasterPages && !pObjFound) { @@ -163,14 +163,14 @@ SdrObject* SdDrawDocument::GetObj(const String& rObjName) const |* \************************************************************************/ -USHORT SdDrawDocument::GetPageByName(const String& rPgName, BOOL& rbIsMasterPage) const +sal_uInt16 SdDrawDocument::GetPageByName(const String& rPgName, sal_Bool& rbIsMasterPage) const { SdPage* pPage = NULL; - USHORT nPage = 0; - const USHORT nMaxPages = GetPageCount(); - USHORT nPageNum = SDRPAGE_NOTFOUND; + sal_uInt16 nPage = 0; + const sal_uInt16 nMaxPages = GetPageCount(); + sal_uInt16 nPageNum = SDRPAGE_NOTFOUND; - rbIsMasterPage = FALSE; + rbIsMasterPage = sal_False; // Search all regular pages and all notes pages (handout pages are // ignored.) @@ -190,7 +190,7 @@ USHORT SdDrawDocument::GetPageByName(const String& rPgName, BOOL& rbIsMasterPage } // Search all master pages when not found among non-master pages. - const USHORT nMaxMasterPages = GetMasterPageCount(); + const sal_uInt16 nMaxMasterPages = GetMasterPageCount(); nPage = 0; while (nPage < nMaxMasterPages && nPageNum == SDRPAGE_NOTFOUND) @@ -201,7 +201,7 @@ USHORT SdDrawDocument::GetPageByName(const String& rPgName, BOOL& rbIsMasterPage if (pPage && pPage->GetName() == rPgName) { nPageNum = nPage; - rbIsMasterPage = TRUE; + rbIsMasterPage = sal_True; } nPage++; @@ -217,7 +217,7 @@ USHORT SdDrawDocument::GetPageByName(const String& rPgName, BOOL& rbIsMasterPage |* \************************************************************************/ -SdPage* SdDrawDocument::GetSdPage(USHORT nPgNum, PageKind ePgKind) const +SdPage* SdDrawDocument::GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const { // #109538# return mpDrawPageListWatcher->GetSdPage(ePgKind, sal_uInt32(nPgNum)); @@ -229,7 +229,7 @@ SdPage* SdDrawDocument::GetSdPage(USHORT nPgNum, PageKind ePgKind) const |* \************************************************************************/ -USHORT SdDrawDocument::GetSdPageCount(PageKind ePgKind) const +sal_uInt16 SdDrawDocument::GetSdPageCount(PageKind ePgKind) const { // #109538# return (sal_uInt16)mpDrawPageListWatcher->GetSdPageCount(ePgKind); @@ -241,7 +241,7 @@ USHORT SdDrawDocument::GetSdPageCount(PageKind ePgKind) const |* \************************************************************************/ -SdPage* SdDrawDocument::GetMasterSdPage(USHORT nPgNum, PageKind ePgKind) +SdPage* SdDrawDocument::GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind) { // #109538# return mpMasterPageListWatcher->GetSdPage(ePgKind, sal_uInt32(nPgNum)); @@ -253,7 +253,7 @@ SdPage* SdDrawDocument::GetMasterSdPage(USHORT nPgNum, PageKind ePgKind) |* \************************************************************************/ -USHORT SdDrawDocument::GetMasterSdPageCount(PageKind ePgKind) const +sal_uInt16 SdDrawDocument::GetMasterSdPageCount(PageKind ePgKind) const { // #109538# return (sal_uInt16)mpMasterPageListWatcher->GetSdPageCount(ePgKind); @@ -266,12 +266,12 @@ USHORT SdDrawDocument::GetMasterSdPageCount(PageKind ePgKind) const |* \************************************************************************/ -void SdDrawDocument::UpdatePageObjectsInNotes(USHORT nStartPos) +void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos) { - USHORT nPageCount = GetPageCount(); + sal_uInt16 nPageCount = GetPageCount(); SdPage* pPage = NULL; - for (USHORT nPage = nStartPos; nPage < nPageCount; nPage++) + for (sal_uInt16 nPage = nStartPos; nPage < nPageCount; nPage++) { pPage = (SdPage*)GetPage(nPage); @@ -279,9 +279,9 @@ void SdDrawDocument::UpdatePageObjectsInNotes(USHORT nStartPos) // und Nummer korrigieren if (pPage && pPage->GetPageKind() == PK_NOTES) { - ULONG nObjCount = pPage->GetObjCount(); + sal_uLong nObjCount = pPage->GetObjCount(); SdrObject* pObj = NULL; - for (ULONG nObj = 0; nObj < nObjCount; nObj++) + for (sal_uLong nObj = 0; nObj < nObjCount; nObj++) { pObj = pPage->GetObj(nObj); if (pObj->GetObjIdentifier() == OBJ_PAGE && @@ -347,7 +347,7 @@ void SdDrawDocument::UpdatePageRelativeURLs(const String& rOldName, const String } } -void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, USHORT nPos, sal_Int32 nIncrement) +void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_Int32 nIncrement) { bool bNotes = (pPage->GetPageKind() == PK_NOTES); @@ -387,7 +387,7 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, USHORT nPos, sal_Int3 aURLCopy.Erase(aURLCopy.Len() - sNotes.Len(), sNotes.Len()); sal_Int32 number = aURLCopy.ToInt32(); - USHORT realPageNumber = (nPos + 1)/ 2; + sal_uInt16 realPageNumber = (nPos + 1)/ 2; if ( number >= realPageNumber ) { @@ -415,12 +415,12 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, USHORT nPos, sal_Int3 |* \************************************************************************/ -void SdDrawDocument::MovePage(USHORT nPgNum, USHORT nNewPos) +void SdDrawDocument::MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos) { // Seite verschieben FmFormModel::MovePage(nPgNum, nNewPos); - USHORT nMin = Min(nPgNum, nNewPos); + sal_uInt16 nMin = Min(nPgNum, nNewPos); UpdatePageObjectsInNotes(nMin); } @@ -431,7 +431,7 @@ void SdDrawDocument::MovePage(USHORT nPgNum, USHORT nNewPos) |* \************************************************************************/ -void SdDrawDocument::InsertPage(SdrPage* pPage, USHORT nPos) +void SdDrawDocument::InsertPage(SdrPage* pPage, sal_uInt16 nPos) { bool bLast = (nPos == GetPageCount()); @@ -452,7 +452,7 @@ void SdDrawDocument::InsertPage(SdrPage* pPage, USHORT nPos) |* \************************************************************************/ -void SdDrawDocument::DeletePage(USHORT nPgNum) +void SdDrawDocument::DeletePage(sal_uInt16 nPgNum) { FmFormModel::DeletePage(nPgNum); @@ -465,7 +465,7 @@ void SdDrawDocument::DeletePage(USHORT nPgNum) |* \************************************************************************/ -SdrPage* SdDrawDocument::RemovePage(USHORT nPgNum) +SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum) { SdrPage* pPage = FmFormModel::RemovePage(nPgNum); @@ -483,7 +483,7 @@ SdrPage* SdDrawDocument::RemovePage(USHORT nPgNum) // Warning: This is not called for new master pages created from SdrModel::Merge, // you also have to modify code in SdDrawDocument::Merge! -void SdDrawDocument::InsertMasterPage(SdrPage* pPage, USHORT nPos ) +void SdDrawDocument::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos ) { FmFormModel::InsertMasterPage( pPage, nPos ); if( pPage && pPage->IsMasterPage() && (static_cast<SdPage*>(pPage)->GetPageKind() == PK_STANDARD) ) @@ -495,7 +495,7 @@ void SdDrawDocument::InsertMasterPage(SdrPage* pPage, USHORT nPos ) } } -SdrPage* SdDrawDocument::RemoveMasterPage(USHORT nPgNum) +SdrPage* SdDrawDocument::RemoveMasterPage(sal_uInt16 nPgNum) { SdPage* pPage = static_cast<SdPage*>(GetMasterPage(nPgNum )); if( pPage && pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) ) @@ -515,7 +515,7 @@ SdrPage* SdDrawDocument::RemoveMasterPage(USHORT nPgNum) |* \************************************************************************/ -void SdDrawDocument::SetSelected(SdPage* pPage, BOOL bSelect) +void SdDrawDocument::SetSelected(SdPage* pPage, sal_Bool bSelect) { PageKind ePageKind = pPage->GetPageKind(); @@ -558,7 +558,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) * Wenn noch keine Seite im Model vorhanden ist (Datei-Neu), wird * eine neue Seite eingefuegt **************************************************************************/ - USHORT nPageCount = GetPageCount(); + sal_uInt16 nPageCount = GetPageCount(); if (nPageCount <= 1) { @@ -568,8 +568,8 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) /********************************************************************** * Handzettel-Seite einfuegen **********************************************************************/ - BOOL bMasterPage; - SdPage* pHandoutPage = dynamic_cast< SdPage* >( AllocPage(bMasterPage=FALSE) ); + sal_Bool bMasterPage; + SdPage* pHandoutPage = dynamic_cast< SdPage* >( AllocPage(bMasterPage=sal_False) ); SdPage* pRefPage = NULL; @@ -594,7 +594,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) /********************************************************************** * MasterPage einfuegen und an der Handzettel-Seite vermerken **********************************************************************/ - SdPage* pHandoutMPage = (SdPage*) AllocPage(bMasterPage=TRUE); + SdPage* pHandoutMPage = (SdPage*) AllocPage(bMasterPage=sal_True); pHandoutMPage->SetSize( pHandoutPage->GetSize() ); pHandoutMPage->SetPageKind(PK_HANDOUT); pHandoutMPage->SetBorder( pHandoutPage->GetLftBorder(), @@ -610,14 +610,14 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) * Eine Standard-Seite ist daher schon vorhanden. **********************************************************************/ SdPage* pPage; - BOOL bClipboard = FALSE; + sal_Bool bClipboard = sal_False; if( pRefDocument ) pRefPage = pRefDocument->GetSdPage( 0, PK_STANDARD ); if (nPageCount == 0) { - pPage = dynamic_cast< SdPage* >( AllocPage(bMasterPage=FALSE) ); + pPage = dynamic_cast< SdPage* >( AllocPage(bMasterPage=sal_False) ); if( pRefPage ) { @@ -629,7 +629,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) // Draw: stets Default-Groesse mit Raendern pPage->SetSize(aDefSize); - SfxPrinter* pPrinter = mpDocSh->GetPrinter(FALSE); + SfxPrinter* pPrinter = mpDocSh->GetPrinter(sal_False); if (pPrinter && pPrinter->IsValid()) { Size aOutSize(pPrinter->GetOutputSize()); @@ -637,10 +637,10 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) aPageOffset -= pPrinter->PixelToLogic( Point() ); long nOffset = !aPageOffset.X() && !aPageOffset.X() ? 0 : PRINT_OFFSET; - ULONG nTop = aPageOffset.Y(); - ULONG nLeft = aPageOffset.X(); - ULONG nBottom = Max((long)(aDefSize.Height() - aOutSize.Height() - nTop + nOffset), 0L); - ULONG nRight = Max((long)(aDefSize.Width() - aOutSize.Width() - nLeft + nOffset), 0L); + sal_uLong nTop = aPageOffset.Y(); + sal_uLong nLeft = aPageOffset.X(); + sal_uLong nBottom = Max((long)(aDefSize.Height() - aOutSize.Height() - nTop + nOffset), 0L); + sal_uLong nRight = Max((long)(aDefSize.Width() - aOutSize.Width() - nLeft + nOffset), 0L); pPage->SetBorder(nLeft, nTop, nRight, nBottom); } @@ -666,14 +666,14 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) } else { - bClipboard = TRUE; + bClipboard = sal_True; pPage = (SdPage*) GetPage(1); } /********************************************************************** * MasterPage einfuegen und an der Seite vermerken **********************************************************************/ - SdPage* pMPage = (SdPage*) AllocPage(bMasterPage=TRUE); + SdPage* pMPage = (SdPage*) AllocPage(bMasterPage=sal_True); pMPage->SetSize( pPage->GetSize() ); pMPage->SetBorder( pPage->GetLftBorder(), pPage->GetUppBorder(), @@ -687,7 +687,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) /********************************************************************** * Notizen-Seite einfuegen **********************************************************************/ - SdPage* pNotesPage = (SdPage*) AllocPage(bMasterPage=FALSE); + SdPage* pNotesPage = (SdPage*) AllocPage(bMasterPage=sal_False); if( pRefDocument ) pRefPage = pRefDocument->GetSdPage( 0, PK_NOTES ); @@ -719,7 +719,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) /********************************************************************** * MasterPage einfuegen und an der Notizen-Seite vermerken **********************************************************************/ - SdPage* pNotesMPage = (SdPage*) AllocPage(bMasterPage=TRUE); + SdPage* pNotesMPage = (SdPage*) AllocPage(bMasterPage=sal_True); pNotesMPage->SetSize( pNotesPage->GetSize() ); pNotesMPage->SetPageKind(PK_NOTES); pNotesMPage->SetBorder( pNotesPage->GetLftBorder(), @@ -733,14 +733,14 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) if( !pRefPage && (meDocType != DOCUMENT_TYPE_DRAW) ) - pPage->SetAutoLayout( AUTOLAYOUT_TITLE, TRUE, TRUE ); + pPage->SetAutoLayout( AUTOLAYOUT_TITLE, sal_True, sal_True ); mpWorkStartupTimer = new Timer(); mpWorkStartupTimer->SetTimeoutHdl( LINK(this, SdDrawDocument, WorkStartupHdl) ); mpWorkStartupTimer->SetTimeout(2000); mpWorkStartupTimer->Start(); - SetChanged(FALSE); + SetChanged(sal_False); } } @@ -752,10 +752,10 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) |* \************************************************************************/ -BOOL SdDrawDocument::CreateMissingNotesAndHandoutPages() +sal_Bool SdDrawDocument::CreateMissingNotesAndHandoutPages() { - BOOL bOK = FALSE; - USHORT nPageCount = GetPageCount(); + sal_Bool bOK = sal_False; + sal_uInt16 nPageCount = GetPageCount(); if (nPageCount != 0) { @@ -769,7 +769,7 @@ BOOL SdDrawDocument::CreateMissingNotesAndHandoutPages() pHandoutPage->SetPageKind(PK_HANDOUT); pHandoutPage->TRG_SetMasterPage( *pHandoutMPage ); - for (USHORT i = 1; i < nPageCount; i = i + 2) + for (sal_uInt16 i = 1; i < nPageCount; i = i + 2) { SdPage* pPage = (SdPage*) GetPage(i); @@ -788,9 +788,9 @@ BOOL SdDrawDocument::CreateMissingNotesAndHandoutPages() pNotesPage->TRG_SetMasterPage(*GetMasterPage(nMasterPageAfterPagesMasterPage)); } - bOK = TRUE; + bOK = sal_True; StopWorkStartupDelay(); - SetChanged(FALSE); + SetChanged(sal_False); } return(bOK); @@ -799,18 +799,18 @@ BOOL SdDrawDocument::CreateMissingNotesAndHandoutPages() /************************************************************************* |* |* - selektierte Seiten hinter genannte Seite schieben -|* (nTargetPage = (USHORT)-1 --> vor erste Seite schieben) -|* - ergibt TRUE, wenn Seiten verschoben wurden +|* (nTargetPage = (sal_uInt16)-1 --> vor erste Seite schieben) +|* - ergibt sal_True, wenn Seiten verschoben wurden |* \************************************************************************/ -BOOL SdDrawDocument::MovePages(USHORT nTargetPage) +sal_Bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage) { SdPage* pTargetPage = NULL; SdPage* pPage = NULL; - USHORT nPage; - USHORT nNoOfPages = GetSdPageCount(PK_STANDARD); - BOOL bSomethingHappened = FALSE; + sal_uInt16 nPage; + sal_uInt16 nNoOfPages = GetSdPageCount(PK_STANDARD); + sal_Bool bSomethingHappened = sal_False; const bool bUndo = IsUndoEnabled(); @@ -830,7 +830,7 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage) // falls noetig, nach vorne hangeln, bis nicht selektierte Seite gefunden nPage = nTargetPage; - if (nPage != (USHORT)-1) + if (nPage != (sal_uInt16)-1) { pPage = GetSdPage(nPage, PK_STANDARD); while (nPage > 0 && pPage->IsSelected()) @@ -841,12 +841,12 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage) if (pPage->IsSelected()) { - nPage = (USHORT)-1; + nPage = (sal_uInt16)-1; } } // vor der ersten Seite einfuegen - if (nPage == (USHORT)-1) + if (nPage == (sal_uInt16)-1) { while (aPageList.Count() > 0) { @@ -863,7 +863,7 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage) if( bUndo ) AddUndo(GetSdrUndoFactory().CreateUndoSetPageNum(*pPg, nPage+1, 2)); MovePage(nPage+1, 2); - bSomethingHappened = TRUE; + bSomethingHappened = sal_True; } aPageList.Remove(); } @@ -892,7 +892,7 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage) if( bUndo ) AddUndo(GetSdrUndoFactory().CreateUndoSetPageNum(*pPg, nPage+1, nTargetPage+1)); MovePage(nPage+1, nTargetPage+1); - bSomethingHappened = TRUE; + bSomethingHappened = sal_True; } } else @@ -907,10 +907,10 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage) if( bUndo ) AddUndo(GetSdrUndoFactory().CreateUndoSetPageNum(*pPg, nPage, nTargetPage)); MovePage(nPage, nTargetPage); - bSomethingHappened = TRUE; + bSomethingHappened = sal_True; } } - aPageList.Remove((ULONG)0); + aPageList.Remove((sal_uLong)0); nTargetPage = pPage->GetPageNum(); } } @@ -928,7 +928,7 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage) |* \************************************************************************/ -ULONG SdDrawDocument::GetLinkCount() +sal_uLong SdDrawDocument::GetLinkCount() { return ( pLinkManager->GetLinks().Count() ); } @@ -939,24 +939,24 @@ ULONG SdDrawDocument::GetLinkCount() |* \************************************************************************/ -void SdDrawDocument::SetLanguage( const LanguageType eLang, const USHORT nId ) +void SdDrawDocument::SetLanguage( const LanguageType eLang, const sal_uInt16 nId ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; if( nId == EE_CHAR_LANGUAGE && meLanguage != eLang ) { meLanguage = eLang; - bChanged = TRUE; + bChanged = sal_True; } else if( nId == EE_CHAR_LANGUAGE_CJK && meLanguageCJK != eLang ) { meLanguageCJK = eLang; - bChanged = TRUE; + bChanged = sal_True; } else if( nId == EE_CHAR_LANGUAGE_CTL && meLanguageCTL != eLang ) { meLanguageCTL = eLang; - bChanged = TRUE; + bChanged = sal_True; } if( bChanged ) @@ -975,7 +975,7 @@ void SdDrawDocument::SetLanguage( const LanguageType eLang, const USHORT nId ) |* \************************************************************************/ -LanguageType SdDrawDocument::GetLanguage( const USHORT nId ) const +LanguageType SdDrawDocument::GetLanguage( const sal_uInt16 nId ) const { LanguageType eLangType = meLanguage; @@ -997,9 +997,9 @@ LanguageType SdDrawDocument::GetLanguage( const USHORT nId ) const IMPL_LINK( SdDrawDocument, WorkStartupHdl, Timer *, EMPTYARG ) { if( mpDocSh ) - mpDocSh->SetWaitCursor( TRUE ); + mpDocSh->SetWaitCursor( sal_True ); - BOOL bChanged = IsChanged(); // merken + sal_Bool bChanged = IsChanged(); // merken // Autolayouts initialisieren SdPage* pHandoutMPage = GetMasterSdPage(0, PK_HANDOUT); @@ -1007,7 +1007,7 @@ IMPL_LINK( SdDrawDocument, WorkStartupHdl, Timer *, EMPTYARG ) if (pHandoutMPage->GetAutoLayout() == AUTOLAYOUT_NONE) { // AutoLayout wurde noch nicht umgesetzt -> Initialisieren - pHandoutMPage->SetAutoLayout(AUTOLAYOUT_HANDOUT6, TRUE, TRUE); + pHandoutMPage->SetAutoLayout(AUTOLAYOUT_HANDOUT6, sal_True, sal_True); } SdPage* pPage = GetSdPage(0, PK_STANDARD); @@ -1015,7 +1015,7 @@ IMPL_LINK( SdDrawDocument, WorkStartupHdl, Timer *, EMPTYARG ) if (pPage->GetAutoLayout() == AUTOLAYOUT_NONE) { // AutoLayout wurde noch nicht umgesetzt -> Initialisieren - pPage->SetAutoLayout(AUTOLAYOUT_NONE, TRUE, TRUE); + pPage->SetAutoLayout(AUTOLAYOUT_NONE, sal_True, sal_True); } SdPage* pNotesPage = GetSdPage(0, PK_NOTES); @@ -1023,13 +1023,13 @@ IMPL_LINK( SdDrawDocument, WorkStartupHdl, Timer *, EMPTYARG ) if (pNotesPage->GetAutoLayout() == AUTOLAYOUT_NONE) { // AutoLayout wurde noch nicht umgesetzt -> Initialisieren - pNotesPage->SetAutoLayout(AUTOLAYOUT_NOTES, TRUE, TRUE); + pNotesPage->SetAutoLayout(AUTOLAYOUT_NOTES, sal_True, sal_True); } - SetChanged(bChanged || FALSE); + SetChanged(bChanged || sal_False); if( mpDocSh ) - mpDocSh->SetWaitCursor( FALSE ); + mpDocSh->SetWaitCursor( sal_False ); return 0; } @@ -1077,8 +1077,8 @@ SdAnimationInfo* SdDrawDocument::GetAnimationInfo(SdrObject* pObject) const SdAnimationInfo* SdDrawDocument::GetShapeUserData(SdrObject& rObject, bool bCreate /* = false */ ) { - USHORT nUD = 0; - USHORT nUDCount = rObject.GetUserDataCount(); + sal_uInt16 nUD = 0; + sal_uInt16 nUDCount = rObject.GetUserDataCount(); SdrObjUserData* pUD = 0; SdAnimationInfo* pRet = 0; @@ -1115,10 +1115,10 @@ SdIMapInfo* SdDrawDocument::GetIMapInfo( SdrObject* pObject ) const SdrObjUserData* pUserData = NULL; SdIMapInfo* pIMapInfo = NULL; - USHORT nCount = pObject->GetUserDataCount(); + sal_uInt16 nCount = pObject->GetUserDataCount(); // gibt es in den User-Daten eine IMap-Information? - for ( USHORT i = 0; i < nCount; i++ ) + for ( sal_uInt16 i = 0; i < nCount; i++ ) { pUserData = pObject->GetUserData( i ); @@ -1150,7 +1150,7 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj, Point aRelPoint( rWinPoint ); ImageMap& rImageMap = (ImageMap&) pIMapInfo->GetImageMap(); const Rectangle& rRect = pObj->GetLogicRect(); - BOOL bObjSupported = FALSE; + sal_Bool bObjSupported = sal_False; // HitTest ausfuehren if ( pObj->ISA( SdrGrafObj ) ) // einfaches Grafik-Objekt @@ -1178,12 +1178,12 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj, pGrafObj->GetGrafPrefMapMode(), aMap100 ); delete pGeoData; - bObjSupported = TRUE; + bObjSupported = sal_True; } else if ( pObj->ISA( SdrOle2Obj ) ) // OLE-Objekt { aGraphSize = ( (SdrOle2Obj*) pObj )->GetOrigObjSize(); - bObjSupported = TRUE; + bObjSupported = sal_True; } // hat alles geklappt, dann HitTest ausfuehren @@ -1210,7 +1210,7 @@ void SdDrawDocument::CheckMasterPages() { // RemoveMasterPage(2); // code to test the creation of notes pages - USHORT nMaxPages = GetMasterPageCount(); + sal_uInt16 nMaxPages = GetMasterPageCount(); // we need at least a handout master and one master page if( nMaxPages < 2 ) @@ -1221,7 +1221,7 @@ void SdDrawDocument::CheckMasterPages() SdPage* pPage = NULL; SdPage* pNotesPage = NULL; - USHORT nPage; + sal_uInt16 nPage; // first see if the page order is correct for( nPage = 1; nPage < nMaxPages; nPage++ ) @@ -1246,7 +1246,7 @@ void SdDrawDocument::CheckMasterPages() if( pPage->GetPageKind() != PK_STANDARD ) { bChanged = sal_True; - USHORT nFound = nPage + 1; + sal_uInt16 nFound = nPage + 1; while( nFound < nMaxPages ) { pPage = static_cast<SdPage*>(GetMasterPage( nFound )); @@ -1277,7 +1277,7 @@ void SdDrawDocument::CheckMasterPages() { bChanged = sal_True; - USHORT nFound = nPage + 1; + sal_uInt16 nFound = nPage + 1; while( nFound < nMaxPages ) { pNotesPage = static_cast<SdPage*>(GetMasterPage( nFound )); @@ -1346,15 +1346,15 @@ void SdDrawDocument::CheckMasterPages() } } -USHORT SdDrawDocument::CreatePage ( +sal_uInt16 SdDrawDocument::CreatePage ( SdPage* pActualPage, PageKind ePageKind, const String& sStandardPageName, const String& sNotesPageName, AutoLayout eStandardLayout, AutoLayout eNotesLayout, - BOOL bIsPageBack, - BOOL bIsPageObj, + sal_Bool bIsPageBack, + sal_Bool bIsPageObj, const sal_Int32 nInsertPosition) { SdPage* pPreviousStandardPage; @@ -1367,20 +1367,20 @@ USHORT SdDrawDocument::CreatePage ( if (ePageKind == PK_NOTES) { pPreviousNotesPage = pActualPage; - USHORT nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2; + sal_uInt16 nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2; pPreviousStandardPage = (SdPage*) GetPage(nNotesPageNum - 3); eStandardLayout = pPreviousStandardPage->GetAutoLayout(); } else { pPreviousStandardPage = pActualPage; - USHORT nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2; + sal_uInt16 nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2; pPreviousNotesPage = (SdPage*) GetPage(nStandardPageNum - 1); eNotesLayout = pPreviousNotesPage->GetAutoLayout(); } // Create new standard page and set it up. - pStandardPage = (SdPage*) AllocPage(FALSE); + pStandardPage = (SdPage*) AllocPage(sal_False); // #108658# // Set the size here since else the presobj autolayout @@ -1396,7 +1396,7 @@ USHORT SdDrawDocument::CreatePage ( // User layout of current standard page. pStandardPage->SetLayoutName( pPreviousStandardPage->GetLayoutName() ); - pStandardPage->SetAutoLayout(eStandardLayout, TRUE); + pStandardPage->SetAutoLayout(eStandardLayout, sal_True); pStandardPage->setHeaderFooterSettings( pPreviousStandardPage->getHeaderFooterSettings() ); // transition settings of current page @@ -1411,7 +1411,7 @@ USHORT SdDrawDocument::CreatePage ( pStandardPage->SetTime( pPreviousStandardPage->GetTime() ); // Create new notes page and set it up. - pNotesPage = (SdPage*) AllocPage(FALSE); + pNotesPage = (SdPage*) AllocPage(sal_False); pNotesPage->SetPageKind(PK_NOTES); // Use master page of current page. @@ -1419,7 +1419,7 @@ USHORT SdDrawDocument::CreatePage ( // Use layout of current notes page. pNotesPage->SetLayoutName( pPreviousNotesPage->GetLayoutName() ); - pNotesPage->SetAutoLayout(eNotesLayout, TRUE); + pNotesPage->SetAutoLayout(eNotesLayout, sal_True); pNotesPage->setHeaderFooterSettings( pPreviousNotesPage->getHeaderFooterSettings() ); return InsertPageSet ( @@ -1439,7 +1439,7 @@ USHORT SdDrawDocument::CreatePage ( -USHORT SdDrawDocument::DuplicatePage (USHORT nPageNum) +sal_uInt16 SdDrawDocument::DuplicatePage (sal_uInt16 nPageNum) { PageKind ePageKind = PK_STANDARD; @@ -1448,8 +1448,8 @@ USHORT SdDrawDocument::DuplicatePage (USHORT nPageNum) // Get background flags. SdrLayerAdmin& rLayerAdmin = GetLayerAdmin(); - BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE); - BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE); + sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False); + sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False); SetOfByte aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers(); // Get layout from current page. @@ -1467,15 +1467,15 @@ USHORT SdDrawDocument::DuplicatePage (USHORT nPageNum) -USHORT SdDrawDocument::DuplicatePage ( +sal_uInt16 SdDrawDocument::DuplicatePage ( SdPage* pActualPage, PageKind ePageKind, const String& sStandardPageName, const String& sNotesPageName, AutoLayout eStandardLayout, AutoLayout eNotesLayout, - BOOL bIsPageBack, - BOOL bIsPageObj, + sal_Bool bIsPageBack, + sal_Bool bIsPageObj, const sal_Int32 nInsertPosition) { SdPage* pPreviousStandardPage; @@ -1488,13 +1488,13 @@ USHORT SdDrawDocument::DuplicatePage ( if (ePageKind == PK_NOTES) { pPreviousNotesPage = pActualPage; - USHORT nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2; + sal_uInt16 nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2; pPreviousStandardPage = (SdPage*) GetPage(nNotesPageNum - 3); } else { pPreviousStandardPage = pActualPage; - USHORT nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2; + sal_uInt16 nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2; pPreviousNotesPage = (SdPage*) GetPage(nStandardPageNum - 1); } @@ -1519,23 +1519,23 @@ USHORT SdDrawDocument::DuplicatePage ( -USHORT SdDrawDocument::InsertPageSet ( +sal_uInt16 SdDrawDocument::InsertPageSet ( SdPage* pActualPage, PageKind ePageKind, const String& sStandardPageName, const String& sNotesPageName, AutoLayout eStandardLayout, AutoLayout eNotesLayout, - BOOL bIsPageBack, - BOOL bIsPageObj, + sal_Bool bIsPageBack, + sal_Bool bIsPageObj, SdPage* pStandardPage, SdPage* pNotesPage, sal_Int32 nInsertPosition) { SdPage* pPreviousStandardPage; SdPage* pPreviousNotesPage; - USHORT nStandardPageNum; - USHORT nNotesPageNum; + sal_uInt16 nStandardPageNum; + sal_uInt16 nNotesPageNum; String aStandardPageName = sStandardPageName; String aNotesPageName = sNotesPageName; @@ -1595,9 +1595,9 @@ void SdDrawDocument::SetupNewPage ( SdPage* pPreviousPage, SdPage* pPage, const String& sPageName, - USHORT nInsertionPoint, - BOOL bIsPageBack, - BOOL bIsPageObj) + sal_uInt16 nInsertionPoint, + sal_Bool bIsPageBack, + sal_Bool bIsPageObj) { if (pPreviousPage != NULL) { @@ -1614,8 +1614,8 @@ void SdDrawDocument::SetupNewPage ( if (pPreviousPage != NULL) { SdrLayerAdmin& rLayerAdmin = GetLayerAdmin(); - BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE); - BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE); + sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False); + sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False); SetOfByte aVisibleLayers = pPreviousPage->TRG_GetMasterPageVisibleLayers(); aVisibleLayers.Set(aBckgrnd, bIsPageBack); aVisibleLayers.Set(aBckgrndObj, bIsPageObj); diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 025700a790fc..a407d44251a5 100755 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -80,9 +80,9 @@ using namespace ::com::sun::star; -#define POOL_BUFFER_SIZE (USHORT)32768 -#define BASIC_BUFFER_SIZE (USHORT)8192 -#define DOCUMENT_BUFFER_SIZE (USHORT)32768 +#define POOL_BUFFER_SIZE (sal_uInt16)32768 +#define BASIC_BUFFER_SIZE (sal_uInt16)8192 +#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768 /************************************************************************* |* @@ -108,24 +108,24 @@ void SdStorageListener::disposing( const lang::EventObject& aEvent ) throw ( uno SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium) { - BOOL bOK = TRUE; + sal_Bool bOK = sal_True; SdDrawDocument* pBookmarkDoc = NULL; String aBookmarkName = rMedium.GetName(); const SfxFilter* pFilter = rMedium.GetFilter(); if ( !pFilter ) { - rMedium.UseInteractionHandler( TRUE ); + rMedium.UseInteractionHandler( sal_True ); SFX_APP()->GetFilterMatcher().GuessFilter( rMedium, &pFilter ); } if ( !pFilter ) { - bOK = FALSE; + bOK = sal_False; } else if ( maBookmarkFile != aBookmarkName && aBookmarkName.Len() ) { - BOOL bCreateGraphicShell = pFilter->GetServiceName().EqualsAscii( "com.sun.star.drawing.DrawingDocument" ); - BOOL bCreateImpressShell = pFilter->GetServiceName().EqualsAscii( "com.sun.star.presentation.PresentationDocument" ); + sal_Bool bCreateGraphicShell = pFilter->GetServiceName().EqualsAscii( "com.sun.star.drawing.DrawingDocument" ); + sal_Bool bCreateImpressShell = pFilter->GetServiceName().EqualsAscii( "com.sun.star.presentation.PresentationDocument" ); if ( bCreateGraphicShell || bCreateImpressShell ) { CloseBookmarkDoc(); @@ -136,10 +136,10 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium) // direkt laden if ( bCreateGraphicShell ) // Draw - mxBookmarkDocShRef = new ::sd::GraphicDocShell(SFX_CREATE_MODE_STANDARD, TRUE); + mxBookmarkDocShRef = new ::sd::GraphicDocShell(SFX_CREATE_MODE_STANDARD, sal_True); else // Impress - mxBookmarkDocShRef = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD, TRUE); + mxBookmarkDocShRef = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD, sal_True); bOK = mxBookmarkDocShRef->DoLoad(&rMedium); if( bOK ) @@ -180,7 +180,7 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(const String& rBookmarkFile) if (maBookmarkFile != rBookmarkFile && rBookmarkFile.Len()) { - SfxMedium* pMedium = new SfxMedium( rBookmarkFile, STREAM_READ, FALSE ); + SfxMedium* pMedium = new SfxMedium( rBookmarkFile, STREAM_READ, sal_False ); pBookmarkDoc = OpenBookmarkDoc(*pMedium); } else if (mxBookmarkDocShRef.Is()) @@ -197,26 +197,26 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(const String& rBookmarkFile) |* \************************************************************************/ -BOOL SdDrawDocument::InsertBookmark( +sal_Bool SdDrawDocument::InsertBookmark( List* pBookmarkList, // Liste der Namen der einzufuegenden Bookmarks List* pExchangeList, // Liste der zu verwendenen Namen - BOOL bLink, // Bookmarks sollen als Verknuepfung eingefuegt werden - BOOL bReplace, // Aktuellen Seiten (Standard&Notiz) werden ersetzt - USHORT nInsertPos, // Einfuegeposition fuer Seiten - BOOL bNoDialogs, // Keine Dialoge anzeigen + sal_Bool bLink, // Bookmarks sollen als Verknuepfung eingefuegt werden + sal_Bool bReplace, // Aktuellen Seiten (Standard&Notiz) werden ersetzt + sal_uInt16 nInsertPos, // Einfuegeposition fuer Seiten + sal_Bool bNoDialogs, // Keine Dialoge anzeigen ::sd::DrawDocShell* pBookmarkDocSh, // Wenn gesetzt, so ist dieses das Source-Dokument - BOOL bCopy, // Seiten werden kopiert + sal_Bool bCopy, // Seiten werden kopiert Point* pObjPos) // Einfuegeposition fuer Objekte { - BOOL bOK = TRUE; - BOOL bInsertPages = FALSE; + sal_Bool bOK = sal_True; + sal_Bool bInsertPages = sal_False; if (!pBookmarkList) { /********************************************************************** * Alle Seiten werden eingefuegt **********************************************************************/ - bInsertPages = TRUE; + bInsertPages = sal_True; } else { @@ -234,20 +234,20 @@ BOOL SdDrawDocument::InsertBookmark( aBookmarkName = maBookmarkFile; } else - bOK = FALSE; + bOK = sal_False; - for (USHORT nPos = 0; bOK && ( nPos < pBookmarkList->Count() ) && !bInsertPages; nPos++) + for (sal_uInt16 nPos = 0; bOK && ( nPos < pBookmarkList->Count() ) && !bInsertPages; nPos++) { /****************************************************************** * Gibt es in der Bookmark-Liste einen Seitennamen? ******************************************************************/ String aBMPgName (*(String*) pBookmarkList->GetObject(nPos)); - BOOL bIsMasterPage; + sal_Bool bIsMasterPage; if( pBookmarkDoc->GetPageByName( aBMPgName, bIsMasterPage ) != SDRPAGE_NOTFOUND ) { // Seite gefunden - bInsertPages = TRUE; + bInsertPages = sal_True; } } } @@ -256,7 +256,7 @@ BOOL SdDrawDocument::InsertBookmark( { // Zuerst werden alle Seiten-Bookmarks eingefuegt bOK = InsertBookmarkAsPage(pBookmarkList, pExchangeList, bLink, bReplace, - nInsertPos, bNoDialogs, pBookmarkDocSh, bCopy, TRUE, FALSE); + nInsertPos, bNoDialogs, pBookmarkDocSh, bCopy, sal_True, sal_False); } if ( bOK && pBookmarkList ) @@ -289,7 +289,7 @@ SdDrawDocument::InsertBookmarkAsPage_PageFunctorBase::~InsertBookmarkAsPage_Page { } -void SdDrawDocument::IterateBookmarkPages( SdDrawDocument* pBookmarkDoc, List* pBookmarkList, USHORT nBMSdPageCount, +void SdDrawDocument::IterateBookmarkPages( SdDrawDocument* pBookmarkDoc, List* pBookmarkList, sal_uInt16 nBMSdPageCount, SdDrawDocument::InsertBookmarkAsPage_PageFunctorBase& rPageIterator ) { // @@ -319,15 +319,15 @@ void SdDrawDocument::IterateBookmarkPages( SdDrawDocument* pBookmarkDoc, List* p if( !pBookmarkList ) { // simply take master page of nPos'th page in source document - pBMMPage = (SdPage*)(&(pBookmarkDoc->GetSdPage((USHORT)nPos, PK_STANDARD)->TRG_GetMasterPage())); + pBMMPage = (SdPage*)(&(pBookmarkDoc->GetSdPage((sal_uInt16)nPos, PK_STANDARD)->TRG_GetMasterPage())); } else { // fetch nPos'th entry from bookmark list, and determine master page String aBMPgName (*(String*) pBookmarkList->GetObject(nPos)); - BOOL bIsMasterPage; + sal_Bool bIsMasterPage; - USHORT nBMPage = pBookmarkDoc->GetPageByName( aBMPgName, bIsMasterPage ); + sal_uInt16 nBMPage = pBookmarkDoc->GetPageByName( aBMPgName, bIsMasterPage ); if (nBMPage != SDRPAGE_NOTFOUND) { @@ -341,7 +341,7 @@ void SdDrawDocument::IterateBookmarkPages( SdDrawDocument* pBookmarkDoc, List* p // enforce that bookmarked page is a standard page and not already a master page if (pBMPage && pBMPage->GetPageKind()==PK_STANDARD && !pBMPage->IsMasterPage()) { - const USHORT nBMSdPage = (nBMPage - 1) / 2; + const sal_uInt16 nBMSdPage = (nBMPage - 1) / 2; pBMMPage = (SdPage*) (&(pBookmarkDoc->GetSdPage(nBMSdPage, PK_STANDARD)->TRG_GetMasterPage())); } } @@ -359,7 +359,7 @@ class InsertBookmarkAsPage_FindDuplicateLayouts : public SdDrawDocument::InsertB { public: InsertBookmarkAsPage_FindDuplicateLayouts( List* pLayoutsToTransfer, SdDrawDocument* pBookmarkDoc, - List* pBookmarkList, USHORT nBMSdPageCount ) : + List* pBookmarkList, sal_uInt16 nBMSdPageCount ) : mpLayoutsToTransfer(pLayoutsToTransfer), mpBookmarkDoc(pBookmarkDoc), mpBookmarkList(pBookmarkList), mnBMSdPageCount(nBMSdPageCount) {} virtual ~InsertBookmarkAsPage_FindDuplicateLayouts() {}; @@ -368,7 +368,7 @@ private: List* mpLayoutsToTransfer; SdDrawDocument* mpBookmarkDoc; List* mpBookmarkList; - USHORT mnBMSdPageCount; + sal_uInt16 mnBMSdPageCount; }; void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc, SdPage* pBMMPage ) @@ -381,18 +381,18 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc pLayout->Erase( pLayout->SearchAscii( SD_LT_SEPARATOR )); String* pTest = (String*) mpLayoutsToTransfer->First(); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; while (pTest && !bFound) // found yet? { if (*pLayout == *pTest) - bFound = TRUE; + bFound = sal_True; else pTest = (String*)mpLayoutsToTransfer->Next(); } - const USHORT nMPageCount = rDoc.GetMasterPageCount(); - for (USHORT nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++) + const sal_uInt16 nMPageCount = rDoc.GetMasterPageCount(); + for (sal_uInt16 nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++) { /************************************************************** * Gibt es die Layouts schon im Dokument? @@ -402,7 +402,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc aTest.Erase( aTest.SearchAscii( SD_LT_SEPARATOR )); if (aTest == *pLayout) - bFound = TRUE; + bFound = sal_True; } if (!bFound) @@ -426,22 +426,22 @@ private: }; -BOOL SdDrawDocument::InsertBookmarkAsPage( +sal_Bool SdDrawDocument::InsertBookmarkAsPage( List* pBookmarkList, List* pExchangeList, // Liste der zu verwendenen Namen - BOOL bLink, - BOOL bReplace, - USHORT nInsertPos, - BOOL bNoDialogs, + sal_Bool bLink, + sal_Bool bReplace, + sal_uInt16 nInsertPos, + sal_Bool bNoDialogs, ::sd::DrawDocShell* pBookmarkDocSh, - BOOL bCopy, - BOOL bMergeMasterPages, - BOOL bPreservePageNames) + sal_Bool bCopy, + sal_Bool bMergeMasterPages, + sal_Bool bPreservePageNames) { - BOOL bOK = TRUE; - BOOL bContinue = TRUE; - BOOL bScaleObjects = FALSE; - USHORT nReplacedStandardPages = 0; + sal_Bool bOK = sal_True; + sal_Bool bContinue = sal_True; + sal_Bool bScaleObjects = sal_False; + sal_uInt16 nReplacedStandardPages = 0; SdDrawDocument* pBookmarkDoc = NULL; String aBookmarkName; @@ -462,16 +462,16 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( } else { - return FALSE; + return sal_False; } - const USHORT nSdPageCount = GetSdPageCount(PK_STANDARD); - const USHORT nBMSdPageCount = pBookmarkDoc->GetSdPageCount(PK_STANDARD); - const USHORT nMPageCount = GetMasterPageCount(); + const sal_uInt16 nSdPageCount = GetSdPageCount(PK_STANDARD); + const sal_uInt16 nBMSdPageCount = pBookmarkDoc->GetSdPageCount(PK_STANDARD); + const sal_uInt16 nMPageCount = GetMasterPageCount(); if (nSdPageCount==0 || nBMSdPageCount==0 || nMPageCount==0) { - bContinue = bOK = FALSE; + bContinue = bOK = sal_False; return(bContinue); } @@ -481,18 +481,18 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( // Note that the pointers are used later on as general page pointers. SdPage* pRefPage = GetSdPage(0, PK_STANDARD); Size aSize(pRefPage->GetSize()); - INT32 nLeft = pRefPage->GetLftBorder(); - INT32 nRight = pRefPage->GetRgtBorder(); - INT32 nUpper = pRefPage->GetUppBorder(); - INT32 nLower = pRefPage->GetLwrBorder(); + sal_Int32 nLeft = pRefPage->GetLftBorder(); + sal_Int32 nRight = pRefPage->GetRgtBorder(); + sal_Int32 nUpper = pRefPage->GetUppBorder(); + sal_Int32 nLower = pRefPage->GetLwrBorder(); Orientation eOrient = pRefPage->GetOrientation(); SdPage* pNPage = GetSdPage(0, PK_NOTES); Size aNSize(GetSdPage(0, PK_NOTES)->GetSize()); - INT32 nNLeft = pNPage->GetLftBorder(); - INT32 nNRight = pNPage->GetRgtBorder(); - INT32 nNUpper = pNPage->GetUppBorder(); - INT32 nNLower = pNPage->GetLwrBorder(); + sal_Int32 nNLeft = pNPage->GetLftBorder(); + sal_Int32 nNRight = pNPage->GetRgtBorder(); + sal_Int32 nNUpper = pNPage->GetUppBorder(); + sal_Int32 nNLower = pNPage->GetLwrBorder(); Orientation eNOrient = pRefPage->GetOrientation(); // Seitengroesse und -raender an die Werte der letzten @@ -504,7 +504,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( if( !pBookmarkList ) bScaleObjects = pRefPage->IsScaleObjects(); else - bScaleObjects = TRUE; + bScaleObjects = sal_True; } else { @@ -517,7 +517,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( pBMPage->GetLwrBorder() != pRefPage->GetLwrBorder()) { String aStr(SdResId(STR_SCALE_OBJECTS)); - USHORT nBut = QueryBox( NULL, WB_YES_NO_CANCEL, aStr).Execute(); + sal_uInt16 nBut = QueryBox( NULL, WB_YES_NO_CANCEL, aStr).Execute(); bScaleObjects = nBut == RET_YES; bContinue = nBut != RET_CANCEL; @@ -535,7 +535,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( |* den Seiten transferieren, sonst verlieren die Textobjekte |* beim Transfer den Bezug zur Vorlage \*************************************************************************/ - SfxUndoManager* pUndoMgr = NULL; + ::svl::IUndoManager* pUndoMgr = NULL; if( mpDocSh ) { pUndoMgr = mpDocSh->GetUndoManager(); @@ -562,7 +562,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( // Wenn Vorlagen kopiert werden muessen, dann muessen auch die // MasterPages kopiert werden! if( pLayout ) - bMergeMasterPages = TRUE; + bMergeMasterPages = sal_True; while (pLayout) { @@ -574,7 +574,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( { if( pUndoMgr ) { - SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction(this, aCreatedStyles, TRUE); + SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction(this, aCreatedStyles, sal_True); pUndoMgr->AddUndoAction(pMovStyles); } } @@ -603,17 +603,17 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( nInsertPos = GetPageCount(); } - USHORT nActualInsertPos = nInsertPos; + sal_uInt16 nActualInsertPos = nInsertPos; List aNameList; - std::set<USHORT> aRenameSet; - USHORT nBMSdPage; + std::set<sal_uInt16> aRenameSet; + sal_uInt16 nBMSdPage; for (nBMSdPage=0; nBMSdPage < nBMSdPageCount; nBMSdPage++) { SdPage* pBMPage = pBookmarkDoc->GetSdPage(nBMSdPage, PK_STANDARD); String pName( pBMPage->GetName() ); - BOOL bIsMasterPage; + sal_Bool bIsMasterPage; if (bLink) { @@ -636,8 +636,8 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( 0xFFFF, // Aber alle anderen nActualInsertPos, // An Position einfuegen bMergeMasterPages, // MasterPages mitnehmen - FALSE, // Aber nur die benoetigten MasterPages - TRUE, // Undo-Aktion erzeugen + sal_False, // Aber nur die benoetigten MasterPages + sal_True, // Undo-Aktion erzeugen bCopy); // Seiten kopieren (oder mergen) for (nBMSdPage=0; nBMSdPage < nBMSdPageCount; nBMSdPage++) @@ -677,19 +677,19 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( if (nInsertPos >= GetPageCount()) { // Seiten werden hinten angefuegt - bReplace = FALSE; + bReplace = sal_False; nInsertPos = GetPageCount(); } - USHORT nActualInsertPos = nInsertPos; + sal_uInt16 nActualInsertPos = nInsertPos; // Collect the bookmarked pages. ::std::vector<SdPage*> aBookmarkedPages (pBookmarkList->Count(), NULL); - for (USHORT nPos = 0; nPos < pBookmarkList->Count(); nPos++) + for (sal_uInt16 nPos = 0; nPos < pBookmarkList->Count(); nPos++) { String aPgName(*(String*) pBookmarkList->GetObject(nPos)); - BOOL bIsMasterPage; - USHORT nBMPage = pBookmarkDoc->GetPageByName( aPgName, bIsMasterPage ); + sal_Bool bIsMasterPage; + sal_uInt16 nBMPage = pBookmarkDoc->GetPageByName( aPgName, bIsMasterPage ); if (nBMPage != SDRPAGE_NOTFOUND) { @@ -697,10 +697,10 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( } } - for (USHORT nPos = 0; nPos < pBookmarkList->Count(); nPos++) + for (sal_uInt16 nPos = 0; nPos < pBookmarkList->Count(); nPos++) { pBMPage = aBookmarkedPages[nPos]; - USHORT nBMPage = pBMPage!=NULL ? pBMPage->GetPageNum() : SDRPAGE_NOTFOUND; + sal_uInt16 nBMPage = pBMPage!=NULL ? pBMPage->GetPageNum() : SDRPAGE_NOTFOUND; if (pBMPage && pBMPage->GetPageKind()==PK_STANDARD && !pBMPage->IsMasterPage()) { @@ -713,8 +713,8 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( // #67905# don't change name if source and dest model are the same! // #96029# avoid renaming if replacing the same page String aPgName(*(String*) pBookmarkList->GetObject(nPos)); - BOOL bIsMasterPage; - USHORT nPageSameName = GetPageByName(aPgName, bIsMasterPage); + sal_Bool bIsMasterPage; + sal_uInt16 nPageSameName = GetPageByName(aPgName, bIsMasterPage); if( pBookmarkDoc != this && nPageSameName != SDRPAGE_NOTFOUND && ( !bReplace || @@ -734,8 +734,8 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( nBMPage+1, // Bis Seite (Notizen) nActualInsertPos, // An Position einfuegen bMergeMasterPages, // MasterPages mitnehmen - FALSE, // Aber nur die benoetigten MasterPages - TRUE, // Undo-Aktion erzeugen + sal_False, // Aber nur die benoetigten MasterPages + sal_True, // Undo-Aktion erzeugen bCopy); // Seiten kopieren (oder mergen) if( bReplace ) @@ -834,17 +834,17 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( |* DrawingEngine gleiche Praesentationslayouts nicht erkennen kann. |* Ueberzaehlige MasterPages entfernen. \*************************************************************************/ - USHORT nNewMPageCount = GetMasterPageCount(); + sal_uInt16 nNewMPageCount = GetMasterPageCount(); // rueckwaerts, damit Nummern nicht durcheinander geraten - for (USHORT nPage = nNewMPageCount - 1; nPage >= nMPageCount; nPage--) + for (sal_uInt16 nPage = nNewMPageCount - 1; nPage >= nMPageCount; nPage--) { pRefPage = (SdPage*) GetMasterPage(nPage); String aMPLayout(pRefPage->GetLayoutName()); PageKind eKind = pRefPage->GetPageKind(); // gibt's den schon? - for (USHORT nTest = 0; nTest < nMPageCount; nTest++) + for (sal_uInt16 nTest = 0; nTest < nMPageCount; nTest++) { SdPage* pTest = (SdPage*) GetMasterPage(nTest); String aTest(pTest->GetLayoutName()); @@ -870,8 +870,8 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( // #96029# nInsertPos > 2 is always true when inserting into non-empty models if (nInsertPos > 0) { - USHORT nSdPageStart = (nInsertPos - 1) / 2; - USHORT nSdPageEnd = GetSdPageCount(PK_STANDARD) - nSdPageCount + + sal_uInt16 nSdPageStart = (nInsertPos - 1) / 2; + sal_uInt16 nSdPageEnd = GetSdPageCount(PK_STANDARD) - nSdPageCount + nSdPageStart - 1; const bool bRemoveEmptyPresObj = pBookmarkDoc && (pBookmarkDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) && @@ -882,7 +882,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( nSdPageEnd = nSdPageStart + nReplacedStandardPages - 1; } - for (USHORT nSdPage = nSdPageStart; nSdPage <= nSdPageEnd; nSdPage++) + for (sal_uInt16 nSdPage = nSdPageStart; nSdPage <= nSdPageEnd; nSdPage++) { pRefPage = GetSdPage(nSdPage, PK_STANDARD); @@ -916,7 +916,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( if (bScaleObjects) { Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); - pRefPage->ScaleObjects(aSize, aBorderRect, TRUE); + pRefPage->ScaleObjects(aSize, aBorderRect, sal_True); } pRefPage->SetSize(aSize); pRefPage->SetBorder(nLeft, nUpper, nRight, nLower); @@ -935,7 +935,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( if (bScaleObjects) { Rectangle aBorderRect(nNLeft, nNUpper, nNRight, nNLower); - pRefPage->ScaleObjects(aNSize, aBorderRect, TRUE); + pRefPage->ScaleObjects(aNSize, aBorderRect, sal_True); } pRefPage->SetSize(aNSize); @@ -946,7 +946,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( pRefPage->RemoveEmptyPresentationObjects(); } - for (USHORT nPage = nMPageCount; nPage < nNewMPageCount; nPage++) + for (sal_uInt16 nPage = nMPageCount; nPage < nNewMPageCount; nPage++) { pRefPage = (SdPage*) GetMasterPage(nPage); if (pRefPage->GetPageKind() == PK_STANDARD) @@ -954,7 +954,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( if (bScaleObjects) { Rectangle aBorderRect(nLeft, nUpper, nRight, nLower); - pRefPage->ScaleObjects(aSize, aBorderRect, TRUE); + pRefPage->ScaleObjects(aSize, aBorderRect, sal_True); } pRefPage->SetSize(aSize); pRefPage->SetBorder(nLeft, nUpper, nRight, nLower); @@ -965,7 +965,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( if (bScaleObjects) { Rectangle aBorderRect(nNLeft, nNUpper, nNRight, nNLower); - pRefPage->ScaleObjects(aNSize, aBorderRect, TRUE); + pRefPage->ScaleObjects(aNSize, aBorderRect, sal_True); } pRefPage->SetSize(aNSize); pRefPage->SetBorder(nNLeft, nNUpper, nNRight, nNLower); @@ -978,7 +978,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( } // #91146# Make absolutely sure no double masterpages are there - RemoveUnnecessaryMasterPages(NULL, TRUE, TRUE); + RemoveUnnecessaryMasterPages(NULL, sal_True, sal_True); if( bUndo ) EndUndo(); @@ -993,15 +993,15 @@ BOOL SdDrawDocument::InsertBookmarkAsPage( |* \************************************************************************/ -BOOL SdDrawDocument::InsertBookmarkAsObject( +sal_Bool SdDrawDocument::InsertBookmarkAsObject( List* pBookmarkList, List* pExchangeList, // Liste der zu verwendenen Namen - BOOL /* bLink */, + sal_Bool /* bLink */, ::sd::DrawDocShell* pBookmarkDocSh, Point* pObjPos) { - BOOL bOK = TRUE; - BOOL bOLEObjFound = FALSE; + sal_Bool bOK = sal_True; + sal_Bool bOLEObjFound = sal_False; ::sd::View* pBMView = NULL; SdDrawDocument* pBookmarkDoc = NULL; @@ -1023,7 +1023,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject( } else { - return FALSE; + return sal_False; } if (!pBookmarkList) @@ -1037,7 +1037,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject( SdrPage* pPage; SdrPageView* pPV; - for (USHORT nPos = 0; nPos < pBookmarkList->Count(); nPos++) + for (sal_uInt16 nPos = 0; nPos < pBookmarkList->Count(); nPos++) { /****************************************************************** * Namen der Bookmarks aus Liste holen @@ -1053,7 +1053,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject( if (pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_OLE2) { - bOLEObjFound = TRUE; + bOLEObjFound = sal_True; } if (!pBMView) @@ -1076,7 +1076,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject( pPV = pBMView->ShowSdrPage(pPage); } - pBMView->MarkObj(pObj, pPV, FALSE); + pBMView->MarkObj(pObj, pPV, sal_False); } } } @@ -1123,7 +1123,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject( aObjPos = Rectangle(Point(), pPage->GetSize()).Center(); } - ULONG nCountBefore = 0; + sal_uLong nCountBefore = 0; if (pExchangeList) { @@ -1133,13 +1133,13 @@ BOOL SdDrawDocument::InsertBookmarkAsObject( } if (bOLEObjFound) - pBMView->GetDoc()->SetAllocDocSh(TRUE); + pBMView->GetDoc()->SetAllocDocSh(sal_True); SdDrawDocument* pTmpDoc = (SdDrawDocument*) pBMView->GetAllMarkedModel(); bOK = pView->Paste(*pTmpDoc, aObjPos, pPage); if (bOLEObjFound) - pBMView->GetDoc()->SetAllocDocSh(FALSE); + pBMView->GetDoc()->SetAllocDocSh(sal_False); if (!bOLEObjFound) delete pTmpDoc; // Wird ansonsten von der DocShell zerstoert @@ -1151,9 +1151,9 @@ BOOL SdDrawDocument::InsertBookmarkAsObject( if (pExchangeList) { // Anzahl Objekte nach dem Einfuegen bestimmen - ULONG nCount = pPage->GetObjCount(); + sal_uLong nCount = pPage->GetObjCount(); - for (ULONG nObj = nCountBefore; nObj < nCount; nObj++) + for (sal_uLong nObj = nCountBefore; nObj < nCount; nObj++) { // Zuverwendener Name aus Exchange-Liste holen if (pExchangeList->GetCurObject()) @@ -1225,7 +1225,7 @@ void SdDrawDocument::DisposeLoadedModels() FASTBOOL SdDrawDocument::IsReadOnly() const { - return FALSE; + return sal_False; } @@ -1236,7 +1236,7 @@ FASTBOOL SdDrawDocument::IsReadOnly() const |* \************************************************************************/ -void SdDrawDocument::SetAllocDocSh(BOOL bAlloc) +void SdDrawDocument::SetAllocDocSh(sal_Bool bAlloc) { mbAllocDocSh = bAlloc; @@ -1254,7 +1254,7 @@ void SdDrawDocument::SetAllocDocSh(BOOL bAlloc) |* \************************************************************************/ -List* SdDrawDocument::GetCustomShowList(BOOL bCreate) +List* SdDrawDocument::GetCustomShowList(sal_Bool bCreate) { if (!mpCustomShowList && bCreate) { @@ -1330,9 +1330,9 @@ SvStream* SdDrawDocument::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) if( pRet ) { // try to get some information from stream - const ULONG nStartPos = pRet->Tell(); - const ULONG nEndPos = pRet->Seek( STREAM_SEEK_TO_END ); - const ULONG nStmLen = nEndPos - nStartPos; + const sal_uLong nStartPos = pRet->Tell(); + const sal_uLong nEndPos = pRet->Seek( STREAM_SEEK_TO_END ); + const sal_uLong nStmLen = nEndPos - nStartPos; sal_uChar aTestByte; // try to read one byte @@ -1353,13 +1353,13 @@ SvStream* SdDrawDocument::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) |* \************************************************************************/ -void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnlyDuplicatePages, BOOL bUndo) +void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, sal_Bool bOnlyDuplicatePages, sal_Bool bUndo) { ::sd::View* pView = NULL; - SfxUndoManager* pUndoMgr = NULL; + ::svl::IUndoManager* pUndoMgr = NULL; if( bUndo && !IsUndoEnabled() ) - bUndo = FALSE; + bUndo = sal_False; if (mpDocSh) { @@ -1372,7 +1372,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnl /*********************************************************** * Alle MasterPages pruefen ***********************************************************/ - USHORT nSdMasterPageCount = GetMasterSdPageCount( PK_STANDARD ); + sal_uInt16 nSdMasterPageCount = GetMasterSdPageCount( PK_STANDARD ); for (sal_Int32 nMPage = nSdMasterPageCount - 1; nMPage >= 0; nMPage--) { SdPage* pMaster = pMasterPage; @@ -1380,12 +1380,12 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnl if (!pMaster) { - pMaster = (SdPage*) GetMasterSdPage( (USHORT) nMPage, PK_STANDARD ); - pNotesMaster = (SdPage*) GetMasterSdPage( (USHORT) nMPage, PK_NOTES ); + pMaster = (SdPage*) GetMasterSdPage( (sal_uInt16) nMPage, PK_STANDARD ); + pNotesMaster = (SdPage*) GetMasterSdPage( (sal_uInt16) nMPage, PK_NOTES ); } else { - for ( USHORT nMPg = 0; nMPg < GetMasterPageCount(); nMPg++ ) + for ( sal_uInt16 nMPg = 0; nMPg < GetMasterPageCount(); nMPg++ ) { if ( pMaster == GetMasterPage( nMPg ) ) { @@ -1402,21 +1402,21 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnl pNotesMaster ) { // Do not delete master pages that have their precious flag set. - BOOL bDeleteMaster = !pMaster->IsPrecious(); + sal_Bool bDeleteMaster = !pMaster->IsPrecious(); String aLayoutName = pMaster->GetLayoutName(); if(bOnlyDuplicatePages ) { // remove only duplicate pages - bDeleteMaster = FALSE; - for (USHORT i = 0; i < GetMasterSdPageCount( PK_STANDARD ); i++) + bDeleteMaster = sal_False; + for (sal_uInt16 i = 0; i < GetMasterSdPageCount( PK_STANDARD ); i++) { SdPage* pMPg = (SdPage*) GetMasterSdPage( i, PK_STANDARD ); if( pMPg != pMaster && pMPg->GetLayoutName() == aLayoutName ) { // duplicate page found -> remove it - bDeleteMaster = TRUE; + bDeleteMaster = sal_True; } } } @@ -1461,15 +1461,15 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnl EndUndo(); // schon hier, damit sich Joes Actions ZWISCHEN unsere eigenen schieben // alte Layoutvorlagen loeschen, wenn sie nicht mehr benoetigt werden - BOOL bDeleteOldStyleSheets = TRUE; - for ( USHORT nMPg = 0; + sal_Bool bDeleteOldStyleSheets = sal_True; + for ( sal_uInt16 nMPg = 0; nMPg < GetMasterPageCount() && bDeleteOldStyleSheets; nMPg++ ) { SdPage* pMPg = (SdPage*) GetMasterPage(nMPg); if (pMPg->GetLayoutName() == aLayoutName) { - bDeleteOldStyleSheets = FALSE; + bDeleteOldStyleSheets = sal_False; } } @@ -1516,16 +1516,16 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnl |* Ist rLayoutName leer, so wird die erste MasterPage genommen \************************************************************************/ -void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, +void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, const String& rLayoutName, SdDrawDocument* pSourceDoc, - BOOL bMaster, - BOOL bCheckMasters) + sal_Bool bMaster, + sal_Bool bCheckMasters) { if( mpDocSh ) - mpDocSh->SetWaitCursor( TRUE ); + mpDocSh->SetWaitCursor( sal_True ); - SfxUndoManager* pUndoMgr = mpDocSh->GetUndoManager(); + ::svl::IUndoManager* pUndoMgr = mpDocSh->GetUndoManager(); const bool bUndo = IsUndoEnabled(); @@ -1550,7 +1550,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, if (pSourceDoc) { List* pReplList = NULL; - BOOL bLayoutReloaded = FALSE; // Wurde ex. Layout wieder geladen? + sal_Bool bLayoutReloaded = sal_False; // Wurde ex. Layout wieder geladen? /********************************************************************* |* LayoutName, Page and Notespage @@ -1568,7 +1568,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, aSearchFor.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR )); aSearchFor.Append( String(SdResId(STR_LAYOUT_OUTLINE))) ; - for (USHORT nMP = 0; nMP < pSourceDoc->GetMasterPageCount(); nMP++) + for (sal_uInt16 nMP = 0; nMP < pSourceDoc->GetMasterPageCount(); nMP++) { SdPage* pMP = (SdPage*) pSourceDoc->GetMasterPage(nMP); @@ -1601,7 +1601,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, pUndoMgr->LeaveListAction(); if( mpDocSh ) - mpDocSh->SetWaitCursor( FALSE ); + mpDocSh->SetWaitCursor( sal_False ); DBG_ERROR( "SdDrawDocument::SetMasterPage() failed!" ); @@ -1610,13 +1610,13 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, if (pSourceDoc != this) { - const USHORT nMasterPageCount = GetMasterPageCount(); - for ( USHORT nMPage = 0; nMPage < nMasterPageCount; nMPage++ ) + const sal_uInt16 nMasterPageCount = GetMasterPageCount(); + for ( sal_uInt16 nMPage = 0; nMPage < nMasterPageCount; nMPage++ ) { SdPage* pCheckMaster = (SdPage*)GetMasterPage(nMPage); if( pCheckMaster->GetName() == aNewLayoutName ) { - bLayoutReloaded = TRUE; + bLayoutReloaded = sal_True; break; } } @@ -1647,7 +1647,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, { // Es ist eine gleichnamige Vorlage vorhanden ist: Inhalte ersetzen #ifdef DBG_UTIL - BOOL bTest = + sal_Bool bTest = #endif pMySheet->SetName(pHisSheet->GetName()); DBG_ASSERT(bTest, "StyleSheet-Umbenennung fehlgeschlagen"); @@ -1677,7 +1677,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, pReplData->aNewName = pMySheet->GetName(); String aTemp(pMySheet->GetName()); - USHORT nPos = aTemp.SearchAscii( SD_LT_SEPARATOR ); + sal_uInt16 nPos = aTemp.SearchAscii( SD_LT_SEPARATOR ); aTemp.Erase(0, nPos); aTemp.Insert(aOldLayoutName, 0); pReplData->aName = aTemp; @@ -1707,7 +1707,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, if (rParentOfOld.Len() > 0 && rParentOfNew.Len() == 0) { - for (ULONG i = 0; i < pReplList->Count(); i++) + for (sal_uLong i = 0; i < pReplList->Count(); i++) { StyleReplaceData* pRD = (StyleReplaceData*)pReplList-> GetObject(i); @@ -1732,7 +1732,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, { // UndoAction fuer das Erzeugen und Einfuegen vorn StyleSheets // auf den UndoManager legen - SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction( this, aCreatedStyles, TRUE); + SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction( this, aCreatedStyles, sal_True); pUndoMgr->AddUndoAction(pMovStyles); } } @@ -1761,7 +1761,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, // dagegen ersetzt, so muss vor der Position der alten Masterpage // eingefuegt werden, damit ab jetzt beim Suchen (z. B. SdPage:: // SetPresentationLayout) die neue Masterpage zuerst gefunden wird - USHORT nInsertPos = rOldMaster.GetPageNum(); + sal_uInt16 nInsertPos = rOldMaster.GetPageNum(); BegUndo(); if (!bLayoutReloaded) @@ -1792,7 +1792,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, if (bMaster || bLayoutReloaded) { - for (USHORT nPage = 1; nPage < GetPageCount(); nPage++) + for (sal_uInt16 nPage = 1; nPage < GetPageCount(); nPage++) { pPage = (SdPage*) GetPage(nPage); String aTest = pPage->GetLayoutName(); @@ -1821,7 +1821,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, (this, pPage->IsMasterPage() ? aLayoutName : aOldLayoutName, aLayoutName, - eAutoLayout, eAutoLayout, FALSE, pPage); + eAutoLayout, eAutoLayout, sal_False, pPage); pUndoMgr->AddUndoAction(pPLUndoAction); } pPage->SetPresentationLayout(aLayoutName); @@ -1842,7 +1842,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, rOldMaster.GetUppBorder(), rOldMaster.GetRgtBorder(), rOldMaster.GetLwrBorder()); - pMaster->ScaleObjects(aSize, aBorderRect, TRUE); + pMaster->ScaleObjects(aSize, aBorderRect, sal_True); pMaster->SetSize(aSize); pMaster->SetBorder(rOldMaster.GetLftBorder(), rOldMaster.GetUppBorder(), @@ -1856,7 +1856,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, rOldNotesMaster.GetUppBorder(), rOldNotesMaster.GetRgtBorder(), rOldNotesMaster.GetLwrBorder()); - pNotesMaster->ScaleObjects(aSize, aNotesBorderRect, TRUE); + pNotesMaster->ScaleObjects(aSize, aNotesBorderRect, sal_True); pNotesMaster->SetSize(aSize); pNotesMaster->SetBorder(rOldNotesMaster.GetLftBorder(), rOldNotesMaster.GetUppBorder(), @@ -1890,9 +1890,9 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, \********************************************************************/ String aName = String(SdResId(STR_LAYOUT_DEFAULT_NAME)); String aTest; - BOOL bNotANewName = TRUE; - USHORT nCount = 0; - USHORT nMPgCount = GetMasterPageCount(); + sal_Bool bNotANewName = sal_True; + sal_uInt16 nCount = 0; + sal_uInt16 nMPgCount = GetMasterPageCount(); for (nCount = 0; bNotANewName; nCount++) { @@ -1902,15 +1902,15 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, aTest += String::CreateFromInt32( nCount ); // gibt's schon eine, die so heisst? - bNotANewName = FALSE; - for (USHORT nMPg = 1; nMPg < nMPgCount; nMPg++) + bNotANewName = sal_False; + for (sal_uInt16 nMPg = 1; nMPg < nMPgCount; nMPg++) { const SdrPage* pTest = GetMasterPage(nMPg); String aPageLayoutName(pTest->GetLayoutName()); aPageLayoutName.Erase( aPageLayoutName.SearchAscii( SD_LT_SEPARATOR )); if (aPageLayoutName == aTest) - bNotANewName = TRUE; + bNotANewName = sal_True; } } aName = aTest; @@ -1927,7 +1927,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, if( bUndo ) { - SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction(this, aCreatedStyles, TRUE); + SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction(this, aCreatedStyles, sal_True); pUndoMgr->AddUndoAction(pMovStyles); } @@ -1938,7 +1938,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, if( bUndo ) BegUndo(); - pMaster = (SdPage*) AllocPage(TRUE); + pMaster = (SdPage*) AllocPage(sal_True); pMaster->SetSize(pSelectedPage->GetSize()); pMaster->SetBorder(pSelectedPage->GetLftBorder(), pSelectedPage->GetUppBorder(), @@ -1953,7 +1953,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, pMaster->SetAutoLayout(AUTOLAYOUT_NONE, true, true); - pNotesMaster = (SdPage*) AllocPage(TRUE); + pNotesMaster = (SdPage*) AllocPage(sal_True); pNotesMaster->SetPageKind(PK_NOTES); pNotesMaster->SetSize(pNotes->GetSize()); pNotesMaster->SetBorder(pNotes->GetLftBorder(), @@ -1978,7 +1978,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, List* pPageList = new List; if (bMaster) { - for (USHORT nPage = 1; nPage < GetPageCount(); nPage++) + for (sal_uInt16 nPage = 1; nPage < GetPageCount(); nPage++) { pPage = (SdPage*) GetPage(nPage); const String s(pPage->GetLayoutName()); @@ -2009,7 +2009,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, SdPresentationLayoutUndoAction * pPLUndoAction = new SdPresentationLayoutUndoAction (this, aOldLayoutName, aName, - eOldAutoLayout, eNewAutoLayout, TRUE, + eOldAutoLayout, eNewAutoLayout, sal_True, pPage); pUndoMgr->AddUndoAction(pPLUndoAction); } @@ -2044,14 +2044,14 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum, pUndoMgr->LeaveListAction(); if( mpDocSh ) - mpDocSh->SetWaitCursor( FALSE ); + mpDocSh->SetWaitCursor( sal_False ); } void SdDrawDocument::Merge(SdrModel& rSourceModel, - USHORT nFirstPageNum, USHORT nLastPageNum, - USHORT nDestPos, + sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum, + sal_uInt16 nDestPos, FASTBOOL bMergeMasterPages, FASTBOOL bAllMasterPages, FASTBOOL bUndo, FASTBOOL bTreadSourceAsConst) { diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index a58577458a67..f450441a1f7b 100755 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -151,8 +151,8 @@ void SdDrawDocument::CreateLayoutTemplates() // nicht benutzt, nicht benutzerdefiniert // SB hatte wahrscheinlich Probleme mit SFXSTYLEBIT_AUTO, da dann gar nichts // mehr im Gestalter angezeigt wird. Dieses Problem ist zu 364 j behoben worden - // USHORT nMask = SFXSTYLEBIT_ALL & ~(SFXSTYLEBIT_USED | SFXSTYLEBIT_USERDEF); - USHORT nMask = SFXSTYLEBIT_AUTO; + // sal_uInt16 nMask = SFXSTYLEBIT_ALL & ~(SFXSTYLEBIT_USED | SFXSTYLEBIT_USERDEF); + sal_uInt16 nMask = SFXSTYLEBIT_AUTO; String aName(aStdName); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); @@ -163,7 +163,7 @@ void SdDrawDocument::CreateLayoutTemplates() String aNullStr; ::basegfx::B2DPolyPolygon aNullPolyPolygon; - Color aNullCol(RGB_Color(COL_BLACK)); + Color aNullCol(RGB_Color(COL_DEFAULT_SHAPE_STROKE)); XDash aNullDash; XGradient aNullGrad(aNullCol,RGB_Color(COL_WHITE)); @@ -173,19 +173,20 @@ void SdDrawDocument::CreateLayoutTemplates() // Linienattribute (Extended OutputDevice) rISet.Put(XLineStyleItem(XLINE_SOLID)); - rISet.Put(XLineColorItem(String(), RGB_Color(COL_BLACK))); + rISet.Put(XLineColorItem(String(), RGB_Color(COL_DEFAULT_SHAPE_STROKE))); rISet.Put(XLineWidthItem(0)); rISet.Put(XLineDashItem(pPool,aNullDash)); rISet.Put(XLineStartItem(pPool,aNullPolyPolygon)); rISet.Put(XLineEndItem(pPool,aNullPolyPolygon)); - rISet.Put(XLineStartWidthItem(300)); - rISet.Put(XLineEndWidthItem(300)); + rISet.Put(XLineStartWidthItem(200)); + rISet.Put(XLineEndWidthItem(200)); rISet.Put(XLineStartCenterItem()); rISet.Put(XLineEndCenterItem()); + rISet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_BLOCK)); // Fuellattribute (Extended OutputDevice) rISet.Put(XFillStyleItem(XFILL_SOLID)); - rISet.Put(XFillColorItem(String(), RGB_Color(COL_DEFAULT_SHAPE_FILLING))); // "Blue 8" + rISet.Put(XFillColorItem(String(), RGB_Color(COL_DEFAULT_SHAPE_FILLING))); rISet.Put(XFillGradientItem(pPool,aNullGrad)); rISet.Put(XFillHatchItem(pPool,aNullHatch)); @@ -196,10 +197,10 @@ void SdDrawDocument::CreateLayoutTemplates() rISet.Put(XFillBitmapItem(pPool,aNullBmp)); // Schattenattribute (Drawing Engine) - rISet.Put(SdrShadowItem(FALSE)); + rISet.Put(SdrShadowItem(sal_False)); rISet.Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY))); - rISet.Put(SdrShadowXDistItem(300)); // 3 mm Schattendistanz - rISet.Put(SdrShadowYDistItem(300)); + rISet.Put(SdrShadowXDistItem(200)); // 3 mm Schattendistanz + rISet.Put(SdrShadowYDistItem(200)); Font aLatinFont, aCJKFont, aCTLFont; @@ -230,8 +231,8 @@ void SdDrawDocument::CreateLayoutTemplates() rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ) ); rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ) ); - rISet.Put(SvxContourItem(FALSE, EE_CHAR_OUTLINE )); - rISet.Put(SvxShadowedItem(FALSE, EE_CHAR_SHADOW )); + rISet.Put(SvxContourItem(sal_False, EE_CHAR_OUTLINE )); + rISet.Put(SvxShadowedItem(sal_False, EE_CHAR_SHADOW )); rISet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE)); rISet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE)); rISet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT )); @@ -251,7 +252,7 @@ void SdDrawDocument::CreateLayoutTemplates() rISet.Put( SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL ) ); // #i16874# enable kerning by default but only for new documents - rISet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) ); + rISet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) ); // Bullet // BulletItem und BulletFont fuer Titel und Gliederung @@ -298,7 +299,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(XLineStartWidthItem(700)); pISet->Put(XLineEndWidthItem(300)); - pISet->Put(XLineStartCenterItem(TRUE)); + pISet->Put(XLineStartCenterItem(sal_True)); // ---- Objekt mit Schatten ------------------------------------------- @@ -308,10 +309,10 @@ void SdDrawDocument::CreateLayoutTemplates() pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHSHADOW ); pISet = &pSheet->GetItemSet(); - pISet->Put(SdrShadowItem(TRUE)); + pISet->Put(SdrShadowItem(sal_True)); pISet->Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY))); - pISet->Put(SdrShadowXDistItem(300)); // 3 mm Schattendistanz - pISet->Put(SdrShadowYDistItem(300)); + pISet->Put(SdrShadowXDistItem(200)); // 3 mm Schattendistanz + pISet->Put(SdrShadowYDistItem(200)); // ---- Objekt ohne Fllung ------------------------------------------- @@ -322,6 +323,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet = &pSheet->GetItemSet(); pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XLineColorItem(String(), RGB_Color(COL_BLACK))); // ---- Text ---------------------------------------------------------- @@ -406,7 +408,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(XFillStyleItem(XFILL_SOLID)); pISet->Put(XFillColorItem(String(), RGB_Color(COL_CYAN))); - pISet->Put(SdrShadowItem(TRUE)); + pISet->Put(SdrShadowItem(sal_True)); pISet->Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY))); pISet->Put(SdrShadowXDistItem(200)); // 2 mm Schattendistanz pISet->Put(SdrShadowYDistItem(200)); @@ -430,7 +432,7 @@ void SdDrawDocument::CreateLayoutTemplates() Color aOrange4(255, 204, 153); pISet->Put(XFillColorItem(String(), aOrange4)); - pISet->Put(SdrShadowItem(TRUE)); + pISet->Put(SdrShadowItem(sal_True)); pISet->Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY))); pISet->Put(SdrShadowXDistItem(200)); // 2 mm Schattendistanz pISet->Put(SdrShadowYDistItem(200)); @@ -513,6 +515,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet = &pSheet->GetItemSet(); pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XLineColorItem(String(), RGB_Color(COL_BLACK))); pISet->Put(SvxFontHeightItem(423, 100, EE_CHAR_FONTHEIGHT )); // 12 pt @@ -575,7 +578,7 @@ void SdDrawDocument::CreateDefaultCellStyles() // ---- Default ----------------------------------------------- - USHORT nMask = SFXSTYLEBIT_AUTO; + sal_uInt16 nMask = SFXSTYLEBIT_AUTO; OUString aDefaultCellStyleName( RTL_CONSTASCII_USTRINGPARAM("default") ); @@ -626,8 +629,8 @@ void SdDrawDocument::CreateDefaultCellStyles() // rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ) ); // rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ) ); -// rISet.Put(SvxContourItem(FALSE, EE_CHAR_OUTLINE )); -// rISet.Put(SvxShadowedItem(FALSE, EE_CHAR_SHADOW )); +// rISet.Put(SvxContourItem(sal_False, EE_CHAR_OUTLINE )); +// rISet.Put(SvxShadowedItem(sal_False, EE_CHAR_SHADOW )); // rISet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE)); // rISet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE)); // rISet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT )); @@ -645,7 +648,7 @@ void SdDrawDocument::CreateDefaultCellStyles() rISet.Put( SdrTextLowerDistItem( 130 ) ); rISet.Put( SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL ) ); - rISet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) ); + rISet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) ); rISet.Put( SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP) ); rISet.Put( SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_LEFT) ); @@ -757,11 +760,11 @@ void SdDrawDocument::CreateDefaultCellStyles() |* \************************************************************************/ -USHORT SdDrawDocument::GetMasterPageUserCount(SdrPage* pMaster) const +sal_uInt16 SdDrawDocument::GetMasterPageUserCount(SdrPage* pMaster) const { - USHORT nResult = 0; - USHORT nPage; - USHORT nPageCount = GetPageCount(); + sal_uInt16 nResult = 0; + sal_uInt16 nPage; + sal_uInt16 nPageCount = GetPageCount(); for (nPage = 0; nPage < nPageCount; nPage++) { @@ -805,14 +808,14 @@ void SdDrawDocument::StopOnlineSpelling() |* \************************************************************************/ -void SdDrawDocument::StartOnlineSpelling(BOOL bForceSpelling) +void SdDrawDocument::StartOnlineSpelling(sal_Bool bForceSpelling) { if (mbOnlineSpell && (bForceSpelling || mbInitialOnlineSpellingEnabled) && mpDocSh && !mpDocSh->IsReadOnly() ) { StopOnlineSpelling(); - ::sd::Outliner* pOutl = GetInternalOutliner(TRUE); + ::sd::Outliner* pOutl = GetInternalOutliner(sal_True); Reference< XSpellChecker1 > xSpellChecker( LinguMgr::GetSpellChecker() ); if ( xSpellChecker.is() ) @@ -825,7 +828,7 @@ void SdDrawDocument::StartOnlineSpelling(BOOL bForceSpelling) pOutl->SetDefaultLanguage( meLanguage ); mpOnlineSpellingList = new ShapeList; - USHORT nPage; + sal_uInt16 nPage; for ( nPage = 0; nPage < GetPageCount(); nPage++ ) { @@ -876,14 +879,14 @@ void SdDrawDocument::FillOnlineSpellingList(SdPage* pPage) SdrObjListIter aGroupIter(*((SdrObjGroup*)pObj)->GetSubList(), IM_DEEPNOGROUPS); - BOOL bSubTextObjFound = FALSE; + sal_Bool bSubTextObjFound = sal_False; while (aGroupIter.IsMore() && !bSubTextObjFound) { if (aGroupIter.Next()->GetOutlinerParaObject()) { // Textobjekt im Gruppenobjekt gefunden - bSubTextObjFound = TRUE; + bSubTextObjFound = sal_True; } } @@ -945,7 +948,7 @@ IMPL_LINK(SdDrawDocument, OnlineSpellingHdl, Timer*, EMPTYARG ) else { // Spelling wurde initial durchgefuehrt - mbInitialOnlineSpellingEnabled = FALSE; + mbInitialOnlineSpellingEnabled = sal_False; // Suche beenden StopOnlineSpelling(); @@ -967,14 +970,14 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj) { if (pObj && pObj->GetOutlinerParaObject() /* && pObj != pView->GetTextEditObject() */) { - mbHasOnlineSpellErrors = FALSE; - ::sd::Outliner* pOutl = GetInternalOutliner(TRUE); - pOutl->SetUpdateMode(TRUE); + mbHasOnlineSpellErrors = sal_False; + ::sd::Outliner* pOutl = GetInternalOutliner(sal_True); + pOutl->SetUpdateMode(sal_True); Link aEvtHdl = pOutl->GetStatusEventHdl(); pOutl->SetStatusEventHdl(LINK(this, SdDrawDocument, OnlineSpellEventHdl)); - USHORT nOldOutlMode = pOutl->GetMode(); - USHORT nOutlMode = OUTLINERMODE_TEXTOBJECT; + sal_uInt16 nOldOutlMode = pOutl->GetMode(); + sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT; if (((SdrTextObj*) pObj)->GetObjInventor() == SdrInventor && ((SdrTextObj*) pObj)->GetObjIdentifier() == OBJ_OUTLINETEXT) { @@ -1010,9 +1013,9 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj) } pOutl->SetStatusEventHdl(aEvtHdl); - pOutl->SetUpdateMode(FALSE); + pOutl->SetUpdateMode(sal_False); pOutl->Init( nOldOutlMode ); - mbHasOnlineSpellErrors = FALSE; + mbHasOnlineSpellErrors = sal_False; } } @@ -1057,7 +1060,7 @@ void SdDrawDocument::RemoveObject(SdrObject* pObj, SdPage* /*pPage*/) \************************************************************************/ IMPL_LINK(SdDrawDocument, OnlineSpellEventHdl, EditStatus*, pEditStat) { - ULONG nStat = pEditStat->GetStatusWord(); + sal_uLong nStat = pEditStat->GetStatusWord(); mbHasOnlineSpellErrors = (nStat & EE_STAT_WRONGWORDCHANGED) != 0; return(0); @@ -1075,7 +1078,7 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject* delete mpOnlineSearchItem; mpOnlineSearchItem = NULL; - USHORT nCommand = pInfo->nCommand; + sal_uInt16 nCommand = pInfo->nCommand; if (nCommand == SPELLCMD_IGNOREWORD // #91457# restart when add to dictionary takes place, too. @@ -1083,7 +1086,7 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject* { if(pObj && pOutl && pObj->ISA(SdrTextObj)) { - BOOL bModified(IsChanged()); + sal_Bool bModified(IsChanged()); ((SdrTextObj*)pObj)->SetOutlinerParaObject(pOutl->CreateParaObject()); SetChanged(bModified); pObj->BroadcastObjectChange(); @@ -1108,9 +1111,9 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject* void SdDrawDocument::RestoreLayerNames() { SdrLayerAdmin& rLayerAdmin = GetLayerAdmin(); - USHORT nLayerCount = rLayerAdmin.GetLayerCount(); + sal_uInt16 nLayerCount = rLayerAdmin.GetLayerCount(); - for (USHORT nLayer = 0; nLayer < nLayerCount; nLayer++) + for (sal_uInt16 nLayer = 0; nLayer < nLayerCount; nLayer++) { SdrLayer* pLayer = rLayerAdmin.GetLayer(nLayer); @@ -1148,10 +1151,10 @@ void SdDrawDocument::RestoreLayerNames() |* \************************************************************************/ -String SdDrawDocument::CreatePageNumValue(USHORT nNum) const +String SdDrawDocument::CreatePageNumValue(sal_uInt16 nNum) const { String aPageNumValue; - BOOL bUpper = FALSE; + sal_Bool bUpper = sal_False; switch (mePageNumType) { @@ -1162,7 +1165,7 @@ String SdDrawDocument::CreatePageNumValue(USHORT nNum) const aPageNumValue += (sal_Unicode)(char)((nNum - 1) % 26 + 'a'); break; case SVX_ROMAN_UPPER: - bUpper = TRUE; + bUpper = sal_True; case SVX_ROMAN_LOWER: aPageNumValue += SvxNumberFormat::CreateRomanString(nNum, bUpper); break; @@ -1190,11 +1193,11 @@ String SdDrawDocument::CreatePageNumValue(USHORT nNum) const void SdDrawDocument::RenameLayoutTemplate(const String& rOldLayoutName, const String& rNewName) { String aOldName(rOldLayoutName); - USHORT nPos = aOldName.SearchAscii( SD_LT_SEPARATOR ); + sal_uInt16 nPos = aOldName.SearchAscii( SD_LT_SEPARATOR ); // erase everything after '~LT~' aOldName.Erase(nPos + sizeof(SD_LT_SEPARATOR) - 1 ); - USHORT nLen = aOldName.Len(); + sal_uInt16 nLen = aOldName.Len(); List aReplList; SfxStyleSheetIterator aIter(mxStyleSheetPool.get(), SD_STYLE_FAMILY_MASTERPAGE); @@ -1231,7 +1234,7 @@ void SdDrawDocument::RenameLayoutTemplate(const String& rOldLayoutName, const St // an allen Seiten, die das jetzt umbeannte Layout benutzen, die // Textobjekte von der Aenderung unterrichten und Layoutnamen setzen - USHORT nPage; + sal_uInt16 nPage; for (nPage = 0; nPage < GetPageCount(); nPage++) { SdPage* pPage = (SdPage*) GetPage(nPage); @@ -1241,7 +1244,7 @@ void SdDrawDocument::RenameLayoutTemplate(const String& rOldLayoutName, const St { pPage->SetLayoutName(aPageLayoutName); - for (ULONG nObj = 0; nObj < pPage->GetObjCount(); nObj++) + for (sal_uLong nObj = 0; nObj < pPage->GetObjCount(); nObj++) { SdrObject* pObj = pPage->GetObj(nObj); @@ -1289,7 +1292,7 @@ void SdDrawDocument::RenameLayoutTemplate(const String& rOldLayoutName, const St pPage->SetLayoutName(aPageLayoutName); pPage->SetName(rNewName); - for (ULONG nObj = 0; nObj < pPage->GetObjCount(); nObj++) + for (sal_uLong nObj = 0; nObj < pPage->GetObjCount(); nObj++) { SdrObject* pObj = pPage->GetObj(nObj); @@ -1356,14 +1359,14 @@ void SdDrawDocument::SetTextDefaults() const aNumberFormat.SetStart(1); aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT); - SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10, FALSE); + SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10, sal_False); aNumberFormat.SetLSpace( 0 ); aNumberFormat.SetAbsLSpace( 0 ); aNumberFormat.SetFirstLineOffset( 0 ); aNumRule.SetLevel( 0, aNumberFormat ); - for( USHORT i = 1; i < aNumRule.GetLevelCount(); i++ ) + for( sal_uInt16 i = 1; i < aNumRule.GetLevelCount(); i++ ) { const short nLSpace = (i + 1) * 600; aNumberFormat.SetLSpace(nLSpace); @@ -1492,17 +1495,17 @@ void ModifyGuard::init() mpDocShell = mpDoc->GetDocSh(); } - mbIsEnableSetModified = mpDocShell ? mpDocShell->IsEnableSetModified() : FALSE; - mbIsDocumentChanged = mpDoc ? mpDoc->IsChanged() : FALSE; + mbIsEnableSetModified = mpDocShell ? mpDocShell->IsEnableSetModified() : sal_False; + mbIsDocumentChanged = mpDoc ? mpDoc->IsChanged() : sal_False; if( mbIsEnableSetModified ) - mpDocShell->EnableSetModified( FALSE ); + mpDocShell->EnableSetModified( sal_False ); } ModifyGuard::~ModifyGuard() { if( mbIsEnableSetModified ) - mpDocShell->EnableSetModified( TRUE ); + mpDocShell->EnableSetModified( sal_True ); if( mpDoc && (mpDoc->IsChanged() != mbIsDocumentChanged) ) mpDoc->SetChanged(mbIsDocumentChanged); diff --git a/sd/source/core/drawdoc_animations.cxx b/sd/source/core/drawdoc_animations.cxx index 3a994ffc0655..08e90315f1ca 100644..100755 --- a/sd/source/core/drawdoc_animations.cxx +++ b/sd/source/core/drawdoc_animations.cxx @@ -41,7 +41,7 @@ void SdDrawDocument::ReplacePageInCustomShows( const SdPage* pOldPage, const SdP { if ( mpCustomShowList ) { - for (ULONG i = 0; i < mpCustomShowList->Count(); i++) + for (sal_uLong i = 0; i < mpCustomShowList->Count(); i++) { SdCustomShow* pCustomShow = (SdCustomShow*) mpCustomShowList->GetObject(i); if( pNewPage == 0 ) diff --git a/sd/source/core/glob.src b/sd/source/core/glob.src index f1c7058ddf79..f1c7058ddf79 100755..100644 --- a/sd/source/core/glob.src +++ b/sd/source/core/glob.src diff --git a/sd/source/core/pglink.cxx b/sd/source/core/pglink.cxx index 61988c886feb..4cddca237ff3 100644..100755 --- a/sd/source/core/pglink.cxx +++ b/sd/source/core/pglink.cxx @@ -106,21 +106,21 @@ void SdPageLink::DataChanged( const String& , List aBookmarkList; aBookmarkList.Insert(&aBookmarkName); - USHORT nInsertPos = pPage->GetPageNum(); - BOOL bLink = TRUE; - BOOL bReplace = TRUE; - BOOL bNoDialogs = FALSE; - BOOL bCopy = FALSE; + sal_uInt16 nInsertPos = pPage->GetPageNum(); + sal_Bool bLink = sal_True; + sal_Bool bReplace = sal_True; + sal_Bool bNoDialogs = sal_False; + sal_Bool bCopy = sal_False; if( pDoc->pDocLockedInsertingLinks ) { // resolving links while loading pDoc - bNoDialogs = TRUE; - bCopy = TRUE; + bNoDialogs = sal_True; + bCopy = sal_True; } pDoc->InsertBookmarkAsPage(&aBookmarkList, NULL, bLink, bReplace, - nInsertPos, bNoDialogs, NULL, bCopy, TRUE, TRUE); + nInsertPos, bNoDialogs, NULL, bCopy, sal_True, sal_True); if( !pDoc->pDocLockedInsertingLinks ) pDoc->CloseBookmarkDoc(); diff --git a/sd/source/core/sdattr.cxx b/sd/source/core/sdattr.cxx index 4b394a137d56..130158bfc892 100644..100755 --- a/sd/source/core/sdattr.cxx +++ b/sd/source/core/sdattr.cxx @@ -42,7 +42,7 @@ TYPEINIT1_AUTOFACTORY( DiaEffectItem, SfxEnumItem ); DiaEffectItem::DiaEffectItem( presentation::FadeEffect eFE ) : - SfxEnumItem( ATTR_DIA_EFFECT, (USHORT)eFE ) + SfxEnumItem( ATTR_DIA_EFFECT, (sal_uInt16)eFE ) { } @@ -59,7 +59,7 @@ SfxPoolItem* DiaEffectItem::Clone( SfxItemPool* ) const } -SfxPoolItem* DiaEffectItem::Create( SvStream& rIn, USHORT ) const +SfxPoolItem* DiaEffectItem::Create( SvStream& rIn, sal_uInt16 ) const { return new DiaEffectItem( rIn ); } @@ -73,7 +73,7 @@ TYPEINIT1_AUTOFACTORY( DiaSpeedItem, SfxEnumItem ); DiaSpeedItem::DiaSpeedItem( FadeSpeed eFS ) : - SfxEnumItem( ATTR_DIA_SPEED, (USHORT)eFS ) + SfxEnumItem( ATTR_DIA_SPEED, (sal_uInt16)eFS ) { } @@ -90,7 +90,7 @@ SfxPoolItem* DiaSpeedItem::Clone( SfxItemPool* ) const } -SfxPoolItem* DiaSpeedItem::Create( SvStream& rIn, USHORT ) const +SfxPoolItem* DiaSpeedItem::Create( SvStream& rIn, sal_uInt16 ) const { return new DiaSpeedItem( rIn ); } @@ -103,7 +103,7 @@ SfxPoolItem* DiaSpeedItem::Create( SvStream& rIn, USHORT ) const TYPEINIT1_AUTOFACTORY( DiaAutoItem, SfxEnumItem ); DiaAutoItem::DiaAutoItem( PresChange eChange ) : - SfxEnumItem( ATTR_DIA_AUTO, (USHORT)eChange ) + SfxEnumItem( ATTR_DIA_AUTO, (sal_uInt16)eChange ) { } @@ -120,7 +120,7 @@ SfxPoolItem* DiaAutoItem::Clone( SfxItemPool* ) const } -SfxPoolItem* DiaAutoItem::Create( SvStream& rIn, USHORT ) const +SfxPoolItem* DiaAutoItem::Create( SvStream& rIn, sal_uInt16 ) const { return new DiaAutoItem( rIn ); } @@ -133,7 +133,7 @@ SfxPoolItem* DiaAutoItem::Create( SvStream& rIn, USHORT ) const TYPEINIT1_AUTOFACTORY( DiaTimeItem, SfxUInt32Item ); -DiaTimeItem::DiaTimeItem( UINT32 nValue ) : +DiaTimeItem::DiaTimeItem( sal_uInt32 nValue ) : SfxUInt32Item( ATTR_DIA_TIME, nValue ) { } diff --git a/sd/source/core/sdiocmpt.cxx b/sd/source/core/sdiocmpt.cxx index 5231aaf261ba..84a2e1517ace 100644..100755 --- a/sd/source/core/sdiocmpt.cxx +++ b/sd/source/core/sdiocmpt.cxx @@ -35,12 +35,12 @@ ////////////////////////////////////////////////////////////////////////////// -old_SdrDownCompat::old_SdrDownCompat(SvStream& rNewStream, UINT16 nNewMode) +old_SdrDownCompat::old_SdrDownCompat(SvStream& rNewStream, sal_uInt16 nNewMode) : rStream(rNewStream), nSubRecSiz(0), nSubRecPos(0), nMode(nNewMode), - bOpen(FALSE) + bOpen(sal_False) { OpenSubRecord(); } @@ -77,7 +77,7 @@ void old_SdrDownCompat::OpenSubRecord() Write(); } - bOpen = TRUE; + bOpen = sal_True; } void old_SdrDownCompat::CloseSubRecord() @@ -85,11 +85,11 @@ void old_SdrDownCompat::CloseSubRecord() if(rStream.GetError()) return; - UINT32 nAktPos(rStream.Tell()); + sal_uInt32 nAktPos(rStream.Tell()); if(nMode == STREAM_READ) { - UINT32 nReadAnz(nAktPos - nSubRecPos); + sal_uInt32 nReadAnz(nAktPos - nSubRecPos); if(nReadAnz != nSubRecSiz) { rStream.Seek(nSubRecPos + nSubRecSiz); @@ -103,7 +103,7 @@ void old_SdrDownCompat::CloseSubRecord() rStream.Seek(nAktPos); } - bOpen = FALSE; + bOpen = sal_False; } /************************************************************************* @@ -112,7 +112,7 @@ void old_SdrDownCompat::CloseSubRecord() |* \************************************************************************/ -SdIOCompat::SdIOCompat(SvStream& rNewStream, USHORT nNewMode, UINT16 nVer) +SdIOCompat::SdIOCompat(SvStream& rNewStream, sal_uInt16 nNewMode, sal_uInt16 nVer) : old_SdrDownCompat(rNewStream, nNewMode), nVersion(nVer) { if (nNewMode == STREAM_WRITE) diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index e045437d37b1..879f5505b8cc 100755 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -99,20 +99,20 @@ TYPEINIT2( SdPage, FmFormPage, SdrObjUserCall ); |* \************************************************************************/ -SdPage::SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, BOOL bMasterPage) +SdPage::SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, sal_Bool bMasterPage) : FmFormPage(rNewDoc, pBasic, bMasterPage) , SdrObjUserCall() , mePageKind(PK_STANDARD) , meAutoLayout(AUTOLAYOUT_NONE) -, mbSelected(FALSE) +, mbSelected(sal_False) , mePresChange(PRESCHANGE_MANUAL) , mnTime(1) -, mbSoundOn(FALSE) -, mbExcluded(FALSE) -, mbLoopSound(FALSE) -, mbStopSound(FALSE) -, mbScaleObjects(TRUE) -, mbBackgroundFullSize( FALSE ) +, mbSoundOn(sal_False) +, mbExcluded(sal_False) +, mbLoopSound(sal_False) +, mbStopSound(sal_False) +, mbScaleObjects(sal_True) +, mbBackgroundFullSize( sal_False ) , meCharSet(gsl_getSystemTextEncoding()) , mnPaperBin(PAPERBIN_PRINTER_SETTINGS) , mpPageLink(NULL) @@ -196,7 +196,7 @@ SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex, bool bFuzzySearc case PRESOBJ_CALC: case PRESOBJ_IMAGE: case PRESOBJ_MEDIA: - bFound = TRUE; + bFound = sal_True; break; default: break; @@ -249,10 +249,10 @@ void SdPage::EnsureMasterPageDefaultBackground() /** creates a presentation object with the given PresObjKind on this page. A user call will be set */ -SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rectangle& rRect, BOOL /* bInsert */ ) +SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, sal_Bool bVertical, const Rectangle& rRect, sal_Bool /* bInsert */ ) { - sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0; - const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted(); + ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0; + const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted(); SdrObject* pSdrObj = NULL; @@ -267,7 +267,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec if (mbMaster) { - pSdrObj->SetNotVisibleAsMaster(TRUE); + pSdrObj->SetNotVisibleAsMaster(sal_True); } } break; @@ -278,7 +278,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec if (mbMaster) { - pSdrObj->SetNotVisibleAsMaster(TRUE); + pSdrObj->SetNotVisibleAsMaster(sal_True); } } break; @@ -289,7 +289,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec if (mbMaster) { - pSdrObj->SetNotVisibleAsMaster(TRUE); + pSdrObj->SetNotVisibleAsMaster(sal_True); } } break; @@ -365,7 +365,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec // #i105146# We want no content to be displayed for PK_HANDOUT, // so just never set a page as content pSdrObj = new SdrPageObj(0); -// pSdrObj->SetResizeProtect(TRUE); +// pSdrObj->SetResizeProtect(sal_True); } break; @@ -389,7 +389,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec pSdrObj = new SdrPageObj(); } - pSdrObj->SetResizeProtect(TRUE); + pSdrObj->SetResizeProtect(sal_True); } break; @@ -419,7 +419,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec // #96243# Tell the object EARLY that it is vertical to have the // defaults for AutoGrowWidth/Height reversed if(bVertical) - ((SdrTextObj*)pSdrObj)->SetVerticalWriting(TRUE); + ((SdrTextObj*)pSdrObj)->SetVerticalWriting(sal_True); SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() ); if( bVertical ) @@ -435,9 +435,9 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec // #96243# potential problem: This action was still NOT // adapted for vertical text. This sure needs to be done. if(bVertical) - aTempAttr.Put(SdrTextAutoGrowWidthItem(FALSE)); + aTempAttr.Put(SdrTextAutoGrowWidthItem(sal_False)); else - aTempAttr.Put(SdrTextAutoGrowHeightItem(FALSE)); + aTempAttr.Put(SdrTextAutoGrowHeightItem(sal_False)); } // check if we need another vertical adjustement than the default @@ -465,7 +465,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec { SdrOutliner* pOutliner = ( (SdDrawDocument*) GetModel() )->GetInternalOutliner(); - USHORT nOutlMode = pOutliner->GetMode(); + sal_uInt16 nOutlMode = pOutliner->GetMode(); pOutliner->Init( OUTLINERMODE_TEXTOBJECT ); pOutliner->SetStyleSheet( 0, NULL ); pOutliner->SetVertical( bVertical ); @@ -511,22 +511,22 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec // Hintergrundobjekte der MasterPage pSdrObj->SetLayer( rLayerAdmin. - GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE) ); + GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False) ); } // Objekt am StyleSheet anmelden // #95114# Set style only when one was found (as in 5.2) - // pSdrObj->NbcSetStyleSheet( GetStyleSheetForPresObj(eObjKind), FALSE ); + // pSdrObj->NbcSetStyleSheet( GetStyleSheetForPresObj(eObjKind), sal_False ); if( mePageKind != PK_HANDOUT ) { SfxStyleSheet* pSheetForPresObj = GetStyleSheetForPresObj(eObjKind); if(pSheetForPresObj) - pSdrObj->SetStyleSheet(pSheetForPresObj, FALSE); + pSdrObj->SetStyleSheet(pSheetForPresObj, sal_False); } if (eObjKind == PRESOBJ_OUTLINE) { - for (USHORT nLevel = 1; nLevel < 10; nLevel++) + for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++) { String aName(maLayoutName); aName += sal_Unicode( ' ' ); @@ -545,7 +545,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec eObjKind == PRESOBJ_GRAPHIC ) { SfxItemSet aSet( ((SdDrawDocument*) pModel)->GetPool() ); - aSet.Put( SdrTextContourFrameItem( TRUE ) ); + aSet.Put( SdrTextContourFrameItem( sal_True ) ); aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) ); pSdrObj->SetMergedItemSet(aSet); @@ -582,7 +582,7 @@ SfxStyleSheet* SdPage::GetStyleSheetForMasterPageBackground() const { String aName(GetLayoutName()); String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR )); - USHORT nPos = aName.Search(aSep); + sal_uInt16 nPos = aName.Search(aSep); if (nPos != STRING_NOTFOUND) { @@ -601,7 +601,7 @@ SfxStyleSheet* SdPage::GetStyleSheetForPresObj(PresObjKind eObjKind) const { String aName(GetLayoutName()); String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR )); - USHORT nPos = aName.Search(aSep); + sal_uInt16 nPos = aName.Search(aSep); if (nPos != STRING_NOTFOUND) { nPos = nPos + aSep.Len(); @@ -716,10 +716,10 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectang { if( pObj->GetUserCall() ) { - sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0; - const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted(); + ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0; + const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted(); /* - DBG_ASSERT( bUndo || (pUndoManager && pUndoManager->isInUndo()), + DBG_ASSERT( bUndo || (pUndoManager && pUndoManager->IsDoing()), "SdPage::Changed(), model change without undo!?" ); */ if( bUndo ) @@ -733,9 +733,9 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectang { // MasterPage-Objekt wurde veraendert, daher // Objekte auf allen Seiten anpassen - USHORT nPageCount = ((SdDrawDocument*) pModel)->GetSdPageCount(mePageKind); + sal_uInt16 nPageCount = ((SdDrawDocument*) pModel)->GetSdPageCount(mePageKind); - for (USHORT i = 0; i < nPageCount; i++) + for (sal_uInt16 i = 0; i < nPageCount; i++) { SdPage* pLoopPage = ((SdDrawDocument*) pModel)->GetSdPage(i, mePageKind); @@ -765,10 +765,10 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectang |* \************************************************************************/ -void SdPage::CreateTitleAndLayout(BOOL bInit, BOOL bCreate ) +void SdPage::CreateTitleAndLayout(sal_Bool bInit, sal_Bool bCreate ) { - sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0; - const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted(); + ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0; + const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted(); SdPage* pMasterPage = this; @@ -814,7 +814,7 @@ void SdPage::CreateTitleAndLayout(BOOL bInit, BOOL bCreate ) while( iter != aAreas.end() ) { - SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, FALSE, (*iter++), TRUE) ); + SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, sal_False, (*iter++), sal_True) ); // #i105146# We want no content to be displayed for PK_HANDOUT, // so just never set a page as content pPageObj->SetReferencedPage(0L); @@ -866,17 +866,17 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert) if( eObjKind == PRESOBJ_TITLE ) { Rectangle aTitleRect( GetTitleRect() ); - return CreatePresObj(PRESOBJ_TITLE, FALSE, aTitleRect, bInsert); + return CreatePresObj(PRESOBJ_TITLE, sal_False, aTitleRect, bInsert); } else if( eObjKind == PRESOBJ_OUTLINE ) { Rectangle aLayoutRect( GetLayoutRect() ); - return CreatePresObj( PRESOBJ_OUTLINE, FALSE, aLayoutRect, bInsert); + return CreatePresObj( PRESOBJ_OUTLINE, sal_False, aLayoutRect, bInsert); } else if( eObjKind == PRESOBJ_NOTES ) { Rectangle aLayoutRect( GetLayoutRect() ); - return CreatePresObj( PRESOBJ_NOTES, FALSE, aLayoutRect, bInsert); + return CreatePresObj( PRESOBJ_NOTES, sal_False, aLayoutRect, bInsert); } else if( (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_DATETIME) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_HEADER ) ) { @@ -901,21 +901,21 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert) Point aPos( long(nLftBorder+(aPageSize.Width()*0.05)), Y ); Size aSize( W1, H ); Rectangle aRect( aPos, aSize ); - return CreatePresObj( PRESOBJ_DATETIME, FALSE, aRect, bInsert ); + return CreatePresObj( PRESOBJ_DATETIME, sal_False, aRect, bInsert ); } else if( eObjKind == PRESOBJ_FOOTER ) { Point aPos( long(nLftBorder+ aPageSize.Width() * 0.342), Y ); Size aSize( W2, H ); Rectangle aRect( aPos, aSize ); - return CreatePresObj( PRESOBJ_FOOTER, FALSE, aRect, bInsert ); + return CreatePresObj( PRESOBJ_FOOTER, sal_False, aRect, bInsert ); } else if( eObjKind == PRESOBJ_SLIDENUMBER ) { Point aPos( long(nLftBorder+(aPageSize.Width()*0.717)), Y ); Size aSize( W1, H ); Rectangle aRect( aPos, aSize ); - return CreatePresObj( PRESOBJ_SLIDENUMBER, FALSE, aRect, bInsert ); + return CreatePresObj( PRESOBJ_SLIDENUMBER, sal_False, aRect, bInsert ); } else { @@ -946,25 +946,25 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert) { Point aPos( X1, Y1 ); Rectangle aRect( aPos, aSize ); - return CreatePresObj( PRESOBJ_HEADER, FALSE, aRect, bInsert ); + return CreatePresObj( PRESOBJ_HEADER, sal_False, aRect, bInsert ); } else if( eObjKind == PRESOBJ_DATETIME ) { Point aPos( X2, Y1 ); Rectangle aRect( aPos, aSize ); - return CreatePresObj( PRESOBJ_DATETIME, FALSE, aRect, bInsert ); + return CreatePresObj( PRESOBJ_DATETIME, sal_False, aRect, bInsert ); } else if( eObjKind == PRESOBJ_FOOTER ) { Point aPos( X1, Y2 ); Rectangle aRect( aPos, aSize ); - return CreatePresObj( PRESOBJ_FOOTER, FALSE, aRect, bInsert ); + return CreatePresObj( PRESOBJ_FOOTER, sal_False, aRect, bInsert ); } else if( eObjKind == PRESOBJ_SLIDENUMBER ) { Point aPos( X2, Y2 ); Rectangle aRect( aPos, aSize ); - return CreatePresObj( PRESOBJ_SLIDENUMBER, FALSE, aRect, bInsert ); + return CreatePresObj( PRESOBJ_SLIDENUMBER, sal_False, aRect, bInsert ); } DBG_ERROR("SdPage::CreateDefaultPresObj() - this should not happen!"); @@ -1299,7 +1299,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe break; case 6: // title, 4 shapes { - ULONG nX = long (aLayoutPos.X()); + sal_uLong nX = long (aLayoutPos.X()); aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477); aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488); @@ -1359,7 +1359,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe } case 11: // title, 6 shapes { - ULONG nX = long (aLayoutPos.X()); + sal_uLong nX = long (aLayoutPos.X()); aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477); aLayoutSize.Width() = long (aLayoutSize.Width() * 0.322); @@ -1548,14 +1548,14 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto } } -void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate ) +void SdPage::SetAutoLayout(AutoLayout eLayout, sal_Bool bInit, sal_Bool bCreate ) { sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement ); const bool bSwitchLayout = eLayout != GetAutoLayout(); - sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0; - const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted(); + ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0; + const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted(); meAutoLayout = eLayout; @@ -1635,7 +1635,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate ) |* \************************************************************************/ -void SdPage::NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason) +void SdPage::NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason) { FmFormPage::NbcInsertObject(pObj, nPos, pReason); @@ -1660,7 +1660,7 @@ void SdPage::NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* |* \************************************************************************/ -SdrObject* SdPage::RemoveObject(ULONG nObjNum) +SdrObject* SdPage::RemoveObject(sal_uLong nObjNum) { onRemoveObject(GetObj( nObjNum )); return FmFormPage::RemoveObject(nObjNum); @@ -1672,7 +1672,7 @@ SdrObject* SdPage::RemoveObject(ULONG nObjNum) |* \************************************************************************/ -SdrObject* SdPage::NbcRemoveObject(ULONG nObjNum) +SdrObject* SdPage::NbcRemoveObject(sal_uLong nObjNum) { onRemoveObject(GetObj( nObjNum )); return FmFormPage::NbcRemoveObject(nObjNum); @@ -1680,7 +1680,7 @@ SdrObject* SdPage::NbcRemoveObject(ULONG nObjNum) // #95876# Also overload ReplaceObject methods to realize when // objects are removed with this mechanism instead of RemoveObject -SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, ULONG nObjNum) +SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum) { onRemoveObject(GetObj( nObjNum )); return FmFormPage::NbcReplaceObject(pNewObj, nObjNum); @@ -1688,7 +1688,7 @@ SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, ULONG nObjNum) // #95876# Also overload ReplaceObject methods to realize when // objects are removed with this mechanism instead of RemoveObject -SdrObject* SdPage::ReplaceObject(SdrObject* pNewObj, ULONG nObjNum) +SdrObject* SdPage::ReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum) { onRemoveObject(GetObj( nObjNum )); return FmFormPage::ReplaceObject(pNewObj, nObjNum); @@ -1748,7 +1748,7 @@ void SdPage::SetSize(const Size& aSize) |* \************************************************************************/ -void SdPage::SetBorder(INT32 nLft, INT32 nUpp, INT32 nRgt, INT32 nLwr) +void SdPage::SetBorder(sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, sal_Int32 nLwr) { if (nLft != GetLftBorder() || nUpp != GetUppBorder() || nRgt != GetRgtBorder() || nLwr != GetLwrBorder() ) @@ -1764,7 +1764,7 @@ void SdPage::SetBorder(INT32 nLft, INT32 nUpp, INT32 nRgt, INT32 nLwr) |* \************************************************************************/ -void SdPage::SetLftBorder(INT32 nBorder) +void SdPage::SetLftBorder(sal_Int32 nBorder) { if (nBorder != GetLftBorder() ) { @@ -1779,7 +1779,7 @@ void SdPage::SetLftBorder(INT32 nBorder) |* \************************************************************************/ -void SdPage::SetRgtBorder(INT32 nBorder) +void SdPage::SetRgtBorder(sal_Int32 nBorder) { if (nBorder != GetRgtBorder() ) { @@ -1794,7 +1794,7 @@ void SdPage::SetRgtBorder(INT32 nBorder) |* \************************************************************************/ -void SdPage::SetUppBorder(INT32 nBorder) +void SdPage::SetUppBorder(sal_Int32 nBorder) { if (nBorder != GetUppBorder() ) { @@ -1809,7 +1809,7 @@ void SdPage::SetUppBorder(INT32 nBorder) |* \************************************************************************/ -void SdPage::SetLwrBorder(INT32 nBorder) +void SdPage::SetLwrBorder(sal_Int32 nBorder) { if (nBorder != GetLwrBorder() ) { @@ -1823,7 +1823,7 @@ void SdPage::SetLwrBorder(INT32 nBorder) |* \************************************************************************/ -void SdPage::SetBackgroundFullSize( BOOL bIn ) +void SdPage::SetBackgroundFullSize( sal_Bool bIn ) { if( bIn != mbBackgroundFullSize ) { @@ -1842,7 +1842,7 @@ void SdPage::SetBackgroundFullSize( BOOL bIn ) |* \************************************************************************/ -void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderRect, BOOL bScaleAllObj) +void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderRect, sal_Bool bScaleAllObj) { sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement ); @@ -1850,10 +1850,10 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR SdrObject* pObj = NULL; Point aRefPnt(0, 0); Size aNewPageSize(rNewPageSize); - INT32 nLeft = rNewBorderRect.Left(); - INT32 nRight = rNewBorderRect.Right(); - INT32 nUpper = rNewBorderRect.Top(); - INT32 nLower = rNewBorderRect.Bottom(); + sal_Int32 nLeft = rNewBorderRect.Left(); + sal_Int32 nRight = rNewBorderRect.Right(); + sal_Int32 nUpper = rNewBorderRect.Top(); + sal_Int32 nLower = rNewBorderRect.Bottom(); // Negative Werte stehen fuer nicht zu aendernde Werte // -> aktuelle Werte verwenden @@ -1900,11 +1900,11 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR Fraction aFractX = Fraction(aNewPageSize.Width(), nOldWidth); Fraction aFractY = Fraction(aNewPageSize.Height(), nOldHeight); - ULONG nObjCnt = (mbScaleObjects ? GetObjCount() : 0); + sal_uLong nObjCnt = (mbScaleObjects ? GetObjCount() : 0); - for (ULONG nObj = 0; nObj < nObjCnt; nObj++) + for (sal_uLong nObj = 0; nObj < nObjCnt; nObj++) { - BOOL bIsPresObjOnMaster = FALSE; + sal_Bool bIsPresObjOnMaster = sal_False; // Alle Objekte pObj = GetObj(nObj); @@ -1912,7 +1912,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR if (mbMaster && IsPresObj(pObj)) { // Es ist ein Praesentationsobjekt auf der MasterPage - bIsPresObjOnMaster = TRUE; + bIsPresObjOnMaster = sal_True; } if (pObj) @@ -1942,9 +1942,9 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR /********************************************************** * Praesentationsvorlage: Texthoehe anpassen **********************************************************/ - USHORT nIndexTitle = 0; - USHORT nIndexOutline = 0; - USHORT nIndexNotes = 0; + sal_uInt16 nIndexTitle = 0; + sal_uInt16 nIndexOutline = 0; + sal_uInt16 nIndexNotes = 0; if (pObj == GetPresObj(PRESOBJ_TITLE, nIndexTitle)) { @@ -1955,7 +1955,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR SfxItemSet& rSet = pTitleSheet->GetItemSet(); SvxFontHeightItem& rOldHgt = (SvxFontHeightItem&) rSet.Get(EE_CHAR_FONTHEIGHT); - ULONG nFontHeight = rOldHgt.GetHeight(); + sal_uLong nFontHeight = rOldHgt.GetHeight(); nFontHeight = long(nFontHeight * (double) aFractY); rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT)); @@ -1983,7 +1983,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR String aName(GetLayoutName()); aName += sal_Unicode( ' ' ); - for (USHORT i=1; i<=9; i++) + for (sal_uInt16 i=1; i<=9; i++) { String sLayoutName(aName); sLayoutName += String::CreateFromInt32( (sal_Int32)i ); @@ -1995,7 +1995,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR SfxItemSet aTempSet(pOutlineSheet->GetItemSet()); SvxFontHeightItem& rOldHgt = (SvxFontHeightItem&) aTempSet.Get(EE_CHAR_FONTHEIGHT); - ULONG nFontHeight = rOldHgt.GetHeight(); + sal_uLong nFontHeight = rOldHgt.GetHeight(); nFontHeight = long(nFontHeight * (double) aFractY); aTempSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT)); @@ -2016,7 +2016,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR } // Bullet anpassen - ((SdStyleSheet*) pOutlineSheet)->AdjustToFontHeight(aTempSet, FALSE); + ((SdStyleSheet*) pOutlineSheet)->AdjustToFontHeight(aTempSet, sal_False); // Sonderbehandlung: die INVALIDS auf NULL-Pointer // zurueckgesetzen (sonst landen INVALIDs oder @@ -2045,8 +2045,8 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR if (pNotesSheet) { - ULONG nHeight = pObj->GetLogicRect().GetSize().Height(); - ULONG nFontHeight = (ULONG) (nHeight * 0.0741); + sal_uLong nHeight = pObj->GetLogicRect().GetSize().Height(); + sal_uLong nFontHeight = (sal_uLong) (nHeight * 0.0741); SfxItemSet& rSet = pNotesSheet->GetItemSet(); rSet.Put( SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT )); rSet.Put( SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CJK )); @@ -2063,8 +2063,8 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR /****************************************************** * Normales Textobjekt: Texthoehe anpassen ******************************************************/ - ULONG nScriptType = pObj->GetOutlinerParaObject()->GetTextObject().GetScriptType(); - USHORT nWhich = EE_CHAR_FONTHEIGHT; + sal_uLong nScriptType = pObj->GetOutlinerParaObject()->GetTextObject().GetScriptType(); + sal_uInt16 nWhich = EE_CHAR_FONTHEIGHT; if ( nScriptType == SCRIPTTYPE_ASIAN ) nWhich = EE_CHAR_FONTHEIGHT_CJK; else if ( nScriptType == SCRIPTTYPE_COMPLEX ) @@ -2112,8 +2112,8 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj, if( !pModel || !pSourceObj ) return pSourceObj; - sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0; - const bool bUndo = pUndoManager && pUndoManager->isInListAction() && rPage.IsInserted(); + ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0; + const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && rPage.IsInserted(); SdrObject* pNewObj = pSourceObj; if((eObjKind == PRESOBJ_OUTLINE) && (pSourceObj->GetObjIdentifier() == OBJ_TEXT) ) @@ -2126,15 +2126,15 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj, if(pOutlParaObj) { // Text umsetzen - ::sd::Outliner* pOutl = pModel->GetInternalOutliner( TRUE ); + ::sd::Outliner* pOutl = pModel->GetInternalOutliner( sal_True ); pOutl->Clear(); pOutl->SetText( *pOutlParaObj ); pOutlParaObj = pOutl->CreateParaObject(); pNewObj->SetOutlinerParaObject( pOutlParaObj ); pOutl->Clear(); - pNewObj->SetEmptyPresObj(FALSE); + pNewObj->SetEmptyPresObj(sal_False); - for (USHORT nLevel = 1; nLevel < 10; nLevel++) + for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++) { // Neue Vorlage zuweisen String aName(rPage.GetLayoutName()); @@ -2192,7 +2192,7 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj, pOutlParaObj = pOutl->CreateParaObject(); pNewObj->SetOutlinerParaObject( pOutlParaObj ); pOutl->Clear(); - pNewObj->SetEmptyPresObj(FALSE); + pNewObj->SetEmptyPresObj(sal_False); // Linken Einzug zuruecksetzen SfxItemSet aSet(pModel->GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE ); @@ -2208,7 +2208,7 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj, SfxStyleSheet* pSheet = rPage.GetStyleSheetForPresObj(PRESOBJ_TEXT); if (pSheet) - pNewObj->SetStyleSheet(pSheet, TRUE); + pNewObj->SetStyleSheet(pSheet, sal_True); // Remove subtitle shape from page if( bUndo ) @@ -2252,8 +2252,8 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj, */ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, bool bVertical, Rectangle aRect, bool bInit ) { - sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0; - const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted(); + ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0; + const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted(); if (!pObj && bInit) { @@ -2268,7 +2268,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, if( bUndo ) { pUndoManager->AddUndoAction( pModel->GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) ); - pUndoManager->AddUndoAction( pModel->GetSdrUndoFactory().CreateUndoAttrObject( *pObj, TRUE, TRUE ) ); + pUndoManager->AddUndoAction( pModel->GetSdrUndoFactory().CreateUndoAttrObject( *pObj, sal_True, sal_True ) ); pUndoManager->AddUndoAction( new UndoObjectUserCall( *pObj ) ); } @@ -2300,13 +2300,13 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() ); SdrTextMinFrameHeightItem aMinHeight( aRect.GetSize().Height() ); aTempAttr.Put( aMinHeight ); - aTempAttr.Put( SdrTextAutoGrowHeightItem(FALSE) ); + aTempAttr.Put( SdrTextAutoGrowHeightItem(sal_False) ); pTextObject->SetMergedItemSet(aTempAttr); pTextObject->SetLogicRect(aRect); // switch on AutoGrowHeight SfxItemSet aAttr( ((SdDrawDocument*) pModel)->GetPool() ); - aAttr.Put( SdrTextAutoGrowHeightItem(TRUE) ); + aAttr.Put( SdrTextAutoGrowHeightItem(sal_True) ); pTextObject->SetMergedItemSet(aAttr); } @@ -2317,13 +2317,13 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() ); SdrTextMinFrameWidthItem aMinWidth( aRect.GetSize().Width() ); aTempAttr.Put( aMinWidth ); - aTempAttr.Put( SdrTextAutoGrowWidthItem(FALSE) ); + aTempAttr.Put( SdrTextAutoGrowWidthItem(sal_False) ); pTextObject->SetMergedItemSet(aTempAttr); pTextObject->SetLogicRect(aRect); // switch on AutoGrowWidth SfxItemSet aAttr( ((SdDrawDocument*) pModel)->GetPool() ); - aAttr.Put( SdrTextAutoGrowWidthItem(TRUE) ); + aAttr.Put( SdrTextAutoGrowWidthItem(sal_True) ); pTextObject->SetMergedItemSet(aAttr); } } @@ -2344,8 +2344,8 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, if( bVertical && (( eObjKind == PRESOBJ_TITLE) || (eObjKind == PRESOBJ_OUTLINE))) { SfxItemSet aNewSet(pObj->GetMergedItemSet()); - aNewSet.Put( SdrTextAutoGrowWidthItem(TRUE) ); - aNewSet.Put( SdrTextAutoGrowHeightItem(FALSE) ); + aNewSet.Put( SdrTextAutoGrowWidthItem(sal_True) ); + aNewSet.Put( SdrTextAutoGrowHeightItem(sal_False) ); if( eObjKind == PRESOBJ_OUTLINE ) { aNewSet.Put( SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP) ); @@ -2430,14 +2430,14 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO pOutl->SetRefDevice( SD_MOD()->GetRefDevice( *( (SdDrawDocument*) GetModel() )->GetDocSh() ) ); pOutl->SetEditTextObjectPool(pPool); pOutl->SetStyleSheetPool((SfxStyleSheetPool*)GetModel()->GetStyleSheetPool()); - pOutl->EnableUndo(FALSE); - pOutl->SetUpdateMode( FALSE ); + pOutl->EnableUndo(sal_False); + pOutl->SetUpdateMode( sal_False ); } - USHORT nOutlMode = pOutl->GetMode(); + sal_uInt16 nOutlMode = pOutl->GetMode(); Size aPaperSize = pOutl->GetPaperSize(); - BOOL bUpdateMode = pOutl->GetUpdateMode(); - pOutl->SetUpdateMode(FALSE); + sal_Bool bUpdateMode = pOutl->GetUpdateMode(); + pOutl->SetUpdateMode(sal_False); pOutl->SetParaAttribs( 0, pOutl->GetEmptyItemSet() ); // #95114# Always set the object's StyleSheet at the Outliner to @@ -2577,7 +2577,7 @@ void SdPage::SetLayoutName(String aName) if( mbMaster ) { String aSep( RTL_CONSTASCII_USTRINGPARAM(SD_LT_SEPARATOR) ); - USHORT nPos = maLayoutName.Search( aSep ); + sal_uInt16 nPos = maLayoutName.Search( aSep ); if ( nPos != STRING_NOTFOUND ) { FmFormPage::SetName(maLayoutName.Copy(0, nPos)); @@ -2600,7 +2600,7 @@ const String& SdPage::GetName() const if ((mePageKind == PK_STANDARD || mePageKind == PK_NOTES) && !mbMaster) { // default name for handout pages - USHORT nNum = (GetPageNum() + 1) / 2; + sal_uInt16 nNum = (GetPageNum() + 1) / 2; aCreatedPageName = String(SdResId(STR_PAGE)); aCreatedPageName += sal_Unicode( ' ' ); @@ -2911,7 +2911,7 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj ) if (aString.Len()) { - BOOL bVertical = FALSE; + sal_Bool bVertical = sal_False; OutlinerParaObject* pOldPara = pTextObj->GetOutlinerParaObject(); if( pOldPara ) bVertical = pOldPara->IsVertical(); // is old para object vertical? @@ -2937,8 +2937,8 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj ) } pTextObj->SetTextEditOutliner( NULL ); // to make stylesheet settings work - pTextObj->NbcSetStyleSheet( GetStyleSheetForPresObj(ePresObjKind), TRUE ); - pTextObj->SetEmptyPresObj(TRUE); + pTextObj->NbcSetStyleSheet( GetStyleSheetForPresObj(ePresObjKind), sal_True ); + pTextObj->SetEmptyPresObj(sal_True); bRet = true; } } @@ -2996,7 +2996,7 @@ void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, }; sal_uInt16* pOffsets = aOffsets[0]; - USHORT nColCnt = 0, nRowCnt = 0; + sal_uInt16 nColCnt = 0, nRowCnt = 0; switch ( eLayout ) { case AUTOLAYOUT_HANDOUT1: diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index ac6acb35abbc..164576553031 100644..100755 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -76,20 +76,20 @@ extern void NotifyDocumentEvent( SdDrawDocument* pDocument, const rtl::OUString& |* - Die entsprechenden StyleSheets muessen bereits im |* im StyleSheetPool sein. |* -|* bReplaceStyleSheets = TRUE : Benannte StyleSheets werden ausgetauscht -|* FALSE: Alle StyleSheets werden neu zugewiesen +|* bReplaceStyleSheets = sal_True : Benannte StyleSheets werden ausgetauscht +|* sal_False: Alle StyleSheets werden neu zugewiesen |* -|* bSetMasterPage = TRUE : MasterPage suchen und zuweisen +|* bSetMasterPage = sal_True : MasterPage suchen und zuweisen |* -|* bReverseOrder = FALSE: MasterPages von vorn nach hinten suchen -|* TRUE : MasterPages von hinten nach vorn suchen (fuer Undo-Action) +|* bReverseOrder = sal_False: MasterPages von vorn nach hinten suchen +|* sal_True : MasterPages von hinten nach vorn suchen (fuer Undo-Action) |* \************************************************************************/ void SdPage::SetPresentationLayout(const String& rLayoutName, - BOOL bReplaceStyleSheets, - BOOL bSetMasterPage, - BOOL bReverseOrder) + sal_Bool bReplaceStyleSheets, + sal_Bool bSetMasterPage, + sal_Bool bReverseOrder) { /********************************************************************* |* Layoutname der Seite @@ -106,8 +106,8 @@ void SdPage::SetPresentationLayout(const String& rLayoutName, { SdPage* pMaster; SdPage* pFoundMaster = 0; - USHORT nMaster = 0; - USHORT nMasterCount = pModel->GetMasterPageCount(); + sal_uInt16 nMaster = 0; + sal_uInt16 nMasterCount = pModel->GetMasterPageCount(); if( !bReverseOrder ) { @@ -153,11 +153,11 @@ void SdPage::SetPresentationLayout(const String& rLayoutName, List aOutlineStyles; List aOldOutlineStyles; List aReplList; - BOOL bListsFilled = FALSE; + sal_Bool bListsFilled = sal_False; - ULONG nObjCount = GetObjCount(); + sal_uLong nObjCount = GetObjCount(); - for (ULONG nObj = 0; nObj < nObjCount; nObj++) + for (sal_uLong nObj = 0; nObj < nObjCount; nObj++) { SdrTextObj* pObj = (SdrTextObj*) GetObj(nObj); @@ -207,7 +207,7 @@ void SdPage::SetPresentationLayout(const String& rLayoutName, } } - bListsFilled = TRUE; + bListsFilled = sal_True; } SfxStyleSheet* pSheet = (SfxStyleSheet*)aOutlineStyles.First(); @@ -247,18 +247,18 @@ void SdPage::SetPresentationLayout(const String& rLayoutName, SfxStyleSheet* pSheet = GetStyleSheetForPresObj(PRESOBJ_TITLE); if (pSheet) - pObj->SetStyleSheet(pSheet, TRUE); + pObj->SetStyleSheet(pSheet, sal_True); } else { SfxStyleSheet* pSheet = GetStyleSheetForPresObj(GetPresObjKind(pObj)); if (pSheet) - pObj->SetStyleSheet(pSheet, TRUE); + pObj->SetStyleSheet(pSheet, sal_True); } } - for (ULONG i = 0; i < aReplList.Count(); i++) + for (sal_uLong i = 0; i < aReplList.Count(); i++) { delete (StyleReplaceData*) aReplList.GetObject(i); } @@ -318,7 +318,7 @@ void SdPage::SetModel(SdrModel* pNewModel) FASTBOOL SdPage::IsReadOnly() const { - return FALSE; + return sal_False; } /************************************************************************* @@ -393,7 +393,7 @@ SdPage::SdPage(const SdPage& rSrcPage) while((pObj = rSrcPage.maPresentationShapeList.getNextShape(pObj)) != 0) InsertPresObj(GetObj(pObj->GetOrdNum()), rSrcPage.GetPresObjKind(pObj)); - mbSelected = FALSE; + mbSelected = sal_False; mnTransitionType = rSrcPage.mnTransitionType; mnTransitionSubtype = rSrcPage.mnTransitionSubtype; mbTransitionDirection = rSrcPage.mbTransitionDirection; diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 205e007d9e97..52b9723bc178 100755 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -122,7 +122,7 @@ SdStyleSheetPool::~SdStyleSheetPool() // ---------------------------------------------------------- -SfxStyleSheetBase* SdStyleSheetPool::Create(const String& rName, SfxStyleFamily eFamily, USHORT _nMask ) +SfxStyleSheetBase* SdStyleSheetPool::Create(const String& rName, SfxStyleFamily eFamily, sal_uInt16 _nMask ) { return new SdStyleSheet(rName, *this, eFamily, _nMask); } @@ -158,7 +158,7 @@ List* SdStyleSheetPool::CreateOutlineSheetList (const String& rLayoutName) aName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR )); aName += String(SdResId(STR_LAYOUT_OUTLINE)); List* pList = new List; - for (USHORT nSheet = 1; nSheet < 10; nSheet++) + for (sal_uInt16 nSheet = 1; nSheet < 10; nSheet++) { String aFullName(aName); aFullName.Append( sal_Unicode( ' ' )); @@ -213,7 +213,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo SfxStyleSheetBase* pParent = NULL; SvxLRSpaceItem aSvxLRSpaceItem( EE_PARA_LRSPACE ); SvxULSpaceItem aSvxULSpaceItem( EE_PARA_ULSPACE ); - USHORT nLevel; + sal_uInt16 nLevel; for( nLevel = 1; nLevel < 10; nLevel++) { @@ -248,15 +248,15 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo rSet.Put( SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE ) ); rSet.Put( SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE ) ); rSet.Put( SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ) ); - rSet.Put( SvxShadowedItem(FALSE, EE_CHAR_SHADOW ) ); - rSet.Put( SvxContourItem(FALSE, EE_CHAR_OUTLINE ) ); + rSet.Put( SvxShadowedItem(sal_False, EE_CHAR_SHADOW ) ); + rSet.Put( SvxContourItem(sal_False, EE_CHAR_OUTLINE ) ); rSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) ); rSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF) ); rSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR) ); rSet.Put( XLineStyleItem(XLINE_NONE) ); rSet.Put( XFillStyleItem(XFILL_NONE) ); // #i16874# enable kerning by default but only for new documents - rSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) ); + rSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) ); if( nLevel == 1 ) { @@ -265,10 +265,10 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo } } - ULONG nFontSize = 20; + sal_uLong nFontSize = 20; short nFirstIndent = -600; -// USHORT nIndent = nLevel * 1200; - USHORT nLower = 100; +// sal_uInt16 nIndent = nLevel * 1200; + sal_uInt16 nLower = 100; switch (nLevel) { @@ -303,7 +303,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo } // FontSize - nFontSize = (USHORT)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm + nFontSize = (sal_uInt16)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm SfxItemSet& rOutlineSet = pSheet->GetItemSet(); rOutlineSet.Put( SvxFontHeightItem( nFontSize, 100, EE_CHAR_FONTHEIGHT ) ); rOutlineSet.Put( SvxFontHeightItem( nFontSize, 100, EE_CHAR_FONTHEIGHT_CJK ) ); @@ -314,7 +314,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo aSvxLRSpaceItem.SetTxtFirstLineOfst(nFirstIndent); aSvxLRSpaceItem.SetTxtLeft(nIndent); aSvxLRSpaceItem.SetRight(0); - aSvxLRSpaceItem.SetBulletFI(TRUE); + aSvxLRSpaceItem.SetBulletFI(sal_True); pSheet->GetItemSet().Put(aSvxLRSpaceItem); */ // Zeilendurchschuss (Abstand nach unten) @@ -387,8 +387,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo rTitleSet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE )); rTitleSet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE )); rTitleSet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT )); - rTitleSet.Put(SvxShadowedItem(FALSE, EE_CHAR_SHADOW )); - rTitleSet.Put(SvxContourItem(FALSE, EE_CHAR_OUTLINE )); + rTitleSet.Put(SvxShadowedItem(sal_False, EE_CHAR_SHADOW )); + rTitleSet.Put(SvxContourItem(sal_False, EE_CHAR_OUTLINE )); rTitleSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) ); rTitleSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF ) ); rTitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR )); @@ -396,7 +396,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo rTitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) ); // rTitleSet.Put( SfxUInt16Item(EE_PARA_BULLETSTATE, 0) ); // #i16874# enable kerning by default but only for new documents - rTitleSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) ); + rTitleSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) ); aBulletFont.SetSize(Size(0,1552)); // 44 pt PutNumBulletItem( pSheet, aBulletFont ); @@ -433,8 +433,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo rSubtitleSet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE )); rSubtitleSet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE )); rSubtitleSet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT )); - rSubtitleSet.Put(SvxShadowedItem(FALSE, EE_CHAR_SHADOW )); - rSubtitleSet.Put(SvxContourItem(FALSE, EE_CHAR_OUTLINE )); + rSubtitleSet.Put(SvxShadowedItem(sal_False, EE_CHAR_SHADOW )); + rSubtitleSet.Put(SvxContourItem(sal_False, EE_CHAR_OUTLINE )); rSubtitleSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) ); rSubtitleSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF ) ); rSubtitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR )); @@ -442,7 +442,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo rSubtitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) ); // rSubtitleSet.Put( SfxUInt16Item(EE_PARA_BULLETSTATE, 0) ); // #i16874# enable kerning by default but only for new documents - rSubtitleSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) ); + rSubtitleSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) ); aSvxLRSpaceItem.SetTxtLeft(0); rSubtitleSet.Put(aSvxLRSpaceItem); @@ -482,15 +482,15 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo rNotesSet.Put( SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE ) ); rNotesSet.Put( SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE ) ); rNotesSet.Put( SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ) ); - rNotesSet.Put( SvxShadowedItem(FALSE, EE_CHAR_SHADOW ) ); - rNotesSet.Put( SvxContourItem(FALSE, EE_CHAR_OUTLINE ) ); + rNotesSet.Put( SvxShadowedItem(sal_False, EE_CHAR_SHADOW ) ); + rNotesSet.Put( SvxContourItem(sal_False, EE_CHAR_OUTLINE ) ); rNotesSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) ); rNotesSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF) ); rNotesSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ) ); // rNotesSet.Put( SfxUInt16Item(EE_PARA_BULLETSTATE, 0) ); rNotesSet.Put( SvxLRSpaceItem( 0, 0, 600, -600, EE_PARA_LRSPACE ) ); // #i16874# enable kerning by default but only for new documents - rNotesSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) ); + rNotesSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) ); /* #i35937# SvxNumBulletItem aNumBullet( (const SvxNumBulletItem&) rNotesSet.Get(EE_PARA_NUMBULLET) ); @@ -517,12 +517,13 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUNDOBJECTS ); pSheet->SetParent(String()); SfxItemSet& rBackgroundObjectsSet = pSheet->GetItemSet(); - rBackgroundObjectsSet.Put(SdrShadowItem(FALSE)); + rBackgroundObjectsSet.Put(SdrShadowItem(sal_False)); rBackgroundObjectsSet.Put(SdrShadowColorItem(String(), Color(COL_GRAY))); - rBackgroundObjectsSet.Put(SdrShadowXDistItem(300)); // 3 mm Schattendistanz - rBackgroundObjectsSet.Put(SdrShadowYDistItem(300)); + rBackgroundObjectsSet.Put(SdrShadowXDistItem(200)); // 3 mm Schattendistanz + rBackgroundObjectsSet.Put(SdrShadowYDistItem(200)); // #i16874# enable kerning by default but only for new documents - rBackgroundObjectsSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) ); + rBackgroundObjectsSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) ); + rBackgroundObjectsSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_BLOCK)); } /************************************************************************** @@ -542,7 +543,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo rBackgroundSet.Put(XLineStyleItem(XLINE_NONE)); rBackgroundSet.Put(XFillStyleItem(XFILL_NONE)); // #i16874# enable kerning by default but only for new documents - rBackgroundSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) ); + rBackgroundSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) ); } DBG_ASSERT( !bCheck || !bCreated, "missing layout style sheets detected!" ); @@ -743,7 +744,7 @@ List* SdStyleSheetPool::CreateLayoutSheetNames(const String& rLayoutName) const String aName(SdResId(STR_LAYOUT_OUTLINE)); String* pName = NULL; - for (USHORT nLevel = 1; nLevel < 10; nLevel++) + for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++) { pName = new String(aName); pName->Append( sal_Unicode( ' ' )); @@ -786,7 +787,7 @@ void SdStyleSheetPool::CreateLayoutSheetList(const String& rLayoutName, SdStyleS { String aLayoutNameWithSep(rLayoutName); aLayoutNameWithSep.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR )); - USHORT nLen = aLayoutNameWithSep.Len(); + sal_uInt16 nLen = aLayoutNameWithSep.Len(); SfxStyleSheetIterator aIter(this, SD_STYLE_FAMILY_MASTERPAGE); SfxStyleSheetBase* pSheet = aIter.First(); @@ -812,8 +813,8 @@ void SdStyleSheetPool::CreatePseudosIfNecessary() SfxStyleSheetBase* pSheet = NULL; SfxStyleSheetBase* pParent = NULL; - //USHORT nUsedMask = SFXSTYLEBIT_ALL & ~SFXSTYLEBIT_USERDEF; - USHORT nUsedMask = SFXSTYLEBIT_USED; + //sal_uInt16 nUsedMask = SFXSTYLEBIT_ALL & ~SFXSTYLEBIT_USERDEF; + sal_uInt16 nUsedMask = SFXSTYLEBIT_USED; aName = String(SdResId(STR_PSEUDOSHEET_TITLE)); if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 ) @@ -863,7 +864,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary() pParent = NULL; SetSearchMask(SD_STYLE_FAMILY_PSEUDO); aName = String(SdResId(STR_PSEUDOSHEET_OUTLINE)); - for (USHORT nLevel = 1; nLevel < 10; nLevel++) + for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++) { String aLevelName(aName); aLevelName.Append( sal_Unicode( ' ' )); @@ -905,12 +906,12 @@ void SdStyleSheetPool::UpdateStdNames() if( !pStyle->IsUserDefined() ) { String aOldName = pStyle->GetName(); - ULONG nHelpId = pStyle->GetHelpId( aHelpFile ); + sal_uLong nHelpId = pStyle->GetHelpId( aHelpFile ); SfxStyleFamily eFam = pStyle->GetFamily(); - BOOL bHelpKnown = TRUE; + sal_Bool bHelpKnown = sal_True; String aNewName; - USHORT nNameId = 0; + sal_uInt16 nNameId = 0; switch( nHelpId ) { case HID_STANDARD_STYLESHEET_NAME: nNameId = STR_STANDARD_STYLESHEET_NAME; break; @@ -953,7 +954,7 @@ void SdStyleSheetPool::UpdateStdNames() default: // 0 oder falsche (alte) HelpId - bHelpKnown = FALSE; + bHelpKnown = sal_False; } if( bHelpKnown ) { @@ -994,7 +995,7 @@ void SdStyleSheetPool::UpdateStdNames() if ( pEraseList ) { // Styles, welche nicht umbenannt werden konnten, muessen entfernt werden - for ( ULONG i = 0; i < pEraseList->Count(); i++ ) + for ( sal_uLong i = 0; i < pEraseList->Count(); i++ ) { SfxStyleSheetBase* pEraseSheet = ( SfxStyleSheetBase* ) pEraseList->GetObject( i ); Remove( pEraseSheet ); @@ -1012,7 +1013,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, Font& rBulletFont ) { String aHelpFile; - ULONG nHelpId = pSheet->GetHelpId( aHelpFile ); + sal_uLong nHelpId = pSheet->GetHelpId( aHelpFile ); SfxItemSet& rSet = pSheet->GetItemSet(); switch ( nHelpId ) @@ -1028,13 +1029,9 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, aNumberFormat.SetStart(1); aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT); - SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , FALSE); - aNumberFormat.SetLSpace( 0 ); - aNumberFormat.SetAbsLSpace( 0 ); - aNumberFormat.SetFirstLineOffset( 0 ); - aNumRule.SetLevel( 0, aNumberFormat ); + SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , sal_False); - for( USHORT i = 1; i < aNumRule.GetLevelCount(); i++ ) + for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ ) { const short nLSpace = (i + 1) * 600; aNumberFormat.SetLSpace(nLSpace); @@ -1058,8 +1055,8 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, if(pDefaultRule) { - SvxNumRule aNumRule(pDefaultRule->GetFeatureFlags(), 10, FALSE); - for(USHORT i=0; i < aNumRule.GetLevelCount(); i++) + SvxNumRule aNumRule(pDefaultRule->GetFeatureFlags(), 10, sal_False); + for(sal_uInt16 i=0; i < aNumRule.GetLevelCount(); i++) { SvxNumberFormat aFrmt( pDefaultRule->GetLevel(i) ); aFrmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); @@ -1085,8 +1082,8 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT); SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT, - 10, FALSE ); - for( UINT16 i = 0; i < aNumRule.GetLevelCount(); i++ ) + 10, sal_False ); + for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ ) { aNumberFormat.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34 aNumberFormat.SetBulletRelSize(45); @@ -1095,7 +1092,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, aNumberFormat.SetAbsLSpace(nLSpace); short nFirstLineOffset = -600; - ULONG nFontSize = 20; + sal_uLong nFontSize = 20; switch(i) { case 0: @@ -1130,7 +1127,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, } aNumberFormat.SetFirstLineOffset(nFirstLineOffset); - nFontSize = (USHORT)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm + nFontSize = (sal_uInt16)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm rBulletFont.SetSize(Size(0,846)); // 24 pt aNumberFormat.SetBulletFont(&rBulletFont); aNumRule.SetLevel( i, aNumberFormat ); @@ -1158,10 +1155,10 @@ Font SdStyleSheetPool::GetBulletFont() const aBulletFont.SetOverline(UNDERLINE_NONE); aBulletFont.SetStrikeout(STRIKEOUT_NONE); aBulletFont.SetItalic(ITALIC_NONE); - aBulletFont.SetOutline(FALSE); - aBulletFont.SetShadow(FALSE); + aBulletFont.SetOutline(sal_False); + aBulletFont.SetShadow(sal_False); aBulletFont.SetColor(Color(COL_AUTO)); - aBulletFont.SetTransparent(TRUE); + aBulletFont.SetTransparent(sal_True); return aBulletFont; } @@ -1411,10 +1408,10 @@ SdStyleSheetVector SdStyleSheetPool::CreateChildList( SdStyleSheet* pSheet ) { SdStyleSheetVector aResult; - USHORT nListenerCount = pSheet->GetListenerCount(); + sal_uInt16 nListenerCount = pSheet->GetListenerCount(); if (nListenerCount > 0) { - for (USHORT n = 0; n < nListenerCount; n++) + for (sal_uInt16 n = 0; n < nListenerCount; n++) { SdStyleSheet* pChild = dynamic_cast< SdStyleSheet* >( pSheet->GetListener(n) ); if(pChild && pChild->GetParent() == pSheet->GetName()) diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 51d1375c9984..f5d3a70f6c73 100755 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -132,7 +132,7 @@ void ModifyListenerForewarder::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /* mpStyleSheet->notifyModifyListener(); } -SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, SfxStyleSheetBasePool& _rPool, SfxStyleFamily eFamily, USHORT _nMask) +SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, SfxStyleSheetBasePool& _rPool, SfxStyleFamily eFamily, sal_uInt16 _nMask) : SdStyleSheetBase( UniString( rDisplayName ), _rPool, eFamily, _nMask) , ::cppu::BaseMutex() , msApiName( rDisplayName ) @@ -170,7 +170,7 @@ rtl::OUString SdStyleSheet::GetApiName() const } -void SdStyleSheet::Load (SvStream& rIn, USHORT nVersion) +void SdStyleSheet::Load (SvStream& rIn, sal_uInt16 nVersion) { SfxStyleSheetBase::Load(rIn, nVersion); @@ -200,9 +200,9 @@ void SdStyleSheet::Store(SvStream& rOut) |* \************************************************************************/ -BOOL SdStyleSheet::SetParent(const String& rParentName) +sal_Bool SdStyleSheet::SetParent(const String& rParentName) { - BOOL bResult = FALSE; + sal_Bool bResult = sal_False; if (SfxStyleSheet::SetParent(rParentName)) { @@ -214,7 +214,7 @@ BOOL SdStyleSheet::SetParent(const String& rParentName) SfxStyleSheetBase* pStyle = rPool.Find(rParentName, nFamily); if (pStyle) { - bResult = TRUE; + bResult = sal_True; SfxItemSet& rParentSet = pStyle->GetItemSet(); GetItemSet().SetParent(&rParentSet); Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) ); @@ -222,14 +222,14 @@ BOOL SdStyleSheet::SetParent(const String& rParentName) } else { - bResult = TRUE; + bResult = sal_True; GetItemSet().SetParent(NULL); Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) ); } } else { - bResult = TRUE; + bResult = sal_True; } } return bResult; @@ -248,7 +248,7 @@ SfxItemSet& SdStyleSheet::GetItemSet() // ggfs. das ItemSet 'on demand' anlegen if (!pSet) { - USHORT nWhichPairTable[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST, + sal_uInt16 nWhichPairTable[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST, XATTR_FILL_FIRST, XATTR_FILL_LAST, SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, @@ -276,7 +276,7 @@ SfxItemSet& SdStyleSheet::GetItemSet() { if (!pSet) { - USHORT nWhichPairTable[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST, + sal_uInt16 nWhichPairTable[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST, XATTR_FILL_FIRST, XATTR_FILL_LAST, SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, @@ -313,7 +313,7 @@ SfxItemSet& SdStyleSheet::GetItemSet() { if (!pSet) { - USHORT nWhichPairTable[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST, + sal_uInt16 nWhichPairTable[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST, XATTR_FILL_FIRST, XATTR_FILL_LAST, SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, @@ -346,14 +346,14 @@ SfxItemSet& SdStyleSheet::GetItemSet() |* \************************************************************************/ -BOOL SdStyleSheet::IsUsed() const +sal_Bool SdStyleSheet::IsUsed() const { - BOOL bResult = FALSE; + sal_Bool bResult = sal_False; - USHORT nListenerCount = GetListenerCount(); + sal_uInt16 nListenerCount = GetListenerCount(); if (nListenerCount > 0) { - for (USHORT n = 0; n < nListenerCount; n++) + for (sal_uInt16 n = 0; n < nListenerCount; n++) { SfxListener* pListener = GetListener(n); if( pListener == this ) @@ -472,7 +472,7 @@ SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const else { String aOutlineStr(SdResId(STR_PSEUDOSHEET_OUTLINE)); - USHORT nPos = aName.Search(aOutlineStr); + sal_uInt16 nPos = aName.Search(aOutlineStr); if (nPos != STRING_NOTFOUND) { String aNumStr(aName.Copy(aOutlineStr.Len())); @@ -534,7 +534,7 @@ SdStyleSheet* SdStyleSheet::GetPseudoStyleSheet() const else { String aOutlineStr((SdResId(STR_LAYOUT_OUTLINE))); - USHORT nPos = aStyleName.Search(aOutlineStr); + sal_uInt16 nPos = aStyleName.Search(aOutlineStr); if (nPos != STRING_NOTFOUND) { String aNumStr(aStyleName.Copy(aOutlineStr.Len())); @@ -565,7 +565,7 @@ void SdStyleSheet::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) // bekommt, sorgt er dafuer, dass das eigentlich gemeinte StyleSheet // broadcastet SfxSimpleHint* pSimple = PTR_CAST(SfxSimpleHint, &rHint); - ULONG nId = pSimple == NULL ? 0 : pSimple->GetId(); + sal_uLong nId = pSimple == NULL ? 0 : pSimple->GetId(); if (nId == SFX_HINT_DATACHANGED && nFamily == SD_STYLE_FAMILY_PSEUDO) { SdStyleSheet* pRealStyle = GetRealStyleSheet(); @@ -580,11 +580,11 @@ void SdStyleSheet::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) |* berechnet, dass das Verhaeltnis zur Fonthoehe so ist wie im StyleSheet. |* |* bOnlyMissingItems legt fest, ob lediglich nicht gesetzte Items ergaenzt -|* (TRUE) oder explizit gesetzte Items ueberschreiben werden sollen (FALSE) +|* (sal_True) oder explizit gesetzte Items ueberschreiben werden sollen (sal_False) |* \************************************************************************/ -void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, BOOL bOnlyMissingItems) +void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, sal_Bool bOnlyMissingItems) { // Bulletbreite und Texteinzug an neue Fonthoehe // anpassen, wenn sie nicht explizit gesetzt wurden @@ -602,15 +602,15 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, BOOL bOnlyMissingItems) rSet.GetItemState(EE_CHAR_FONTHEIGHT) == SFX_ITEM_SET) { const SfxItemSet* pCurSet = &GetItemSet(); - UINT32 nNewHeight = ((SvxFontHeightItem&)rSet.Get(EE_CHAR_FONTHEIGHT)).GetHeight(); - UINT32 nOldHeight = ((SvxFontHeightItem&)pCurSet->Get(EE_CHAR_FONTHEIGHT)).GetHeight(); + sal_uInt32 nNewHeight = ((SvxFontHeightItem&)rSet.Get(EE_CHAR_FONTHEIGHT)).GetHeight(); + sal_uInt32 nOldHeight = ((SvxFontHeightItem&)pCurSet->Get(EE_CHAR_FONTHEIGHT)).GetHeight(); if (rSet.GetItemState(EE_PARA_BULLET) != SFX_ITEM_SET || !bOnlyMissingItems) { const SvxBulletItem& rBItem = (const SvxBulletItem&)pCurSet->Get(EE_PARA_BULLET); double fBulletFraction = double(rBItem.GetWidth()) / nOldHeight; SvxBulletItem aNewBItem(rBItem); - aNewBItem.SetWidth((UINT32)(fBulletFraction * nNewHeight)); + aNewBItem.SetWidth((sal_uInt32)(fBulletFraction * nNewHeight)); rSet.Put(aNewBItem); } @@ -619,7 +619,7 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, BOOL bOnlyMissingItems) const SvxLRSpaceItem& rLRItem = (const SvxLRSpaceItem&)pCurSet->Get(EE_PARA_LRSPACE); double fIndentFraction = double(rLRItem.GetTxtLeft()) / nOldHeight; SvxLRSpaceItem aNewLRItem(rLRItem); - aNewLRItem.SetTxtLeft((USHORT)(fIndentFraction * nNewHeight)); + aNewLRItem.SetTxtLeft((sal_uInt16)(fIndentFraction * nNewHeight)); double fFirstIndentFraction = double(rLRItem.GetTxtFirstLineOfst()) / nOldHeight; aNewLRItem.SetTxtFirstLineOfst((short)(fFirstIndentFraction * nNewHeight)); rSet.Put(aNewLRItem); @@ -630,9 +630,9 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, BOOL bOnlyMissingItems) const SvxULSpaceItem& rULItem = (const SvxULSpaceItem&)pCurSet->Get(EE_PARA_ULSPACE); SvxULSpaceItem aNewULItem(rULItem); double fLowerFraction = double(rULItem.GetLower()) / nOldHeight; - aNewULItem.SetLower((USHORT)(fLowerFraction * nNewHeight)); + aNewULItem.SetLower((sal_uInt16)(fLowerFraction * nNewHeight)); double fUpperFraction = double(rULItem.GetUpper()) / nOldHeight; - aNewULItem.SetUpper((USHORT)(fUpperFraction * nNewHeight)); + aNewULItem.SetUpper((sal_uInt16)(fUpperFraction * nNewHeight)); rSet.Put(aNewULItem); } } @@ -640,35 +640,35 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, BOOL bOnlyMissingItems) // -------------------------------------------------------------------- -BOOL SdStyleSheet::HasFollowSupport() const +sal_Bool SdStyleSheet::HasFollowSupport() const { - return FALSE; + return sal_False; } // -------------------------------------------------------------------- -BOOL SdStyleSheet::HasParentSupport() const +sal_Bool SdStyleSheet::HasParentSupport() const { - return TRUE; + return sal_True; } // -------------------------------------------------------------------- -BOOL SdStyleSheet::HasClearParentSupport() const +sal_Bool SdStyleSheet::HasClearParentSupport() const { - return TRUE; + return sal_True; } // -------------------------------------------------------------------- -BOOL SdStyleSheet::SetName( const UniString& rName ) +sal_Bool SdStyleSheet::SetName( const UniString& rName ) { return SfxStyleSheet::SetName( rName ); } // -------------------------------------------------------------------- -void SdStyleSheet::SetHelpId( const String& r, ULONG nId ) +void SdStyleSheet::SetHelpId( const String& r, sal_uLong nId ) { SfxStyleSheet::SetHelpId( r, nId ); @@ -1342,7 +1342,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN case XATTR_LINESTART: case XATTR_LINEDASH: { - NameOrIndex* pItem = (NameOrIndex*)rStyleSet.GetItem((USHORT)pEntry->nWID); + NameOrIndex* pItem = (NameOrIndex*)rStyleSet.GetItem((sal_uInt16)pEntry->nWID); if( ( pItem == NULL ) || ( pItem->GetName().Len() == 0) ) eState = PropertyState_DEFAULT_VALUE; } diff --git a/sd/source/core/undo/undomanager.cxx b/sd/source/core/undo/undomanager.cxx index f3fe9b11c2bd..0fa1dce5a0d1 100644..100755 --- a/sd/source/core/undo/undomanager.cxx +++ b/sd/source/core/undo/undomanager.cxx @@ -32,42 +32,24 @@ using namespace sd; -UndoManager::UndoManager( USHORT nMaxUndoActionCount /* = 20 */ ) +UndoManager::UndoManager( sal_uInt16 nMaxUndoActionCount /* = 20 */ ) : SfxUndoManager( nMaxUndoActionCount ) -, mnListLevel( 0 ) , mpLinkedUndoManager(NULL) { } -void UndoManager::EnterListAction(const UniString &rComment, const UniString& rRepeatComment, USHORT nId /* =0 */) +void UndoManager::EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId /* =0 */) { - if( !isInUndo() ) + if( !IsDoing() ) { ClearLinkedRedoActions(); - mnListLevel++; SfxUndoManager::EnterListAction( rComment, rRepeatComment, nId ); } } -void UndoManager::LeaveListAction() +void UndoManager::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg /* = sal_False */ ) { - if( !isInUndo() ) - { - SfxUndoManager::LeaveListAction(); - if( mnListLevel ) - { - mnListLevel--; - } - else - { - DBG_ERROR("sd::UndoManager::LeaveListAction(), no open list action!" ); - } - } -} - -void UndoManager::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg /* = FALSE */ ) -{ - if( !isInUndo() ) + if( !IsDoing() ) { ClearLinkedRedoActions(); SfxUndoManager::AddUndoAction( pAction, bTryMerg ); @@ -79,22 +61,7 @@ void UndoManager::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg /* = FALS } -BOOL UndoManager::Undo( USHORT nCount ) -{ - ScopeLockGuard aGuard( maIsInUndoLock ); - return SfxUndoManager::Undo( nCount ); -} - -BOOL UndoManager::Redo( USHORT nCount ) -{ - ScopeLockGuard aGuard( maIsInUndoLock ); - return SfxUndoManager::Redo( nCount ); -} - - - - -void UndoManager::SetLinkedUndoManager (SfxUndoManager* pLinkedUndoManager) +void UndoManager::SetLinkedUndoManager (::svl::IUndoManager* pLinkedUndoManager) { mpLinkedUndoManager = pLinkedUndoManager; } diff --git a/sd/source/core/undo/undoobjects.cxx b/sd/source/core/undo/undoobjects.cxx index ef47e7da2bae..e1e2565f33d6 100644..100755 --- a/sd/source/core/undo/undoobjects.cxx +++ b/sd/source/core/undo/undoobjects.cxx @@ -244,7 +244,7 @@ void UndoObjectSetText::Redo() if( mpUndoAnimation ) mpUndoAnimation->Redo(); SdrUndoObjSetText::Redo(); - mxSdrObject->SetEmptyPresObj(mbNewEmptyPresObj ? TRUE : FALSE ); + mxSdrObject->SetEmptyPresObj(mbNewEmptyPresObj ? sal_True : sal_False ); } } @@ -347,7 +347,7 @@ void UndoAutoLayoutPosAndSize::Redo() { SdPage* pPage = static_cast< SdPage* >( mxPage.get() ); if( pPage ) - pPage->SetAutoLayout( pPage->GetAutoLayout(), FALSE, FALSE ); + pPage->SetAutoLayout( pPage->GetAutoLayout(), sal_False, sal_False ); } ////////////////////////////////////////////////////////////////////////////// @@ -402,7 +402,7 @@ void UndoGeoObject::Redo() ////////////////////////////////////////////////////////////////////////////// UndoAttrObject::UndoAttrObject( SdrObject& rObject, bool bStyleSheet1, bool bSaveText ) -: SdrUndoAttrObj( rObject, bStyleSheet1 ? TRUE : FALSE, bSaveText ? TRUE : FALSE ) +: SdrUndoAttrObj( rObject, bStyleSheet1 ? sal_True : sal_False, bSaveText ? sal_True : sal_False ) , mxPage( rObject.GetPage() ) , mxSdrObject( &rObject ) { |