1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 <svl/lstner.hxx>
24 #include <vcl/toolbox.hxx>
25 #include <comphelper/stl_types.hxx>
26 #include <vcl/dialog.hxx>
27 #include <com/sun/star/uno/XComponentContext.hpp>
29 namespace com
{ namespace sun
{ namespace star
{
40 class DataEditor
: public ModalDialog
43 DataEditor( vcl::Window
* pParent
,
44 const css::uno::Reference
< css::chart2::XChartDocument
> & xChartDoc
,
45 const css::uno::Reference
< css::uno::XComponentContext
> & xContext
);
46 virtual ~DataEditor() override
;
47 virtual void dispose() override
;
50 virtual bool Close() override
;
52 void SetReadOnly( bool bReadOnly
);
53 bool ApplyChangesToModel();
56 sal_uInt16 TBI_DATA_INSERT_ROW
;
57 sal_uInt16 TBI_DATA_INSERT_COL
;
58 sal_uInt16 TBI_DATA_INSERT_TEXT_COL
;
59 sal_uInt16 TBI_DATA_DELETE_ROW
;
60 sal_uInt16 TBI_DATA_DELETE_COL
;
61 sal_uInt16 TBI_DATA_MOVE_LEFT_COL
;
62 sal_uInt16 TBI_DATA_MOVE_RIGHT_COL
;
63 sal_uInt16 TBI_DATA_MOVE_UP_ROW
;
64 sal_uInt16 TBI_DATA_MOVE_DOWN_ROW
;
67 VclPtr
<DataBrowser
> m_xBrwData
;
68 VclPtr
<ToolBox
> m_pTbxData
;
69 css::uno::Reference
< css::chart2::XChartDocument
> m_xChartDoc
;
70 css::uno::Reference
< css::uno::XComponentContext
>
73 /// handles actions of the toolbox
74 DECL_LINK( ToolboxHdl
, ToolBox
*, void );
75 /// is called, if the cursor of the table has moved
76 DECL_LINK( BrowserCursorMovedHdl
, DataBrowser
*, void);
77 /// this is called if MiscOptions change, esp. High-Contrast mode
78 DECL_LINK( MiscHdl
, LinkParamNone
*, void );
80 /** notifySystemWindow adds or remove the given window pToRegister at the Systemwindow found when search pWindow.
82 The window which is used to search for the SystemWindow.
84 The window which should be added or removed on the TaskPaneList.
86 The member function which should be called at the SystemWindow when found.
88 ::comphelper::mem_fun(&TaskPaneList::AddWindow)
89 ::comphelper::mem_fun(&TaskPaneList::RemoveWindow)
91 @note this code is taken from dbaccess/source/ui/inc/UITools.hxx
93 static void notifySystemWindow(vcl::Window
const * pWindow
,
94 vcl::Window
* pToRegister
,
95 const ::comphelper::mem_fun1_t
<TaskPaneList
, vcl::Window
*>& rMemFunc
);
100 #endif // INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATAEDITOR_HXX
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */