1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _SCH_DGRDATA_HXX
30 #define _SCH_DGRDATA_HXX
32 #include <svl/lstner.hxx>
33 #include <svtools/stdctrl.hxx>
34 #include <vcl/toolbox.hxx>
35 #include <comphelper/stl_types.hxx>
36 #include <vcl/dialog.hxx>
37 #include <com/sun/star/uno/XComponentContext.hpp>
41 namespace com
{ namespace sun
{ namespace star
{
52 class DataEditor
: public ModalDialog
55 DataEditor( Window
* pParent
,
56 const ::com::sun::star::uno::Reference
<
57 ::com::sun::star::chart2::XChartDocument
> & xChartDoc
,
58 const ::com::sun::star::uno::Reference
<
59 ::com::sun::star::uno::XComponentContext
> & xContext
);
60 virtual ~DataEditor();
63 virtual void Resize();
66 virtual sal_Bool
Close();
68 void SetReadOnly( bool bReadOnly
);
69 bool ApplyChangesToModel();
73 ::std::auto_ptr
< DataBrowser
> m_apBrwData
;
75 ::com::sun::star::uno::Reference
<
76 ::com::sun::star::chart2::XChartDocument
> m_xChartDoc
;
77 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>
79 ImageList m_aToolboxImageList
;
81 /// handles actions of the toolbox
82 DECL_LINK( ToolboxHdl
, void* );
83 /// is called, if the cursor of the table has moved
84 DECL_LINK( BrowserCursorMovedHdl
, void*);
85 /// this is called if MiscOptions change, esp. High-Contrast mode
86 DECL_LINK( MiscHdl
, void* );
87 /// is called when the contents of the edit cell changes
88 DECL_LINK( CellModified
, void* );
89 /// is called when the width of any column in the edit browsebox has changed
90 DECL_LINK( BrowserColumnResized
, void* );
91 /// is called when the browser view was scrolled, @todo: only call on horizontal scroll
92 DECL_LINK( BrowserContentScrolled
, void* );
95 void ApplyImageList();
96 /// moved and resizes the series name control etc. to fit the dimensions of the edit browsebox
97 // void ImplAdjustHeaderControls( bool bRefreshFromModel );
99 /** notifySystemWindow adds or remove the given window pToRegister at the Systemwindow found when search pWindow.
101 The window which is used to search for the SystemWindow.
103 The window which should be added or removed on the TaskPaneList.
105 The member function which should be called at the SystemWindow when found.
107 ::comphelper::mem_fun(&TaskPaneList::AddWindow)
108 ::comphelper::mem_fun(&TaskPaneList::RemoveWindow)
110 @note this code is taken from dbaccess/source/ui/inc/UITools.hxx
112 void notifySystemWindow( Window
* pWindow
,
114 ::comphelper::mem_fun1_t
< TaskPaneList
, Window
* > rMemFunc
);
116 void AdaptBrowseBoxSize();
121 #endif // _SCH_DGRDATA_HXX
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */