~ubuntu-branches/ubuntu/maverick/scribus-ng/maverick-backports

« back to all changes in this revision

Viewing changes to scribus/plugins/scriptplugin/cmddoc.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Oleksandr Moskalenko
  • Date: 2010-07-15 12:43:00 UTC
  • mfrom: (0.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100715124300-2u304r2rvy55vpkv
Tags: 1.3.7.dfsg~svn20100715-1
* Upstream svn. update.
* debian/scribus-ng.lintian: Updated overrides.
* debian/control: Updated standards version to 3.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
                return NULL;
47
47
        }
48
48
 
49
 
        // fixed #7854: Problem with page size with newDocument
50
 
//      pageWidth = value2pts(pageWidth, unit);
51
 
//      pageHeight = value2pts(pageHeight, unit);
 
49
        pageWidth  = value2pts(pageWidth, unit);
 
50
        pageHeight = value2pts(pageHeight, unit);
52
51
        if (orientation == 1)
53
52
        {
54
53
                double x = pageWidth;
55
54
                pageWidth = pageHeight;
56
55
                pageHeight = x;
57
56
        }
58
 
        // fixed #7854: Problem with page size with newDocument
59
 
//      leftMargin = value2pts(leftMargin, unit);
60
 
//      rightMargin = value2pts(rightMargin, unit);
61
 
//      topMargin = value2pts(topMargin, unit);
62
 
//      bottomMargin = value2pts(bottomMargin, unit);
 
57
        leftMargin   = value2pts(leftMargin, unit);
 
58
        rightMargin  = value2pts(rightMargin, unit);
 
59
        topMargin    = value2pts(topMargin, unit);
 
60
        bottomMargin = value2pts(bottomMargin, unit);
63
61
 
64
62
        bool ret = ScCore->primaryMainWindow()->doFileNew(pageWidth, pageHeight,
65
63
                                                                topMargin, leftMargin, rightMargin, bottomMargin,
83
81
                (!PyArg_ParseTuple(p, "dd", &b, &h)) ||
84
82
                (!PyArg_ParseTuple(m, "dddd", &lr, &rr, &tpr, &btr)))
85
83
                return NULL;
86
 
        // fixed #7854: Problem with page size with newDocument
87
 
//      b = value2pts(b, unit);
88
 
//      h = value2pts(h, unit);
 
84
 
 
85
        b = value2pts(b, unit);
 
86
        h = value2pts(h, unit);
89
87
        if (ori == 1)
90
88
        {
91
89
                ebr = b;
99
97
        if (ds!=1 && fsl>0)
100
98
                fsl = 0;
101
99
        // end of hack
102
 
        // fixed #7854: Problem with page size with newDocument
103
 
//      tpr = value2pts(tpr, unit);
104
 
//      lr = value2pts(lr, unit);
105
 
//      rr = value2pts(rr, unit);
106
 
//      btr = value2pts(btr, unit);
 
100
 
 
101
        tpr = value2pts(tpr, unit);
 
102
        lr  = value2pts(lr, unit);
 
103
        rr  = value2pts(rr, unit);
 
104
        btr = value2pts(btr, unit);
 
105
 
107
106
        bool ret = ScCore->primaryMainWindow()->doFileNew(b, h, tpr, lr, rr, btr, 0, 1, false, ds, unit, fsl, ori, fNr, "Custom", true);
108
107
        //      qApp->processEvents();
109
108
        return PyInt_FromLong(static_cast<long>(ret));