/src/libreoffice/include/sfx2/tbxctrl.hxx
Line | Count | Source |
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_SFX2_TBXCTRL_HXX |
20 | | #define INCLUDED_SFX2_TBXCTRL_HXX |
21 | | |
22 | | #include <memory> |
23 | | #include <sal/config.h> |
24 | | #include <sfx2/dllapi.h> |
25 | | #include <sal/types.h> |
26 | | #include <svl/poolitem.hxx> |
27 | | #include <svtools/toolboxcontroller.hxx> |
28 | | #include <rtl/ref.hxx> |
29 | | #include <vcl/vclptr.hxx> |
30 | | |
31 | | namespace com::sun::star::frame { class XDispatchProvider; } |
32 | | namespace com::sun::star::frame { class XFrame; } |
33 | | namespace vcl { class Window; } |
34 | | |
35 | | class InterimItemWindow; |
36 | | class SfxToolBoxControl; |
37 | | class SfxModule; |
38 | | |
39 | | rtl::Reference<svt::ToolboxController> SfxToolBoxControllerFactory( const css::uno::Reference< css::frame::XFrame >& rFrame, ToolBox* pToolbox, ToolBoxItemId nID, const OUString& aCommandURL ); |
40 | | |
41 | | typedef rtl::Reference<SfxToolBoxControl> (*SfxToolBoxControlCtor)( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox& rBox ); |
42 | | |
43 | | struct SfxTbxCtrlFactory |
44 | | { |
45 | | SfxToolBoxControlCtor pCtor; |
46 | | const std::type_info& nTypeId; |
47 | | sal_uInt16 nSlotId; |
48 | | |
49 | | SfxTbxCtrlFactory( SfxToolBoxControlCtor pTheCtor, |
50 | | const std::type_info& nTheTypeId, sal_uInt16 nTheSlotId ): |
51 | 717 | pCtor(pTheCtor), |
52 | 717 | nTypeId(nTheTypeId), |
53 | 717 | nSlotId(nTheSlotId) |
54 | 717 | {} |
55 | | }; |
56 | | |
57 | | |
58 | | #define SFX_DECL_TOOLBOX_CONTROL() \ |
59 | | static rtl::Reference<SfxToolBoxControl> CreateImpl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox &rTbx ); \ |
60 | | static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=nullptr) |
61 | | |
62 | | /* For special ToolBox controls, such as a font selection box or toolbox |
63 | | tear-off floating windows, an appropriate Item-Subclass of SfxTooBoxControl |
64 | | has to be implemented. |
65 | | |
66 | | This class has to be registered in SfxApplication:Init() with the static |
67 | | control method RegisterControl(). The SFx then automatically creates these |
68 | | controls in the toolbox, if the associated slots are of the specific type. |
69 | | */ |
70 | | |
71 | | struct SfxToolBoxControl_Impl; |
72 | | class SFX2_DLLPUBLIC SfxToolBoxControl: public svt::ToolboxController |
73 | | { |
74 | | friend struct SfxTbxCtrlFactory; |
75 | | |
76 | | std::unique_ptr< SfxToolBoxControl_Impl> pImpl; |
77 | | |
78 | | protected: |
79 | | // old SfxToolBoxControl methods |
80 | | virtual void StateChangedAtToolBoxControl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); |
81 | | virtual void Select( sal_uInt16 nSelectModifier ); |
82 | | |
83 | | virtual void DoubleClick(); |
84 | | virtual void Click(); |
85 | | virtual void CreatePopupWindow(); |
86 | | virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window *pParent); |
87 | | |
88 | | public: |
89 | | // XComponent |
90 | | virtual void SAL_CALL dispose() override; |
91 | | |
92 | | // new controller API |
93 | | // XStatusListener |
94 | | virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) override; |
95 | | |
96 | | // XToolbarController |
97 | | virtual void SAL_CALL execute( sal_Int16 KeyModifier ) override; |
98 | | virtual void SAL_CALL click() override; |
99 | | virtual void SAL_CALL doubleClick() override; |
100 | | virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createPopupWindow() override; |
101 | | virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createItemWindow( const css::uno::Reference< css::awt::XWindow >& rParent ) override; |
102 | | |
103 | | public: |
104 | | SFX_DECL_TOOLBOX_CONTROL(); |
105 | | |
106 | | SfxToolBoxControl( sal_uInt16 nSlotID, ToolBoxItemId nId, ToolBox& rBox, bool bShowStrings = false ); |
107 | | virtual ~SfxToolBoxControl() override; |
108 | | |
109 | | ToolBox& GetToolBox() const; |
110 | | ToolBoxItemId GetId() const; |
111 | | unsigned short GetSlotId() const; |
112 | | |
113 | | void Dispatch( const OUString& aCommand, |
114 | | css::uno::Sequence< css::beans::PropertyValue > const & aArgs ); |
115 | | static void Dispatch( const css::uno::Reference< css::frame::XDispatchProvider >& rDispatchProvider, |
116 | | const OUString& rCommand, |
117 | | css::uno::Sequence< css::beans::PropertyValue > const & aArgs ); |
118 | | |
119 | | static SfxItemState GetItemState( const SfxPoolItem* pState ); |
120 | | static rtl::Reference<SfxToolBoxControl> CreateControl( sal_uInt16 nSlotId, ToolBoxItemId nTbxId, ToolBox *pBox, SfxModule const *pMod ); |
121 | | static void RegisterToolBoxControl( SfxModule*, const SfxTbxCtrlFactory&); |
122 | | }; |
123 | | |
124 | | #define SFX_IMPL_TOOLBOX_CONTROL(Class, nItemClass) \ |
125 | | rtl::Reference<SfxToolBoxControl> Class::CreateImpl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox &rTbx ) \ |
126 | 0 | { return new Class( nSlotId, nId, rTbx ); } \Unexecuted instantiation: ScZoomSliderControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: sc::SheetViewControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: sc::ScNumberFormatControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: avmedia::MediaToolBoxControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SfxURLToolBoxControl_Impl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxFmTbxCtlAbsRec::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxFmTbxCtlRecText::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxFmTbxCtlRecFromText::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxFmTbxCtlRecTotal::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxFmTbxNextRec::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxFmTbxPrevRec::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxClipBoardControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxFillToolBoxControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: svx::FormatPaintBrushToolBoxControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxGrafRedToolBoxControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxGrafGreenToolBoxControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxGrafBlueToolBoxControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxGrafLuminanceToolBoxControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxGrafContrastToolBoxControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxGrafGammaToolBoxControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxGrafTransparenceToolBoxControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxGrafModeToolBoxControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxLineWidthToolBoxControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SvxTbxCtlDraw::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SwTbxAutoTextCtrl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SwPreviewZoomControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SwJumpToSpecificPageControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: svx::ParaAboveSpacingControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: svx::ParaBelowSpacingControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: svx::ParaLeftSpacingControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: svx::ParaRightSpacingControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: svx::ParaFirstLineSpacingControl::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SdTbxCtlDiaPages::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) Unexecuted instantiation: SdTbxCtlGlueEscDir::CreateImpl(unsigned short, o3tl::strong_int<unsigned short, ToolBoxItemIdTag>, ToolBox&) |
127 | | void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \ |
128 | 690 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ |
129 | 690 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } ScZoomSliderControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 11 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 11 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
sc::SheetViewControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 11 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 11 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
sc::ScNumberFormatControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 11 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 11 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
avmedia::MediaToolBoxControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SfxURLToolBoxControl_Impl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 27 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 27 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxFmTbxCtlAbsRec::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxFmTbxCtlRecText::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxFmTbxCtlRecFromText::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxFmTbxCtlRecTotal::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxFmTbxNextRec::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxFmTbxPrevRec::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxClipBoardControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 43 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 43 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxFillToolBoxControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
svx::FormatPaintBrushToolBoxControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxGrafRedToolBoxControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxGrafGreenToolBoxControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxGrafBlueToolBoxControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxGrafLuminanceToolBoxControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxGrafContrastToolBoxControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxGrafGammaToolBoxControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxGrafTransparenceToolBoxControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxGrafModeToolBoxControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxLineWidthToolBoxControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 26 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 26 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SvxTbxCtlDraw::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 35 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 35 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SwTbxAutoTextCtrl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 9 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 9 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SwPreviewZoomControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 9 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 9 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SwJumpToSpecificPageControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 9 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 9 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
svx::ParaAboveSpacingControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 9 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 9 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
svx::ParaBelowSpacingControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 9 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 9 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
svx::ParaLeftSpacingControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 9 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 9 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
svx::ParaRightSpacingControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 9 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 9 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
svx::ParaFirstLineSpacingControl::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 9 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 9 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SdTbxCtlDiaPages::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 6 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 6 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
SdTbxCtlGlueEscDir::RegisterControl(unsigned short, SfxModule*) Line | Count | Source | 128 | 6 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ | 129 | 6 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
|
130 | | |
131 | | #define SFX_IMPL_TOOLBOX_CONTROL_ARG(Class, nItemClass, Arg) \ |
132 | | rtl::Reference<SfxToolBoxControl> Class::CreateImpl( sal_uInt16 nSlotId, ToolBoxItemId nId, ToolBox &rTbx ) \ |
133 | 0 | { return new Class( nSlotId, nId, rTbx, Arg); } \ |
134 | | void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \ |
135 | 27 | { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \ |
136 | 27 | Class::CreateImpl, typeid(nItemClass), nSlotId ) ); } |
137 | | |
138 | | |
139 | | #endif |
140 | | |
141 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |