Kaydet (Commit) 9bc57ae7 authored tarafından Noel Grandin's avatar Noel Grandin

fix older compiler

after my commit e0f3e7c0
"tdf#42374 some small optimisations for opening this PDF file"

Change-Id: I908770ca618581ffe26ebb2205b804d1abcae5a7
üst d299041e
...@@ -378,33 +378,35 @@ void WriterXmlOptimizer::visit( PolyPolyElement& elem, const std::list< Element* ...@@ -378,33 +378,35 @@ void WriterXmlOptimizer::visit( PolyPolyElement& elem, const std::list< Element*
if( !pNext || pNext->PolyPoly != elem.PolyPoly ) if( !pNext || pNext->PolyPoly != elem.PolyPoly )
return; return;
const GraphicsContext& rNextGC = const GraphicsContext& rNextGC =
m_rProcessor.getGraphicsContext( pNext->GCId ); m_rProcessor.getGraphicsContext( pNext->GCId );
const GraphicsContext& rThisGC = const GraphicsContext& rThisGC =
m_rProcessor.getGraphicsContext( elem.GCId ); m_rProcessor.getGraphicsContext( elem.GCId );
if( rThisGC.BlendMode == rNextGC.BlendMode && if( rThisGC.BlendMode == rNextGC.BlendMode &&
rThisGC.Flatness == rNextGC.Flatness && rThisGC.Flatness == rNextGC.Flatness &&
rThisGC.Transformation == rNextGC.Transformation && rThisGC.Transformation == rNextGC.Transformation &&
rThisGC.Clip == rNextGC.Clip && rThisGC.Clip == rNextGC.Clip &&
pNext->Action == PATH_STROKE && pNext->Action == PATH_STROKE &&
(elem.Action == PATH_FILL || elem.Action == PATH_EOFILL) ) (elem.Action == PATH_FILL || elem.Action == PATH_EOFILL) )
{ {
GraphicsContext aGC = rThisGC; GraphicsContext aGC = rThisGC;
aGC.LineJoin = rNextGC.LineJoin; aGC.LineJoin = rNextGC.LineJoin;
aGC.LineCap = rNextGC.LineCap; aGC.LineCap = rNextGC.LineCap;
aGC.LineWidth = rNextGC.LineWidth; aGC.LineWidth = rNextGC.LineWidth;
aGC.MiterLimit= rNextGC.MiterLimit; aGC.MiterLimit= rNextGC.MiterLimit;
aGC.DashArray = rNextGC.DashArray; aGC.DashArray = rNextGC.DashArray;
aGC.LineColor = rNextGC.LineColor; aGC.LineColor = rNextGC.LineColor;
elem.GCId = m_rProcessor.getGCId( aGC ); elem.GCId = m_rProcessor.getGCId( aGC );
elem.Action |= pNext->Action; elem.Action |= pNext->Action;
elem.Children.splice( elem.Children.end(), pNext->Children ); elem.Children.splice( elem.Children.end(), pNext->Children );
elem.Parent->Children.erase( next_it ); // workaround older compilers that do not have std::list::erase(const_iterator)
delete pNext; std::list< Element* > tmp;
} tmp.splice( tmp.begin(), elem.Parent->Children, next_it, next_it);
delete pNext;
}
} }
void WriterXmlOptimizer::visit( ParagraphElement& elem, const std::list< Element* >::const_iterator& rParentIt) void WriterXmlOptimizer::visit( ParagraphElement& elem, const std::list< Element* >::const_iterator& rParentIt)
......
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