Results 1 to 8 of 8

Thread: Opendocument format read/write *.odt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Opendocument format read/write *.odt

    I solved :-)

    /* value must having min 1 or row or int 3-4 not automatic accept 0 */

    Qt Code:
    1. QDomElement oocell = oorow.firstChildElement("table:table-cell");
    2. while (!oocell.isNull()) {
    3. gocool++;
    4. const QTextTableCell ctd = qtable->cellAt(gorow,gocool);
    5. const int cr = qMax(oocell.attribute("table:number-rows-spanned").toInt(),0);
    6. const int cs = qMax(oocell.attribute("table:number-columns-spanned").toInt(),0);
    7. if (qMax(cs,cr) !=0) {
    8. /* value must having min 1 or row or cell */
    9. qtable->mergeCells(gorow,gocool,qMax(cr,1),qMax(cs,1));
    10. }
    11. cell = qtable->cellAt(gorow,gocool);
    12. if (!convertCellTable(oocell,cell,cur,tname,processing)) {
    13. qWarning() << "Error on parse table cell row:" << gorow << " column:" << gocool;
    14. }
    15. oocell = oocell.nextSiblingElement("table:table-cell");
    16. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Sep 2008
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Opendocument format read/write *.odt

    Which qt snapshot are you using? I tried to compile 3 snapshots but all of them was buggy and didn't able to compile.

  3. #3
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Opendocument format read/write *.odt

    Quote Originally Posted by ocean View Post
    Which qt snapshot are you using? I tried to compile 3 snapshots but all of them was buggy and didn't able to compile.
    If you use mingw ... replace the mingw/ path and take the mingw from trolltech mirror.
    ftp://ftp.trolltech.com/qt/source/qt....4.1-mingw.exe
    Take only the compiler... i suppose it have a patch.... i am not sure.

    Only append utlis and minimal sys from self.

    From my 10 mounth old mingw install i found compiler error. after i replace the new mingw + window service pack 3 all running easy....

    snapshots i install :

    Qt Code:
    1. -no-exceptions
    2. -qt-zlib
    3. -qt-libtiff
    4. -qt-sql-mysql
    5. -qt-sql-odbc
    6. -qt-sql-sqlite
    7. -qt-gif
    8. -qt-libpng
    9. -qt-libjpeg
    10. -no-openssl
    11. -no-phonon
    12. -no-webkit
    13. -no-scripttools
    To copy to clipboard, switch view to plain text mode 

    my mysql is on mingw lib path... and mysql running without plug-in

    One from 6 day a go , other from 20080913 i build static.

    Can you help me to write last piece (table) from odt reader?
    svn http://fop-miniscribus.googlecode.co.../TextOdfDebug/

    OOReader.h
    OOReader.cpp

    I not find difference from a table writteln by openOffice and from QT4.5

    My reader can draw table from openOffice odt but not from QT4.5..

    If you dont have qt4.5 to test:
    i build static /qt4.5_st/demos/textedit/ it save *odt Open Document format
    it can only save odt file http://ppk.ciz.ch/MiniScribus/odt/

    and i like to test xslt speed.. from 4.5
    http://englich.wordpress.com/2008/09/10/xsl-t-and-qt/

  4. #4
    Join Date
    Sep 2008
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Opendocument format read/write *.odt

    Quote Originally Posted by patrik08 View Post
    If you use mingw ... replace the mingw/ path and take the mingw from trolltech mirror.
    ftp://ftp.trolltech.com/qt/source/qt....4.1-mingw.exe
    Take only the compiler... i suppose it have a patch.... i am not sure.

    Only append utlis and minimal sys from self.

    From my 10 mounth old mingw install i found compiler error. after i replace the new mingw + window service pack 3 all running easy....
    I have the latest mingw too, but my mingw can't compile snapshots.

    Can you help me to write last piece (table) from odt reader?
    svn http://fop-miniscribus.googlecode.co.../TextOdfDebug/

    OOReader.h
    OOReader.cpp

    I not find difference from a table writteln by openOffice and from QT4.5

    My reader can draw table from openOffice odt but not from QT4.5..
    If you dont have qt4.5 to test:
    i build static /qt4.5_st/demos/textedit/ it save *odt Open Document format
    it can only save odt file http://ppk.ciz.ch/MiniScribus/odt/
    Sure, if i can (and have enough time), i will help you. But I didn't understand you, you can't create a table by using Qt Tools?

  5. #5
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Opendocument format read/write *.odt

    Quote Originally Posted by ocean View Post
    I have the latest mingw too, but my mingw can't compile snapshots.
    Sure, if i can (and have enough time), i will help you. But I didn't understand you, you can't create a table by using Qt Tools?
    Qt Code:
    1. ftp://ftp.trolltech.com/qt/snapshots/qt-win-opensource-src-4.4.3-snapshot-20080913.zip
    To copy to clipboard, switch view to plain text mode 

    this snapshots work 100% on my mingw

    Have you Service Pack3 on window XP or you use vista?
    try to build only:
    ./configure bla bla..
    make sub-src
    [only core lib]
    not make all demo designer and tool designer, build at end designer & tool

    Read table from OpenOffice odt file is ok and working..
    Read table from QT4.5 odt file (file created by qt) not working..

    OOReader.h
    OOReader.cpp

  6. #6
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Opendocument format read/write *.odt

    sorry i mistake version
    this is correct ( it ending all two 913 )

    Qt Code:
    1. ftp://ftp.trolltech.com/qt/snapshots/qt-win-opensource-src-4.5.0-snapshot-20080913.zip
    To copy to clipboard, switch view to plain text mode 

  7. #7
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Opendocument format read/write *.odt

    I have now my OpenDocument reader its possibel to build on qt4.4.1 or > on 4.5 reader already exist...

    Only the listformat tree it show the first level table col-span and row-span are perfect...
    And and one QTextEdit, if You load 30 or more page prepare you mind to wait long time.

    I save source on SVN:
    http://www.qt-apps.org/content/show....?content=80650




Similar Threads

  1. Is there a known problem with QMimeData on Mac OS X?
    By Wurgl in forum Qt Programming
    Replies: 8
    Last Post: 27th February 2008, 22:21
  2. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.