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

List:       kde-commits
Subject:    KOFFICE_1_3_BRANCH: koffice/filters/kword/rtf/import
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2004-09-27 15:42:58
Message-ID: 20040927154258.95AC29911 () office ! kde ! org
[Download RAW message or body]

CVS commit by goutte: 

Provisory fix for avoiding to have empty font names (#90057, Backport)


  M +3 -0      CHANGELOG   1.1.2.3
  M +8 -4      rtfimport.cpp   1.90.2.8


--- koffice/filters/kword/rtf/import/CHANGELOG  #1.1.2.2:1.1.2.3
@@ -1,2 +1,5 @@
+=== KOffice 1.3.4 ===
+- temporary fix for empty font names (#90057)
+
 === KOffice 1.3.1 ===
 - make it compile on gcc 3.4

--- koffice/filters/kword/rtf/import/rtfimport.cpp  #1.90.2.7:1.90.2.8
@@ -1254,11 +1254,15 @@ void RTFImport::parseFontTable( RTFPrope
                 qFont.setFamily( font.name );
             }
-            QFontInfo *info=new QFontInfo( qFont );
-            fontTable.insert( state.format.font, info->family() );
-            //kdDebug(30515) << "Font " << state.format.font << " asked: " << \
font.name << " given: " << info->family() << endl; +            const QFontInfo info( \
qFont ); +            const QString newFontName ( info.family() );
+            kdDebug(30515) << "Font " << state.format.font << " asked: " << \
font.name << " given: " << newFontName << endl; +
+            if ( newFontName.isEmpty() )
+               fontTable.insert(  state.format.font, font.name );
+            else
+               fontTable.insert( state.format.font, newFontName );
             font.name.truncate( 0 );
             font.styleHint = QFont::AnyStyle;
             font.fixedPitch = 0;
-            delete info;
         }
     }


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

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