summaryrefslogtreecommitdiff
path: root/sd/source/core/drawdoc3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/core/drawdoc3.cxx')
-rwxr-xr-x[-rw-r--r--]sd/source/core/drawdoc3.cxx356
1 files changed, 187 insertions, 169 deletions
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)
{