LibreOffice Module cui (master)  1
SvxConfigPageHelper.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 
20 #ifndef INCLUDED_CUI_SOURCE_INC_SVXCONFIGPAGEHELPER_HXX
21 #define INCLUDED_CUI_SOURCE_INC_SVXCONFIGPAGEHELPER_HXX
22 
23 #include <com/sun/star/frame/XModuleManager2.hpp>
24 
25 #include "cfg.hxx"
26 
28 {
29 public:
30  static void RemoveEntry( SvxEntries* pEntries, SvxConfigEntry const * pChildEntry );
31 
32  static OUString replaceSaveInName( const OUString& rMessage, const OUString& rSaveInName );
33  static OUString stripHotKey( const OUString& str );
34  static OUString replaceSixteen( const OUString& str, sal_Int32 nReplacement );
35 
36  static sal_Int16 GetImageType();
37  static void InitImageType();
38  static css::uno::Reference< css::graphic::XGraphic > GetGraphic(
39  const css::uno::Reference< css::ui::XImageManager >& xImageManager,
40  const OUString& rCommandURL );
41 
42  static OUString generateCustomName(
43  const OUString& prefix,
45  sal_Int32 suffix = 1 );
46  static OUString generateCustomMenuURL(
47  SvxEntries* entries,
48  sal_Int32 suffix = 1 );
49  static sal_uInt32 generateRandomValue();
55  static OUString generateCustomURL( SvxEntries* entries );
56 
57  static OUString GetModuleName( const OUString& aModuleId );
58  static OUString GetUIModuleName(
59  const OUString& aModuleId,
60  const css::uno::Reference< css::frame::XModuleManager2 >& rModuleManager );
61 
62  static bool GetMenuItemData(
63  const css::uno::Reference< css::container::XIndexAccess >& rItemContainer,
64  sal_Int32 nIndex,
65  OUString& rCommandURL,
66  OUString& rLabel,
67  sal_uInt16& rType,
68  sal_Int32& rStyle,
69  css::uno::Reference< css::container::XIndexAccess >& rSubMenu );
70  static bool GetToolbarItemData(
71  const css::uno::Reference< css::container::XIndexAccess >& rItemContainer,
72  sal_Int32 nIndex,
73  OUString& rCommandURL,
74  OUString& rLabel,
75  sal_uInt16& rType,
76  bool& rIsVisible,
77  sal_Int32& rStyle );
78 
79  static css::uno::Sequence< css::beans::PropertyValue > ConvertSvxConfigEntry(
80  const SvxConfigEntry* pEntry );
81  static css::uno::Sequence< css::beans::PropertyValue > ConvertToolbarEntry(
82  const SvxConfigEntry* pEntry );
83 
84  static bool showKeyConfigTabPage(
85  const css::uno::Reference< css::frame::XFrame >& xFrame );
86 
87  static bool EntrySort( SvxConfigEntry const * a, SvxConfigEntry const * b );
88 
89  static bool SvxConfigEntryModified( SvxConfigEntry const * pEntry );
90 
91 };
92 
93 #endif // INCLUDED_CUI_SOURCE_INC_SVXCONFIGPAGEHELPER_HXX
94 
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static OUString replaceSixteen(const OUString &str, sal_Int32 nReplacement)
static OUString generateCustomURL(SvxEntries *entries)
Generates a custom resource URL for a new toolbar.
static OUString stripHotKey(const OUString &str)
static bool showKeyConfigTabPage(const css::uno::Reference< css::frame::XFrame > &xFrame)
static sal_Int16 GetImageType()
Reference< XFrame > xFrame
static OUString GetUIModuleName(const OUString &aModuleId, const css::uno::Reference< css::frame::XModuleManager2 > &rModuleManager)
static css::uno::Reference< css::graphic::XGraphic > GetGraphic(const css::uno::Reference< css::ui::XImageManager > &xImageManager, const OUString &rCommandURL)
static OUString GetModuleName(const OUString &aModuleId)
std::vector< SvxConfigEntry * > SvxEntries
Definition: cfg.hxx:60
static bool SvxConfigEntryModified(SvxConfigEntry const *pEntry)
static void RemoveEntry(SvxEntries *pEntries, SvxConfigEntry const *pChildEntry)
static OUString generateCustomMenuURL(SvxEntries *entries, sal_Int32 suffix=1)
static OUString generateCustomName(const OUString &prefix, SvxEntries *entries, sal_Int32 suffix=1)
static OUString replaceSaveInName(const OUString &rMessage, const OUString &rSaveInName)
static bool EntrySort(SvxConfigEntry const *a, SvxConfigEntry const *b)
static css::uno::Sequence< css::beans::PropertyValue > ConvertToolbarEntry(const SvxConfigEntry *pEntry)
static css::uno::Sequence< css::beans::PropertyValue > ConvertSvxConfigEntry(const SvxConfigEntry *pEntry)
static sal_uInt32 generateRandomValue()
static bool GetToolbarItemData(const css::uno::Reference< css::container::XIndexAccess > &rItemContainer, sal_Int32 nIndex, OUString &rCommandURL, OUString &rLabel, sal_uInt16 &rType, bool &rIsVisible, sal_Int32 &rStyle)
::cppu::ImplementationEntry const entries[]
static bool GetMenuItemData(const css::uno::Reference< css::container::XIndexAccess > &rItemContainer, sal_Int32 nIndex, OUString &rCommandURL, OUString &rLabel, sal_uInt16 &rType, sal_Int32 &rStyle, css::uno::Reference< css::container::XIndexAccess > &rSubMenu)