LibreOffice Module sw (master) 1
unotools.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_SW_SOURCE_UIBASE_INC_UNOTOOLS_HXX
20#define INCLUDED_SW_SOURCE_UIBASE_INC_UNOTOOLS_HXX
21
22#include <sal/config.h>
23
24#include <string_view>
25
26#include <vcl/idle.hxx>
27#include <vcl/weld.hxx>
28#include <vcl/customweld.hxx>
29#include <com/sun/star/frame/XController.hpp>
30#include <com/sun/star/text/XTextCursor.hpp>
31#include <swdllapi.h>
32
33#define EX_SHOW_ONLINE_LAYOUT 0x01
34// hard zoom value
35#define EX_SHOW_BUSINESS_CARDS 0x02
36//don't modify page size
37#define EX_SHOW_DEFAULT_PAGE 0x04
38//replace sample toc strings in the template to localized versions
39#define EX_LOCALIZE_TOC_STRINGS 0x08
40
41class SwView;
42
44{
46 css::uno::Reference< css::frame::XModel > m_xModel;
47 css::uno::Reference< css::frame::XController > m_xController;
48 css::uno::Reference< css::text::XTextCursor > m_xCursor;
49
52
54
56
57 sal_uInt32 m_nStyleFlags;
58
60
61 DECL_DLLPRIVATE_LINK( TimeoutHdl, Timer*, void );
62 void PopupHdl(std::string_view rId);
63
64 SAL_DLLPRIVATE void CreateControl();
65 SAL_DLLPRIVATE void DisposeControl();
66
67public:
68 SwOneExampleFrame(sal_uInt32 nStyleFlags,
69 const Link<SwOneExampleFrame&,void>* pInitializedLink,
70 const OUString* pURL = nullptr);
71 virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
72 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
73 virtual bool Command(const CommandEvent& rCEvt) override;
74 virtual ~SwOneExampleFrame() override;
75
76 css::uno::Reference< css::frame::XModel > & GetModel() {return m_xModel;}
77 css::uno::Reference< css::text::XTextCursor > & GetTextCursor() {return m_xCursor;}
78
79 void ClearDocument();
80
81 bool IsInitialized() const {return m_bIsInitialized;}
82
83 bool CreatePopup(const Point& rPt);
84};
85
86#endif
87
88/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwView * m_pModuleView
Definition: unotools.hxx:55
DECL_DLLPRIVATE_LINK(TimeoutHdl, Timer *, void)
bool IsInitialized() const
Definition: unotools.hxx:81
css::uno::Reference< css::text::XTextCursor > m_xCursor
Definition: unotools.hxx:48
sal_uInt32 m_nStyleFlags
Definition: unotools.hxx:57
css::uno::Reference< css::frame::XController > m_xController
Definition: unotools.hxx:47
ScopedVclPtr< VirtualDevice > m_xVirDev
Definition: unotools.hxx:45
css::uno::Reference< css::frame::XModel > & GetModel()
Definition: unotools.hxx:76
css::uno::Reference< css::text::XTextCursor > & GetTextCursor()
Definition: unotools.hxx:77
OUString m_sArgumentURL
Definition: unotools.hxx:53
Link< SwOneExampleFrame &, void > m_aInitializedLink
Definition: unotools.hxx:51
css::uno::Reference< css::frame::XModel > m_xModel
Definition: unotools.hxx:46
Definition: view.hxx:146
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)=0
virtual bool Command(const CommandEvent &)
Reference< frame::XModel > m_xModel
#define SW_DLLPUBLIC
Definition: swdllapi.h:28