1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 #include <tools/link.hxx>
14 #include <vcl/weld.hxx>
15 #include <svx/graphctl.hxx>
16 #include <xmloff/autolayout.hxx>
18 #include <com/sun/star/awt/Size.hpp>
20 namespace com::sun::star::drawing
{ class XDrawPage
; }
21 namespace com::sun::star::drawing
{ class XDrawPages
; }
22 namespace com::sun::star::graphic
{ class XGraphicProvider
; }
27 using namespace ::com::sun::star
;
28 using namespace ::com::sun::star::uno
;
33 class SdPhotoAlbumDialog
: public weld::GenericDialogController
36 SdPhotoAlbumDialog(weld::Window
* pWindow
, SdDrawDocument
* pActDoc
);
37 virtual ~SdPhotoAlbumDialog() override
;
40 SdDrawDocument
* m_pDoc
;
41 std::unique_ptr
<GraphicFilter
> m_pGraphicFilter
;
45 std::unique_ptr
<weld::Button
> m_xCancelBtn
;
46 std::unique_ptr
<weld::Button
> m_xCreateBtn
;
47 std::unique_ptr
<weld::Button
> m_xAddBtn
;
48 std::unique_ptr
<weld::Button
> m_xUpBtn
;
49 std::unique_ptr
<weld::Button
> m_xDownBtn
;
50 std::unique_ptr
<weld::Button
> m_xRemoveBtn
;
51 std::unique_ptr
<weld::TreeView
> m_xImagesLst
;
52 std::unique_ptr
<weld::CustomWeld
> m_xImg
;
53 std::unique_ptr
<weld::ComboBox
> m_xInsTypeCombo
;
54 std::unique_ptr
<weld::CheckButton
> m_xASRCheck
;
55 std::unique_ptr
<weld::CheckButton
> m_xASRCheckCrop
;
56 std::unique_ptr
<weld::CheckButton
> m_xCapCheck
;
57 std::unique_ptr
<weld::CheckButton
> m_xInsertAsLinkCheck
;
59 DECL_LINK(CancelHdl
, weld::Button
&, void);
60 DECL_LINK(CreateHdl
, weld::Button
&, void);
62 DECL_LINK(FileHdl
, weld::Button
&, void);
63 DECL_LINK(UpHdl
, weld::Button
&, void);
64 DECL_LINK(DownHdl
, weld::Button
&, void);
65 DECL_LINK(RemoveHdl
, weld::Button
&, void);
67 DECL_LINK(SelectHdl
, weld::TreeView
&, void);
68 DECL_LINK(TypeSelectHdl
, weld::ComboBox
&, void);
70 Reference
< drawing::XDrawPage
> appendNewSlide(AutoLayout aLayout
,
71 const Reference
< drawing::XDrawPages
>& xDrawPages
);
73 static awt::Size
createASRSize(const awt::Size
& aPicSize
, const awt::Size
& aMaxSize
);
74 static awt::Size
createASRSizeCrop(const awt::Size
& aPicSize
, const awt::Size
& aMaxSize
);
75 void createCaption(const awt::Size
& aPageSize
);
76 static Reference
< graphic::XGraphic
> createXGraphicFromUrl(const OUString
& sUrl
,
77 const Reference
< graphic::XGraphicProvider
>& xProvider
);
79 void EnableDisableButtons();
89 } // end of namespace sd
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */