diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2012-12-06 12:29:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-21 14:01:17 +0100 |
commit | cfaac477e2a23880310070690beb3222b1c8227c (patch) | |
tree | c5678e2606d73d548392174109df695b35fc053b /framework/inc/uielement/statusbarmerger.hxx | |
parent | 1768904fd908e940a210e101c99a58ca1f7e3f27 (diff) |
Related: #i121442# support status bar merging and StatusbarControllers
framework refactoring and new code to support status bar merging and UNO
StatusbarControllers
(cherry picked from commit 0b3a77478cf2cfd245a87bc528f851e959a2e6c7)
Conflicts:
framework/source/uielement/statusbarmanager.cxx
framework/source/uielement/toolbarmerger.cxx
Change-Id: I334a220ff27bb365e98a0ebd8bc6e55d65e76d64
Diffstat (limited to 'framework/inc/uielement/statusbarmerger.hxx')
-rw-r--r-- | framework/inc/uielement/statusbarmerger.hxx | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/framework/inc/uielement/statusbarmerger.hxx b/framework/inc/uielement/statusbarmerger.hxx new file mode 100644 index 000000000000..618791394b60 --- /dev/null +++ b/framework/inc/uielement/statusbarmerger.hxx @@ -0,0 +1,81 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __FRAMEWORK_UIELEMENT_STATUSBARMERGER_HXX_ +#define __FRAMEWORK_UIELEMENT_STATUSBARMERGER_HXX_ + +#include <com/sun/star/beans/PropertyValue.hpp> +#include <rtl/ustring.hxx> +#include <uielement/statusbar.hxx> + +namespace framework +{ + +struct AddonStatusbarItemData +{ + rtl::OUString aLabel; + sal_uInt16 nItemBits; +}; + +struct AddonStatusbarItem +{ + rtl::OUString aCommandURL; + rtl::OUString aLabel; + rtl::OUString aContext; + sal_uInt16 nItemBits; + sal_Int16 nWidth; +}; + +typedef ::std::vector< AddonStatusbarItem > AddonStatusbarItemContainer; + +class StatusbarMerger +{ +public: + static bool IsCorrectContext( const ::rtl::OUString& aContext, + const ::rtl::OUString& aModuleIdentifier ); + + static bool ConvertSeqSeqToVector( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > > &rSequence, + AddonStatusbarItemContainer& rContainer ); + + static sal_uInt16 FindReferencePos( StatusBar* pStatusbar, + const ::rtl::OUString& rReferencePoint ); + + static bool ProcessMergeOperation( StatusBar* pStatusbar, + sal_uInt16 nPos, + sal_uInt16& rItemId, + const ::rtl::OUString& rModuleIdentifier, + const ::rtl::OUString& rMergeCommand, + const ::rtl::OUString& rMergeCommandParameter, + const AddonStatusbarItemContainer& rItems ); + + static bool ProcessMergeFallback( StatusBar* pStatusbar, + sal_uInt16 nPos, + sal_uInt16& rItemId, + const ::rtl::OUString& rModuleIdentifier, + const ::rtl::OUString& rMergeCommand, + const ::rtl::OUString& rMergeFallback, + const AddonStatusbarItemContainer& rItems ); + +private: + StatusbarMerger(); + StatusbarMerger( const StatusbarMerger& ); + StatusbarMerger& operator=( const StatusbarMerger& ); +}; + +} + +#endif |