diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/ppdparser.hxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/vcl/inc/ppdparser.hxx b/vcl/inc/ppdparser.hxx index 7999957b7e68..5d4195783a68 100644 --- a/vcl/inc/ppdparser.hxx +++ b/vcl/inc/ppdparser.hxx @@ -201,7 +201,7 @@ public: // returns false if paper not found // match the best paper for width and height - OUString matchPaper( int nWidth, int nHeight ) const; + OUString matchPaper( int nWidth, int nHeight, bool bDontSwap = false ) const; bool getMargins( std::u16string_view rPaperName, int &rLeft, int& rRight, diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 061cd5bc727d..6e980776e73e 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -1466,7 +1466,7 @@ bool PPDParser::getPaperDimension( return true; } -OUString PPDParser::matchPaper( int nWidth, int nHeight ) const +OUString PPDParser::matchPaper(int nWidth, int nHeight, bool bDontSwap) const { if( ! m_pPaperDimensions ) return OUString(); @@ -1497,14 +1497,10 @@ OUString PPDParser::matchPaper( int nWidth, int nHeight ) const } } - static bool bDontSwap = false; if( nPDim == -1 && ! bDontSwap ) { // swap portrait/landscape and try again - bDontSwap = true; - OUString rRet = matchPaper( nHeight, nWidth ); - bDontSwap = false; - return rRet; + return matchPaper( nHeight, nWidth, true ); } return nPDim != -1 ? m_pPaperDimensions->getValue( nPDim )->m_aOption : OUString(); |