1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dlg_DataEditor.hxx,v $
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 ************************************************************************/
31 #ifndef _SCH_DGRDATA_HXX
32 #define _SCH_DGRDATA_HXX
34 #include <svtools/lstner.hxx>
35 #include <svtools/stdctrl.hxx>
36 #include <vcl/toolbox.hxx>
37 #include <comphelper/stl_types.hxx>
38 #include <vcl/dialog.hxx>
39 #include <com/sun/star/uno/XComponentContext.hpp>
43 namespace com
{ namespace sun
{ namespace star
{
54 class DataEditor
: public ModalDialog
57 DataEditor( Window
* pParent
,
58 const ::com::sun::star::uno::Reference
<
59 ::com::sun::star::chart2::XChartDocument
> & xChartDoc
,
60 const ::com::sun::star::uno::Reference
<
61 ::com::sun::star::uno::XComponentContext
> & xContext
);
62 virtual ~DataEditor();
65 virtual void Resize();
70 void SetReadOnly( bool bReadOnly
);
71 bool ApplyChangesToModel();
75 ::std::auto_ptr
< DataBrowser
> m_apBrwData
;
77 ::com::sun::star::uno::Reference
<
78 ::com::sun::star::chart2::XChartDocument
> m_xChartDoc
;
79 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>
81 ImageList m_aToolboxImageList
;
82 ImageList m_aToolboxImageListHighContrast
;
84 /// handles actions of the toolbox
85 DECL_LINK( ToolboxHdl
, void* );
86 /// is called, if the cursor of the table has moved
87 DECL_LINK( BrowserCursorMovedHdl
, void*);
88 /// this is called if MiscOptions change, esp. High-Contrast mode
89 DECL_LINK( MiscHdl
, void* );
90 /// is called when the contents of the edit cell changes
91 DECL_LINK( CellModified
, void* );
92 /// is called when the width of any column in the edit browsebox has changed
93 DECL_LINK( BrowserColumnResized
, void* );
94 /// is called when the browser view was scrolled, @todo: only call on horizontal scroll
95 DECL_LINK( BrowserContentScrolled
, void* );
98 void ApplyImageList();
99 /// moved and resizes the series name control etc. to fit the dimensions of the edit browsebox
100 // void ImplAdjustHeaderControls( bool bRefreshFromModel );
102 /** notifySystemWindow adds or remove the given window pToRegister at the Systemwindow found when search pWindow.
104 The window which is used to search for the SystemWindow.
106 The window which should be added or removed on the TaskPaneList.
108 The member function which should be called at the SystemWindow when found.
110 ::comphelper::mem_fun(&TaskPaneList::AddWindow)
111 ::comphelper::mem_fun(&TaskPaneList::RemoveWindow)
113 @note this code is taken from dbaccess/source/ui/inc/UITools.hxx
115 void notifySystemWindow( Window
* pWindow
,
117 ::comphelper::mem_fun1_t
< TaskPaneList
, Window
* > rMemFunc
);
119 void AdaptBrowseBoxSize();
124 #endif // _SCH_DGRDATA_HXX