LibreOffice Module unotools (master) 1
cmdoptions.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_UNOTOOLS_CMDOPTIONS_HXX
20#define INCLUDED_UNOTOOLS_CMDOPTIONS_HXX
21
23#include <sal/types.h>
24#include <rtl/ustring.hxx>
25#include <unotools/options.hxx>
26#include <memory>
27
28namespace com::sun::star::uno
29{
30template <typename> class Reference;
31}
32
34{
35class XFrame;
36}
37namespace osl
38{
39class Mutex;
40}
41
42/*-************************************************************************************************************
43 @descr The method GetList() returns a list of property values.
44 Use follow defines to separate values by names.
45**-***********************************************************************************************************/
46
47/*-************************************************************************************************************
48 @short forward declaration to our private date container implementation
49 @descr We use these class as internal member to support small memory requirements.
50 You can create the container if it is necessary. The class which use these mechanism
51 is faster and smaller then a complete implementation!
52**-***********************************************************************************************************/
53
55
56/*-************************************************************************************************************
57 @short collect information about dynamic menus
58 @descr Make it possible to configure dynamic menu structures of menus like "new" or "wizard".
59 @devstatus ready to use
60**-***********************************************************************************************************/
61
63{
65
66public:
68 virtual ~SvtCommandOptions() override;
69
70 /*-****************************************************************************************************
71 @short return complete specified list
72 @descr Call it to get all entries of an dynamic menu.
73 We return a list of all nodes with its names and properties.
74 @param "eOption" select the list to retrieve.
75 @return A list of command strings is returned.
76
77 @onerror We return an empty list.
78 **-***************************************************************************************************/
79
80 bool HasEntriesDisabled() const;
81
82 /*-****************************************************************************************************
83 @short Lookup if a command URL is inside a given list
84 @descr Lookup if a command URL is inside a given lst
85 @param "eOption" select right command list
86 @param "aCommandURL" a command URL that is used for the look up
87 @return "sal_True" if the command is inside the list otherwise "sal_False"
88 **-***************************************************************************************************/
89
90 bool LookupDisabled(const OUString& aCommandURL) const;
91
92 /*-****************************************************************************************************
93 @short register an office frame, which must update its dispatches if
94 the underlying configuration was changed.
95
96 @descr To avoid using of "dead" frame objects or implementing
97 deregistration mechanism too, we use weak references to
98 the given frames.
99
100 @param "xFrame" points to the frame, which wishes to be
101 notified, if configuration was changed.
102 **-***************************************************************************************************/
103
104 void EstablishFrameCallback(const css::uno::Reference<css::frame::XFrame>& xFrame);
105
106private:
107 std::shared_ptr<SvtCommandOptions_Impl> m_pImpl;
108
109}; // class SvtCmdOptions
110
111#endif // INCLUDED_UNOTOOLS_CMDOPTIONS_HXX
112
113/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool HasEntriesDisabled() const
Definition: cmdoptions.cxx:242
void EstablishFrameCallback(const css::uno::Reference< css::frame::XFrame > &xFrame)
Definition: cmdoptions.cxx:256
bool LookupDisabled(const OUString &) const
Definition: cmdoptions.cxx:249
std::shared_ptr< SvtCommandOptions_Impl > m_pImpl
Definition: cmdoptions.hxx:107
Reference
#define SAL_WARN_UNUSED
#define UNOTOOLS_DLLPUBLIC