[Libreoffice-commits] core.git: sd/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Thu Sep 8 07:44:45 UTC 2016
sd/source/ui/dlg/PhotoAlbumDialog.cxx | 11 +++++++++++
sd/source/ui/dlg/PhotoAlbumDialog.hxx | 1 +
2 files changed, 12 insertions(+)
New commits:
commit 64a6083df40c5ffe43333f557a96846ea4fa10f6
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Thu Sep 8 09:42:30 2016 +0200
Related tdf#64575 Only allow "Fill Slide" for 1 Image/Slide
Change-Id: I4887a5dd727eecacf7c80a581428f6440218bf86
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index c1de735..e764048 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
)
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.hxx b/sd/source/ui/dlg/PhotoAlbumDialog.hxx
index cf8854a..e6850a2 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.hxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.hxx
@@ -81,6 +81,7 @@ private:
DECL_LINK_TYPED(RemoveHdl, Button*, void);
DECL_LINK_TYPED(SelectHdl, ListBox&, void);
+ DECL_LINK_TYPED(TypeSelectHdl, ListBox&, void);
Reference< drawing::XDrawPage > appendNewSlide(AutoLayout aLayout,
const Reference< drawing::XDrawPages >& xDrawPages);
More information about the Libreoffice-commits
mailing list