Add Marathi autocorrect
[LibreOffice.git] / sd / source / ui / dlg / PhotoAlbumDialog.hxx
blob8da601133c15c92c465e8e17154d086e5c9fd2fa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #pragma once
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; }
24 class SdDrawDocument;
25 class GraphicFilter;
27 using namespace ::com::sun::star;
28 using namespace ::com::sun::star::uno;
30 namespace sd
33 class SdPhotoAlbumDialog : public weld::GenericDialogController
35 public:
36 SdPhotoAlbumDialog(weld::Window* pWindow, SdDrawDocument* pActDoc);
37 virtual ~SdPhotoAlbumDialog() override;
39 private:
40 SdDrawDocument* m_pDoc;
41 std::unique_ptr<GraphicFilter> m_pGraphicFilter;
43 GraphCtrl m_aImg;
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();
81 enum SlideImageLayout
83 ONE_IMAGE=0,
84 TWO_IMAGES,
85 FOUR_IMAGES
89 } // end of namespace sd
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */