2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 #ifndef __FRAMEWORK_UIELEMENT_STATUSBARMERGER_HXX_
19 #define __FRAMEWORK_UIELEMENT_STATUSBARMERGER_HXX_
21 #include <com/sun/star/beans/PropertyValue.hpp>
22 #include <rtl/ustring.hxx>
23 #include <uielement/statusbar.hxx>
28 struct AddonStatusbarItemData
34 struct AddonStatusbarItem
36 rtl::OUString aCommandURL
;
38 rtl::OUString aContext
;
43 typedef ::std::vector
< AddonStatusbarItem
> AddonStatusbarItemContainer
;
48 static bool IsCorrectContext( const ::rtl::OUString
& aContext
,
49 const ::rtl::OUString
& aModuleIdentifier
);
51 static bool ConvertSeqSeqToVector( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> > &rSequence
,
52 AddonStatusbarItemContainer
& rContainer
);
54 static sal_uInt16
FindReferencePos( StatusBar
* pStatusbar
,
55 const ::rtl::OUString
& rReferencePoint
);
57 static bool ProcessMergeOperation( StatusBar
* pStatusbar
,
60 const ::rtl::OUString
& rModuleIdentifier
,
61 const ::rtl::OUString
& rMergeCommand
,
62 const ::rtl::OUString
& rMergeCommandParameter
,
63 const AddonStatusbarItemContainer
& rItems
);
65 static bool ProcessMergeFallback( StatusBar
* pStatusbar
,
68 const ::rtl::OUString
& rModuleIdentifier
,
69 const ::rtl::OUString
& rMergeCommand
,
70 const ::rtl::OUString
& rMergeFallback
,
71 const AddonStatusbarItemContainer
& rItems
);
75 StatusbarMerger( const StatusbarMerger
& );
76 StatusbarMerger
& operator=( const StatusbarMerger
& );