idl/inc/module.hxx | 2 +- idl/inc/object.hxx | 2 +- idl/inc/slot.hxx | 2 +- idl/inc/types.hxx | 9 ++++++--- idl/source/objects/module.cxx | 4 ++-- idl/source/objects/object.cxx | 4 ++-- idl/source/objects/slot.cxx | 10 +++++----- idl/source/objects/types.cxx | 2 +- idl/source/prj/database.cxx | 6 +++--- sdext/source/presenter/PresenterController.cxx | 5 ----- sdext/source/presenter/PresenterController.hxx | 1 - sdext/source/presenter/PresenterGeometryHelper.cxx | 19 ------------------- sdext/source/presenter/PresenterGeometryHelper.hxx | 4 ---- sdext/source/presenter/PresenterSprite.cxx | 17 ----------------- sdext/source/presenter/PresenterSprite.hxx | 6 ------ sdext/source/presenter/PresenterSpritePane.cxx | 4 ---- sdext/source/presenter/PresenterSpritePane.hxx | 2 -- unusedcode.easy | 7 ------- 18 files changed, 22 insertions(+), 84 deletions(-)
New commits: commit e516f134fac55a14b155fea70064e1c0553ea50c Author: Noel Grandin <noelgran...@gmail.com> Date: Sun Mar 11 12:03:11 2012 +0200 Convert tools/table.hxx usage to std::map in IDL module Along the way, convert the table parameter passing to using references since we are never passing a null pointer. diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx index 4e5953e..3a31605 100644 --- a/idl/inc/module.hxx +++ b/idl/inc/module.hxx @@ -96,7 +96,7 @@ public: WriteType, WriteAttribute = 0 ); virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ); virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, - Table* pTable ); + HelpIdTable& rTable ); }; SV_DECL_IMPL_REF(SvMetaModule) SV_DECL_IMPL_PERSIST_LIST(SvMetaModule,SvMetaModule *) diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx index 1dd2cef..f23262d 100644 --- a/idl/inc/object.hxx +++ b/idl/inc/object.hxx @@ -140,7 +140,7 @@ public: WriteType, WriteAttribute = 0 ); virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ); virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, - Table* pTable ); + HelpIdTable& rTable ); }; SV_IMPL_REF(SvMetaClass) SV_IMPL_PERSIST_LIST(SvMetaClass,SvMetaClass *) diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index 3c00ca8..d4ae0be 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -260,7 +260,7 @@ public: sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm ); virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, - Table * pIdTable ); + HelpIdTable& rIdTable ); virtual void WriteCSV( SvIdlDataBase&, SvStream& ); }; SV_DECL_IMPL_REF(SvMetaSlot) diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index 508f5a0..b29a83c 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -31,12 +31,15 @@ #include <rtl/strbuf.hxx> #include <tools/ref.hxx> -#include <tools/table.hxx> #include <basobj.hxx> +#include <map> struct SvSlotElement; typedef std::vector< SvSlotElement* > SvSlotElementList; +class SvMetaSlot; +typedef std::map<sal_uLong, SvMetaSlot*> HelpIdTable; + SV_DECL_REF(SvMetaType) SV_DECL_REF(SvMetaAttribute) SV_DECL_PERSIST_LIST(SvMetaAttribute,SvMetaAttribute *) @@ -119,9 +122,9 @@ public: virtual void Insert( SvSlotElementList&, const rtl::OString& rPrefix, SvIdlDataBase& ); virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, - Table * pIdTable ); + HelpIdTable& rIdTable ); virtual void WriteCSV( SvIdlDataBase&, SvStream& ); - void FillIDTable(Table *pIDTable); + void FillIDTable(HelpIdTable& rIDTable); rtl::OString Compare( SvMetaAttribute *pAttr ); }; SV_IMPL_REF(SvMetaAttribute) diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx index c261d4c..02a7cc7 100644 --- a/idl/source/objects/module.cxx +++ b/idl/source/objects/module.cxx @@ -385,12 +385,12 @@ void SvMetaModule::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) } void SvMetaModule::WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, - Table* pTable ) + HelpIdTable& rTable ) { for( sal_uLong n = 0; n < aClassList.Count(); n++ ) { SvMetaClass * pClass = aClassList.GetObject( n ); - pClass->WriteHelpIds( rBase, rOutStm, pTable ); + pClass->WriteHelpIds( rBase, rOutStm, rTable ); } } diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index b95b0a0..2ed6d1d 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -652,12 +652,12 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) } void SvMetaClass::WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, - Table* pTable ) + HelpIdTable& rTable ) { for( sal_uLong n=0; n<aAttrList.Count(); n++ ) { SvMetaAttribute * pAttr = aAttrList.GetObject( n ); - pAttr->WriteHelpId( rBase, rOutStm, pTable ); + pAttr->WriteHelpId( rBase, rOutStm, rTable ); } } diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index f180719..bec2e79 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -1496,12 +1496,12 @@ sal_uInt16 SvMetaSlot::WriteSlotMap( const rtl::OString& rShellName, sal_uInt16 } void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, - Table * pTable ) + HelpIdTable& rTable ) { sal_uLong nSId = GetSlotId().GetValue(); - if( !pTable->IsKeyValid( nSId ) ) + if( rTable.find( nSId ) == rTable.end() ) { - pTable->Insert( nSId, this ); + rTable[ nSId ] = this; rOutStm << "#define " << GetSlotId().getString().getStr() << '\t' << rtl::OString::valueOf(static_cast<sal_Int32>(nSId)).getStr() << endl; @@ -1533,9 +1533,9 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, } // if id not found, write always - if( !bIdOk || !pTable->IsKeyValid( nSId2 ) ) + if( !bIdOk || rTable.find( nSId2 ) == rTable.end() ) { - pTable->Insert( nSId2, this ); + rTable[ nSId2 ] = this; rOutStm << "#define " << aSId.getStr() << '\t' << rtl::OString::valueOf( diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 9eaf197..4e0313a 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -740,7 +740,7 @@ void SvMetaAttribute::Insert (SvSlotElementList&, const rtl::OString&, SvIdlData { } -void SvMetaAttribute::WriteHelpId( SvIdlDataBase &, SvStream &, Table * ) +void SvMetaAttribute::WriteHelpId( SvIdlDataBase &, SvStream &, HelpIdTable& ) { } diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index b842bb3..3171197 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -765,19 +765,19 @@ sal_Bool SvIdlWorkingBase::WriteHelpIds( SvStream& rOutStm ) if( rOutStm.GetError() != SVSTREAM_OK ) return sal_False; - Table aIdTable; + HelpIdTable aIdTable; sal_uLong n; for( n = 0; n < GetModuleList().Count(); n++ ) { SvMetaModule * pModule = GetModuleList().GetObject( n ); - pModule->WriteHelpIds( *this, rOutStm, &aIdTable ); + pModule->WriteHelpIds( *this, rOutStm, aIdTable ); } const SvMetaAttributeMemberList & rAttrList = GetAttrList(); for( n = 0; n < rAttrList.Count(); n++ ) { SvMetaAttribute * pAttr = rAttrList.GetObject( n ); - pAttr->WriteHelpId( *this, rOutStm, &aIdTable ); + pAttr->WriteHelpId( *this, rOutStm, aIdTable ); } return sal_True; commit dbd9198aa9d325dd5bbeb110cc8a3db57838d1e6 Author: Christina Rossmanith <chrrossman...@web.de> Date: Tue Mar 20 13:57:59 2012 +0000 Remove unused code (sdext) diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx index 9629aab..46960c9 100644 --- a/sdext/source/presenter/PresenterController.cxx +++ b/sdext/source/presenter/PresenterController.cxx @@ -494,11 +494,6 @@ rtl::Reference<PresenterPaneContainer> PresenterController::GetPaneContainer (vo return mpPaneBorderPainter; } -::boost::shared_ptr<PresenterAnimator> PresenterController::GetAnimator (void) const -{ - return mpAnimator; -} - ::boost::shared_ptr<PresenterCanvasHelper> PresenterController::GetCanvasHelper (void) const { return mpCanvasHelper; diff --git a/sdext/source/presenter/PresenterController.hxx b/sdext/source/presenter/PresenterController.hxx index 196adb6..8b53342 100644 --- a/sdext/source/presenter/PresenterController.hxx +++ b/sdext/source/presenter/PresenterController.hxx @@ -119,7 +119,6 @@ public: GetSlideShowController (void) const; rtl::Reference<PresenterPaneContainer> GetPaneContainer (void) const; ::rtl::Reference<PresenterPaneBorderPainter> GetPaneBorderPainter (void) const; - ::boost::shared_ptr<PresenterAnimator> GetAnimator (void) const; ::boost::shared_ptr<PresenterCanvasHelper> GetCanvasHelper (void) const; css::uno::Reference<css::drawing::XPresenterHelper> GetPresenterHelper (void) const; ::boost::shared_ptr<PresenterPaintManager> GetPaintManager (void) const; diff --git a/sdext/source/presenter/PresenterGeometryHelper.cxx b/sdext/source/presenter/PresenterGeometryHelper.cxx index af75dee..211bf8e 100644 --- a/sdext/source/presenter/PresenterGeometryHelper.cxx +++ b/sdext/source/presenter/PresenterGeometryHelper.cxx @@ -161,25 +161,6 @@ bool PresenterGeometryHelper::IsInside ( && rBox1.Y+rBox1.Height <= rBox2.Y+rBox2.Height; } -awt::Rectangle PresenterGeometryHelper::Union ( - const css::awt::Rectangle& rBox1, - const css::awt::Rectangle& rBox2) -{ - if (rBox1.Width<=0 || rBox1.Height<=0) - return rBox2; - else if (rBox2.Width<=0 || rBox2.Height<=0) - return rBox1; - - const sal_Int32 nLeft (::std::min(rBox1.X, rBox2.X)); - const sal_Int32 nTop (::std::min(rBox1.Y, rBox2.Y)); - const sal_Int32 nRight (::std::max(Right(rBox1), Right(rBox2))); - const sal_Int32 nBottom (::std::max(Bottom(rBox1), Bottom(rBox2))); - if (nLeft >= nRight || nTop >= nBottom) - return awt::Rectangle(); - else - return awt::Rectangle(nLeft,nTop, Width(nLeft,nRight), Height(nTop,nBottom)); -} - geometry::RealRectangle2D PresenterGeometryHelper::Union ( const geometry::RealRectangle2D& rBox1, const geometry::RealRectangle2D& rBox2) diff --git a/sdext/source/presenter/PresenterGeometryHelper.hxx b/sdext/source/presenter/PresenterGeometryHelper.hxx index b5901a6..4e88748 100644 --- a/sdext/source/presenter/PresenterGeometryHelper.hxx +++ b/sdext/source/presenter/PresenterGeometryHelper.hxx @@ -93,10 +93,6 @@ public: const css::awt::Rectangle& rBox1, const css::awt::Rectangle& rBox2); - static css::awt::Rectangle Union ( - const css::awt::Rectangle& rBox1, - const css::awt::Rectangle& rBox2); - static css::geometry::RealRectangle2D Union ( const css::geometry::RealRectangle2D& rBox1, const css::geometry::RealRectangle2D& rBox2); diff --git a/sdext/source/presenter/PresenterSprite.cxx b/sdext/source/presenter/PresenterSprite.cxx index 45ea49b..0fca939 100644 --- a/sdext/source/presenter/PresenterSprite.cxx +++ b/sdext/source/presenter/PresenterSprite.cxx @@ -109,11 +109,6 @@ void PresenterSprite::Resize (const css::geometry::RealSize2D& rSize) ProvideSprite(); } -css::geometry::RealSize2D PresenterSprite::GetSize (void) const -{ - return maSize; -} - void PresenterSprite::MoveTo (const css::geometry::RealPoint2D& rLocation) { maLocation = rLocation; @@ -131,18 +126,6 @@ void PresenterSprite::MoveTo (const css::geometry::RealPoint2D& rLocation) ); } -css::geometry::RealPoint2D PresenterSprite::GetLocation (void) const -{ - return maLocation; -} - -void PresenterSprite::Transform (const css::geometry::AffineMatrix2D& rTransform) -{ - maTransform = rTransform; - if (mxSprite.is()) - mxSprite->transform(maTransform); -} - void PresenterSprite::SetAlpha (const double nAlpha) { mnAlpha = nAlpha; diff --git a/sdext/source/presenter/PresenterSprite.hxx b/sdext/source/presenter/PresenterSprite.hxx index 4ae4024..58755d7 100644 --- a/sdext/source/presenter/PresenterSprite.hxx +++ b/sdext/source/presenter/PresenterSprite.hxx @@ -64,13 +64,7 @@ public: void Hide (void); void Resize (const css::geometry::RealSize2D& rSize); - css::geometry::RealSize2D GetSize (void) const; - void MoveTo (const css::geometry::RealPoint2D& rLocation); - css::geometry::RealPoint2D GetLocation (void) const; - - void Transform (const css::geometry::AffineMatrix2D& rTransform); - void SetAlpha (const double nAlpha); void Update (void); diff --git a/sdext/source/presenter/PresenterSpritePane.cxx b/sdext/source/presenter/PresenterSpritePane.cxx index 256230b..52895ba 100644 --- a/sdext/source/presenter/PresenterSpritePane.cxx +++ b/sdext/source/presenter/PresenterSpritePane.cxx @@ -163,10 +163,6 @@ void SAL_CALL PresenterSpritePane::windowPaint (const awt::PaintEvent& rEvent) return mpSprite; } -void PresenterSpritePane::ShowTransparentBorder (void) -{ -} - void PresenterSpritePane::UpdateCanvases (void) { Reference<XComponent> xContentCanvasComponent (mxContentCanvas, UNO_QUERY); diff --git a/sdext/source/presenter/PresenterSpritePane.hxx b/sdext/source/presenter/PresenterSpritePane.hxx index 1e23faf..fad6772 100644 --- a/sdext/source/presenter/PresenterSpritePane.hxx +++ b/sdext/source/presenter/PresenterSpritePane.hxx @@ -78,8 +78,6 @@ public: const css::uno::Reference<css::uno::XComponentContext>& rxContext) SAL_THROW((css::uno::Exception)); - void ShowTransparentBorder (void); - // XPane virtual css::uno::Reference<css::awt::XWindow> SAL_CALL getWindow (void) diff --git a/unusedcode.easy b/unusedcode.easy index 2eb5285..58cf0ce 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -952,13 +952,6 @@ sd::slidesorter::view::(anonymous namespace)::PageObjectRun::GetInnerBoundingBox sd::slidesorter::view::Button::IsDown() const sd::slidesorter::view::FontProvider::GetFont(OutputDevice const&) sdext::presenter::PresenterAnimation::PresenterAnimation(unsigned long, unsigned long, unsigned long) -sdext::presenter::PresenterController::GetAnimator() const -sdext::presenter::PresenterGeometryHelper::Union(com::sun::star::awt::Rectangle const&, com::sun::star::awt::Rectangle const&) -sdext::presenter::PresenterSprite::GetLocation() const -sdext::presenter::PresenterSprite::GetSize() const -sdext::presenter::PresenterSprite::SetAlpha(double) -sdext::presenter::PresenterSprite::Transform(com::sun::star::geometry::AffineMatrix2D const&) -sdext::presenter::PresenterSpritePane::ShowTransparentBorder() sdr::animation::Scheduler::Reset(unsigned int) sdr::contact::ViewContactOfPageObj::GetReferencedPage() const sdr::contact::ViewContactOfSdrMediaObj::hasPreferredSize() const _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits