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 _XTEXTEDT_HXX 24 #define _XTEXTEDT_HXX 25 26 #include "svtools/svtdllapi.h" 27 #include <svtools/texteng.hxx> 28 #include <svtools/textview.hxx> 29 30 namespace com { 31 namespace sun { 32 namespace star { 33 namespace util { 34 struct SearchOptions; 35 }}}} 36 37 class SVT_DLLPUBLIC ExtTextEngine : public TextEngine 38 { 39 private: 40 String maGroupChars; 41 42 public: 43 ExtTextEngine(); 44 ~ExtTextEngine(); 45 GetGroupChars() const46 const String& GetGroupChars() const { return maGroupChars; } SetGroupChars(const String & r)47 void SetGroupChars( const String& r ) { maGroupChars = r; } 48 TextSelection MatchGroup( const TextPaM& rCursor ) const; 49 50 sal_Bool Search( TextSelection& rSel, const ::com::sun::star::util::SearchOptions& rSearchOptions, sal_Bool bForward = sal_True ); 51 }; 52 53 class SVT_DLLPUBLIC ExtTextView : public TextView 54 { 55 protected: 56 sal_Bool ImpIndentBlock( sal_Bool bRight ); 57 58 public: 59 ExtTextView( ExtTextEngine* pEng, Window* pWindow ); 60 ~ExtTextView(); 61 62 sal_Bool MatchGroup(); 63 64 sal_Bool Search( const ::com::sun::star::util::SearchOptions& rSearchOptions, sal_Bool bForward ); 65 sal_uInt16 Replace( const ::com::sun::star::util::SearchOptions& rSearchOptions, sal_Bool bAll, sal_Bool bForward ); 66 67 sal_Bool IndentBlock(); 68 sal_Bool UnindentBlock(); 69 }; 70 71 #endif // _XTEXTEDT_HXX 72