~ubuntu-branches/ubuntu/precise/calligra/precise

« back to all changes in this revision

Viewing changes to filters/libmso/ODrawToOdf.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-03-12 14:34:55 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20120312143455-1bmr8gkyhbc2k9jm
Tags: 1:2.3.91-0ubuntu
* New upstream release
* Remove kubuntu_03_cmakelists_update.diff now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "drawstyle.h"
23
23
#include "msodraw.h"
24
24
#include <KoXmlWriter.h>
25
 
#include <QtCore/QtDebug>
26
 
#include <QtGui/QColor>
27
 
#include <qbuffer.h>
 
25
#include <QtDebug>
 
26
#include <QColor>
 
27
#include <QBuffer>
28
28
#include "generated/leinputstream.h"
29
29
 
30
30
#include <cmath>
37
37
/**
38
38
 * Return the bounding rectangle for this object.
39
39
 **/
40
 
QRectF
41
 
ODrawToOdf::getRect(const OfficeArtFSPGR &r)
 
40
QRectF ODrawToOdf::getRect(const OfficeArtFSPGR &r)
42
41
{
43
42
    return QRect(r.xLeft, r.yTop, r.xRight - r.xLeft, r.yBottom - r.yTop);
44
43
}
398
397
    // fo:min-height
399
398
    // fo:min-width
400
399
    // fo:padding
401
 
    // fo:padding-bottom
402
400
    // fo:padding-left
 
401
    // fo:padding-top
403
402
    // fo:padding-right
404
 
    // fo:padding-top
 
403
    // fo:padding-bottom
405
404
    if (!ds.fAutoTextMargin() && ds.iTxid()) {
406
 
        // Internal margins only make sense for shapes that contain text.
407
 
        // TODO: Else the containing shape SHOULD use a set of default internal
408
 
        // margins for text on shapes (test files required)
409
 
        style.addPropertyPt("fo:padding-bottom", EMU_TO_POINT(ds.dyTextBottom()), gt);
 
405
        // internal margins only make sense for shapes containing text
410
406
        style.addPropertyPt("fo:padding-left", EMU_TO_POINT(ds.dxTextLeft()), gt);
 
407
        style.addPropertyPt("fo:padding-top", EMU_TO_POINT(ds.dyTextTop()), gt);
411
408
        style.addPropertyPt("fo:padding-right", EMU_TO_POINT(ds.dxTextRight()), gt);
412
 
        style.addPropertyPt("fo:padding-top", EMU_TO_POINT(ds.dyTextTop()), gt);
 
409
        style.addPropertyPt("fo:padding-bottom", EMU_TO_POINT(ds.dyTextBottom()), gt);
 
410
    } else {
 
411
        // default internal margins for text on shapes
 
412
        style.addPropertyPt("fo:padding-left", EMU_TO_POINT(0x00016530), gt);
 
413
        style.addPropertyPt("fo:padding-top", EMU_TO_POINT(0x0000B298), gt);
 
414
        style.addPropertyPt("fo:padding-right", EMU_TO_POINT(0x00016530), gt);
 
415
        style.addPropertyPt("fo:padding-bottom", EMU_TO_POINT(0x0000B298), gt);
413
416
    }
414
417
    // fo:wrap-option
415
418
    // style:background-transparency