fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / controller / inc / dlg_DataEditor.hxx
blob82d7500881e761f25ab514c88fd7e554762bfe08
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATAEDITOR_HXX
21 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATAEDITOR_HXX
23 #include <boost/scoped_ptr.hpp>
24 #include <svl/lstner.hxx>
25 #include <svtools/stdctrl.hxx>
26 #include <vcl/toolbox.hxx>
27 #include <comphelper/stl_types.hxx>
28 #include <vcl/dialog.hxx>
29 #include <com/sun/star/uno/XComponentContext.hpp>
31 namespace com { namespace sun { namespace star {
32 namespace chart2 {
33 class XChartDocument;
35 }}}
37 namespace chart
40 class DataBrowser;
42 class DataEditor : public ModalDialog
44 public:
45 DataEditor( vcl::Window* pParent,
46 const ::com::sun::star::uno::Reference<
47 ::com::sun::star::chart2::XChartDocument > & xChartDoc,
48 const ::com::sun::star::uno::Reference<
49 ::com::sun::star::uno::XComponentContext > & xContext );
50 virtual ~DataEditor();
51 virtual void dispose() SAL_OVERRIDE;
53 // Dialog
54 virtual bool Close() SAL_OVERRIDE;
56 void SetReadOnly( bool bReadOnly );
57 bool ApplyChangesToModel();
59 private:
60 sal_uInt16 TBI_DATA_INSERT_ROW;
61 sal_uInt16 TBI_DATA_INSERT_COL;
62 sal_uInt16 TBI_DATA_INSERT_TEXT_COL;
63 sal_uInt16 TBI_DATA_DELETE_ROW;
64 sal_uInt16 TBI_DATA_DELETE_COL;
65 sal_uInt16 TBI_DATA_SWAP_COL;
66 sal_uInt16 TBI_DATA_SWAP_ROW;
68 bool m_bReadOnly;
69 VclPtr<DataBrowser> m_xBrwData;
70 VclPtr<ToolBox> m_pTbxData;
71 ::com::sun::star::uno::Reference<
72 ::com::sun::star::chart2::XChartDocument > m_xChartDoc;
73 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
74 m_xContext;
76 /// handles actions of the toolbox
77 DECL_LINK_TYPED( ToolboxHdl, ToolBox*, void );
78 /// is called, if the cursor of the table has moved
79 DECL_LINK( BrowserCursorMovedHdl, void*);
80 /// this is called if MiscOptions change, esp. High-Contrast mode
81 DECL_LINK( MiscHdl, void* );
82 /// is called when the contents of the edit cell changes
83 DECL_STATIC_LINK( DataEditor, CellModified, void* );
84 /// is called when the width of any column in the edit browsebox has changed
85 DECL_LINK( BrowserColumnResized, void* );
86 /// is called when the browser view was scrolled, @todo: only call on horizontal scroll
87 DECL_LINK( BrowserContentScrolled, void* );
89 void UpdateData();
90 /// moved and resizes the series name control etc. to fit the dimensions of the edit browsebox
91 // void ImplAdjustHeaderControls( bool bRefreshFromModel );
93 /** notifySystemWindow adds or remove the given window pToRegister at the Systemwindow found when search pWindow.
94 @param pWindow
95 The window which is used to search for the SystemWindow.
96 @param pToRegister
97 The window which should be added or removed on the TaskPaneList.
98 @param rMemFunc
99 The member function which should be called at the SystemWindow when found.
100 Possible values are:
101 ::comphelper::mem_fun(&TaskPaneList::AddWindow)
102 ::comphelper::mem_fun(&TaskPaneList::RemoveWindow)
104 @note this code is taken from dbaccess/source/ui/inc/UITools.hxx
106 static void notifySystemWindow(vcl::Window* pWindow,
107 vcl::Window* pToRegister,
108 const ::comphelper::mem_fun1_t<TaskPaneList, vcl::Window*>& rMemFunc);
111 } // namespace chart
113 #endif // INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATAEDITOR_HXX
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */