summaryrefslogtreecommitdiff
path: root/sd/source/core
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:40:35 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:40:35 +0100
commita0c13ffcceea4978bf95b8559bff4a71aa55aa88 (patch)
tree2adb4d620b027141c5578565d860434657ba0b3c /sd/source/core
parentadea34547d7bc43e9795032c7761e293a28c1df7 (diff)
parent19232495c4985faf1423075bf8814e786da6ddcd (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: sd/source/ui/func/fuinsfil.cxx sd/source/ui/func/fuprobjs.cxx sd/source/ui/slideshow/slideshowimpl.cxx sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx sd/source/ui/toolpanel/ToolPanelViewShell.cxx sd/source/ui/view/drawview.cxx sd/source/ui/view/drtxtob.cxx sd/source/ui/view/outlnvsh.cxx sd/source/ui/view/outlview.cxx
Diffstat (limited to 'sd/source/core')
-rwxr-xr-x[-rw-r--r--]sd/source/core/CustomAnimationPreset.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/core/anminfo.cxx16
-rw-r--r--sd/source/core/cusshow.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/core/drawdoc.cxx88
-rw-r--r--sd/source/core/drawdoc2.cxx271
-rwxr-xr-x[-rw-r--r--]sd/source/core/drawdoc3.cxx356
-rw-r--r--sd/source/core/drawdoc4.cxx124
-rwxr-xr-x[-rw-r--r--]sd/source/core/drawdoc_animations.cxx2
-rw-r--r--[-rwxr-xr-x]sd/source/core/glob.src0
-rwxr-xr-x[-rw-r--r--]sd/source/core/pglink.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/core/sdattr.cxx14
-rwxr-xr-x[-rw-r--r--]sd/source/core/sdiocmpt.cxx14
-rw-r--r--sd/source/core/sdpage.cxx216
-rwxr-xr-x[-rw-r--r--]sd/source/core/sdpage2.cxx32
-rw-r--r--sd/source/core/shapelist.cxx38
-rw-r--r--sd/source/core/stlpool.cxx100
-rwxr-xr-x[-rw-r--r--]sd/source/core/stlsheet.cxx107
-rwxr-xr-x[-rw-r--r--]sd/source/core/undo/undomanager.cxx45
-rwxr-xr-x[-rw-r--r--]sd/source/core/undo/undoobjects.cxx6
19 files changed, 704 insertions, 753 deletions
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index 009183bca3df..f62401fa8267 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 4502892eac10..9de84eeb217b 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 efc958005bc0..72fe6ddb18fb 100644
--- 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 a299f2f34b4a..1551403c82fd 100644..100755
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -160,15 +160,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)
@@ -184,11 +184,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 );
@@ -248,12 +248,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
@@ -280,7 +280,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;
@@ -329,7 +329,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;
@@ -345,7 +345,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
*
* Es werden auf Pages und MasterPages folgende Default-Layer angelegt:
*
- * Layer STR_LAYOUT : Standardlayer fr alle Zeichenobjekte
+ * Layer STR_LAYOUT : Standardlayer f�r alle Zeichenobjekte
*
* Layer STR_BCKGRND : Hintergrund der MasterPage
* (auf normalen Pages z.Z. keine Verwendung)
@@ -353,7 +353,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
* Layer STR_BCKGRNDOBJ: Objekte auf dem Hintergrund der MasterPage
* (auf normalen Pages z.Z. keine Verwendung)
*
- * Layer STR_CONTROLS : Standardlayer fr Controls
+ * Layer STR_CONTROLS : Standardlayer f�r Controls
*
**************************************************************************/
{
@@ -396,7 +396,7 @@ SdDrawDocument::~SdDrawDocument()
mpOnlineSearchItem = NULL;
CloseBookmarkDoc();
- SetAllocDocSh(FALSE);
+ SetAllocDocSh(sal_False);
ClearModel(sal_True);
@@ -414,7 +414,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 =
@@ -429,7 +429,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);
@@ -473,10 +473,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 );
@@ -492,7 +492,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());
@@ -507,9 +507,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();
}
@@ -601,9 +601,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 );
@@ -619,7 +619,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 );
@@ -650,7 +650,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
@@ -676,7 +676,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;
// create missing layout style sheets for broken documents
// that where created with the 5.2
@@ -703,15 +703,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);
@@ -723,7 +723,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
UpdateAllLinks();
- SetChanged( FALSE );
+ SetChanged( sal_False );
}
/** updates all links, only links in this document should by resolved */
@@ -766,16 +766,16 @@ 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)
{
@@ -793,7 +793,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
if( iter == aOutlineList.begin())
// Textrahmen hoert auf StyleSheet der Ebene1
- pObj->NbcSetStyleSheet(pSheet, TRUE);
+ pObj->NbcSetStyleSheet(pSheet, sal_True);
}
}
}
@@ -805,9 +805,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();
}
}
@@ -825,7 +825,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
|*
\************************************************************************/
-::sd::Outliner* SdDrawDocument::GetOutliner(BOOL bCreateOutliner)
+::sd::Outliner* SdDrawDocument::GetOutliner(sal_Bool bCreateOutliner)
{
if (!mpOutliner && bCreateOutliner)
{
@@ -850,7 +850,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
|*
\************************************************************************/
-::sd::Outliner* SdDrawDocument::GetInternalOutliner(BOOL bCreateOutliner)
+::sd::Outliner* SdDrawDocument::GetInternalOutliner(sal_Bool bCreateOutliner)
{
if ( !mpInternalOutliner && bCreateOutliner )
{
@@ -858,9 +858,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 ) );
@@ -869,8 +869,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:
@@ -887,10 +887,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 63d14f9b9732..96ccc779b0cb 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -101,8 +101,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)
{
@@ -129,7 +129,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)
{
@@ -162,14 +162,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.)
@@ -189,7 +189,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)
@@ -200,7 +200,7 @@ USHORT SdDrawDocument::GetPageByName(const String& rPgName, BOOL& rbIsMasterPage
if (pPage && pPage->GetName() == rPgName)
{
nPageNum = nPage;
- rbIsMasterPage = TRUE;
+ rbIsMasterPage = sal_True;
}
nPage++;
@@ -209,22 +209,22 @@ USHORT SdDrawDocument::GetPageByName(const String& rPgName, BOOL& rbIsMasterPage
return nPageNum;
}
-SdPage* SdDrawDocument::GetSdPage(USHORT nPgNum, PageKind ePgKind) const
+SdPage* SdDrawDocument::GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
{
return mpDrawPageListWatcher->GetSdPage(ePgKind, sal_uInt32(nPgNum));
}
-USHORT SdDrawDocument::GetSdPageCount(PageKind ePgKind) const
+sal_uInt16 SdDrawDocument::GetSdPageCount(PageKind ePgKind) const
{
return (sal_uInt16)mpDrawPageListWatcher->GetSdPageCount(ePgKind);
}
-SdPage* SdDrawDocument::GetMasterSdPage(USHORT nPgNum, PageKind ePgKind)
+SdPage* SdDrawDocument::GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind)
{
return mpMasterPageListWatcher->GetSdPage(ePgKind, sal_uInt32(nPgNum));
}
-USHORT SdDrawDocument::GetMasterSdPageCount(PageKind ePgKind) const
+sal_uInt16 SdDrawDocument::GetMasterSdPageCount(PageKind ePgKind) const
{
return (sal_uInt16)mpMasterPageListWatcher->GetSdPageCount(ePgKind);
}
@@ -236,12 +236,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);
@@ -249,9 +249,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 &&
@@ -277,10 +277,10 @@ void SdDrawDocument::UpdatePageRelativeURLs(const String& rOldName, const String
return;
SfxItemPool& pPool(GetPool());
- USHORT nCount = pPool.GetItemCount(EE_FEATURE_FIELD);
- for (USHORT nOff = 0; nOff < nCount; nOff++)
+ sal_uInt32 nCount = pPool.GetItemCount2(EE_FEATURE_FIELD);
+ for (sal_uInt32 nOff = 0; nOff < nCount; nOff++)
{
- const SfxPoolItem *pItem = pPool.GetItem(EE_FEATURE_FIELD, nOff);
+ const SfxPoolItem *pItem = pPool.GetItem2(EE_FEATURE_FIELD, nOff);
const SvxFieldItem* pFldItem = dynamic_cast< const SvxFieldItem * > (pItem);
if(pFldItem)
@@ -317,15 +317,15 @@ 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);
SfxItemPool& pPool(GetPool());
- USHORT nCount = pPool.GetItemCount(EE_FEATURE_FIELD);
- for (USHORT nOff = 0; nOff < nCount; nOff++)
+ sal_uInt32 nCount = pPool.GetItemCount2(EE_FEATURE_FIELD);
+ for (sal_uInt32 nOff = 0; nOff < nCount; nOff++)
{
- const SfxPoolItem *pItem = pPool.GetItem(EE_FEATURE_FIELD, nOff);
+ const SfxPoolItem *pItem = pPool.GetItem2(EE_FEATURE_FIELD, nOff);
const SvxFieldItem* pFldItem;
if ((pFldItem = dynamic_cast< const SvxFieldItem * > (pItem)) != 0)
@@ -357,7 +357,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 )
{
@@ -385,12 +385,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);
}
@@ -401,7 +401,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());
@@ -422,7 +422,7 @@ void SdDrawDocument::InsertPage(SdrPage* pPage, USHORT nPos)
|*
\************************************************************************/
-void SdDrawDocument::DeletePage(USHORT nPgNum)
+void SdDrawDocument::DeletePage(sal_uInt16 nPgNum)
{
FmFormModel::DeletePage(nPgNum);
@@ -435,7 +435,7 @@ void SdDrawDocument::DeletePage(USHORT nPgNum)
|*
\************************************************************************/
-SdrPage* SdDrawDocument::RemovePage(USHORT nPgNum)
+SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum)
{
SdrPage* pPage = FmFormModel::RemovePage(nPgNum);
@@ -453,7 +453,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) )
@@ -465,7 +465,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) )
@@ -485,7 +485,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();
@@ -528,7 +528,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)
{
@@ -538,7 +538,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
/**********************************************************************
* Handzettel-Seite einfuegen
**********************************************************************/
- SdPage* pHandoutPage = dynamic_cast< SdPage* >( AllocPage(FALSE) );
+ SdPage* pHandoutPage = dynamic_cast< SdPage* >( AllocPage(sal_False) );
SdPage* pRefPage = NULL;
@@ -563,7 +563,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
/**********************************************************************
* MasterPage einfuegen und an der Handzettel-Seite vermerken
**********************************************************************/
- SdPage* pHandoutMPage = (SdPage*) AllocPage(TRUE);
+ SdPage* pHandoutMPage = (SdPage*) AllocPage(sal_True);
pHandoutMPage->SetSize( pHandoutPage->GetSize() );
pHandoutMPage->SetPageKind(PK_HANDOUT);
pHandoutMPage->SetBorder( pHandoutPage->GetLftBorder(),
@@ -579,14 +579,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(FALSE) );
+ pPage = dynamic_cast< SdPage* >( AllocPage(sal_False) );
if( pRefPage )
{
@@ -598,7 +598,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());
@@ -606,10 +606,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);
}
@@ -635,14 +635,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(TRUE);
+ SdPage* pMPage = (SdPage*) AllocPage(sal_True);
pMPage->SetSize( pPage->GetSize() );
pMPage->SetBorder( pPage->GetLftBorder(),
pPage->GetUppBorder(),
@@ -656,7 +656,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
/**********************************************************************
* Notizen-Seite einfuegen
**********************************************************************/
- SdPage* pNotesPage = (SdPage*) AllocPage(FALSE);
+ SdPage* pNotesPage = (SdPage*) AllocPage(sal_False);
if( pRefDocument )
pRefPage = pRefDocument->GetSdPage( 0, PK_NOTES );
@@ -688,7 +688,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
/**********************************************************************
* MasterPage einfuegen und an der Notizen-Seite vermerken
**********************************************************************/
- SdPage* pNotesMPage = (SdPage*) AllocPage(TRUE);
+ SdPage* pNotesMPage = (SdPage*) AllocPage(sal_True);
pNotesMPage->SetSize( pNotesPage->GetSize() );
pNotesMPage->SetPageKind(PK_NOTES);
pNotesMPage->SetBorder( pNotesPage->GetLftBorder(),
@@ -702,14 +702,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);
}
}
@@ -721,10 +721,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)
{
@@ -738,7 +738,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);
@@ -757,9 +757,9 @@ BOOL SdDrawDocument::CreateMissingNotesAndHandoutPages()
pNotesPage->TRG_SetMasterPage(*GetMasterPage(nMasterPageAfterPagesMasterPage));
}
- bOK = TRUE;
+ bOK = sal_True;
StopWorkStartupDelay();
- SetChanged(FALSE);
+ SetChanged(sal_False);
}
return(bOK);
@@ -768,17 +768,17 @@ 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* 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();
@@ -798,7 +798,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())
@@ -809,12 +809,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)
{
@@ -831,7 +831,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();
}
@@ -859,7 +859,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
@@ -874,10 +874,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();
}
}
@@ -895,7 +895,7 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage)
|*
\************************************************************************/
-ULONG SdDrawDocument::GetLinkCount()
+sal_uLong SdDrawDocument::GetLinkCount()
{
return ( pLinkManager->GetLinks().Count() );
}
@@ -906,24 +906,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 )
@@ -942,7 +942,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;
@@ -964,9 +964,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);
@@ -974,7 +974,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);
@@ -982,7 +982,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);
@@ -990,13 +990,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;
}
@@ -1044,8 +1044,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;
@@ -1075,10 +1075,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 );
@@ -1103,7 +1103,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
@@ -1131,12 +1131,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
@@ -1163,7 +1163,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 )
@@ -1174,7 +1174,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++ )
@@ -1199,7 +1199,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 ));
@@ -1230,7 +1230,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 ));
@@ -1299,15 +1299,16 @@ 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;
SdPage* pPreviousNotesPage;
@@ -1319,20 +1320,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);
// Set the size here since else the presobj autolayout
// will be wrong.
@@ -1347,7 +1348,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
@@ -1362,7 +1363,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.
@@ -1370,26 +1371,27 @@ 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 (
- pActualPage, ePageKind,
+ pActualPage,
+ ePageKind,
sStandardPageName,
sNotesPageName,
eStandardLayout,
eNotesLayout,
bIsPageBack,
bIsPageObj,
-
pStandardPage,
- pNotesPage);
+ pNotesPage,
+ nInsertPosition);
}
-USHORT SdDrawDocument::DuplicatePage (USHORT nPageNum)
+sal_uInt16 SdDrawDocument::DuplicatePage (sal_uInt16 nPageNum)
{
PageKind ePageKind = PK_STANDARD;
@@ -1398,8 +1400,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.
@@ -1417,15 +1419,16 @@ 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;
SdPage* pPreviousNotesPage;
@@ -1437,13 +1440,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);
}
@@ -1452,38 +1455,39 @@ USHORT SdDrawDocument::DuplicatePage (
pNotesPage = (SdPage*) pPreviousNotesPage->Clone();
return InsertPageSet (
- pActualPage, ePageKind,
+ pActualPage,
+ ePageKind,
sStandardPageName,
sNotesPageName,
eStandardLayout,
eNotesLayout,
bIsPageBack,
bIsPageObj,
-
pStandardPage,
- pNotesPage);
+ pNotesPage,
+ nInsertPosition);
}
-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)
+ 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;
@@ -1508,13 +1512,16 @@ USHORT SdDrawDocument::InsertPageSet (
eNotesLayout = pPreviousNotesPage->GetAutoLayout();
}
+ OSL_ASSERT(nNotesPageNum==nStandardPageNum+1);
+ if (nInsertPosition < 0)
+ nInsertPosition = nStandardPageNum;
// Set up and insert the standard page.
SetupNewPage (
pPreviousStandardPage,
pStandardPage,
aStandardPageName,
- nStandardPageNum,
+ nInsertPosition,
bIsPageBack,
bIsPageObj);
@@ -1524,7 +1531,7 @@ USHORT SdDrawDocument::InsertPageSet (
pPreviousNotesPage,
pNotesPage,
aNotesPageName,
- nNotesPageNum,
+ nInsertPosition+1,
bIsPageBack,
bIsPageObj);
@@ -1540,9 +1547,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)
{
@@ -1559,8 +1566,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 ee3016e33b84..97553d30b2fe 100644..100755
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -58,6 +58,7 @@
#include <sot/formats.hxx>
#include <set>
+#include <boost/bind.hpp>
#include "glob.hrc"
#include "drawdoc.hxx"
@@ -80,9 +81,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
/*************************************************************************
|*
@@ -92,24 +93,24 @@ using namespace ::com::sun::star;
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();
@@ -120,10 +121,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 )
@@ -164,7 +165,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())
@@ -181,26 +182,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
{
@@ -218,20 +219,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;
}
}
}
@@ -240,7 +241,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 )
@@ -273,7 +274,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 )
{
//
@@ -303,15 +304,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)
{
@@ -325,7 +326,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()));
}
}
@@ -343,7 +344,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() {};
@@ -352,7 +353,7 @@ private:
List* mpLayoutsToTransfer;
SdDrawDocument* mpBookmarkDoc;
List* mpBookmarkList;
- USHORT mnBMSdPageCount;
+ sal_uInt16 mnBMSdPageCount;
};
void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc, SdPage* pBMMPage )
@@ -365,18 +366,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?
@@ -386,7 +387,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
aTest.Erase( aTest.SearchAscii( SD_LT_SEPARATOR ));
if (aTest == *pLayout)
- bFound = TRUE;
+ bFound = sal_True;
}
if (!bFound)
@@ -395,23 +396,37 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
delete pLayout;
}
+/** Just add one page to the container given to the constructor.
+*/
+class InsertBookmarkAsPage_AddBookmarkedPages
+ : public SdDrawDocument::InsertBookmarkAsPage_PageFunctorBase
+{
+public:
+ InsertBookmarkAsPage_AddBookmarkedPages(::std::vector<SdPage*>& rContainer)
+ : mrContainer(rContainer) {}
+ ~InsertBookmarkAsPage_AddBookmarkedPages(void) {}
+ void operator() (SdDrawDocument&, SdPage* pPage) { mrContainer.push_back(pPage); }
+private:
+ ::std::vector<SdPage*>& mrContainer;
+};
-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;
@@ -432,16 +447,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);
}
@@ -451,18 +466,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
@@ -474,7 +489,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
if( !pBookmarkList )
bScaleObjects = pRefPage->IsScaleObjects();
else
- bScaleObjects = TRUE;
+ bScaleObjects = sal_True;
}
else
{
@@ -487,7 +502,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;
@@ -505,7 +520,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();
@@ -532,7 +547,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)
{
@@ -544,7 +559,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
{
if( pUndoMgr )
{
- SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction(this, aCreatedStyles, TRUE);
+ SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction(this, aCreatedStyles, sal_True);
pUndoMgr->AddUndoAction(pMovStyles);
}
}
@@ -573,17 +588,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)
{
@@ -606,8 +621,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++)
@@ -647,29 +662,30 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
if (nInsertPos >= GetPageCount())
{
// Seiten werden hinten angefuegt
- bReplace = FALSE;
+ bReplace = sal_False;
nInsertPos = GetPageCount();
}
- USHORT nActualInsertPos = nInsertPos;
+ sal_uInt16 nActualInsertPos = nInsertPos;
- for (USHORT nPos = 0; nPos < pBookmarkList->Count(); nPos++)
+ // Collect the bookmarked pages.
+ ::std::vector<SdPage*> aBookmarkedPages (pBookmarkList->Count(), NULL);
+ for (sal_uInt16 nPos = 0; nPos < pBookmarkList->Count(); nPos++)
{
- /**************************************************************
- * Namen der Bookmark-Seiten aus Liste holen
- **************************************************************/
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)
{
- pBMPage = (SdPage*) pBookmarkDoc->GetPage(nBMPage);
- }
- else
- {
- pBMPage = NULL;
+ aBookmarkedPages[nPos] = dynamic_cast<SdPage*>(pBookmarkDoc->GetPage(nBMPage));
}
+ }
+
+ for (sal_uInt16 nPos = 0; nPos < pBookmarkList->Count(); nPos++)
+ {
+ pBMPage = aBookmarkedPages[nPos];
+ sal_uInt16 nBMPage = pBMPage!=NULL ? pBMPage->GetPageNum() : SDRPAGE_NOTFOUND;
if (pBMPage && pBMPage->GetPageKind()==PK_STANDARD && !pBMPage->IsMasterPage())
{
@@ -681,7 +697,9 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
// delay renaming *after* pages are copied (might destroy source otherwise)
// don't change name if source and dest model are the same!
// avoid renaming if replacing the same page
- USHORT nPageSameName = GetPageByName(aPgName, bIsMasterPage);
+ String aPgName(*(String*) pBookmarkList->GetObject(nPos));
+ sal_Bool bIsMasterPage;
+ sal_uInt16 nPageSameName = GetPageByName(aPgName, bIsMasterPage);
if( pBookmarkDoc != this &&
nPageSameName != SDRPAGE_NOTFOUND &&
( !bReplace ||
@@ -690,7 +708,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
bMustRename = sal_True;
}
- SdPage* pBookmarkPage = dynamic_cast< SdPage* >( pBookmarkDoc->GetPage(nBMPage) );
+ SdPage* pBookmarkPage = pBMPage;
if (bReplace )
{
ReplacePageInCustomShows( dynamic_cast< SdPage* >( GetPage( nActualInsertPos ) ), pBookmarkPage );
@@ -701,8 +719,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 )
@@ -801,17 +819,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());
@@ -837,8 +855,8 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
// 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) &&
@@ -849,7 +867,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);
@@ -883,7 +901,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);
@@ -902,7 +920,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);
@@ -913,7 +931,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)
@@ -921,7 +939,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);
@@ -932,7 +950,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);
@@ -945,7 +963,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
}
// Make absolutely sure no double masterpages are there
- RemoveUnnecessaryMasterPages(NULL, TRUE, TRUE);
+ RemoveUnnecessaryMasterPages(NULL, sal_True, sal_True);
if( bUndo )
EndUndo();
@@ -960,15 +978,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;
@@ -990,7 +1008,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject(
}
else
{
- return FALSE;
+ return sal_False;
}
if (!pBookmarkList)
@@ -1004,7 +1022,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
@@ -1020,7 +1038,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject(
if (pObj->GetObjInventor() == SdrInventor &&
pObj->GetObjIdentifier() == OBJ_OLE2)
{
- bOLEObjFound = TRUE;
+ bOLEObjFound = sal_True;
}
if (!pBMView)
@@ -1043,7 +1061,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject(
pPV = pBMView->ShowSdrPage(pPage);
}
- pBMView->MarkObj(pObj, pPV, FALSE);
+ pBMView->MarkObj(pObj, pPV, sal_False);
}
}
}
@@ -1090,7 +1108,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject(
aObjPos = Rectangle(Point(), pPage->GetSize()).Center();
}
- ULONG nCountBefore = 0;
+ sal_uLong nCountBefore = 0;
if (pExchangeList)
{
@@ -1100,13 +1118,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
@@ -1116,9 +1134,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())
@@ -1188,7 +1206,7 @@ void SdDrawDocument::DisposeLoadedModels()
bool SdDrawDocument::IsReadOnly() const
{
- return FALSE;
+ return sal_False;
}
@@ -1199,7 +1217,7 @@ bool SdDrawDocument::IsReadOnly() const
|*
\************************************************************************/
-void SdDrawDocument::SetAllocDocSh(BOOL bAlloc)
+void SdDrawDocument::SetAllocDocSh(sal_Bool bAlloc)
{
mbAllocDocSh = bAlloc;
@@ -1217,7 +1235,7 @@ void SdDrawDocument::SetAllocDocSh(BOOL bAlloc)
|*
\************************************************************************/
-List* SdDrawDocument::GetCustomShowList(BOOL bCreate)
+List* SdDrawDocument::GetCustomShowList(sal_Bool bCreate)
{
if (!mpCustomShowList && bCreate)
{
@@ -1293,9 +1311,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
@@ -1316,13 +1334,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)
{
@@ -1335,7 +1353,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;
@@ -1343,12 +1361,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 ) )
{
@@ -1365,21 +1383,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;
}
}
}
@@ -1424,15 +1442,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;
}
}
@@ -1479,16 +1497,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();
@@ -1513,7 +1531,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
@@ -1531,7 +1549,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);
@@ -1564,7 +1582,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
pUndoMgr->LeaveListAction();
if( mpDocSh )
- mpDocSh->SetWaitCursor( FALSE );
+ mpDocSh->SetWaitCursor( sal_False );
OSL_FAIL( "SdDrawDocument::SetMasterPage() failed!" );
@@ -1573,13 +1591,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;
}
}
@@ -1610,7 +1628,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");
@@ -1640,7 +1658,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;
@@ -1670,7 +1688,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);
@@ -1695,7 +1713,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);
}
}
@@ -1723,7 +1741,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)
@@ -1754,7 +1772,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();
@@ -1783,7 +1801,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);
@@ -1804,7 +1822,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(),
@@ -1818,7 +1836,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(),
@@ -1852,9 +1870,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++)
{
@@ -1864,15 +1882,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;
@@ -1889,7 +1907,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);
}
@@ -1900,7 +1918,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(),
@@ -1915,7 +1933,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(),
@@ -1940,7 +1958,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());
@@ -1971,7 +1989,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
SdPresentationLayoutUndoAction * pPLUndoAction =
new SdPresentationLayoutUndoAction
(this, aOldLayoutName, aName,
- eOldAutoLayout, eNewAutoLayout, TRUE,
+ eOldAutoLayout, eNewAutoLayout, sal_True,
pPage);
pUndoMgr->AddUndoAction(pPLUndoAction);
}
@@ -2006,14 +2024,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,
bool bMergeMasterPages, bool bAllMasterPages,
bool bUndo, bool bTreadSourceAsConst)
{
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 150cf7939272..3470a41f46d1 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -116,6 +116,7 @@
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <svl/itemset.hxx>
+#include "app.hrc"
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -149,8 +150,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));
@@ -161,7 +162,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));
@@ -171,19 +172,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));
@@ -194,10 +196,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;
@@ -228,8 +230,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 ));
@@ -249,7 +251,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
@@ -293,7 +295,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(XLineStartWidthItem(700));
pISet->Put(XLineEndWidthItem(300));
- pISet->Put(XLineStartCenterItem(TRUE));
+ pISet->Put(XLineStartCenterItem(sal_True));
// ---- Objekt mit Schatten -------------------------------------------
@@ -303,12 +305,12 @@ 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 -------------------------------------------
+ // ---- Objekt ohne F�llung -------------------------------------------
aName = String(SdResId(STR_POOLSHEET_OBJWITHOUTFILL));
pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
@@ -317,6 +319,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet = &pSheet->GetItemSet();
pISet->Put(XFillStyleItem(XFILL_NONE));
+ pISet->Put(XLineColorItem(String(), RGB_Color(COL_BLACK)));
// ---- Text ----------------------------------------------------------
@@ -329,7 +332,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(XLineStyleItem(XLINE_NONE));
pISet->Put(XFillStyleItem(XFILL_NONE));
- // ---- Textkrper ----------------------------------------------------
+ // ---- Textk�rper ----------------------------------------------------
aName = String(SdResId(STR_POOLSHEET_TEXTBODY));
pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
@@ -342,7 +345,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(SvxFontHeightItem(564, 100, EE_CHAR_FONTHEIGHT)); // 16 pt
- // ---- Textkrper mit Blocksatz --------------------------------------
+ // ---- Textk�rper mit Blocksatz --------------------------------------
aName = String(SdResId(STR_POOLSHEET_TEXTBODY_JUSTIFY));
pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
@@ -395,7 +398,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));
@@ -419,7 +422,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));
@@ -495,6 +498,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
@@ -557,7 +561,7 @@ void SdDrawDocument::CreateDefaultCellStyles()
// ---- Default -----------------------------------------------
- USHORT nMask = SFXSTYLEBIT_AUTO;
+ sal_uInt16 nMask = SFXSTYLEBIT_AUTO;
OUString aDefaultCellStyleName( RTL_CONSTASCII_USTRINGPARAM("default") );
@@ -611,7 +615,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) );
@@ -723,11 +727,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++)
{
@@ -771,14 +775,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() )
@@ -791,7 +795,7 @@ void SdDrawDocument::StartOnlineSpelling(BOOL bForceSpelling)
pOutl->SetDefaultLanguage( meLanguage );
mpOnlineSpellingList = new ShapeList;
- USHORT nPage;
+ sal_uInt16 nPage;
for ( nPage = 0; nPage < GetPageCount(); nPage++ )
{
@@ -842,14 +846,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;
}
}
@@ -911,7 +915,7 @@ IMPL_LINK(SdDrawDocument, OnlineSpellingHdl, Timer*, EMPTYARG )
else
{
// Spelling wurde initial durchgefuehrt
- mbInitialOnlineSpellingEnabled = FALSE;
+ mbInitialOnlineSpellingEnabled = sal_False;
// Suche beenden
StopOnlineSpelling();
@@ -933,14 +937,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)
{
@@ -976,9 +980,9 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj)
}
pOutl->SetStatusEventHdl(aEvtHdl);
- pOutl->SetUpdateMode(FALSE);
+ pOutl->SetUpdateMode(sal_False);
pOutl->Init( nOldOutlMode );
- mbHasOnlineSpellErrors = FALSE;
+ mbHasOnlineSpellErrors = sal_False;
}
}
@@ -1023,7 +1027,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);
@@ -1041,7 +1045,7 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject*
delete mpOnlineSearchItem;
mpOnlineSearchItem = NULL;
- USHORT nCommand = pInfo->nCommand;
+ sal_uInt16 nCommand = pInfo->nCommand;
if (nCommand == SPELLCMD_IGNOREWORD
// restart when add to dictionary takes place, too.
@@ -1049,7 +1053,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();
@@ -1074,9 +1078,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);
@@ -1114,10 +1118,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)
{
@@ -1128,7 +1132,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;
@@ -1156,11 +1160,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);
@@ -1197,7 +1201,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);
@@ -1207,7 +1211,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);
@@ -1255,7 +1259,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);
@@ -1318,14 +1322,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);
@@ -1448,17 +1452,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 2d024f8a7c84..0c3979bb6ec0 100644..100755
--- a/sd/source/core/drawdoc_animations.cxx
+++ b/sd/source/core/drawdoc_animations.cxx
@@ -42,7 +42,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 a0ed03c3ce06..a0ed03c3ce06 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 6c19008f6c16..21263657c503 100644..100755
--- a/sd/source/core/pglink.cxx
+++ b/sd/source/core/pglink.cxx
@@ -105,21 +105,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 f1e5fd073ea8..743fb0b3887a 100644..100755
--- a/sd/source/core/sdattr.cxx
+++ b/sd/source/core/sdattr.cxx
@@ -43,7 +43,7 @@ TYPEINIT1_AUTOFACTORY( DiaEffectItem, SfxEnumItem );
DiaEffectItem::DiaEffectItem( presentation::FadeEffect eFE ) :
- SfxEnumItem( ATTR_DIA_EFFECT, (USHORT)eFE )
+ SfxEnumItem( ATTR_DIA_EFFECT, (sal_uInt16)eFE )
{
}
@@ -60,7 +60,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 );
}
@@ -74,7 +74,7 @@ TYPEINIT1_AUTOFACTORY( DiaSpeedItem, SfxEnumItem );
DiaSpeedItem::DiaSpeedItem( FadeSpeed eFS ) :
- SfxEnumItem( ATTR_DIA_SPEED, (USHORT)eFS )
+ SfxEnumItem( ATTR_DIA_SPEED, (sal_uInt16)eFS )
{
}
@@ -91,7 +91,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 );
}
@@ -104,7 +104,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 )
{
}
@@ -121,7 +121,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 );
}
@@ -134,7 +134,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 f67f550b984c..306f9ff394dd 100644..100755
--- a/sd/source/core/sdiocmpt.cxx
+++ b/sd/source/core/sdiocmpt.cxx
@@ -36,12 +36,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();
}
@@ -78,7 +78,7 @@ void old_SdrDownCompat::OpenSubRecord()
Write();
}
- bOpen = TRUE;
+ bOpen = sal_True;
}
void old_SdrDownCompat::CloseSubRecord()
@@ -86,11 +86,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);
@@ -104,7 +104,7 @@ void old_SdrDownCompat::CloseSubRecord()
rStream.Seek(nAktPos);
}
- bOpen = FALSE;
+ bOpen = sal_False;
}
/*************************************************************************
@@ -113,7 +113,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 15ff806d8791..d929dc9f8948 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -65,7 +65,7 @@
#include "../ui/inc/DrawDocShell.hxx"
#include "Outliner.hxx"
-
+#include "app.hrc"
#include "eetext.hxx"
#include "drawdoc.hxx"
#include "sdpage.hxx"
@@ -97,20 +97,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)
@@ -194,7 +194,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;
@@ -247,10 +247,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;
@@ -265,7 +265,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
if (mbMaster)
{
- pSdrObj->SetNotVisibleAsMaster(TRUE);
+ pSdrObj->SetNotVisibleAsMaster(sal_True);
}
}
break;
@@ -276,7 +276,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
if (mbMaster)
{
- pSdrObj->SetNotVisibleAsMaster(TRUE);
+ pSdrObj->SetNotVisibleAsMaster(sal_True);
}
}
break;
@@ -287,7 +287,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
if (mbMaster)
{
- pSdrObj->SetNotVisibleAsMaster(TRUE);
+ pSdrObj->SetNotVisibleAsMaster(sal_True);
}
}
break;
@@ -386,7 +386,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
pSdrObj = new SdrPageObj();
}
- pSdrObj->SetResizeProtect(TRUE);
+ pSdrObj->SetResizeProtect(sal_True);
}
break;
@@ -416,7 +416,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
// 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 )
@@ -432,9 +432,9 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
// 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
@@ -462,7 +462,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 );
@@ -508,7 +508,7 @@ 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
@@ -517,12 +517,12 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
{
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( ' ' );
@@ -541,7 +541,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);
@@ -578,7 +578,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)
{
@@ -597,7 +597,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();
@@ -712,8 +712,8 @@ 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();
if( bUndo )
pUndoManager->AddUndoAction( new UndoObjectUserCall(*pObj) );
@@ -726,9 +726,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);
@@ -758,10 +758,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;
@@ -807,7 +807,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);
@@ -859,17 +859,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 ) )
{
@@ -894,21 +894,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
{
@@ -939,25 +939,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 );
}
OSL_FAIL("SdPage::CreateDefaultPresObj() - this should not happen!");
@@ -1292,7 +1292,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);
@@ -1352,7 +1352,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);
@@ -1541,14 +1541,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;
@@ -1616,7 +1616,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);
@@ -1641,7 +1641,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);
@@ -1653,7 +1653,7 @@ SdrObject* SdPage::RemoveObject(ULONG nObjNum)
|*
\************************************************************************/
-SdrObject* SdPage::NbcRemoveObject(ULONG nObjNum)
+SdrObject* SdPage::NbcRemoveObject(sal_uLong nObjNum)
{
onRemoveObject(GetObj( nObjNum ));
return FmFormPage::NbcRemoveObject(nObjNum);
@@ -1661,7 +1661,7 @@ SdrObject* SdPage::NbcRemoveObject(ULONG nObjNum)
// 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);
@@ -1669,7 +1669,7 @@ SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, ULONG nObjNum)
// 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);
@@ -1716,7 +1716,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() )
@@ -1725,7 +1725,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() )
{
@@ -1733,7 +1733,7 @@ void SdPage::SetLftBorder(INT32 nBorder)
}
}
-void SdPage::SetRgtBorder(INT32 nBorder)
+void SdPage::SetRgtBorder(sal_Int32 nBorder)
{
if (nBorder != GetRgtBorder() )
{
@@ -1741,7 +1741,7 @@ void SdPage::SetRgtBorder(INT32 nBorder)
}
}
-void SdPage::SetUppBorder(INT32 nBorder)
+void SdPage::SetUppBorder(sal_Int32 nBorder)
{
if (nBorder != GetUppBorder() )
{
@@ -1749,7 +1749,7 @@ void SdPage::SetUppBorder(INT32 nBorder)
}
}
-void SdPage::SetLwrBorder(INT32 nBorder)
+void SdPage::SetLwrBorder(sal_Int32 nBorder)
{
if (nBorder != GetLwrBorder() )
{
@@ -1763,7 +1763,7 @@ void SdPage::SetLwrBorder(INT32 nBorder)
|*
\************************************************************************/
-void SdPage::SetBackgroundFullSize( BOOL bIn )
+void SdPage::SetBackgroundFullSize( sal_Bool bIn )
{
if( bIn != mbBackgroundFullSize )
{
@@ -1782,7 +1782,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 );
@@ -1790,10 +1790,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
@@ -1840,11 +1840,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);
@@ -1852,7 +1852,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)
@@ -1882,9 +1882,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))
{
@@ -1895,7 +1895,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));
@@ -1923,7 +1923,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 );
@@ -1935,7 +1935,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));
@@ -1956,7 +1956,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
@@ -1985,8 +1985,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 ));
@@ -2003,8 +2003,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 )
@@ -2052,8 +2052,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) )
@@ -2066,15 +2066,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());
@@ -2132,7 +2132,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 );
@@ -2148,7 +2148,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 )
@@ -2192,8 +2192,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)
{
@@ -2208,7 +2208,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 ) );
}
@@ -2237,13 +2237,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);
}
@@ -2254,13 +2254,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);
}
}
@@ -2281,8 +2281,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) );
@@ -2367,14 +2367,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() );
// Always set the object's StyleSheet at the Outliner to
@@ -2514,7 +2514,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));
@@ -2537,7 +2537,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( ' ' );
@@ -2836,7 +2836,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?
@@ -2860,8 +2860,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;
}
}
@@ -2919,7 +2919,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 76a23d4b730e..e5576bc01c1a 100644..100755
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -67,7 +67,7 @@ extern void NotifyDocumentEvent( SdDrawDocument* pDocument, const rtl::OUString&
/*************************************************************************
|*
-|* SetPresentationLayout, setzt: Layoutnamen, Masterpage-Verknpfung und
+|* SetPresentationLayout, setzt: Layoutnamen, Masterpage-Verkn�pfung und
|* Vorlagen fuer Praesentationsobjekte
|*
|* Vorraussetzungen: - Die Seite muss bereits das richtige Model kennen!
@@ -75,20 +75,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
@@ -105,8 +105,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 )
{
@@ -154,9 +154,9 @@ void SdPage::SetPresentationLayout(const String& rLayoutName,
boost::ptr_vector<StyleReplaceData> aReplList;
bool bListsFilled = 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);
@@ -252,14 +252,14 @@ 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);
}
}
}
@@ -395,7 +395,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/shapelist.cxx b/sd/source/core/shapelist.cxx
index 3e809868187c..2e3b35f3e585 100644
--- a/sd/source/core/shapelist.cxx
+++ b/sd/source/core/shapelist.cxx
@@ -85,44 +85,6 @@ SdrObject* ShapeList::removeShape( SdrObject& rObject )
return 0;
}
-void ShapeList::replaceShape( SdrObject& rOldObject, SdrObject& rNewObject )
-{
- if( &rOldObject == &rNewObject )
- return;
-
- ListImpl::iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), &rNewObject ) );
- if( aIter != maShapeList.end() )
- {
- bool bIterErased = aIter == maIter;
- (*aIter)->RemoveObjectUser(*this);
- aIter = maShapeList.erase( aIter );
-
- if( bIterErased )
- maIter = aIter;
- }
-
- aIter = std::find( maShapeList.begin(), maShapeList.end(), &rOldObject );
- if( aIter != maShapeList.end() )
- {
- bool bIterErased = aIter == maIter;
-
- ListImpl::iterator iNew( maShapeList.insert( aIter, &rNewObject ) );
-
- (*aIter)->RemoveObjectUser(*this);
- aIter = maShapeList.erase( aIter );
-
- rNewObject.AddObjectUser( *this );
-
- if( bIterErased )
- maIter = iNew;
- }
- else
- {
- OSL_FAIL("sd::ShapeList::replaceShape(), given shape not part of list!");
- addShape( rNewObject );
- }
-}
-
/** removes all shapes from this list
NOTE: iterators will become invalid */
void ShapeList::clear()
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 7338f7066b58..b097563bcbef 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -75,6 +75,7 @@
#include "sdpage.hxx"
#include "helpids.h"
#include <svl/itemset.hxx>
+#include "app.hrc"
using ::rtl::OUString;
using namespace ::com::sun::star::uno;
@@ -119,7 +120,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);
}
@@ -155,7 +156,7 @@ void SdStyleSheetPool::CreateOutlineSheetList (const String& rLayoutName, std::v
aName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ));
aName += String(SdResId(STR_LAYOUT_OUTLINE));
- for (USHORT nSheet = 1; nSheet < 10; nSheet++)
+ for (sal_uInt16 nSheet = 1; nSheet < 10; nSheet++)
{
String aFullName(aName);
aFullName.Append( sal_Unicode( ' ' ));
@@ -211,7 +212,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++)
{
@@ -246,17 +247,17 @@ 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) );
rSet.Put( SdrTextFitToSizeTypeItem(SDRTEXTFIT_AUTOFIT) );
- rSet.Put( SdrTextAutoGrowHeightItem(FALSE) );
+ rSet.Put( SdrTextAutoGrowHeightItem(sal_False) );
// #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,8 +266,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
}
}
- ULONG nFontSize = 20;
- USHORT nLower = 100;
+ sal_uLong nFontSize = 20;
+ sal_uInt16 nLower = 100;
switch (nLevel)
{
@@ -299,7 +300,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 ) );
@@ -367,15 +368,15 @@ 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 ));
rTitleSet.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
rTitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
// #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 );
@@ -412,15 +413,15 @@ 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 ));
rSubtitleSet.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
rSubtitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
// #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);
@@ -460,14 +461,14 @@ 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( 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# */
@@ -487,12 +488,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));
}
/**************************************************************************
@@ -512,7 +514,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!" );
@@ -718,7 +720,7 @@ void SdStyleSheetPool::CreateLayoutSheetNames(const String& rLayoutName, std::ve
String aName(SdResId(STR_LAYOUT_OUTLINE));
String aStr;
- for (USHORT nLevel = 1; nLevel < 10; nLevel++)
+ for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
{
aStr = String( aPrefix );
aStr.Append(aName);
@@ -759,7 +761,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();
@@ -785,7 +787,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
SfxStyleSheetBase* pSheet = NULL;
SfxStyleSheetBase* pParent = NULL;
- USHORT nUsedMask = SFXSTYLEBIT_USED;
+ sal_uInt16 nUsedMask = SFXSTYLEBIT_USED;
aName = String(SdResId(STR_PSEUDOSHEET_TITLE));
if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
@@ -835,7 +837,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( ' ' ));
@@ -877,12 +879,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;
@@ -925,7 +927,7 @@ void SdStyleSheetPool::UpdateStdNames()
default:
// 0 oder falsche (alte) HelpId
- bHelpKnown = FALSE;
+ bHelpKnown = sal_False;
}
if( bHelpKnown )
{
@@ -966,7 +968,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 );
@@ -984,7 +986,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 )
@@ -1000,13 +1002,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);
@@ -1030,8 +1028,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);
@@ -1057,8 +1055,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);
@@ -1067,7 +1065,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetAbsLSpace(nLSpace);
short nFirstLineOffset = -600;
- ULONG nFontSize = 20;
+ sal_uLong nFontSize = 20;
switch(i)
{
case 0:
@@ -1102,7 +1100,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 );
@@ -1130,10 +1128,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;
}
@@ -1382,10 +1380,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 b949444042a3..fc106cf4f51d 100644..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,
@@ -312,7 +312,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,
@@ -345,14 +345,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 )
@@ -471,7 +471,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()));
@@ -533,7 +533,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()));
@@ -564,7 +564,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();
@@ -579,11 +579,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
@@ -601,15 +601,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);
}
@@ -618,7 +618,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);
@@ -629,9 +629,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);
}
}
@@ -639,35 +639,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 );
@@ -962,13 +962,11 @@ void SAL_CALL SdStyleSheet::setName( const OUString& rName ) throw(RuntimeExcep
{
SolarMutexGuard aGuard;
throwIfDisposed();
- if( IsUserDefined() )
+
+ if( SetName( rName ) )
{
- if( SetName( rName ) )
- {
- msApiName = rName;
- Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
- }
+ msApiName = rName;
+ Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
}
}
@@ -1015,28 +1013,25 @@ void SAL_CALL SdStyleSheet::setParentStyle( const OUString& rParentName ) throw
SolarMutexGuard aGuard;
throwIfDisposed();
- if( IsUserDefined() )
+ if( rParentName.getLength() )
{
- if( rParentName.getLength() )
- {
- const SfxStyles& rStyles = mxPool->GetStyles();
+ const SfxStyles& rStyles = mxPool->GetStyles();
for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); ++iter )
+ {
+ SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
+ if( pStyle && (pStyle->nFamily == nFamily) && (pStyle->msApiName == rParentName) )
{
- SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
- if( pStyle && (pStyle->nFamily == nFamily) && (pStyle->msApiName == rParentName) )
- {
- if( pStyle != this )
- SetParent( pStyle->GetName() );
- return;
- }
+ if( pStyle != this )
+ SetParent( pStyle->GetName() );
+ return;
}
- throw NoSuchElementException();
- }
- else
- {
- SetParent( rParentName );
}
+ throw NoSuchElementException();
+ }
+ else
+ {
+ SetParent( rParentName );
}
}
@@ -1304,7 +1299,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 f08c7961a163..adeafcbd60eb 100644..100755
--- a/sd/source/core/undo/undomanager.cxx
+++ b/sd/source/core/undo/undomanager.cxx
@@ -33,42 +33,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
- {
- OSL_FAIL("sd::UndoManager::LeaveListAction(), no open list action!" );
- }
- }
-}
-
-void UndoManager::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg /* = FALSE */ )
-{
- if( !isInUndo() )
+ if( !IsDoing() )
{
ClearLinkedRedoActions();
SfxUndoManager::AddUndoAction( pAction, bTryMerg );
@@ -80,22 +62,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 8687de4d3c9f..566bdfd94dcf 100644..100755
--- a/sd/source/core/undo/undoobjects.cxx
+++ b/sd/source/core/undo/undoobjects.cxx
@@ -245,7 +245,7 @@ void UndoObjectSetText::Redo()
if( mpUndoAnimation )
mpUndoAnimation->Redo();
SdrUndoObjSetText::Redo();
- mxSdrObject->SetEmptyPresObj(mbNewEmptyPresObj ? TRUE : FALSE );
+ mxSdrObject->SetEmptyPresObj(mbNewEmptyPresObj ? sal_True : sal_False );
}
}
@@ -348,7 +348,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 );
}
//////////////////////////////////////////////////////////////////////////////
@@ -403,7 +403,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 )
{