diff options
-rw-r--r-- | sd/source/ui/dlg/PhotoAlbumDialog.cxx | 39 | ||||
-rw-r--r-- | sd/source/ui/dlg/PhotoAlbumDialog.hxx | 1 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/photoalbum.ui | 19 |
3 files changed, 50 insertions, 9 deletions
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 04a7b8088e4a..304ff9e377e2 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -56,6 +56,8 @@ SdPhotoAlbumDialog::SdPhotoAlbumDialog(vcl::Window* pWindow, SdDrawDocument* pAc get(pInsTypeCombo, "opt_combo"); get(pASRCheck, "asr_check"); get(pCapCheck, "cap_check"); + get(pInsertAsLinkCheck, "insert_as_link_check"); + pCancelBtn->SetClickHdl(LINK(this, SdPhotoAlbumDialog, CancelHdl)); pCreateBtn->SetClickHdl(LINK(this, SdPhotoAlbumDialog, CreateHdl)); @@ -92,6 +94,7 @@ void SdPhotoAlbumDialog::dispose() pInsTypeCombo.clear(); pASRCheck.clear(); pCapCheck.clear(); + pInsertAsLinkCheck.clear(); ModalDialog::dispose(); } @@ -119,6 +122,7 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, Button*, void) // determine if to use Captions (use TitleObject) and choose the correct AutoLayout // from the beginning const bool bCreateCaptions(pCapCheck->IsChecked()); + const bool bInsertAsLink(pInsertAsLinkCheck->IsChecked()); const AutoLayout aAutoLayout(bCreateCaptions ? AUTOLAYOUT_TITLE_ONLY : AUTOLAYOUT_NONE); // get the option @@ -145,7 +149,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, Button*, void) uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + if (bInsertAsLink) + xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl)); + else + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Size aPageSize; @@ -220,7 +227,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, Button*, void) uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + if (bInsertAsLink) + xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl1)); + else + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Point aPicPos; @@ -255,7 +265,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, Button*, void) uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + if (bInsertAsLink) + xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl2)); + else + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Point aPicPos; @@ -335,7 +348,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, Button*, void) uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + if (bInsertAsLink) + xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl1)); + else + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Point aPicPos; @@ -369,7 +385,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, Button*, void) uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + if (bInsertAsLink) + xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl2)); + else + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Point aPicPos; @@ -404,7 +423,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, Button*, void) uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + if (bInsertAsLink) + xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl3)); + else + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Point aPicPos; @@ -438,7 +460,10 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, Button*, void) uno::UNO_QUERY); Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); - xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); + if (bInsertAsLink) + xProps->setPropertyValue("GraphicURL", ::uno::Any(sUrl4)); + else + xProps->setPropertyValue("Graphic", ::uno::Any(xGraphic)); ::awt::Point aPicPos; diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.hxx b/sd/source/ui/dlg/PhotoAlbumDialog.hxx index 8c35d5594025..dfdefb071938 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.hxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.hxx @@ -66,6 +66,7 @@ private: VclPtr<ListBox> pInsTypeCombo; VclPtr<CheckBox> pASRCheck; VclPtr<CheckBox> pCapCheck; + VclPtr<CheckBox> pInsertAsLinkCheck; SdDrawDocument* pDoc; GraphicFilter* mpGraphicFilter; diff --git a/sd/uiconfig/simpress/ui/photoalbum.ui b/sd/uiconfig/simpress/ui/photoalbum.ui index 7f25c2c28d98..bda02f8092c6 100644 --- a/sd/uiconfig/simpress/ui/photoalbum.ui +++ b/sd/uiconfig/simpress/ui/photoalbum.ui @@ -278,8 +278,8 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="margin_bottom">6</property> - <property name="xalign">0</property> <property name="label" translatable="yes">Preview</property> + <property name="xalign">0</property> <attributes> <attribute name="weight" value="bold"/> </attributes> @@ -372,7 +372,22 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="insert_as_link_check"> + <property name="label" translatable="yes">Link images</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> </packing> </child> </object> |