svgcharacternode.cxx (e2bf1e9d) | svgcharacternode.cxx (693be7f6) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 163 unchanged lines hidden (view full) --- 172 173 protected: 174 /// allow user callback to allow changes to the new TextTransformation. Default 175 /// does nothing. 176 virtual bool allowChange(sal_uInt32 nCount, basegfx::B2DHomMatrix& rNewTransform, sal_uInt32 nIndex, sal_uInt32 nLength); 177 178 public: 179 localTextBreakupHelper( | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 163 unchanged lines hidden (view full) --- 172 173 protected: 174 /// allow user callback to allow changes to the new TextTransformation. Default 175 /// does nothing. 176 virtual bool allowChange(sal_uInt32 nCount, basegfx::B2DHomMatrix& rNewTransform, sal_uInt32 nIndex, sal_uInt32 nLength); 177 178 public: 179 localTextBreakupHelper( |
180 const drawinglayer::primitive2d::Primitive2DReference& rxSource, | 180 const drawinglayer::primitive2d::TextSimplePortionPrimitive2D& rSource, |
181 SvgTextPosition& rSvgTextPosition) | 181 SvgTextPosition& rSvgTextPosition) |
182 : drawinglayer::primitive2d::TextBreakupHelper(rxSource), | 182 : drawinglayer::primitive2d::TextBreakupHelper(rSource), |
183 mrSvgTextPosition(rSvgTextPosition) 184 { 185 } 186 }; 187 188 bool localTextBreakupHelper::allowChange(sal_uInt32 /*nCount*/, basegfx::B2DHomMatrix& rNewTransform, sal_uInt32 /*nIndex*/, sal_uInt32 /*nLength*/) 189 { 190 const double fRotation(mrSvgTextPosition.consumeRotation()); --- 290 unchanged lines hidden (view full) --- 481 { 482 if(!rSvgTextPosition.isRotated()) 483 { 484 drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(rTarget, xRef); 485 } 486 else 487 { 488 // need to apply rotations to each character as given | 183 mrSvgTextPosition(rSvgTextPosition) 184 { 185 } 186 }; 187 188 bool localTextBreakupHelper::allowChange(sal_uInt32 /*nCount*/, basegfx::B2DHomMatrix& rNewTransform, sal_uInt32 /*nIndex*/, sal_uInt32 /*nLength*/) 189 { 190 const double fRotation(mrSvgTextPosition.consumeRotation()); --- 290 unchanged lines hidden (view full) --- 481 { 482 if(!rSvgTextPosition.isRotated()) 483 { 484 drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(rTarget, xRef); 485 } 486 else 487 { 488 // need to apply rotations to each character as given |
489 localTextBreakupHelper alocalTextBreakupHelper(xRef, rSvgTextPosition); 490 const drawinglayer::primitive2d::Primitive2DSequence aResult( 491 alocalTextBreakupHelper.getResult(drawinglayer::primitive2d::BreakupUnit_character)); | 489 const drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pCandidate = 490 dynamic_cast< const drawinglayer::primitive2d::TextSimplePortionPrimitive2D* >(xRef.get()); |
492 | 491 |
493 if(aResult.hasElements()) | 492 if(pCandidate) |
494 { | 493 { |
495 drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aResult); 496 } | 494 const localTextBreakupHelper alocalTextBreakupHelper(*pCandidate, rSvgTextPosition); 495 const drawinglayer::primitive2d::Primitive2DSequence aResult( 496 alocalTextBreakupHelper.getResult(drawinglayer::primitive2d::BreakupUnit_character)); |
497 | 497 |
498 // also consume for the implied single space 499 rSvgTextPosition.consumeRotation(); | 498 if(aResult.hasElements()) 499 { 500 drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aResult); 501 } 502 503 // also consume for the implied single space 504 rSvgTextPosition.consumeRotation(); 505 } 506 else 507 { 508 OSL_ENSURE(false, "Used primitive is not a text primitive (!)"); 509 } |
500 } 501 } 502 } 503 504 void SvgCharacterNode::whiteSpaceHandling() 505 { 506 if(XmlSpace_default == getXmlSpace()) 507 { --- 226 unchanged lines hidden --- | 510 } 511 } 512 } 513 514 void SvgCharacterNode::whiteSpaceHandling() 515 { 516 if(XmlSpace_default == getXmlSpace()) 517 { --- 226 unchanged lines hidden --- |