summaryrefslogtreecommitdiff
path: root/sd/source/ui/func/fupage.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/func/fupage.cxx')
-rwxr-xr-xsd/source/ui/func/fupage.cxx90
1 files changed, 45 insertions, 45 deletions
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index d4e2fcd8083f..8af2ee312f8b 100755
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -101,8 +101,8 @@ TYPEINIT1( FuPage, FuPoor );
void mergeItemSetsImpl( SfxItemSet& rTarget, const SfxItemSet& rSource )
{
- const USHORT* pPtr = rSource.GetRanges();
- USHORT p1, p2;
+ const sal_uInt16* pPtr = rSource.GetRanges();
+ sal_uInt16 p1, p2;
while( *pPtr )
{
p1 = pPtr[0];
@@ -218,7 +218,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
SvxPageItem aPageItem( SID_ATTR_PAGE );
aPageItem.SetDescName( mpPage->GetName() );
aPageItem.SetPageUsage( (SvxPageUsage) SVX_PAGE_ALL );
- aPageItem.SetLandscape( mpPage->GetOrientation() == ORIENTATION_LANDSCAPE ? TRUE: FALSE );
+ aPageItem.SetLandscape( mpPage->GetOrientation() == ORIENTATION_LANDSCAPE ? sal_True: sal_False );
aPageItem.SetNumType( mpDoc->GetPageNumType() );
aNewAttr.Put( aPageItem );
@@ -232,20 +232,20 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
aNewAttr.Put( aMaxSizeItem );
// paperbin
- SvxPaperBinItem aPaperBinItem( SID_ATTR_PAGE_PAPERBIN, (const BYTE)mpPage->GetPaperBin() );
+ SvxPaperBinItem aPaperBinItem( SID_ATTR_PAGE_PAPERBIN, (const sal_uInt8)mpPage->GetPaperBin() );
aNewAttr.Put( aPaperBinItem );
- SvxLRSpaceItem aLRSpaceItem( (USHORT)mpPage->GetLftBorder(), (USHORT)mpPage->GetRgtBorder(), 0, 0, mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE));
+ SvxLRSpaceItem aLRSpaceItem( (sal_uInt16)mpPage->GetLftBorder(), (sal_uInt16)mpPage->GetRgtBorder(), 0, 0, mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE));
aNewAttr.Put( aLRSpaceItem );
- SvxULSpaceItem aULSpaceItem( (USHORT)mpPage->GetUppBorder(), (USHORT)mpPage->GetLwrBorder(), mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE));
+ SvxULSpaceItem aULSpaceItem( (sal_uInt16)mpPage->GetUppBorder(), (sal_uInt16)mpPage->GetLwrBorder(), mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE));
aNewAttr.Put( aULSpaceItem );
// Applikation
bool bScale = mpDoc->GetDocumentType() != DOCUMENT_TYPE_DRAW;
- aNewAttr.Put( SfxBoolItem( SID_ATTR_PAGE_EXT1, bScale ? TRUE : FALSE ) );
+ aNewAttr.Put( SfxBoolItem( SID_ATTR_PAGE_EXT1, bScale ? sal_True : sal_False ) );
- BOOL bFullSize = mpPage->IsMasterPage() ?
+ sal_Bool bFullSize = mpPage->IsMasterPage() ?
mpPage->IsBackgroundFullSize() : ((SdPage&)mpPage->TRG_GetMasterPage()).IsBackgroundFullSize();
aNewAttr.Put( SfxBoolItem( SID_ATTR_PAGE_EXT2, bFullSize ) );
@@ -253,8 +253,8 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
///////////////////////////////////////////////////////////////////////
// Merge ItemSet for dialog
- const USHORT* pPtr = aNewAttr.GetRanges();
- USHORT p1 = pPtr[0], p2 = pPtr[1];
+ const sal_uInt16* pPtr = aNewAttr.GetRanges();
+ sal_uInt16 p1 = pPtr[0], p2 = pPtr[1];
while(pPtr[2] && (pPtr[2] - p2 == 1))
{
p2 = pPtr[3];
@@ -324,8 +324,8 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
aMigrateSet.Put( XFillBitmapItem( String(RTL_CONSTASCII_USTRINGPARAM("background")), XOBitmap(aGraphic) ) );
mpDoc->MigrateItemSet( &aMigrateSet, pTempSet.get(), NULL );
- pTempSet->Put( XFillBmpStretchItem( TRUE ));
- pTempSet->Put( XFillBmpTileItem( FALSE ));
+ pTempSet->Put( XFillBmpStretchItem( sal_True ));
+ pTempSet->Put( XFillBmpTileItem( sal_False ));
}
}
}
@@ -346,8 +346,8 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
{
// if some fillstyle-items are not set in the dialog, then
// try to use the items before
- BOOL bChanges = FALSE;
- for( USHORT i=XATTR_FILL_FIRST; i<XATTR_FILL_LAST; i++ )
+ sal_Bool bChanges = sal_False;
+ for( sal_uInt16 i=XATTR_FILL_FIRST; i<XATTR_FILL_LAST; i++ )
{
if( aMergedAttr.GetItemState( i ) != SFX_ITEM_DEFAULT )
{
@@ -355,7 +355,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
pTempSet->Put( aMergedAttr.Get( i ) );
else
if( aMergedAttr.GetItem( i ) != pTempSet->GetItem( i ) )
- bChanges = TRUE;
+ bChanges = sal_True;
}
}
@@ -363,7 +363,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
if( ( ( (XFillStyleItem*) pTempSet->GetItem( XATTR_FILLSTYLE ) )->GetValue() == XFILL_NONE ) ||
( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == SFX_ITEM_DEFAULT ) &&
( ( (XFillStyleItem*) aMergedAttr.GetItem( XATTR_FILLSTYLE ) )->GetValue() == XFILL_NONE ) ) )
- mbPageBckgrdDeleted = TRUE;
+ mbPageBckgrdDeleted = sal_True;
bool bSetToAllPages = false;
@@ -420,8 +420,8 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
pUndoGroup->SetComment(aComment);
//Set background on all master pages
- USHORT nMasterPageCount = mpDoc->GetMasterSdPageCount(ePageKind);
- for (USHORT i = 0; i < nMasterPageCount; ++i)
+ sal_uInt16 nMasterPageCount = mpDoc->GetMasterSdPageCount(ePageKind);
+ for (sal_uInt16 i = 0; i < nMasterPageCount; ++i)
{
SdPage *pMasterPage = mpDoc->GetMasterSdPage(i, ePageKind);
SdStyleSheet *pStyle =
@@ -434,8 +434,8 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
}
//Remove background from all pages to reset to the master bg
- USHORT nPageCount(mpDoc->GetSdPageCount(ePageKind));
- for(USHORT i=0; i<nPageCount; ++i)
+ sal_uInt16 nPageCount(mpDoc->GetSdPageCount(ePageKind));
+ for(sal_uInt16 i=0; i<nPageCount; ++i)
{
SdPage *pPage = mpDoc->GetSdPage(i, ePageKind);
@@ -457,7 +457,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
// if background filling is set to master pages then clear from page set
if( mbMasterPage || bSetToAllPages )
{
- for( USHORT nWhich = XATTR_FILL_FIRST; nWhich <= XATTR_FILL_LAST; nWhich++ )
+ for( sal_uInt16 nWhich = XATTR_FILL_FIRST; nWhich <= XATTR_FILL_LAST; nWhich++ )
{
pTempSet->ClearItem( nWhich );
}
@@ -471,7 +471,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
mpDoc->SetDefaultWritingMode( nVal == FRMDIR_HORI_RIGHT_TOP ? ::com::sun::star::text::WritingMode_RL_TB : ::com::sun::star::text::WritingMode_LR_TB );
}
- mpDoc->SetChanged(TRUE);
+ mpDoc->SetChanged(sal_True);
// BackgroundFill of Masterpage: no hard attributes allowed
SdrPage& rUsedMasterPage = mpPage->IsMasterPage() ? *mpPage : mpPage->TRG_GetMasterPage();
@@ -501,16 +501,16 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs )
// Set new page-attributes
PageKind ePageKind = mpDrawViewShell->GetPageKind();
const SfxPoolItem* pPoolItem;
- BOOL bSetPageSizeAndBorder = FALSE;
+ sal_Bool bSetPageSizeAndBorder = sal_False;
Size aNewSize(maSize);
- INT32 nLeft = -1, nRight = -1, nUpper = -1, nLower = -1;
- BOOL bScaleAll = TRUE;
+ sal_Int32 nLeft = -1, nRight = -1, nUpper = -1, nLower = -1;
+ sal_Bool bScaleAll = sal_True;
Orientation eOrientation = mpPage->GetOrientation();
SdPage* pMasterPage = mpPage->IsMasterPage() ? mpPage : &(SdPage&)(mpPage->TRG_GetMasterPage());
- BOOL bFullSize = pMasterPage->IsBackgroundFullSize();
- USHORT nPaperBin = mpPage->GetPaperBin();
+ sal_Bool bFullSize = pMasterPage->IsBackgroundFullSize();
+ sal_uInt16 nPaperBin = mpPage->GetPaperBin();
- if( pArgs->GetItemState(SID_ATTR_PAGE, TRUE, &pPoolItem) == SFX_ITEM_SET )
+ if( pArgs->GetItemState(SID_ATTR_PAGE, sal_True, &pPoolItem) == SFX_ITEM_SET )
{
mpDoc->SetPageNumType(((const SvxPageItem*) pPoolItem)->GetNumType());
@@ -518,71 +518,71 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs )
ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
if( mpPage->GetOrientation() != eOrientation )
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
mpDrawViewShell->ResetActualPage();
}
- if( pArgs->GetItemState(SID_ATTR_PAGE_SIZE, TRUE, &pPoolItem) == SFX_ITEM_SET )
+ if( pArgs->GetItemState(SID_ATTR_PAGE_SIZE, sal_True, &pPoolItem) == SFX_ITEM_SET )
{
aNewSize = ((const SvxSizeItem*) pPoolItem)->GetSize();
if( mpPage->GetSize() != aNewSize )
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
}
if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE),
- TRUE, &pPoolItem) == SFX_ITEM_SET )
+ sal_True, &pPoolItem) == SFX_ITEM_SET )
{
nLeft = ((const SvxLRSpaceItem*) pPoolItem)->GetLeft();
nRight = ((const SvxLRSpaceItem*) pPoolItem)->GetRight();
if( mpPage->GetLftBorder() != nLeft || mpPage->GetRgtBorder() != nRight )
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
}
if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE),
- TRUE, &pPoolItem) == SFX_ITEM_SET )
+ sal_True, &pPoolItem) == SFX_ITEM_SET )
{
nUpper = ((const SvxULSpaceItem*) pPoolItem)->GetUpper();
nLower = ((const SvxULSpaceItem*) pPoolItem)->GetLower();
if( mpPage->GetUppBorder() != nUpper || mpPage->GetLwrBorder() != nLower )
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
}
- if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT1), TRUE, &pPoolItem) == SFX_ITEM_SET )
+ if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT1), sal_True, &pPoolItem) == SFX_ITEM_SET )
{
bScaleAll = ((const SfxBoolItem*) pPoolItem)->GetValue();
}
- if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT2), TRUE, &pPoolItem) == SFX_ITEM_SET )
+ if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT2), sal_True, &pPoolItem) == SFX_ITEM_SET )
{
bFullSize = ((const SfxBoolItem*) pPoolItem)->GetValue();
if(pMasterPage->IsBackgroundFullSize() != bFullSize )
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
}
// Papierschacht (PaperBin)
- if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_PAPERBIN), TRUE, &pPoolItem) == SFX_ITEM_SET )
+ if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_PAPERBIN), sal_True, &pPoolItem) == SFX_ITEM_SET )
{
nPaperBin = ((const SvxPaperBinItem*) pPoolItem)->GetValue();
if( mpPage->GetPaperBin() != nPaperBin )
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
}
if (nLeft == -1 && nUpper != -1)
{
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
nLeft = mpPage->GetLftBorder();
nRight = mpPage->GetRgtBorder();
}
else if (nLeft != -1 && nUpper == -1)
{
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
nUpper = mpPage->GetUppBorder();
nLower = mpPage->GetLwrBorder();
}
@@ -592,8 +592,8 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs )
////////////////////////////////////////////////////////////////////////////////
//
- // if bMasterPage==FALSE then create a background-object for this page with the
- // properties set in the dialog before, but if mbPageBckgrdDeleted==TRUE then
+ // if bMasterPage==sal_False then create a background-object for this page with the
+ // properties set in the dialog before, but if mbPageBckgrdDeleted==sal_True then
// the background of this page was set to invisible, so it would be a mistake
// to create a new background-object for this page !
//
@@ -615,7 +615,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs )
if( mpBackgroundObjUndoAction )
{
// set merge flag, because a SdUndoGroupAction could have been inserted before
- mpDocSh->GetUndoManager()->AddUndoAction( mpBackgroundObjUndoAction, TRUE );
+ mpDocSh->GetUndoManager()->AddUndoAction( mpBackgroundObjUndoAction, sal_True );
mpBackgroundObjUndoAction = 0;
}