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

List:       kde-commits
Subject:    koffice/filters/kword/oowriter
From:       Laurent Montel <montel () kde ! org>
Date:       2006-04-23 18:36:12
Message-ID: 1145817372.360956.18677.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 533124 by mlaurent:

Port++


 M  +7 -4      CMakeLists.txt  
 M  +3 -1      ExportFilter.cc  
 M  +2 -2      conversion.cc  
 M  +9 -10     oowriterimport.cc  


--- trunk/koffice/filters/kword/oowriter/CMakeLists.txt #533123:533124
@@ -1,11 +1,14 @@
 kde4_header()
 
+include_directories(${CMAKE_SOURCE_DIR}/filters/liboofilter/)
 
+set(libcommon_SRCS conversion.cc)
 
 
+
 ########### next target ###############
 
-set(oowriterimport_PART_SRCS oowriterimport.cc )
+set(oowriterimport_PART_SRCS oowriterimport.cc ${libcommon_SRCS} \
${liboofilter_SRCS})  
 kde4_automoc(${oowriterimport_PART_SRCS})
 
@@ -13,14 +16,14 @@
 
 kde4_install_libtool_file( ${PLUGIN_INSTALL_DIR} oowriterimport )
 
-target_link_libraries(oowriterimport  ${KDE4_KDECORE_LIBS} oofilter common )
+target_link_libraries(oowriterimport  ${KDE4_KDECORE_LIBS}   )
 
 install_targets(${PLUGIN_INSTALL_DIR} oowriterimport )
 
 
 ########### next target ###############
 
-set(oowriterexport_PART_SRCS oowriterexport.cc ExportFilter.cc )
+set(oowriterexport_PART_SRCS oowriterexport.cc ExportFilter.cc ${libcommon_SRCS} \
${liboofilter_SRCS})  
 kde4_automoc(${oowriterexport_PART_SRCS})
 
@@ -28,7 +31,7 @@
 
 kde4_install_libtool_file( ${PLUGIN_INSTALL_DIR} oowriterexport )
 
-target_link_libraries(oowriterexport  ${KDE4_KDECORE_LIBS} kwordexportfilters common \
) +target_link_libraries(oowriterexport  ${KDE4_KDECORE_LIBS} kwordexportfilters  )
 
 install_targets(${PLUGIN_INSTALL_DIR} oowriterexport )
 
--- trunk/koffice/filters/kword/oowriter/ExportFilter.cc #533123:533124
@@ -39,6 +39,7 @@
 #include <Q3ValueList>
 #include <Q3CString>
 #include <Q3MemArray>
+#include <QBuffer>
 
 #include <kdebug.h>
 #include <klocale.h>
@@ -1401,7 +1402,8 @@
     if ( anchorType == AnchorTextImage )
     {
         // Text image have no frameset, so the only size information is in the \
                picture itself.
-        QBuffer buffer( image.copy() ); // Be more safe than sorry and do not allow \
shallow copy +        QByteArray tmp(image);
+		QBuffer buffer( &tmp ); // Be more safe than sorry and do not allow shallow copy
         KoPicture pic;
         buffer.open( QIODevice::ReadOnly );
         if ( pic.load( &buffer, strExtension ) )
--- trunk/koffice/filters/kword/oowriter/conversion.cc #533123:533124
@@ -30,12 +30,12 @@
 {
     if ( oowrap == "none" )
         // 'no wrap' means 'avoid horizontal space'
-        return qMakePair( 2, QString::null );
+        return qMakePair( 2, QString() );
     if ( oowrap == "left" || oowrap == "right" )
         // Left and right, no problem
         return qMakePair( 1, oowrap );
     if ( oowrap == "run-through" )
-        return qMakePair( 0, QString::null );
+        return qMakePair( 0, QString() );
     if ( oowrap == "biggest" ) // OASIS extension
         return qMakePair( 1, QString::fromLatin1( "biggest" ) );
 
--- trunk/koffice/filters/kword/oowriter/oowriterimport.cc #533123:533124
@@ -150,7 +150,7 @@
     }
     else
     {
-        Q3CString cstr = mainDocument.toCString();
+        QByteArray cstr = mainDocument.toByteArray();
         kDebug(30518)<<" maindoc: " << cstr << endl;
         // WARNING: we cannot use KoStore::write(const QByteArray&) because it gives \
an extra NULL character at the end.  out->write( cstr, cstr.length() );
@@ -163,7 +163,7 @@
     out = m_chain->storageFile( "documentinfo.xml", KoStore::Write );
     if( out )
     {
-        Q3CString info = docinfo.toCString();
+        QByteArray info = docinfo.toByteArray();
         kDebug(30518)<<" info :"<<info<<endl;
         // WARNING: we cannot use KoStore::write(const QByteArray&) because it gives \
an extra NULL character at the end.  out->write( info , info.length() );
@@ -1256,9 +1256,9 @@
     if ( m_styleStack.hasAttributeNS( ooNS::fo, "color" ) ) { // 3.10.3
         QColor color( m_styleStack.attributeNS( ooNS::fo, "color" ) ); // #rrggbb \
format  QDomElement colorElem( doc.createElement( "COLOR" ) );
-        colorElem.setAttribute( "red", color.Qt::red() );
-        colorElem.setAttribute( "blue", color.Qt::blue() );
-        colorElem.setAttribute( "green", color.Qt::green() );
+        colorElem.setAttribute( "red", color.red() );
+        colorElem.setAttribute( "blue", color.blue() );
+        colorElem.setAttribute( "green", color.green() );
         format.appendChild( colorElem );
     }
     if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-family" )  // 3.10.9
@@ -1402,9 +1402,9 @@
         QColor tmp = m_styleStack.attributeNS( ooNS::style, \
"text-background-color");  if (tmp != "transparent")
         {
-            bgCol.setAttribute("red", tmp.Qt::red());
-            bgCol.setAttribute("green", tmp.Qt::green());
-            bgCol.setAttribute("blue", tmp.Qt::blue());
+            bgCol.setAttribute("red", tmp.red());
+            bgCol.setAttribute("green", tmp.green());
+            bgCol.setAttribute("blue", tmp.blue());
             format.appendChild(bgCol);
         }
     }
@@ -2302,8 +2302,7 @@
 
         if ( localName == "table-cell" ) // OOo SPEC 4.8.1 p267
         {
-            const QString frameName(i18n("Frameset name","Table %3, row %1, column \
                %2")
-                .arg(row).arg(column).arg(tableName)); // The table name could have \
a % sequence, so use the table name as last! +            const QString \
frameName(i18nc("Frameset name","Table %3, row %1, column %2",row,column,tableName)); \
// The table name could have a % sequence, so use the table name as last!  \
kDebug(30518) << "Trying to create " << frameName << endl;  
             // We need to create a frameset for the cell


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

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