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

List:       kde-commits
Subject:    koffice/filters/kword/rtf/import
From:       Sebastian Sauer <mail () dipe ! org>
Date:       2006-03-16 19:20:43
Message-ID: 1142536843.208732.29130.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 519289 by sebsauer:

Fixed #123672: RTF - kword doesn't recognize lang/charset settings

BUG: 123672


 M  +7 -1      rtfimport.cpp  
 M  +6 -0      rtfimport.h  


--- trunk/koffice/filters/kword/rtf/import/rtfimport.cpp #519288:519289
@@ -146,7 +146,7 @@
 	PROP(	0L,		"expndtw",	ignoreKeyword,		0L, 0 ), // Expansion/compression of \
character inter-space not supported  \
MEMBER(	0L,		"f",		setNumericProperty,	state.format.font, 0 ),  \
                MEMBER(	"@rtf",		"facingp",	setFlagProperty,	facingPages, true ),
-	PROP(	0L,		"fcharset",	ignoreKeyword,		0L, 0 ), // Not needed with Qt
+	PROP(	0L,		"fcharset",	setCharset,		0L, 0 ), // Not needed with Qt
 	PROP(	"@fonttbl",	"fdecor",	setFontStyleHint,	0L, QFont::Decorative ),
 	MEMBER(	0L,		"fi",		setNumericProperty,	state.layout.firstIndent, 0 ),
 	PROP(	"@fonttbl",	"fmodern",	setFontStyleHint,	0L, QFont::TypeWriter ),
@@ -867,6 +867,12 @@
     ((bool *)this)[property->offset] = property->value;
 }
 
+void RTFImport::setCharset( RTFProperty *property )
+{
+    if(token.value >= 0)
+        setCodepage(property);
+}
+
 void RTFImport::setNumericProperty( RTFProperty *property )
 {
     *((int *)(((char *)this) + property->offset)) = token.hasParam ? token.value : \
                property->value;
--- trunk/koffice/filters/kword/rtf/import/rtfimport.h #519288:519289
@@ -297,6 +297,12 @@
      */
     void setFlagProperty( RTFProperty *property );
     /**
+     * Sets the charset.
+     * @param property the property to set
+     * @deprecated not portable, as it needs an out-of-specification use of offsetof
+     */
+    void setCharset( RTFProperty *property );
+    /**
      * Sets the value of a numeric RTF property specified by token.
      * @param property the property to set
      * @deprecated not portable, as it assumes that an enum is a char


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

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