summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/misc
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/misc')
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx8
-rw-r--r--dbaccess/source/ui/misc/HtmlReader.cxx12
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx4
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx16
4 files changed, 18 insertions, 22 deletions
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 09740afd0a51..d3504b4b3f18 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -112,8 +112,8 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows,
{
m_nRows += nRows;
sal_Int32 nCount = 0;
- for(sal_Int32 j=0;j < (sal_Int32)m_vColumns.size();++j)
- if ( m_vColumns[j].first != COLUMN_POSITION_NOT_FOUND )
+ for(const std::pair<sal_Int32,sal_Int32> & rPair : m_vColumns)
+ if ( rPair.first != COLUMN_POSITION_NOT_FOUND )
++nCount;
m_vColumnSize.resize(nCount);
@@ -345,11 +345,11 @@ void ODatabaseExport::insertValueIntoColumn()
,NumberFormat::NUMBER
,NumberFormat::LOGICAL
};
- for (size_t i = 0; i < SAL_N_ELEMENTS(nFormats); ++i)
+ for (short nFormat : nFormats)
{
try
{
- nNumberFormat = m_xFormatter->detectNumberFormat(xNumType->getStandardFormat(nFormats[i],m_aLocale),m_sTextToken);
+ nNumberFormat = m_xFormatter->detectNumberFormat(xNumType->getStandardFormat(nFormat,m_aLocale),m_sTextToken);
break;
}
catch(Exception&)
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index 2cf1497bff1f..9442f8125c69 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -134,9 +134,8 @@ void OHTMLReader::NextToken( int nToken )
++m_nTableCount;
{ // can also be TD or TH, if there was no TABLE before
const HTMLOptions& rHtmlOptions = GetOptions();
- for (size_t i = 0, n = rHtmlOptions.size(); i < n; ++i)
+ for (const auto & rOption : rHtmlOptions)
{
- const HTMLOption& rOption = rHtmlOptions[i];
switch( rOption.GetToken() )
{
case HTML_O_WIDTH:
@@ -291,9 +290,8 @@ void OHTMLReader::fetchOptions()
{
m_bInTbl = true;
const HTMLOptions& options = GetOptions();
- for (size_t i = 0, n = options.size(); i < n; ++i)
+ for (const auto & rOption : options)
{
- const HTMLOption& rOption = options[i];
switch( rOption.GetToken() )
{
case HTML_O_SDVAL:
@@ -312,9 +310,8 @@ void OHTMLReader::fetchOptions()
void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
{
const HTMLOptions& rHtmlOptions = GetOptions();
- for (size_t i = 0, n = rHtmlOptions.size(); i < n; ++i)
+ for (const auto & rOption : rHtmlOptions)
{
- const HTMLOption& rOption = rHtmlOptions[i];
switch( rOption.GetToken() )
{
case HTML_O_ALIGN:
@@ -340,9 +337,8 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor)
{
const HTMLOptions& rHtmlOptions = GetOptions();
- for (size_t i = 0, n = rHtmlOptions.size(); i < n; ++i)
+ for (const auto & rOption : rHtmlOptions)
{
- const HTMLOption& rOption = rHtmlOptions[i];
switch( rOption.GetToken() )
{
case HTML_O_COLOR:
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index cf4cabdec2ab..abde97068c2a 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -891,8 +891,8 @@ bool callColumnFormatDialog(vcl::Window* _pParent,
pFormatDescriptor.reset();
SfxItemPool::Free(pPool);
- for (sal_uInt16 i=0; i<SAL_N_ELEMENTS(pDefaults); ++i)
- delete pDefaults[i];
+ for (SfxPoolItem* pDefault : pDefaults)
+ delete pDefault;
return bRet;
}
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 169a0b8d8d89..44ae24f14928 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -143,10 +143,10 @@ void ObjectCopySource::copyUISettingsTo( const Reference< XPropertySet >& _rxObj
const OUString aCopyProperties[] = {
OUString(PROPERTY_FONT), OUString(PROPERTY_ROW_HEIGHT), OUString(PROPERTY_TEXTCOLOR),OUString(PROPERTY_TEXTLINECOLOR),OUString(PROPERTY_TEXTEMPHASIS),OUString(PROPERTY_TEXTRELIEF)
};
- for ( size_t i=0; i < SAL_N_ELEMENTS( aCopyProperties ); ++i )
+ for (const auto & aCopyPropertie : aCopyProperties)
{
- if ( m_xObjectPSI->hasPropertyByName( aCopyProperties[i] ) )
- _rxObject->setPropertyValue( aCopyProperties[i], m_xObject->getPropertyValue( aCopyProperties[i] ) );
+ if ( m_xObjectPSI->hasPropertyByName( aCopyPropertie ) )
+ _rxObject->setPropertyValue( aCopyPropertie, m_xObject->getPropertyValue( aCopyPropertie ) );
}
}
@@ -165,19 +165,19 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _
OUString sStatement = "SELECT * FROM " + sTargetName + " WHERE 0=1";
- for ( size_t i=0; i < SAL_N_ELEMENTS(aProperties); ++i )
+ for (const std::pair<OUString,OUString> & aPropertie : aProperties)
{
- if ( m_xObjectPSI->hasPropertyByName( aProperties[i].first ) )
+ if ( m_xObjectPSI->hasPropertyByName( aPropertie.first ) )
{
OUString sFilter;
- m_xObject->getPropertyValue( aProperties[i].first ) >>= sFilter;
+ m_xObject->getPropertyValue( aPropertie.first ) >>= sFilter;
if ( !sFilter.isEmpty() )
{
- sStatement += aProperties[i].second;
+ sStatement += aPropertie.second;
OUString sReplace = sFilter;
sReplace = sReplace.replaceFirst(sSourceName,sTargetNameTemp);
sFilter = sReplace;
- _rxObject->setPropertyValue( aProperties[i].first, makeAny(sFilter) );
+ _rxObject->setPropertyValue( aPropertie.first, makeAny(sFilter) );
sStatement += sFilter;
}
}