LibreOffice Module cui (master)  1
insdlg.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #ifndef INCLUDED_CUI_SOURCE_INC_INSDLG_HXX
20 #define INCLUDED_CUI_SOURCE_INC_INSDLG_HXX
21 
22 #include <com/sun/star/uno/Reference.h>
23 #include <com/sun/star/embed/XEmbeddedObject.hpp>
24 #include <com/sun/star/embed/XStorage.hpp>
25 
26 #include <svtools/insdlg.hxx>
27 #include <vcl/weld.hxx>
29 
30 class INetURLObject;
31 
33 {
34 protected:
35  css::uno::Reference < css::embed::XEmbeddedObject > m_xObj;
36  const css::uno::Reference < css::embed::XStorage > m_xStorage;
38 
40  const OUString& rUIXMLDescription, const OString& rID,
41  const css::uno::Reference < css::embed::XStorage >& xStorage);
42 public:
43  const css::uno::Reference<css::embed::XEmbeddedObject>& GetObject() const { return m_xObj; }
44  virtual css::uno::Reference<css::io::XInputStream> GetIconIfIconified(OUString* pGraphicMediaType);
45  void SetHelpId(const OString& rHelpId) { m_xDialog->set_help_id(rHelpId); }
46  virtual bool IsCreateNew() const;
47 };
48 
50 {
52 
53  css::uno::Sequence< sal_Int8 > m_aIconMetaFile;
54  OUString m_aIconMediaType;
55 
56  std::unique_ptr<weld::RadioButton> m_xRbNewObject;
57  std::unique_ptr<weld::RadioButton> m_xRbObjectFromfile;
58  std::unique_ptr<weld::Frame> m_xObjectTypeFrame;
59  std::unique_ptr<weld::TreeView> m_xLbObjecttype;
60  std::unique_ptr<weld::Frame> m_xFileFrame;
61  std::unique_ptr<weld::Entry> m_xEdFilepath;
62  std::unique_ptr<weld::Button> m_xBtnFilepath;
63  std::unique_ptr<weld::CheckButton> m_xCbFilelink;
64  std::unique_ptr<weld::CheckButton> m_xCbAsIcon;
65 
66  DECL_LINK(DoubleClickHdl, weld::TreeView&, bool);
67  DECL_LINK(BrowseHdl, weld::Button&, void);
68  DECL_LINK(RadioHdl, weld::Button&, void);
69  bool IsCreateNew() const override { return m_xRbNewObject->get_active(); }
70 
71 public:
73  const css::uno::Reference < css::embed::XStorage >& xStorage,
74  const SvObjectServerList* pServers );
75  virtual short run() override;
76 
78  css::uno::Reference< css::io::XInputStream > GetIconIfIconified( OUString* pGraphicMediaType ) override;
79 };
80 
82 {
83 private:
84  std::unique_ptr<weld::Entry> m_xEDName;
85  std::unique_ptr<weld::Entry> m_xEDURL;
86  std::unique_ptr<weld::Button> m_xBTOpen;
87 
88  std::unique_ptr<weld::RadioButton> m_xRBScrollingOn;
89  std::unique_ptr<weld::RadioButton> m_xRBScrollingOff;
90  std::unique_ptr<weld::RadioButton> m_xRBScrollingAuto;
91 
92  std::unique_ptr<weld::RadioButton> m_xRBFrameBorderOn;
93  std::unique_ptr<weld::RadioButton> m_xRBFrameBorderOff;
94 
95  std::unique_ptr<weld::Label> m_xFTMarginWidth;
96  std::unique_ptr<weld::SpinButton> m_xNMMarginWidth;
97  std::unique_ptr<weld::CheckButton> m_xCBMarginWidthDefault;
98  std::unique_ptr<weld::Label> m_xFTMarginHeight;
99  std::unique_ptr<weld::SpinButton> m_xNMMarginHeight;
100  std::unique_ptr<weld::CheckButton> m_xCBMarginHeightDefault;
101 
102  DECL_LINK(OpenHdl, weld::Button&, void);
103  DECL_LINK(CheckHdl, weld::Button&, void);
104 
105  void Init();
106 
107 public:
109  const css::uno::Reference<css::embed::XStorage>& xStorage);
111  const css::uno::Reference<css::embed::XEmbeddedObject>& xObj);
112  virtual short run() override;
113 };
114 
115 #endif // INCLUDED_CUI_SOURCE_INC_INSDLG_HXX
116 
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::shared_ptr< weld::Dialog > m_xDialog
std::unique_ptr< weld::Entry > m_xEDURL
Definition: insdlg.hxx:85
std::unique_ptr< weld::SpinButton > m_xNMMarginWidth
Definition: insdlg.hxx:96
std::unique_ptr< weld::Frame > m_xObjectTypeFrame
Definition: insdlg.hxx:58
SvInsertOleDlg(weld::Window *pParent, const css::uno::Reference< css::embed::XStorage > &xStorage, const SvObjectServerList *pServers)
Definition: insdlg.cxx:122
std::unique_ptr< weld::Label > m_xFTMarginHeight
Definition: insdlg.hxx:98
std::unique_ptr< weld::CheckButton > m_xCbAsIcon
Definition: insdlg.hxx:64
InsertObjectDialog_Impl(weld::Window *pParent, const OUString &rUIXMLDescription, const OString &rID, const css::uno::Reference< css::embed::XStorage > &xStorage)
Definition: insdlg.cxx:70
std::unique_ptr< weld::Button > m_xBtnFilepath
Definition: insdlg.hxx:62
std::unique_ptr< weld::Button > m_xBTOpen
Definition: insdlg.hxx:86
virtual css::uno::Reference< css::io::XInputStream > GetIconIfIconified(OUString *pGraphicMediaType)
Definition: insdlg.cxx:65
std::unique_ptr< weld::CheckButton > m_xCBMarginHeightDefault
Definition: insdlg.hxx:100
std::unique_ptr< weld::RadioButton > m_xRbObjectFromfile
Definition: insdlg.hxx:57
std::unique_ptr< weld::RadioButton > m_xRBScrollingAuto
Definition: insdlg.hxx:90
comphelper::EmbeddedObjectContainer aCnt
Definition: insdlg.hxx:37
std::unique_ptr< weld::CheckButton > m_xCbFilelink
Definition: insdlg.hxx:63
virtual short run() override
Definition: insdlg.cxx:146
OUString m_aIconMediaType
Definition: insdlg.hxx:54
std::unique_ptr< weld::CheckButton > m_xCBMarginWidthDefault
Definition: insdlg.hxx:97
void SetHelpId(const OString &rHelpId)
Definition: insdlg.hxx:45
const css::uno::Reference< css::embed::XStorage > m_xStorage
Definition: insdlg.hxx:36
css::uno::Reference< css::embed::XEmbeddedObject > m_xObj
Definition: insdlg.hxx:35
css::uno::Reference< css::io::XInputStream > GetIconIfIconified(OUString *pGraphicMediaType) override
get replacement for the iconified embedded object and the mediatype of the replacement ...
Definition: insdlg.cxx:312
std::unique_ptr< weld::Label > m_xFTMarginWidth
Definition: insdlg.hxx:95
std::unique_ptr< weld::RadioButton > m_xRBScrollingOff
Definition: insdlg.hxx:89
css::uno::Sequence< sal_Int8 > m_aIconMetaFile
Definition: insdlg.hxx:53
std::unique_ptr< weld::Frame > m_xFileFrame
Definition: insdlg.hxx:60
std::unique_ptr< weld::TreeView > m_xLbObjecttype
Definition: insdlg.hxx:59
std::unique_ptr< weld::RadioButton > m_xRBFrameBorderOn
Definition: insdlg.hxx:92
std::unique_ptr< weld::RadioButton > m_xRBScrollingOn
Definition: insdlg.hxx:88
std::unique_ptr< weld::RadioButton > m_xRBFrameBorderOff
Definition: insdlg.hxx:93
const css::uno::Reference< css::embed::XEmbeddedObject > & GetObject() const
Definition: insdlg.hxx:43
virtual bool IsCreateNew() const
Definition: insdlg.cxx:60
std::unique_ptr< weld::Entry > m_xEdFilepath
Definition: insdlg.hxx:61
std::unique_ptr< weld::RadioButton > m_xRbNewObject
Definition: insdlg.hxx:56
DECL_LINK(OpenHdl, weld::Button &, void)
DECL_LINK(DoubleClickHdl, weld::TreeView &, bool)
std::unique_ptr< weld::SpinButton > m_xNMMarginHeight
Definition: insdlg.hxx:99
SfxInsertFloatingFrameDialog(weld::Window *pParent, const css::uno::Reference< css::embed::XStorage > &xStorage)
Definition: insdlg.cxx:326
std::unique_ptr< weld::Entry > m_xEDName
Definition: insdlg.hxx:84
virtual short run() override
Definition: insdlg.cxx:373
const SvObjectServerList * m_pServers
Definition: insdlg.hxx:51
bool IsCreateNew() const override
Definition: insdlg.hxx:69