nss: upgrade to release 3.73
[LibreOffice.git] / sw / source / uibase / inc / unotools.hxx
blob4e72a53099208049a2db8e4f36a273ec8515736d
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_UNOTOOLS_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_UNOTOOLS_HXX
22 #include <vcl/idle.hxx>
23 #include <vcl/weld.hxx>
24 #include <vcl/customweld.hxx>
25 #include <com/sun/star/frame/XController.hpp>
26 #include <com/sun/star/text/XTextCursor.hpp>
27 #include <swdllapi.h>
29 #define EX_SHOW_ONLINE_LAYOUT 0x01
30 // hard zoom value
31 #define EX_SHOW_BUSINESS_CARDS 0x02
32 //don't modify page size
33 #define EX_SHOW_DEFAULT_PAGE 0x04
34 //replace sample toc strings in the template to localized versions
35 #define EX_LOCALIZE_TOC_STRINGS 0x08
37 class SwView;
39 class SW_DLLPUBLIC SwOneExampleFrame : public weld::CustomWidgetController
41 ScopedVclPtr<VirtualDevice> m_xVirDev;
42 css::uno::Reference< css::frame::XModel > m_xModel;
43 css::uno::Reference< css::frame::XController > m_xController;
44 css::uno::Reference< css::text::XTextCursor > m_xCursor;
46 Idle m_aLoadedIdle;
47 Link<SwOneExampleFrame&,void> m_aInitializedLink;
49 OUString m_sArgumentURL;
51 SwView* m_pModuleView;
53 sal_uInt32 m_nStyleFlags;
55 bool m_bIsInitialized;
57 DECL_DLLPRIVATE_LINK( TimeoutHdl, Timer*, void );
58 void PopupHdl(const OString& rId);
60 SAL_DLLPRIVATE void CreateControl();
61 SAL_DLLPRIVATE void DisposeControl();
63 public:
64 SwOneExampleFrame(sal_uInt32 nStyleFlags,
65 const Link<SwOneExampleFrame&,void>* pInitalizedLink,
66 const OUString* pURL = nullptr);
67 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
68 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
69 virtual bool Command(const CommandEvent& rCEvt) override;
70 virtual ~SwOneExampleFrame() override;
72 css::uno::Reference< css::frame::XModel > & GetModel() {return m_xModel;}
73 css::uno::Reference< css::text::XTextCursor > & GetTextCursor() {return m_xCursor;}
75 void ClearDocument();
77 bool IsInitialized() const {return m_bIsInitialized;}
79 bool CreatePopup(const Point& rPt);
82 #endif
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */