27#include <osl/diagnose.h>
28#include <com/sun/star/awt/XBitmap.hpp>
29#include <com/sun/star/beans/PropertyAttribute.hpp>
40#include <bitmaps.hlst>
41#include <unonames.hxx>
48 SCSTR_CONTENT_RANGENAME,
59 return aLinkTargetMap_Impl;
72 pDocShell->GetDocument().AddUnoObject(*
this);
88 if ( rHint.
GetId() == SfxHintId::Dying )
103 throw container::NoSuchElementException();
109 OUString* pArray = aRet.getArray();
153 if ( rHint.
GetId() == SfxHintId::Dying )
161 uno::Reference< container::XNameAccess > xCollection;
177 OSL_FAIL(
"invalid type");
183 if ( xCollection.is() )
205 RID_BMP_CONTENT_TABLE,
206 RID_BMP_CONTENT_RANGENAME,
207 RID_BMP_CONTENT_DBAREA,
208 RID_BMP_CONTENT_GRAPHIC,
209 RID_BMP_CONTENT_OLEOBJECT,
210 RID_BMP_CONTENT_NOTE,
211 RID_BMP_CONTENT_AREALINK,
212 RID_BMP_CONTENT_DRAWING
251 xCollection(
std::move( xColl ))
253 OSL_ENSURE( xCollection.is(),
"ScLinkTargetsObj: NULL" );
264 uno::Reference<beans::XPropertySet> xProp(
xCollection->getByName(
aName), uno::UNO_QUERY);
268 throw container::NoSuchElementException();
const ScDocument & GetDocument() const
void AddUnoObject(SfxListener &rObject)
void RemoveUnoObject(SfxListener &rObject)
virtual ~ScLinkTargetTypeObj() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks() override
static void SetLinkTargetBitmap(css::uno::Any &rRet, sal_uInt16 nType)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
ScLinkTargetTypeObj(ScDocShell *pDocSh, sal_uInt16 nT)
Graphic / OleObject (need separate collections!)
virtual ~ScLinkTargetTypesObj() override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
OUString aNames[SC_LINKTARGETTYPE_COUNT]
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual ~ScLinkTargetsObj() override
css::uno::Reference< css::container::XNameAccess > xCollection
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
static css::uno::Reference< css::awt::XBitmap > CreateBitmap(const BitmapEx &rBitmap)
css::uno::Type const & get()
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
OUString ScResId(TranslateId aId)
constexpr rtl::OUStringConstExpr aContentBmps[]
const TranslateId aTypeResIds[SC_LINKTARGETTYPE_COUNT]
static o3tl::span< const SfxItemPropertyMapEntry > lcl_GetLinkTargetMap()
#define SC_LINKTARGETTYPE_RANGENAME
#define SC_LINKTARGETTYPE_SHEET
#define SC_LINKTARGETTYPE_DBAREA
#define SC_LINKTARGETTYPE_COUNT
constexpr OUStringLiteral SC_UNO_LINKDISPBIT
constexpr OUStringLiteral SC_UNO_LINKDISPNAME