00001 /* AbiWord 00002 * Copyright (c) 2003 Dom Lachowicz 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00017 * 02110-1301 USA. 00018 */ 00019 00020 #ifndef FL_SELECTION_PRESERVER_H 00021 #define FL_SELECTION_PRESERVER_H 00022 00023 #include "pt_Types.h" 00024 00025 class FV_View; 00026 00027 class ABI_EXPORT FL_SelectionPreserver 00028 { 00029 public: 00030 00031 explicit FL_SelectionPreserver (FV_View * pView); 00032 ~FL_SelectionPreserver (); 00033 00034 bool cmdCharInsert(const UT_UCSChar * text, UT_uint32 count, bool bForce = false); 00035 private: 00036 FL_SelectionPreserver (); 00037 FL_SelectionPreserver (const FL_SelectionPreserver & other); 00038 FL_SelectionPreserver& operator=(const FL_SelectionPreserver & other); 00039 00040 FV_View * m_pView; 00041 bool m_bHadSelection; 00042 PD_DocumentRange m_docRange; 00043 }; 00044 00045 #endif /* FL_SELECTION_PRESERVER_H */