1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <com/sun/star/container/XIndexContainer.hpp>
21 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
22 #include <com/sun/star/lang/XServiceInfo.hpp>
23 #include <com/sun/star/document/XEventsSupplier.hpp>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/awt/Rectangle.hpp>
26 #include <com/sun/star/awt/Point.hpp>
27 #include <com/sun/star/drawing/PointSequence.hpp>
28 #include <comphelper/servicehelper.hxx>
29 #include <comphelper/propertysethelper.hxx>
30 #include <comphelper/propertysetinfo.hxx>
31 #include <cppuhelper/weakagg.hxx>
32 #include <cppuhelper/implbase.hxx>
33 #include <cppuhelper/supportsservice.hxx>
35 #include <osl/diagnose.h>
36 #include <rtl/ref.hxx>
37 #include <svtools/unoevent.hxx>
38 #include <svtools/unoimap.hxx>
39 #include <vcl/imap.hxx>
40 #include <vcl/imapcirc.hxx>
41 #include <vcl/imaprect.hxx>
42 #include <vcl/imappoly.hxx>
44 using namespace comphelper
;
46 using namespace com::sun::star
;
47 using namespace css::uno
;
48 using namespace css::lang
;
49 using namespace css::container
;
50 using namespace css::beans
;
51 using namespace css::document
;
52 using namespace css::drawing
;
54 const sal_Int32 HANDLE_URL
= 1;
55 const sal_Int32 HANDLE_DESCRIPTION
= 2;
56 const sal_Int32 HANDLE_TARGET
= 3;
57 const sal_Int32 HANDLE_NAME
= 4;
58 const sal_Int32 HANDLE_ISACTIVE
= 5;
59 const sal_Int32 HANDLE_POLYGON
= 6;
60 const sal_Int32 HANDLE_CENTER
= 7;
61 const sal_Int32 HANDLE_RADIUS
= 8;
62 const sal_Int32 HANDLE_BOUNDARY
= 9;
63 const sal_Int32 HANDLE_TITLE
= 10;
67 class SvUnoImageMapObject
: public OWeakAggObject
,
68 public XEventsSupplier
,
70 public PropertySetHelper
,
74 SvUnoImageMapObject( IMapObjectType nType
, const SvEventDescription
* pSupportedMacroItems
);
75 SvUnoImageMapObject( const IMapObject
& rMapObject
, const SvEventDescription
* pSupportedMacroItems
);
77 std::unique_ptr
<IMapObject
> createIMapObject() const;
79 rtl::Reference
<SvMacroTableEventDescriptor
> mxEvents
;
81 // overridden helpers from PropertySetHelper
82 virtual void _setPropertyValues( const PropertyMapEntry
** ppEntries
, const Any
* pValues
) override
;
83 virtual void _getPropertyValues( const PropertyMapEntry
** ppEntries
, Any
* pValue
) override
;
86 virtual Any SAL_CALL
queryAggregation( const Type
& rType
) override
;
87 virtual Any SAL_CALL
queryInterface( const Type
& rType
) override
;
88 virtual void SAL_CALL
acquire() noexcept override
;
89 virtual void SAL_CALL
release() noexcept override
;
92 virtual Sequence
< Type
> SAL_CALL
getTypes( ) override
;
93 virtual Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) override
;
96 virtual Reference
< css::container::XNameReplace
> SAL_CALL
getEvents( ) override
;
99 virtual OUString SAL_CALL
getImplementationName( ) override
;
100 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
101 virtual Sequence
< OUString
> SAL_CALL
getSupportedServiceNames( ) override
;
104 static rtl::Reference
<PropertySetInfo
> createPropertySetInfo( IMapObjectType nType
);
107 IMapObjectType mnType
;
115 awt::Rectangle maBoundary
;
118 PointSequence maPolygon
;
123 rtl::Reference
<PropertySetInfo
> SvUnoImageMapObject::createPropertySetInfo( IMapObjectType nType
)
127 case IMapObjectType::Polygon
:
129 static PropertyMapEntry
const aPolygonObj_Impl
[] =
131 { OUString("URL"), HANDLE_URL
, cppu::UnoType
<OUString
>::get(), 0, 0 },
132 { OUString("Title"), HANDLE_TITLE
, cppu::UnoType
<OUString
>::get(), 0, 0 },
133 { OUString("Description"), HANDLE_DESCRIPTION
, cppu::UnoType
<OUString
>::get(), 0, 0 },
134 { OUString("Target"), HANDLE_TARGET
, cppu::UnoType
<OUString
>::get(), 0, 0 },
135 { OUString("Name"), HANDLE_NAME
, cppu::UnoType
<OUString
>::get(), 0, 0 },
136 { OUString("IsActive"), HANDLE_ISACTIVE
, cppu::UnoType
<bool>::get(), 0, 0 },
137 { OUString("Polygon"), HANDLE_POLYGON
, cppu::UnoType
<PointSequence
>::get(), 0, 0 },
140 return rtl::Reference
<PropertySetInfo
>(new PropertySetInfo( aPolygonObj_Impl
));
142 case IMapObjectType::Circle
:
144 static PropertyMapEntry
const aCircleObj_Impl
[] =
146 { OUString("URL"), HANDLE_URL
, cppu::UnoType
<OUString
>::get(), 0, 0 },
147 { OUString("Title"), HANDLE_TITLE
, cppu::UnoType
<OUString
>::get(), 0, 0 },
148 { OUString("Description"), HANDLE_DESCRIPTION
, cppu::UnoType
<OUString
>::get(), 0, 0 },
149 { OUString("Target"), HANDLE_TARGET
, cppu::UnoType
<OUString
>::get(), 0, 0 },
150 { OUString("Name"), HANDLE_NAME
, cppu::UnoType
<OUString
>::get(), 0, 0 },
151 { OUString("IsActive"), HANDLE_ISACTIVE
, cppu::UnoType
<bool>::get(), 0, 0 },
152 { OUString("Center"), HANDLE_CENTER
, cppu::UnoType
<awt::Point
>::get(), 0, 0 },
153 { OUString("Radius"), HANDLE_RADIUS
, cppu::UnoType
<sal_Int32
>::get(), 0, 0 },
156 return rtl::Reference
<PropertySetInfo
>(new PropertySetInfo( aCircleObj_Impl
));
158 case IMapObjectType::Rectangle
:
161 static PropertyMapEntry
const aRectangleObj_Impl
[] =
163 { OUString("URL"), HANDLE_URL
, cppu::UnoType
<OUString
>::get(), 0, 0 },
164 { OUString("Title"), HANDLE_TITLE
, cppu::UnoType
<OUString
>::get(), 0, 0 },
165 { OUString("Description"), HANDLE_DESCRIPTION
, cppu::UnoType
<OUString
>::get(), 0, 0 },
166 { OUString("Target"), HANDLE_TARGET
, cppu::UnoType
<OUString
>::get(), 0, 0 },
167 { OUString("Name"), HANDLE_NAME
, cppu::UnoType
<OUString
>::get(), 0, 0 },
168 { OUString("IsActive"), HANDLE_ISACTIVE
, cppu::UnoType
<bool>::get(), 0, 0 },
169 { OUString("Boundary"), HANDLE_BOUNDARY
, cppu::UnoType
<awt::Rectangle
>::get(), 0, 0 },
172 return rtl::Reference
<PropertySetInfo
>(new PropertySetInfo( aRectangleObj_Impl
));
177 SvUnoImageMapObject::SvUnoImageMapObject( IMapObjectType nType
, const SvEventDescription
* pSupportedMacroItems
)
178 : PropertySetHelper( createPropertySetInfo( nType
) ),
183 mxEvents
= new SvMacroTableEventDescriptor( pSupportedMacroItems
);
186 SvUnoImageMapObject::SvUnoImageMapObject( const IMapObject
& rMapObject
, const SvEventDescription
* pSupportedMacroItems
)
187 : PropertySetHelper( createPropertySetInfo( rMapObject
.GetType() ) ),
188 mnType( rMapObject
.GetType() )
192 maURL
= rMapObject
.GetURL();
193 maAltText
= rMapObject
.GetAltText();
194 maDesc
= rMapObject
.GetDesc();
195 maTarget
= rMapObject
.GetTarget();
196 maName
= rMapObject
.GetName();
197 mbIsActive
= rMapObject
.IsActive();
201 case IMapObjectType::Rectangle
:
203 const tools::Rectangle
aRect( static_cast<const IMapRectangleObject
*>(&rMapObject
)->GetRectangle(false) );
204 maBoundary
.X
= aRect
.Left();
205 maBoundary
.Y
= aRect
.Top();
206 maBoundary
.Width
= aRect
.GetWidth();
207 maBoundary
.Height
= aRect
.GetHeight();
210 case IMapObjectType::Circle
:
212 mnRadius
= static_cast<const IMapCircleObject
*>(&rMapObject
)->GetRadius(false);
213 const Point
aPoint( static_cast<const IMapCircleObject
*>(&rMapObject
)->GetCenter(false) );
215 maCenter
.X
= aPoint
.X();
216 maCenter
.Y
= aPoint
.Y();
219 case IMapObjectType::Polygon
:
222 const tools::Polygon
aPoly( static_cast<const IMapPolygonObject
*>(&rMapObject
)->GetPolygon(false) );
224 const sal_uInt16 nCount
= aPoly
.GetSize();
225 maPolygon
.realloc( nCount
);
226 awt::Point
* pPoints
= maPolygon
.getArray();
228 for( sal_uInt16 nPoint
= 0; nPoint
< nCount
; nPoint
++ )
230 const Point
& rPoint
= aPoly
.GetPoint( nPoint
);
231 pPoints
->X
= rPoint
.X();
232 pPoints
->Y
= rPoint
.Y();
239 mxEvents
= new SvMacroTableEventDescriptor( rMapObject
.GetMacroTable(), pSupportedMacroItems
);
242 std::unique_ptr
<IMapObject
> SvUnoImageMapObject::createIMapObject() const
244 const OUString
aURL( maURL
);
245 const OUString
aAltText( maAltText
);
246 const OUString
aDesc( maDesc
);
247 const OUString
aTarget( maTarget
);
248 const OUString
aName( maName
);
250 std::unique_ptr
<IMapObject
> pNewIMapObject
;
254 case IMapObjectType::Rectangle
:
256 const tools::Rectangle
aRect( maBoundary
.X
, maBoundary
.Y
, maBoundary
.X
+ maBoundary
.Width
- 1, maBoundary
.Y
+ maBoundary
.Height
- 1 );
257 pNewIMapObject
.reset(new IMapRectangleObject( aRect
, aURL
, aAltText
, aDesc
, aTarget
, aName
, mbIsActive
, false ));
261 case IMapObjectType::Circle
:
263 const Point
aCenter( maCenter
.X
, maCenter
.Y
);
264 pNewIMapObject
.reset(new IMapCircleObject( aCenter
, mnRadius
, aURL
, aAltText
, aDesc
, aTarget
, aName
, mbIsActive
, false ));
268 case IMapObjectType::Polygon
:
271 const sal_uInt16 nCount
= static_cast<sal_uInt16
>(maPolygon
.getLength());
273 tools::Polygon
aPoly( nCount
);
274 for( sal_uInt16 nPoint
= 0; nPoint
< nCount
; nPoint
++ )
276 Point
aPoint( maPolygon
[nPoint
].X
, maPolygon
[nPoint
].Y
);
277 aPoly
.SetPoint( aPoint
, nPoint
);
280 aPoly
.Optimize( PolyOptimizeFlags::CLOSE
);
281 pNewIMapObject
.reset(new IMapPolygonObject( aPoly
, aURL
, aAltText
, aDesc
, aTarget
, aName
, mbIsActive
, false ));
286 SvxMacroTableDtor aMacroTable
;
287 mxEvents
->copyMacrosIntoTable(aMacroTable
);
288 pNewIMapObject
->SetMacroTable( aMacroTable
);
290 return pNewIMapObject
;
295 Any SAL_CALL
SvUnoImageMapObject::queryInterface( const Type
& rType
)
297 return OWeakAggObject::queryInterface( rType
);
300 Any SAL_CALL
SvUnoImageMapObject::queryAggregation( const Type
& rType
)
304 if( rType
== cppu::UnoType
<XServiceInfo
>::get())
305 aAny
<<= Reference
< XServiceInfo
>(this);
306 else if( rType
== cppu::UnoType
<XTypeProvider
>::get())
307 aAny
<<= Reference
< XTypeProvider
>(this);
308 else if( rType
== cppu::UnoType
<XPropertySet
>::get())
309 aAny
<<= Reference
< XPropertySet
>(this);
310 else if( rType
== cppu::UnoType
<XEventsSupplier
>::get())
311 aAny
<<= Reference
< XEventsSupplier
>(this);
312 else if( rType
== cppu::UnoType
<XMultiPropertySet
>::get())
313 aAny
<<= Reference
< XMultiPropertySet
>(this);
315 aAny
= OWeakAggObject::queryAggregation( rType
);
320 void SAL_CALL
SvUnoImageMapObject::acquire() noexcept
322 OWeakAggObject::acquire();
325 void SAL_CALL
SvUnoImageMapObject::release() noexcept
327 OWeakAggObject::release();
330 uno::Sequence
< uno::Type
> SAL_CALL
SvUnoImageMapObject::getTypes()
332 static const uno::Sequence
< uno::Type
> aTypes
{
333 cppu::UnoType
<XAggregation
>::get(),
334 cppu::UnoType
<XEventsSupplier
>::get(),
335 cppu::UnoType
<XServiceInfo
>::get(),
336 cppu::UnoType
<XPropertySet
>::get(),
337 cppu::UnoType
<XMultiPropertySet
>::get(),
338 cppu::UnoType
<XTypeProvider
>::get() };
342 uno::Sequence
< sal_Int8
> SAL_CALL
SvUnoImageMapObject::getImplementationId()
344 return css::uno::Sequence
<sal_Int8
>();
348 sal_Bool SAL_CALL
SvUnoImageMapObject::supportsService( const OUString
& ServiceName
)
350 return cppu::supportsService(this, ServiceName
);
353 Sequence
< OUString
> SAL_CALL
SvUnoImageMapObject::getSupportedServiceNames()
355 Sequence
< OUString
> aSNS( 2 );
356 aSNS
.getArray()[0] = "com.sun.star.image.ImageMapObject";
359 case IMapObjectType::Polygon
:
361 aSNS
.getArray()[1] = "com.sun.star.image.ImageMapPolygonObject";
363 case IMapObjectType::Rectangle
:
364 aSNS
.getArray()[1] = "com.sun.star.image.ImageMapRectangleObject";
366 case IMapObjectType::Circle
:
367 aSNS
.getArray()[1] = "com.sun.star.image.ImageMapCircleObject";
373 OUString SAL_CALL
SvUnoImageMapObject::getImplementationName()
377 case IMapObjectType::Polygon
:
379 return "org.openoffice.comp.svt.ImageMapPolygonObject";
380 case IMapObjectType::Circle
:
381 return "org.openoffice.comp.svt.ImageMapCircleObject";
382 case IMapObjectType::Rectangle
:
383 return "org.openoffice.comp.svt.ImageMapRectangleObject";
387 // overridden helpers from PropertySetHelper
388 void SvUnoImageMapObject::_setPropertyValues( const PropertyMapEntry
** ppEntries
, const Any
* pValues
)
394 switch( (*ppEntries
)->mnHandle
)
397 bOk
= *pValues
>>= maURL
;
400 bOk
= *pValues
>>= maAltText
;
402 case HANDLE_DESCRIPTION
:
403 bOk
= *pValues
>>= maDesc
;
406 bOk
= *pValues
>>= maTarget
;
409 bOk
= *pValues
>>= maName
;
411 case HANDLE_ISACTIVE
:
412 bOk
= *pValues
>>= mbIsActive
;
414 case HANDLE_BOUNDARY
:
415 bOk
= *pValues
>>= maBoundary
;
418 bOk
= *pValues
>>= maCenter
;
421 bOk
= *pValues
>>= mnRadius
;
424 bOk
= *pValues
>>= maPolygon
;
427 OSL_FAIL( "SvUnoImageMapObject::_setPropertyValues: unexpected property handle" );
432 throw IllegalArgumentException();
439 void SvUnoImageMapObject::_getPropertyValues( const PropertyMapEntry
** ppEntries
, Any
* pValues
)
443 switch( (*ppEntries
)->mnHandle
)
449 *pValues
<<= maAltText
;
451 case HANDLE_DESCRIPTION
:
455 *pValues
<<= maTarget
;
460 case HANDLE_ISACTIVE
:
461 *pValues
<<= mbIsActive
;
463 case HANDLE_BOUNDARY
:
464 *pValues
<<= maBoundary
;
467 *pValues
<<= maCenter
;
470 *pValues
<<= mnRadius
;
473 *pValues
<<= maPolygon
;
476 OSL_FAIL( "SvUnoImageMapObject::_getPropertyValues: unexpected property handle" );
486 Reference
< XNameReplace
> SAL_CALL
SvUnoImageMapObject::getEvents()
493 class SvUnoImageMap
: public WeakImplHelper
< XIndexContainer
, XServiceInfo
>
496 explicit SvUnoImageMap();
497 SvUnoImageMap( const ImageMap
& rMap
, const SvEventDescription
* pSupportedMacroItems
);
499 void fillImageMap( ImageMap
& rMap
) const;
500 /// @throws IllegalArgumentException
501 static SvUnoImageMapObject
* getObject( const Any
& aElement
);
504 virtual void SAL_CALL
insertByIndex( sal_Int32 Index
, const Any
& Element
) override
;
505 virtual void SAL_CALL
removeByIndex( sal_Int32 Index
) override
;
508 virtual void SAL_CALL
replaceByIndex( sal_Int32 Index
, const Any
& Element
) override
;
511 virtual sal_Int32 SAL_CALL
getCount( ) override
;
512 virtual Any SAL_CALL
getByIndex( sal_Int32 Index
) override
;
515 virtual Type SAL_CALL
getElementType( ) override
;
516 virtual sal_Bool SAL_CALL
hasElements( ) override
;
519 virtual OUString SAL_CALL
getImplementationName( ) override
;
520 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
521 virtual Sequence
< OUString
> SAL_CALL
getSupportedServiceNames( ) override
;
526 std::vector
< rtl::Reference
<SvUnoImageMapObject
> > maObjectList
;
531 SvUnoImageMap::SvUnoImageMap()
535 SvUnoImageMap::SvUnoImageMap( const ImageMap
& rMap
, const SvEventDescription
* pSupportedMacroItems
)
537 maName
= rMap
.GetName();
539 const std::size_t nCount
= rMap
.GetIMapObjectCount();
540 for( std::size_t nPos
= 0; nPos
< nCount
; nPos
++ )
542 IMapObject
* pMapObject
= rMap
.GetIMapObject( nPos
);
543 rtl::Reference
<SvUnoImageMapObject
> xUnoObj
= new SvUnoImageMapObject( *pMapObject
, pSupportedMacroItems
);
544 maObjectList
.push_back( xUnoObj
);
548 SvUnoImageMapObject
* SvUnoImageMap::getObject( const Any
& aElement
)
550 Reference
< XInterface
> xObject
;
551 aElement
>>= xObject
;
553 SvUnoImageMapObject
* pObject
= dynamic_cast<SvUnoImageMapObject
*>( xObject
.get() );
554 if( nullptr == pObject
)
555 throw IllegalArgumentException();
561 void SAL_CALL
SvUnoImageMap::insertByIndex( sal_Int32 nIndex
, const Any
& Element
)
563 SvUnoImageMapObject
* pObject
= getObject( Element
);
564 const sal_Int32 nCount
= maObjectList
.size();
565 if( nullptr == pObject
|| nIndex
> nCount
)
566 throw IndexOutOfBoundsException();
568 if( nIndex
== nCount
)
569 maObjectList
.emplace_back(pObject
);
572 auto aIter
= maObjectList
.begin();
573 std::advance(aIter
, nIndex
);
574 maObjectList
.insert( aIter
, pObject
);
578 void SAL_CALL
SvUnoImageMap::removeByIndex( sal_Int32 nIndex
)
580 const sal_Int32 nCount
= maObjectList
.size();
581 if( nIndex
>= nCount
)
582 throw IndexOutOfBoundsException();
584 if( nCount
- 1 == nIndex
)
586 maObjectList
.pop_back();
590 auto aIter
= maObjectList
.begin();
591 std::advance(aIter
, nIndex
);
592 maObjectList
.erase( aIter
);
597 void SAL_CALL
SvUnoImageMap::replaceByIndex( sal_Int32 nIndex
, const Any
& Element
)
599 SvUnoImageMapObject
* pObject
= getObject( Element
);
600 const sal_Int32 nCount
= maObjectList
.size();
601 if( nullptr == pObject
|| nIndex
>= nCount
)
602 throw IndexOutOfBoundsException();
604 auto aIter
= maObjectList
.begin();
605 std::advance(aIter
, nIndex
);
610 sal_Int32 SAL_CALL
SvUnoImageMap::getCount( )
612 return maObjectList
.size();
615 Any SAL_CALL
SvUnoImageMap::getByIndex( sal_Int32 nIndex
)
617 const sal_Int32 nCount
= maObjectList
.size();
618 if( nIndex
>= nCount
)
619 throw IndexOutOfBoundsException();
621 auto aIter
= maObjectList
.begin();
622 std::advance(aIter
, nIndex
);
624 Reference
< XPropertySet
> xObj( *aIter
);
629 Type SAL_CALL
SvUnoImageMap::getElementType( )
631 return cppu::UnoType
<XPropertySet
>::get();
634 sal_Bool SAL_CALL
SvUnoImageMap::hasElements( )
636 return (!maObjectList
.empty());
640 OUString SAL_CALL
SvUnoImageMap::getImplementationName( )
642 return "org.openoffice.comp.svt.SvUnoImageMap";
645 sal_Bool SAL_CALL
SvUnoImageMap::supportsService( const OUString
& ServiceName
)
647 return cppu::supportsService(this, ServiceName
);
650 Sequence
< OUString
> SAL_CALL
SvUnoImageMap::getSupportedServiceNames( )
652 return { "com.sun.star.image.ImageMap" };
655 void SvUnoImageMap::fillImageMap( ImageMap
& rMap
) const
657 rMap
.ClearImageMap();
659 rMap
.SetName( maName
);
661 for (auto const& elem
: maObjectList
)
663 std::unique_ptr
<IMapObject
> pNewMapObject
= elem
->createIMapObject();
664 rMap
.InsertIMapObject( std::move(pNewMapObject
) );
669 // factory helper methods
672 Reference
< XInterface
> SvUnoImageMapRectangleObject_createInstance( const SvEventDescription
* pSupportedMacroItems
)
674 return getXWeak(new SvUnoImageMapObject( IMapObjectType::Rectangle
, pSupportedMacroItems
));
677 Reference
< XInterface
> SvUnoImageMapCircleObject_createInstance( const SvEventDescription
* pSupportedMacroItems
)
679 return getXWeak(new SvUnoImageMapObject( IMapObjectType::Circle
, pSupportedMacroItems
));
682 Reference
< XInterface
> SvUnoImageMapPolygonObject_createInstance( const SvEventDescription
* pSupportedMacroItems
)
684 return getXWeak(new SvUnoImageMapObject( IMapObjectType::Polygon
, pSupportedMacroItems
));
687 Reference
< XInterface
> SvUnoImageMap_createInstance()
689 return getXWeak(new SvUnoImageMap
);
692 Reference
< XInterface
> SvUnoImageMap_createInstance( const ImageMap
& rMap
, const SvEventDescription
* pSupportedMacroItems
)
694 return getXWeak(new SvUnoImageMap( rMap
, pSupportedMacroItems
));
697 bool SvUnoImageMap_fillImageMap( const Reference
< XInterface
>& xImageMap
, ImageMap
& rMap
)
699 SvUnoImageMap
* pUnoImageMap
= dynamic_cast<SvUnoImageMap
*>( xImageMap
.get() );
700 if( nullptr == pUnoImageMap
)
703 pUnoImageMap
->fillImageMap( rMap
);
707 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */