diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-09-08 09:42:30 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-09-08 09:44:10 +0200 |
commit | 64a6083df40c5ffe43333f557a96846ea4fa10f6 (patch) | |
tree | bbebf2642e6e7163e483cff646b390f517aaa846 /sd/source | |
parent | convert PictDrawingMethod to enum class (diff) | |
download | core-64a6083df40c5ffe43333f557a96846ea4fa10f6.tar.gz core-64a6083df40c5ffe43333f557a96846ea4fa10f6.zip |
Related tdf#64575 Only allow "Fill Slide" for 1 Image/Slide
Change-Id: I4887a5dd727eecacf7c80a581428f6440218bf86
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/dlg/PhotoAlbumDialog.cxx | 11 | ||||
-rw-r--r-- | sd/source/ui/dlg/PhotoAlbumDialog.hxx | 1 |
2 files changed, 12 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 ) diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.hxx b/sd/source/ui/dlg/PhotoAlbumDialog.hxx index cf8854a58fb8..e6850a2b6c7e 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); |