20 #include <com/sun/star/uno/Sequence.hxx>
38 for(sal_uInt16
i(0);
i < 32;
i++)
48 css::uno::Sequence< sal_Int8 >
aSeq;
49 if( !(rAny >>= aSeq) )
52 sal_Int16
nCount =
static_cast<sal_Int16
>(aSeq.getLength());
57 for( nIndex = 0; nIndex < nCount; nIndex++ )
62 for( ; nIndex < 32; nIndex++ )
69 maName(rNewName), pModel(nullptr), nID(nNewID)
94 return (
nID == rCmpLayer.
nID
101 maControlLayerName(
"controls")
108 maControlLayerName(
"controls")
110 *
this = rSrcLayerAdmin;
124 if (
this != &rSrcLayerAdmin)
130 for (i=0; i<nCount; i++) {
139 if (pNewModelel!=
pModel) {
143 for (i=0; i<nCount; i++) {
162 maLayers.push_back(std::move(pLayer));
170 std::unique_ptr<SdrLayer> pRetLayer = std::move(
maLayers[nPos]);
182 maLayers.push_back(std::unique_ptr<SdrLayer>(pLay));
192 if (pLayer!=
nullptr) {
194 [&](
const std::unique_ptr<SdrLayer> &
p) {
return p.get() == pLayer; });
214 if (rName ==
GetLayer(i)->GetName())
232 if (pLay!=
nullptr) nRet=pLay->
GetID();
238 for (
auto const & pLayer :
maLayers)
239 if (pLayer->GetID() == nID)
285 for(
auto & pCurrentLayer :
maLayers )
287 if ( pCurrentLayer->IsVisibleODF() )
288 rOutSet.
Set( pCurrentLayer->GetID() );
295 for(
auto & pCurrentLayer :
maLayers )
297 if ( pCurrentLayer->IsPrintableODF() )
298 rOutSet.
Set( pCurrentLayer->GetID() );
305 for(
auto& pCurrentLayer :
maLayers )
307 if ( pCurrentLayer->IsLockedODF() )
308 rOutSet.
Set( pCurrentLayer->GetID() );
326 sal_uInt16 nLayerPos = 0;
327 sal_uInt16 nLayerIndex = 0;
328 for(
const auto& pCurrentLayer :
maLayers )
330 SdrLayerID nCurrentID = pCurrentLayer->GetID();
331 if ( rViewLayerSet.
IsSet(nCurrentID) )
333 nLayerPos = nLayerIndex;
334 nByteIndex = nLayerPos / 8;
337 nBitpos = nLayerPos % 8;
338 aTmp[nByteIndex] |= (1 << nBitpos);
349 nNumBytesSet = nIndex + 1;
353 css::uno::Sequence< sal_Int8 >
aSeq( nNumBytesSet );
void operator&=(const SdrLayerIDSet &r2ndSet)
void PutValue(const css::uno::Any &rAny)
initialize this set with a UNO sequence of sal_Int8 (e.g.
void getVisibleLayersODF(SdrLayerIDSet &rOutSet) const
SdrLayerAdmin(SdrLayerAdmin *pNewParent=nullptr)
#define SDRLAYERPOS_NOTFOUND
sal_uInt16 GetLayerPos(const SdrLayer *pLayer) const
std::unique_ptr< SdrLayer > RemoveLayer(sal_uInt16 nPos)
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
void SetModel(SdrModel *pNewModel)
void getLockedLayersODF(SdrLayerIDSet &rOutSet) const
SdrLayerAdmin & operator=(const SdrLayerAdmin &rSrcLayerAdmin)
SdrLayerID GetUniqueLayerID() const
void SetName(const OUString &rNewName)
constexpr SdrLayerID SDRLAYER_NOTFOUND(0xff)
virtual void SetChanged(bool bFlg=true)
o3tl::strong_int< sal_uInt8, struct SdrLayerIDTag > SdrLayerID
SdrLayer * GetLayer(sal_uInt16 i)
sal_uInt16 GetLayerCount() const
bool operator==(const SdrLayer &rCmpLayer) const
SdrLayer * NewLayer(const OUString &rName, sal_uInt16 nPos=0xFFFF)
SdrLayer * GetLayerPerID(SdrLayerID nID)
bool IsSet(SdrLayerID a) const
void QueryValue(const SdrLayerIDSet &rViewLayerSet, css::uno::Any &rAny)
void InsertLayer(std::unique_ptr< SdrLayer > pLayer, sal_uInt16 nPos)
void getPrintableLayersODF(SdrLayerIDSet &rOutSet) const
void Broadcast(const SfxHint &rHint)
OUString maControlLayerName
std::vector< std::unique_ptr< SdrLayer > > maLayers
Sequence< sal_Int8 > aSeq
void SetControlLayerName(const OUString &rNewName)
void SetModel(SdrModel *pNewModel)
SdrLayer(SdrLayerID nNewID, const OUString &rNewName)
SdrLayerID GetLayerID(const OUString &rName) const