summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/PhotoAlbumDialog.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-09-08 09:42:30 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-09-08 09:44:10 +0200
commit64a6083df40c5ffe43333f557a96846ea4fa10f6 (patch)
treebbebf2642e6e7163e483cff646b390f517aaa846 /sd/source/ui/dlg/PhotoAlbumDialog.cxx
parent8d1885de86132a975075b23a043ead1ad4d9d4f3 (diff)
Related tdf#64575 Only allow "Fill Slide" for 1 Image/Slide
Change-Id: I4887a5dd727eecacf7c80a581428f6440218bf86
Diffstat (limited to 'sd/source/ui/dlg/PhotoAlbumDialog.cxx')
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index c1de735bb19e..e764048fb54b 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -70,6 +70,7 @@ SdPhotoAlbumDialog::SdPhotoAlbumDialog(vcl::Window* pWindow, SdDrawDocument* pAc
pRemoveBtn->SetClickHdl(LINK(this, SdPhotoAlbumDialog, RemoveHdl));
pRemoveBtn->Disable();
pImagesLst->SetSelectHdl(LINK(this, SdPhotoAlbumDialog, SelectHdl));
+ pInsTypeCombo->SetSelectHdl(LINK(this, SdPhotoAlbumDialog, TypeSelectHdl));
mpGraphicFilter = new GraphicFilter;
sDirUrl.clear();
@@ -666,6 +667,16 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, SelectHdl, ListBox&, void)
EnableDisableButtons();
}
+IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, TypeSelectHdl, ListBox&, void)
+{
+ // Enable "Fill Slide" only for one image
+ // If we want to have it for other images too, we need to implement the actual cropping.
+ bool const bEnable = pInsTypeCombo->GetSelectEntryPos() == ONE_IMAGE;
+ pASRCheckCrop->Enable(bEnable);
+ if (!bEnable)
+ pASRCheckCrop->Check(false);
+}
+
Reference< drawing::XDrawPage > SdPhotoAlbumDialog::appendNewSlide(AutoLayout aLayout,
const Reference< drawing::XDrawPages >& xDrawPages
)