diff options
author | Release Engineers <releng@openoffice.org> | 2008-12-01 15:06:44 +0000 |
---|---|---|
committer | Release Engineers <releng@openoffice.org> | 2008-12-01 15:06:44 +0000 |
commit | c5f44514bf09ac2030f3beb8b0e4a2b9e22e2e37 (patch) | |
tree | 693eb5b452567b8c874fe7911ec8700f2cfbb4db /vcl/source | |
parent | 0ba2cfaf382582f3ffdf3a13a9ffbd7cda8b68af (diff) |
CWS-TOOLING: integrate CWS ooo301gsl1_DEV300
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/impprn.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 25 |
2 files changed, 7 insertions, 24 deletions
diff --git a/vcl/source/gdi/impprn.cxx b/vcl/source/gdi/impprn.cxx index 8b51b040f466..539c879c89ea 100644 --- a/vcl/source/gdi/impprn.cxx +++ b/vcl/source/gdi/impprn.cxx @@ -575,7 +575,11 @@ void ImplQPrinter::AddQueuePage( GDIMetaFile* pPage, USHORT nPage, BOOL bNewJobS pQueuePage->mpMtf = pPage; pQueuePage->mnPage = nPage; pQueuePage->mbEndJob = FALSE; - if ( bNewJobSetup ) + // ensure that the first page has a valid setup, this is needed + // in GetPaperRanges (used in pullmodel) + // caution: this depends on mnCurPage in Printer being + // 0: not printing 1: after StartJob, 2 after first EndPage, 3+ at following EndPage calls + if ( bNewJobSetup || (nPage == 2 && ImplGetSVData()->maGDIData.mbPrinterPullModel) ) pQueuePage->mpSetup = new JobSetup( mpParent->GetJobSetup() ); maQueue.push_back( pQueuePage ); } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index f4ead6d82db9..8b26f019a4bb 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1753,7 +1753,7 @@ inline void PDFWriterImpl::appendLiteralStringEncrypt( rtl::OStringBuffer& rInSt appendLiteralString( (const sal_Char*)m_pEncryptionBuffer, nChars, rOutBuffer ); } else - rOutBuffer.append( rInString.getStr(), nChars ); + appendLiteralString( rInString.getStr(), nChars , rOutBuffer ); rOutBuffer.append( ")" ); } @@ -10129,27 +10129,6 @@ sal_Int32 PDFWriterImpl::setLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId ) return 0; } -static OUString escapeStringLiteral( const OUString& rStr ) -{ - OUStringBuffer aBuf( rStr.getLength()*2 ); - const sal_Unicode* pUni = rStr.getStr(); - int nLen = rStr.getLength(); - for( ; nLen; nLen--, pUni++ ) - { - switch( *pUni ) - { - case sal_Unicode(')'): - case sal_Unicode('('): - case sal_Unicode('\\'): - aBuf.append( sal_Unicode( '\\' ) ); - default: - aBuf.append( *pUni ); - break; - } - } - return aBuf.makeStringAndClear(); -} - sal_Int32 PDFWriterImpl::setLinkURL( sal_Int32 nLinkId, const OUString& rURL ) { if( nLinkId < 0 || nLinkId >= (sal_Int32)m_aLinks.size() ) @@ -10175,7 +10154,7 @@ sal_Int32 PDFWriterImpl::setLinkURL( sal_Int32 nLinkId, const OUString& rURL ) if (m_xTrans.is()) m_xTrans->parseStrict( aURL ); - m_aLinks[ nLinkId ].m_aURL = escapeStringLiteral( aURL.Complete ); + m_aLinks[ nLinkId ].m_aURL = aURL.Complete; return 0; } |