diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-10-16 16:21:48 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-10-16 17:05:26 +0200 |
commit | 2cb172582a034dccc40be16f73b369e772c97ecb (patch) | |
tree | 3c7038e45b5a0b3c2e423b040d65e6f84bfa399a | |
parent | eec7b03faddad6ae6acf11f9ca737035722fcb65 (diff) |
svg export: Some whitespace cleanup, fix typos.
Change-Id: I0de8b5229a83d2ed1ccecbd5608c94881b9baad3
-rw-r--r-- | filter/source/svg/svgfilter.cxx | 59 |
1 files changed, 28 insertions, 31 deletions
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index e1e2a1e9b261..bf6483fec660 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -105,7 +105,7 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto #ifndef DISABLE_EXPORT else if( mxSrcDoc.is() ) { - // #i124608# detext selection + // #i124608# detect selection bool bSelectionOnly = false; bool bGotSelection(false); @@ -118,18 +118,14 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto } } - uno::Reference< frame::XDesktop2 > xDesktop(frame::Desktop::create(mxContext)); - uno::Reference< frame::XFrame > xFrame(xDesktop->getCurrentFrame(), - uno::UNO_QUERY_THROW); - uno::Reference<frame::XController > xController(xFrame->getController(), - uno::UNO_QUERY_THROW); + uno::Reference<frame::XDesktop2> xDesktop(frame::Desktop::create(mxContext)); + uno::Reference<frame::XFrame> xFrame(xDesktop->getCurrentFrame(), uno::UNO_QUERY_THROW); + uno::Reference<frame::XController > xController(xFrame->getController(), uno::UNO_QUERY_THROW); if( !mSelectedPages.hasElements() ) { - uno::Reference<drawing::XDrawView > xDrawView(xController, - uno::UNO_QUERY_THROW); - uno::Reference<drawing::framework::XControllerManager> xManager(xController, - uno::UNO_QUERY_THROW); + uno::Reference<drawing::XDrawView> xDrawView(xController, uno::UNO_QUERY_THROW); + uno::Reference<drawing::framework::XControllerManager> xManager(xController, uno::UNO_QUERY_THROW); uno::Reference<drawing::framework::XConfigurationController> xConfigController(xManager->getConfigurationController()); // which view configuration are we in? @@ -179,7 +175,7 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto if( !mSelectedPages.hasElements() ) { - // apparently failed to glean selection - fallback to current page + // apparently failed to clean selection - fallback to current page mSelectedPages.realloc( 1 ); mSelectedPages[0] = xDrawView->getCurrentPage(); } @@ -257,30 +253,31 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto // may be useful; it may have happened by error) bRet = false; } - else { - /* - * We get all master page that are targeted by at least one draw page. - * The master page are put in an unordered set. - */ - ObjectSet aMasterPageTargetSet; - for( sal_Int32 i = 0; i < mSelectedPages.getLength(); ++i ) + else { - uno::Reference< drawing::XMasterPageTarget > xMasterPageTarget( mSelectedPages[i], uno::UNO_QUERY ); - if( xMasterPageTarget.is() ) + /* + * We get all master page that are targeted by at least one draw page. + * The master page are put in an unordered set. + */ + ObjectSet aMasterPageTargetSet; + for( sal_Int32 i = 0; i < mSelectedPages.getLength(); ++i ) + { + uno::Reference< drawing::XMasterPageTarget > xMasterPageTarget( mSelectedPages[i], uno::UNO_QUERY ); + if( xMasterPageTarget.is() ) + { + aMasterPageTargetSet.insert( xMasterPageTarget->getMasterPage() ); + } + } + // Later we move them to a uno::Sequence so we can get them by index + mMasterPageTargets.realloc( aMasterPageTargetSet.size() ); + ObjectSet::const_iterator aElem = aMasterPageTargetSet.begin(); + for( sal_Int32 i = 0; aElem != aMasterPageTargetSet.end(); ++aElem, ++i) { - aMasterPageTargetSet.insert( xMasterPageTarget->getMasterPage() ); + uno::Reference< drawing::XDrawPage > xMasterPage( *aElem, uno::UNO_QUERY ); + mMasterPageTargets[i] = xMasterPage; } - } - // Later we move them to a uno::Sequence so we can get them by index - mMasterPageTargets.realloc( aMasterPageTargetSet.size() ); - ObjectSet::const_iterator aElem = aMasterPageTargetSet.begin(); - for( sal_Int32 i = 0; aElem != aMasterPageTargetSet.end(); ++aElem, ++i) - { - uno::Reference< drawing::XDrawPage > xMasterPage( *aElem, uno::UNO_QUERY ); - mMasterPageTargets[i] = xMasterPage; - } - bRet = implExport( rDescriptor ); + bRet = implExport( rDescriptor ); } } #endif |