summaryrefslogtreecommitdiff
path: root/framework/collector
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-09-08 04:57:32 +0000
committerOliver Bolte <obo@openoffice.org>2009-09-08 04:57:32 +0000
commitca00697e3dae9a03573d11281fc8d9a4ee391d3d (patch)
treec390c65f02f6f32b6d6d9faa600f4688a8c81857 /framework/collector
parent047473d4f1a12e867ab7154113f7f1c5422d5368 (diff)
CWS-TOOLING: integrate CWS oj18
2009-08-21 15:08:49 +0200 oj r275263 : wrong check 2009-08-21 08:56:01 +0200 oj r275215 : missing not 2009-08-20 07:27:13 +0200 oj r275164 : use new method from global 2009-08-19 10:22:35 +0200 oj r275138 : call GetLocale instead of pLocale 2009-08-18 10:39:32 +0200 oj r275082 : missing header include 2009-08-18 10:09:44 +0200 oj r275081 : new methods at global 2009-08-18 10:09:00 +0200 oj r275080 : unused var 2009-08-18 08:59:04 +0200 oj r275078 : move files from classes to xml 2009-08-17 14:58:16 +0200 oj r275056 : CWS-TOOLING: rebase CWS oj18 to trunk@275001 (milestone: DEV300:m55) 2009-08-17 13:29:44 +0200 oj r275047 : compile error 2009-08-17 13:27:47 +0200 oj r275045 : compile error 2009-08-17 11:44:54 +0200 oj r275040 : add dep 2009-07-22 14:26:05 +0200 oj r274240 : move unused services into fwl 2009-07-22 14:25:35 +0200 oj r274239 : move unused services into fwl 2009-07-22 13:47:45 +0200 oj r274233 : remove some unused code 2009-07-22 09:06:20 +0200 oj r274219 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 08:48:58 +0200 oj r274218 : create NumberFormatter on demand 2009-07-22 08:39:23 +0200 oj r274217 : change char to sal_Char 2009-07-22 07:33:34 +0200 oj r274214 : export dbtoolsclient dbcharsethelper for sc 2009-07-22 07:30:04 +0200 oj r274213 : late init of numberformatter and breakiterator 2009-07-22 07:28:55 +0200 oj r274212 : export dbtoolsclient dbcharsethelper for sc 2009-07-21 13:43:28 +0200 oj r274196 : check if quick start is enbaled 2009-07-21 13:40:09 +0200 oj r274195 : check config entry for UiEventsLogger 2009-07-21 13:37:40 +0200 oj r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:35:38 +0200 oj r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files 2009-07-21 13:33:41 +0200 oj r274192 : doc meta data will now be created on demand 2009-07-21 13:13:40 +0200 oj r274187 : load ldap functions on demand 2009-07-21 13:03:17 +0200 oj r274183 : late init of TransliterationImpl 2009-07-21 12:36:10 +0200 oj r274180 : late init of charClass
Diffstat (limited to 'framework/collector')
-rw-r--r--framework/collector/cmduicollector.cxx40
-rw-r--r--framework/collector/uicmdstohtml.cxx4
2 files changed, 27 insertions, 17 deletions
diff --git a/framework/collector/cmduicollector.cxx b/framework/collector/cmduicollector.cxx
index e6d9fd0a726c..f71a74bff40f 100644
--- a/framework/collector/cmduicollector.cxx
+++ b/framework/collector/cmduicollector.cxx
@@ -865,8 +865,9 @@ bool impl_isDuplicateKey(const KeyCommandInfoList& rList,
const KeyCommandInfo& aInfo)
{
KeyCommandInfoList::const_iterator pInfo;
+ KeyCommandInfoList::const_iterator aEnd = rList.end();
for ( pInfo = rList.begin();
- pInfo != rList.end() ;
+ pInfo != aEnd ;
++pInfo )
{
if (
@@ -886,6 +887,7 @@ bool ReadAccelerators( int nLangIndex, ResMgr* pResMgr, MODULES eModule, const :
KeyCommandInfoList& rAccs = rLocale[nLangIndex];
USHORT c = pAcc->GetItemCount();
+ rAccs.reserve(rAccs.size()+c);
USHORT i = 0;
for (i=0; i<c; ++i)
{
@@ -1067,11 +1069,12 @@ SfxSlotInfo::SfxSlotInfo( const ResId &rResId ) :
bool ReadSlotInfos( int nLangIndex, ResMgr* pResMgr, MODULES eModule, const OUString& aProjectName )
{
- CommandIDToLabelsMap::iterator pIter = moduleMapFiles[MODULE_GLOBAL].begin();;
+ CommandIDToLabelsMap::iterator pIter = moduleMapFiles[MODULE_GLOBAL].begin();
+ CommandIDToLabelsMap::iterator pEnd = moduleMapFiles[MODULE_GLOBAL].end();
if ( eModule != MODULE_GLOBAL )
{
- while ( pIter != moduleMapFiles[MODULE_GLOBAL].end() )
+ while ( pIter != pEnd )
{
int nId = pIter->first;
CommandLabels& rCmdLabels = pIter->second;
@@ -1091,7 +1094,8 @@ bool ReadSlotInfos( int nLangIndex, ResMgr* pResMgr, MODULES eModule, const OUSt
}
pIter = moduleMapFiles[eModule].begin();
- while ( pIter != moduleMapFiles[eModule].end() )
+ pEnd = moduleMapFiles[eModule].end();
+ while ( pIter != pEnd )
{
int nId = pIter->first;
CommandLabels& rCmdLabels = pIter->second;
@@ -1261,13 +1265,15 @@ void FindAndMarkModulePopupMenuCmds()
for ( int i = 0; i < int( MODULE_COUNT ); i++ )
{
CommandToLabelsMap::iterator pCmdIter = modulePopupMenusCmd[i].begin();
- while ( pCmdIter != modulePopupMenusCmd[i].end() )
+ CommandToLabelsMap::iterator pCmdEnd = modulePopupMenusCmd[i].end();
+ while ( pCmdIter != pCmdEnd )
{
CommandLabels& rCmdLabel = pCmdIter->second;
if ( rCmdLabel.bPopupMenu )
{
CommandIDToLabelsMap::iterator pIDIter = moduleMapFiles[i].begin();
- while ( pIDIter != moduleMapFiles[i].end() )
+ CommandIDToLabelsMap::iterator pIDEnd = moduleMapFiles[i].end();
+ while ( pIDIter != pIDEnd )
{
CommandLabels& rIDLabel = pIDIter->second;
if ( rIDLabel.aCommand.equals( rCmdLabel.aCommand ))
@@ -1311,7 +1317,8 @@ bool FindAndMoveGlobalPopupMenus()
for ( int i = 1; i < int( MODULE_COUNT ); i++ )
{
CommandToLabelsMap::iterator pCmdIter = modulePopupMenusCmd[i].begin();
- while ( pCmdIter != modulePopupMenusCmd[i].end() )
+ CommandToLabelsMap::iterator pCmdEnd = modulePopupMenusCmd[i].end();
+ while ( pCmdIter != pCmdEnd )
{
CommandLabels& rCmdLabel = pCmdIter->second;
if ( rCmdLabel.bPopupMenu )
@@ -1409,8 +1416,8 @@ bool WriteXMLFiles( const OUString& aOutputDirURL)
aXMLFile.write( ComponentDataStartEnd, strlen( ComponentDataStartEnd ), nWritten );
aXMLFile.write( GroupText, strlen( GroupText ), nWritten );
- if (( moduleMapFiles[i].size() > 0 ) ||
- ( modulePopupMenusCmd[i].size() > 0 ) )
+ if (( !moduleMapFiles[i].empty() ) ||
+ ( !modulePopupMenusCmd[i].empty() ) )
{
for ( int nSets = 0; nSets < 2; nSets++ )
{
@@ -1420,7 +1427,8 @@ bool WriteXMLFiles( const OUString& aOutputDirURL)
aXMLFile.write( SetTextPopups, strlen( SetTextPopups ), nWritten );
CommandIDToLabelsMap::iterator pIter = moduleMapFiles[i].begin();
- while ( pIter != moduleMapFiles[i].end() )
+ CommandIDToLabelsMap::iterator pEnd = moduleMapFiles[i].end();
+ while ( pIter != pEnd )
{
CommandLabels& rCmdLabels = pIter->second;
@@ -1813,8 +1821,9 @@ bool impl_isAccListDuplicate(const KeyCommandInfoList& rAccsReference,
const KeyCommandInfoList& rAccs )
{
KeyCommandInfoList::const_iterator pIt1;
+ KeyCommandInfoList::const_iterator aEnd = rAccsReference.end();
for ( pIt1 = rAccsReference.begin();
- pIt1 != rAccsReference.end() ;
+ pIt1 != aEnd ;
++pIt1 )
{
KeyCommandInfoList::const_iterator pIt2 = ::std::find(rAccs.begin(), rAccs.end(), *pIt1);
@@ -1839,7 +1848,7 @@ bool ReadResourceWriteAcceleratorXMLLang( const ::rtl::OUString& aOutDirURL,
KeyCommandInfoList& rAccsReference = rLocale[1]; // en-US!
// dont write empty files :-)
- if (rAccs.size()<1)
+ if ( rAccs.empty() )
return true;
::rtl::OUString sLanguage = ::rtl::OUString::createFromAscii(Language_codes[nLanguage].pLanguage);
@@ -1901,8 +1910,9 @@ bool ReadResourceWriteAcceleratorXMLLang( const ::rtl::OUString& aOutDirURL,
::rtl::OUStringBuffer sAccBuf(10000);
KeyCommandInfoList::const_iterator pIt;
+ KeyCommandInfoList::const_iterator aEnd = rAccs.end();
for ( pIt = rAccs.begin();
- pIt != rAccs.end() ;
+ pIt != aEnd ;
++pIt )
{
const KeyCommandInfo& aInfo = *pIt;
@@ -2620,7 +2630,7 @@ bool GetCommandOptions( const ::std::vector< OUString >& rArgs, const OUString&
}
}
- return( rParams.size() > 0 );
+ return( !rParams.empty() );
}
void ShowUsage()
@@ -2694,7 +2704,7 @@ void Main()
if ( aVersion.getLength() > 0 &&
aPlatformName.getLength() > 0 &&
aUseRes.getLength() > 0 &&
- aInDirVector.size() > 0 )
+ !aInDirVector.empty() )
{
Convert( bUseProduct, aUseRes, aVersion, aOutputDirName, aPlatformName, aInDirVector, aErrOutputFileName );
}
diff --git a/framework/collector/uicmdstohtml.cxx b/framework/collector/uicmdstohtml.cxx
index 7745ca5a5472..b89879745952 100644
--- a/framework/collector/uicmdstohtml.cxx
+++ b/framework/collector/uicmdstohtml.cxx
@@ -697,7 +697,7 @@ bool WriteJumpTable( osl::File& rFile )
sal_uInt32 i = 0;
while ( ModuleName[i] != 0 )
{
- if ( moduleMapFiles[i].size() > 0 )
+ if ( !moduleMapFiles[i].empty() )
{
OString aTableNameStr( ModuleName[i] );
OStringBuffer aJumpMark( aTableNameStr );
@@ -850,7 +850,7 @@ bool WriteHTMLFile( const OUString& aOutputDirURL)
while ( ModuleToXML_Mapping[i] != 0 )
{
SortCommandTable( MODULES( i ));
- if ( moduleCmdVector[i].size() > 0 )
+ if ( !moduleCmdVector[i].empty() )
{
WriteHTMLTable( aHTMLFile, OUString::createFromAscii( ModuleName[i] ));