diff options
Diffstat (limited to 'vcl/aqua/source/gdi/salprn.cxx')
-rw-r--r-- | vcl/aqua/source/gdi/salprn.cxx | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index 92a4e92f6849..5183cb9d9a4c 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,6 +33,7 @@ #include "vcl/print.hxx" #include "vcl/unohelp.hxx" +#include <sal/macros.h> #include "aqua/salinst.h" #include "aqua/salprn.h" @@ -49,7 +51,6 @@ #include <algorithm> -using namespace rtl; using namespace vcl; using namespace com::sun::star; using namespace com::sun::star::uno; @@ -57,6 +58,9 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::container; +using ::rtl::OUString; +using ::rtl::OStringToOUString; + // ======================================================================= AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) : @@ -105,12 +109,6 @@ AquaSalInfoPrinter::~AquaSalInfoPrinter() delete mpGraphics; if( mpPrintInfo ) [mpPrintInfo release]; - #if 0 - // FIXME: verify that NSPrintInfo releases the printer - // else we have a leak here - if( mpPrinter ) - [mpPrinter release]; - #endif if( mrContext ) CFRelease( mrContext ); } @@ -156,7 +154,7 @@ void AquaSalInfoPrinter::SetupPrinterGraphics( CGContextRef i_rContext ) const mpGraphics->SetPrinterGraphics( i_rContext, nDPIX, nDPIY, 1.0 ); } else - DBG_ERROR( "no print info in SetupPrinterGraphics" ); + OSL_FAIL( "no print info in SetupPrinterGraphics" ); } } @@ -204,7 +202,7 @@ static struct PaperSizeEntry static bool getPaperSize( double& o_fWidth, double& o_fHeight, const Paper i_ePaper ) { - for(unsigned int i = 0; i < sizeof(aPaperSizes)/sizeof(aPaperSizes[0]); i++ ) + for(unsigned int i = 0; i < SAL_N_ELEMENTS(aPaperSizes); i++ ) { if( aPaperSizes[i].nPaper == i_ePaper ) { @@ -238,7 +236,7 @@ static Paper recognizePaper( double i_fWidth, double i_fHeight ) if( aPaper == PAPER_USER ) { // search with fuzz factor - for( unsigned int i = 0; i < sizeof(aPaperSizes)/sizeof(aPaperSizes[0]); i++ ) + for( unsigned int i = 0; i < SAL_N_ELEMENTS(aPaperSizes); i++ ) { double w = (i_fWidth > aPaperSizes[i].fWidth) ? i_fWidth - aPaperSizes[i].fWidth : aPaperSizes[i].fWidth - i_fWidth; double h = (i_fHeight > aPaperSizes[i].fHeight) ? i_fHeight - aPaperSizes[i].fHeight : aPaperSizes[i].fHeight - i_fHeight; @@ -508,7 +506,7 @@ static Size getPageSize( vcl::PrinterController& i_rController, sal_Int32 i_nPag Sequence< PropertyValue > aPageParms( i_rController.getPageParameters( i_nPage ) ); for( sal_Int32 nProperty = 0, nPropertyCount = aPageParms.getLength(); nProperty < nPropertyCount; ++nProperty ) { - if( aPageParms[ nProperty ].Name.equalsAscii( "PageSize" ) ) + if( aPageParms[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageSize" ) ) ) { awt::Size aSize; aPageParms[ nProperty].Value >>= aSize; @@ -781,7 +779,7 @@ sal_Bool AquaSalPrinter::StartJob( const XubString* /*i_pFileName*/, bool /*i_bDirect*/, ImplJobSetup* ) { - DBG_ERROR( "should never be called" ); + OSL_FAIL( "should never be called" ); return sal_False; } @@ -891,3 +889,4 @@ int AquaSalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |