diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-11 10:06:49 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-02-06 08:55:50 -0500 |
commit | aaeead445c1c73de6f8f4c088ef87dd6fb24c661 (patch) | |
tree | 25339038b555394fd8b3e505803ce0f32a195f01 /sfx2/source | |
parent | 7a58bd20dce4119507344e9a0c5a8aa44662045d (diff) |
convert expressions like 'size() == 0' to 'empty()'
(cherry picked from commit 776a3f14f2d987312b926ebc1ad09321a3a87f0d)
Change-Id: Ia5c8c0f38a347f398d587970a22e03f29ffd37af
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/control/recentdocsview.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx index 43b8d55e1a85..7a76ea369ee9 100644 --- a/sfx2/source/control/recentdocsview.cxx +++ b/sfx2/source/control/recentdocsview.cxx @@ -265,7 +265,7 @@ void RecentDocsView::Paint(vcl::RenderContext& rRenderContext, const Rectangle & set_width_request(mnTextHeight + mnItemMaxSize + 2 * mnItemPadding); } - if (mItemList.size() == 0) + if (mItemList.empty()) { // No recent files to be shown yet. Show a welcome screen. rRenderContext.Push(PushFlags::FONT | PushFlags::TEXTCOLOR); diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index e2ad5895b347..fc0228f86671 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -777,18 +777,18 @@ sal_Int8 ModelData_Impl::CheckFilter( const OUString& aFilterName ) // if the old filter is not acceptable // and there is no default filter or it is not acceptable for requested parameters then proceed with saveAs - if ( ( !aFiltPropsHM.size() || !( nFiltFlags & SfxFilterFlags::EXPORT ) ) - && ( !aDefFiltPropsHM.size() || !( nDefFiltFlags & SfxFilterFlags::EXPORT ) || nDefFiltFlags & SfxFilterFlags::INTERNAL ) ) + if ( ( aFiltPropsHM.empty() || !( nFiltFlags & SfxFilterFlags::EXPORT ) ) + && ( aDefFiltPropsHM.empty() || !( nDefFiltFlags & SfxFilterFlags::EXPORT ) || nDefFiltFlags & SfxFilterFlags::INTERNAL ) ) return STATUS_SAVEAS; // so at this point there is either an acceptable old filter or default one - if ( !aFiltPropsHM.size() || !( nFiltFlags & SfxFilterFlags::EXPORT ) ) + if ( aFiltPropsHM.empty() || !( nFiltFlags & SfxFilterFlags::EXPORT ) ) { // so the default filter must be acceptable return STATUS_SAVEAS_STANDARDNAME; } else if ( ( !( nFiltFlags & SfxFilterFlags::OWN ) || ( nFiltFlags & SfxFilterFlags::ALIEN ) ) - && aDefFiltPropsHM.size() + && !aDefFiltPropsHM.empty() && ( nDefFiltFlags & SfxFilterFlags::EXPORT ) && !( nDefFiltFlags & SfxFilterFlags::INTERNAL )) { // the default filter is acceptable and the old filter is alien one @@ -949,7 +949,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, if ( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED ) ) { - if ( ( nStoreMode & PDFEXPORT_REQUESTED ) && aPreselectedFilterPropsHM.size() ) + if ( ( nStoreMode & PDFEXPORT_REQUESTED ) && !aPreselectedFilterPropsHM.empty() ) { // this is a PDF export // the filter options has been shown already |