merge the formfield patch from ooo-build
[ooovba.git] / dbaccess / source / ui / tabledesign / FieldDescGenWin.hxx
blobdc8db6395ad8b88dfc946d761ad232693fb91a7f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: FieldDescGenWin.hxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef DBAUI_TABLEFIELDDESCGENPAGE_HXX
31 #define DBAUI_TABLEFIELDDESCGENPAGE_HXX
33 #ifndef _SV_TABPAGE_HXX
34 #include <vcl/tabpage.hxx>
35 #endif
36 #ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
37 #include "IClipBoardTest.hxx"
38 #endif
40 namespace dbaui
42 class OTableDesignHelpBar;
43 class OFieldDescription;
44 class OTableFieldControl;
45 class OTableEditorCtrl;
46 //==================================================================
47 class OFieldDescGenWin : public TabPage
48 ,public IClipboardTest
51 OTableFieldControl *m_pFieldControl;
52 protected:
53 virtual void Resize();
55 public:
56 OFieldDescGenWin( Window* pParent, OTableDesignHelpBar* pHelpBar );
57 virtual ~OFieldDescGenWin();
59 virtual void GetFocus();
60 virtual void LoseFocus();
61 virtual void Init();
63 void DisplayData( OFieldDescription* pFieldDescr );
64 void SaveData( OFieldDescription* pFieldDescr );
65 void SetControlText( USHORT nControlId, const String& rText );
66 String GetControlText( USHORT nControlId );
67 void SetReadOnly( BOOL bReadOnly );
68 #if OSL_DEBUG_LEVEL > 0
69 OTableEditorCtrl* GetEditorCtrl();
70 #endif
71 // short GetFormatCategory(OFieldDescription* pFieldDescr);
72 // liefert zum am Feld eingestellten Format einen der CAT_xxx-Werte (CAT_NUMBER, CAT_DATE ...)
74 String BoolStringPersistent(const String& rUIString) const;
75 String BoolStringUI(const String& rPersistentString) const;
77 // IClipboardTest
78 virtual sal_Bool isCutAllowed();
79 virtual sal_Bool isCopyAllowed();
80 virtual sal_Bool isPasteAllowed();
81 virtual sal_Bool hasChildPathFocus() { return HasChildPathFocus(); }
83 virtual void copy();
84 virtual void cut();
85 virtual void paste();
87 inline OTableFieldControl* getFieldControl() const { return m_pFieldControl; }
90 #endif // DBAUI_TABLEFIELDDESCGENPAGE_HXX