diff options
Diffstat (limited to 'sfx2/source/view/viewprn.cxx')
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 24ed85556466..515149c5a2d3 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -426,16 +426,16 @@ IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG ) //------------------------------------------------------------------------- -BOOL UseStandardPrinter_Impl( Window* /*pParent*/, SfxPrinter* pDocPrinter ) +sal_Bool UseStandardPrinter_Impl( Window* /*pParent*/, SfxPrinter* pDocPrinter ) { // Optionen abfragen, ob gewarnt werden soll (Doc uebersteuert App) - BOOL bWarn = FALSE; + sal_Bool bWarn = sal_False; const SfxItemSet *pDocOptions = &pDocPrinter->GetOptions(); if ( pDocOptions ) { - USHORT nWhich = pDocOptions->GetPool()->GetWhich(SID_PRINTER_NOTFOUND_WARN); + sal_uInt16 nWhich = pDocOptions->GetPool()->GetWhich(SID_PRINTER_NOTFOUND_WARN); const SfxBoolItem* pBoolItem = NULL; - pDocPrinter->GetOptions().GetItemState( nWhich, FALSE, (const SfxPoolItem**) &pBoolItem ); + pDocPrinter->GetOptions().GetItemState( nWhich, sal_False, (const SfxPoolItem**) &pBoolItem ); if ( pBoolItem ) bWarn = pBoolItem->GetValue(); } @@ -450,7 +450,7 @@ BOOL UseStandardPrinter_Impl( Window* /*pParent*/, SfxPrinter* pDocPrinter ) } */ // nicht gewarnt => einfach so den StandardDrucker nehmen - return TRUE; + return sal_True; } //------------------------------------------------------------------------- @@ -465,15 +465,15 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) SfxPrinter *pDocPrinter = GetPrinter(); // Printer-Options auswerten - FASTBOOL bOriToDoc = FALSE; - FASTBOOL bSizeToDoc = FALSE; + bool bOriToDoc = false; + bool bSizeToDoc = false; if ( &pDocPrinter->GetOptions() ) { - USHORT nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC); + sal_uInt16 nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC); const SfxFlagItem *pFlagItem = 0; - pDocPrinter->GetOptions().GetItemState( nWhich, FALSE, (const SfxPoolItem**) &pFlagItem ); - bOriToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION) : FALSE; - bSizeToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE) : FALSE; + pDocPrinter->GetOptions().GetItemState( nWhich, sal_False, (const SfxPoolItem**) &pFlagItem ); + bOriToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION) : sal_False; + bSizeToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE) : sal_False; } // vorheriges Format und Size feststellen @@ -485,8 +485,8 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) Size aNewPgSz = pNewPrinter->GetPaperSizePixel(); // "Anderungen am Seitenformat feststellen - BOOL bOriChg = (eOldOri != eNewOri) && bOriToDoc; - BOOL bPgSzChg = ( aOldPgSz.Height() != + sal_Bool bOriChg = (eOldOri != eNewOri) && bOriToDoc; + sal_Bool bPgSzChg = ( aOldPgSz.Height() != ( bOriChg ? aNewPgSz.Width() : aNewPgSz.Height() ) || aOldPgSz.Width() != ( bOriChg ? aNewPgSz.Height() : aNewPgSz.Width() ) ) && @@ -494,7 +494,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) // Message und Flags f"ur Seitenformat-"Anderung zusammenstellen String aMsg; - USHORT nNewOpt=0; + sal_uInt16 nNewOpt=0; if( bOriChg && bPgSzChg ) { aMsg = String(SfxResId(STR_PRINT_NEWORISIZE)); @@ -512,7 +512,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter ) } // in dieser Variable sammeln, was sich so ge"aendert hat - USHORT nChangedFlags = 0; + sal_uInt16 nChangedFlags = 0; // ggf. Nachfrage, ob Seitenformat vom Drucker "ubernommen werden soll if ( ( bOriChg || bPgSzChg ) && @@ -603,7 +603,7 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro makeAny( rtl::OUString( pObjShell->GetTitle(0) ) ) ); // FIXME: job setup - SfxPrinter* pDocPrt = GetPrinter(FALSE); + SfxPrinter* pDocPrt = GetPrinter(sal_False); JobSetup aJobSetup = pDocPrt ? pDocPrt->GetJobSetup() : GetJobSetup(); if( bIsDirect ) aJobSetup.SetValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ), @@ -620,16 +620,16 @@ Printer* SfxViewShell::GetActivePrinter() const void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) { - // USHORT nCopies=1; - USHORT nDialogRet = RET_CANCEL; - // BOOL bCollate=FALSE; + // sal_uInt16 nCopies=1; + sal_uInt16 nDialogRet = RET_CANCEL; + // sal_Bool bCollate=sal_False; SfxPrinter* pPrinter = 0; SfxDialogExecutor_Impl* pExecutor = 0; bool bSilent = false; - BOOL bIsAPI = rReq.GetArgs() && rReq.GetArgs()->Count(); + sal_Bool bIsAPI = rReq.GetArgs() && rReq.GetArgs()->Count(); if ( bIsAPI ) { - SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, FALSE); + SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False); bSilent = pSilentItem && pSilentItem->GetValue(); } @@ -642,7 +642,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) const SfxFilter* pFilter = pMedium ? pMedium->GetFilter() : NULL; sal_Bool bPrintOnHelp = ( pFilter && pFilter->GetFilterName() == aHelpFilterName ); - const USHORT nId = rReq.GetSlot(); + const sal_uInt16 nId = rReq.GetSlot(); switch( nId ) { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -654,7 +654,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) // derived class may decide to abort this if( !pDoc->QuerySlotExecutable( nId ) ) { - rReq.SetReturnValue( SfxBoolItem( 0, FALSE ) ); + rReq.SetReturnValue( SfxBoolItem( 0, sal_False ) ); return; } @@ -662,10 +662,10 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) if ( bDetectHidden && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES ) break; - SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, FALSE); + SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, sal_False); sal_Bool bSelection = pSelectItem && pSelectItem->GetValue(); if( pSelectItem && rReq.GetArgs()->Count() == 1 ) - bIsAPI = FALSE; + bIsAPI = sal_False; uno::Sequence < beans::PropertyValue > aProps; if ( bIsAPI ) @@ -720,10 +720,10 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) case SID_PRINTER_NAME : // only for recorded macros { // get printer and printer settings from the document - SfxPrinter *pDocPrinter = GetPrinter(TRUE); + SfxPrinter *pDocPrinter = GetPrinter(sal_True); // look for printer in parameters - SFX_REQUEST_ARG( rReq, pPrinterItem, SfxStringItem, SID_PRINTER_NAME, FALSE ); + SFX_REQUEST_ARG( rReq, pPrinterItem, SfxStringItem, SID_PRINTER_NAME, sal_False ); if ( pPrinterItem ) { // use PrinterName parameter to create a printer @@ -752,7 +752,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) // no valid printer either in ItemSet or at the document if ( bSilent ) { - rReq.SetReturnValue(SfxBoolItem(0,FALSE)); + rReq.SetReturnValue(SfxBoolItem(0,sal_False)); break; } else @@ -762,7 +762,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) if ( !pPrinter->IsOriginal() && rReq.GetArgs() && !UseStandardPrinter_Impl( NULL, pPrinter ) ) { // printer is not available, but standard printer should not be used - rReq.SetReturnValue(SfxBoolItem(0,FALSE)); + rReq.SetReturnValue(SfxBoolItem(0,sal_False)); break; } @@ -772,7 +772,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) // if printer is busy, abort printing if ( !bSilent ) InfoBox( NULL, String( SfxResId( STR_ERROR_PRINTER_BUSY ) ) ).Execute(); - rReq.SetReturnValue(SfxBoolItem(0,FALSE)); + rReq.SetReturnValue(SfxBoolItem(0,sal_False)); break; } @@ -839,7 +839,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) DELETEZ( pDlgPrinter ); rReq.Ignore(); if ( SID_PRINTDOC == nId ) - rReq.SetReturnValue(SfxBoolItem(0,FALSE)); + rReq.SetReturnValue(SfxBoolItem(0,sal_False)); } } } @@ -855,16 +855,16 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) //-------------------------------------------------------------------- -BOOL SfxViewShell::IsPrinterLocked() const +sal_Bool SfxViewShell::IsPrinterLocked() const { return pImp->m_nPrinterLocks > 0; } //-------------------------------------------------------------------- -void SfxViewShell::LockPrinter( BOOL bLock) +void SfxViewShell::LockPrinter( sal_Bool bLock) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; if ( bLock ) { bChanged = 1 == ++pImp->m_nPrinterLocks; @@ -884,14 +884,14 @@ void SfxViewShell::LockPrinter( BOOL bLock) //-------------------------------------------------------------------- -SfxPrinter* SfxViewShell::GetPrinter( BOOL /*bCreate*/ ) +SfxPrinter* SfxViewShell::GetPrinter( sal_Bool /*bCreate*/ ) { return 0; } //-------------------------------------------------------------------- -USHORT SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, USHORT /*nDiffFlags*/, bool ) +sal_uInt16 SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, sal_uInt16 /*nDiffFlags*/, bool ) { return 0; } |