Coverage Report

Created: 2026-08-14 10:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/framework/inc/services/taskcreatorsrv.hxx
Line
Count
Source
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
20
#pragma once
21
22
#include <comphelper/compbase.hxx>
23
#include <com/sun/star/lang/XServiceInfo.hpp>
24
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
25
#include <com/sun/star/frame/XFrame2.hpp>
26
#include <com/sun/star/uno/XComponentContext.hpp>
27
#include <cppuhelper/supportsservice.hxx>
28
29
typedef comphelper::WeakComponentImplHelper<css::lang::XServiceInfo,
30
                                            css::lang::XSingleServiceFactory>
31
    TaskCreatorService_BASE;
32
33
class TaskCreatorService final : public TaskCreatorService_BASE
34
{
35
private:
36
    /** @short  the global uno service manager.
37
        @descr  Must be used to create own needed services.
38
     */
39
    css::uno::Reference<css::uno::XComponentContext> m_xContext;
40
41
public:
42
    explicit TaskCreatorService(css::uno::Reference<css::uno::XComponentContext> xContext);
43
44
    virtual OUString SAL_CALL getImplementationName() override
45
0
    {
46
0
        return u"com.sun.star.comp.framework.TaskCreator"_ustr;
47
0
    }
48
49
    virtual sal_Bool SAL_CALL supportsService(OUString const& ServiceName) override
50
0
    {
51
0
        return cppu::supportsService(this, ServiceName);
52
0
    }
53
54
    virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override
55
0
    {
56
0
        return { u"com.sun.star.frame.TaskCreator"_ustr };
57
0
    }
58
59
    // XSingleServiceFactory
60
    virtual css::uno::Reference<css::uno::XInterface> SAL_CALL createInstance() override;
61
62
    virtual css::uno::Reference<css::uno::XInterface> SAL_CALL
63
    createInstanceWithArguments(const css::uno::Sequence<css::uno::Any>& lArguments) override;
64
65
private:
66
    css::uno::Reference<css::awt::XWindow>
67
    implts_createContainerWindow(const css::uno::Reference<css::awt::XWindow>& xParentWindow,
68
                                 const css::awt::Rectangle& aPosSize, bool bTopWindow);
69
70
    static void implts_applyDocStyleToWindow(const css::uno::Reference<css::awt::XWindow>& xWindow);
71
72
    css::uno::Reference<css::frame::XFrame2>
73
    implts_createFrame(const css::uno::Reference<css::frame::XFrame>& xParentFrame,
74
                       const css::uno::Reference<css::awt::XWindow>& xContainerWindow,
75
                       const OUString& sName);
76
77
    void
78
    implts_establishWindowStateListener(const css::uno::Reference<css::frame::XFrame2>& xFrame);
79
    void implts_establishTitleBarUpdate(const css::uno::Reference<css::frame::XFrame2>& xFrame);
80
81
    static void
82
    implts_establishDocModifyListener(const css::uno::Reference<css::frame::XFrame2>& xFrame);
83
84
    static OUString impl_filterNames(const OUString& sName);
85
};
86
87
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */