Coverage Report

Created: 2026-05-16 09:25

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/svx/source/xoutdev/xattr2.cxx
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
 * This file is part of the LibreOffice project.
4
 *
5
 * This Source Code Form is subject to the terms of the Mozilla Public
6
 * License, v. 2.0. If a copy of the MPL was not distributed with this
7
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
 *
9
 * This file incorporates work covered by the following license notice:
10
 *
11
 *   Licensed to the Apache Software Foundation (ASF) under one or more
12
 *   contributor license agreements. See the NOTICE file distributed
13
 *   with this work for additional information regarding copyright
14
 *   ownership. The ASF licenses this file to you under the Apache
15
 *   License, Version 2.0 (the "License"); you may not use this file
16
 *   except in compliance with the License. You may obtain a copy of
17
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
 */
19
20
#include <com/sun/star/drawing/LineJoint.hpp>
21
#include <com/sun/star/drawing/LineCap.hpp>
22
#include <com/sun/star/uno/Any.hxx>
23
24
#include <osl/diagnose.h>
25
#include <o3tl/hash_combine.hxx>
26
#include <i18nutil/unicode.hxx>
27
#include <sal/log.hxx>
28
#include <svx/strings.hrc>
29
#include <svx/svxids.hrc>
30
#include <svx/xlinjoit.hxx>
31
#include <svx/xlncapit.hxx>
32
#include <svx/xlntrit.hxx>
33
#include <svx/xfltrit.hxx>
34
#include <xftshtit.hxx>
35
#include <svx/xgrscit.hxx>
36
#include <svx/xflbmtit.hxx>
37
#include <svx/xflbmpit.hxx>
38
#include <svx/xflbmsxy.hxx>
39
#include <svx/xflbmsli.hxx>
40
#include <svx/xflbtoxy.hxx>
41
#include <svx/xflbstit.hxx>
42
#include <svx/xflboxy.hxx>
43
#include <svx/xflbckit.hxx>
44
#include <svx/xfilluseslidebackgrounditem.hxx>
45
#include <svx/dialmgr.hxx>
46
#include <svx/xdef.hxx>
47
#include <AffineMatrixItem.hxx>
48
#include <vcl/svapp.hxx>
49
#include <vcl/settings.hxx>
50
51
#include <comphelper/lok.hxx>
52
53
#include <libxml/xmlwriter.h>
54
#include <tools/XmlWriter.hxx>
55
#include <boost/property_tree/ptree.hpp>
56
57
XLineTransparenceItem::XLineTransparenceItem(sal_uInt16 nLineTransparence) :
58
1.74k
    SfxUInt16Item(XATTR_LINETRANSPARENCE, nLineTransparence)
59
1.74k
{
60
1.74k
}
61
62
XLineTransparenceItem* XLineTransparenceItem::Clone(SfxItemPool* /*pPool*/) const
63
1.70k
{
64
1.70k
    return new XLineTransparenceItem(*this);
65
1.70k
}
66
67
bool XLineTransparenceItem::GetPresentation
68
(
69
    SfxItemPresentation ePres,
70
    MapUnit             /*eCoreUnit*/,
71
    MapUnit             /*ePresUnit*/,
72
    OUString&           rText, const IntlWrapper&
73
)   const
74
0
{
75
0
    rText.clear();
76
77
0
    switch ( ePres )
78
0
    {
79
0
        case SfxItemPresentation::Complete:
80
0
            rText = SvxResId(RID_SVXSTR_TRANSPARENCE) + ": ";
81
0
            [[fallthrough]];
82
0
        case SfxItemPresentation::Nameless:
83
0
            rText += unicode::formatPercent(GetValue(),
84
0
                Application::GetSettings().GetUILanguageTag());
85
0
            return true;
86
0
        default:
87
0
            return false;
88
0
    }
89
0
}
90
91
92
0
SfxPoolItem* XLineJointItem::CreateDefault() { return new XLineJointItem; }
93
94
XLineJointItem::XLineJointItem( css::drawing::LineJoint eLineJoint ) :
95
143k
    SfxEnumItem(XATTR_LINEJOINT, eLineJoint)
96
143k
{
97
143k
}
98
99
XLineJointItem* XLineJointItem::Clone(SfxItemPool* /*pPool*/) const
100
31.9k
{
101
31.9k
    return new XLineJointItem( *this );
102
31.9k
}
103
104
bool XLineJointItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/,
105
    MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper&) const
106
0
{
107
0
    rText.clear();
108
109
0
    TranslateId pId;
110
111
0
    switch( GetValue() )
112
0
    {
113
0
        case css::drawing::LineJoint::LineJoint_MAKE_FIXED_SIZE:
114
0
        case css::drawing::LineJoint_NONE:
115
0
            pId = comphelper::LibreOfficeKit::isActive() ? RID_SVXSTR_INVISIBLE : RID_SVXSTR_NONE;
116
0
        break;
117
118
0
        case css::drawing::LineJoint_MIDDLE:
119
0
            pId = RID_SVXSTR_LINEJOINT_MIDDLE;
120
0
        break;
121
122
123
0
        case css::drawing::LineJoint_BEVEL:
124
0
            pId = RID_SVXSTR_LINEJOINT_BEVEL;
125
0
        break;
126
127
128
0
        case css::drawing::LineJoint_MITER:
129
0
            pId = RID_SVXSTR_LINEJOINT_MITER;
130
0
        break;
131
132
133
0
        case css::drawing::LineJoint_ROUND:
134
0
            pId = RID_SVXSTR_LINEJOINT_ROUND;
135
0
        break;
136
0
    }
137
138
0
    if (pId)
139
0
        rText = SvxResId(pId);
140
141
0
    return true;
142
0
}
143
144
bool XLineJointItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
145
5.30k
{
146
5.30k
    const css::drawing::LineJoint eJoint = GetValue();
147
5.30k
    rVal <<= eJoint;
148
5.30k
    return true;
149
5.30k
}
150
151
bool XLineJointItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
152
8.95k
{
153
8.95k
    css::drawing::LineJoint eUnoJoint;
154
155
8.95k
    if(!(rVal >>= eUnoJoint))
156
0
    {
157
        // also try an int (for Basic)
158
0
        sal_Int32 nLJ = 0;
159
0
        if(!(rVal >>= nLJ))
160
0
            return false;
161
0
        eUnoJoint = static_cast<css::drawing::LineJoint>(nLJ);
162
0
    }
163
164
8.95k
    SetValue( eUnoJoint );
165
166
8.95k
    return true;
167
8.95k
}
168
169
170
AffineMatrixItem::AffineMatrixItem(const css::geometry::AffineMatrix2D* pMatrix)
171
0
:   SfxPoolItem(SID_ATTR_TRANSFORM_MATRIX)
172
0
{
173
0
    if(pMatrix)
174
0
    {
175
0
        maMatrix = *pMatrix;
176
0
    }
177
0
    else
178
0
    {
179
0
        maMatrix.m00 = 1.0;
180
0
        maMatrix.m01 = 0.0;
181
0
        maMatrix.m02 = 0.0;
182
0
        maMatrix.m10 = 0.0;
183
0
        maMatrix.m11 = 1.0;
184
0
        maMatrix.m12 = 0.0;
185
0
    }
186
0
}
187
188
AffineMatrixItem::AffineMatrixItem(const AffineMatrixItem& rRef)
189
0
:   SfxPoolItem(rRef)
190
0
{
191
0
    maMatrix = rRef.maMatrix;
192
0
}
193
194
AffineMatrixItem::~AffineMatrixItem()
195
0
{
196
0
}
197
198
bool AffineMatrixItem::operator==(const SfxPoolItem& rRef) const
199
0
{
200
0
    if(!SfxPoolItem::operator==(rRef))
201
0
    {
202
0
        return false;
203
0
    }
204
205
0
    const AffineMatrixItem* pRef = static_cast< const AffineMatrixItem* >(&rRef);
206
207
0
    if(!pRef)
208
0
    {
209
0
        return false;
210
0
    }
211
212
0
    return (maMatrix.m00 == pRef->maMatrix.m00
213
0
        && maMatrix.m01 == pRef->maMatrix.m01
214
0
        && maMatrix.m02 == pRef->maMatrix.m02
215
0
        && maMatrix.m10 == pRef->maMatrix.m10
216
0
        && maMatrix.m11 == pRef->maMatrix.m11
217
0
        && maMatrix.m12 == pRef->maMatrix.m12);
218
0
}
219
220
AffineMatrixItem* AffineMatrixItem::Clone( SfxItemPool* /*pPool*/ ) const
221
0
{
222
0
    return new AffineMatrixItem(*this);
223
0
}
224
225
bool AffineMatrixItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
226
0
{
227
0
    rVal <<= maMatrix;
228
0
    return true;
229
0
}
230
231
bool AffineMatrixItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
232
0
{
233
0
    if (rVal >>= maMatrix)
234
0
    {
235
0
        return true;
236
0
    }
237
238
0
    OSL_ENSURE(false, "AffineMatrixItem::PutValue - Wrong type!");
239
0
    return false;
240
0
}
241
242
243
0
SfxPoolItem* XLineCapItem::CreateDefault() { return new XLineCapItem; }
244
245
XLineCapItem::XLineCapItem(css::drawing::LineCap eLineCap)
246
8.05k
:   SfxEnumItem(XATTR_LINECAP, eLineCap)
247
8.05k
{
248
8.05k
}
249
250
XLineCapItem* XLineCapItem::Clone(SfxItemPool* /*pPool*/) const
251
6.97k
{
252
6.97k
    return new XLineCapItem( *this );
253
6.97k
}
254
255
bool XLineCapItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/,
256
                                                     MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper&) const
257
0
{
258
0
    TranslateId pId;
259
260
0
    switch( GetValue() )
261
0
    {
262
0
        default: /*css::drawing::LineCap_BUTT*/
263
0
            pId = RID_SVXSTR_LINECAP_BUTT;
264
0
        break;
265
266
0
        case css::drawing::LineCap_ROUND:
267
0
            pId = RID_SVXSTR_LINECAP_ROUND;
268
0
        break;
269
270
0
        case css::drawing::LineCap_SQUARE:
271
0
            pId = RID_SVXSTR_LINECAP_SQUARE;
272
0
        break;
273
0
    }
274
275
0
    rText = SvxResId(pId);
276
277
0
    return true;
278
0
}
279
280
bool XLineCapItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
281
5.30k
{
282
5.30k
    const css::drawing::LineCap eCap(GetValue());
283
5.30k
    rVal <<= eCap;
284
5.30k
    return true;
285
5.30k
}
286
287
bool XLineCapItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
288
4.33k
{
289
4.33k
    css::drawing::LineCap eUnoCap;
290
291
4.33k
    if(!(rVal >>= eUnoCap))
292
0
    {
293
        // also try an int (for Basic)
294
0
        sal_Int32 nLJ(0);
295
296
0
        if(!(rVal >>= nLJ))
297
0
        {
298
0
            return false;
299
0
        }
300
301
0
        eUnoCap = static_cast<css::drawing::LineCap>(nLJ);
302
0
    }
303
304
4.33k
    OSL_ENSURE(css::drawing::LineCap_BUTT == eUnoCap
305
4.33k
        || css::drawing::LineCap_ROUND == eUnoCap
306
4.33k
        || css::drawing::LineCap_SQUARE == eUnoCap, "Unknown enum value in XATTR_LINECAP (!)");
307
308
4.33k
    SetValue(eUnoCap);
309
310
4.33k
    return true;
311
4.33k
}
312
313
css::drawing::LineCap XLineCapItem::GetValue() const
314
7.03k
{
315
7.03k
    const css::drawing::LineCap eRetval(SfxEnumItem::GetValue());
316
7.03k
    OSL_ENSURE(css::drawing::LineCap_BUTT == eRetval
317
7.03k
        || css::drawing::LineCap_ROUND == eRetval
318
7.03k
        || css::drawing::LineCap_SQUARE == eRetval, "Unknown enum value in XATTR_LINECAP (!)");
319
320
7.03k
    return eRetval;
321
7.03k
}
322
323
XFillTransparenceItem::XFillTransparenceItem(sal_uInt16 nFillTransparence) :
324
37.6k
    SfxPoolItem(XATTR_FILLTRANSPARENCE), m_nValue(nFillTransparence)
325
37.6k
{
326
37.6k
    assert(m_nValue <= 100);
327
37.6k
}
328
329
XFillTransparenceItem* XFillTransparenceItem::Clone(SfxItemPool* /*pPool*/) const
330
31.8k
{
331
31.8k
    return new XFillTransparenceItem(*this);
332
31.8k
}
333
334
bool XFillTransparenceItem::GetPresentation
335
(
336
    SfxItemPresentation ePres,
337
    MapUnit             /*eCoreUnit*/,
338
    MapUnit             /*ePresUnit*/,
339
    OUString&           rText, const IntlWrapper&
340
)   const
341
0
{
342
0
    rText.clear();
343
344
0
    switch ( ePres )
345
0
    {
346
0
        case SfxItemPresentation::Complete:
347
0
            rText = SvxResId(RID_SVXSTR_TRANSPARENCE) + ": ";
348
0
            [[fallthrough]];
349
0
        case SfxItemPresentation::Nameless:
350
0
            rText += unicode::formatPercent(GetValue(),
351
0
                Application::GetSettings().GetUILanguageTag());
352
0
            return true;
353
0
        default:
354
0
            return false;
355
0
    }
356
0
}
357
358
void XFillTransparenceItem::dumpAsXml(xmlTextWriterPtr pWriter) const
359
0
{
360
0
    tools::XmlWriter aWriter(pWriter);
361
0
    aWriter.startElement("XFillTransparenceItem");
362
0
    aWriter.attribute("whichId", Which());
363
0
    aWriter.attribute("value", GetValue());
364
0
    aWriter.endElement();
365
0
}
366
367
boost::property_tree::ptree XFillTransparenceItem::dumpAsJSON() const
368
0
{
369
0
    boost::property_tree::ptree aTree = SfxPoolItem::dumpAsJSON();
370
0
    aTree.put("state", GetValue());
371
0
    return aTree;
372
0
}
373
374
// virtual
375
bool XFillTransparenceItem::operator ==(const SfxPoolItem & rItem) const
376
12.9k
{
377
12.9k
    assert(SfxPoolItem::operator==(rItem));
378
12.9k
    return m_nValue == static_cast<const XFillTransparenceItem *>(&rItem)->m_nValue;
379
12.9k
}
380
381
// virtual
382
bool XFillTransparenceItem::supportsHashCode() const
383
0
{
384
0
    return true;
385
0
}
386
387
// virtual
388
bool XFillTransparenceItem::QueryValue(css::uno::Any& rVal, sal_uInt8) const
389
566
{
390
566
    rVal <<= m_nValue;
391
566
    return true;
392
566
}
393
394
// virtual
395
bool XFillTransparenceItem::PutValue(const css::uno::Any& rVal, sal_uInt8)
396
7.43k
{
397
7.43k
    if (rVal >>= m_nValue)
398
6.86k
    {
399
6.86k
        assert(m_nValue <= 100);
400
6.86k
        return true;
401
6.86k
    }
402
    // Legacy: for a long time, XFillTransparenceItem::PutValue accepted sal_Int32; play safe and accept
403
    // if someone passes that
404
562
    if (sal_Int32 nValue; rVal >>= nValue)
405
562
    {
406
562
        SAL_WARN("svl.items", "Passing sal_uInt16 in sal_Int32!");
407
562
        SAL_WARN_IF(nValue < 0 || nValue > SAL_MAX_UINT16, "svl.items",
408
562
                    "Overflow in UInt16 value!");
409
562
        m_nValue = static_cast<sal_uInt16>(nValue);
410
562
        assert(m_nValue <= 100);
411
562
        return true;
412
562
    }
413
0
    SAL_WARN("svl.items", "XFillTransparenceItem::PutValue - Wrong type!");
414
0
    return false;
415
0
}
416
417
418
// virtual
419
size_t XFillTransparenceItem::hashCode() const
420
0
{
421
0
    std::size_t seed(0);
422
0
    o3tl::hash_combine(seed, Which());
423
0
    o3tl::hash_combine(seed, m_nValue);
424
0
    return seed;
425
0
}
426
427
XFormTextShadowTranspItem::XFormTextShadowTranspItem(sal_uInt16 nShdwTransparence) :
428
19
    SfxUInt16Item(XATTR_FORMTXTSHDWTRANSP, nShdwTransparence)
429
19
{
430
19
}
431
432
XFormTextShadowTranspItem* XFormTextShadowTranspItem::Clone(SfxItemPool* /*pPool*/) const
433
0
{
434
0
    return new XFormTextShadowTranspItem(*this);
435
0
}
436
437
438
XGradientStepCountItem::XGradientStepCountItem( sal_uInt16 nStepCount ) :
439
530
    SfxUInt16Item( XATTR_GRADIENTSTEPCOUNT, nStepCount )
440
530
{
441
530
}
442
443
XGradientStepCountItem* XGradientStepCountItem::Clone( SfxItemPool* /*pPool*/) const
444
566
{
445
566
    return new XGradientStepCountItem( *this );
446
566
}
447
448
bool XGradientStepCountItem::GetPresentation
449
(
450
    SfxItemPresentation /*ePres*/,
451
    MapUnit             /*eCoreUnit*/,
452
    MapUnit             /*ePresUnit*/,
453
    OUString&           rText, const IntlWrapper&
454
)   const
455
0
{
456
0
    rText.clear();
457
458
0
    rText += OUString::number(GetValue());
459
0
    return true;
460
0
}
461
462
463
XFillBmpTileItem::XFillBmpTileItem( bool bTile ) :
464
3.92k
            SfxBoolItem( XATTR_FILLBMP_TILE, bTile )
465
3.92k
{
466
3.92k
}
467
468
XFillBmpTileItem* XFillBmpTileItem::Clone( SfxItemPool* /*pPool*/) const
469
4.24k
{
470
4.24k
    return new XFillBmpTileItem( *this );
471
4.24k
}
472
473
bool XFillBmpTileItem::GetPresentation
474
(
475
    SfxItemPresentation /*ePres*/,
476
    MapUnit             /*eCoreUnit*/,
477
    MapUnit             /*ePresUnit*/,
478
    OUString&           rText, const IntlWrapper&
479
)   const
480
0
{
481
0
    rText.clear();
482
0
    return true;
483
0
}
484
485
void XFillBmpTileItem::dumpAsXml(xmlTextWriterPtr pWriter) const
486
0
{
487
0
    tools::XmlWriter aWriter(pWriter);
488
0
    aWriter.startElement("XFillBmpTileItem");
489
0
    aWriter.attribute("whichId", Which());
490
0
    aWriter.attribute("value", GetValue());
491
0
    aWriter.endElement();
492
0
}
493
494
495
496
XFillBmpPosItem::XFillBmpPosItem( RectPoint eRP ) :
497
2.68k
    SfxEnumItem( XATTR_FILLBMP_POS, eRP )
498
2.68k
{
499
2.68k
}
500
501
XFillBmpPosItem* XFillBmpPosItem::Clone( SfxItemPool* /*pPool*/) const
502
3.02k
{
503
3.02k
    return new XFillBmpPosItem( *this );
504
3.02k
}
505
506
bool XFillBmpPosItem::GetPresentation
507
(
508
    SfxItemPresentation /*ePres*/,
509
    MapUnit             /*eCoreUnit*/,
510
    MapUnit             /*ePresUnit*/,
511
    OUString&           rText, const IntlWrapper&
512
)   const
513
0
{
514
0
    rText.clear();
515
0
    return true;
516
0
}
517
518
void XFillBmpPosItem::dumpAsXml(xmlTextWriterPtr pWriter) const
519
0
{
520
0
    tools::XmlWriter aWriter(pWriter);
521
0
    aWriter.startElement("XFillBmpPosItem");
522
0
    aWriter.attribute("whichId", Which());
523
0
    aWriter.attribute("value", sal_Int32(GetValue()));
524
0
    aWriter.endElement();
525
0
}
526
527
528
XFillBmpSizeXItem::XFillBmpSizeXItem( tools::Long nSizeX ) :
529
1.16k
            SfxMetricItem( XATTR_FILLBMP_SIZEX, nSizeX )
530
1.16k
{
531
1.16k
}
532
533
XFillBmpSizeXItem* XFillBmpSizeXItem::Clone( SfxItemPool* /*pPool*/) const
534
1.20k
{
535
1.20k
    return new XFillBmpSizeXItem( *this );
536
1.20k
}
537
538
bool XFillBmpSizeXItem::GetPresentation
539
(
540
    SfxItemPresentation /*ePres*/,
541
    MapUnit             /*eCoreUnit*/,
542
    MapUnit             /*ePresUnit*/,
543
    OUString&           rText, const IntlWrapper&
544
)   const
545
0
{
546
0
    rText.clear();
547
0
    return true;
548
0
}
549
550
bool XFillBmpSizeXItem::HasMetrics() const
551
0
{
552
0
    return GetValue() > 0;
553
0
}
554
555
556
557
XFillBmpSizeYItem::XFillBmpSizeYItem( tools::Long nSizeY ) :
558
1.16k
            SfxMetricItem( XATTR_FILLBMP_SIZEY, nSizeY )
559
1.16k
{
560
1.16k
}
561
562
XFillBmpSizeYItem* XFillBmpSizeYItem::Clone( SfxItemPool* /*pPool*/) const
563
1.20k
{
564
1.20k
    return new XFillBmpSizeYItem( *this );
565
1.20k
}
566
567
bool XFillBmpSizeYItem::GetPresentation
568
(
569
    SfxItemPresentation /*ePres*/,
570
    MapUnit             /*eCoreUnit*/,
571
    MapUnit             /*ePresUnit*/,
572
    OUString&           rText, const IntlWrapper&
573
)   const
574
0
{
575
0
    rText.clear();
576
0
    return true;
577
0
}
578
579
bool XFillBmpSizeYItem::HasMetrics() const
580
0
{
581
0
    return GetValue() > 0;
582
0
}
583
584
585
XFillBmpSizeLogItem::XFillBmpSizeLogItem( bool bLog ) :
586
1.12k
            SfxBoolItem( XATTR_FILLBMP_SIZELOG, bLog )
587
1.12k
{
588
1.12k
}
589
590
XFillBmpSizeLogItem* XFillBmpSizeLogItem::Clone( SfxItemPool* /*pPool*/) const
591
1.16k
{
592
1.16k
    return new XFillBmpSizeLogItem( *this );
593
1.16k
}
594
595
bool XFillBmpSizeLogItem::GetPresentation
596
(
597
    SfxItemPresentation /*ePres*/,
598
    MapUnit             /*eCoreUnit*/,
599
    MapUnit             /*ePresUnit*/,
600
    OUString&           rText, const IntlWrapper&
601
)   const
602
0
{
603
0
    rText.clear();
604
0
    return true;
605
0
}
606
607
608
609
XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( sal_uInt16 nOffX ) :
610
530
            SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX, nOffX )
611
530
{
612
530
}
613
614
XFillBmpTileOffsetXItem* XFillBmpTileOffsetXItem::Clone( SfxItemPool* /*pPool*/) const
615
566
{
616
566
    return new XFillBmpTileOffsetXItem( *this );
617
566
}
618
619
bool XFillBmpTileOffsetXItem::GetPresentation
620
(
621
    SfxItemPresentation /*ePres*/,
622
    MapUnit             /*eCoreUnit*/,
623
    MapUnit             /*ePresUnit*/,
624
    OUString&           rText, const IntlWrapper&
625
)   const
626
0
{
627
0
    rText.clear();
628
0
    return true;
629
0
}
630
631
632
XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( sal_uInt16 nOffY ) :
633
19
            SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY, nOffY )
634
19
{
635
19
}
636
637
XFillBmpTileOffsetYItem* XFillBmpTileOffsetYItem::Clone( SfxItemPool* /*pPool*/) const
638
55
{
639
55
    return new XFillBmpTileOffsetYItem( *this );
640
55
}
641
642
bool XFillBmpTileOffsetYItem::GetPresentation
643
(
644
    SfxItemPresentation /*ePres*/,
645
    MapUnit             /*eCoreUnit*/,
646
    MapUnit             /*ePresUnit*/,
647
    OUString&           rText, const IntlWrapper&
648
)   const
649
0
{
650
0
    rText.clear();
651
0
    return true;
652
0
}
653
654
XFillBmpStretchItem::XFillBmpStretchItem( bool bStretch ) :
655
2.82k
            SfxBoolItem( XATTR_FILLBMP_STRETCH, bStretch )
656
2.82k
{
657
2.82k
}
658
659
XFillBmpStretchItem* XFillBmpStretchItem::Clone( SfxItemPool* /*pPool*/) const
660
3.26k
{
661
3.26k
    return new XFillBmpStretchItem( *this );
662
3.26k
}
663
664
bool XFillBmpStretchItem::GetPresentation
665
(
666
    SfxItemPresentation /*ePres*/,
667
    MapUnit             /*eCoreUnit*/,
668
    MapUnit             /*ePresUnit*/,
669
    OUString&           rText, const IntlWrapper&
670
)   const
671
0
{
672
0
    rText.clear();
673
0
    return true;
674
0
}
675
676
void XFillBmpStretchItem::dumpAsXml(xmlTextWriterPtr pWriter) const
677
0
{
678
0
    tools::XmlWriter aWriter(pWriter);
679
0
    aWriter.startElement("XFillBmpStretchItem");
680
0
    aWriter.attribute("whichId", Which());
681
0
    aWriter.attribute("value", GetValue());
682
0
    aWriter.endElement();
683
0
}
684
685
XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem(sal_Int32 nOffPosX)
686
530
    : SfxInt32Item(XATTR_FILLBMP_POSOFFSETX, nOffPosX )
687
530
{
688
530
}
689
690
XFillBmpPosOffsetXItem* XFillBmpPosOffsetXItem::Clone( SfxItemPool* /*pPool*/) const
691
597
{
692
597
    return new XFillBmpPosOffsetXItem( *this );
693
597
}
694
695
bool XFillBmpPosOffsetXItem::GetPresentation
696
(
697
    SfxItemPresentation /*ePres*/,
698
    MapUnit             /*eCoreUnit*/,
699
    MapUnit             /*ePresUnit*/,
700
    OUString&           rText, const IntlWrapper&
701
)   const
702
0
{
703
0
    rText.clear();
704
0
    return true;
705
0
}
706
707
XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem(sal_Int32 nOffPosY)
708
530
    : SfxInt32Item(XATTR_FILLBMP_POSOFFSETY, nOffPosY)
709
530
{
710
530
}
711
712
XFillBmpPosOffsetYItem* XFillBmpPosOffsetYItem::Clone( SfxItemPool* /*pPool*/) const
713
597
{
714
597
    return new XFillBmpPosOffsetYItem( *this );
715
597
}
716
717
bool XFillBmpPosOffsetYItem::GetPresentation
718
(
719
    SfxItemPresentation /*ePres*/,
720
    MapUnit             /*eCoreUnit*/,
721
    MapUnit             /*ePresUnit*/,
722
    OUString&           rText, const IntlWrapper&
723
)   const
724
0
{
725
0
    rText.clear();
726
0
    return true;
727
0
}
728
729
XFillBackgroundItem::XFillBackgroundItem( bool bFill ) :
730
530
    SfxBoolItem( XATTR_FILLBACKGROUND, bFill )
731
530
{
732
530
}
733
734
XFillBackgroundItem* XFillBackgroundItem::Clone( SfxItemPool* /*pPool*/) const
735
566
{
736
566
    return new XFillBackgroundItem( *this );
737
566
}
738
739
bool XFillBackgroundItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/,
740
                                           MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper&) const
741
0
{
742
0
    rText.clear();
743
0
    return true;
744
0
}
745
746
void XFillBackgroundItem::dumpAsXml(xmlTextWriterPtr pWriter) const
747
0
{
748
0
    tools::XmlWriter aWriter(pWriter);
749
0
    aWriter.startElement("XFillBackgroundItem");
750
0
    aWriter.attribute("whichId", Which());
751
0
    aWriter.attribute("value", GetValue());
752
0
    aWriter.endElement();
753
0
}
754
755
XFillUseSlideBackgroundItem::XFillUseSlideBackgroundItem( bool bFill ) :
756
54
    SfxBoolItem( XATTR_FILLUSESLIDEBACKGROUND, bFill )
757
54
{
758
54
}
759
760
XFillUseSlideBackgroundItem* XFillUseSlideBackgroundItem::Clone( SfxItemPool* /*pPool*/) const
761
57.7k
{
762
57.7k
    return new XFillUseSlideBackgroundItem( *this );
763
57.7k
}
764
765
bool XFillUseSlideBackgroundItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/,
766
                                           MapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper&) const
767
0
{
768
0
    rText.clear();
769
0
    return true;
770
0
}
771
772
void XFillUseSlideBackgroundItem::dumpAsXml(xmlTextWriterPtr pWriter) const
773
0
{
774
0
    tools::XmlWriter aWriter(pWriter);
775
0
    aWriter.startElement("XFillUseSlideBackgroundItem");
776
0
    aWriter.attribute("whichId", Which());
777
0
    aWriter.attribute("value", GetValue());
778
0
    aWriter.endElement();
779
0
}
780
781
782
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */