1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _SWBASESH_HXX 24 #define _SWBASESH_HXX 25 26 27 #include <shellid.hxx> 28 29 #define _SVSTDARR_USHORTSSORT 30 #define _SVSTDARR_USHORTS 31 #include <tools/link.hxx> 32 #include <vcl/timer.hxx> 33 #include <sfx2/module.hxx> 34 #include <sfx2/shell.hxx> 35 #include <svl/svstdarr.hxx> 36 37 #include <mdiexp.hxx> 38 39 class SwWrtShell; 40 class SwCrsrShell; 41 class SwView; 42 class SfxItemSet; 43 class Graphic; 44 45 struct DBTextStruct_Impl; 46 class SwBaseShell: public SfxShell 47 { 48 SwView &rView; 49 50 // DragModus 51 static FlyMode eFrameMode; 52 53 // Bug 75078 - if in GetState the asynch call of GetGraphic returns 54 // synch, the set the state directly into the itemset 55 SfxItemSet* pGetStateSet; 56 57 //Update-Timer fuer Graphic 58 SvUShortsSort aGrfUpdateSlots; 59 60 DECL_LINK( GraphicArrivedHdl, SwCrsrShell* ); 61 62 protected: 63 SwWrtShell& GetShell(); 64 SwWrtShell* GetShellPtr(); 65 GetView()66 inline SwView& GetView() { return rView; } SetGetStateSet(SfxItemSet * p)67 inline void SetGetStateSet( SfxItemSet* p ) { pGetStateSet = p; } AddGrfUpdateSlot(sal_uInt16 nSlot)68 inline sal_Bool AddGrfUpdateSlot( sal_uInt16 nSlot ){ return aGrfUpdateSlots.Insert( nSlot ); } 69 70 DECL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl* ); 71 72 void InsertURLButton( const String& rURL, const String& rTarget, const String& rTxt ); 73 void InsertTable( SfxRequest& _rRequest ); 74 75 public: 76 SwBaseShell(SwView &rShell); 77 virtual ~SwBaseShell(); 78 79 SFX_DECL_INTERFACE(SW_BASESHELL) 80 TYPEINFO(); 81 82 void ExecDelete(SfxRequest &); 83 84 void ExecClpbrd(SfxRequest &); 85 void StateClpbrd(SfxItemSet &); 86 87 void ExecUndo(SfxRequest &); 88 void StateUndo(SfxItemSet &); 89 90 void Execute(SfxRequest &); 91 void GetState(SfxItemSet &); 92 void StateStyle(SfxItemSet &); 93 94 void ExecuteGallery(SfxRequest&); 95 void GetGalleryState(SfxItemSet&); 96 97 void ExecDlg(SfxRequest &); 98 99 void StateStatusLine(SfxItemSet &rSet); 100 void ExecTxtCtrl(SfxRequest& rReq); 101 void GetTxtFontCtrlState(SfxItemSet& rSet); 102 void GetTxtCtrlState(SfxItemSet& rSet); 103 void GetBorderState(SfxItemSet &rSet); 104 void GetBckColState(SfxItemSet &rSet); 105 106 void ExecBckCol(SfxRequest& rReq); 107 void SetWrapMode( sal_uInt16 nSlot ); 108 109 void StateDisableItems(SfxItemSet &); 110 111 void EditRegionDialog(SfxRequest& rReq); 112 void InsertRegionDialog(SfxRequest& rReq); 113 114 void ExecField(SfxRequest& rReq); 115 116 static void SetFrmMode( FlyMode eMode, SwWrtShell *pShell ); //Mit Update! _SetFrmMode(FlyMode eMode)117 static void _SetFrmMode( FlyMode eMode ) { eFrameMode = eMode; } GetFrmMode()118 static FlyMode GetFrmMode() { return eFrameMode; } 119 120 }; 121 122 123 #endif 124