[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/filters
From:       Lassi Taneli Nieminen <lassniem () gmail ! com>
Date:       2010-10-26 13:53:48
Message-ID: 20101026135348.E3841AC897 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1189964 by lassin:

Simplified ooxml filter symbol bullet support.


 M  +1 -8      kword/docx/DocxXmlNumberingReader.cpp  
 M  +0 -7      libmsooxml/MsooXmlCommonReaderDrawingMLImpl.h  
 M  +6 -0      libmsooxml/MsooXmlUtils.cpp  


--- trunk/koffice/filters/kword/docx/DocxXmlNumberingReader.cpp #1189963:1189964
@@ -184,16 +184,9 @@
         }
     }
 
-    // For some symbol bullets MS2007 sets the bullet char to wingdings/symbol  but \
                since
-    // ODF does not support this, we replace those cases with default value '-'
     if (!pictureType && m_bulletStyle && !m_bulletCharacter.isEmpty()) {
-        if (m_bulletFont.startsWith("Wingdings") || \
                m_bulletFont.startsWith("Symbol")) {
-            m_currentBulletProperties.setBulletChar("-");
+        m_currentBulletProperties.setBulletChar(m_bulletCharacter);
         }
-        else {
-            m_currentBulletProperties.setBulletChar(m_bulletCharacter.at(0));
-        }
-    }
 
     m_currentListStyle.addChildElement("list-style-properties",
         m_currentBulletProperties.convertToListProperties());
--- trunk/koffice/filters/libmsooxml/MsooXmlCommonReaderDrawingMLImpl.h \
#1189963:1189964 @@ -1652,13 +1652,6 @@
             m_currentBulletProperties.setBulletSize(QSize(convertedSize, \
convertedSize));  }
     }
-    if (m_currentBulletProperties.bulletFont().startsWith("Wingdings") && \
                m_currentBulletProperties.bulletChar() != "UNUSED") {
-        // Ooxml files have very often wingdings fonts, but usually they are not \
                installed
-        // Making the bullet character look ugly, thus defaulting to "-"
-        m_listStylePropertiesAltered = true;
-        m_currentBulletProperties.setBulletChar("-");
-    }
-
     if (m_listStylePropertiesAltered) {
         m_currentListStyle = KoGenStyle(KoGenStyle::ListAutoStyle, "list");
 
--- trunk/koffice/filters/libmsooxml/MsooXmlUtils.cpp #1189963:1189964
@@ -1466,7 +1466,13 @@
     }
     else {
         returnValue = QString("<text:list-level-style-bullet text:level=\"%1\" \
").arg(m_level); +        if ((m_bulletFont.startsWith("Wingdings") || \
m_bulletFont.startsWith("Symbol")) && m_bulletChar != "") { +            // In case \
of wingdings we replace with 'best guess' +            returnValue += \
QString("text:bullet-char=\"%1\" ").arg("-"); +        }
+        else {
         returnValue += QString("text:bullet-char=\"%1\" ").arg(m_bulletChar);
+        }
         ending = "</text:list-level-style-bullet>";
     }
     if (m_align != "UNUSED") {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic