summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorblendergeek <timothy@eastlincoln.net>2017-09-05 17:12:21 -0400
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-09-06 17:02:30 +0200
commit6758db065d77bdebed54e5d3532796a2c3c24088 (patch)
treead8f3b49ce507dd6c886613f3afa7672ceb285a7 /sd
parent4fa014099e99d91088f55b15273117fd0fc26679 (diff)
tdf#111834: hide useless background controls in Handout View
Change-Id: Ia51c671f17dbb8cc36a73ee662c1c57e23e7818f Reviewed-on: https://gerrit.libreoffice.org/41968 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/sidebar/SlideBackground.cxx26
-rw-r--r--sd/source/ui/sidebar/SlideBackground.hxx3
2 files changed, 27 insertions, 2 deletions
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index 070b8e0119e8..447386de9e27 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -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();
diff --git a/sd/source/ui/sidebar/SlideBackground.hxx b/sd/source/ui/sidebar/SlideBackground.hxx
index d8e871c0ef62..4463f233b80b 100644
--- a/sd/source/ui/sidebar/SlideBackground.hxx
+++ b/sd/source/ui/sidebar/SlideBackground.hxx
@@ -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;