20#ifndef INCLUDED_COMPHELPER_NUMBEREDCOLLECTION_HXX
21#define INCLUDED_COMPHELPER_NUMBEREDCOLLECTION_HXX
25#include <com/sun/star/uno/Reference.h>
26#include <com/sun/star/frame/XUntitledNumbers.hpp>
31#include <unordered_map>
48 public ::cppu::WeakImplHelper< css::frame::XUntitledNumbers >
56 css::uno::WeakReference< css::uno::XInterface >
xItem;
60 typedef std::unordered_map<
92 void setOwner (
const css::uno::Reference< css::uno::XInterface >& xOwner);
104 void setUntitledPrefix(
const OUString&
sPrefix);
108 virtual ::sal_Int32 SAL_CALL leaseNumber(
const css::uno::Reference< css::uno::XInterface >& xComponent)
override;
112 virtual void SAL_CALL releaseNumber(::sal_Int32 nNumber)
override;
116 virtual void SAL_CALL releaseNumberForComponent(
const css::uno::Reference< css::uno::XInterface >& xComponent)
override;
120 virtual OUString SAL_CALL getUntitledPrefix()
override;
143 ::sal_Int32 impl_searchFreeNumber ();
159 css::uno::WeakReference< css::uno::XInterface >
m_xOwner;
defines a collection of UNO components, where every component will get its own unique number.
OUString m_sUntitledPrefix
localized string to be used for untitled components
TNumberedItemHash m_lComponents
cache of all "leased numbers" and its bound components
css::uno::WeakReference< css::uno::XInterface > m_xOwner
used as source of broadcasted messages or exceptions (can be null !)
std::unordered_map< sal_IntPtr, TNumberedItem > TNumberedItemHash
::std::vector< sal_IntPtr > TDeadItemList
#define COMPHELPER_DLLPUBLIC
css::uno::WeakReference< css::uno::XInterface > xItem