/* -*- 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 . */ #ifndef INCLUDED_CUI_SOURCE_INC_INSDLG_HXX #define INCLUDED_CUI_SOURCE_INC_INSDLG_HXX #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 OString& rID, const css::uno::Reference < css::embed::XStorage >& xStorage); public: const css::uno::Reference& GetObject() { return m_xObj; } virtual css::uno::Reference GetIconIfIconified(OUString* pGraphicMediaType); void SetHelpId(const OString& 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&, void); DECL_LINK(BrowseHdl, weld::Button&, void); DECL_LINK(RadioHdl, weld::Button&, 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::Button&, 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; }; #endif // INCLUDED_CUI_SOURCE_INC_INSDLG_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */