[PATCH] Cleanup code
José Guilherme Vanz (via_Code_Review)
gerrit at gerrit.libreoffice.org
Sun Jan 6 12:57:30 PST 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1556
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/56/1556/1
Cleanup code
This commit is just cleanup in oox
Change-Id: Ic4036c7216c2986d9b237917cb4ae1d829d85003
Signed-off-by: José Guilherme Vanz <guilherme.sft at gmail.com>
---
M oox/source/ppt/conditioncontext.hxx
M oox/source/ppt/presentationfragmenthandler.cxx
M oox/source/ppt/slidefragmenthandler.cxx
M oox/source/ppt/slidepersist.cxx
M oox/source/ppt/slidetransitioncontext.cxx
M oox/source/ppt/soundactioncontext.cxx
M oox/source/ppt/timenodelistcontext.cxx
7 files changed, 6 insertions(+), 41 deletions(-)
diff --git a/oox/source/ppt/conditioncontext.hxx b/oox/source/ppt/conditioncontext.hxx
index 47a60c5..12df696 100644
--- a/oox/source/ppt/conditioncontext.hxx
+++ b/oox/source/ppt/conditioncontext.hxx
@@ -44,9 +44,7 @@
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs );
private:
-// ::com::sun::star::uno::Any & maCond;
::com::sun::star::animations::Event maEvent;
-// AnimTargetElementPtr mpTarget;
AnimationCondition & maCond;
};
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index 9033372..6d077e7 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -114,7 +114,7 @@
xDrawPage = xPresentationPage->getNotesPage();
}
Reference< container::XNamed > xNamed( xDrawPage, UNO_QUERY_THROW );
- aURL = OUString( "#" ).concat( xNamed->getName() );
+ aURL = "#" + xNamed->getName();
xPropSet->setPropertyValue( sURL, Any( aURL ) );
Reference< text::XTextContent > xContent( rTextField.xTextField, UNO_QUERY);
Reference< text::XTextRange > xTextRange( rTextField.xTextCursor, UNO_QUERY );
@@ -285,8 +285,8 @@
}
catch( uno::Exception& )
{
- OSL_FAIL( OString(OString("oox::ppt::PresentationFragmentHandler::EndDocument(), "
- "exception caught: ") +
+ OSL_FAIL( OString("oox::ppt::PresentationFragmentHandler::EndDocument(), "
+ "exception caught: " +
OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 )).getStr() );
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 643fad2..8caa1a7 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -106,13 +106,10 @@
TextListStylePtr pTextListStyle(new TextListStyle);
SlidePersistPtr pMasterPersistPtr = SlidePersistPtr( new SlidePersist( rFilter, sal_True, sal_True, mpSlidePersistPtr->getPage(),
ShapePtr( new PPTShape( Master, "com.sun.star.drawing.GroupShape" ) ), mpSlidePersistPtr->getNotesTextStyle() ) );
- //pMasterPersistPtr->setLayoutPath( aLayoutFragmentPath );
pMasterPersistPtr->setPath( aNotesFragmentPath );
rFilter.getMasterPages().push_back( pMasterPersistPtr );
FragmentHandlerRef xMasterFragmentHandler( new SlideFragmentHandler( rFilter, aNotesFragmentPath, pMasterPersistPtr, Master ) );
rFilter.importFragment( xMasterFragmentHandler );
- //pMasterPersistPtr->createBackground( rFilter );
- //pMasterPersistPtr->createXShapes( rFilter );
mpSlidePersistPtr->setMasterPersist( pMasterPersistPtr );
}
return this;
@@ -213,11 +210,11 @@
}
catch( uno::Exception& )
{
- OSL_FAIL( OString(OString("oox::ppt::SlideFragmentHandler::EndElement(), "
- "exception caught: ") +
+ OSL_FAIL( OString("oox::ppt::SlideFragmentHandler::EndElement(), "
+ "exception caught: " +
OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ RTL_TEXTENCODING_UTF8 )).getStr());
}
}
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 72cf294..277096c 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -56,15 +56,6 @@
, maNotesTextStylePtr( new oox::drawingml::TextListStyle )
, maOtherTextStylePtr( new oox::drawingml::TextListStyle )
{
- if ( pDefaultTextStyle )
- {
- /*
- maTitleTextStylePtr->apply( *pDefaultTextStyle.get() );
- maBodyTextStylePtr->apply( *pDefaultTextStyle.get() );
- maNotesTextStylePtr->apply( *pDefaultTextStyle.get() );
- maOtherTextStylePtr->apply( *pDefaultTextStyle.get() );
- */
- }
#if OSL_DEBUG_LEVEL > 0
mxDebugPage = mxPage;
#endif
diff --git a/oox/source/ppt/slidetransitioncontext.cxx b/oox/source/ppt/slidetransitioncontext.cxx
index 5c56c98..4f17460 100644
--- a/oox/source/ppt/slidetransitioncontext.cxx
+++ b/oox/source/ppt/slidetransitioncontext.cxx
@@ -75,7 +75,6 @@
{
mbHasTransition = true;
maTransition.setOoxTransitionType( aElementToken, rAttribs.getToken( XML_dir, XML_horz ), 0);
- // ST_Direction { XML_horz, XML_vert }
}
return this;
case PPT_TOKEN( cover ):
@@ -84,10 +83,6 @@
{
mbHasTransition = true;
maTransition.setOoxTransitionType( aElementToken, rAttribs.getToken( XML_dir, XML_l ), 0 );
- // ST_TransitionEightDirectionType { ST_TransitionSideDirectionType {
- // XML_d, XML_d, XML_r, XML_u },
- // ST_TransitionCornerDirectionType {
- // XML_ld, XML_lu, XML_rd, XML_ru }
}
return this;
case PPT_TOKEN( cut ):
@@ -95,7 +90,6 @@
if (!mbHasTransition)
{
mbHasTransition = true;
- // CT_OptionalBlackTransition xdb:bool
maTransition.setOoxTransitionType( aElementToken, rAttribs.getBool( XML_thruBlk, false ), 0);
}
return this;
@@ -105,7 +99,6 @@
{
mbHasTransition = true;
maTransition.setOoxTransitionType( aElementToken, rAttribs.getToken( XML_dir, XML_l ), 0 );
- // ST_TransitionSideDirectionType { XML_d, XML_l, XML_r, XML_u }
}
return this;
case PPT_TOKEN( split ):
@@ -113,8 +106,6 @@
{
mbHasTransition = true;
maTransition.setOoxTransitionType( aElementToken, rAttribs.getToken( XML_orient, XML_horz ), rAttribs.getToken( XML_dir, XML_out ) );
- // ST_Direction { XML_horz, XML_vert }
- // ST_TransitionInOutDirectionType { XML_out, XML_in }
}
return this;
case PPT_TOKEN( zoom ):
@@ -122,7 +113,6 @@
{
mbHasTransition = true;
maTransition.setOoxTransitionType( aElementToken, rAttribs.getToken( XML_dir, XML_out ), 0 );
- // ST_TransitionInOutDirectionType { XML_out, XML_in }
}
return this;
case PPT_TOKEN( wheel ):
diff --git a/oox/source/ppt/soundactioncontext.cxx b/oox/source/ppt/soundactioncontext.cxx
index 0a266ba..9ab2999 100644
--- a/oox/source/ppt/soundactioncontext.cxx
+++ b/oox/source/ppt/soundactioncontext.cxx
@@ -68,10 +68,6 @@
maSlideProperties[ PROP_SoundOn ] <<= sal_True;
}
}
-// else if( mbStopSound )
-// {
-// maSlideProperties[ "" ] = Any( sal_True );
-// }
}
}
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
index 3247f15..72c6beb 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -347,9 +347,7 @@
{
AttributeList attribs(xAttribs);
mbConcurrent = attribs.getBool( XML_concurrent, false );
- // ST_TLNextActionType { none, seek }
mnNextAc = xAttribs->getOptionalValueToken( XML_nextAc, 0 );
- // ST_TLPreviousActionType { none, skipTimed }
mnPrevAc = xAttribs->getOptionalValueToken( XML_prevAc, 0 );
}
@@ -423,9 +421,7 @@
const Reference< XFastAttributeList >& xAttribs,
const TimeNodePtr & pNode ) throw()
: TimeNodeContext( rParent, aElement, xAttribs, pNode )
- // ST_TLAnimateColorSpace ( XML_rgb, XML_hsl }
, mnColorSpace( xAttribs->getOptionalValueToken( XML_clrSpc, 0 ) )
- // ST_TLAnimateColorDirection { XML_cw, XML_ccw }
, mnDir( xAttribs->getOptionalValueToken( XML_dir, 0 ) )
, mbHasByColor( false )
, m_byColor( AnimationColorSpace::RGB, 0, 0, 0)
@@ -773,7 +769,6 @@
= makeAny((sal_Int16)AnimationTransformType::TRANSLATE);
AttributeList attribs( xAttribs );
- // ST_TLAnimateMotionBehaviorOrigin { parent, layour }
sal_Int32 nOrigin = xAttribs->getOptionalValueToken( XML_origin, 0 );
if( nOrigin != 0 )
{
@@ -790,8 +785,6 @@
aStr = aStr.replace( 'E', ' ' );
aStr = aStr.trim();
pNode->getNodeProperties()[ NP_PATH ] = makeAny(aStr);
-
- // ST_TLAnimateMotionPathEditMode{ fixed, relative }
mnPathEditMode = xAttribs->getOptionalValueToken( XML_pathEditMode, 0 );
msPtsTypes = xAttribs->getOptionalValue( XML_ptsTypes );
mnAngle = attribs.getInteger( XML_rAng, 0 );
--
To view, visit https://gerrit.libreoffice.org/1556
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4036c7216c2986d9b237917cb4ae1d829d85003
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: José Guilherme Vanz <guilherme.sft at gmail.com>
More information about the LibreOffice
mailing list