diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-10 13:52:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-12 09:54:23 +0200 |
commit | a651dbcfca9e198b5c2561076961504586bc6bea (patch) | |
tree | 812eee16af9bc3c4c75b8b45a4c126f99ad1bab3 /sd | |
parent | 9b5ce4023d35c4cc82f7b17e79b8fedbcb1367dd (diff) |
convert SdrLayerId to strong_int
Also
- rename SetOfByte to SdrLayerIDSet
- add asserts in SdrLayerAdmin::GetUniqueLayerID so that we don't
allocate overlapping SdrLayerID values
- add a new constant SDRLAYERPOS_NOTFOUND to be returned from
SdrLayerAdmin::GetLayerPos
Change-Id: I3bb3489f9338e3d02c4040bcbd811744699941c8
Reviewed-on: https://gerrit.libreoffice.org/37467
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
36 files changed, 140 insertions, 140 deletions
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 3431ba90b026..baa71139cce2 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -1346,9 +1346,9 @@ sal_uInt16 SdDrawDocument::DuplicatePage (sal_uInt16 nPageNum) // Get background flags SdrLayerAdmin& rLayerAdmin = GetLayerAdmin(); - sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); - SetOfByte aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerIDSet aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers(); return DuplicatePage ( pActualPage, ePageKind, @@ -1490,9 +1490,9 @@ void SdDrawDocument::SetupNewPage ( if (pPreviousPage != nullptr) { SdrLayerAdmin& rLayerAdmin = GetLayerAdmin(); - sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); - SetOfByte aVisibleLayers = pPreviousPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerIDSet aVisibleLayers = pPreviousPage->TRG_GetMasterPageVisibleLayers(); aVisibleLayers.Set(aBckgrnd, bIsPageBack); aVisibleLayers.Set(aBckgrndObj, bIsPageObj); pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index d0220f6b631f..f334f155d2e3 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1691,13 +1691,13 @@ void SdPage::NbcInsertObject(SdrObject* pObj, size_t nPos) SdrLayerID nId = pObj->GetLayer(); if( mbMaster ) { - if( nId == 0 ) - pObj->NbcSetLayer( 2 ); // wrong layer. corrected to BackgroundObj layer + if( nId == SdrLayerID(0) ) + pObj->NbcSetLayer( SdrLayerID(2) ); // wrong layer. corrected to BackgroundObj layer } else { - if( nId == 2 ) - pObj->NbcSetLayer( 0 ); // wrong layer. corrected to layout layer + if( nId == SdrLayerID(2) ) + pObj->NbcSetLayer( SdrLayerID(0) ); // wrong layer. corrected to layout layer } } diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 8af77d0965f8..0101a5243034 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -1519,7 +1519,7 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const bool bNewAnimations { if(pPage->TRG_HasMasterPage()) { - SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); aVisibleLayers.Set(mnBackgroundObjectsLayerID, false); pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); } diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx index 3d77b676884b..a62a59603403 100644 --- a/sd/source/ui/dlg/LayerTabBar.cxx +++ b/sd/source/ui/dlg/LayerTabBar.cxx @@ -128,9 +128,9 @@ sal_Int8 LayerTabBar::AcceptDrop( const AcceptDropEvent& rEvt ) if( !pDrViewSh->GetDocSh()->IsReadOnly() ) { - sal_uInt16 nPageId = SDRPAGE_NOTFOUND; - Point aPos( PixelToLogic( rEvt.maPosPixel ) ); - sal_uInt16 nLayerId = pDrViewSh->GetView()->GetDoc().GetLayerAdmin().GetLayerID( + sal_uInt16 nPageId = SDRPAGE_NOTFOUND; + Point aPos( PixelToLogic( rEvt.maPosPixel ) ); + SdrLayerID nLayerId = pDrViewSh->GetView()->GetDoc().GetLayerAdmin().GetLayerID( GetPageText( GetPageId( aPos ) ) ); nRet = pDrViewSh->AcceptDrop( rEvt, *this, nullptr, nPageId, nLayerId ); @@ -146,8 +146,8 @@ sal_Int8 LayerTabBar::AcceptDrop( const AcceptDropEvent& rEvt ) */ sal_Int8 LayerTabBar::ExecuteDrop( const ExecuteDropEvent& rEvt ) { - sal_uInt16 nPageId = SDRPAGE_NOTFOUND; - sal_uInt16 nLayerId = pDrViewSh->GetView()->GetDoc().GetLayerAdmin().GetLayerID( + sal_uInt16 nPageId = SDRPAGE_NOTFOUND; + SdrLayerID nLayerId = pDrViewSh->GetView()->GetDoc().GetLayerAdmin().GetLayerID( GetPageText( GetPageId( PixelToLogic( rEvt.maPosPixel ) ) ) ); sal_Int8 nRet = pDrViewSh->ExecuteDrop( rEvt, *this, nullptr, nPageId, nLayerId ); diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index 404b3be53d65..d82d59beca5f 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -603,7 +603,7 @@ bool FuDraw::SetPointer(SdrObject* pObj, const Point& rPos) if (bAnimationInfo || bImageMapInfo) { - const SetOfByte* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers(); + const SdrLayerIDSet* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers(); sal_uInt16 nHitLog(sal_uInt16 (mpWindow->PixelToLogic(Size(HITPIX,0)).Width())); long n2HitLog(nHitLog * 2); Point aHitPosR(rPos); diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx index f49a3885a844..c89b10289879 100644 --- a/sd/source/ui/func/fuexpand.cxx +++ b/sd/source/ui/func/fuexpand.cxx @@ -99,7 +99,7 @@ void FuExpandPage::DoExecute( SfxRequest& ) pOutl->SetDefTab( mpDoc->GetDefaultTabulator() ); pOutl->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(mpDoc->GetStyleSheetPool())); - SetOfByte aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerIDSet aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers(); sal_uInt16 nActualPageNum = pActualPage->GetPageNum(); SdPage* pActualNotesPage = static_cast<SdPage*>(mpDoc->GetPage(nActualPageNum + 1)); SdrTextObj* pActualOutline = static_cast<SdrTextObj*>(pActualPage->GetPresObj(PRESOBJ_OUTLINE)); diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 846b2e208cc5..29e0e4490ce7 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -1202,7 +1202,7 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) bFilled = rFillStyle.GetValue() != drawing::FillStyle_NONE; } - const SetOfByte* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers(); + const SdrLayerIDSet* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers(); sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); const long n2HitLog = nHitLog * 2; Point aHitPosR(rPos); diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx index e6a63b0f654e..e6377d7d1b1d 100644 --- a/sd/source/ui/func/fusumry.cxx +++ b/sd/source/ui/func/fusumry.cxx @@ -116,7 +116,7 @@ void FuSummaryPage::DoExecute( SfxRequest& ) bBegUndo = true; } - SetOfByte aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerIDSet aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers(); // page with title & structuring! pSummaryPage = mpDoc->AllocSdPage(false); diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index d42b514753d3..3b5377deb9f4 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -283,9 +283,9 @@ public: bool IsLayerModeActive() const { return mbIsLayerModeActive;} virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper, - ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer ) override; + ::sd::Window* pTargetWindow, sal_uInt16 nPage, SdrLayerID nLayer ) override; virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTargetHelper, - ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer ) override; + ::sd::Window* pTargetWindow, sal_uInt16 nPage, SdrLayerID nLayer ) override; virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override; virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override; diff --git a/sd/source/ui/inc/FrameView.hxx b/sd/source/ui/inc/FrameView.hxx index 4ae22cc04c2d..6186a363f146 100644 --- a/sd/source/ui/inc/FrameView.hxx +++ b/sd/source/ui/inc/FrameView.hxx @@ -55,17 +55,17 @@ public: { maHandoutHelpLines = rHelpLines; } const SdrHelpLineList& GetHandoutHelpLines() { return maHandoutHelpLines; } - void SetVisibleLayers(const SetOfByte& rVisibleLayers) + void SetVisibleLayers(const SdrLayerIDSet& rVisibleLayers) { maVisibleLayers = rVisibleLayers; } - const SetOfByte& GetVisibleLayers() { return maVisibleLayers; } + const SdrLayerIDSet& GetVisibleLayers() { return maVisibleLayers; } - void SetLockedLayers(const SetOfByte& rLockedLayers) + void SetLockedLayers(const SdrLayerIDSet& rLockedLayers) { maLockedLayers = rLockedLayers; } - const SetOfByte& GetLockedLayers() { return maLockedLayers; } + const SdrLayerIDSet& GetLockedLayers() { return maLockedLayers; } - void SetPrintableLayers(const SetOfByte& rPrintableLayers) + void SetPrintableLayers(const SdrLayerIDSet& rPrintableLayers) { maPrintableLayers = rPrintableLayers; } - const SetOfByte& GetPrintableLayers() { return maPrintableLayers; } + const SdrLayerIDSet& GetPrintableLayers() { return maPrintableLayers; } void SetRuler(const bool bRulerOn) { mbRuler = bRulerOn; } @@ -171,9 +171,9 @@ public: private: sal_uInt16 mnRefCount; bool mbRuler; - SetOfByte maVisibleLayers; - SetOfByte maLockedLayers; - SetOfByte maPrintableLayers; + SdrLayerIDSet maVisibleLayers; + SdrLayerIDSet maLockedLayers; + SdrLayerIDSet maPrintableLayers; SdrHelpLineList maStandardHelpLines; SdrHelpLineList maNotesHelpLines; SdrHelpLineList maHandoutHelpLines; diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx index 27a17bb07a81..7bbd68a47510 100644 --- a/sd/source/ui/inc/OutlineView.hxx +++ b/sd/source/ui/inc/OutlineView.hxx @@ -128,12 +128,12 @@ public: DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer) override; + SdrLayerID nLayer) override; virtual sal_Int8 ExecuteDrop ( const ExecuteDropEvent& rEvt, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer) override; + SdrLayerID nLayer) override; // Re-implement GetScriptType for this view to get correct results virtual SvtScriptType GetScriptType() const override; diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx index c29b295bfb16..5f3e4c284756 100644 --- a/sd/source/ui/inc/SlideSorterViewShell.hxx +++ b/sd/source/ui/inc/SlideSorterViewShell.hxx @@ -140,13 +140,13 @@ public: DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer ) override; + SdrLayerID nLayer ) override; virtual sal_Int8 ExecuteDrop ( const ExecuteDropEvent& rEvt, DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer) override; + SdrLayerID nLayer) override; typedef ::std::vector<SdPage*> PageSelection; diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx index 58915b3e5149..d1fda4c1d417 100644 --- a/sd/source/ui/inc/View.hxx +++ b/sd/source/ui/inc/View.hxx @@ -102,12 +102,12 @@ public: DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer); + SdrLayerID nLayer); virtual sal_Int8 ExecuteDrop ( const ExecuteDropEvent& rEvt, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer); + SdrLayerID nLayer); css::uno::Reference<css::datatransfer::XTransferable> CreateClipboardDataObject (); @@ -135,7 +135,7 @@ public: bool InsertData( const TransferableDataHelper& rDataHelper, const Point& rPos, sal_Int8& rDnDAction, bool bDrag, SotClipboardFormatId nFormat = SotClipboardFormatId::NONE, - sal_uInt16 nPage = SDRPAGE_NOTFOUND, sal_uInt16 nLayer = SDRLAYER_NOTFOUND ); + sal_uInt16 nPage = SDRPAGE_NOTFOUND, SdrLayerID nLayer = SDRLAYER_NOTFOUND ); /** gets the metafile from the given transferable helper and insert it as a graphic shape. @param bOptimize if set to true, the metafile is analyzed and if only one bitmap action is present, then is inserted as a single graphic. diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 7fcc96cdff92..e736bb1982d9 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -273,9 +273,9 @@ public: void GetMenuState(SfxItemSet& rSet); virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper, - ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer ); + ::sd::Window* pTargetWindow, sal_uInt16 nPage, SdrLayerID nLayer ); virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTargetHelper, - ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer ); + ::sd::Window* pTargetWindow, sal_uInt16 nPage, SdrLayerID nLayer ); virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ); virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ); diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index 51ec16651ba1..93159a16beae 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -467,9 +467,9 @@ SfxRequest LayoutMenu::CreateRequest ( do { SdrLayerAdmin& rLayerAdmin (mrBase.GetDocument()->GetLayerAdmin()); - sal_uInt8 aBackground (rLayerAdmin.GetLayerID( + SdrLayerID aBackground (rLayerAdmin.GetLayerID( SD_RESSTR(STR_LAYER_BCKGRND))); - sal_uInt8 aBackgroundObject (rLayerAdmin.GetLayerID( + SdrLayerID aBackgroundObject (rLayerAdmin.GetLayerID( SD_RESSTR(STR_LAYER_BCKGRNDOBJ))); ViewShell* pViewShell = mrBase.GetMainViewShell().get(); if (pViewShell == nullptr) @@ -478,7 +478,7 @@ SfxRequest LayoutMenu::CreateRequest ( if (pPage == nullptr) break; - SetOfByte aVisibleLayers (pPage->TRG_GetMasterPageVisibleLayers()); + SdrLayerIDSet aVisibleLayers (pPage->TRG_GetMasterPageVisibleLayers()); aRequest.AppendItem( SfxStringItem (ID_VAL_PAGENAME, OUString()));//pPage->GetName())); diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index d69a340e67d0..4f3d4d23e5c8 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -632,7 +632,7 @@ sal_Int8 Clipboard::AcceptDrop ( DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer) + SdrLayerID nLayer) { sal_Int8 nAction (DND_ACTION_NONE); @@ -700,7 +700,7 @@ sal_Int8 Clipboard::ExecuteDrop ( DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer) + SdrLayerID nLayer) { sal_Int8 nResult = DND_ACTION_NONE; mxUndoContext.reset(); @@ -886,7 +886,7 @@ sal_Int8 Clipboard::ExecuteOrAcceptShapeDrop ( DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer) + SdrLayerID nLayer) { sal_Int8 nResult = 0; diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index b4dfa803e5db..aef29161a600 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -946,9 +946,9 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri // Undo SdPage* pUndoPage = pPageToRename; SdrLayerAdmin & rLayerAdmin = pDocument->GetLayerAdmin(); - sal_uInt8 nBackground = rLayerAdmin.GetLayerID( SD_RESSTR( STR_LAYER_BCKGRND ) ); - sal_uInt8 nBgObj = rLayerAdmin.GetLayerID( SD_RESSTR( STR_LAYER_BCKGRNDOBJ ) ); - SetOfByte aVisibleLayers = pPageToRename->TRG_GetMasterPageVisibleLayers(); + SdrLayerID nBackground = rLayerAdmin.GetLayerID( SD_RESSTR( STR_LAYER_BCKGRND ) ); + SdrLayerID nBgObj = rLayerAdmin.GetLayerID( SD_RESSTR( STR_LAYER_BCKGRNDOBJ ) ); + SdrLayerIDSet aVisibleLayers = pPageToRename->TRG_GetMasterPageVisibleLayers(); // (#67720#) ModifyPageUndoAction* pAction = new ModifyPageUndoAction( diff --git a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx index bc0ce0836174..03d981e3c957 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx @@ -92,14 +92,14 @@ public: DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer ); + SdrLayerID nLayer ); sal_Int8 ExecuteDrop ( const ExecuteDropEvent& rEvt, DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer ); + SdrLayerID nLayer ); void Abort(); @@ -215,7 +215,7 @@ private: DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer); + SdrLayerID nLayer); /** Return whether the insertion defined by the transferable is trivial, ie would not change either source nor target document. diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 1f015f1ae9bc..ef7d146c8d9d 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -643,7 +643,7 @@ sal_Int8 SlideSorterViewShell::AcceptDrop ( DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer) + SdrLayerID nLayer) { OSL_ASSERT(mpSlideSorter.get()!=nullptr); return mpSlideSorter->GetController().GetClipboard().AcceptDrop ( @@ -659,7 +659,7 @@ sal_Int8 SlideSorterViewShell::ExecuteDrop ( DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer) + SdrLayerID nLayer) { OSL_ASSERT(mpSlideSorter.get()!=nullptr); return mpSlideSorter->GetController().GetClipboard().ExecuteDrop ( diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx index 3ce581a80ef7..aa2d98380918 100644 --- a/sd/source/ui/unoidl/unolayer.cxx +++ b/sd/source/ui/unoidl/unolayer.cxx @@ -351,7 +351,7 @@ void SdLayer::set( LayerAttribute what, bool flag ) throw() if(pFrameView) { - SetOfByte aNewLayers; + SdrLayerIDSet aNewLayers; switch(what) { case VISIBLE: aNewLayers = pFrameView->GetVisibleLayers(); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index b86bb4f8b30e..b5c478e549f1 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -468,8 +468,8 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate ) { sal_uInt16 nPageCount = mpDoc->GetSdPageCount( PageKind::Standard ); SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin(); - sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); SdPage* pStandardPage = nullptr; @@ -486,7 +486,7 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate ) { // here we determine the page after which we should insert SdPage* pPreviousStandardPage = mpDoc->GetSdPage( std::min( (sal_uInt16)(nPageCount - 1), nPage ), PageKind::Standard ); - SetOfByte aVisibleLayers = pPreviousStandardPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerIDSet aVisibleLayers = pPreviousStandardPage->TRG_GetMasterPageVisibleLayers(); bool bIsPageBack = aVisibleLayers.IsSet( aBckgrnd ); bool bIsPageObj = aVisibleLayers.IsSet( aBckgrndObj ); @@ -1824,7 +1824,7 @@ bool ImplRenderPaintProc::IsVisible( const SdrObject* pObj ) const SdrLayerID nLayerId = pObj->GetLayer(); if( pSdrPageView ) { - const SdrLayer* pSdrLayer = rLayerAdmin.GetLayer( nLayerId ); + const SdrLayer* pSdrLayer = rLayerAdmin.GetLayerPerID( nLayerId ); if ( pSdrLayer ) { OUString aLayerName = pSdrLayer->GetName(); @@ -1839,7 +1839,7 @@ bool ImplRenderPaintProc::IsPrintable( const SdrObject* pObj ) const SdrLayerID nLayerId = pObj->GetLayer(); if( pSdrPageView ) { - const SdrLayer* pSdrLayer = rLayerAdmin.GetLayer( nLayerId ); + const SdrLayer* pSdrLayer = rLayerAdmin.GetLayerPerID( nLayerId ); if ( pSdrLayer ) { OUString aLayerName = pSdrLayer->GetName(); diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index d865abc448e4..72a4025470e7 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -792,7 +792,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName if( pDoc->GetMasterPageCount() ) { SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin(); - SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); aVisibleLayers.Set(rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)), bVisible); pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); } @@ -812,7 +812,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName if( pDoc->GetMasterPageCount() ) { SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin(); - SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); aVisibleLayers.Set(rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)), bVisible); pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); } @@ -1217,7 +1217,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) if( pDoc->GetMasterPageCount() ) { SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin(); - SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); aAny <<= aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND))); } else @@ -1236,7 +1236,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) if( pDoc->GetMasterPageCount() ) { SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin(); - SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); aAny <<= aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ))); } else diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index f1c6d3186a0d..9d29bcac5c99 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -292,8 +292,8 @@ namespace { SdPage& rPage, View* pView, const bool bPrintMarkedOnly, - const SetOfByte& rVisibleLayers, - const SetOfByte& rPrintableLayers) + const SdrLayerIDSet& rVisibleLayers, + const SdrLayerIDSet& rPrintableLayers) { rPrintView.ShowSdrPage(&rPage); @@ -698,8 +698,8 @@ namespace { ViewShell& rViewShell, View* pView, DrawView& rPrintView, - const SetOfByte& rVisibleLayers, - const SetOfByte& rPrintableLayers) const = 0; + const SdrLayerIDSet& rVisibleLayers, + const SdrLayerIDSet& rPrintableLayers) const = 0; DrawModeFlags GetDrawMode() const { return mnDrawMode; } Orientation GetOrientation() const { return meOrientation; } @@ -744,8 +744,8 @@ namespace { ViewShell& rViewShell, View* pView, DrawView& rPrintView, - const SetOfByte& rVisibleLayers, - const SetOfByte& rPrintableLayers) const override + const SdrLayerIDSet& rVisibleLayers, + const SdrLayerIDSet& rPrintableLayers) const override { (void)rViewShell; SdPage* pPageToPrint = rDocument.GetSdPage(mnPageIndex, mePageKind); @@ -795,8 +795,8 @@ namespace { ViewShell& rViewShell, View* pView, DrawView& rPrintView, - const SetOfByte& rVisibleLayers, - const SetOfByte& rPrintableLayers) const override + const SdrLayerIDSet& rVisibleLayers, + const SdrLayerIDSet& rPrintableLayers) const override { (void)rViewShell; SdPage* pPageToPrint = rDocument.GetSdPage(mnPageIndex, mePageKind); @@ -878,8 +878,8 @@ namespace { ViewShell& rViewShell, View* pView, DrawView& rPrintView, - const SetOfByte& rVisibleLayers, - const SetOfByte& rPrintableLayers) const override + const SdrLayerIDSet& rVisibleLayers, + const SdrLayerIDSet& rPrintableLayers) const override { (void)rViewShell; MapMode aMap (maMap); @@ -948,8 +948,8 @@ namespace { ViewShell& rViewShell, View* pView, DrawView& rPrintView, - const SetOfByte& rVisibleLayers, - const SetOfByte& rPrintableLayers) const override + const SdrLayerIDSet& rVisibleLayers, + const SdrLayerIDSet& rPrintableLayers) const override { SdPage& rHandoutPage (*rDocument.GetSdPage(0, PageKind::Handout)); @@ -1094,8 +1094,8 @@ namespace { ViewShell& rViewShell, View* pView, DrawView& rPrintView, - const SetOfByte& rVisibleLayers, - const SetOfByte& rPrintableLayers) const override + const SdrLayerIDSet& rVisibleLayers, + const SdrLayerIDSet& rPrintableLayers) const override { (void)rViewShell; (void)pView; diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx index 581c182049e3..5a9fca237af6 100644 --- a/sd/source/ui/view/ViewShellImplementation.cxx +++ b/sd/source/ui/view/ViewShellImplementation.cxx @@ -93,7 +93,7 @@ void ViewShell::Implementation::ProcessModifyPageSlot ( { SdDrawDocument* pDocument = mrViewShell.GetDoc(); SdrLayerAdmin& rLayerAdmin = pDocument->GetLayerAdmin(); - SetOfByte aVisibleLayers; + SdrLayerIDSet aVisibleLayers; bool bHandoutMode = false; SdPage* pHandoutMPage = nullptr; OUString aNewName; @@ -198,8 +198,8 @@ void ViewShell::Implementation::ProcessModifyPageSlot ( pCurrentPage->SetAutoLayout(aNewAutoLayout, true); - sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); aVisibleLayers.Set(aBckgrnd, bBVisible); aVisibleLayers.Set(aBckgrndObj, bBObjsVisible); pCurrentPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); @@ -259,10 +259,10 @@ void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind eP // Transform the given request into the four argument form that is // understood by ProcessModifyPageSlot(). SdrLayerAdmin& rLayerAdmin (mrViewShell.GetViewShellBase().GetDocument()->GetLayerAdmin()); - sal_uInt8 aBackground (rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND))); - sal_uInt8 aBackgroundObject (rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ))); + SdrLayerID aBackground (rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND))); + SdrLayerID aBackgroundObject (rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ))); - SetOfByte aVisibleLayers; + SdrLayerIDSet aVisibleLayers; if( pPage->GetPageKind() == PageKind::Handout ) aVisibleLayers.SetAll(); diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 2ea8063470ab..5007bfff0f52 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -1140,7 +1140,7 @@ void DrawViewShell::ResetActualLayer() // this is needed when one layer is renamed to // restore current layer sal_uInt16 nOldLayerCnt = pLayerBar->GetPageCount(); - sal_uInt16 nOldLayerId = pLayerBar->GetCurPageId(); + sal_uInt16 nOldLayerPos = pLayerBar->GetCurPageId(); /** * Update for LayerTab @@ -1154,17 +1154,17 @@ void DrawViewShell::ResetActualLayer() OUString aLayoutLayer = SD_RESSTR(STR_LAYER_LAYOUT); OUString aControlsLayer = SD_RESSTR(STR_LAYER_CONTROLS); OUString aMeasureLinesLayer = SD_RESSTR(STR_LAYER_MEASURELINES); - sal_uInt16 nActiveLayer = SDRLAYER_NOTFOUND; + sal_uInt16 nActiveLayerPos = SDRLAYERPOS_NOTFOUND; SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin(); sal_uInt16 nLayerCnt = rLayerAdmin.GetLayerCount(); - for ( sal_uInt16 nLayer = 0; nLayer < nLayerCnt; nLayer++ ) + for ( sal_uInt16 nLayerPos = 0; nLayerPos < nLayerCnt; nLayerPos++ ) { - aName = rLayerAdmin.GetLayer(nLayer)->GetName(); + aName = rLayerAdmin.GetLayer(nLayerPos)->GetName(); if ( aName == aActiveLayer ) { - nActiveLayer = nLayer; + nActiveLayerPos = nLayerPos; } if ( aName != aBackgroundLayer ) @@ -1176,7 +1176,7 @@ void DrawViewShell::ResetActualLayer() aName != aControlsLayer && aName != aMeasureLinesLayer) { - pLayerBar->InsertPage(nLayer+1, aName); + pLayerBar->InsertPage(nLayerPos+1, aName); TabBarPageBits nBits = 0; SdrPageView* pPV = mpDrawView->GetSdrPageView(); @@ -1187,7 +1187,7 @@ void DrawViewShell::ResetActualLayer() nBits = TPB_SPECIAL; } - pLayerBar->SetPageBits(nLayer+1, nBits); + pLayerBar->SetPageBits(nLayerPos+1, nBits); } } else @@ -1195,7 +1195,7 @@ void DrawViewShell::ResetActualLayer() // don't show masterpage layer onto the page if ( aName != aBackgroundObjLayer ) { - pLayerBar->InsertPage(nLayer+1, aName); + pLayerBar->InsertPage(nLayerPos+1, aName); TabBarPageBits nBits = 0; @@ -1205,27 +1205,27 @@ void DrawViewShell::ResetActualLayer() nBits = TPB_SPECIAL; } - pLayerBar->SetPageBits(nLayer+1, nBits); + pLayerBar->SetPageBits(nLayerPos+1, nBits); } } } } - if ( nActiveLayer == SDRLAYER_NOTFOUND ) + if ( nActiveLayerPos == SDRLAYERPOS_NOTFOUND ) { if( nOldLayerCnt == pLayerBar->GetPageCount() ) { - nActiveLayer = nOldLayerId - 1; + nActiveLayerPos = nOldLayerPos - 1; } else { - nActiveLayer = ( meEditMode == EditMode::MasterPage ) ? 2 : 0; + nActiveLayerPos = ( meEditMode == EditMode::MasterPage ) ? 2 : 0; } - mpDrawView->SetActiveLayer( pLayerBar->GetPageText(nActiveLayer + 1) ); + mpDrawView->SetActiveLayer( pLayerBar->GetPageText(nActiveLayerPos + 1) ); } - pLayerBar->SetCurPageId(nActiveLayer + 1); + pLayerBar->SetCurPageId(nActiveLayerPos + 1); GetViewFrame()->GetBindings().Invalidate( SID_MODIFYLAYER ); GetViewFrame()->GetBindings().Invalidate( SID_DELETE_LAYER ); } @@ -1240,7 +1240,7 @@ sal_Int8 DrawViewShell::AcceptDrop ( DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer ) + SdrLayerID nLayer ) { if( nPage != SDRPAGE_NOTFOUND ) nPage = GetDoc()->GetSdPage( nPage, mePageKind )->GetPageNum(); @@ -1260,7 +1260,7 @@ sal_Int8 DrawViewShell::ExecuteDrop ( DropTargetHelper& /*rTargetHelper*/, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer) + SdrLayerID nLayer) { if( nPage != SDRPAGE_NOTFOUND ) nPage = GetDoc()->GetSdPage( nPage, mePageKind )->GetPageNum(); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 3e1a597c4e7f..1ea7eae77139 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -2864,9 +2864,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if (pPage != nullptr && GetDoc() != nullptr) { - SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin(); - sal_uInt8 aLayerId; + SdrLayerID aLayerId; if (nSId == SID_DISPLAY_MASTER_BACKGROUND) aLayerId = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); else diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index c71a0641b227..9e9c3bbee364 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1520,10 +1520,10 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) SdPage* pPage = GetActualPage(); if (pPage != nullptr && GetDoc() != nullptr) { - SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin(); - sal_uInt8 aBackgroundId = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - sal_uInt8 aObjectId = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerID aBackgroundId = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); + SdrLayerID aObjectId = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); rSet.Put(SfxBoolItem(SID_DISPLAY_MASTER_BACKGROUND, aVisibleLayers.IsSet(aBackgroundId))); rSet.Put(SfxBoolItem(SID_DISPLAY_MASTER_OBJECTS, diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index c623adcb6517..3a97a1b183ed 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -668,7 +668,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) if (IsLayerModeActive()) { SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin(); - SdrLayerID nLayer = 0, nOldLayer = 0; + SdrLayerID nLayer(0), nOldLayer(0); SdrObject* pObj = nullptr; const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); const size_t nMarkCount = rMarkList.GetMarkCount(); diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx index 8c6a43d8a8dc..a9a60fb35408 100644 --- a/sd/source/ui/view/drviewsb.cxx +++ b/sd/source/ui/view/drviewsb.cxx @@ -81,9 +81,9 @@ bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const OUString & rName ) // Undo SdPage* pUndoPage = pPageToRename; SdrLayerAdmin & rLayerAdmin = GetDoc()->GetLayerAdmin(); - sal_uInt8 nBackground = rLayerAdmin.GetLayerID( SD_RESSTR(STR_LAYER_BCKGRND) ); - sal_uInt8 nBgObj = rLayerAdmin.GetLayerID( SD_RESSTR(STR_LAYER_BCKGRNDOBJ) ); - SetOfByte aVisibleLayers = mpActualPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerID nBackground = rLayerAdmin.GetLayerID( SD_RESSTR(STR_LAYER_BCKGRND) ); + SdrLayerID nBgObj = rLayerAdmin.GetLayerID( SD_RESSTR(STR_LAYER_BCKGRNDOBJ) ); + SdrLayerIDSet aVisibleLayers = mpActualPage->TRG_GetMasterPageVisibleLayers(); ::svl::IUndoManager* pManager = GetDoc()->GetDocSh()->GetUndoManager(); ModifyPageUndoAction* pAction = new ModifyPageUndoAction( diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index e64042487324..7572c368074c 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -859,21 +859,21 @@ void FrameView::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr } else if (!bImpress && pValue->Name == sUNO_View_VisibleLayers ) { - SetOfByte aSetOfBytes; - aSetOfBytes.PutValue( pValue->Value ); - SetVisibleLayers( aSetOfBytes ); + SdrLayerIDSet aSdrLayerIDSets; + aSdrLayerIDSets.PutValue( pValue->Value ); + SetVisibleLayers( aSdrLayerIDSets ); } else if (!bImpress && pValue->Name == sUNO_View_PrintableLayers ) { - SetOfByte aSetOfBytes; - aSetOfBytes.PutValue( pValue->Value ); - SetPrintableLayers( aSetOfBytes ); + SdrLayerIDSet aSdrLayerIDSets; + aSdrLayerIDSets.PutValue( pValue->Value ); + SetPrintableLayers( aSdrLayerIDSets ); } else if (!bImpress && pValue->Name == sUNO_View_LockedLayers ) { - SetOfByte aSetOfBytes; - aSetOfBytes.PutValue( pValue->Value ); - SetLockedLayers( aSetOfBytes ); + SdrLayerIDSet aSdrLayerIDSets; + aSdrLayerIDSets.PutValue( pValue->Value ); + SetLockedLayers( aSdrLayerIDSets ); } } diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 3a859aa68662..2a4ce761c013 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -1361,12 +1361,12 @@ void OutlineView::ResetLinks() const mrOutliner.SetEndPasteOrDropHdl(Link<PasteOrDropInfos*,void>()); } -sal_Int8 OutlineView::AcceptDrop( const AcceptDropEvent&, DropTargetHelper&, ::sd::Window*, sal_uInt16, sal_uInt16) +sal_Int8 OutlineView::AcceptDrop( const AcceptDropEvent&, DropTargetHelper&, ::sd::Window*, sal_uInt16, SdrLayerID) { return DND_ACTION_NONE; } -sal_Int8 OutlineView::ExecuteDrop( const ExecuteDropEvent&, ::sd::Window*, sal_uInt16, sal_uInt16) +sal_Int8 OutlineView::ExecuteDrop( const ExecuteDropEvent&, ::sd::Window*, sal_uInt16, SdrLayerID) { return DND_ACTION_NONE; } diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 76af9466f9d4..41b935b4aa0d 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -438,7 +438,7 @@ void View::DragFinished( sal_Int8 nDropAction ) } sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper, - ::sd::Window*, sal_uInt16, sal_uInt16 nLayer ) + ::sd::Window*, sal_uInt16, SdrLayerID nLayer ) { OUString aLayerName = GetActiveLayer(); SdrPageView* pPV = GetSdrPageView(); @@ -615,7 +615,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge } sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, - ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer ) + ::sd::Window* pTargetWindow, sal_uInt16 nPage, SdrLayerID nLayer ) { SdrPageView* pPV = GetSdrPageView(); OUString aActiveLayer = GetActiveLayer(); diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 26deaffc2e23..d5129135d8ac 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -259,7 +259,7 @@ bool View::InsertMetaFile( TransferableDataHelper& rDataHelper, const Point& rPo bool View::InsertData( const TransferableDataHelper& rDataHelper, const Point& rPos, sal_Int8& rDnDAction, bool bDrag, - SotClipboardFormatId nFormat, sal_uInt16 nPage, sal_uInt16 nLayer ) + SotClipboardFormatId nFormat, sal_uInt16 nPage, SdrLayerID nLayer ) { maDropPos = rPos; mnAction = rDnDAction; @@ -411,11 +411,11 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( IsUndoEnabled() ) { BegUndo(SD_RESSTR(STR_MODIFYLAYER)); - AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectLayerChange(*pO, pO->GetLayer(), (SdrLayerID)nLayer)); + AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectLayerChange(*pO, pO->GetLayer(), nLayer)); EndUndo(); } - pO->SetLayer( (SdrLayerID) nLayer ); + pO->SetLayer( nLayer ); } } @@ -1351,7 +1351,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, Point aHitPosL( rPos ); Point aHitPosT( rPos ); Point aHitPosB( rPos ); - const SetOfByte* pVisiLayer = &GetSdrPageView()->GetVisibleLayers(); + const SdrLayerIDSet* pVisiLayer = &GetSdrPageView()->GetVisibleLayers(); aHitPosR.X() += n2HitLog; aHitPosL.X() -= n2HitLog; diff --git a/sd/source/ui/view/unmodpg.cxx b/sd/source/ui/view/unmodpg.cxx index 3716eb566b7a..b852eb58644c 100644 --- a/sd/source/ui/view/unmodpg.cxx +++ b/sd/source/ui/view/unmodpg.cxx @@ -58,9 +58,9 @@ ModifyPageUndoAction::ModifyPageUndoAction( { maOldName = mpPage->GetName(); SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin(); - sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); - SetOfByte aVisibleLayers = mpPage->TRG_GetMasterPageVisibleLayers(); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerIDSet aVisibleLayers = mpPage->TRG_GetMasterPageVisibleLayers(); mbOldBckgrndVisible = aVisibleLayers.IsSet(aBckgrnd); mbOldBckgrndObjsVisible = aVisibleLayers.IsSet(aBckgrndObj); @@ -104,9 +104,9 @@ void ModifyPageUndoAction::Undo() } SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin(); - sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); - SetOfByte aVisibleLayers; + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerIDSet aVisibleLayers; aVisibleLayers.Set(aBckgrnd, mbOldBckgrndVisible); aVisibleLayers.Set(aBckgrndObj, mbOldBckgrndObjsVisible); mpPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); @@ -147,9 +147,9 @@ void ModifyPageUndoAction::Redo() } SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin(); - sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); - SetOfByte aVisibleLayers; + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerIDSet aVisibleLayers; aVisibleLayers.Set(aBckgrnd, mbNewBckgrndVisible); aVisibleLayers.Set(aBckgrndObj, mbNewBckgrndObjsVisible); mpPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 7d409d7021bf..4ed63c6f5387 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -944,7 +944,7 @@ sal_Int8 ViewShell::AcceptDrop ( DropTargetHelper& rTargetHelper, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer) + SdrLayerID nLayer) { ::sd::View* pView = GetView(); return( pView ? pView->AcceptDrop( rEvt, rTargetHelper, pTargetWindow, nPage, nLayer ) : DND_ACTION_NONE ); @@ -955,7 +955,7 @@ sal_Int8 ViewShell::ExecuteDrop ( DropTargetHelper& /*rTargetHelper*/, ::sd::Window* pTargetWindow, sal_uInt16 nPage, - sal_uInt16 nLayer) + SdrLayerID nLayer) { ::sd::View* pView = GetView(); return pView ? pView->ExecuteDrop( rEvt, pTargetWindow, nPage, nLayer ) : DND_ACTION_NONE; diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index aa83468634c6..c24307a678de 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -202,9 +202,9 @@ SdPage* ViewShell::CreateOrDuplicatePage ( sal_uInt16 nSId = rRequest.GetSlot(); SdDrawDocument* pDocument = GetDoc(); SdrLayerAdmin& rLayerAdmin = pDocument->GetLayerAdmin(); - sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); - SetOfByte aVisibleLayers; + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerIDSet aVisibleLayers; // Determine the page from which to copy some values, such as layers, // size, master page, to the new page. This is usually the given page. // When the given page is NULL then use the first page of the document. |