diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/aqua/source/gdi/salprn.cxx | 22 | ||||
-rw-r--r-- | vcl/source/app/dbggui.cxx | 20 | ||||
-rwxr-xr-x | vcl/source/gdi/print3.cxx | 23 | ||||
-rwxr-xr-x | vcl/source/window/printdlg.cxx | 1 | ||||
-rw-r--r-- | vcl/unx/inc/saldisp.hxx | 2 | ||||
-rw-r--r-- | vcl/unx/source/app/saldisp.cxx | 32 | ||||
-rw-r--r-- | vcl/unx/source/gdi/salgdi.cxx | 24 |
7 files changed, 63 insertions, 61 deletions
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index a1d51376aa0b..ed80110cacc6 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -834,12 +834,24 @@ void AquaSalInfoPrinter::InitPaperFormats( const ImplJobSetup* i_pSetupData ) for( unsigned int i = 0; i < nPapers; i++ ) { NSString* pPaper = [pPaperNames objectAtIndex: i]; - NSSize aPaperSize = [mpPrinter pageSizeForPaper: pPaper]; - if( aPaperSize.width > 0 && aPaperSize.height > 0 ) + // first try to match the name + rtl::OString aPaperName( [pPaper UTF8String] ); + Paper ePaper = PaperInfo::fromPSName( aPaperName ); + if( ePaper != PAPER_USER ) { - PaperInfo aInfo( PtTo10Mu( aPaperSize.width ), - PtTo10Mu( aPaperSize.height ) ); - m_aPaperFormats.push_back( aInfo ); + m_aPaperFormats.push_back( PaperInfo( ePaper ) ); + } + else + { + NSSize aPaperSize = [mpPrinter pageSizeForPaper: pPaper]; + if( aPaperSize.width > 0 && aPaperSize.height > 0 ) + { + PaperInfo aInfo( PtTo10Mu( aPaperSize.width ), + PtTo10Mu( aPaperSize.height ) ); + if( aInfo.getPaper() == PAPER_USER ) + aInfo.doSloppyFit(); + m_aPaperFormats.push_back( aInfo ); + } } } } diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index a50c8aeec149..6649f19e0030 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -346,8 +346,8 @@ static const sal_Char* pDbgHelpText[] = "Attempt to activate the debugger and produce the message there, in order to " "always obtain the corresponding stack trace in the debugger.\n", "\n", -"CoreDump\n", -"Causes a crash\n", +"Abort\n", +"Aborts the application\n", "\n", "\n", "Reroute osl messages - Checkbox\n", @@ -1083,7 +1083,7 @@ DbgDialog::DbgDialog() : maTraceBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "MessageBox" ) ) ); maTraceBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "TestTool" ) ) ); maTraceBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Debugger" ) ) ); - maTraceBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "CoreDump" ) ) ); + maTraceBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Abort" ) ) ); ImplAppendUserDefinedChannels( maTraceBox ); ImplSelectChannel( maTraceBox, pData->nTraceOut, 0 ); maTraceBox.Show(); @@ -1106,7 +1106,7 @@ DbgDialog::DbgDialog() : maWarningBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "MessageBox" ) ) ); maWarningBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "TestTool" ) ) ); maWarningBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Debugger" ) ) ); - maWarningBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "CoreDump" ) ) ); + maWarningBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Abort" ) ) ); ImplAppendUserDefinedChannels( maWarningBox ); ImplSelectChannel( maWarningBox, pData->nWarningOut, 0 ); maWarningBox.Show(); @@ -1135,7 +1135,7 @@ DbgDialog::DbgDialog() : maErrorBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "MessageBox" ) ) ); maErrorBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "TestTool" ) ) ); maErrorBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Debugger" ) ) ); - maErrorBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "CoreDump" ) ) ); + maErrorBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Abort" ) ) ); ImplAppendUserDefinedChannels( maErrorBox ); ImplSelectChannel( maErrorBox, pData->nErrorOut, mnErrorOff ); maErrorBox.Show(); @@ -1962,6 +1962,14 @@ void DbgPrintWindow( const char* pLine ) bIn = sal_False; } +// ----------------------------------------------------------------------- + +void DbgAbort( char const * i_message ) +{ + ::rtl::OUString const message( i_message, strlen( i_message ), osl_getThreadTextEncoding() ); + Application::Abort( message ); +} + // ======================================================================= void ImplDbgTestSolarMutex() @@ -1977,6 +1985,7 @@ void DbgGUIInit() DbgSetPrintMsgBox( DbgPrintMsgBox ); DbgSetPrintWindow( DbgPrintWindow ); DbgSetTestSolarMutex( ImplDbgTestSolarMutex ); + DbgSetAbort( DbgAbort ); } // ----------------------------------------------------------------------- @@ -1986,6 +1995,7 @@ void DbgGUIDeInit() DbgSetPrintMsgBox( NULL ); DbgSetPrintWindow( NULL ); DbgSetTestSolarMutex( NULL ); + DbgSetAbort( NULL ); DbgWindow* pDbgWindow = ImplGetSVData()->maWinData.mpDbgWin; if ( pDbgWindow ) diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index c917ea8aa718..3873cdc6cb14 100755 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -333,30 +333,13 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr // setup printer - // if no specific printer is already set, create one - - // #i108686# - // in case of a UI (platform independent or system dialog) print job, make the printer persistent over jobs - // however if no printer was already set by the print job's originator, - // and this is an API job, then use the system default location (because - // this is the only sensible default available if the user has no means of changing - // the destination + // #i114306# changed behavior back from persistence + // if no specific printer is already set, create the default printer if( ! pController->getPrinter() ) { rtl::OUString aPrinterName( i_rInitSetup.GetPrinterName() ); - bool bSetJobSetup = true; - if( ! aPrinterName.getLength() && pController->isShowDialogs() && ! pController->isDirectPrint() ) - { - // get printer name from configuration - SettingsConfigItem* pItem = SettingsConfigItem::get(); - aPrinterName = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPrinterUsed" ) ) ); - bSetJobSetup = false; - } - boost::shared_ptr<Printer> pPrinter( new Printer( aPrinterName ) ); - if( bSetJobSetup ) - pPrinter->SetJobSetup( i_rInitSetup ); + pPrinter->SetJobSetup( i_rInitSetup ); pController->setPrinter( pPrinter ); } diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 98e93e748737..d38128e04f1e 100755 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -2107,6 +2107,7 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox ) maPController->resetPrinterOptions( maOptionsPage.maToFileBox.IsChecked() ); // update text fields updatePrinterText(); + preparePreview( true, false ); } else if( pBox == &maNUpPage.maNupOrientationBox || pBox == &maNUpPage.maNupOrderBox ) { diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx index 42d1f820acff..3333dc3faef4 100644 --- a/vcl/unx/inc/saldisp.hxx +++ b/vcl/unx/inc/saldisp.hxx @@ -127,7 +127,7 @@ enum SalRGB { RGB, RBG, RGBA, RBGA, GBRA, GRBA, BGRA, BRGA, - other }; + otherSalRGB }; // -=-= SalVisual =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= class SalVisual : public XVisualInfo diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx index 91f6934f27f0..39d2803720c8 100644 --- a/vcl/unx/source/app/saldisp.cxx +++ b/vcl/unx/source/app/saldisp.cxx @@ -912,7 +912,7 @@ void SalDisplay::Init() // carefully. if we are running linux (i.e. not netbsd) on an xfree // display, fvwm is most probable the wm to choose, confusing with mwm // doesn't harm. #57791# start maximized if possible - if( (otherwm == eWindowManager_) + if( (otherwm == eWindowManager_) || (olwm == eWindowManager_ )) { eWindowManager_ = fvwm; // ??? @@ -2790,44 +2790,44 @@ SalVisual::SalVisual( const XVisualInfo* pXVI ) if( blue_mask == 0xFF ) eRGBMode_ = RGB; else - eRGBMode_ = other; + eRGBMode_ = otherSalRGB; else if( blue_mask == 0xFF00 ) if( green_mask == 0xFF ) eRGBMode_ = RBG; else - eRGBMode_ = other; + eRGBMode_ = otherSalRGB; else - eRGBMode_ = other; + eRGBMode_ = otherSalRGB; else if( green_mask == 0xFF0000 ) if( red_mask == 0xFF00 ) if( blue_mask == 0xFF ) eRGBMode_ = GRB; else - eRGBMode_ = other; + eRGBMode_ = otherSalRGB; else if( blue_mask == 0xFF00 ) if( red_mask == 0xFF ) eRGBMode_ = GBR; else - eRGBMode_ = other; + eRGBMode_ = otherSalRGB; else - eRGBMode_ = other; + eRGBMode_ = otherSalRGB; else if( blue_mask == 0xFF0000 ) if( red_mask == 0xFF00 ) if( green_mask == 0xFF ) eRGBMode_ = BRG; else - eRGBMode_ = other; + eRGBMode_ = otherSalRGB; else if( green_mask == 0xFF00 ) if( red_mask == 0xFF ) eRGBMode_ = BGR; else - eRGBMode_ = other; + eRGBMode_ = otherSalRGB; else - eRGBMode_ = other; + eRGBMode_ = otherSalRGB; else - eRGBMode_ = other; + eRGBMode_ = otherSalRGB; else - eRGBMode_ = other; + eRGBMode_ = otherSalRGB; } } @@ -2851,7 +2851,7 @@ sal_Bool SalVisual::Convert( int &n0, int &n1, int &n2, int &n3 ) switch( GetMode() ) { - case other: + case otherSalRGB: return sal_False; case SALCOLOR: break; @@ -2886,7 +2886,7 @@ sal_Bool SalVisual::Convert( int &n0, int &n1, int &n2 ) switch( GetMode() ) { - case other: + case otherSalRGB: return sal_False; case SALCOLOR: break; @@ -2939,7 +2939,7 @@ SalColor SalVisual::GetTCColor( Pixel nPixel ) const Pixel g = nPixel & green_mask; Pixel b = nPixel & blue_mask; - if( other != eRGBMode_ ) // 8+8+8=24 + if( otherSalRGB != eRGBMode_ ) // 8+8+8=24 return MAKE_SALCOLOR( r >> nRedShift_, g >> nGreenShift_, b >> nBlueShift_ ); @@ -2970,7 +2970,7 @@ Pixel SalVisual::GetTCPixel( SalColor nSalColor ) const if( SALCOLORREVERSE == eRGBMode_ ) return (b << 16) | (g << 8) | (r); - if( other != eRGBMode_ ) // 8+8+8=24 + if( otherSalRGB != eRGBMode_ ) // 8+8+8=24 return (r << nRedShift_) | (g << nGreenShift_) | (b << nBlueShift_); if( nRedShift_ > 0 ) r <<= nRedShift_; else r >>= -nRedShift_; diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index dc1ec968d859..df23220ea6d5 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -1217,6 +1217,7 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double aPolygon.transform( basegfx::tools::createTranslateB2DHomMatrix(+fHalfWidth,+fHalfWidth) ); // shortcut for hairline drawing to improve performance + bool bDrawnOk = true; if( bIsHairline ) { // hairlines can benefit from a simplified tesselation @@ -1225,17 +1226,13 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, aPolygon, rLineWidth.getX() ); // draw tesselation result - if( ! aB2DTrapVector.empty() ) - { - const int nTrapCount = aB2DTrapVector.size(); - const bool bDrawOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency ); + const int nTrapCount = aB2DTrapVector.size(); + if( nTrapCount > 0 ) + bDrawnOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency ); - // restore the original brush GC - nBrushColor_ = aKeepBrushColor; - return bDrawOk; - } - else - return true; + // restore the original brush GC + nBrushColor_ = aKeepBrushColor; + return bDrawnOk; } // get the area polygon for the line polygon @@ -1258,19 +1255,18 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double // draw each area polypolygon component individually // to emulate the polypolygon winding rule "non-zero" - bool bDrawOk = true; const int nPolyCount = aAreaPolyPoly.count(); for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx ) { const ::basegfx::B2DPolyPolygon aOnePoly( aAreaPolyPoly.getB2DPolygon( nPolyIdx ) ); - bDrawOk = drawPolyPolygon( aOnePoly, fTransparency ); - if( !bDrawOk ) + bDrawnOk = drawPolyPolygon( aOnePoly, fTransparency ); + if( !bDrawnOk ) break; } // restore the original brush GC nBrushColor_ = aKeepBrushColor; - return bDrawOk; + return bDrawnOk; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |