LibreOffice Module svx (master) 1
XPropertyTable.cxx
Go to the documentation of this file.
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
21#include <memory>
22#include <XPropertyTable.hxx>
23#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
24#include <com/sun/star/drawing/LineDash.hpp>
25#include <com/sun/star/awt/Gradient.hpp>
26#include <com/sun/star/awt/XBitmap.hpp>
27#include <com/sun/star/graphic/XGraphic.hpp>
28#include <com/sun/star/drawing/Hatch.hpp>
29#include <com/sun/star/lang/XServiceInfo.hpp>
30#include <com/sun/star/container/XNameContainer.hpp>
31#include <o3tl/any.hxx>
32#include <vcl/svapp.hxx>
33
36#include <svx/xdef.hxx>
37
38#include <svx/unoapi.hxx>
40
41using namespace com::sun::star;
42using namespace ::cppu;
43
44namespace {
45
46class SvxUnoXPropertyTable : public WeakImplHelper< container::XNameContainer, lang::XServiceInfo >
47{
48private:
49 XPropertyList& mrList;
50 sal_Int16 mnWhich;
51
52 tools::Long getCount() const { return mrList.Count(); }
53 const XPropertyEntry* get(tools::Long index) const;
54public:
55 SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyList& rList ) noexcept;
56
58 virtual uno::Any getAny( const XPropertyEntry* pEntry ) const = 0;
61 virtual std::unique_ptr<XPropertyEntry> createEntry(const OUString& rName, const uno::Any& rAny) const = 0;
62
63 // XServiceInfo
64 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
65
66 // XNameContainer
67 virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement ) override;
68 virtual void SAL_CALL removeByName( const OUString& Name ) override;
69
70 // XNameReplace
71 virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement ) override;
72
73 // XNameAccess
74 virtual uno::Any SAL_CALL getByName( const OUString& aName ) override;
75 virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) override;
76 virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
77
78 // XElementAccess
79 virtual sal_Bool SAL_CALL hasElements( ) override;
80};
81
82}
83
84SvxUnoXPropertyTable::SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyList& rList ) noexcept
85: mrList( rList ), mnWhich( nWhich )
86{
87}
88
89const XPropertyEntry* SvxUnoXPropertyTable::get(tools::Long index) const
90{
91 return mrList.Get(index);
92}
93
94// XServiceInfo
95sal_Bool SAL_CALL SvxUnoXPropertyTable::supportsService( const OUString& ServiceName )
96{
97 return cppu::supportsService(this, ServiceName);
98}
99
100// XNameContainer
101void SAL_CALL SvxUnoXPropertyTable::insertByName( const OUString& aName, const uno::Any& aElement )
102{
103 SolarMutexGuard aGuard;
104
105 if( hasByName( aName ) )
106 throw container::ElementExistException();
107
108 OUString aInternalName = SvxUnogetInternalNameForItem(mnWhich, aName);
109
110 std::unique_ptr<XPropertyEntry> pNewEntry(createEntry(aInternalName, aElement));
111 if (!pNewEntry)
112 throw lang::IllegalArgumentException();
113
114 mrList.Insert(std::move(pNewEntry));
115}
116
117void SAL_CALL SvxUnoXPropertyTable::removeByName( const OUString& Name )
118{
119 SolarMutexGuard aGuard;
120
121 OUString aInternalName = SvxUnogetInternalNameForItem(mnWhich, Name);
122
123 const tools::Long nCount = getCount();
125 for( i = 0; i < nCount; i++ )
126 {
127 const XPropertyEntry* pEntry = get(i);
128 if (pEntry && aInternalName == pEntry->GetName())
129 {
130 mrList.Remove(i);
131 return;
132 }
133 }
134
135 throw container::NoSuchElementException();
136}
137
138// XNameReplace
139void SAL_CALL SvxUnoXPropertyTable::replaceByName( const OUString& aName, const uno::Any& aElement )
140{
141 SolarMutexGuard aGuard;
142
143 OUString aInternalName = SvxUnogetInternalNameForItem(mnWhich, aName);
144
145 const tools::Long nCount = getCount();
147 for( i = 0; i < nCount; i++ )
148 {
149 const XPropertyEntry* pEntry = get(i);
150 if (pEntry && aInternalName == pEntry->GetName())
151 {
152 std::unique_ptr<XPropertyEntry> pNewEntry(createEntry(aInternalName, aElement));
153 if (!pNewEntry)
154 throw lang::IllegalArgumentException();
155
156 mrList.Replace(std::move(pNewEntry), i);
157 return;
158 }
159 }
160
161 throw container::NoSuchElementException();
162}
163
164// XNameAccess
165uno::Any SAL_CALL SvxUnoXPropertyTable::getByName( const OUString& aName )
166{
167 SolarMutexGuard aGuard;
168
169 OUString aInternalName = SvxUnogetInternalNameForItem(mnWhich, aName);
170
171 const tools::Long nCount = getCount();
173 for( i = 0; i < nCount; i++ )
174 {
175 const XPropertyEntry* pEntry = get(i);
176
177 if (pEntry && aInternalName == pEntry->GetName())
178 return getAny( pEntry );
179 }
180
181 throw container::NoSuchElementException();
182}
183
184uno::Sequence< OUString > SAL_CALL SvxUnoXPropertyTable::getElementNames()
185{
186 SolarMutexGuard aGuard;
187
188 const tools::Long nCount = getCount();
189 uno::Sequence< OUString > aNames( nCount );
190 OUString* pNames = aNames.getArray();
192 for( i = 0; i < nCount; i++ )
193 {
194 const XPropertyEntry* pEntry = get(i);
195
196 if (pEntry)
197 *pNames++ = SvxUnogetApiNameForItem(mnWhich, pEntry->GetName());
198 }
199
200 return aNames;
201}
202
203sal_Bool SAL_CALL SvxUnoXPropertyTable::hasByName( const OUString& aName )
204{
205 SolarMutexGuard aGuard;
206
207 OUString aInternalName = SvxUnogetInternalNameForItem(mnWhich, aName);
208
209 const tools::Long nCount = mrList.Count();
211 for( i = 0; i < nCount; i++ )
212 {
213 const XPropertyEntry* pEntry = get(i);
214 if (pEntry && aInternalName == pEntry->GetName())
215 return true;
216 }
217
218 return false;
219}
220
221// XElementAccess
222sal_Bool SAL_CALL SvxUnoXPropertyTable::hasElements( )
223{
224 SolarMutexGuard aGuard;
225
226 return getCount() != 0;
227}
228
229namespace {
230
231class SvxUnoXColorTable : public SvxUnoXPropertyTable
232{
233public:
234 explicit SvxUnoXColorTable( XPropertyList& rList ) noexcept : SvxUnoXPropertyTable( XATTR_LINECOLOR, rList ) {};
235
236 // SvxUnoXPropertyTable
237 virtual uno::Any getAny( const XPropertyEntry* pEntry ) const noexcept override;
238 virtual std::unique_ptr<XPropertyEntry> createEntry(const OUString& rName, const uno::Any& rAny) const override;
239
240 // XElementAccess
241 virtual uno::Type SAL_CALL getElementType() override;
242
243 // XServiceInfo
244 virtual OUString SAL_CALL getImplementationName( ) override;
245 virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
246};
247
248}
249
250uno::Reference< container::XNameContainer > SvxUnoXColorTable_createInstance( XPropertyList& rList ) noexcept
251{
252 return new SvxUnoXColorTable( rList );
253}
254
255// SvxUnoXPropertyTable
256uno::Any SvxUnoXColorTable::getAny( const XPropertyEntry* pEntry ) const noexcept
257{
258 return uno::Any( static_cast<sal_Int32>(static_cast<const XColorEntry*>(pEntry)->GetColor()) );
259}
260
261std::unique_ptr<XPropertyEntry> SvxUnoXColorTable::createEntry(const OUString& rName, const uno::Any& rAny) const
262{
263 Color aColor;
264 if( !(rAny >>= aColor) )
265 return std::unique_ptr<XPropertyEntry>();
266
267 return std::make_unique<XColorEntry>(aColor, rName);
268}
269
270// XElementAccess
271uno::Type SAL_CALL SvxUnoXColorTable::getElementType()
272{
273 return ::cppu::UnoType<sal_Int32>::get();
274}
275
276// XServiceInfo
277OUString SAL_CALL SvxUnoXColorTable::getImplementationName( )
278{
279 return "SvxUnoXColorTable";
280}
281
282uno::Sequence< OUString > SAL_CALL SvxUnoXColorTable::getSupportedServiceNames( )
283{
284 return { "com.sun.star.drawing.ColorTable" };
285}
286
287namespace {
288
289class SvxUnoXLineEndTable : public SvxUnoXPropertyTable
290{
291public:
292 explicit SvxUnoXLineEndTable( XPropertyList& rTable ) noexcept : SvxUnoXPropertyTable( XATTR_LINEEND, rTable ) {};
293
294 // SvxUnoXPropertyTable
295 virtual uno::Any getAny( const XPropertyEntry* pEntry ) const noexcept override;
296 virtual std::unique_ptr<XPropertyEntry> createEntry(const OUString& rName, const uno::Any& rAny) const override;
297
298 // XElementAccess
299 virtual uno::Type SAL_CALL getElementType() override;
300
301 // XServiceInfo
302 virtual OUString SAL_CALL getImplementationName( ) override;
303 virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
304};
305
306}
307
308uno::Reference< container::XNameContainer > SvxUnoXLineEndTable_createInstance( XPropertyList& rTable ) noexcept
309{
310 return new SvxUnoXLineEndTable( rTable );
311}
312
313// SvxUnoXPropertyTable
314uno::Any SvxUnoXLineEndTable::getAny( const XPropertyEntry* pEntry ) const noexcept
315{
316 drawing::PolyPolygonBezierCoords aBezier;
317 basegfx::utils::B2DPolyPolygonToUnoPolyPolygonBezierCoords( static_cast<const XLineEndEntry*>(pEntry)->GetLineEnd(),
318 aBezier );
319 return uno::Any(aBezier);
320}
321
322std::unique_ptr<XPropertyEntry> SvxUnoXLineEndTable::createEntry(const OUString& rName, const uno::Any& rAny) const
323{
324 auto pCoords = o3tl::tryAccess<drawing::PolyPolygonBezierCoords>(rAny);
325 if( !pCoords )
326 return std::unique_ptr<XLineEndEntry>();
327
328 basegfx::B2DPolyPolygon aPolyPolygon;
329 if( pCoords->Coordinates.getLength() > 0 )
331
332 // #86265# make sure polygon is closed
333 aPolyPolygon.setClosed(true);
334
335 return std::make_unique<XLineEndEntry>(aPolyPolygon, rName);
336}
337
338// XElementAccess
339uno::Type SAL_CALL SvxUnoXLineEndTable::getElementType()
340{
342}
343
344// XServiceInfo
345OUString SAL_CALL SvxUnoXLineEndTable::getImplementationName( )
346{
347 return "SvxUnoXLineEndTable";
348}
349
350uno::Sequence< OUString > SAL_CALL SvxUnoXLineEndTable::getSupportedServiceNames( )
351{
352 return { "com.sun.star.drawing.LineEndTable" };
353}
354
355namespace {
356
357class SvxUnoXDashTable : public SvxUnoXPropertyTable
358{
359public:
360 explicit SvxUnoXDashTable( XPropertyList& rTable ) noexcept : SvxUnoXPropertyTable( XATTR_LINEDASH, rTable ) {};
361
362 // SvxUnoXPropertyTable
363 virtual uno::Any getAny( const XPropertyEntry* pEntry ) const noexcept override;
364 virtual std::unique_ptr<XPropertyEntry> createEntry(const OUString& rName, const uno::Any& rAny) const override;
365
366 // XElementAccess
367 virtual uno::Type SAL_CALL getElementType() override;
368
369 // XServiceInfo
370 virtual OUString SAL_CALL getImplementationName( ) override;
371 virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
372};
373
374}
375
376uno::Reference< container::XNameContainer > SvxUnoXDashTable_createInstance( XPropertyList& rTable ) noexcept
377{
378 return new SvxUnoXDashTable( rTable );
379}
380
381// SvxUnoXPropertyTable
382uno::Any SvxUnoXDashTable::getAny( const XPropertyEntry* pEntry ) const noexcept
383{
384 const XDash& rXD = static_cast<const XDashEntry*>(pEntry)->GetDash();
385
386 drawing::LineDash aLineDash;
387
388 aLineDash.Style = static_cast<css::drawing::DashStyle>(static_cast<sal_uInt16>(rXD.GetDashStyle()));
389 aLineDash.Dots = rXD.GetDots();
390 aLineDash.DotLen = rXD.GetDotLen();
391 aLineDash.Dashes = rXD.GetDashes();
392 aLineDash.DashLen = rXD.GetDashLen();
393 aLineDash.Distance = rXD.GetDistance();
394
395 return uno::Any(aLineDash);
396}
397
398std::unique_ptr<XPropertyEntry> SvxUnoXDashTable::createEntry(const OUString& rName, const uno::Any& rAny) const
399{
400 drawing::LineDash aLineDash;
401 if(!(rAny >>= aLineDash))
402 return std::unique_ptr<XDashEntry>();
403
404 XDash aXDash;
405
406 aXDash.SetDashStyle(static_cast<css::drawing::DashStyle>(static_cast<sal_uInt16>(aLineDash.Style)));
407 aXDash.SetDots(aLineDash.Dots);
408 aXDash.SetDotLen(aLineDash.DotLen);
409 aXDash.SetDashes(aLineDash.Dashes);
410 aXDash.SetDashLen(aLineDash.DashLen);
411 aXDash.SetDistance(aLineDash.Distance);
412
413 return std::make_unique<XDashEntry>(aXDash, rName);
414}
415
416// XElementAccess
417uno::Type SAL_CALL SvxUnoXDashTable::getElementType()
418{
420}
421
422// XServiceInfo
423OUString SAL_CALL SvxUnoXDashTable::getImplementationName( )
424{
425 return "SvxUnoXDashTable";
426}
427
428uno::Sequence< OUString > SAL_CALL SvxUnoXDashTable::getSupportedServiceNames( )
429{
430 return { "com.sun.star.drawing.DashTable" };
431}
432
433namespace {
434
435class SvxUnoXHatchTable : public SvxUnoXPropertyTable
436{
437public:
438 explicit SvxUnoXHatchTable( XPropertyList& rTable ) noexcept : SvxUnoXPropertyTable( XATTR_FILLHATCH, rTable ) {};
439
440 // SvxUnoXPropertyTable
441 virtual uno::Any getAny( const XPropertyEntry* pEntry ) const noexcept override;
442 virtual std::unique_ptr<XPropertyEntry> createEntry(const OUString& rName, const uno::Any& rAny) const override;
443
444 // XElementAccess
445 virtual uno::Type SAL_CALL getElementType() override;
446
447 // XServiceInfo
448 virtual OUString SAL_CALL getImplementationName( ) override;
449 virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
450};
451
452}
453
454uno::Reference< container::XNameContainer > SvxUnoXHatchTable_createInstance( XPropertyList& rTable ) noexcept
455{
456 return new SvxUnoXHatchTable( rTable );
457}
458
459// SvxUnoXPropertyTable
460uno::Any SvxUnoXHatchTable::getAny( const XPropertyEntry* pEntry ) const noexcept
461{
462 const XHatch& aHatch = static_cast<const XHatchEntry*>(pEntry)->GetHatch();
463
464 drawing::Hatch aUnoHatch;
465
466 aUnoHatch.Style = aHatch.GetHatchStyle();
467 aUnoHatch.Color = sal_Int32(aHatch.GetColor());
468 aUnoHatch.Distance = aHatch.GetDistance();
469 aUnoHatch.Angle = aHatch.GetAngle().get();
470
471 return uno::Any(aUnoHatch);
472}
473
474std::unique_ptr<XPropertyEntry> SvxUnoXHatchTable::createEntry(const OUString& rName, const uno::Any& rAny) const
475{
476 drawing::Hatch aUnoHatch;
477 if(!(rAny >>= aUnoHatch))
478 return std::unique_ptr<XHatchEntry>();
479
480 XHatch aXHatch;
481 aXHatch.SetHatchStyle( aUnoHatch.Style );
482 aXHatch.SetColor( Color(ColorTransparency, aUnoHatch.Color) );
483 aXHatch.SetDistance( aUnoHatch.Distance );
484 aXHatch.SetAngle( Degree10(aUnoHatch.Angle) );
485
486 return std::make_unique<XHatchEntry>(aXHatch, rName);
487}
488
489// XElementAccess
490uno::Type SAL_CALL SvxUnoXHatchTable::getElementType()
491{
493}
494
495// XServiceInfo
496OUString SAL_CALL SvxUnoXHatchTable::getImplementationName( )
497{
498 return "SvxUnoXHatchTable";
499}
500
501uno::Sequence< OUString > SAL_CALL SvxUnoXHatchTable::getSupportedServiceNames( )
502{
503 return { "com.sun.star.drawing.HatchTable" };
504}
505
506namespace {
507
508class SvxUnoXGradientTable : public SvxUnoXPropertyTable
509{
510public:
511 explicit SvxUnoXGradientTable( XPropertyList& rTable ) noexcept : SvxUnoXPropertyTable( XATTR_FILLGRADIENT, rTable ) {};
512
513 // SvxUnoXPropertyTable
514 virtual uno::Any getAny( const XPropertyEntry* pEntry ) const noexcept override;
515 virtual std::unique_ptr<XPropertyEntry> createEntry(const OUString& rName, const uno::Any& rAny) const override;
516
517 // XElementAccess
518 virtual uno::Type SAL_CALL getElementType() override;
519
520 // XServiceInfo
521 virtual OUString SAL_CALL getImplementationName( ) override;
522 virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
523};
524
525}
526
527uno::Reference< container::XNameContainer > SvxUnoXGradientTable_createInstance( XPropertyList& rTable ) noexcept
528{
529 return new SvxUnoXGradientTable( rTable );
530}
531
532// SvxUnoXPropertyTable
533uno::Any SvxUnoXGradientTable::getAny( const XPropertyEntry* pEntry ) const noexcept
534{
535 const basegfx::BGradient& aBGradient = static_cast<const XGradientEntry*>(pEntry)->GetGradient();
536 awt::Gradient2 aGradient;
537 assert(aGradient.ColorStops.get() && "cid#1524745 aGradient.ColorStops._pSequence won't be null here");
538
539 // standard values
540 aGradient.Style = aBGradient.GetGradientStyle();
541 aGradient.Angle = static_cast<short>(aBGradient.GetAngle());
542 aGradient.Border = aBGradient.GetBorder();
543 aGradient.XOffset = aBGradient.GetXOffset();
544 aGradient.YOffset = aBGradient.GetYOffset();
545 aGradient.StartIntensity = aBGradient.GetStartIntens();
546 aGradient.EndIntensity = aBGradient.GetEndIntens();
547 aGradient.StepCount = aBGradient.GetSteps();
548
549 // for compatibility, still set StartColor/EndColor
550 const basegfx::BColorStops& rBColorStops(aBGradient.GetColorStops());
551 aGradient.StartColor = static_cast<sal_Int32>(Color(rBColorStops.front().getStopColor()));
552 aGradient.EndColor = static_cast<sal_Int32>(Color(rBColorStops.back().getStopColor()));
553
554 // fill ColorStops to extended Gradient2
555 aGradient.ColorStops = rBColorStops.getAsColorStopSequence();
556
557 return uno::Any(aGradient);
558}
559
560std::unique_ptr<XPropertyEntry> SvxUnoXGradientTable::createEntry(const OUString& rName, const uno::Any& rAny) const
561{
562 if (!rAny.has<css::awt::Gradient>() || !rAny.has<css::awt::Gradient2>())
563 return std::unique_ptr<XPropertyEntry>();
564
565 const basegfx::BGradient aBGradient(rAny);
566 return std::make_unique<XGradientEntry>(aBGradient, rName);
567}
568
569// XElementAccess
570uno::Type SAL_CALL SvxUnoXGradientTable::getElementType()
571{
573}
574
575// XServiceInfo
576OUString SAL_CALL SvxUnoXGradientTable::getImplementationName( )
577{
578 return "SvxUnoXGradientTable";
579}
580
581uno::Sequence< OUString > SAL_CALL SvxUnoXGradientTable::getSupportedServiceNames( )
582{
583 return { "com.sun.star.drawing.GradientTable" };
584}
585
586namespace {
587
588class SvxUnoXBitmapTable : public SvxUnoXPropertyTable
589{
590public:
591 explicit SvxUnoXBitmapTable( XPropertyList& rTable ) noexcept : SvxUnoXPropertyTable( XATTR_FILLBITMAP, rTable ) {};
592
593 // SvxUnoXPropertyTable
594 virtual uno::Any getAny( const XPropertyEntry* pEntry ) const override;
595 virtual std::unique_ptr<XPropertyEntry> createEntry(const OUString& rName, const uno::Any& rAny) const override;
596
597 // XElementAccess
598 virtual uno::Type SAL_CALL getElementType() override;
599
600 // XServiceInfo
601 virtual OUString SAL_CALL getImplementationName( ) override;
602 virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
603};
604
605}
606
607uno::Reference< container::XNameContainer > SvxUnoXBitmapTable_createInstance( XPropertyList& rTable ) noexcept
608{
609 return new SvxUnoXBitmapTable( rTable );
610}
611
612// SvxUnoXPropertyTable
613uno::Any SvxUnoXBitmapTable::getAny( const XPropertyEntry* pEntry ) const
614{
615 auto xBitmapEntry = static_cast<const XBitmapEntry*>(pEntry);
616 css::uno::Reference<css::awt::XBitmap> xBitmap(xBitmapEntry->GetGraphicObject().GetGraphic().GetXGraphic(), uno::UNO_QUERY);
617 return uno::Any(xBitmap);
618}
619
620std::unique_ptr<XPropertyEntry> SvxUnoXBitmapTable::createEntry(const OUString& rName, const uno::Any& rAny) const
621{
622 if (!rAny.has<uno::Reference<awt::XBitmap>>())
623 return std::unique_ptr<XPropertyEntry>();
624
625 auto xBitmap = rAny.get<uno::Reference<awt::XBitmap>>();
626 if (!xBitmap.is())
627 return nullptr;
628
629 uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
630 if (!xGraphic.is())
631 return nullptr;
632
633 Graphic aGraphic(xGraphic);
634 if (aGraphic.IsNone())
635 return nullptr;
636
637 GraphicObject aGraphicObject(std::move(aGraphic));
638 return std::make_unique<XBitmapEntry>(aGraphicObject, rName);
639}
640
641// XElementAccess
642uno::Type SAL_CALL SvxUnoXBitmapTable::getElementType()
643{
644 return ::cppu::UnoType<awt::XBitmap>::get();
645}
646
647// XServiceInfo
648OUString SAL_CALL SvxUnoXBitmapTable::getImplementationName( )
649{
650 return "SvxUnoXBitmapTable";
651}
652
653uno::Sequence< OUString > SAL_CALL SvxUnoXBitmapTable::getSupportedServiceNames( )
654{
655 return { "com.sun.star.drawing.BitmapTable" };
656}
657
658/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
uno::Reference< container::XNameContainer > SvxUnoXColorTable_createInstance(XPropertyList &rList) noexcept
uno::Reference< container::XNameContainer > SvxUnoXHatchTable_createInstance(XPropertyList &rTable) noexcept
uno::Reference< container::XNameContainer > SvxUnoXLineEndTable_createInstance(XPropertyList &rTable) noexcept
uno::Reference< container::XNameContainer > SvxUnoXBitmapTable_createInstance(XPropertyList &rTable) noexcept
uno::Reference< container::XNameContainer > SvxUnoXGradientTable_createInstance(XPropertyList &rTable) noexcept
uno::Reference< container::XNameContainer > SvxUnoXDashTable_createInstance(XPropertyList &rTable) noexcept
Definition: xdash.hxx:32
void SetDashLen(double nNewDashLen)
Definition: xdash.hxx:51
void SetDots(sal_uInt16 nNewDots)
Definition: xdash.hxx:48
double GetDotLen() const
Definition: xdash.hxx:56
css::drawing::DashStyle GetDashStyle() const
Definition: xdash.hxx:54
void SetDotLen(double nNewDotLen)
Definition: xdash.hxx:49
double GetDashLen() const
Definition: xdash.hxx:58
void SetDistance(double nNewDistance)
Definition: xdash.hxx:52
void SetDashes(sal_uInt16 nNewDashes)
Definition: xdash.hxx:50
double GetDistance() const
Definition: xdash.hxx:59
void SetDashStyle(css::drawing::DashStyle eNewStyle)
Definition: xdash.hxx:47
sal_uInt16 GetDots() const
Definition: xdash.hxx:55
sal_uInt16 GetDashes() const
Definition: xdash.hxx:57
const Color & GetColor() const
Definition: xhatch.hxx:52
tools::Long GetDistance() const
Definition: xhatch.hxx:53
void SetDistance(tools::Long nNewDistance)
Definition: xhatch.hxx:48
void SetHatchStyle(css::drawing::HatchStyle eNewStyle)
Definition: xhatch.hxx:46
css::drawing::HatchStyle GetHatchStyle() const
Definition: xhatch.hxx:51
void SetColor(const Color &rColor)
Definition: xhatch.hxx:47
Degree10 GetAngle() const
Definition: xhatch.hxx:54
void SetAngle(Degree10 nNewAngle)
Definition: xhatch.hxx:49
const OUString & GetName() const
tools::Long Count() const
Definition: xtable.cxx:122
void setClosed(bool bNew)
sal_uInt16 GetBorder() const
sal_uInt16 GetStartIntens() const
sal_uInt16 GetSteps() const
sal_uInt16 GetXOffset() const
const basegfx::BColorStops & GetColorStops() const
sal_uInt16 GetEndIntens() const
Degree10 GetAngle() const
css::awt::GradientStyle GetGradientStyle() const
sal_uInt16 GetYOffset() const
css::uno::Type const & get()
int nCount
void B2DPolyPolygonToUnoPolyPolygonBezierCoords(const B2DPolyPolygon &rPolyPolygon, css::drawing::PolyPolygonBezierCoords &rPolyPolygonBezierCoordsRetval)
B2DPolyPolygon UnoPolyPolygonBezierCoordsToB2DPolyPolygon(const css::drawing::PolyPolygonBezierCoords &rPolyPolygonBezierCoordsSource)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
int i
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
long Long
UNDERLYING_TYPE get() const
unsigned char sal_Bool
OUString SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString &rInternalName)
if the given name is a predefined name for the current language it is replaced by the corresponding a...
Definition: unoprov.cxx:1991
OUString SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString &rApiName)
if the given name is a predefined api name it is replaced by the predefined name for the current lang...
Definition: unoprov.cxx:2024
constexpr TypedWhichId< XLineColorItem > XATTR_LINECOLOR(XATTR_LINE_FIRST+3)
constexpr TypedWhichId< XLineDashItem > XATTR_LINEDASH(XATTR_LINE_FIRST+1)
constexpr TypedWhichId< XLineEndItem > XATTR_LINEEND(XATTR_LINE_FIRST+5)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)