summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/bitmap/bitmappaint.cxx4
-rw-r--r--vcl/source/control/notebookbar.cxx2
-rw-r--r--vcl/source/control/tabctrl.cxx4
-rw-r--r--vcl/source/control/throbber.cxx2
-rw-r--r--vcl/source/edit/textdata.cxx2
-rw-r--r--vcl/source/edit/texteng.cxx2
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx10
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx14
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx2
-rw-r--r--vcl/source/gdi/print.cxx2
-rw-r--r--vcl/source/window/builder.cxx4
12 files changed, 25 insertions, 25 deletions
diff --git a/vcl/source/bitmap/bitmappaint.cxx b/vcl/source/bitmap/bitmappaint.cxx
index 0bbd32559bfe..7f754997d694 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -681,7 +681,7 @@ vcl::Region Bitmap::CreateRegion(const Color& rColor, const tools::Rectangle& rR
if (aNewLine != aLine)
{
// need to write aLine, it's different from the next line
- if (aLine.size())
+ if (!aLine.empty())
{
tools::Rectangle aSubRect;
@@ -704,7 +704,7 @@ vcl::Region Bitmap::CreateRegion(const Color& rColor, const tools::Rectangle& rR
}
// write last line if used
- if (aLine.size())
+ if (!aLine.empty())
{
tools::Rectangle aSubRect;
diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx
index 9b2381e2cc95..5c8fed1fee15 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -147,7 +147,7 @@ void NotebookBar::SetSystemWindow(SystemWindow* pSystemWindow)
void SAL_CALL NotebookBarContextChangeEventListener::notifyContextChangeEvent(const css::ui::ContextChangeEventObject& rEvent)
{
- if (mpParent && mpParent->m_pContextContainers.size() > 0)
+ if (mpParent && !mpParent->m_pContextContainers.empty())
{
for (NotebookbarContextControl* pControl : mpParent->m_pContextContainers)
pControl->SetContext(vcl::EnumContext::GetContextEnum(rEvent.ContextName));
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index c8eba348db53..e0b38b2549d8 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2018,7 +2018,7 @@ tools::Rectangle TabControl::GetCharacterBounds( sal_uInt16 nPageId, long nIndex
{
tools::Rectangle aRet;
- if( !HasLayoutData() || ! mpTabCtrlData->maLayoutPageIdToLine.size() )
+ if( !HasLayoutData() || mpTabCtrlData->maLayoutPageIdToLine.empty() )
FillLayoutData();
if( HasLayoutData() )
@@ -2039,7 +2039,7 @@ long TabControl::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPageId ) co
{
long nRet = -1;
- if( !HasLayoutData() || ! mpTabCtrlData->maLayoutPageIdToLine.size() )
+ if( !HasLayoutData() || mpTabCtrlData->maLayoutPageIdToLine.empty() )
FillLayoutData();
if( HasLayoutData() )
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx
index 48f1f47733e6..5b4dc1b570d5 100644
--- a/vcl/source/control/throbber.cxx
+++ b/vcl/source/control/throbber.cxx
@@ -170,7 +170,7 @@ void Throbber::setImageList( ::std::vector< Image > const& i_images )
maImageList = i_images;
- const Image aInitialImage( maImageList.size() ? maImageList[ 0 ] : Image() );
+ const Image aInitialImage( !maImageList.empty() ? maImageList[ 0 ] : Image() );
SetImage( aInitialImage );
}
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index 493cb434e5de..63fdab60ffef 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -117,7 +117,7 @@ void TETextPortionList::Reset()
void TETextPortionList::DeleteFromPortion( std::size_t nDelFrom )
{
- SAL_WARN_IF( ( nDelFrom >= maPortions.size() ) && ( (nDelFrom != 0) || (maPortions.size() != 0) ), "vcl", "DeleteFromPortion: Out of range" );
+ SAL_WARN_IF( ( nDelFrom >= maPortions.size() ) && ( (nDelFrom != 0) || (!maPortions.empty()) ), "vcl", "DeleteFromPortion: Out of range" );
maPortions.erase( maPortions.begin() + nDelFrom, maPortions.end() );
}
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index b15446522b35..08e1ba46212e 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -2353,7 +2353,7 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
pTEParaPortion->GetLines().end() );
}
- SAL_WARN_IF( !pTEParaPortion->GetLines().size(), "vcl", "CreateLines: No Line!" );
+ SAL_WARN_IF( pTEParaPortion->GetLines().empty(), "vcl", "CreateLines: No Line!" );
pTEParaPortion->SetValid();
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 );
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index cc4e9d18f8a4..360d96e2db82 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2464,7 +2464,7 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read
sal_uInt16 nPageId = pTabControl->GetCurPageId();
pTabControl->SetPageText(nPageId, aFind->second);
pTabControl->SetPageName(nPageId, sID);
- if (context.size() != 0)
+ if (!context.empty())
{
TabPage* pPage = pTabControl->GetTabPage(nPageId);
pPage->SetContext(context);
@@ -3406,7 +3406,7 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm
if (pPrioritable)
pPrioritable->SetPriority(nPriority);
}
- if (aContext.size() != 0)
+ if (!aContext.empty())
{
vcl::IContext* pContextControl = dynamic_cast<vcl::IContext*>(pCurrentChild.get());
SAL_WARN_IF(!pContextControl, "vcl", "context set for not supported item");