[Libreoffice-commits] .: 2 commits - autodoc/inc autodoc/source chart2/source comphelper/source connectivity/source dbaccess/source desktop/source editeng/source extensions/qa forms/source fpicker/source lotuswordpro/source registry/tools sc/source sd/source sdext/source shell/source soltools/giparser soltools/inc starmath/source stoc/source svx/source sw/source ucb/source vcl/generic vcl/source writerfilter/qa writerfilter/source writerperfect/source xmloff/source
Ivan Timofeev
ivantimofeev at kemper.freedesktop.org
Sun Feb 19 05:32:35 PST 2012
autodoc/inc/ary/info/ci_text.hxx | 2
autodoc/source/display/idl/hfi_module.cxx | 2
autodoc/source/display/idl/hfi_xrefpage.cxx | 2
autodoc/source/display/idl/hi_factory.cxx | 2
autodoc/source/exes/adc_uni/adc_cl.cxx | 2
chart2/source/controller/dialogs/DialogModel.cxx | 2
comphelper/source/container/container.cxx | 4
connectivity/source/drivers/file/fanalyzer.cxx | 2
connectivity/source/drivers/file/fcomp.cxx | 4
connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx | 2
connectivity/source/drivers/postgresql/pq_tools.hxx | 2
dbaccess/source/ui/misc/WColumnSelect.cxx | 2
dbaccess/source/ui/querydesign/TableConnectionData.cxx | 2
desktop/source/deployment/registry/dp_backenddb.cxx | 4
desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 2
editeng/source/misc/txtrange.cxx | 2
editeng/source/outliner/outlobj.cxx | 2
extensions/qa/update/test_update.cxx | 2
forms/source/component/EventThread.cxx | 2
fpicker/source/unx/kde_unx/UnxCommandThread.cxx | 2
fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx | 2
lotuswordpro/source/filter/xfilter/xfindex.cxx | 2
registry/tools/regcompare.cxx | 4
sc/source/core/data/dociter.cxx | 6
sc/source/core/data/dptablecache.cxx | 2
sc/source/ui/vba/vbahyperlinks.cxx | 2
sc/source/ui/view/viewdata.cxx | 4
sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx | 2
sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx | 2
sdext/source/presenter/PresenterTimer.cxx | 4
sdext/source/presenter/PresenterToolBar.cxx | 2
shell/source/win32/simplemail/senddoc.cxx | 4
shell/source/win32/simplemail/smplmailclient.cxx | 2
soltools/giparser/makefile.mk | 8
soltools/giparser/st_gilrw.cxx | 108 --------
soltools/inc/st_gilrw.hxx | 127 ----------
starmath/source/cursor.cxx | 6
starmath/source/dialog.cxx | 2
starmath/source/parse.cxx | 2
stoc/source/corereflection/crefl.cxx | 2
stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx | 2
stoc/source/tdmanager/tdmgr.cxx | 2
svx/source/fmcomp/gridctrl.cxx | 2
sw/source/core/SwNumberTree/SwNumberTree.cxx | 2
sw/source/core/table/swnewtable.cxx | 2
sw/source/ui/wrtsh/navmgr.cxx | 2
ucb/source/ucp/tdoc/tdoc_storage.cxx | 2
ucb/source/ucp/webdav/ContentProperties.cxx | 2
ucb/source/ucp/webdav/NeonHeadRequest.cxx | 2
ucb/source/ucp/webdav/NeonLockStore.cxx | 2
ucb/source/ucp/webdav/NeonSession.cxx | 2
vcl/generic/print/glyphset.cxx | 10
vcl/source/gdi/pdfwriter_impl.cxx | 2
vcl/source/glyphs/graphite_layout.cxx | 2
writerfilter/qa/cppunittests/odiapi/testProperty.cxx | 4
writerfilter/source/doctok/WW8DocumentImpl.cxx | 2
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 2
writerfilter/source/ooxml/OOXMLFastHelper.hxx | 6
writerperfect/source/filter/OdgGenerator.cxx | 2
xmloff/source/style/xmlnumfi.cxx | 4
xmloff/source/text/txtparae.cxx | 2
61 files changed, 80 insertions(+), 317 deletions(-)
New commits:
commit d30b4e9fb66f377295d8eeea8c1b1cf879aecdf6
Author: Elton Chung <elton at layerjet.com>
Date: Sun Feb 19 16:59:40 2012 +0400
Get rid of size() == 0
diff --git a/autodoc/inc/ary/info/ci_text.hxx b/autodoc/inc/ary/info/ci_text.hxx
index 4e8bf7a..a178ff7 100644
--- a/autodoc/inc/ary/info/ci_text.hxx
+++ b/autodoc/inc/ary/info/ci_text.hxx
@@ -62,7 +62,7 @@ class DocuText
{ aTokens.push_back(&let_drToken); }
const TokenList & Tokens() const { return aTokens; }
bool IsNoHtml() const { return NOT bUsesHtml; }
- bool IsEmpty() const { return aTokens.size() == 0; }
+ bool IsEmpty() const { return aTokens.empty(); }
private:
TokenList aTokens;
diff --git a/autodoc/source/display/idl/hfi_module.cxx b/autodoc/source/display/idl/hfi_module.cxx
index eb65a14..85be9cb 100644
--- a/autodoc/source/display/idl/hfi_module.cxx
+++ b/autodoc/source/display/idl/hfi_module.cxx
@@ -214,7 +214,7 @@ HF_IdlModule::produce_ChildList( const String & i_sName,
const String & i_sLabel,
const ce_ptr_list & i_list ) const
{
- if ( i_list.size() == 0 )
+ if ( i_list.empty() )
return false;
HF_SubTitleTable
diff --git a/autodoc/source/display/idl/hfi_xrefpage.cxx b/autodoc/source/display/idl/hfi_xrefpage.cxx
index e067308..35d647a 100644
--- a/autodoc/source/display/idl/hfi_xrefpage.cxx
+++ b/autodoc/source/display/idl/hfi_xrefpage.cxx
@@ -74,7 +74,7 @@ HF_IdlXrefs::Write_ManualLinks( const client & i_ce ) const
{
const StringVector &
rLinks2Refs = i_ce.Secondaries().Links2RefsInManual();
- if ( rLinks2Refs.size() == 0 )
+ if ( rLinks2Refs.empty() )
{
rContentDirectory
<< C_sDevMan
diff --git a/autodoc/source/display/idl/hi_factory.cxx b/autodoc/source/display/idl/hi_factory.cxx
index d194d60..832420f 100644
--- a/autodoc/source/display/idl/hi_factory.cxx
+++ b/autodoc/source/display/idl/hi_factory.cxx
@@ -234,7 +234,7 @@ HtmlFactory_Idl::write_ManualLinks( Xml::Element & o_screen,
{
const StringVector &
rLinks2Descrs = i_ce.Secondaries().Links2DescriptionInManual();
- if ( rLinks2Descrs.size() == 0 )
+ if ( rLinks2Descrs.empty() )
return;
o_screen
diff --git a/autodoc/source/exes/adc_uni/adc_cl.cxx b/autodoc/source/exes/adc_uni/adc_cl.cxx
index f2cc54f..4c5624f 100644
--- a/autodoc/source/exes/adc_uni/adc_cl.cxx
+++ b/autodoc/source/exes/adc_uni/adc_cl.cxx
@@ -255,7 +255,7 @@ CommandLine::do_PrintUse() const
bool
CommandLine::inq_CheckParameters() const
{
- if (NOT bInitOk OR aCommands.size() == 0)
+ if (NOT bInitOk OR aCommands.empty())
return false;
return true;
}
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index e0abe6d..5d93ee0 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -90,7 +90,7 @@ OUString lcl_ConvertRole( const OUString & rRoleString, bool bFromInternalToUI )
typedef ::std::map< OUString, OUString > tTranslationMap;
static tTranslationMap aTranslationMap;
- if( aTranslationMap.size() == 0 )
+ if( aTranslationMap.empty() )
{
aTranslationMap[ C2U( "categories" ) ] = OUString( String( ::chart::SchResId( STR_DATA_ROLE_CATEGORIES )));
aTranslationMap[ C2U( "error-bars-x" ) ] = OUString( String( ::chart::SchResId( STR_DATA_ROLE_X_ERROR )));
diff --git a/comphelper/source/container/container.cxx b/comphelper/source/container/container.cxx
index ffc514f..7bf2f8f 100644
--- a/comphelper/source/container/container.cxx
+++ b/comphelper/source/container/container.cxx
@@ -113,7 +113,7 @@ IndexAccessIterator::~IndexAccessIterator() {}
bCheckingStartingPoint = sal_False;
}
- if ((m_arrChildIndizies.size() == 0) && !bCheckingStartingPoint)
+ if (m_arrChildIndizies.empty() && !bCheckingStartingPoint)
{ // das ist genau dann der Fall, wenn ich keinen rechten Nachbarn fuer irgendeinen der direkten Vorfahren des
// urspruenglichen xSearchLoop gefunden habe
bHasMoreToSearch = sal_False;
@@ -138,7 +138,7 @@ IndexAccessIterator::~IndexAccessIterator() {}
if (!bFoundSomething)
{
- OSL_ENSURE(m_arrChildIndizies.size() == 0, "IndexAccessIterator::Next : items left on stack ! how this ?");
+ OSL_ENSURE(m_arrChildIndizies.empty(), "IndexAccessIterator::Next : items left on stack ! how this ?");
Invalidate();
}
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index b954b61..d5f327d 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -263,7 +263,7 @@ void OSQLAnalyzer::describeParam(::rtl::Reference<OSQLColumns> rParameterColumns
OOperand* pOperand = aCodeStack.top();
aCodeStack.pop();
- OSL_ENSURE(aCodeStack.size() == 0, "StackFehler");
+ OSL_ENSURE(aCodeStack.empty(), "StackFehler");
OSL_ENSURE(pOperand, "StackFehler");
if (IS_TYPE(OOperandResult,pOperand))
delete pOperand;
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index 84e7c8b..b984e3f 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -578,7 +578,7 @@ sal_Bool OPredicateInterpreter::evaluate(OCodeList& rCodeList)
OOperand* pOperand = m_aStack.top();
m_aStack.pop();
- DBG_ASSERT(m_aStack.size() == 0, "StackFehler");
+ DBG_ASSERT(m_aStack.empty(), "StackFehler");
DBG_ASSERT(pOperand, "StackFehler");
bResult = pOperand->isValid();
@@ -605,7 +605,7 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueD
OOperand* pOperand = m_aStack.top();
m_aStack.pop();
- DBG_ASSERT(m_aStack.size() == 0, "StackFehler");
+ DBG_ASSERT(m_aStack.empty(), "StackFehler");
DBG_ASSERT(pOperand, "StackFehler");
(*_rVal) = pOperand->getValue();
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
index 346dcc0..1678716 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
@@ -300,7 +300,7 @@ namespace connectivity
//default profile setted in mozilla registry
return m_Product.mCurrentProfileName;
}
- if (m_Product.mProfileList.size() == 0)
+ if (m_Product.mProfileList.empty())
{
//there are not any profiles
return ::rtl::OUString();
diff --git a/connectivity/source/drivers/postgresql/pq_tools.hxx b/connectivity/source/drivers/postgresql/pq_tools.hxx
index 152d005..fd72b80 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.hxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.hxx
@@ -197,7 +197,7 @@ public:
template < typename T, typename Allocator > com::sun::star::uno::Sequence<T> sequence_of_vector ( const std::vector<T, Allocator> &vec )
{
- if ( vec.size() == 0 )
+ if ( vec.empty() )
return com::sun::star::uno::Sequence<T>();
else
return com::sun::star::uno::Sequence<T>( &vec[0], vec.size());
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index 7775349..6e92b1d 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -134,7 +134,7 @@ void OWizColumnSelect::ActivatePage( )
{
DBG_CHKTHIS(OWizColumnSelect,NULL);
// if there are no dest columns reset the left side with the origibnal columns
- if(m_pParent->getDestColumns()->size() == 0)
+ if(m_pParent->getDestColumns()->empty())
Reset();
clearListBox(m_lbNewColumnNames);
diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
index 539c2e4..321718b 100644
--- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
@@ -59,7 +59,7 @@ void OTableConnectionData::Init()
{
//////////////////////////////////////////////////////////////////////
// LineDataList mit Defaults initialisieren
- OSL_ENSURE(m_vConnLineData.size() == 0, "OTableConnectionData::Init() : nur mit leere Linienliste aufzurufen !");
+ OSL_ENSURE(m_vConnLineData.empty(), "OTableConnectionData::Init() : nur mit leere Linienliste aufzurufen !");
ResetConnLines(sal_True);
// das legt Defaults an
}
diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx
index 85d07f8..a219f13 100644
--- a/desktop/source/deployment/registry/dp_backenddb.cxx
+++ b/desktop/source/deployment/registry/dp_backenddb.cxx
@@ -296,7 +296,7 @@ void BackendDb::writeVectorOfPair(
css::uno::Reference<css::xml::dom::XNode> const & xParent)
{
try{
- if (vecPairs.size() == 0)
+ if (vecPairs.empty())
return;
const OUString sNameSpace = getDbNSName();
OSL_ASSERT(!sNameSpace.isEmpty());
@@ -413,7 +413,7 @@ void BackendDb::writeSimpleList(
{
try
{
- if (list.size() == 0)
+ if (list.empty())
return;
const OUString sNameSpace = getDbNSName();
const OUString sPrefix(getNSPrefix() + OUSTR(":"));
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 5dba571..0750d38 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -344,7 +344,7 @@ void printf_packages(
{
OSL_ASSERT(allExtensions.size() == vecUnaccepted.size());
- if (allExtensions.size() == 0)
+ if (allExtensions.empty())
{
printf_space( level );
dp_misc::writeConsole("<none>\n");
diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx
index f473a18..f2c8288 100644
--- a/editeng/source/misc/txtrange.cxx
+++ b/editeng/source/misc/txtrange.cxx
@@ -409,7 +409,7 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
}
if( !bMultiple )
{
- DBG_ASSERT( pLongArr->size() == 0, "I said: Simple!" );
+ DBG_ASSERT( pLongArr->empty(), "I said: Simple!" );
if( nAct )
{
if( bInner )
diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx
index 32bec10..3578c3a 100644
--- a/editeng/source/outliner/outlobj.cxx
+++ b/editeng/source/outliner/outlobj.cxx
@@ -57,7 +57,7 @@ public:
mbIsEditDoc(bIsEditDoc),
mnRefCount(0)
{
- if( (maParagraphDataVector.size() == 0) && (pEditTextObject->GetParagraphCount() != 0) )
+ if( maParagraphDataVector.empty() && (pEditTextObject->GetParagraphCount() != 0) )
maParagraphDataVector.resize(pEditTextObject->GetParagraphCount());
}
diff --git a/extensions/qa/update/test_update.cxx b/extensions/qa/update/test_update.cxx
index af93e66..3551f8a 100644
--- a/extensions/qa/update/test_update.cxx
+++ b/extensions/qa/update/test_update.cxx
@@ -154,7 +154,7 @@ protected:
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "123456-abcdef-1a2b3c-4d5e6f" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InstallSetID" ) ) ) )
{
- CPPUNIT_ASSERT( aInfo.Sources.size() == 0 );
+ CPPUNIT_ASSERT( aInfo.Sources.empty() );
}
else
CPPUNIT_FAIL( "Calling checkForUpdates() failed." );
diff --git a/forms/source/component/EventThread.cxx b/forms/source/component/EventThread.cxx
index 204da93..e937a33 100644
--- a/forms/source/component/EventThread.cxx
+++ b/forms/source/component/EventThread.cxx
@@ -65,7 +65,7 @@ OComponentEventThread::~OComponentEventThread()
{
DBG_DTOR( OComponentEventThread, NULL );
- DBG_ASSERT( m_aEvents.size() == 0,
+ DBG_ASSERT( m_aEvents.empty(),
"OComponentEventThread::~OComponentEventThread: Kein dispose gerufen?" );
impl_clearEventQueue();
diff --git a/fpicker/source/unx/kde_unx/UnxCommandThread.cxx b/fpicker/source/unx/kde_unx/UnxCommandThread.cxx
index d929be3..8f7ee3d 100644
--- a/fpicker/source/unx/kde_unx/UnxCommandThread.cxx
+++ b/fpicker/source/unx/kde_unx/UnxCommandThread.cxx
@@ -182,7 +182,7 @@ void SAL_CALL UnxFilePickerCommandThread::handleCommand( const ::rtl::OUString &
::std::list< ::rtl::OUString > aList = tokenize( rCommand );
- if ( aList.size() == 0 )
+ if ( aList.empty() )
return;
::rtl::OUString aCommandName = aList.front();
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
index 17af330..2777662 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
@@ -775,7 +775,7 @@ void VistaFilePickerImpl::impl_sta_setFiltersOnDialog()
aLock.clear();
// <- SYNCHRONIZED
- if (lFilters.size() == 0)
+ if (lFilters.empty())
return;
COMDLG_FILTERSPEC *pFilt = &lFilters[0];
diff --git a/lotuswordpro/source/filter/xfilter/xfindex.cxx b/lotuswordpro/source/filter/xfilter/xfindex.cxx
index 01034db..1fc791b 100644
--- a/lotuswordpro/source/filter/xfilter/xfindex.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfindex.cxx
@@ -211,7 +211,7 @@ void XFIndex::ToXml(IXFStream *pStrm)
{
for(sal_uInt16 i=1; i <= MAX_TOC_LEVEL; i++)
{
- if (m_aTOCSource[i].size() == 0)
+ if (m_aTOCSource[i].empty())
{
// unnecessary to output this level
continue;
diff --git a/registry/tools/regcompare.cxx b/registry/tools/regcompare.cxx
index c12e1c1..5426d4c 100644
--- a/registry/tools/regcompare.cxx
+++ b/registry/tools/regcompare.cxx
@@ -262,11 +262,11 @@ bool Options_Impl::initOptions_Impl (std::vector< std::string > & rArgs)
}
}
- if ( m_regName1.size() == 0 )
+ if ( m_regName1.empty() )
{
return badOption("missing", "-r1");
}
- if ( m_regName2.size() == 0 )
+ if ( m_regName2.empty() )
{
return badOption("missing", "-r2");
}
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 86a4d7c..9588638 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -311,7 +311,7 @@ sal_Bool ScValueIterator::GetThis(double& rValue, sal_uInt16& rErr)
}
}
pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
- } while ( pCol->maItems.size() == 0 );
+ } while ( pCol->maItems.empty() );
pCol->Search( nRow, nColRow );
}
@@ -1040,7 +1040,7 @@ ScBaseCell* ScCellIterator::GetThis()
return NULL; // Ende und Aus
}
pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
- } while ( pCol->maItems.size() == 0 );
+ } while ( pCol->maItems.empty() );
pCol->Search( nRow, nColRow );
}
@@ -1152,7 +1152,7 @@ ScBaseCell* ScQueryCellIterator::GetThis()
nFirstQueryField = rEntry.nField;
}
pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
- } while ( pCol->maItems.size() == 0 );
+ } while ( pCol->maItems.empty() );
pCol->Search( nRow, nColRow );
bFirstStringIgnore = bIgnoreMismatchOnLeadingStrings &&
!mpParam->bHasHeader && rItem.meType == ScQueryEntry::ByString &&
diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx
index d5c3f2a..cc60e6f 100644
--- a/sc/source/core/data/dptablecache.cxx
+++ b/sc/source/core/data/dptablecache.cxx
@@ -640,7 +640,7 @@ void ScDPCache::AddLabel(ScDPItemData *pData)
{
OSL_ENSURE( IsValid(), " IsValid() == false " );
- if ( maLabelNames.size() == 0 )
+ if ( maLabelNames.empty() )
maLabelNames.push_back( new ScDPItemData(ScGlobal::GetRscString(STR_PIVOT_DATA)) );
//reset name if needed
diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx
index 85c6ae6..d83a76d 100644
--- a/sc/source/ui/vba/vbahyperlinks.cxx
+++ b/sc/source/ui/vba/vbahyperlinks.cxx
@@ -46,7 +46,7 @@ namespace {
bool lclContains( const ScRangeList& rScOuter, const uno::Reference< excel::XRange >& rxInner ) throw (uno::RuntimeException)
{
const ScRangeList& rScInner = ScVbaRange::getScRangeList( rxInner );
- if( (rScInner.size() == 0) || (rScOuter.size() == 0) )
+ if( rScInner.empty() || rScOuter.empty() )
throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Empty range objects" ) ), uno::Reference< uno::XInterface >() );
for( size_t nIndex = 0, nCount = rScInner.size(); nIndex < nCount; ++nIndex )
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 8a96403..a220fdf 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -563,7 +563,7 @@ void ScViewData::CreateTabData( std::vector< SCTAB >& rvTabs )
void ScViewData::SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs )
{
- sal_Bool bAll = ( tabs.size() == 0 );
+ sal_Bool bAll = ( tabs.empty() );
if ( !bAll ) // create associated table data
CreateTabData( tabs );
@@ -603,7 +603,7 @@ void ScViewData::SetZoomType( SvxZoomType eNew, sal_Bool bAll )
void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vector< SCTAB >& tabs )
{
- sal_Bool bAll = ( tabs.size() == 0 );
+ sal_Bool bAll = ( tabs.empty() );
if ( !bAll ) // create associated table data
CreateTabData( tabs );
Fraction aFrac20( 1,5 );
diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
index bd215a4..09b082a 100644
--- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
+++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
@@ -280,7 +280,7 @@ void LayeredDevice::Repaint (const Region& rRepaintRegion)
void LayeredDevice::RepaintRectangle (const Rectangle& rRepaintRectangle)
{
- if (mpLayers->size() == 0)
+ if (mpLayers->empty())
return;
else if (mpLayers->size() == 1)
{
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx
index 71064c3..68c94a7 100644
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx
@@ -217,7 +217,7 @@ IMPL_LINK(MasterPageContainerQueue, DelayedPreviewCreation, Timer*, pTimer)
do
{
- if (mpRequestQueue->size() == 0)
+ if (mpRequestQueue->empty())
break;
// First check whether the system is idle.
diff --git a/sdext/source/presenter/PresenterTimer.cxx b/sdext/source/presenter/PresenterTimer.cxx
index 3757bd0..dca44fd 100644
--- a/sdext/source/presenter/PresenterTimer.cxx
+++ b/sdext/source/presenter/PresenterTimer.cxx
@@ -260,7 +260,7 @@ void TimerScheduler::CancelTask (const sal_Int32 nTaskId)
// When the last active task was canceled then the timer can be
// stopped.
- if (maScheduledTasks.size() == 0)
+ if (maScheduledTasks.empty())
{
mbIsRunning = false;
resume();
@@ -477,7 +477,7 @@ void PresenterClockTimer::RemoveListener (const SharedListener& rListener)
rListener));
if (iListener != maListeners.end())
maListeners.erase(iListener);
- if (maListeners.size() == 0)
+ if (maListeners.empty())
{
// We have no more clients and therefore are not interested in time changes.
if (mnTimerTaskId != PresenterTimer::NotAValidTaskId)
diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx
index 23a19cd..3a6aa83 100644
--- a/sdext/source/presenter/PresenterToolBar.cxx
+++ b/sdext/source/presenter/PresenterToolBar.cxx
@@ -727,7 +727,7 @@ void PresenterToolBar::ProcessEntry (
void PresenterToolBar::Layout (
const Reference<rendering::XCanvas>& rxCanvas)
{
- if (maElementContainer.size() == 0)
+ if (maElementContainer.empty())
return;
mbIsLayoutPending = false;
diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx
index 49ae9d8..54169e5 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -111,7 +111,7 @@ void addRecipient(
/** @internal */
void initRecipientList(MapiRecipientList_t* pMapiRecipientList)
{
- OSL_ASSERT(pMapiRecipientList->size() == 0);
+ OSL_ASSERT(pMapiRecipientList->empty());
// add to recipients
StringListIterator_t iter = gTo.begin();
@@ -135,7 +135,7 @@ void initRecipientList(MapiRecipientList_t* pMapiRecipientList)
/** @internal */
void initAttachementList(MapiAttachmentList_t* pMapiAttachmentList)
{
- OSL_ASSERT(pMapiAttachmentList->size() == 0);
+ OSL_ASSERT(pMapiAttachmentList->empty());
StringListIterator_t iter = gAttachments.begin();
StringListIterator_t iter_end = gAttachments.end();
diff --git a/shell/source/win32/simplemail/smplmailclient.cxx b/shell/source/win32/simplemail/smplmailclient.cxx
index 09ab23f..4b70c8a 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/simplemail/smplmailclient.cxx
@@ -186,7 +186,7 @@ void CSmplMailClient::assembleCommandLine(
const Reference<XSimpleMailMessage>& xSimpleMailMessage,
sal_Int32 aFlag, StringList_t& rCommandArgs)
{
- OSL_ENSURE(rCommandArgs.size() == 0, "Provided command argument buffer not empty");
+ OSL_ENSURE(rCommandArgs.empty(), "Provided command argument buffer not empty");
rtl::OUString to = xSimpleMailMessage->getRecipient();
if (to.getLength() > 0)
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index c2d7f4f..684521f 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -298,7 +298,7 @@ void SmCursor::Delete(){
}
void SmCursor::InsertNodes(SmNodeList* pNewNodes){
- if(pNewNodes->size() == 0){
+ if(pNewNodes->empty()){
delete pNewNodes;
return;
}
@@ -702,7 +702,7 @@ void SmCursor::InsertBrackets(SmBracketType eBracketType) {
//If there's no selected nodes, create a place node
SmNode *pBodyNode;
SmCaretPos PosAfterInsert;
- if(pSelectedNodesList->size() == 0) {
+ if(pSelectedNodesList->empty()) {
pBodyNode = new SmPlaceNode();
PosAfterInsert = SmCaretPos(pBodyNode, 1);
} else
@@ -871,7 +871,7 @@ bool SmCursor::InsertRow() {
it = pLineList->end();
if(it != pLineList->begin())
--it;
- if(pNewLineList->size() == 0)
+ if(pNewLineList->empty())
pNewLineList->push_front(new SmPlaceNode());
//Parse new line
SmNode *pNewLine = SmNodeListParser().Parse(pNewLineList);
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index bc9037b..33feb52 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1291,7 +1291,7 @@ void SmShowSymbolSet::SelectSymbol(sal_uInt16 nSymbol)
if (nSymbol < aSymbolSet.size())
nSelectSymbol = nSymbol;
- if (aSymbolSet.size() == 0)
+ if (aSymbolSet.empty())
nSelectSymbol = SYMBOL_NONE;
if (nSelectSymbol != SYMBOL_NONE)
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 7876956..9b7c2a5 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1112,7 +1112,7 @@ void SmParser::Line()
//If there's no expression, add an empty one.
//this is to avoid a formula tree without any caret
//positions, in visual formula editor.
- if(ExpressionArray.size() == 0)
+ if(ExpressionArray.empty())
ExpressionArray.push_back(new SmExpressionNode(SmToken()));
SmStructureNode *pSNode = new SmLineNode(m_aCurToken);
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index eb35840..1296ccd 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -159,7 +159,7 @@ void IdlReflectionServiceImpl::dispose()
MutexGuard aGuard( _aComponentMutex );
_aElements.clear();
#ifdef TEST_LIST_CLASSES
- OSL_ENSURE( g_aClassNames.size() == 0, "### idl classes still alive!" );
+ OSL_ENSURE( g_aClassNames.empty(), "### idl classes still alive!" );
ClassNameList::const_iterator iPos( g_aClassNames.begin() );
while (iPos != g_aClassNames.end())
{
diff --git a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
index d5bcd9b..cfc59a1 100644
--- a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
+++ b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
@@ -171,7 +171,7 @@ TypeDescriptionEnumerationImpl::createInstance(
if ( !bOpenKeySucceeded )
throw reflection::NoSuchTypeNameException();
- if ( aModuleKeys.size() == 0 )
+ if ( aModuleKeys.empty() )
throw reflection::InvalidTypeNameException();
return rtl::Reference< TypeDescriptionEnumerationImpl >(
diff --git a/stoc/source/tdmanager/tdmgr.cxx b/stoc/source/tdmanager/tdmgr.cxx
index d3d5ced..e8a8256 100644
--- a/stoc/source/tdmanager/tdmgr.cxx
+++ b/stoc/source/tdmanager/tdmgr.cxx
@@ -290,7 +290,7 @@ ManagerImpl::ManagerImpl(
//__________________________________________________________________________________________________
ManagerImpl::~ManagerImpl()
{
- OSL_ENSURE( _aProviders.size() == 0, "### still providers left!" );
+ OSL_ENSURE( _aProviders.empty(), "### still providers left!" );
OSL_TRACE( "> TypeDescriptionManager shut down. <" );
::g_moduleCount.modCnt.release( &::g_moduleCount.modCnt );
}
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 0bfe673..44941b9 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -3688,7 +3688,7 @@ void DbGridControl::EndCursorAction()
void DbGridControl::ConnectToFields()
{
ColumnFieldValueListeners* pListeners = (ColumnFieldValueListeners*)m_pFieldListeners;
- DBG_ASSERT(!pListeners || pListeners->size() == 0, "DbGridControl::ConnectToFields : please call DisconnectFromFields first !");
+ DBG_ASSERT(!pListeners || pListeners->empty(), "DbGridControl::ConnectToFields : please call DisconnectFromFields first !");
if (!pListeners)
{
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx
index bc34218..b2359f9 100644
--- a/sw/source/core/SwNumberTree/SwNumberTree.cxx
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -358,7 +358,7 @@ SwNumberTreeNode * SwNumberTreeNode::GetFirstNonPhantomChild()
void SwNumberTreeNode::MoveGreaterChildren( SwNumberTreeNode& _rCompareNode,
SwNumberTreeNode& _rDestNode )
{
- if ( mChildren.size() == 0 )
+ if ( mChildren.empty() )
return;
// determine first child, which has to move to <_rDestNode>
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index d2ba75e..3f68127 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -2068,7 +2068,7 @@ SwSaveRowSpan* SwTable::CleanUpTopRowSpan( sal_uInt16 nSplitLine )
if( !IsNewModel() )
return pRet;
pRet = new SwSaveRowSpan( GetTabLines()[0]->GetTabBoxes(), nSplitLine );
- if( pRet->mnRowSpans.size() == 0 )
+ if( pRet->mnRowSpans.empty() )
{
delete pRet;
pRet = 0;
diff --git a/sw/source/ui/wrtsh/navmgr.cxx b/sw/source/ui/wrtsh/navmgr.cxx
index 6ee6222..66a53f1 100644
--- a/sw/source/ui/wrtsh/navmgr.cxx
+++ b/sw/source/ui/wrtsh/navmgr.cxx
@@ -201,7 +201,7 @@ bool SwNavigationMgr::addEntry(const SwPosition& rPos) {
bRet = true;
}
else {
- if ( (m_entries.size() > 0 && *m_entries.back()->GetPoint() != rPos) || (m_entries.size() == 0) ) {
+ if ( (!m_entries.empty() && *m_entries.back()->GetPoint() != rPos) || m_entries.empty() ) {
SwUnoCrsr *const pCursor = m_rMyShell.GetDoc()->CreateUnoCrsr(rPos);
m_entries.push_back(::boost::shared_ptr<SwUnoCrsr>(pCursor));
bRet = true;
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index 3c64fbe..501f4e3 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -72,7 +72,7 @@ StorageElementFactory::StorageElementFactory(
//=========================================================================
StorageElementFactory::~StorageElementFactory()
{
- OSL_ENSURE( m_aMap.size() == 0,
+ OSL_ENSURE( m_aMap.empty(),
"StorageElementFactory::~StorageElementFactory - Dangling storages!" );
}
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx
index 21c59b3..cebd00a 100644
--- a/ucb/source/ucp/webdav/ContentProperties.cxx
+++ b/ucb/source/ucp/webdav/ContentProperties.cxx
@@ -391,7 +391,7 @@ bool ContentProperties::containsAllNames(
}
}
- return ( rNamesNotContained.size() == 0 );
+ return ( rNamesNotContained.empty() );
}
//=========================================================================
diff --git a/ucb/source/ucp/webdav/NeonHeadRequest.cxx b/ucb/source/ucp/webdav/NeonHeadRequest.cxx
index 58cf37b..2db9be5 100644
--- a/ucb/source/ucp/webdav/NeonHeadRequest.cxx
+++ b/ucb/source/ucp/webdav/NeonHeadRequest.cxx
@@ -49,7 +49,7 @@ void process_headers( ne_request * req,
rtl::OUString aHeaderValue( rtl::OUString::createFromAscii( value ) );
// Note: Empty vector means that all headers are requested.
- bool bIncludeIt = ( rHeaderNames.size() == 0 );
+ bool bIncludeIt = ( rHeaderNames.empty() );
if ( !bIncludeIt )
{
diff --git a/ucb/source/ucp/webdav/NeonLockStore.cxx b/ucb/source/ucp/webdav/NeonLockStore.cxx
index 53dd1b4..1ad726a 100644
--- a/ucb/source/ucp/webdav/NeonLockStore.cxx
+++ b/ucb/source/ucp/webdav/NeonLockStore.cxx
@@ -98,7 +98,7 @@ NeonLockStore::~NeonLockStore()
stopTicker();
// release active locks, if any.
- OSL_ENSURE( m_aLockInfoMap.size() == 0,
+ OSL_ENSURE( m_aLockInfoMap.empty(),
"NeonLockStore::~NeonLockStore - Releasing active locks!" );
LockInfoMap::const_iterator it( m_aLockInfoMap.begin() );
diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx
index 3ab4d39..b80d665 100644
--- a/ucb/source/ucp/webdav/NeonSession.cxx
+++ b/ucb/source/ucp/webdav/NeonSession.cxx
@@ -1897,7 +1897,7 @@ void runResponseHeaderHandler( void * userdata,
= static_cast< NeonRequestContext * >( userdata );
// Note: Empty vector means that all headers are requested.
- bool bIncludeIt = ( pCtx->pHeaderNames->size() == 0 );
+ bool bIncludeIt = ( pCtx->pHeaderNames->empty() );
if ( !bIncludeIt )
{
diff --git a/vcl/generic/print/glyphset.cxx b/vcl/generic/print/glyphset.cxx
index 6287eda..5b03666 100644
--- a/vcl/generic/print/glyphset.cxx
+++ b/vcl/generic/print/glyphset.cxx
@@ -210,14 +210,14 @@ GlyphSet::GetSymbolMapping (sal_Unicode nUnicodeChar)
void
GlyphSet::AddNotdef (char_map_t &rCharMap)
{
- if (rCharMap.size() == 0)
+ if (rCharMap.empty())
rCharMap[0] = 0;
}
void
GlyphSet::AddNotdef (glyph_map_t &rGlyphMap)
{
- if (rGlyphMap.size() == 0)
+ if (rGlyphMap.empty())
rGlyphMap[0] = 0;
}
sal_Bool
@@ -699,7 +699,7 @@ GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx)
PSDefineReencodedFont (pOutFile, nGlyphSetID);
continue;
}
- if ((*aGlyphSet).size() == 0) // empty set, doesn't need reencoding
+ if ((*aGlyphSet).empty()) // empty set, doesn't need reencoding
{
continue;
}
@@ -845,7 +845,7 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
aCharSet != maCharList.end();
++aCharSet, nCharSetID++)
{
- if ((*aCharSet).size() == 0)
+ if ((*aCharSet).empty())
continue;
// loop thru all the chars in the subset
@@ -877,7 +877,7 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
aGlyphSet != maGlyphList.end();
++aGlyphSet, nGlyphSetID++)
{
- if ((*aGlyphSet).size() == 0)
+ if ((*aGlyphSet).empty())
continue;
// loop thru all the glyphs in the subset
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 79ded4b..8456d86 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2272,7 +2272,7 @@ ImplFontEntry* ImplPdfBuiltinFontData::CreateFontInstance( FontSelectPattern& rF
ImplDevFontList* PDFWriterImpl::filterDevFontList( ImplDevFontList* pFontList )
{
- DBG_ASSERT( m_aSubsets.size() == 0, "Fonts changing during PDF generation, document will be invalid" );
+ DBG_ASSERT( m_aSubsets.empty(), "Fonts changing during PDF generation, document will be invalid" );
ImplDevFontList* pFiltered = pFontList->Clone( true, true );
// append the PDF builtin fonts
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index 85a6751..ce6c051 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -859,7 +859,7 @@ void GraphiteLayout::expandOrCondense(ImplLayoutArgs &rArgs)
}
else if (nDeltaWidth < 0)// condense - apply a factor to all glyph positions
{
- if (mvGlyphs.size() == 0) return;
+ if (mvGlyphs.empty()) return;
Glyphs::iterator iLastGlyph = mvGlyphs.begin() + (mvGlyphs.size() - 1);
// position last glyph using original width
float fXFactor = static_cast<float>(rArgs.mnLayoutWidth - iLastGlyph->mnOrigWidth) / static_cast<float>(iLastGlyph->maLinearPos.X());
diff --git a/writerfilter/qa/cppunittests/odiapi/testProperty.cxx b/writerfilter/qa/cppunittests/odiapi/testProperty.cxx
index 3ec3448..dc8d519 100644
--- a/writerfilter/qa/cppunittests/odiapi/testProperty.cxx
+++ b/writerfilter/qa/cppunittests/odiapi/testProperty.cxx
@@ -207,7 +207,7 @@ public:
pb->clear();
- CPPUNIT_ASSERT_MESSAGE("Clearing property bag failed", pb->size() == 0);
+ CPPUNIT_ASSERT_MESSAGE("Clearing property bag failed", pb->empty());
}
void testSortPropertyBag()
@@ -393,7 +393,7 @@ public:
PropertyBag_Pointer_t pb = createPropertyBag();
PropertyPoolHandle_Pointer_t ph = pool->insert(pb);
- CPPUNIT_ASSERT_MESSAGE("Inserting empty property bag failed", ph->getPropertyBag()->size() == 0);
+ CPPUNIT_ASSERT_MESSAGE("Inserting empty property bag failed", ph->getPropertyBag()->empty());
}
void testDumpPropertyPool()
diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx
index b5e15ed..fd62856 100644
--- a/writerfilter/source/doctok/WW8DocumentImpl.cxx
+++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx
@@ -164,7 +164,7 @@ public:
{
string s((*SprmIdToString::Instance())(rId));
- if (s.size() == 0)
+ if (s.empty())
s = (*QNameToString::Instance())(rId);
return s;
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 4b183b9..f892357 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -111,7 +111,7 @@ public:
{
string s((*QNameToString::Instance())(rId));
- if (s.size() == 0)
+ if (s.empty())
s = "(fasttoken)" + fastTokenToId(rId);
else
s = "(qname)" + s;
diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx b/writerfilter/source/ooxml/OOXMLFastHelper.hxx
index f955566..c0296c4 100644
--- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx
@@ -191,7 +191,7 @@ void OOXMLFastHelper<T>::newProperty(OOXMLFastContextHandler * pHandler,
::rtl::OUStringToOString
(rValue, RTL_TEXTENCODING_ASCII_US).getStr());
- if (aStr.size() == 0)
+ if (aStr.empty())
debug_logger->element( "unknown-qname" );
#endif
@@ -217,7 +217,7 @@ void OOXMLFastHelper<T>::newProperty(OOXMLFastContextHandler * pHandler,
debug_logger->attribute("name", aStr);
debug_logger->attribute("value", pVal->toString());
- if (aStr.size() == 0)
+ if (aStr.empty())
debug_logger->element("unknown-qname");
debug_logger->endElement();
@@ -243,7 +243,7 @@ void OOXMLFastHelper<T>::mark(OOXMLFastContextHandler * pHandler,
::rtl::OUStringToOString
(rValue, RTL_TEXTENCODING_ASCII_US).getStr());
- if (aStr.size() == 0)
+ if (aStr.empty())
debug_logger->element("unknown-qname");
debug_logger->endElement();
diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index 6d58aa4..52f1329 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -222,7 +222,7 @@ static WPXString doubleToString(const double value)
#else
std::string decimalPoint(".");
#endif
- if ((decimalPoint.size() == 0) || (decimalPoint == "."))
+ if (decimalPoint.empty() || (decimalPoint == "."))
return tempString;
std::string stringValue(tempString.cstr());
if (!stringValue.empty())
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 3a964a3..5483632 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -1579,7 +1579,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
// and no color definition (detected by the '[' at the start)
if ( nType == XML_TOK_STYLES_NUMBER_STYLE && !bHasExtraText &&
- aMyConditions.size() == 0 && sFormat.toChar() != (sal_Unicode)'[' )
+ aMyConditions.empty() && sFormat.toChar() != (sal_Unicode)'[' )
nIndex = pFormatter->GetStandardIndex( nFormatLang );
}
if ( bAutoInt ) // automatic integer digits
@@ -1587,7 +1587,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
//! only if two decimal places was set?
if ( nType == XML_TOK_STYLES_NUMBER_STYLE && !bHasExtraText &&
- aMyConditions.size() == 0 && sFormat.toChar() != (sal_Unicode)'[' )
+ aMyConditions.empty() && sFormat.toChar() != (sal_Unicode)'[' )
nIndex = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, nFormatLang );
}
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 3cd935a..029fd97 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -1337,7 +1337,7 @@ XMLTextParagraphExport::~XMLTextParagraphExport()
txtparae_bContainsIllegalCharacters = sal_False;
#endif
PopTextListsHelper();
- DBG_ASSERT( maTextListsHelperStack.size() == 0,
+ DBG_ASSERT( maTextListsHelperStack.empty(),
"misusage of text lists helper stack - it is not empty. Serious defect - please inform OD" );
}
commit 704c9477039e37b4910db6aa8dd644751dd5e6a5
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sun Feb 19 16:56:17 2012 +0400
ST_InfoListReader and ST_InfoListWriter seem to be unused
diff --git a/soltools/giparser/makefile.mk b/soltools/giparser/makefile.mk
index b2dbe39..0ac4301 100644
--- a/soltools/giparser/makefile.mk
+++ b/soltools/giparser/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -49,14 +49,12 @@ all:
OBJFILES=\
$(OBJ)$/gen_info.obj \
$(OBJ)$/gi_list.obj \
- $(OBJ)$/gi_parse.obj \
- $(OBJ)$/st_gilrw.obj
+ $(OBJ)$/gi_parse.obj
SLOFILES=\
$(SLO)$/gen_info.obj \
$(SLO)$/gi_list.obj \
- $(SLO)$/gi_parse.obj \
- $(SLO)$/st_gilrw.obj
+ $(SLO)$/gi_parse.obj
# --- Targets ------------------------------------------------------
diff --git a/soltools/giparser/st_gilrw.cxx b/soltools/giparser/st_gilrw.cxx
deleted file mode 100644
index 35b7e0f..0000000
--- a/soltools/giparser/st_gilrw.cxx
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-
-#include <st_gilrw.hxx>
-
-#include <gen_info.hxx>
-#include <gi_list.hxx>
-#include <gi_parse.hxx>
-#include <simstr.hxx>
-#include <st_list.hxx>
-
-
-using namespace std;
-
-
-ST_InfoListReader::ST_InfoListReader()
-{
- dpParser = new GenericInfo_Parser;
-}
-
-ST_InfoListReader::~ST_InfoListReader()
-{
- delete dpParser;
-}
-
-
-bool
-ST_InfoListReader::LoadList( List_GenericInfo & o_rList,
- const Simstr & i_sFileName )
-{
- aListStack.push_back(&o_rList);
- return dpParser->LoadList(*this, i_sFileName);
-}
-
-ST_InfoListReader::E_Error
-ST_InfoListReader::GetLastError( UINT32 * o_pErrorLine ) const
-{
- return dpParser->GetLastError(o_pErrorLine);
-}
-
-void
-ST_InfoListReader::AddKey( const char * i_sKey,
- UINT32 i_nKeyLength,
- const char * i_sValue,
- UINT32 i_nValueLength,
- const char * i_sComment,
- UINT32 i_nCommentLength )
-{
- Simstr sKey(i_sKey, i_nKeyLength);
- Simstr sValue(i_sValue, i_nValueLength);
- Simstr sComment(i_sComment, i_nCommentLength);
-
- pCurKey = new GenericInfo(sKey, sValue, sComment);
- aListStack.back()->InsertInfo( pCurKey );
-}
-
-void
-ST_InfoListReader::OpenList()
-{
- if ( pCurKey == 0 )
- {
- cerr << "error: '{' without key found." << endl;
- exit(1);
- }
-
- aListStack.push_back( & pCurKey->SubList() );
-}
-
-void
-ST_InfoListReader::CloseList()
-{
- if ( aListStack.size() == 0 )
- {
- cerr << "error: '}' without corresponding '}' found." << endl;
- exit(1);
- }
-
- aListStack.pop_back();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/soltools/inc/st_gilrw.hxx b/soltools/inc/st_gilrw.hxx
deleted file mode 100644
index 7617b50..0000000
--- a/soltools/inc/st_gilrw.hxx
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SOLTOOLS_ST_GILRW_HXX
-#define SOLTOOLS_ST_GILRW_HXX
-
-
-#include "gilacces.hxx"
-#include "st_list.hxx"
-
-class Simstr;
-class List_GenericInfo;
-class GenericInfo;
-class GenericInfo_Parser;
-
-class ST_InfoListReader : public GenericInfoParseTypes,
- private GenericInfoList_Builder
-{
- public:
- // LIFECYCLE
- ST_InfoListReader();
- ~ST_InfoListReader();
- // OPERATIONS
- bool LoadList(
- List_GenericInfo & o_rList,
- const Simstr & i_sFileName );
- // INFO
- E_Error GetLastError(
- UINT32 * o_pErrorLine = 0 ) const;
- private:
- // Interface GenericInfoList_Builder
- virtual void AddKey(
- const char * i_sKey,
- UINT32 i_nKeyLength,
- const char * i_sValue,
- UINT32 i_nValueLength,
- const char * i_sComment,
- UINT32 i_nCommentLength );
-
- virtual void OpenList();
- virtual void CloseList();
-
- // Forbid copies:
- ST_InfoListReader( const ST_InfoListReader & );
- ST_InfoListReader & operator=( const ST_InfoListReader & );
-
- // DATA
- GenericInfo_Parser *
- dpParser;
-
- ST_List< List_GenericInfo * >
- aListStack;
- GenericInfo * pCurKey;
-};
-
-class ST_InfoListWriter : public GenericInfoParseTypes,
- private GenericInfoList_Browser
-{
- public:
- // LIFECYCLE
- ST_InfoListWriter();
- ~ST_InfoListWriter();
- // OPERATIONS
- bool SaveList(
- const Simstr & i_sFileName,
- List_GenericInfo & io_rList );
-
- // INFO
- E_Error GetLastError() const;
-
- private:
- // Interface GenericInfoList_Browser
- virtual bool Start_CurList();
- virtual bool NextOf_CurList();
-
- virtual void Get_CurKey(
- char * o_rKey ) const;
- virtual void Get_CurValue(
- char * o_rValue ) const;
- virtual void Get_CurComment(
- char * o_rComment ) const;
- virtual bool HasSubList_CurKey() const;
-
- virtual void Push_CurList();
- virtual void Pop_CurList();
-
- // Forbid copies:
- ST_InfoListWriter( const ST_InfoListWriter & );
- ST_InfoListWriter & operator=( const ST_InfoListWriter & );
-
- // DATA
- GenericInfo_Parser *
- dpParser;
-
- ST_List< List_GenericInfo * >
- aListStack;
- GenericInfo * pCurKey;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list