summaryrefslogtreecommitdiffstats
path: root/reportdesign
diff options
context:
space:
mode:
authorWol <anthony@youngman.org.uk>2010-11-28 16:15:13 +0000
committerCaolán McNamara <caolanm@redhat.com>2010-11-28 17:15:57 +0000
commit07e6d8fcddc6bf5e5b54f884c1adda70177c1ef3 (patch)
treedf50d3d7807a26dcc0efabfccbbc014d09aff9e8 /reportdesign
parentcppcheck: variables assigned but never used (diff)
downloadcore-07e6d8fcddc6bf5e5b54f884c1adda70177c1ef3.tar.gz
core-07e6d8fcddc6bf5e5b54f884c1adda70177c1ef3.zip
Dead code deletion again
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/core/sdr/PropertyForward.cxx2
-rw-r--r--reportdesign/source/core/sdr/ReportDrawPage.cxx1
-rw-r--r--reportdesign/source/core/sdr/ReportUndoFactory.cxx1
-rw-r--r--reportdesign/source/core/sdr/RptModel.cxx11
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx22
-rw-r--r--reportdesign/source/core/sdr/RptObjectListener.cxx7
-rw-r--r--reportdesign/source/core/sdr/UndoEnv.cxx3
7 files changed, 5 insertions, 42 deletions
diff --git a/reportdesign/source/core/sdr/PropertyForward.cxx b/reportdesign/source/core/sdr/PropertyForward.cxx
index 307b6f26c390..d03473b5042d 100644
--- a/reportdesign/source/core/sdr/PropertyForward.cxx
+++ b/reportdesign/source/core/sdr/PropertyForward.cxx
@@ -94,7 +94,7 @@ OPropertyMediator::OPropertyMediator(const Reference< XPropertySet>& _xSource
DBG_UNHANDLED_EXCEPTION();
(void)e;
}
- } // if ( m_xDest.is() && m_xSource.is() )
+ }
osl_decrementInterlockedCount(&m_refCount);
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index 2aa9cca9d187..90c27177ca7f 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -134,7 +134,6 @@ uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pOb
SvxOle2Shape* pShape = new SvxOle2Shape( pObj );
xShape.set(*pShape,uno::UNO_QUERY);
pShape->setShapeKind(pObj->GetObjIdentifier());
- //xShape = new SvxOle2Shape( pOle2Obj );
}
if ( !xShape.is() )
diff --git a/reportdesign/source/core/sdr/ReportUndoFactory.cxx b/reportdesign/source/core/sdr/ReportUndoFactory.cxx
index a16963c95573..a469248f7cb5 100644
--- a/reportdesign/source/core/sdr/ReportUndoFactory.cxx
+++ b/reportdesign/source/core/sdr/ReportUndoFactory.cxx
@@ -96,7 +96,6 @@ SdrUndoAction* OReportUndoFactory::CreateUndoInsertObject( SdrObject& rObject, b
SdrUndoAction* OReportUndoFactory::CreateUndoDeleteObject( SdrObject& rObject, bool /*bOrdNumDirect*/ )
{
return lcl_createUndo(rObject,rptui::Removed,RID_STR_UNDO_DELETE_CONTROL);
- //return m_pUndoFactory->CreateUndoDeleteObject( rObject, bOrdNumDirect ? TRUE : FALSE );
}
SdrUndoAction* OReportUndoFactory::CreateUndoNewObject( SdrObject& rObject, bool /*bOrdNumDirect*/ )
diff --git a/reportdesign/source/core/sdr/RptModel.cxx b/reportdesign/source/core/sdr/RptModel.cxx
index 7b98042f9aeb..5fd634c61264 100644
--- a/reportdesign/source/core/sdr/RptModel.cxx
+++ b/reportdesign/source/core/sdr/RptModel.cxx
@@ -71,13 +71,6 @@ OReportModel::OReportModel(::reportdesign::OReportDefinition* _pReportDefinition
m_pUndoEnv = new OXUndoEnvironment(*this);
m_pUndoEnv->acquire();
SetSdrUndoFactory(new OReportUndoFactory);
-
- // SvxFontNameToolBoxControl::RegisterControl(SID_ATTR_CHAR_FONT);
- //SvxFontHeightToolBoxControl::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT);
- //SvxFontColorToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR);
- //SvxFontColorExtToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR2);
- //SvxFontColorExtToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR_BACKGROUND);
- //SvxColorToolBoxControl::RegisterControl(SID_BACKGROUND_COLOR);
}
//----------------------------------------------------------------------------
@@ -134,10 +127,6 @@ void OReportModel::SetModified(sal_Bool _bModified)
SdrPage* OReportModel::RemovePage(USHORT nPgNum)
{
OReportPage* pPage = dynamic_cast<OReportPage*>(SdrModel::RemovePage(nPgNum));
- //if ( pPage )
- //{
- // m_pUndoEnv->RemoveSection(pPage);
- //}
return pPage;
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 9e7a83a5b557..ff9b64e01f2a 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -230,7 +230,7 @@ namespace
default:
OSL_ENSURE(0,"Illegal text alignment value!");
break;
- } // switch(eParagraphAdjust)
+ }
aRet <<= nTextAlign;
}
return aRet;
@@ -251,7 +251,6 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId)
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBACKGROUND,TPropertyConverter(PROPERTY_BACKGROUNDCOLOR,aNoConverter)));
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDER,TPropertyConverter(PROPERTY_BORDER,aNoConverter)));
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDERCOLOR,TPropertyConverter(PROPERTY_BORDERCOLOR,aNoConverter)));
- //s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_PARAADJUST,PROPERTY_ALIGN));
}
return s_aNameMap;
}
@@ -292,7 +291,6 @@ const TPropertyNamePair& getPropertyNameMap(sal_uInt16 _nObjectId)
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLTEXTEMPHASISMARK,TPropertyConverter(PROPERTY_FONTEMPHASISMARK,aNoConverter)));
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDER,TPropertyConverter(PROPERTY_BORDER,aNoConverter)));
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_CONTROLBORDERCOLOR,TPropertyConverter(PROPERTY_BORDERCOLOR,aNoConverter)));
- //s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aNoConverter)));
::boost::shared_ptr<AnyConverter> aParaAdjust(new ParaAdjust());
s_aNameMap.insert(TPropertyNamePair::value_type(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aParaAdjust)));
}
@@ -749,11 +747,6 @@ void OUnoObject::NbcMove( const Size& rSize )
// LLA: why there exists getPositionX and getPositionY and NOT getPosition() which return a Point?
int nNewX = m_xReportComponent->getPositionX() + rSize.A();
- // can this hinder us to set components outside the area?
- // if (nNewX < 0)
- // {
- // nNewX = 0;
- // }
m_xReportComponent->setPositionX(nNewX);
int nNewY = m_xReportComponent->getPositionY() + rSize.B();
if (nNewY < 0 && !bUndoMode)
@@ -766,14 +759,7 @@ void OUnoObject::NbcMove( const Size& rSize )
}
if (bPositionFixed)
{
- // OReportModel* pRptModel = static_cast<OReportModel*>(GetModel());
- // if ( pRptModel )
- // {
- // if (! pRptModel->GetUndoEnv().IsLocked())
- // {
- GetModel()->AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*this, aUndoSize));
- // }
- // }
+ GetModel()->AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*this, aUndoSize));
}
// set geometry properties
SetPropsFromRect(GetLogicRect());
@@ -1139,7 +1125,7 @@ uno::Reference< chart2::data::XDatabaseDataProvider > lcl_getDataProvider(const
{
xSource.set(xChartDoc->getDataProvider(),uno::UNO_QUERY);
}
- } // if( xCompSupp.is())
+ }
return xSource;
}
// -----------------------------------------------------------------------------
@@ -1175,7 +1161,7 @@ void OOle2Obj::impl_createDataProvider_nothrow(const uno::Reference< frame::XMod
uno::Reference< lang::XMultiServiceFactory> xFac(_xModel,uno::UNO_QUERY);
uno::Reference< chart2::data::XDatabaseDataProvider > xDataProvider( xFac->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.data.DataProvider"))),uno::UNO_QUERY);
xReceiver->attachDataProvider( xDataProvider.get() );
- } // if( xReceiver.is() )
+ }
}
catch(uno::Exception)
{
diff --git a/reportdesign/source/core/sdr/RptObjectListener.cxx b/reportdesign/source/core/sdr/RptObjectListener.cxx
index 01ba228ffb96..693e76028faf 100644
--- a/reportdesign/source/core/sdr/RptObjectListener.cxx
+++ b/reportdesign/source/core/sdr/RptObjectListener.cxx
@@ -56,13 +56,6 @@ OObjectListener::~OObjectListener()
void SAL_CALL OObjectListener::disposing( const ::com::sun::star::lang::EventObject& ) throw( ::com::sun::star::uno::RuntimeException)
{
- /*
- // disconnect the listener
- if (m_pObject)
- {
- (m_pObject->m_xPropertyChangeListener).clear();
- }
- */
}
// XPropertyChangeListener
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx
index 780113958495..ae3a1447df21 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -213,8 +213,6 @@ void SAL_CALL OXUndoEnvironment::disposing(const EventObject& e) throw( RuntimeE
RemoveSection(xSection);
else
RemoveElement(xSourceSet);
- /*if (!m_pImpl->m_aPropertySetCache.empty())
- m_pImpl->m_aPropertySetCache.erase(xSourceSet);*/
}
}
@@ -383,7 +381,6 @@ void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt) thro
//------------------------------------------------------------------------------
void OXUndoEnvironment::implSetModified()
{
- //if ( !IsLocked() )
m_pImpl->m_rModel.SetModified( sal_True );
}