From 267c6f2ac71f92999e969232431ba04678e7437e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 07:54:39 +0200 Subject: Adding upstream version 4:24.2.0. Signed-off-by: Daniel Baumann --- cui/source/inc/insdlg.hxx | 114 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 cui/source/inc/insdlg.hxx (limited to 'cui/source/inc/insdlg.hxx') diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx new file mode 100644 index 0000000000..61c7075070 --- /dev/null +++ b/cui/source/inc/insdlg.hxx @@ -0,0 +1,114 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#pragma once + +#include +#include +#include + +#include +#include +#include + +class INetURLObject; + +class InsertObjectDialog_Impl : public weld::GenericDialogController +{ +protected: + css::uno::Reference < css::embed::XEmbeddedObject > m_xObj; + const css::uno::Reference < css::embed::XStorage > m_xStorage; + comphelper::EmbeddedObjectContainer aCnt; + + InsertObjectDialog_Impl(weld::Window * pParent, + const OUString& rUIXMLDescription, const OUString& rID, + css::uno::Reference < css::embed::XStorage > xStorage); +public: + const css::uno::Reference& GetObject() const { return m_xObj; } + virtual css::uno::Reference GetIconIfIconified(OUString* pGraphicMediaType); + void SetHelpId(const OUString& rHelpId) { m_xDialog->set_help_id(rHelpId); } + virtual bool IsCreateNew() const; +}; + +class SvInsertOleDlg : public InsertObjectDialog_Impl +{ + const SvObjectServerList* m_pServers; + + css::uno::Sequence< sal_Int8 > m_aIconMetaFile; + OUString m_aIconMediaType; + + std::unique_ptr m_xRbNewObject; + std::unique_ptr m_xRbObjectFromfile; + std::unique_ptr m_xObjectTypeFrame; + std::unique_ptr m_xLbObjecttype; + std::unique_ptr m_xFileFrame; + std::unique_ptr m_xEdFilepath; + std::unique_ptr m_xBtnFilepath; + std::unique_ptr m_xCbFilelink; + std::unique_ptr m_xCbAsIcon; + + DECL_LINK(DoubleClickHdl, weld::TreeView&, bool); + DECL_LINK(BrowseHdl, weld::Button&, void); + DECL_LINK(RadioHdl, weld::Toggleable&, void); + bool IsCreateNew() const override { return m_xRbNewObject->get_active(); } + +public: + SvInsertOleDlg(weld::Window* pParent, + const css::uno::Reference < css::embed::XStorage >& xStorage, + const SvObjectServerList* pServers ); + virtual short run() override; + + /// get replacement for the iconified embedded object and the mediatype of the replacement + css::uno::Reference< css::io::XInputStream > GetIconIfIconified( OUString* pGraphicMediaType ) override; +}; + +class SfxInsertFloatingFrameDialog : public InsertObjectDialog_Impl +{ +private: + std::unique_ptr m_xEDName; + std::unique_ptr m_xEDURL; + std::unique_ptr m_xBTOpen; + + std::unique_ptr m_xRBScrollingOn; + std::unique_ptr m_xRBScrollingOff; + std::unique_ptr m_xRBScrollingAuto; + + std::unique_ptr m_xRBFrameBorderOn; + std::unique_ptr m_xRBFrameBorderOff; + + std::unique_ptr m_xFTMarginWidth; + std::unique_ptr m_xNMMarginWidth; + std::unique_ptr m_xCBMarginWidthDefault; + std::unique_ptr m_xFTMarginHeight; + std::unique_ptr m_xNMMarginHeight; + std::unique_ptr m_xCBMarginHeightDefault; + + DECL_LINK(OpenHdl, weld::Button&, void); + DECL_LINK(CheckHdl, weld::Toggleable&, void); + + void Init(); + +public: + SfxInsertFloatingFrameDialog(weld::Window *pParent, + const css::uno::Reference& xStorage); + SfxInsertFloatingFrameDialog(weld::Window* pParent, + const css::uno::Reference& xObj); + virtual short run() override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3