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#pragma once
20
21#include <com/sun/star/uno/Reference.h>
22#include <com/sun/star/embed/XEmbeddedObject.hpp>
23#include <com/sun/star/embed/XStorage.hpp>
24
25#include <svtools/insdlg.hxx>
26#include <vcl/weld.hxx>
28
29class INetURLObject;
30
32{
33protected:
34 css::uno::Reference < css::embed::XEmbeddedObject > m_xObj;
35 const css::uno::Reference < css::embed::XStorage > m_xStorage;
37
39 const OUString& rUIXMLDescription, const OUString& rID,
40 css::uno::Reference < css::embed::XStorage > xStorage);
41public:
42 const css::uno::Reference<css::embed::XEmbeddedObject>& GetObject() const { return m_xObj; }
43 virtual css::uno::Reference<css::io::XInputStream> GetIconIfIconified(OUString* pGraphicMediaType);
44 void SetHelpId(const OUString& rHelpId) { m_xDialog->set_help_id(rHelpId); }
45 virtual bool IsCreateNew() const;
46};
47
49{
51
52 css::uno::Sequence< sal_Int8 > m_aIconMetaFile;
54
55 std::unique_ptr<weld::RadioButton> m_xRbNewObject;
56 std::unique_ptr<weld::RadioButton> m_xRbObjectFromfile;
57 std::unique_ptr<weld::Frame> m_xObjectTypeFrame;
58 std::unique_ptr<weld::TreeView> m_xLbObjecttype;
59 std::unique_ptr<weld::Frame> m_xFileFrame;
60 std::unique_ptr<weld::Entry> m_xEdFilepath;
61 std::unique_ptr<weld::Button> m_xBtnFilepath;
62 std::unique_ptr<weld::CheckButton> m_xCbFilelink;
63 std::unique_ptr<weld::CheckButton> m_xCbAsIcon;
64
65 DECL_LINK(DoubleClickHdl, weld::TreeView&, bool);
66 DECL_LINK(BrowseHdl, weld::Button&, void);
67 DECL_LINK(RadioHdl, weld::Toggleable&, void);
68 bool IsCreateNew() const override { return m_xRbNewObject->get_active(); }
69
70public:
72 const css::uno::Reference < css::embed::XStorage >& xStorage,
73 const SvObjectServerList* pServers );
74 virtual short run() override;
75
77 css::uno::Reference< css::io::XInputStream > GetIconIfIconified( OUString* pGraphicMediaType ) override;
78};
79
81{
82private:
83 std::unique_ptr<weld::Entry> m_xEDName;
84 std::unique_ptr<weld::Entry> m_xEDURL;
85 std::unique_ptr<weld::Button> m_xBTOpen;
86
87 std::unique_ptr<weld::RadioButton> m_xRBScrollingOn;
88 std::unique_ptr<weld::RadioButton> m_xRBScrollingOff;
89 std::unique_ptr<weld::RadioButton> m_xRBScrollingAuto;
90
91 std::unique_ptr<weld::RadioButton> m_xRBFrameBorderOn;
92 std::unique_ptr<weld::RadioButton> m_xRBFrameBorderOff;
93
94 std::unique_ptr<weld::Label> m_xFTMarginWidth;
95 std::unique_ptr<weld::SpinButton> m_xNMMarginWidth;
96 std::unique_ptr<weld::CheckButton> m_xCBMarginWidthDefault;
97 std::unique_ptr<weld::Label> m_xFTMarginHeight;
98 std::unique_ptr<weld::SpinButton> m_xNMMarginHeight;
99 std::unique_ptr<weld::CheckButton> m_xCBMarginHeightDefault;
100
101 DECL_LINK(OpenHdl, weld::Button&, void);
102 DECL_LINK(CheckHdl, weld::Toggleable&, void);
103
104 void Init();
105
106public:
108 const css::uno::Reference<css::embed::XStorage>& xStorage);
110 const css::uno::Reference<css::embed::XEmbeddedObject>& xObj);
111 virtual short run() override;
112};
113
114/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetHelpId(const OUString &rHelpId)
Definition: insdlg.hxx:44
virtual bool IsCreateNew() const
Definition: insdlg.cxx:64
css::uno::Reference< css::embed::XEmbeddedObject > m_xObj
Definition: insdlg.hxx:34
const css::uno::Reference< css::embed::XStorage > m_xStorage
Definition: insdlg.hxx:35
const css::uno::Reference< css::embed::XEmbeddedObject > & GetObject() const
Definition: insdlg.hxx:42
comphelper::EmbeddedObjectContainer aCnt
Definition: insdlg.hxx:36
InsertObjectDialog_Impl(weld::Window *pParent, const OUString &rUIXMLDescription, const OUString &rID, css::uno::Reference< css::embed::XStorage > xStorage)
Definition: insdlg.cxx:74
virtual css::uno::Reference< css::io::XInputStream > GetIconIfIconified(OUString *pGraphicMediaType)
Definition: insdlg.cxx:69
std::unique_ptr< weld::CheckButton > m_xCBMarginWidthDefault
Definition: insdlg.hxx:96
DECL_LINK(CheckHdl, weld::Toggleable &, void)
std::unique_ptr< weld::RadioButton > m_xRBScrollingOff
Definition: insdlg.hxx:88
std::unique_ptr< weld::Label > m_xFTMarginWidth
Definition: insdlg.hxx:94
std::unique_ptr< weld::Entry > m_xEDURL
Definition: insdlg.hxx:84
std::unique_ptr< weld::RadioButton > m_xRBFrameBorderOff
Definition: insdlg.hxx:92
virtual short run() override
Definition: insdlg.cxx:423
std::unique_ptr< weld::RadioButton > m_xRBFrameBorderOn
Definition: insdlg.hxx:91
std::unique_ptr< weld::CheckButton > m_xCBMarginHeightDefault
Definition: insdlg.hxx:99
std::unique_ptr< weld::Button > m_xBTOpen
Definition: insdlg.hxx:85
std::unique_ptr< weld::SpinButton > m_xNMMarginWidth
Definition: insdlg.hxx:95
std::unique_ptr< weld::Label > m_xFTMarginHeight
Definition: insdlg.hxx:97
std::unique_ptr< weld::RadioButton > m_xRBScrollingOn
Definition: insdlg.hxx:87
DECL_LINK(OpenHdl, weld::Button &, void)
SfxInsertFloatingFrameDialog(weld::Window *pParent, const css::uno::Reference< css::embed::XStorage > &xStorage)
Definition: insdlg.cxx:376
std::unique_ptr< weld::SpinButton > m_xNMMarginHeight
Definition: insdlg.hxx:98
std::unique_ptr< weld::RadioButton > m_xRBScrollingAuto
Definition: insdlg.hxx:89
SfxInsertFloatingFrameDialog(weld::Window *pParent, const css::uno::Reference< css::embed::XEmbeddedObject > &xObj)
std::unique_ptr< weld::Entry > m_xEDName
Definition: insdlg.hxx:83
std::unique_ptr< weld::Entry > m_xEdFilepath
Definition: insdlg.hxx:60
std::unique_ptr< weld::RadioButton > m_xRbNewObject
Definition: insdlg.hxx:55
bool IsCreateNew() const override
Definition: insdlg.hxx:68
DECL_LINK(BrowseHdl, weld::Button &, void)
std::unique_ptr< weld::Frame > m_xObjectTypeFrame
Definition: insdlg.hxx:57
std::unique_ptr< weld::Button > m_xBtnFilepath
Definition: insdlg.hxx:61
const SvObjectServerList * m_pServers
Definition: insdlg.hxx:50
std::unique_ptr< weld::CheckButton > m_xCbAsIcon
Definition: insdlg.hxx:63
std::unique_ptr< weld::Frame > m_xFileFrame
Definition: insdlg.hxx:59
DECL_LINK(DoubleClickHdl, weld::TreeView &, bool)
virtual short run() override
Definition: insdlg.cxx:154
std::unique_ptr< weld::RadioButton > m_xRbObjectFromfile
Definition: insdlg.hxx:56
std::unique_ptr< weld::CheckButton > m_xCbFilelink
Definition: insdlg.hxx:62
DECL_LINK(RadioHdl, weld::Toggleable &, void)
std::unique_ptr< weld::TreeView > m_xLbObjecttype
Definition: insdlg.hxx:58
SvInsertOleDlg(weld::Window *pParent, const css::uno::Reference< css::embed::XStorage > &xStorage, const SvObjectServerList *pServers)
Definition: insdlg.cxx:130
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:362
css::uno::Sequence< sal_Int8 > m_aIconMetaFile
Definition: insdlg.hxx:52
OUString m_aIconMediaType
Definition: insdlg.hxx:53
std::shared_ptr< weld::Dialog > m_xDialog