[PATCH] Remove undesirable comments
Takeshi Abe
tabe at fixedpoint.jp
Mon Nov 29 06:29:33 PST 2010
---
.../source/core/dataaccess/databasecontext.cxx | 2 +-
dbaccess/source/ui/control/RelationControl.cxx | 5 +--
.../source/ui/querydesign/SelectionBrowseBox.cxx | 2 +-
.../ui/relationdesign/RTableConnectionData.cxx | 2 +-
.../source/ui/tabledesign/FieldDescriptions.cxx | 2 +-
dbaccess/source/ui/tabledesign/TableController.cxx | 4 +-
reportdesign/source/core/sdr/RptObject.cxx | 4 +-
reportdesign/source/ui/dlg/GroupsSorting.cxx | 4 +-
reportdesign/source/ui/inc/UITools.hxx | 2 +-
reportdesign/source/ui/misc/FunctionHelper.cxx | 6 ++--
reportdesign/source/ui/misc/UITools.cxx | 22 ++++++++++----------
reportdesign/source/ui/misc/Undo.cxx | 2 +-
.../source/ui/misc/statusbarcontroller.cxx | 4 +-
reportdesign/source/ui/report/ReportController.cxx | 2 +-
14 files changed, 31 insertions(+), 32 deletions(-)
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 6fcf10a..42ce480 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -160,7 +160,7 @@ namespace dbaccess
{
Reference<util::XCloseable> xCloseable(xModel,UNO_QUERY_THROW);
xCloseable->close(sal_False);
- } // if ( !xModel->getControllers()->hasMoreElements() )
+ }
}
catch(const CloseVetoException&)
{
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index d4a7009..85e7cb2 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -134,7 +134,7 @@ namespace dbaui
DBG_NAME(ORelationControl)
//------------------------------------------------------------------------
ORelationControl::ORelationControl( OTableListBoxControl* pParent ,const OJoinTableView::OTableWindowMap* _pTableMap)
- :EditBrowseBox( pParent, EBBF_SMART_TAB_TRAVEL | EBBF_NOROWPICTURE, WB_TABSTOP | /*WB_3DLOOK | */WB_BORDER | BROWSER_AUTOSIZE_LASTCOL)
+ :EditBrowseBox( pParent, EBBF_SMART_TAB_TRAVEL | EBBF_NOROWPICTURE, WB_TABSTOP | WB_BORDER | BROWSER_AUTOSIZE_LASTCOL)
,m_pTableMap(_pTableMap)
,m_pBoxControl(pParent)
,m_xSourceDef( NULL )
@@ -518,7 +518,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
pInitialRight = aIter->second;
m_strCurrentRight = aIter->first;
}
- } // for(;aIter != m_pTableMap->end();++aIter)
+ }
if ( !pInitialRight )
{
@@ -668,7 +668,6 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
{
_pTableSeparator->SetZOrder(&m_lmbRightTable, WINDOW_ZORDER_BEHIND);
m_pRC_Tables->SetZOrder(_pTableSeparator, WINDOW_ZORDER_BEHIND);
- //aDlgPoint = m_pTableSeparator->GetPosPixel() + Point(0,aSize.Height()) + LogicToPixel( Point(0,6), MAP_APPFONT );
_pTableSeparator->SetPosPixel(Point(0,m_aFL_InvolvedFields.GetPosPixel().Y()));
const Size aSize = _pTableSeparator->GetSizePixel();
aDlgPoint.Y() = _pTableSeparator->GetPosPixel().Y() + aSize.Height();
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 4f02a1f..2a2031c 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1588,7 +1588,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, USHORT& _nColu
getFields()[nOldPosition - 1] = pEntry;
ColumnMoved(pEntry->GetColumnId(),FALSE);
- } // if ( pEntry->GetColumnId() != nColumnId )
+ }
if ( pEntry->GetFunctionType() & (FKT_AGGREGATE) )
{
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index e31abba..f875bee 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -416,7 +416,7 @@ xKey.clear();
}
}
xKey.clear();
- } // for(sal_Int32 i=0;i<xKeys->getCount();++i)
+ }
if ( bDropRelation )
{
DropRelation();
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
index f4cf446..7f868b1 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
@@ -561,7 +561,7 @@ sal_Int32 OFieldDescription::GetPrecision() const
if ( !nPrec )
nPrec = pTypeInfo->nPrecision;
break;
- } // switch ( pTypeInfo->nType )
+ }
}
return nPrec;
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 9c98da0..982222b 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -1205,7 +1205,7 @@ void OTableController::alterColumns()
}
else
bReload = sal_True;
- } // for(sal_Int32 nPos = 0;aIter != aEnd;++aIter,++nPos)
+ }
// alter column settings
aIter = m_vRowList.begin();
@@ -1236,7 +1236,7 @@ void OTableController::alterColumns()
xColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(pField->GetFormatKey()));
if(xInfo->hasPropertyByName(PROPERTY_ALIGN))
xColumn->setPropertyValue(PROPERTY_ALIGN,makeAny(dbaui::mapTextAllign(pField->GetHorJustify())));
- } // if ( xColumns->hasByName(pField->GetName()) )
+ }
}
// second drop all columns which could be found by name
Reference<XNameAccess> xKeyColumns = getKeyColumns();
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 2552da8..363a52c 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -207,7 +207,7 @@ namespace
default:
OSL_ENSURE(0,"Illegal text alignment value!");
break;
- } // switch(nTextAlign)
+ }
aRet <<= (style::ParagraphAdjust)nTextAlign;
}
else
@@ -951,7 +951,7 @@ SdrObject* OUnoObject::Clone() const
Reference<XPropertySet> xDest(pClone->getUnoShape(),uno::UNO_QUERY);
if ( xSource.is() && xDest.is() )
comphelper::copyProperties(xSource.get(),xDest.get());
- } // if ( pClone )
+ }
return pClone;
}
//----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 992cb77..4f6f62f 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -248,7 +248,7 @@ uno::Sequence<uno::Any> OFieldExpressionControl::fillSelectedGroups()
}
if ( !vClipboardList.empty() )
aList = uno::Sequence< uno::Any >(&vClipboardList[0], vClipboardList.size());
- } // if ( nCount > 1 )
+ }
return aList;
}
//------------------------------------------------------------------------------
@@ -264,7 +264,7 @@ void OFieldExpressionControl::StartDrag( sal_Int8 /*_nAction*/ , const Point& /*
OGroupExchange* pData = new OGroupExchange(aClipboardList);
uno::Reference< ::com::sun::star::datatransfer::XTransferable> xRef = pData;
pData->StartDrag(this, DND_ACTION_MOVE );
- } // if(!vClipboardList.empty())
+ }
}
}
//------------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/inc/UITools.hxx b/reportdesign/source/ui/inc/UITools.hxx
index 11e30e9..49437bc 100644
--- a/reportdesign/source/ui/inc/UITools.hxx
+++ b/reportdesign/source/ui/inc/UITools.hxx
@@ -69,7 +69,7 @@ namespace rptui
::com::sun::star::uno::Reference< T > xObject(_xCollection->getByIndex(i),::com::sun::star::uno::UNO_QUERY);
if ( xObject == _xSearch )
break;
- } // for (;i<nCount ; ++i)
+ }
return i;
}
diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx
index d653ef9..07fccaf 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -58,7 +58,7 @@ sal_Unicode FunctionManager::getSingleToken(const formula::IFunctionManager::ETo
return sal_Unicode('{');
case eArrayClose:
return sal_Unicode('}');
- } // switch(_eToken)
+ }
return 0;
}
// -----------------------------------------------------------------------------
@@ -118,9 +118,9 @@ void FunctionManager::fillLastRecentlyUsedFunctions(::std::vector< const formula
m_aCategoryIndex.push_back( aCategoryFind );
}
aFunctionFind = m_aFunctions.insert(TFunctionsMap::value_type(sFunctionName,::boost::shared_ptr<FunctionDescription>(new FunctionDescription(aCategoryFind->second.get(),_xFunctionDescription)))).first;
- } // if ( aFind == m_aFunctions.end() )
+ }
pDesc = aFunctionFind->second;
- } // if ( _xFunctionDescription.is() )
+ }
return pDesc;
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index ba963d9..225ecee 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -175,14 +175,14 @@ void adjustSectionName(const uno::Reference< report::XGroup >& _xGroup,sal_Int32
::rtl::OUString sName = String(ModuleRes(RID_STR_GROUPHEADER));
sName += ::rtl::OUString::valueOf(_nPos);
_xGroup->getHeader()->setName(sName);
- } // if ( _xGroup->getHeaderOn() )
+ }
if ( _xGroup->getFooterOn() && !_xGroup->getFooter()->getName().getLength() )
{
::rtl::OUString sName = String(ModuleRes(RID_STR_GROUPFOOTER));
sName += ::rtl::OUString::valueOf(_nPos);
_xGroup->getFooter()->setName(sName);
- } // if ( _xGroup->getHeaderOn() )
+ }
}
// -----------------------------------------------------------------------------
::rtl::Reference< comphelper::OPropertyChangeMultiplexer> addStyleListener(const uno::Reference< report::XReportDefinition >& _xReportDefinition,::comphelper::OPropertyChangeListener* _pListener)
@@ -261,7 +261,7 @@ namespace
case COMPLEX:
aLocale = _rxReportControlFormat->getCharLocaleComplex();
break;
- } // switch(_nWhich)
+ }
_rItemSet.Put(SvxLanguageItem(MsLangId::convertLocaleToLanguageWithFallback(aLocale),_nLanguage));
@@ -288,7 +288,7 @@ namespace
pClone->PutValue(_xShape->getPropertyValue(aIt->sName), aIt->nMemberId);
_rItemSet.Put(*pClone, aIt->nWID);
}
- } // if ( xInfo->hasPropertyByName(sPropertyName) )
+ }
++aIt;
}
}
@@ -319,11 +319,11 @@ namespace
catch(uno::Exception&)
{ // shapes have a bug so we ignore this one.
}
- } // if ( pItem )
+ }
}
}
++aIt;
- } // while ( pPropertyMap->pName )
+ }
}
// -------------------------------------------------------------------------
void lcl_CharPropertiesToItems( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
@@ -398,7 +398,7 @@ namespace
aNewFont.SetFamily(pFontItem->GetFamily());
aNewFont.SetPitch(pFontItem->GetPitch());
aNewFont.SetCharSet(pFontItem->GetCharSet());
- } // if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_FONT,sal_True,&pItem) && pItem->ISA(SvxFontItem))
+ }
if ( SFX_ITEM_SET == _rItemSet.GetItemState( _nFontHeight,sal_True,&pItem) && pItem->ISA(SvxFontHeightItem))
{
const SvxFontHeightItem* pFontItem = static_cast<const SvxFontHeightItem*>(pItem);
@@ -544,7 +544,7 @@ namespace
{
const SvxCaseMapItem* pFontItem = static_cast<const SvxCaseMapItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARCASEMAP, uno::makeAny( pFontItem->GetValue() ) );
- } // if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_CASEMAP,sal_True,&pItem) && pItem->ISA(SvxCaseMapItem))
+ }
struct Items {
USHORT nWhich;
::rtl::OUString sPropertyName;
@@ -561,7 +561,7 @@ namespace
lang::Locale aCharLocale;
MsLangId::convertLanguageToLocale( pFontItem->GetLanguage(), aCharLocale );
lcl_pushBack( _out_rProperties, pItems[k].sPropertyName, uno::makeAny( aCharLocale ) );
- } // if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_LANGUAGE,sal_True,&pItem) && pItem->ISA(SvxLanguageItem))
+ }
}
if ( SFX_ITEM_SET == _rItemSet.GetItemState( ITEMID_ESCAPEMENT,sal_True,&pItem) && pItem->ISA(SvxEscapementItem))
{
@@ -813,14 +813,14 @@ void applyCharacterSettings( const uno::Reference< report::XReportControlFormat
aAwtFont.Name = ::rtl::OUString(); // hack to
_rxReportControlFormat->setFontDescriptor( aAwtFont );
_rxReportControlFormat->setCharFontName( sTemp );
- } // if ( aSettings.get( "Font" ) >>= aAwtFont )
+ }
if ( aSettings.get( "FontAsian" ) >>= aAwtFont )
{
::rtl::OUString sTemp = aAwtFont.Name;
aAwtFont.Name = ::rtl::OUString(); // hack to
_rxReportControlFormat->setFontDescriptorAsian( aAwtFont );
_rxReportControlFormat->setCharFontNameAsian( sTemp );
- } // if ( aSettings.get( "Font" ) >>= aAwtFont )
+ }
if ( aSettings.get( "FontComplex" ) >>= aAwtFont )
{
::rtl::OUString sTemp = aAwtFont.Name;
diff --git a/reportdesign/source/ui/misc/Undo.cxx b/reportdesign/source/ui/misc/Undo.cxx
index b665118..e76b3a9 100644
--- a/reportdesign/source/ui/misc/Undo.cxx
+++ b/reportdesign/source/ui/misc/Undo.cxx
@@ -70,7 +70,7 @@ namespace
_xSection->remove(xShape);
--nCount;
}
- } // if ( _xSection.is() )
+ }
}
//----------------------------------------------------------------------------
void lcl_insertElements(const uno::Reference< report::XSection >& _xSection,const ::std::vector< uno::Reference< drawing::XShape> >& _aControls)
diff --git a/reportdesign/source/ui/misc/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx
index a823017..f6c26ac 100644
--- a/reportdesign/source/ui/misc/statusbarcontroller.cxx
+++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx
@@ -113,7 +113,7 @@ void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArgumen
if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") )
{
m_pController = TStatusbarHelper::createFromQuery(new SvxZoomSliderControl(m_nSlotId = SID_ATTR_ZOOMSLIDER,m_nId,*pStatusBar));
- } // if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") )
+ }
else if ( m_aCommandURL.equalsAscii(".uno:Zoom") )
{
m_pController = TStatusbarHelper::createFromQuery(new SvxZoomStatusBarControl(m_nSlotId = SID_ATTR_ZOOM,m_nId,*pStatusBar));
@@ -146,7 +146,7 @@ void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEv
aZoomSlider.PutValue(_aEvent.State);
static_cast<SvxZoomSliderControl*>(m_pController.get())->StateChanged(m_nSlotId,SFX_ITEM_AVAILABLE,&aZoomSlider);
}
- } // if ( m_aCommandURL.equalsAscii(".uno:ZoomSlider") )
+ }
else if ( m_aCommandURL.equalsAscii(".uno:Zoom") )
{
Sequence< PropertyValue > aSeq;
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 584ac3e..1af728c 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -1481,7 +1481,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
{
const String sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEFONT));
pListAction.reset(new UndoManagerListAction(m_aUndoManager,sUndoAction));
- } // if ( !pListAction.get() )
+ }
uno::Reference< report::XReportControlFormat> xReportControlFormat(*aIter,uno::UNO_QUERY);
lcl_setFontWPU_nothrow(xReportControlFormat,_nId);
}
--
1.7.2.3
----Next_Part(Mon_Nov_29_23_33_22_2010_143)----
More information about the LibreOffice
mailing list