diff options
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/gdimetafiletools.cxx | 10 | ||||
-rw-r--r-- | vcl/source/gdi/pdfextoutdevdata.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 14 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx index 1f9f610f14ef..dc7236bce9b0 100644 --- a/vcl/source/gdi/gdimetafiletools.cxx +++ b/vcl/source/gdi/gdimetafiletools.cxx @@ -315,7 +315,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) const MetaISectRectClipRegionAction* pA = static_cast< const MetaISectRectClipRegionAction* >(pAction); const tools::Rectangle& rRect = pA->GetRect(); - if(!rRect.IsEmpty() && aClips.size() && aClips.back().count()) + if(!rRect.IsEmpty() && !aClips.empty() && aClips.back().count()) { const basegfx::B2DRange aClipRange( rRect.Left(), rRect.Top(), @@ -335,7 +335,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) const MetaISectRegionClipRegionAction* pA = static_cast< const MetaISectRegionClipRegionAction* >(pAction); const vcl::Region& rRegion = pA->GetRegion(); - if(!rRegion.IsEmpty() && aClips.size() && aClips.back().count()) + if(!rRegion.IsEmpty() && !aClips.empty() && aClips.back().count()) { const basegfx::B2DPolyPolygon aNewClip(rRegion.GetAsB2DPolyPolygon()); @@ -354,7 +354,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) const long aHorMove(pA->GetHorzMove()); const long aVerMove(pA->GetVertMove()); - if((aHorMove || aVerMove) && aClips.size() && aClips.back().count()) + if((aHorMove || aVerMove) && !aClips.empty() && aClips.back().count()) { aClips.back().transform( basegfx::utils::createTranslateB2DHomMatrix( @@ -386,7 +386,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) case MetaActionType::POP : { - if(aPushFlags.size()) + if(!aPushFlags.empty()) { const PushFlags nFlags(aPushFlags.back()); aPushFlags.pop_back(); @@ -441,7 +441,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) // this tooling is only a fallback (see comments in header), only the needed // actions will be implemented. Extend using the pattern for the already // implemented actions. - if(aClips.size() && aClips.back().count()) + if(!aClips.empty() && aClips.back().count()) { switch(nType) { diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index 4b0c9cdc5725..9655126ed411 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -322,7 +322,7 @@ void PageSyncData::PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDa bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const GDIMetaFile& rMtf, const PDFExtOutDevData& rOutDevData ) { bool bRet = false; - if ( mActions.size() && ( mActions.front().nIdx == rCurGDIMtfAction ) ) + if ( !mActions.empty() && ( mActions.front().nIdx == rCurGDIMtfAction ) ) { bRet = true; PDFExtOutDevDataSync aDataSync = mActions.front(); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index d3496adc4f1e..48475a52fba8 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1234,7 +1234,7 @@ bool PDFWriterImpl::PDFPage::emit(sal_Int32 nParentObject ) } aLine.append( "]\n" ); } - if( m_aMCIDParents.size() > 0 ) + if( !m_aMCIDParents.empty() ) { OStringBuffer aStructParents( 1024 ); aStructParents.append( "[ " ); @@ -4672,7 +4672,7 @@ bool PDFWriterImpl::emitWidgetAnnotations() } aValue.append( "]" ); } - else if( rWidget.m_aSelectedEntries.size() > 0 && + else if( !rWidget.m_aSelectedEntries.empty() && rWidget.m_aSelectedEntries[0] >= 0 && rWidget.m_aSelectedEntries[0] < sal_Int32(rWidget.m_aListEntries.size()) ) { @@ -4708,7 +4708,7 @@ bool PDFWriterImpl::emitWidgetAnnotations() aLine.append( rWidget.m_nParent ); aLine.append( " 0 R\n" ); } - if( rWidget.m_aKids.size() ) + if( !rWidget.m_aKids.empty() ) { aLine.append( "/Kids[" ); for( size_t i = 0; i < rWidget.m_aKids.size(); i++ ) @@ -4886,7 +4886,7 @@ bool PDFWriterImpl::emitWidgetAnnotations() bool PDFWriterImpl::emitAnnotations() { - if( m_aPages.size() < 1 ) + if( m_aPages.empty() ) return false; CHECK_RETURN( emitLinkAnnotations() ); @@ -5191,7 +5191,7 @@ bool PDFWriterImpl::emitCatalog() { aLine.append( "/MarkInfo<</Marked true>>\n" ); } - if( m_aWidgets.size() > 0 ) + if( !m_aWidgets.empty() ) { aLine.append( "/AcroForm<</Fields[\n" ); int nWidgets = m_aWidgets.size(); @@ -5899,7 +5899,7 @@ bool PDFWriterImpl::emitTrailer() aLine.append( aDocChecksum.makeStringAndClear() ); aLine.append( "\n" ); } - if( m_aAdditionalStreams.size() > 0 ) + if( !m_aAdditionalStreams.empty() ) { aLine.append( "/AdditionalStreams [" ); for(const PDFAddStream & rAdditionalStream : m_aAdditionalStreams) @@ -8398,7 +8398,7 @@ void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly, const PDFWriter:: case PDFWriter::joinRound: aLine.append( " 1 j" );break; case PDFWriter::joinBevel: aLine.append( " 2 j" );break; } - if( rInfo.m_aDashArray.size() > 0 ) + if( !rInfo.m_aDashArray.empty() ) { aLine.append( " [ " ); for (auto const& dash : rInfo.m_aDashArray) diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 7636569fd8fb..1cd4f81993c5 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -591,7 +591,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa bSkipSequence = true; if ( aStartArrow.Count() || aEndArrow.Count() ) bSkipSequence = false; - if ( aDashArray.size() && ( fStrokeWidth != 0.0 ) && ( fTransparency == 0.0 ) ) + if ( !aDashArray.empty() && ( fStrokeWidth != 0.0 ) && ( fTransparency == 0.0 ) ) bSkipSequence = false; if ( bSkipSequence ) { diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 8d876acaa38f..36edd1bbcdde 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -791,7 +791,7 @@ SalPrinterQueueInfo* Printer::ImplGetQueueInfo( const OUString& rPrinterName, ImplInitPrnQueueList(); ImplPrnQueueList* pPrnList = pSVData->maGDIData.mpPrinterQueueList; - if ( pPrnList && pPrnList->m_aQueueInfos.size() ) + if ( pPrnList && !pPrnList->m_aQueueInfos.empty() ) { // first search for the printer name directly ImplPrnQueueData* pInfo = pPrnList->Get( rPrinterName ); |