summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-06-19 11:13:48 +0200
committerNoel Grandin <noel@peralex.com>2015-06-19 11:26:02 +0200
commit9bc57ae7669fcdde4827f9a8e0a52cc6101c78c1 (patch)
tree7847f5f0000cc335efcefac3c1e91a763fd28ef6 /sdext
parentd299041e8cdd0318f79115061e0ab25359c2e396 (diff)
fix older compiler
after my commit e0f3e7c007e9eeced888b491ec2698acba4bc588 "tdf#42374 some small optimisations for opening this PDF file" Change-Id: I908770ca618581ffe26ebb2205b804d1abcae5a7
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/tree/writertreevisiting.cxx56
1 files changed, 29 insertions, 27 deletions
diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx
index 0844c6ee58b9..73d4d1991ac7 100644
--- a/sdext/source/pdfimport/tree/writertreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx
@@ -378,33 +378,35 @@ void WriterXmlOptimizer::visit( PolyPolyElement& elem, const std::list< Element*
if( !pNext || pNext->PolyPoly != elem.PolyPoly )
return;
- const GraphicsContext& rNextGC =
- m_rProcessor.getGraphicsContext( pNext->GCId );
- const GraphicsContext& rThisGC =
- m_rProcessor.getGraphicsContext( elem.GCId );
-
- if( rThisGC.BlendMode == rNextGC.BlendMode &&
- rThisGC.Flatness == rNextGC.Flatness &&
- rThisGC.Transformation == rNextGC.Transformation &&
- rThisGC.Clip == rNextGC.Clip &&
- pNext->Action == PATH_STROKE &&
- (elem.Action == PATH_FILL || elem.Action == PATH_EOFILL) )
- {
- GraphicsContext aGC = rThisGC;
- aGC.LineJoin = rNextGC.LineJoin;
- aGC.LineCap = rNextGC.LineCap;
- aGC.LineWidth = rNextGC.LineWidth;
- aGC.MiterLimit= rNextGC.MiterLimit;
- aGC.DashArray = rNextGC.DashArray;
- aGC.LineColor = rNextGC.LineColor;
- elem.GCId = m_rProcessor.getGCId( aGC );
-
- elem.Action |= pNext->Action;
-
- elem.Children.splice( elem.Children.end(), pNext->Children );
- elem.Parent->Children.erase( next_it );
- delete pNext;
- }
+ const GraphicsContext& rNextGC =
+ m_rProcessor.getGraphicsContext( pNext->GCId );
+ const GraphicsContext& rThisGC =
+ m_rProcessor.getGraphicsContext( elem.GCId );
+
+ if( rThisGC.BlendMode == rNextGC.BlendMode &&
+ rThisGC.Flatness == rNextGC.Flatness &&
+ rThisGC.Transformation == rNextGC.Transformation &&
+ rThisGC.Clip == rNextGC.Clip &&
+ pNext->Action == PATH_STROKE &&
+ (elem.Action == PATH_FILL || elem.Action == PATH_EOFILL) )
+ {
+ GraphicsContext aGC = rThisGC;
+ aGC.LineJoin = rNextGC.LineJoin;
+ aGC.LineCap = rNextGC.LineCap;
+ aGC.LineWidth = rNextGC.LineWidth;
+ aGC.MiterLimit= rNextGC.MiterLimit;
+ aGC.DashArray = rNextGC.DashArray;
+ aGC.LineColor = rNextGC.LineColor;
+ elem.GCId = m_rProcessor.getGCId( aGC );
+
+ elem.Action |= pNext->Action;
+
+ elem.Children.splice( elem.Children.end(), pNext->Children );
+ // workaround older compilers that do not have std::list::erase(const_iterator)
+ 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)