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 XGradient& aXGradient = static_cast<const XGradientEntry*>(pEntry)->GetGradient();
536 awt::Gradient aGradient;
537
538 aGradient.Style = aXGradient.GetGradientStyle();
539 aGradient.StartColor = static_cast<sal_Int32>(aXGradient.GetStartColor());
540 aGradient.EndColor = static_cast<sal_Int32>(aXGradient.GetEndColor());
541 aGradient.Angle = static_cast<short>(aXGradient.GetAngle());
542 aGradient.Border = aXGradient.GetBorder();
543 aGradient.XOffset = aXGradient.GetXOffset();
544 aGradient.YOffset = aXGradient.GetYOffset();
545 aGradient.StartIntensity = aXGradient.GetStartIntens();
546 aGradient.EndIntensity = aXGradient.GetEndIntens();
547 aGradient.StepCount = aXGradient.GetSteps();
548
549 return uno::Any(aGradient);
550}
551
552std::unique_ptr<XPropertyEntry> SvxUnoXGradientTable::createEntry(const OUString& rName, const uno::Any& rAny) const
553{
554 awt::Gradient aGradient;
555 if(!(rAny >>= aGradient))
556 return std::unique_ptr<XPropertyEntry>();
557
558 XGradient aXGradient;
559
560 aXGradient.SetGradientStyle( aGradient.Style );
561 aXGradient.SetStartColor( Color(ColorTransparency, aGradient.StartColor) );
562 aXGradient.SetEndColor( Color(ColorTransparency, aGradient.EndColor) );
563 aXGradient.SetAngle( Degree10(aGradient.Angle) );
564 aXGradient.SetBorder( aGradient.Border );
565 aXGradient.SetXOffset( aGradient.XOffset );
566 aXGradient.SetYOffset( aGradient.YOffset );
567 aXGradient.SetStartIntens( aGradient.StartIntensity );
568 aXGradient.SetEndIntens( aGradient.EndIntensity );
569 aXGradient.SetSteps( aGradient.StepCount );
570
571 return std::make_unique<XGradientEntry>(aXGradient, rName);
572}
573
574// XElementAccess
575uno::Type SAL_CALL SvxUnoXGradientTable::getElementType()
576{
578}
579
580// XServiceInfo
581OUString SAL_CALL SvxUnoXGradientTable::getImplementationName( )
582{
583 return "SvxUnoXGradientTable";
584}
585
586uno::Sequence< OUString > SAL_CALL SvxUnoXGradientTable::getSupportedServiceNames( )
587{
588 return { "com.sun.star.drawing.GradientTable" };
589}
590
591namespace {
592
593class SvxUnoXBitmapTable : public SvxUnoXPropertyTable
594{
595public:
596 explicit SvxUnoXBitmapTable( XPropertyList& rTable ) noexcept : SvxUnoXPropertyTable( XATTR_FILLBITMAP, rTable ) {};
597
598 // SvxUnoXPropertyTable
599 virtual uno::Any getAny( const XPropertyEntry* pEntry ) const override;
600 virtual std::unique_ptr<XPropertyEntry> createEntry(const OUString& rName, const uno::Any& rAny) const override;
601
602 // XElementAccess
603 virtual uno::Type SAL_CALL getElementType() override;
604
605 // XServiceInfo
606 virtual OUString SAL_CALL getImplementationName( ) override;
607 virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
608};
609
610}
611
612uno::Reference< container::XNameContainer > SvxUnoXBitmapTable_createInstance( XPropertyList& rTable ) noexcept
613{
614 return new SvxUnoXBitmapTable( rTable );
615}
616
617// SvxUnoXPropertyTable
618uno::Any SvxUnoXBitmapTable::getAny( const XPropertyEntry* pEntry ) const
619{
620 auto xBitmapEntry = static_cast<const XBitmapEntry*>(pEntry);
621 css::uno::Reference<css::awt::XBitmap> xBitmap(xBitmapEntry->GetGraphicObject().GetGraphic().GetXGraphic(), uno::UNO_QUERY);
622 return uno::Any(xBitmap);
623}
624
625std::unique_ptr<XPropertyEntry> SvxUnoXBitmapTable::createEntry(const OUString& rName, const uno::Any& rAny) const
626{
627 if (!rAny.has<uno::Reference<awt::XBitmap>>())
628 return std::unique_ptr<XPropertyEntry>();
629
630 auto xBitmap = rAny.get<uno::Reference<awt::XBitmap>>();
631 if (!xBitmap.is())
632 return nullptr;
633
634 uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
635 if (!xGraphic.is())
636 return nullptr;
637
638 Graphic aGraphic(xGraphic);
639 if (aGraphic.IsNone())
640 return nullptr;
641
642 GraphicObject aGraphicObject(std::move(aGraphic));
643 return std::make_unique<XBitmapEntry>(aGraphicObject, rName);
644}
645
646// XElementAccess
647uno::Type SAL_CALL SvxUnoXBitmapTable::getElementType()
648{
649 return ::cppu::UnoType<awt::XBitmap>::get();
650}
651
652// XServiceInfo
653OUString SAL_CALL SvxUnoXBitmapTable::getImplementationName( )
654{
655 return "SvxUnoXBitmapTable";
656}
657
658uno::Sequence< OUString > SAL_CALL SvxUnoXBitmapTable::getSupportedServiceNames( )
659{
660 return { "com.sun.star.drawing.BitmapTable" };
661}
662
663/* 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 & GetEndColor() const
Definition: xgrad.hxx:70
sal_uInt16 GetYOffset() const
Definition: xgrad.hxx:74
void SetEndIntens(sal_uInt16 nNewIntens)
Definition: xgrad.hxx:65
sal_uInt16 GetStartIntens() const
Definition: xgrad.hxx:75
css::awt::GradientStyle GetGradientStyle() const
Definition: xgrad.hxx:68
void SetBorder(sal_uInt16 nNewBorder)
Definition: xgrad.hxx:61
const Color & GetStartColor() const
Definition: xgrad.hxx:69
sal_uInt16 GetBorder() const
Definition: xgrad.hxx:72
sal_uInt16 GetEndIntens() const
Definition: xgrad.hxx:76
Degree10 GetAngle() const
Definition: xgrad.hxx:71
void SetStartColor(const Color &rColor)
Definition: xgrad.hxx:58
sal_uInt16 GetSteps() const
Definition: xgrad.hxx:77
void SetGradientStyle(css::awt::GradientStyle eNewStyle)
Definition: xgrad.hxx:57
void SetXOffset(sal_uInt16 nNewOffset)
Definition: xgrad.hxx:62
void SetEndColor(const Color &rColor)
Definition: xgrad.hxx:59
void SetAngle(Degree10 nNewAngle)
Definition: xgrad.hxx:60
void SetStartIntens(sal_uInt16 nNewIntens)
Definition: xgrad.hxx:64
sal_uInt16 GetXOffset() const
Definition: xgrad.hxx:73
void SetYOffset(sal_uInt16 nNewOffset)
Definition: xgrad.hxx:63
void SetSteps(sal_uInt16 nSteps)
Definition: xgrad.hxx:66
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)
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:1982
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:2015
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)