Kaydet (Commit) 27fc6087 authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: fdo#78151 disable promote or demote outline levels in master view

it doesn't make sense in master view to do that

Change-Id: I838422f93131b8a92745a624738c5be3a7ed3459
üst 52871279
...@@ -253,6 +253,13 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) ...@@ -253,6 +253,13 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
bool bDisableRight = true; bool bDisableRight = true;
bool bDisableUp = true; bool bDisableUp = true;
bool bDisableDown = true; bool bDisableDown = true;
//fdo#78151 it doesn't make sense to promote or demote outline levels in master view.
const DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >(mpViewShell);
const bool bInMasterView = pDrawViewShell && pDrawViewShell->GetEditMode() == EM_MASTERPAGE;
if (!bInMasterView)
{
OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
if (mpView->ISA(OutlineView)) if (mpView->ISA(OutlineView))
...@@ -337,6 +344,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) ...@@ -337,6 +344,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
bDisableDown = true; bDisableDown = true;
} }
} }
}
if (bDisableLeft) if (bDisableLeft)
rSet.DisableItem(SID_OUTLINE_LEFT); rSet.DisableItem(SID_OUTLINE_LEFT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment