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 24 #ifndef SD_FU_FORMATPAINTBRUSH_HXX 25 #define SD_FU_FORMATPAINTBRUSH_HXX 26 27 #include "futext.hxx" 28 29 // header for class SfxItemSet 30 #include <svl/itemset.hxx> 31 #include <boost/scoped_ptr.hpp> 32 33 namespace sd { 34 35 class DrawViewShell; 36 37 class FuFormatPaintBrush : public FuText 38 { 39 public: 40 TYPEINFO(); 41 42 static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ); 43 44 virtual sal_Bool MouseMove(const MouseEvent& rMEvt); 45 virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); 46 virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); 47 virtual sal_Bool KeyInput(const KeyEvent& rKEvt); 48 49 virtual void Activate(); 50 virtual void Deactivate(); 51 52 static void GetMenuState( DrawViewShell& rDrawViewShell, SfxItemSet &rSet ); 53 static bool CanCopyThisType( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier ); 54 55 private: 56 FuFormatPaintBrush ( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq); 57 58 void DoExecute( SfxRequest& rReq ); 59 60 bool HasContentForThisType( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier ) const; 61 void Paste( bool, bool ); 62 63 void implcancel(); 64 65 ::boost::shared_ptr<SfxItemSet> mpItemSet; 66 bool mbPermanent; 67 bool mbOldIsQuickTextEditMode; 68 }; 69 70 } // end of namespace sd 71 72 #endif 73