diff options
author | Philippe Jung <phil.jung@free.fr> | 2015-07-08 19:59:58 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2015-11-18 08:44:39 +0000 |
commit | d30a44aff1fb049a71e4eb2612be65a735fbe918 (patch) | |
tree | 6f86c6ec368bb4a47bc32bde6d123625df863d69 /sd | |
parent | a23f85f171634732359fc7e4d932a6ff11905c9a (diff) |
Removal of SID_TITLE_MASTER related code
i35731 fixed a bug by deprecating SID_TITLE_MASTER
dispatch command in 2004.
So the feature can not be called anymore since 2004.
Ten years after, this changeset removes the code that could be
considered as dead code.
Change-Id: Ie212baf7ece2897578d2494030d790bcadd16f5f
Reviewed-on: https://gerrit.libreoffice.org/16933
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/app.hrc | 2 | ||||
-rw-r--r-- | sd/sdi/drviewsh.sdi | 5 | ||||
-rw-r--r-- | sd/sdi/sdraw.sdi | 27 | ||||
-rw-r--r-- | sd/source/ui/view/drviews1.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 86 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 13 |
6 files changed, 3 insertions, 131 deletions
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc index 0b21cd0deb43..f75757e84547 100644 --- a/sd/inc/app.hrc +++ b/sd/inc/app.hrc @@ -391,7 +391,7 @@ #define SID_SLIDE_MASTERPAGE (SID_SD_START+348) #define SID_HANDOUT_MASTERPAGE (SID_SD_START+349) #define SID_NOTES_MASTERPAGE (SID_SD_START+350) -#define SID_TITLE_MASTERPAGE (SID_SD_START+351) + // FREE #define SID_INSERTPAGE_QUICK (SID_SD_START+352) // FREE #define SID_INSERT_FLD_PAGE_TITLE (SID_SD_START+356) diff --git a/sd/sdi/drviewsh.sdi b/sd/sdi/drviewsh.sdi index 1d6a86d3de8d..682c7eca0948 100644 --- a/sd/sdi/drviewsh.sdi +++ b/sd/sdi/drviewsh.sdi @@ -150,11 +150,6 @@ interface ImpressEditView : DrawView ExecMethod = FuSupport ; StateMethod = GetMenuState ; ] - SID_TITLE_MASTERPAGE // deprecated, to be removed see issue #i35731# - [ - ExecMethod = FuSupport ; - StateMethod = GetMenuState ; - ] SID_STYLE_FAMILY [ ExecMethod = FuSupport ; diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi index cda8bf8e3be5..fd0e8bc29db8 100644 --- a/sd/sdi/sdraw.sdi +++ b/sd/sdi/sdraw.sdi @@ -6020,33 +6020,6 @@ SfxVoidItem TextToolbox SID_DRAWTBX_TEXT GroupId = GID_DRAWING; ] -SfxVoidItem TitleMasterPage SID_TITLE_MASTERPAGE -(SfxBoolItem Isactive ID_VAL_ISACTIVE) -[ - /* flags: */ - AutoUpdate = FALSE, - Cachable = Cachable, - FastCall = FALSE, - HasCoreId = FALSE, - HasDialog = FALSE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - Synchron; - - /* status: */ - SlotType = SfxBoolItem - - /* config: */ - AccelConfig = TRUE, - MenuConfig = TRUE, - StatusBarConfig = FALSE, - ToolBoxConfig = TRUE, - GroupId = GID_VIEW; -] - SfxBoolItem Torus SID_3D_TORUS [ diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 3c510e5fc313..8be1d79295ce 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -486,7 +486,6 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) Invalidate( SID_DELETE_MASTER_PAGE ); Invalidate( SID_DELETE_PAGE ); Invalidate( SID_SLIDE_MASTERPAGE ); - Invalidate( SID_TITLE_MASTERPAGE ); Invalidate( SID_NOTES_MASTERPAGE ); Invalidate( SID_HANDOUT_MASTERPAGE ); InvalidateWindows(); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 63108ae9df26..feaad5ef48b1 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -752,40 +752,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, false)); rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, false)); - if (mePageKind == PK_STANDARD && - rSet.GetItemState(SID_TITLE_MASTERPAGE) == SfxItemState::DEFAULT) - { - // Is there a page with the AutoLayout "Title"? - bool bDisable = true; - sal_uInt16 i = 0; - sal_uInt16 nCount = GetDoc()->GetSdPageCount(PK_STANDARD); - - while (i < nCount && bDisable) - { - SdPage* pPage = GetDoc()->GetSdPage(i, PK_STANDARD); - - if (pPage->GetAutoLayout() == AUTOLAYOUT_TITLE) - { - bDisable = false; - } - - i++; - } - - if (bDisable) - { - rSet.DisableItem(SID_TITLE_MASTERPAGE); - } - else - { - rSet.Put(SfxBoolItem(SID_TITLE_MASTERPAGE, false)); - } - } - else - { - rSet.DisableItem(SID_TITLE_MASTERPAGE); - } - rSet.DisableItem (SID_INSERT_MASTER_PAGE); rSet.DisableItem (SID_DELETE_MASTER_PAGE); rSet.DisableItem (SID_RENAME_MASTER_PAGE); @@ -805,68 +771,16 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, false)); rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, false)); - if (rSet.GetItemState(SID_TITLE_MASTERPAGE) == SfxItemState::DEFAULT) - { - bool bCheck = false; - bool bDisable = true; - if( pPageView ) - { - SdPage* pMPage = dynamic_cast< SdPage* >( pPageView->GetPage() ); - - sal_uInt16 i = 0; - sal_uInt16 nCount = GetDoc()->GetSdPageCount(PK_STANDARD); - - // Is there a reference to the current master page from a page - // with the AutoLayout "Title"? - while (i < nCount && !bCheck && bDisable) - { - SdPage* pPage = GetDoc()->GetSdPage(i, PK_STANDARD); - - // page does reference the current master page - if (pPage->GetAutoLayout() == AUTOLAYOUT_TITLE) - { - // a page does have a AutoLayout "Title" - bDisable = false; - - SdPage& rRefMPage = static_cast<SdPage&>(pPage->TRG_GetMasterPage()); - - if(&rRefMPage == pMPage) - { - // a page with the AutoLayout "Title" does reference - // the current master page - bCheck = true; - } - } - - i++; - } - } - - if (bCheck) - { - rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, false)); - } - - rSet.Put(SfxBoolItem(SID_TITLE_MASTERPAGE, bCheck)); - - if (bDisable) - { - rSet.ClearItem(SID_TITLE_MASTERPAGE); - rSet.DisableItem(SID_TITLE_MASTERPAGE); - } - } } else if (mePageKind == PK_NOTES) { rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, false)); - rSet.DisableItem(SID_TITLE_MASTERPAGE); rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, true)); rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, false)); } else if (mePageKind == PK_HANDOUT) { rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, false)); - rSet.DisableItem(SID_TITLE_MASTERPAGE); rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, false)); rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, true)); } diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index be76784245a0..fea938d48b7d 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -982,7 +982,6 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) case SID_MASTERPAGE: // BASIC case SID_SLIDE_MASTERPAGE: // BASIC - case SID_TITLE_MASTERPAGE: // BASIC case SID_NOTES_MASTERPAGE: // BASIC case SID_HANDOUT_MASTERPAGE: // BASIC { @@ -1002,12 +1001,10 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if (nSId == SID_MASTERPAGE || (nSId == SID_SLIDE_MASTERPAGE && mePageKind == PK_STANDARD) || - (nSId == SID_TITLE_MASTERPAGE && mePageKind == PK_STANDARD) || (nSId == SID_NOTES_MASTERPAGE && mePageKind == PK_NOTES) || (nSId == SID_HANDOUT_MASTERPAGE && mePageKind == PK_HANDOUT)) { - if (nSId == SID_TITLE_MASTERPAGE || - nSId == SID_SLIDE_MASTERPAGE) + if (nSId == SID_SLIDE_MASTERPAGE) { // Is there a page with the AutoLayout "Title"? bool bFound = false; @@ -1018,12 +1015,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) { SdPage* pPage = GetDoc()->GetSdPage(i, PK_STANDARD); - if (nSId == SID_TITLE_MASTERPAGE && pPage->GetAutoLayout() == AUTOLAYOUT_TITLE) - { - bFound = true; - SwitchPage((pPage->GetPageNum() - 1) / 2); - } - else if (nSId == SID_SLIDE_MASTERPAGE && pPage->GetAutoLayout() != AUTOLAYOUT_TITLE) + if (nSId == SID_SLIDE_MASTERPAGE && pPage->GetAutoLayout() != AUTOLAYOUT_TITLE) { bFound = true; SwitchPage((pPage->GetPageNum() - 1) / 2); @@ -1049,7 +1041,6 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) switch (nSId) { case SID_SLIDE_MASTERPAGE: - case SID_TITLE_MASTERPAGE: default: sRequestedView = framework::FrameworkHelper::msImpressViewURL; ePageKind = PK_STANDARD; |