Kaydet (Commit) 5e07e1be authored tarafından Julien Nabet's avatar Julien Nabet

Simplify and remove this do/while

There wasn't even a kind of "finally" block!

Change-Id: Ib6836e8e8bd7369c2049c0fd26081002dfbfecba
üst f229b9b0
...@@ -868,32 +868,27 @@ ImplEscherExSdr::~ImplEscherExSdr() ...@@ -868,32 +868,27 @@ ImplEscherExSdr::~ImplEscherExSdr()
bool ImplEscherExSdr::ImplInitPage( const SdrPage& rPage ) bool ImplEscherExSdr::ImplInitPage( const SdrPage& rPage )
{ {
do SvxDrawPage* pSvxDrawPage;
if ( mpSdrPage != &rPage || !mXDrawPage.is() )
{ {
SvxDrawPage* pSvxDrawPage; // eventually write SolverContainer of current page, deletes the Solver
if ( mpSdrPage != &rPage || !mXDrawPage.is() ) ImplFlushSolverContainer();
{
// eventually write SolverContainer of current page, deletes the Solver mpSdrPage = nullptr;
ImplFlushSolverContainer(); mXDrawPage = pSvxDrawPage = new SvxFmDrawPage( const_cast<SdrPage*>(&rPage) );
mXShapes.set( mXDrawPage, UNO_QUERY );
mpSdrPage = nullptr; if ( !mXShapes.is() )
mXDrawPage = pSvxDrawPage = new SvxFmDrawPage( const_cast<SdrPage*>(&rPage) ); return false;
mXShapes.set( mXDrawPage, UNO_QUERY ); if ( !ImplInitPageValues() ) // ImplEESdrWriter
if ( !mXShapes.is() ) return false;
break; mpSdrPage = &rPage;
if ( !ImplInitPageValues() ) // ImplEESdrWriter
break; mpSolverContainer = new EscherSolverContainer;
mpSdrPage = &rPage; }
else
mpSolverContainer = new EscherSolverContainer; pSvxDrawPage = SvxDrawPage::getImplementation(mXDrawPage);
}
else
pSvxDrawPage = SvxDrawPage::getImplementation(mXDrawPage);
return pSvxDrawPage != nullptr;
} while ( false );
return false; return pSvxDrawPage != nullptr;
} }
bool ImplEscherExSdr::ImplInitUnoShapes( const Reference< XShapes >& rxShapes ) bool ImplEscherExSdr::ImplInitUnoShapes( const Reference< XShapes >& rxShapes )
......
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