Update git submodules
[LibreOffice.git] / framework / inc / uielement / statusbarmerger.hxx
blob1eaec5a88f81680888f37168f98417f9f14079df
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 #pragma once
21 #include <sal/config.h>
23 #include <string_view>
25 #include <com/sun/star/beans/PropertyValue.hpp>
26 #include <com/sun/star/uno/Sequence.hxx>
27 #include <rtl/ustring.hxx>
28 #include <vcl/status.hxx>
30 namespace framework
33 struct AddonStatusbarItemData
35 OUString aLabel;
38 struct AddonStatusbarItem
40 OUString aCommandURL;
41 OUString aLabel;
42 OUString aContext;
43 StatusBarItemBits nItemBits;
44 sal_Int16 nWidth;
47 typedef ::std::vector< AddonStatusbarItem > AddonStatusbarItemContainer;
49 namespace StatusbarMerger
51 bool IsCorrectContext( std::u16string_view aContext );
53 bool ConvertSeqSeqToVector( const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > >& rSequence,
54 AddonStatusbarItemContainer& rContainer );
56 sal_uInt16 FindReferencePos( StatusBar* pStatusbar,
57 std::u16string_view rReferencePoint );
59 bool ProcessMergeOperation( StatusBar* pStatusbar,
60 sal_uInt16 nPos,
61 sal_uInt16& rItemId,
62 std::u16string_view rMergeCommand,
63 std::u16string_view rMergeCommandParameter,
64 const AddonStatusbarItemContainer& rItems );
66 bool ProcessMergeFallback( StatusBar* pStatusbar,
67 sal_uInt16& rItemId,
68 std::u16string_view rMergeCommand,
69 std::u16string_view rMergeFallback,
70 const AddonStatusbarItemContainer& rItems );
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */