Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-4587

Messy ouput because QSvgHandler ignores whitespaceMode hierarchy

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.6.0
    • None
    • SVG Support
    • None
    • Windows / All Envrionments
      Qt 4.5.2
    • a1fa0d50f9bebc7148cd21fa3c420d2ff0fe7d12

    Description

      When trying to paint an CorelDraw generated vaild SVG image with QSvg the leading whitespaces of text-Items are skipped even xml:space="preserve" is globallly set in the svg-tag.

      svg sample:
      <svg xml:space="preserve" ...>
      ...
      <text x="23.0529" y="150.829" class="fil3 fnt7"> in my house</text>
      ...
      </svg>

      My suggestion is to change the code in qsvghandler.cpp at line 3436 as follows:
      if(xmlSpace.isNull())
      {
      // This element has no xml:space attribute.
      // Inherit the whitespace-Mode from parent element if exists
      if (m_whitespaceMode.isEmpty())
      m_whitespaceMode.push(QSvgText::Default);
      else
      m_whitespaceMode.push(m_whitespaceMode.top());
      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kkalland Kim Motoyoshi Kalland (Inactive)
            cattell Matthew Cattell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes