svgdocumenthandler.cxx (025b0597) | svgdocumenthandler.cxx (86d02030) |
---|---|
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 --- 72 unchanged lines hidden (view full) --- 81 pCharNode->whiteSpaceHandling(); 82 83 // pCharNode may have lost all text. If that's the case, ignore 84 // as invalid character node 85 if(pCharNode->getText().getLength()) 86 { 87 if(pLast) 88 { | 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 --- 72 unchanged lines hidden (view full) --- 81 pCharNode->whiteSpaceHandling(); 82 83 // pCharNode may have lost all text. If that's the case, ignore 84 // as invalid character node 85 if(pCharNode->getText().getLength()) 86 { 87 if(pLast) 88 { |
89 bool bAddGap(true); 90 static bool bNoGapsForBaselineShift(true); 91 92 if(bNoGapsForBaselineShift) 93 { 94 // With this option a baseline shift between two char parts ('words') 95 // will not add a space 'gap' to the end of the (non-last) word. This 96 // seems to be the standard behaviour, see last bugdoc attached #122524# 97 const svgio::svgreader::SvgStyleAttributes* pStyleLast = pLast->getSvgStyleAttributes(); 98 const svgio::svgreader::SvgStyleAttributes* pStyleCurrent = pCandidate->getSvgStyleAttributes(); 99 100 if(pStyleLast && pStyleCurrent && pStyleLast->getBaselineShift() != pStyleCurrent->getBaselineShift()) 101 { 102 bAddGap = false; 103 } 104 } 105 |
|
89 // add in-between whitespace (single space) to last 90 // known character node | 106 // add in-between whitespace (single space) to last 107 // known character node |
91 pLast->addGap(); | 108 if(bAddGap) 109 { 110 pLast->addGap(); 111 } |
92 } 93 94 // remember new last corected character node 95 pLast = pCharNode; 96 } 97 break; 98 } 99 case svgio::svgreader::SVGTokenTspan: --- 487 unchanged lines hidden --- | 112 } 113 114 // remember new last corected character node 115 pLast = pCharNode; 116 } 117 break; 118 } 119 case svgio::svgreader::SVGTokenTspan: --- 487 unchanged lines hidden --- |