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/.
10 #ifndef INCLUDED_SD_SOURCE_UI_DLG_PHOTOALBUMDIALOG_HXX
11 #define INCLUDED_SD_SOURCE_UI_DLG_PHOTOALBUMDIALOG_HXX
13 #include <tools/link.hxx>
15 #include <vcl/weld.hxx>
16 #include <svx/graphctl.hxx>
17 #include <xmloff/autolayout.hxx>
19 namespace com
{ namespace sun
{ namespace star
{ namespace drawing
{ class XDrawPage
; } } } }
20 namespace com
{ namespace sun
{ namespace star
{ namespace drawing
{ class XDrawPages
; } } } }
21 namespace com
{ namespace sun
{ namespace star
{ namespace graphic
{ class XGraphicProvider
; } } } }
26 using namespace ::com::sun::star
;
27 using namespace ::com::sun::star::uno
;
32 class SdPhotoAlbumDialog
: public weld::GenericDialogController
35 SdPhotoAlbumDialog(weld::Window
* pWindow
, SdDrawDocument
* pActDoc
);
36 virtual ~SdPhotoAlbumDialog() override
;
39 SdDrawDocument
* m_pDoc
;
40 GraphicFilter
* m_pGraphicFilter
;
44 std::unique_ptr
<weld::Button
> m_xCancelBtn
;
45 std::unique_ptr
<weld::Button
> m_xCreateBtn
;
46 std::unique_ptr
<weld::Button
> m_xAddBtn
;
47 std::unique_ptr
<weld::Button
> m_xUpBtn
;
48 std::unique_ptr
<weld::Button
> m_xDownBtn
;
49 std::unique_ptr
<weld::Button
> m_xRemoveBtn
;
50 std::unique_ptr
<weld::TreeView
> m_xImagesLst
;
51 std::unique_ptr
<weld::CustomWeld
> m_xImg
;
52 std::unique_ptr
<weld::ComboBox
> m_xInsTypeCombo
;
53 std::unique_ptr
<weld::CheckButton
> m_xASRCheck
;
54 std::unique_ptr
<weld::CheckButton
> m_xASRCheckCrop
;
55 std::unique_ptr
<weld::CheckButton
> m_xCapCheck
;
56 std::unique_ptr
<weld::CheckButton
> m_xInsertAsLinkCheck
;
58 DECL_LINK(CancelHdl
, weld::Button
&, void);
59 DECL_LINK(CreateHdl
, weld::Button
&, void);
61 DECL_LINK(FileHdl
, weld::Button
&, void);
62 DECL_LINK(UpHdl
, weld::Button
&, void);
63 DECL_LINK(DownHdl
, weld::Button
&, void);
64 DECL_LINK(RemoveHdl
, weld::Button
&, void);
66 DECL_LINK(SelectHdl
, weld::TreeView
&, void);
67 DECL_LINK(TypeSelectHdl
, weld::ComboBox
&, void);
69 Reference
< drawing::XDrawPage
> appendNewSlide(AutoLayout aLayout
,
70 const Reference
< drawing::XDrawPages
>& xDrawPages
);
72 static awt::Size
createASRSize(const awt::Size
& aPicSize
, const awt::Size
& aMaxSize
);
73 static awt::Size
createASRSizeCrop(const awt::Size
& aPicSize
, const awt::Size
& aMaxSize
);
74 void createCaption(const awt::Size
& aPageSize
);
75 static Reference
< graphic::XGraphic
> createXGraphicFromUrl(const OUString
& sUrl
,
76 const Reference
< graphic::XGraphicProvider
>& xProvider
);
78 void EnableDisableButtons();
88 } // end of namespace sd
90 #endif // INCLUDED_SD_SOURCE_UI_DLG_PHOTOALBUMDIALOG_HXX
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */