~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to libs/kotext/styles/KoTableColumnStyle.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#include <KoXmlNS.h>
39
39
#include <KoXmlWriter.h>
40
40
 
41
 
class KoTableColumnStyle::Private
 
41
class KoTableColumnStyle::Private : public QSharedData
42
42
{
43
43
public:
44
 
    Private() : parentStyle(0), next(0) {}
 
44
    Private() : QSharedData(), parentStyle(0), next(0) {}
45
45
 
46
46
    ~Private() {
47
47
    }
56
56
    StylePrivate stylesPrivate;
57
57
};
58
58
 
59
 
KoTableColumnStyle::KoTableColumnStyle(QObject *parent)
60
 
        : QObject(parent), d(new Private())
61
 
{
 
59
 
 
60
KoTableColumnStyle::KoTableColumnStyle()
 
61
        :  d(new Private())
 
62
{
 
63
}
 
64
 
 
65
KoTableColumnStyle::KoTableColumnStyle(const KoTableColumnStyle &rhs)
 
66
        : d(rhs.d)
 
67
{
 
68
}
 
69
 
 
70
KoTableColumnStyle &KoTableColumnStyle::operator=(const KoTableColumnStyle &rhs)
 
71
{
 
72
    d = rhs.d;
 
73
    return *this;
62
74
}
63
75
 
64
76
KoTableColumnStyle::~KoTableColumnStyle()
65
77
{
66
 
    delete d;
67
78
}
68
79
 
69
80
void KoTableColumnStyle::setParentStyle(KoTableColumnStyle *parent)
190
201
    if (name == d->name)
191
202
        return;
192
203
    d->name = name;
193
 
    emit nameChanged(name);
194
204
}
195
205
 
196
206
int KoTableColumnStyle::styleId() const
257
267
    }
258
268
}
259
269
 
260
 
void KoTableColumnStyle::copyProperties(const KoTableColumnStyle *style)
261
 
{
262
 
    d->stylesPrivate = style->d->stylesPrivate;
263
 
    setName(style->name()); // make sure we emit property change
264
 
    d->next = style->d->next;
265
 
    d->parentStyle = style->d->parentStyle;
266
 
}
267
 
 
268
 
KoTableColumnStyle *KoTableColumnStyle::clone(QObject *parent)
269
 
{
270
 
    KoTableColumnStyle *newStyle = new KoTableColumnStyle(parent);
271
 
    newStyle->copyProperties(this);
272
 
    return newStyle;
273
 
}
274
 
 
275
 
 
276
270
bool KoTableColumnStyle::operator==(const KoTableColumnStyle &other) const
277
271
{
278
 
    return other.d->stylesPrivate == d->stylesPrivate;
 
272
    return other.d == d;
279
273
}
280
274
 
281
275
void KoTableColumnStyle::removeDuplicates(const KoTableColumnStyle &other)
298
292
        } 
299
293
*/
300
294
}
301
 
 
302
 
#include <KoTableColumnStyle.moc>