20#include <com/sun/star/uno/Sequence.hxx>
41 for(sal_uInt16
i(0);
i < 32;
i++)
51 css::uno::Sequence< sal_Int8 >
aSeq;
52 if( !(rAny >>=
aSeq) )
55 sal_Int16
nCount =
static_cast<sal_Int16
>(
aSeq.getLength());
72 maName(
std::move(aNewName)), pModel(nullptr), nID(nNewID)
97 return (
nID == rCmpLayer.
nID
104 maControlLayerName(
"controls")
111 maControlLayerName(
"controls")
113 *
this = rSrcLayerAdmin;
127 if (
this != &rSrcLayerAdmin)
142 if (pNewModelel!=
pModel) {
165 maLayers.push_back(std::move(pLayer));
173 std::unique_ptr<SdrLayer> pRetLayer = std::move(
maLayers[
nPos]);
185 maLayers.push_back(std::unique_ptr<SdrLayer>(pLay));
195 if (pLayer!=
nullptr) {
197 [&](
const std::unique_ptr<SdrLayer> &
p) { return p.get() == pLayer; });
235 if (pLay!=
nullptr) nRet=pLay->
GetID();
241 for (
auto const & pLayer :
maLayers)
242 if (pLayer->GetID() == nID)
288 for(
auto & pCurrentLayer :
maLayers )
290 if ( pCurrentLayer->IsVisibleODF() )
291 rOutSet.
Set( pCurrentLayer->GetID() );
298 for(
auto & pCurrentLayer :
maLayers )
300 if ( pCurrentLayer->IsPrintableODF() )
301 rOutSet.
Set( pCurrentLayer->GetID() );
308 for(
auto& pCurrentLayer :
maLayers )
310 if ( pCurrentLayer->IsLockedODF() )
311 rOutSet.
Set( pCurrentLayer->GetID() );
329 sal_uInt16 nLayerPos = 0;
330 sal_uInt16 nLayerIndex = 0;
331 for(
const auto& pCurrentLayer :
maLayers )
333 SdrLayerID nCurrentID = pCurrentLayer->GetID();
334 if ( rViewLayerSet.
IsSet(nCurrentID) )
336 nLayerPos = nLayerIndex;
337 nByteIndex = nLayerPos / 8;
340 nBitpos = nLayerPos % 8;
341 aTmp[nByteIndex] |= (1 << nBitpos);
352 nNumBytesSet =
nIndex + 1;
356 css::uno::Sequence< sal_Int8 >
aSeq( nNumBytesSet );
357 std::transform(aTmp, aTmp + nNumBytesSet,
aSeq.getArray(),
358 [](
const sal_uInt8 b) { return static_cast<sal_Int8>(b); });
OUString maControlLayerName
void SetControlLayerName(const OUString &rNewName)
std::unique_ptr< SdrLayer > RemoveLayer(sal_uInt16 nPos)
void InsertLayer(std::unique_ptr< SdrLayer > pLayer, sal_uInt16 nPos)
std::vector< std::unique_ptr< SdrLayer > > maLayers
SdrLayerAdmin(SdrLayerAdmin *pNewParent=nullptr)
void QueryValue(const SdrLayerIDSet &rViewLayerSet, css::uno::Any &rAny)
SdrLayer * NewLayer(const OUString &rName, sal_uInt16 nPos=0xFFFF)
void SetModel(SdrModel *pNewModel)
sal_uInt16 GetLayerCount() const
SdrLayerID GetUniqueLayerID() const
SdrLayer * GetLayerPerID(SdrLayerID nID)
void getPrintableLayersODF(SdrLayerIDSet &rOutSet) const
SdrLayerID GetLayerID(const OUString &rName) const
SdrLayer * GetLayer(sal_uInt16 i)
SdrLayerAdmin & operator=(const SdrLayerAdmin &rSrcLayerAdmin)
void getLockedLayersODF(SdrLayerIDSet &rOutSet) const
sal_uInt16 GetLayerPos(const SdrLayer *pLayer) const
void getVisibleLayersODF(SdrLayerIDSet &rOutSet) const
void operator&=(const SdrLayerIDSet &r2ndSet)
bool IsSet(SdrLayerID a) const
void PutValue(const css::uno::Any &rAny)
initialize this set with a UNO sequence of sal_Int8 (e.g.
bool operator==(const SdrLayer &rCmpLayer) const
SdrLayer(SdrLayerID nNewID, OUString aNewName)
void SetModel(SdrModel *pNewModel)
void SetName(const OUString &rNewName)
virtual void SetChanged(bool bFlg=true)
void Broadcast(const SfxHint &rHint)
virtual OUString GetName() const override
Sequence< sal_Int8 > aSeq
#define SDRLAYERPOS_NOTFOUND
o3tl::strong_int< sal_Int16, struct SdrLayerIDTag > SdrLayerID
constexpr SdrLayerID SDRLAYER_NOTFOUND(-1)