1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef DBAUI_QUERYVIEW_TEXT_HXX 28 #define DBAUI_QUERYVIEW_TEXT_HXX 29 30 #ifndef DBAUI_QUERYVIEW_HXX 31 #include "queryview.hxx" 32 #endif 33 #ifndef DBAUI_QUERYCONTAINERWINDOW_HXX 34 #include "querycontainerwindow.hxx" 35 #endif 36 37 class Splitter; 38 namespace dbaui 39 { 40 class OSqlEdit; 41 class OQueryTextView : public Window 42 { 43 friend class OQueryViewSwitch; 44 OSqlEdit* m_pEdit; 45 public: 46 OQueryTextView( OQueryContainerWindow* pParent ); 47 virtual ~OQueryTextView(); 48 49 virtual void GetFocus(); 50 51 virtual sal_Bool isCutAllowed(); 52 virtual sal_Bool isPasteAllowed(); 53 virtual sal_Bool isCopyAllowed(); 54 virtual void copy(); 55 virtual void cut(); 56 virtual void paste(); 57 // clears the whole query 58 virtual void clear(); 59 // set the view readonly or not 60 virtual void setReadOnly(sal_Bool _bReadOnly); 61 // check if the statement is correct when not returning false 62 virtual sal_Bool checkStatement(); 63 // set the statement for representation 64 virtual void setStatement(const ::rtl::OUString& _rsStatement); 65 virtual ::rtl::OUString getStatement(); 66 // allow access to our edit 67 OSqlEdit* getSqlEdit() const { return m_pEdit; } 68 69 OQueryContainerWindow* getContainerWindow() { return static_cast< OQueryContainerWindow* >( GetParent() ); } 70 protected: 71 virtual void Resize(); 72 }; 73 } 74 #endif // DBAUI_QUERYVIEW_TEXT_HXX 75 76 77