Kaydet (Commit) 6758db06 authored tarafından blendergeek's avatar blendergeek Kaydeden (comit) Tamás Zolnai

tdf#111834: hide useless background controls in Handout View

Change-Id: Ia51c671f17dbb8cc36a73ee662c1c57e23e7818f
Reviewed-on: https://gerrit.libreoffice.org/41968Reviewed-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
üst 4fa01409
......@@ -139,6 +139,7 @@ SlideBackground::SlideBackground(
maDrawMasterContext(vcl::EnumContext::Application::Draw, vcl::EnumContext::Context::MasterPage),
maImpressOtherContext(vcl::EnumContext::Application::Impress, vcl::EnumContext::Context::DrawPage),
maImpressMasterContext(vcl::EnumContext::Application::Impress, vcl::EnumContext::Context::MasterPage),
maImpressHandoutContext(vcl::EnumContext::Application::Impress, vcl::EnumContext::Context::HandoutPage),
mbTitle(false),
meFieldUnit(lcl_GetFieldUnit()),
m_nPageLeftMargin(0),
......@@ -153,10 +154,12 @@ SlideBackground::SlideBackground(
//let the listbox shrink to any size so the sidebar isn't forced to grow to
//the size of the longest master slide name in the document
mpMasterSlide->set_width_request(0);
get(mpBackgroundLabel, "label3");
get(mpFillAttr, "fillattr1");
get(mpFillGrad, "fillattr2");
get(mpFillStyle, "fillstyle");
get(mpFillLB, "fillattr");
get(mpInsertImage, "button2");
get(mpDspMasterBackground, "displaymasterbackground");
get(mpDspMasterObjects, "displaymasterobjects");
get(mpCloseMaster, "closemasterslide");
......@@ -194,7 +197,8 @@ SlideBackground::~SlideBackground()
bool SlideBackground::IsImpress()
{
return ( maContext == maImpressMasterContext ||
maContext == maImpressOtherContext );
maContext == maImpressOtherContext ||
maContext == maImpressHandoutContext );
}
void SlideBackground::Initialize()
......@@ -256,6 +260,18 @@ void SlideBackground::HandleContextChange(
mpMasterSlide->Disable();
mpDspMasterBackground->Disable();
mpDspMasterObjects->Disable();
mpFillStyle->Show();
mpBackgroundLabel->Show();
mpInsertImage->Show();
}
else if ( maContext == maImpressHandoutContext )
{
mpFillStyle->Hide();
mpFillLB->Hide();
mpFillAttr->Hide();
mpFillGrad->Hide();
mpBackgroundLabel->Hide();
mpInsertImage->Hide();
}
else if (maContext == maImpressOtherContext )
{
......@@ -264,6 +280,9 @@ void SlideBackground::HandleContextChange(
mpMasterSlide->Enable();
mpDspMasterBackground->Enable();
mpDspMasterObjects->Enable();
mpFillStyle->Show();
mpBackgroundLabel->Show();
mpInsertImage->Show();
}
// else Draw or something else, do nothing
}
......@@ -289,7 +308,8 @@ void SlideBackground::Update()
{
mpFillAttr->Hide();
mpFillGrad->Hide();
mpFillLB->Show();
if (maContext != maImpressHandoutContext)
mpFillLB->Show();
const Color aColor = GetColorSetOrDefault();
mpFillLB->SelectEntry(aColor);
}
......@@ -520,10 +540,12 @@ void SlideBackground::dispose()
mpPaperSizeBox.clear();
mpPaperOrientation.clear();
mpMasterSlide.clear();
mpBackgroundLabel.clear();
mpFillAttr.clear();
mpFillGrad.clear();
mpFillStyle.clear();
mpFillLB.clear();
mpInsertImage.clear();
mpDspMasterBackground.clear();
mpDspMasterObjects.clear();
mpMasterLabel.clear();
......
......@@ -84,10 +84,12 @@ private:
VclPtr<PaperSizeListBox> mpPaperSizeBox;
VclPtr<ListBox> mpPaperOrientation;
VclPtr<ListBox> mpMasterSlide;
VclPtr<FixedText> mpBackgroundLabel;
VclPtr<SvxFillTypeBox> mpFillStyle;
VclPtr<SvxColorListBox> mpFillLB;
VclPtr<SvxFillAttrBox> mpFillAttr;
VclPtr<SvxColorListBox> mpFillGrad;
VclPtr<Button> mpInsertImage;
VclPtr<CheckBox> mpDspMasterBackground;
VclPtr<CheckBox> mpDspMasterObjects;
VclPtr<Button> mpCloseMaster;
......@@ -128,6 +130,7 @@ private:
vcl::EnumContext maDrawMasterContext;
vcl::EnumContext maImpressOtherContext;
vcl::EnumContext maImpressMasterContext;
vcl::EnumContext maImpressHandoutContext;
bool mbTitle;
FieldUnit meFieldUnit;
long m_nPageLeftMargin;
......
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