summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdmodel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw/svdmodel.cxx')
-rw-r--r--svx/source/svdraw/svdmodel.cxx292
1 files changed, 146 insertions, 146 deletions
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 7718451ab945..bf6db87761f7 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -123,10 +123,10 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
eUIUnit=FUNIT_MM;
aUIScale=Fraction(1,1);
nUIUnitKomma=0;
- bUIOnlyKomma=FALSE;
+ bUIOnlyKomma=sal_False;
pLayerAdmin=NULL;
pItemPool=pPool;
- bMyPool=FALSE;
+ bMyPool=sal_False;
m_pEmbeddedHelper=_pEmbeddedHelper;
pDrawOutliner=NULL;
pHitTestOutliner=NULL;
@@ -144,21 +144,21 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
mbUndoEnabled=true;
nProgressPercent=0;
nLoadVersion=0;
- bExtColorTable=FALSE;
+ bExtColorTable=sal_False;
mbChanged = sal_False;
- bInfoChanged=FALSE;
- bPagNumsDirty=FALSE;
- bMPgNumsDirty=FALSE;
- bPageNotValid=FALSE;
- bSavePortable=FALSE;
- bSaveCompressed=FALSE;
- bSaveNative=FALSE;
- bSwapGraphics=FALSE;
+ bInfoChanged=sal_False;
+ bPagNumsDirty=sal_False;
+ bMPgNumsDirty=sal_False;
+ bPageNotValid=sal_False;
+ bSavePortable=sal_False;
+ bSaveCompressed=sal_False;
+ bSaveNative=sal_False;
+ bSwapGraphics=sal_False;
nSwapGraphicsMode=SDR_SWAPGRAPHICSMODE_DEFAULT;
- bSaveOLEPreview=FALSE;
- bPasteResize=FALSE;
- bNoBitmapCaching=FALSE;
- bReadOnly=FALSE;
+ bSaveOLEPreview=sal_False;
+ bPasteResize=sal_False;
+ bNoBitmapCaching=sal_False;
+ bReadOnly=sal_False;
nStreamCompressMode=COMPRESSMODE_NONE;
nStreamNumberFormat=NUMBERFORMAT_INT_BIGENDIAN;
nDefaultTabulator=0;
@@ -169,12 +169,12 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
pGradientList=NULL;
pBitmapList=NULL;
mpNumberFormatter = NULL;
- bTransparentTextFrames=FALSE;
- bStarDrawPreviewMode = FALSE;
+ bTransparentTextFrames=sal_False;
+ bStarDrawPreviewMode = sal_False;
nStarDrawPreviewMasterPageNum = SDRPAGE_NOTFOUND;
pModelStorage = NULL;
mpForbiddenCharactersTable = NULL;
- mbModelLocked = FALSE;
+ mbModelLocked = sal_False;
mpOutlinerCache = NULL;
mbKernAsianPunctuation = sal_False;
mbAddExtLeading = sal_False;
@@ -196,7 +196,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
// OutlinerPool als SecondaryPool des SdrPool
pItemPool->SetSecondaryPool(pOutlPool);
// Merken, dass ich mir die beiden Pools selbst gemacht habe
- bMyPool=TRUE;
+ bMyPool=sal_True;
}
pItemPool->SetDefaultMetric((SfxMapUnit)eObjUnit);
@@ -217,10 +217,10 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
// den DrawOutliner OnDemand erzeugen geht noch nicht, weil ich den Pool
// sonst nicht kriege (erst ab 302!)
pDrawOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, this );
- ImpSetOutlinerDefaults(pDrawOutliner, TRUE);
+ ImpSetOutlinerDefaults(pDrawOutliner, sal_True);
pHitTestOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, this );
- ImpSetOutlinerDefaults(pHitTestOutliner, TRUE);
+ ImpSetOutlinerDefaults(pHitTestOutliner, sal_True);
ImpCreateTables();
}
@@ -234,7 +234,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal
#endif
DBG_CTOR(SdrModel,NULL);
- ImpCtor(pPool,pPers,FALSE, (FASTBOOL)bLoadRefCounts);
+ ImpCtor(pPool,pPers,sal_False, (int)bLoadRefCounts);
}
SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal_Bool bLoadRefCounts):
@@ -247,10 +247,10 @@ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbed
#endif
DBG_CTOR(SdrModel,NULL);
- ImpCtor(pPool,pPers,FALSE, (FASTBOOL)bLoadRefCounts);
+ ImpCtor(pPool,pPers,sal_False, (int)bLoadRefCounts);
}
-SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FASTBOOL bUseExtColorTable, sal_Bool bLoadRefCounts):
+SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, int bUseExtColorTable, sal_Bool bLoadRefCounts):
maMaPag(1024,32,32),
maPages(1024,32,32)
{
@@ -259,10 +259,10 @@ SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FAS
#endif
DBG_CTOR(SdrModel,NULL);
- ImpCtor(pPool,pPers,bUseExtColorTable, (FASTBOOL)bLoadRefCounts);
+ ImpCtor(pPool,pPers,bUseExtColorTable, (int)bLoadRefCounts);
}
-SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FASTBOOL bUseExtColorTable, sal_Bool bLoadRefCounts):
+SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, int bUseExtColorTable, sal_Bool bLoadRefCounts):
maMaPag(1024,32,32),
maPages(1024,32,32),
aTablePath(rPath)
@@ -272,7 +272,7 @@ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbed
#endif
DBG_CTOR(SdrModel,NULL);
- ImpCtor(pPool,pPers,bUseExtColorTable, (FASTBOOL)bLoadRefCounts);
+ ImpCtor(pPool,pPers,bUseExtColorTable, (int)bLoadRefCounts);
}
SdrModel::SdrModel(const SdrModel& /*rSrcModel*/):
@@ -398,30 +398,30 @@ void SdrModel::operator=(const SdrModel& /*rSrcModel*/)
DBG_ERROR("SdrModel::operator=() ist noch nicht implementiert");
}
-FASTBOOL SdrModel::operator==(const SdrModel& /*rCmpModel*/) const
+int SdrModel::operator==(const SdrModel& /*rCmpModel*/) const
{
DBG_ERROR("SdrModel::operator==() ist noch nicht implementiert");
- return FALSE;
+ return sal_False;
}
-void SdrModel::SetSwapGraphics( FASTBOOL bSwap )
+void SdrModel::SetSwapGraphics( int bSwap )
{
bSwapGraphics = bSwap;
}
-FASTBOOL SdrModel::IsReadOnly() const
+int SdrModel::IsReadOnly() const
{
return bReadOnly;
}
-void SdrModel::SetReadOnly(FASTBOOL bYes)
+void SdrModel::SetReadOnly(int bYes)
{
bReadOnly=bYes;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-void SdrModel::SetMaxUndoActionCount(ULONG nAnz)
+void SdrModel::SetMaxUndoActionCount(sal_uIntPtr nAnz)
{
if (nAnz<1) nAnz=1;
nMaxUndoCount=nAnz;
@@ -450,9 +450,9 @@ void SdrModel::ClearUndoBuffer()
}
}
-FASTBOOL SdrModel::Undo()
+int SdrModel::Undo()
{
- FASTBOOL bRet=FALSE;
+ int bRet=sal_False;
if( mpImpl->mpUndoManager )
{
DBG_ERROR("svx::SdrModel::Undo(), method not supported with application undo manager!");
@@ -467,16 +467,16 @@ FASTBOOL SdrModel::Undo()
pDo->Undo();
if(pRedoStack==NULL)
pRedoStack=new Container(1024,16,16);
- pRedoStack->Insert(pUndoStack->Remove((ULONG)0),(ULONG)0);
+ pRedoStack->Insert(pUndoStack->Remove((sal_uIntPtr)0),(sal_uIntPtr)0);
mbUndoEnabled = bWasUndoEnabled;
}
}
return bRet;
}
-FASTBOOL SdrModel::Redo()
+int SdrModel::Redo()
{
- FASTBOOL bRet=FALSE;
+ int bRet=sal_False;
if( mpImpl->mpUndoManager )
{
DBG_ERROR("svx::SdrModel::Redo(), method not supported with application undo manager!");
@@ -491,16 +491,16 @@ FASTBOOL SdrModel::Redo()
pDo->Redo();
if(pUndoStack==NULL)
pUndoStack=new Container(1024,16,16);
- pUndoStack->Insert(pRedoStack->Remove((ULONG)0),(ULONG)0);
+ pUndoStack->Insert(pRedoStack->Remove((sal_uIntPtr)0),(sal_uIntPtr)0);
mbUndoEnabled = bWasUndoEnabled;
}
}
return bRet;
}
-FASTBOOL SdrModel::Repeat(SfxRepeatTarget& rView)
+int SdrModel::Repeat(SfxRepeatTarget& rView)
{
- FASTBOOL bRet=FALSE;
+ int bRet=sal_False;
if( mpImpl->mpUndoManager )
{
DBG_ERROR("svx::SdrModel::Redo(), method not supported with application undo manager!");
@@ -513,7 +513,7 @@ FASTBOOL SdrModel::Repeat(SfxRepeatTarget& rView)
if(pDo->CanRepeat(rView))
{
pDo->Repeat(rView);
- bRet=TRUE;
+ bRet=sal_True;
}
}
}
@@ -533,7 +533,7 @@ void SdrModel::ImpPostUndoAction(SdrUndoAction* pUndo)
{
if (pUndoStack==NULL)
pUndoStack=new Container(1024,16,16);
- pUndoStack->Insert(pUndo,(ULONG)0);
+ pUndoStack->Insert(pUndo,(sal_uIntPtr)0);
while (pUndoStack->Count()>nMaxUndoCount)
{
delete (SfxUndoAction*)pUndoStack->Remove(pUndoStack->Count()-1);
@@ -782,7 +782,7 @@ void SdrModel::ClearModel(sal_Bool bCalledFromDestructor)
sal_Int32 nAnz=GetPageCount();
for (i=nAnz-1; i>=0; i--)
{
- DeletePage( (USHORT)i );
+ DeletePage( (sal_uInt16)i );
}
maPages.Clear();
// #109538#
@@ -792,7 +792,7 @@ void SdrModel::ClearModel(sal_Bool bCalledFromDestructor)
nAnz=GetMasterPageCount();
for(i=nAnz-1; i>=0; i--)
{
- DeleteMasterPage( (USHORT)i );
+ DeleteMasterPage( (sal_uInt16)i );
}
maMaPag.Clear();
// #109538#
@@ -808,7 +808,7 @@ SdrModel* SdrModel::AllocModel() const
return pModel;
}
-SdrPage* SdrModel::AllocPage(FASTBOOL bMasterPage)
+SdrPage* SdrModel::AllocPage(int bMasterPage)
{
return new SdrPage(*this,bMasterPage);
}
@@ -820,9 +820,9 @@ void SdrModel::SetTextDefaults() const
void ImpGetDefaultFontsLanguage( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rComplex)
{
- const USHORT nItemCnt = 3;
+ const sal_uInt16 nItemCnt = 3;
static struct {
- USHORT nFntType, nLanguage;
+ sal_uInt16 nFntType, nLanguage;
} aOutTypeArr[ nItemCnt ] = {
{ DEFAULTFONT_LATIN_TEXT, LANGUAGE_ENGLISH_US },
{ DEFAULTFONT_CJK_TEXT, LANGUAGE_ENGLISH_US },
@@ -830,7 +830,7 @@ void ImpGetDefaultFontsLanguage( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFo
};
SvxFontItem* aItemArr[ nItemCnt ] = { &rLatin, &rAsian, &rComplex };
- for( USHORT n = 0; n < nItemCnt; ++n )
+ for( sal_uInt16 n = 0; n < nItemCnt; ++n )
{
Font aFnt( OutputDevice::GetDefaultFont(
aOutTypeArr[ n ].nFntType, aOutTypeArr[ n ].nLanguage,
@@ -844,7 +844,7 @@ void ImpGetDefaultFontsLanguage( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFo
}
}
-void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, ULONG nDefTextHgt )
+void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt )
{
// #95114# set application-language specific dynamic pool language defaults
SvxFontItem aSvxFontItem( EE_CHAR_FONTINFO) ;
@@ -897,7 +897,7 @@ SdrOutliner& SdrModel::GetDrawOutliner(const SdrTextObj* pObj) const
boost::shared_ptr< SdrOutliner > SdrModel::CreateDrawOutliner(const SdrTextObj* pObj)
{
boost::shared_ptr< SdrOutliner > xDrawOutliner( SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, this ) );
- ImpSetOutlinerDefaults(xDrawOutliner.get(), TRUE);
+ ImpSetOutlinerDefaults(xDrawOutliner.get(), sal_True);
xDrawOutliner->SetTextObj(pObj);
return xDrawOutliner;
}
@@ -910,7 +910,7 @@ const SdrTextObj* SdrModel::GetFormattingTextObj() const
return NULL;
}
-void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, BOOL bInit )
+void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, sal_Bool bInit )
{
/**************************************************************************
* Initialisierung der Outliner fuer Textausgabe und HitTest
@@ -918,7 +918,7 @@ void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, BOOL bInit )
if( bInit )
{
pOutliner->EraseVirtualDevice();
- pOutliner->SetUpdateMode(FALSE);
+ pOutliner->SetUpdateMode(sal_False);
pOutliner->SetEditTextObjectPool(pItemPool);
pOutliner->SetDefTab(nDefaultTabulator);
}
@@ -949,8 +949,8 @@ void SdrModel::ImpReformatAllTextObjects()
if( isLocked() )
return;
- USHORT nAnz=GetMasterPageCount();
- USHORT nNum;
+ sal_uInt16 nAnz=GetMasterPageCount();
+ sal_uInt16 nNum;
for (nNum=0; nNum<nAnz; nNum++) {
GetMasterPage(nNum)->ReformatAllTextObjects();
}
@@ -991,8 +991,8 @@ SvStream* SdrModel::GetDocumentStream(SdrDocumentStreamInfo& /*rStreamInfo*/) co
// Die Vorlagenattribute der Zeichenobjekte in harte Attribute verwandeln.
void SdrModel::BurnInStyleSheetAttributes()
{
- USHORT nAnz=GetMasterPageCount();
- USHORT nNum;
+ sal_uInt16 nAnz=GetMasterPageCount();
+ sal_uInt16 nNum;
for (nNum=0; nNum<nAnz; nNum++) {
GetMasterPage(nNum)->BurnInStyleSheetAttributes();
}
@@ -1008,7 +1008,7 @@ void SdrModel::RefDeviceChanged()
ImpReformatAllTextObjects();
}
-void SdrModel::SetDefaultFontHeight(ULONG nVal)
+void SdrModel::SetDefaultFontHeight(sal_uIntPtr nVal)
{
if (nVal!=nDefTextHgt) {
nDefTextHgt=nVal;
@@ -1017,7 +1017,7 @@ void SdrModel::SetDefaultFontHeight(ULONG nVal)
}
}
-void SdrModel::SetDefaultTabulator(USHORT nVal)
+void SdrModel::SetDefaultTabulator(sal_uInt16 nVal)
{
if (nDefaultTabulator!=nVal) {
nDefaultTabulator=nVal;
@@ -1294,7 +1294,7 @@ void SdrModel::TakeUnitStr(FieldUnit eUnit, XubString& rStr)
}
}
-void SdrModel::TakeMetricStr(long nVal, XubString& rStr, FASTBOOL bNoUnitChars, sal_Int32 nNumDigits) const
+void SdrModel::TakeMetricStr(long nVal, XubString& rStr, int bNoUnitChars, sal_Int32 nNumDigits) const
{
// #i22167#
// change to double precision usage to not loose decimal places after comma
@@ -1408,9 +1408,9 @@ void SdrModel::TakeMetricStr(long nVal, XubString& rStr, FASTBOOL bNoUnitChars,
rStr += aUIUnitStr;
}
-void SdrModel::TakeWinkStr(long nWink, XubString& rStr, FASTBOOL bNoDegChar) const
+void SdrModel::TakeWinkStr(long nWink, XubString& rStr, int bNoDegChar) const
{
- BOOL bNeg(nWink < 0);
+ sal_Bool bNeg(nWink < 0);
if(bNeg)
nWink = -nWink;
@@ -1436,11 +1436,11 @@ void SdrModel::TakeWinkStr(long nWink, XubString& rStr, FASTBOOL bNoDegChar) con
rStr += DEGREE_CHAR;
}
-void SdrModel::TakePercentStr(const Fraction& rVal, XubString& rStr, FASTBOOL bNoPercentChar) const
+void SdrModel::TakePercentStr(const Fraction& rVal, XubString& rStr, int bNoPercentChar) const
{
- INT32 nMul(rVal.GetNumerator());
- INT32 nDiv(rVal.GetDenominator());
- BOOL bNeg(nMul < 0);
+ sal_Int32 nMul(rVal.GetNumerator());
+ sal_Int32 nDiv(rVal.GetDenominator());
+ sal_Bool bNeg(nMul < 0);
if(nDiv < 0)
bNeg = !bNeg;
@@ -1469,51 +1469,51 @@ void SdrModel::SetChanged(sal_Bool bFlg)
mbChanged = bFlg;
}
-void SdrModel::RecalcPageNums(FASTBOOL bMaster)
+void SdrModel::RecalcPageNums(int bMaster)
{
Container& rPL=*(bMaster ? &maMaPag : &maPages);
- USHORT nAnz=USHORT(rPL.Count());
- USHORT i;
+ sal_uInt16 nAnz=sal_uInt16(rPL.Count());
+ sal_uInt16 i;
for (i=0; i<nAnz; i++) {
SdrPage* pPg=(SdrPage*)(rPL.GetObject(i));
pPg->SetPageNum(i);
}
- if (bMaster) bMPgNumsDirty=FALSE;
- else bPagNumsDirty=FALSE;
+ if (bMaster) bMPgNumsDirty=sal_False;
+ else bPagNumsDirty=sal_False;
}
-void SdrModel::InsertPage(SdrPage* pPage, USHORT nPos)
+void SdrModel::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
{
- USHORT nAnz=GetPageCount();
+ sal_uInt16 nAnz=GetPageCount();
if (nPos>nAnz) nPos=nAnz;
maPages.Insert(pPage,nPos);
// #109538#
PageListChanged();
- pPage->SetInserted(TRUE);
+ pPage->SetInserted(sal_True);
pPage->SetPageNum(nPos);
pPage->SetModel(this);
- if (nPos<nAnz) bPagNumsDirty=TRUE;
+ if (nPos<nAnz) bPagNumsDirty=sal_True;
SetChanged();
SdrHint aHint(HINT_PAGEORDERCHG);
aHint.SetPage(pPage);
Broadcast(aHint);
}
-void SdrModel::DeletePage(USHORT nPgNum)
+void SdrModel::DeletePage(sal_uInt16 nPgNum)
{
SdrPage* pPg=RemovePage(nPgNum);
delete pPg;
}
-SdrPage* SdrModel::RemovePage(USHORT nPgNum)
+SdrPage* SdrModel::RemovePage(sal_uInt16 nPgNum)
{
SdrPage* pPg=(SdrPage*)maPages.Remove(nPgNum);
// #109538#
PageListChanged();
if (pPg!=NULL) {
- pPg->SetInserted(FALSE);
+ pPg->SetInserted(sal_False);
}
- bPagNumsDirty=TRUE;
+ bPagNumsDirty=sal_True;
SetChanged();
SdrHint aHint(HINT_PAGEORDERCHG);
aHint.SetPage(pPg);
@@ -1521,29 +1521,29 @@ SdrPage* SdrModel::RemovePage(USHORT nPgNum)
return pPg;
}
-void SdrModel::MovePage(USHORT nPgNum, USHORT nNewPos)
+void SdrModel::MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
{
SdrPage* pPg=(SdrPage*)maPages.Remove(nPgNum);
// #109538#
PageListChanged();
if (pPg!=NULL) {
- pPg->SetInserted(FALSE);
+ pPg->SetInserted(sal_False);
InsertPage(pPg,nNewPos);
}
}
-void SdrModel::InsertMasterPage(SdrPage* pPage, USHORT nPos)
+void SdrModel::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos)
{
- USHORT nAnz=GetMasterPageCount();
+ sal_uInt16 nAnz=GetMasterPageCount();
if (nPos>nAnz) nPos=nAnz;
maMaPag.Insert(pPage,nPos);
// #109538#
MasterPageListChanged();
- pPage->SetInserted(TRUE);
+ pPage->SetInserted(sal_True);
pPage->SetPageNum(nPos);
pPage->SetModel(this);
if (nPos<nAnz) {
- bMPgNumsDirty=TRUE;
+ bMPgNumsDirty=sal_True;
}
SetChanged();
SdrHint aHint(HINT_PAGEORDERCHG);
@@ -1551,13 +1551,13 @@ void SdrModel::InsertMasterPage(SdrPage* pPage, USHORT nPos)
Broadcast(aHint);
}
-void SdrModel::DeleteMasterPage(USHORT nPgNum)
+void SdrModel::DeleteMasterPage(sal_uInt16 nPgNum)
{
SdrPage* pPg=RemoveMasterPage(nPgNum);
if (pPg!=NULL) delete pPg;
}
-SdrPage* SdrModel::RemoveMasterPage(USHORT nPgNum)
+SdrPage* SdrModel::RemoveMasterPage(sal_uInt16 nPgNum)
{
SdrPage* pRetPg=(SdrPage*)maMaPag.Remove(nPgNum);
// #109538#
@@ -1573,10 +1573,10 @@ SdrPage* SdrModel::RemoveMasterPage(USHORT nPgNum)
GetPage(np)->TRG_ImpMasterPageRemoved(*pRetPg);
}
- pRetPg->SetInserted(FALSE);
+ pRetPg->SetInserted(sal_False);
}
- bMPgNumsDirty=TRUE;
+ bMPgNumsDirty=sal_True;
SetChanged();
SdrHint aHint(HINT_PAGEORDERCHG);
aHint.SetPage(pRetPg);
@@ -1584,18 +1584,18 @@ SdrPage* SdrModel::RemoveMasterPage(USHORT nPgNum)
return pRetPg;
}
-void SdrModel::MoveMasterPage(USHORT nPgNum, USHORT nNewPos)
+void SdrModel::MoveMasterPage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
{
SdrPage* pPg=(SdrPage*)maMaPag.Remove(nPgNum);
// #109538#
MasterPageListChanged();
if (pPg!=NULL) {
- pPg->SetInserted(FALSE);
+ pPg->SetInserted(sal_False);
maMaPag.Insert(pPg,nNewPos);
// #109538#
MasterPageListChanged();
}
- bMPgNumsDirty=TRUE;
+ bMPgNumsDirty=sal_True;
SetChanged();
SdrHint aHint(HINT_PAGEORDERCHG);
aHint.SetPage(pPg);
@@ -1604,9 +1604,9 @@ void SdrModel::MoveMasterPage(USHORT nPgNum, USHORT nNewPos)
////////////////////////////////////////////////////////////////////////////////////////////////////
-FASTBOOL SdrModel::CheckConsistence() const
+int SdrModel::CheckConsistence() const
{
- FASTBOOL bRet=TRUE;
+ int bRet=sal_True;
#ifdef DBG_UTIL
DBG_CHKTHIS(SdrModel,NULL);
#endif
@@ -1616,9 +1616,9 @@ FASTBOOL SdrModel::CheckConsistence() const
////////////////////////////////////////////////////////////////////////////////////////////////////
// #48289#
-void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum,
- USHORT nDestPos,
- FASTBOOL bUndo, FASTBOOL bMoveNoCopy)
+void SdrModel::CopyPages(sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
+ sal_uInt16 nDestPos,
+ int bUndo, int bMoveNoCopy)
{
if( bUndo && !IsUndoEnabled() )
bUndo = false;
@@ -1626,8 +1626,8 @@ void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum,
if( bUndo )
BegUndo(ImpGetResStr(STR_UndoMergeModel));
- USHORT nPageAnz=GetPageCount();
- USHORT nMaxPage=nPageAnz;
+ sal_uInt16 nPageAnz=GetPageCount();
+ sal_uInt16 nMaxPage=nPageAnz;
if (nMaxPage!=0)
nMaxPage--;
@@ -1635,15 +1635,15 @@ void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum,
nFirstPageNum=nMaxPage;
if (nLastPageNum>nMaxPage)
nLastPageNum =nMaxPage;
- FASTBOOL bReverse=nLastPageNum<nFirstPageNum;
+ int bReverse=nLastPageNum<nFirstPageNum;
if (nDestPos>nPageAnz)
nDestPos=nPageAnz;
// Zunaechst die Zeiger der betroffenen Seiten in einem Array sichern
- USHORT nPageNum=nFirstPageNum;
- USHORT nCopyAnz=((!bReverse)?(nLastPageNum-nFirstPageNum):(nFirstPageNum-nLastPageNum))+1;
+ sal_uInt16 nPageNum=nFirstPageNum;
+ sal_uInt16 nCopyAnz=((!bReverse)?(nLastPageNum-nFirstPageNum):(nFirstPageNum-nLastPageNum))+1;
SdrPage** pPagePtrs=new SdrPage*[nCopyAnz];
- USHORT nCopyNum;
+ sal_uInt16 nCopyNum;
for(nCopyNum=0; nCopyNum<nCopyAnz; nCopyNum++)
{
pPagePtrs[nCopyNum]=GetPage(nPageNum);
@@ -1654,11 +1654,11 @@ void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum,
}
// Jetzt die Seiten kopieren
- USHORT nDestNum=nDestPos;
+ sal_uInt16 nDestNum=nDestPos;
for (nCopyNum=0; nCopyNum<nCopyAnz; nCopyNum++)
{
SdrPage* pPg=pPagePtrs[nCopyNum];
- USHORT nPageNum2=pPg->GetPageNum();
+ sal_uInt16 nPageNum2=pPg->GetPageNum();
if (!bMoveNoCopy)
{
const SdrPage* pPg1=GetPage(nPageNum2);
@@ -1694,10 +1694,10 @@ void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum,
}
void SdrModel::Merge(SdrModel& rSourceModel,
- USHORT nFirstPageNum, USHORT nLastPageNum,
- USHORT nDestPos,
- FASTBOOL bMergeMasterPages, FASTBOOL bAllMasterPages,
- FASTBOOL bUndo, FASTBOOL bTreadSourceAsConst)
+ sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
+ sal_uInt16 nDestPos,
+ int bMergeMasterPages, int bAllMasterPages,
+ int bUndo, int bTreadSourceAsConst)
{
if (&rSourceModel==this)
{ // #48289#
@@ -1711,30 +1711,30 @@ void SdrModel::Merge(SdrModel& rSourceModel,
if (bUndo)
BegUndo(ImpGetResStr(STR_UndoMergeModel));
- USHORT nSrcPageAnz=rSourceModel.GetPageCount();
- USHORT nSrcMasterPageAnz=rSourceModel.GetMasterPageCount();
- USHORT nDstMasterPageAnz=GetMasterPageCount();
- FASTBOOL bInsPages=(nFirstPageNum<nSrcPageAnz || nLastPageNum<nSrcPageAnz);
- USHORT nMaxSrcPage=nSrcPageAnz; if (nMaxSrcPage!=0) nMaxSrcPage--;
+ sal_uInt16 nSrcPageAnz=rSourceModel.GetPageCount();
+ sal_uInt16 nSrcMasterPageAnz=rSourceModel.GetMasterPageCount();
+ sal_uInt16 nDstMasterPageAnz=GetMasterPageCount();
+ int bInsPages=(nFirstPageNum<nSrcPageAnz || nLastPageNum<nSrcPageAnz);
+ sal_uInt16 nMaxSrcPage=nSrcPageAnz; if (nMaxSrcPage!=0) nMaxSrcPage--;
if (nFirstPageNum>nMaxSrcPage) nFirstPageNum=nMaxSrcPage;
if (nLastPageNum>nMaxSrcPage) nLastPageNum =nMaxSrcPage;
- FASTBOOL bReverse=nLastPageNum<nFirstPageNum;
+ int bReverse=nLastPageNum<nFirstPageNum;
- USHORT* pMasterMap=NULL;
- FASTBOOL* pMasterNeed=NULL;
- USHORT nMasterNeed=0;
+ sal_uInt16* pMasterMap=NULL;
+ int* pMasterNeed=NULL;
+ sal_uInt16 nMasterNeed=0;
if (bMergeMasterPages && nSrcMasterPageAnz!=0) {
// Feststellen, welche MasterPages aus rSrcModel benoetigt werden
- pMasterMap=new USHORT[nSrcMasterPageAnz];
- pMasterNeed=new FASTBOOL[nSrcMasterPageAnz];
- memset(pMasterMap,0xFF,nSrcMasterPageAnz*sizeof(USHORT));
+ pMasterMap=new sal_uInt16[nSrcMasterPageAnz];
+ pMasterNeed=new int[nSrcMasterPageAnz];
+ memset(pMasterMap,0xFF,nSrcMasterPageAnz*sizeof(sal_uInt16));
if (bAllMasterPages) {
- memset(pMasterNeed,TRUE,nSrcMasterPageAnz*sizeof(FASTBOOL));
+ memset(pMasterNeed,sal_True,nSrcMasterPageAnz*sizeof(int));
} else {
- memset(pMasterNeed,FALSE,nSrcMasterPageAnz*sizeof(FASTBOOL));
- USHORT nAnf= bReverse ? nLastPageNum : nFirstPageNum;
- USHORT nEnd= bReverse ? nFirstPageNum : nLastPageNum;
- for (USHORT i=nAnf; i<=nEnd; i++) {
+ memset(pMasterNeed,sal_False,nSrcMasterPageAnz*sizeof(int));
+ sal_uInt16 nAnf= bReverse ? nLastPageNum : nFirstPageNum;
+ sal_uInt16 nEnd= bReverse ? nFirstPageNum : nLastPageNum;
+ for (sal_uInt16 i=nAnf; i<=nEnd; i++) {
const SdrPage* pPg=rSourceModel.GetPage(i);
if(pPg->TRG_HasMasterPage())
{
@@ -1743,14 +1743,14 @@ void SdrModel::Merge(SdrModel& rSourceModel,
if(nMPgNum < nSrcMasterPageAnz)
{
- pMasterNeed[nMPgNum] = TRUE;
+ pMasterNeed[nMPgNum] = sal_True;
}
}
}
}
// Nun das Mapping der MasterPages bestimmen
- USHORT nAktMaPagNum=nDstMasterPageAnz;
- for (USHORT i=0; i<nSrcMasterPageAnz; i++) {
+ sal_uInt16 nAktMaPagNum=nDstMasterPageAnz;
+ for (sal_uInt16 i=0; i<nSrcMasterPageAnz; i++) {
if (pMasterNeed[i]) {
pMasterMap[i]=nAktMaPagNum;
nAktMaPagNum++;
@@ -1761,7 +1761,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
// rueberholen der Masterpages
if (pMasterMap!=NULL && pMasterNeed!=NULL && nMasterNeed!=0) {
- for (USHORT i=nSrcMasterPageAnz; i>0;) {
+ for (sal_uInt16 i=nSrcMasterPageAnz; i>0;) {
i--;
if (pMasterNeed[i]) {
SdrPage* pPg=NULL;
@@ -1778,9 +1778,9 @@ void SdrModel::Merge(SdrModel& rSourceModel,
maMaPag.Insert(pPg,nDstMasterPageAnz);
// #109538#
MasterPageListChanged();
- pPg->SetInserted(TRUE);
+ pPg->SetInserted(sal_True);
pPg->SetModel(this);
- bMPgNumsDirty=TRUE;
+ bMPgNumsDirty=sal_True;
if (bUndo) AddUndo(GetSdrUndoFactory().CreateUndoNewPage(*pPg));
} else {
DBG_ERROR("SdrModel::Merge(): MasterPage im SourceModel nicht gefunden");
@@ -1791,8 +1791,8 @@ void SdrModel::Merge(SdrModel& rSourceModel,
// rueberholen der Zeichenseiten
if (bInsPages) {
- USHORT nSourcePos=nFirstPageNum;
- USHORT nMergeCount=USHORT(Abs((long)((long)nFirstPageNum-nLastPageNum))+1);
+ sal_uInt16 nSourcePos=nFirstPageNum;
+ sal_uInt16 nMergeCount=sal_uInt16(Abs((long)((long)nFirstPageNum-nLastPageNum))+1);
if (nDestPos>GetPageCount()) nDestPos=GetPageCount();
while (nMergeCount>0) {
SdrPage* pPg=NULL;
@@ -1852,8 +1852,8 @@ void SdrModel::Merge(SdrModel& rSourceModel,
delete [] pMasterMap;
delete [] pMasterNeed;
- bMPgNumsDirty=TRUE;
- bPagNumsDirty=TRUE;
+ bMPgNumsDirty=sal_True;
+ bPagNumsDirty=sal_True;
SetChanged();
// Fehlt: Mergen und Mapping der Layer
@@ -1861,7 +1861,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
if (bUndo) EndUndo();
}
-void SdrModel::SetStarDrawPreviewMode(BOOL bPreview)
+void SdrModel::SetStarDrawPreviewMode(sal_Bool bPreview)
{
if (!bPreview && bStarDrawPreviewMode && GetPageCount())
{
@@ -1894,7 +1894,7 @@ uno::Reference< uno::XInterface > SdrModel::createUnoModel()
return xInt;
}
-void SdrModel::setLock( BOOL bLock )
+void SdrModel::setLock( sal_Bool bLock )
{
if( mbModelLocked != bLock )
{
@@ -1923,7 +1923,7 @@ void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSe
while(nWhich)
{
- if(SFX_ITEM_SET == pSourceSet->GetItemState(nWhich, FALSE, &pPoolItem))
+ if(SFX_ITEM_SET == pSourceSet->GetItemState(nWhich, sal_False, &pPoolItem))
{
const SfxPoolItem* pItem = pPoolItem;
@@ -1989,7 +1989,7 @@ vos::ORef<SvxForbiddenCharactersTable> SdrModel::GetForbiddenCharsTable() const
return mpForbiddenCharactersTable;
}
-void SdrModel::SetCharCompressType( UINT16 nType )
+void SdrModel::SetCharCompressType( sal_uInt16 nType )
{
if( nType != mnCharCompressType )
{
@@ -2024,26 +2024,26 @@ void SdrModel::ReformatAllTextObjects()
ImpReformatAllTextObjects();
}
-FASTBOOL SdrModel::HasTransparentObjects( BOOL bCheckForAlphaChannel ) const
+int SdrModel::HasTransparentObjects( sal_Bool bCheckForAlphaChannel ) const
{
- FASTBOOL bRet = FALSE;
- USHORT n, nCount;
+ int bRet = sal_False;
+ sal_uInt16 n, nCount;
for( n = 0, nCount = GetMasterPageCount(); ( n < nCount ) && !bRet; n++ )
if( GetMasterPage( n )->HasTransparentObjects( bCheckForAlphaChannel ) )
- bRet = TRUE;
+ bRet = sal_True;
if( !bRet )
{
for( n = 0, nCount = GetPageCount(); ( n < nCount ) && !bRet; n++ )
if( GetPage( n )->HasTransparentObjects( bCheckForAlphaChannel ) )
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-SdrOutliner* SdrModel::createOutliner( USHORT nOutlinerMode )
+SdrOutliner* SdrModel::createOutliner( sal_uInt16 nOutlinerMode )
{
if( NULL == mpOutlinerCache )
mpOutlinerCache = new SdrOutlinerCache(this);