diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-18 10:12:43 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-11 08:02:13 +0200 |
commit | 81c967e06e4247dec7ecb9ffec695ba31cb4f057 (patch) | |
tree | 7707e1a00a4d04b216cdc6f5aad42a7df0bcd97f | |
parent | b5cd8f9186c023124b25706f65e7608b68c426bd (diff) |
fdo#46808, Convert to getProcessComponentContext()
Also clean up some weird UNO type casting.
Change-Id: I62e3813e917ec49fcd3ff444209e2234207a6f9d
-rw-r--r-- | filter/source/graphicfilter/icgm/actimpr.cxx | 21 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/outact.hxx | 2 |
2 files changed, 8 insertions, 15 deletions
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 049bcd5a82db..6b1b225d7450 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -63,16 +63,12 @@ CGMImpressOutAct::CGMImpressOutAct( CGM& rCGM, const uno::Reference< frame::XMod maXDrawPages = aDrawPageSup->getDrawPages(); if ( maXDrawPages.is() ) { - maXServiceManagerSC = comphelper::getProcessServiceFactory(); - if ( maXServiceManagerSC.is() ) + maXMultiServiceFactory.set( rModel, uno::UNO_QUERY); + if( maXMultiServiceFactory.is() ) { - uno::Any aAny( rModel->queryInterface( ::getCppuType((const uno::Reference< lang::XMultiServiceFactory >*)0) )); - if( aAny >>= maXMultiServiceFactory ) - { - maXDrawPage = *(uno::Reference< drawing::XDrawPage > *)maXDrawPages->getByIndex( 0 ).getValue(); - if ( ImplInitPage() ) - bStatRet = sal_True; - } + maXDrawPage = *(uno::Reference< drawing::XDrawPage > *)maXDrawPages->getByIndex( 0 ).getValue(); + if ( ImplInitPage() ) + bStatRet = sal_True; } } } @@ -437,11 +433,10 @@ void CGMImpressOutAct::EndGroup() if ( ( mnCurrentCount - mnFirstIndex ) > 1 ) { uno::Reference< drawing::XShapeGrouper > aXShapeGrouper; - uno::Any aAny( maXDrawPage->queryInterface( ::getCppuType(((const uno::Reference< drawing::XShapeGrouper >*)0) ))); - if( aAny >>= aXShapeGrouper ) + aXShapeGrouper.set( maXDrawPage, uno::UNO_QUERY ); + if( aXShapeGrouper.is() ) { - uno::Reference< drawing::XShapes > aXShapes( - drawing::ShapeCollection::create(comphelper::getComponentContext(maXServiceManagerSC)) ); + uno::Reference< drawing::XShapes > aXShapes = drawing::ShapeCollection::create(comphelper::getProcessComponentContext()); for ( sal_uInt32 i = mnFirstIndex; i < mnCurrentCount; i++ ) { uno::Reference< drawing::XShape > aXShape = *(uno::Reference< drawing::XShape > *)maXShapes->getByIndex( i ).getValue(); diff --git a/filter/source/graphicfilter/icgm/outact.hxx b/filter/source/graphicfilter/icgm/outact.hxx index ca45f9d29c21..0190934aea14 100644 --- a/filter/source/graphicfilter/icgm/outact.hxx +++ b/filter/source/graphicfilter/icgm/outact.hxx @@ -97,9 +97,7 @@ class CGMImpressOutAct : public CGMOutAct ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages > maXDrawPages; ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > maXDrawPage; -// ::com::sun::star::uno::Reference< XServiceRegistry > maXServiceRegistry; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > maXMultiServiceFactory; - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > maXServiceManagerSC; ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > maXShape; sal_Bool ImplCreateShape( const ::rtl::OUString& rType ); |