Kaydet (Commit) fd189805 authored tarafından Takeshi Abe's avatar Takeshi Abe

removed dead code

üst 54939518
...@@ -1075,40 +1075,6 @@ void TableLayouter::UpdateBorderLayout() ...@@ -1075,40 +1075,6 @@ void TableLayouter::UpdateBorderLayout()
} }
} }
// -----------------------------------------------------------------------------
/*
void TableLayouter::SetLayoutToModel()
{
const sal_Int32 nRowCount = getRowCount();
const sal_Int32 nColCount = getColumnCount();
try
{
sal_Int32 nOldSize = 0;
Reference< XIndexAccess > xRows( mxTable->getRows(), UNO_QUERY_THROW );
for( sal_Int32 nRow = 0; nRow < nRowCount; nRow++ )
{
Reference< XPropertySet > xRowSet( xRows->getByIndex( nRow ), UNO_QUERY_THROW );
xRowSet->getPropertyValue( msSize ) >>= nOldSize;
if( maRows[nRow].mnSize != nOldSize )
xRowSet->setPropertyValue( msSize, Any( maRows[nRow].mnSize ) );
}
for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ )
{
Reference< XPropertySet > xColSet( getColumnByIndex( nCol ), UNO_QUERY_THROW );
xColSet->getPropertyValue( msSize ) >>= nOldSize;
if( maColumns[nCol].mnSize != nOldSize )
xColSet->setPropertyValue( msSize, Any( maColumns[nCol].mnSize ) );
}
}
catch( Exception& )
{
OSL_FAIL("sdr::table::TableLayouter::SetLayoutToModel(), exception caught!");
}
}
*/
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void TableLayouter::DistributeColumns( ::Rectangle& rArea, sal_Int32 nFirstCol, sal_Int32 nLastCol ) void TableLayouter::DistributeColumns( ::Rectangle& rArea, sal_Int32 nFirstCol, sal_Int32 nLastCol )
...@@ -1228,72 +1194,6 @@ sal_Int32 TableLayouter::getRowStart( sal_Int32 nRow ) const ...@@ -1228,72 +1194,6 @@ sal_Int32 TableLayouter::getRowStart( sal_Int32 nRow ) const
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/*
sal_Int32 TableLayouter::detectInsertedOrRemovedRows()
{
sal_Int32 nHeightChange = 0;
try
{
Reference< XIndexAccess > xRows( mxTable->getRows(), UNO_QUERY_THROW );
std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >::iterator oldIter( mxRows.begin() );
sal_Int32 nCount = xRows->getCount();
for( sal_Int32 nRow = 0; nRow < nCount; nRow++ )
{
Reference< XInterface > xRow( xRows->getByIndex(nRow), UNO_QUERY );
std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >::iterator searchIter = mxRows.end();
if( oldIter != mxRows.end() )
searchIter = std::find( oldIter,mxRows.end(), xRow );
if( searchIter == mxRows.end() )
{
// new row
Reference< XPropertySet > xSet( xRow, UNO_QUERY_THROW );
sal_Int32 nSize = 0;
xSet->getPropertyValue( msSize ) >>= nSize;
nHeightChange += nSize;
}
else if( searchIter == oldIter )
{
// no change
oldIter++;
}
else
{
// rows removed
do
{
Reference< XPropertySet > xSet( (*oldIter), UNO_QUERY_THROW );
sal_Int32 nSize = 0;
xSet->getPropertyValue( msSize ) >>= nSize;
nHeightChange -= nSize;
}
while( oldIter++ != searchIter );
}
}
while( oldIter != mxRows.end() )
{
// rows removed
Reference< XPropertySet > xSet( (*oldIter++), UNO_QUERY_THROW );
sal_Int32 nSize = 0;
xSet->getPropertyValue( msSize ) >>= nSize;
nHeightChange -= nSize;
}
}
catch( Exception& e )
{
(void)e;
OSL_FAIL("svx::TableLayouter::detectInsertedOrRemovedRows(), exception caught!");
}
return nHeightChange;
}
*/
// -----------------------------------------------------------------------------
} } } }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -67,13 +67,6 @@ public: ...@@ -67,13 +67,6 @@ public:
TableLayouter( const TableModelRef& xTableModel ); TableLayouter( const TableModelRef& xTableModel );
virtual ~TableLayouter(); virtual ~TableLayouter();
/** this checks if new rows are inserted or old rows where removed.
This can be used to grow or shrink the table shape in this case.
@returns
the height difference
sal_Int32 detectInsertedOrRemovedRows();
*/
/** try to fit the table into the given rectangle. /** try to fit the table into the given rectangle.
If the rectangle is to small, it will be grown to fit the table. If the rectangle is to small, it will be grown to fit the table.
...@@ -85,10 +78,6 @@ public: ...@@ -85,10 +78,6 @@ public:
*/ */
void LayoutTable( ::Rectangle& rRectangle, bool bFitWidth, bool bFitHeight ); void LayoutTable( ::Rectangle& rRectangle, bool bFitWidth, bool bFitHeight );
/** after a call to LayoutTable, this method can be used to set the new
column and row sizes back to the model. */
// void SetLayoutToModel();
void UpdateBorderLayout(); void UpdateBorderLayout();
basegfx::B2ITuple getCellSize( const CellPos& rPos ) const; basegfx::B2ITuple getCellSize( const CellPos& rPos ) const;
......
...@@ -123,35 +123,6 @@ SvxDrawPage::~SvxDrawPage() throw() ...@@ -123,35 +123,6 @@ SvxDrawPage::~SvxDrawPage() throw()
// XInterface // XInterface
void SvxDrawPage::release() throw() void SvxDrawPage::release() throw()
{ {
/*
uno::Reference< uno::XInterface > x( xDelegator );
if (! x.is())
{
if (osl_decrementInterlockedCount( &m_refCount ) == 0)
{
if (! mrBHelper.bDisposed)
{
uno::Reference< uno::XInterface > xHoldAlive( (uno::XWeak*)this );
// First dispose
try
{
dispose();
}
catch(::com::sun::star::uno::Exception&)
{
// release should not throw exceptions
}
// only the alive ref holds the object
OSL_ASSERT( m_refCount == 1 );
// destroy the object if xHoldAlive decrement the refcount to 0
return;
}
}
// restore the reference count
osl_incrementInterlockedCount( &m_refCount );
}
*/
OWeakAggObject::release(); OWeakAggObject::release();
} }
...@@ -269,23 +240,6 @@ void SAL_CALL SvxDrawPage::removeEventListener( const ::com::sun::star::uno::Ref ...@@ -269,23 +240,6 @@ void SAL_CALL SvxDrawPage::removeEventListener( const ::com::sun::star::uno::Ref
void SvxDrawPage::Notify( SfxBroadcaster&, const SfxHint& /*rHint*/ ) void SvxDrawPage::Notify( SfxBroadcaster&, const SfxHint& /*rHint*/ )
{ {
/*
if( mpModel )
{
const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
if( pSdrHint )
{
switch( pSdrHint->GetKind() )
{
case HINT_MODELCLEARED:
dispose();
break;
default:
break;
}
}
}
*/
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment