Files
libreoffice/chart2/source/controller/dialogs/DataBrowser.cxx

1392 lines
42 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
#include <svl/zformat.hxx>
#include <svl/zforlist.hxx>
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
#include "DataBrowser.hxx"
#include "DataBrowserModel.hxx"
#include "Strings.hrc"
#include "DataSeriesHelper.hxx"
#include "DiagramHelper.hxx"
#include "ChartModelHelper.hxx"
#include "CommonConverters.hxx"
#include "macros.hxx"
#include "NumberFormatterWrapper.hxx"
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
#include "servicenames_charttypes.hxx"
#include "ResId.hxx"
#include "bitmaps.hlst"
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
#include "HelpIds.hrc"
#include <vcl/fixed.hxx>
#include <vcl/image.hxx>
#include <vcl/layout.hxx>
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
#include <vcl/msgbox.hxx>
#include <vcl/settings.hxx>
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
#include <rtl/math.hxx>
#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
#include <com/sun/star/container/XIndexReplace.hpp>
#include <com/sun/star/util/XNumberFormats.hpp>
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
#include <algorithm>
#include <functional>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
using namespace ::svt;
namespace
{
/* BrowserMode::COLUMNSELECTION : single cells may be selected rather than only
entire rows
BrowserMode::(H|V)LINES : show horizontal or vertical grid-lines
BrowserMode::AUTO_(H|V)SCROLL : scroll automated horizontally or vertically when
cursor is moved beyond the edge of the dialog
BrowserMode::HIDESELECT : Do not mark the current row with selection color
(usually blue)
! BrowserMode::HIDECURSOR would prevent flickering in edit fields, but navigating
with shift up/down, and entering non-editable cells would be problematic,
e.g. the first cell, or when being in read-only mode
*/
const BrowserMode BrowserStdFlags = BrowserMode::COLUMNSELECTION |
BrowserMode::HLINES | BrowserMode::VLINES |
BrowserMode::AUTO_HSCROLL | BrowserMode::AUTO_VSCROLL |
BrowserMode::HIDESELECT;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
sal_Int32 lcl_getRowInData( long nRow )
{
return static_cast< sal_Int32 >( nRow );
}
sal_Int32 lcl_getColumnInData( sal_uInt16 nCol )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
return static_cast< sal_Int32 >( nCol ) - 1;
}
} // anonymous namespace
namespace chart
{
namespace impl
{
class SeriesHeaderEdit : public Edit
{
public:
explicit SeriesHeaderEdit( vcl::Window * pParent );
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
void setStartColumn( sal_Int32 nStartColumn );
sal_Int32 getStartColumn() const { return m_nStartColumn;}
void SetShowWarningBox( bool bShowWarning );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
private:
sal_Int32 m_nStartColumn;
bool m_bShowWarningBox;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
};
SeriesHeaderEdit::SeriesHeaderEdit( vcl::Window * pParent ) :
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
Edit( pParent ),
m_nStartColumn( 0 ),
m_bShowWarningBox( false )
{
SetHelpId(HID_SCH_DATA_SERIES_LABEL);
}
2010-11-16 18:57:44 -08:00
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
void SeriesHeaderEdit::setStartColumn( sal_Int32 nStartColumn )
{
m_nStartColumn = nStartColumn;
}
void SeriesHeaderEdit::SetShowWarningBox( bool bShowWarning )
{
m_bShowWarningBox = bShowWarning;
}
void SeriesHeaderEdit::MouseButtonDown( const MouseEvent& rMEvt )
{
Edit::MouseButtonDown( rMEvt );
if( m_bShowWarningBox )
ScopedVclPtrInstance<WarningBox>(this, WinBits( WB_OK ),
SCH_RESSTR(STR_INVALID_NUMBER))->Execute();
}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
class SeriesHeader
{
public:
explicit SeriesHeader(vcl::Window * pParent, vcl::Window *pColorParent);
~SeriesHeader();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
void SetColor( const Color & rCol );
void SetPos( const Point & rPos );
void SetWidth( sal_Int32 nWidth );
void SetChartType( const Reference< chart2::XChartType > & xChartType,
bool bSwapXAndYAxis );
void SetSeriesName( const OUString & rName );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
void SetRange( sal_Int32 nStartCol, sal_Int32 nEndCol );
void SetPixelWidth( sal_Int32 nWidth );
sal_Int32 GetStartColumn() const { return m_nStartCol;}
sal_Int32 GetEndColumn() const { return m_nEndCol;}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
static const sal_Int32 nSymbolHeight = 10;
static const sal_Int32 nSymbolDistance = 2;
static sal_Int32 GetRelativeAppFontXPosForNameField() { return nSymbolHeight + nSymbolDistance; }
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
void Show();
void Hide();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
/** call this before destroying the class. This notifies the listeners to
changes of the edit field for the series name.
*/
void applyChanges();
void SetGetFocusHdl( const Link<Control&,void>& rLink );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
void SetEditChangedHdl( const Link<SeriesHeaderEdit*,void> & rLink );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
bool HasFocus() const;
private:
VclPtr< FixedImage > m_spSymbol;
VclPtr< SeriesHeaderEdit > m_spSeriesName;
VclPtr< FixedText > m_spColorBar;
VclPtr< OutputDevice> m_pDevice;
Link<SeriesHeaderEdit*,void> m_aChangeLink;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
void notifyChanges();
DECL_LINK( SeriesNameChanged, Edit&, void );
DECL_LINK( SeriesNameEdited, Edit&, void );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
static Image GetChartTypeImage(
const Reference< chart2::XChartType > & xChartType,
2010-11-16 18:57:44 -08:00
bool bSwapXAndYAxis
);
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
sal_Int32 m_nStartCol, m_nEndCol;
sal_Int32 m_nWidth;
Point m_aPos;
bool m_bSeriesNameChangePending;
};
SeriesHeader::SeriesHeader( vcl::Window * pParent, vcl::Window *pColorParent ) :
m_spSymbol( VclPtr<FixedImage>::Create( pParent, WB_NOBORDER )),
m_spSeriesName( VclPtr<SeriesHeaderEdit>::Create( pParent )),
m_spColorBar( VclPtr<FixedText>::Create( pColorParent, WB_NOBORDER )),
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
m_pDevice( pParent ),
m_nStartCol( 0 ),
m_nEndCol( 0 ),
m_nWidth( 42 ),
m_aPos( 0, 22 ),
m_bSeriesNameChangePending( false )
{
m_spSeriesName->EnableUpdateData( 4 * EDIT_UPDATEDATA_TIMEOUT ); // define is in vcl/edit.hxx
m_spSeriesName->SetUpdateDataHdl( LINK( this, SeriesHeader, SeriesNameChanged ));
m_spSeriesName->SetModifyHdl( LINK( this, SeriesHeader, SeriesNameEdited ));
Show();
}
SeriesHeader::~SeriesHeader()
{
m_spSymbol.disposeAndClear();
m_spSeriesName.disposeAndClear();
m_spColorBar.disposeAndClear();
}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
void SeriesHeader::notifyChanges()
{
m_aChangeLink.Call( m_spSeriesName.get());
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
m_bSeriesNameChangePending = false;
}
void SeriesHeader::applyChanges()
{
if( m_bSeriesNameChangePending )
{
notifyChanges();
}
}
void SeriesHeader::SetColor( const Color & rCol )
{
m_spColorBar->SetControlBackground( rCol );
}
void SeriesHeader::SetPos( const Point & rPos )
{
m_aPos = rPos;
// chart type symbol
Size aSize( nSymbolHeight, nSymbolHeight );
aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
m_spSymbol->set_width_request(aSize.Width());
m_spSymbol->set_height_request(aSize.Height());
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
// series name edit field
aSize.setWidth(nSymbolDistance);
aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
m_spSeriesName->set_margin_left(aSize.Width() + 2);
aSize.setWidth( m_nWidth - nSymbolHeight - nSymbolDistance );
sal_Int32 nHeight = 12;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
aSize.setHeight( nHeight );
aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
m_spSeriesName->set_width_request(aSize.Width());
m_spSeriesName->set_height_request(aSize.Height());
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
// color bar
aSize.setWidth(1);
aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
m_spColorBar->set_margin_left(aSize.Width() + 2);
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
nHeight = 3;
aSize.setWidth( m_nWidth - 1 );
aSize.setHeight( nHeight );
aSize = m_pDevice->LogicToPixel( aSize, MapUnit::MapAppFont );
m_spColorBar->set_width_request(aSize.Width());
m_spColorBar->set_height_request(aSize.Height());
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
void SeriesHeader::SetWidth( sal_Int32 nWidth )
{
m_nWidth = nWidth;
SetPos( m_aPos );
}
void SeriesHeader::SetPixelWidth( sal_Int32 nWidth )
{
SetWidth( m_pDevice->PixelToLogic( Size( nWidth, 0 ), MapUnit::MapAppFont ).getWidth());
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
void SeriesHeader::SetChartType(
const Reference< chart2::XChartType > & xChartType,
2010-11-16 18:57:44 -08:00
bool bSwapXAndYAxis
)
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
2010-11-16 18:57:44 -08:00
m_spSymbol->SetImage( GetChartTypeImage( xChartType, bSwapXAndYAxis ) );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
void SeriesHeader::SetSeriesName( const OUString & rName )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
m_spSeriesName->SetText( rName );
}
void SeriesHeader::SetRange( sal_Int32 nStartCol, sal_Int32 nEndCol )
{
m_nStartCol = nStartCol;
m_nEndCol = (nEndCol > nStartCol) ? nEndCol : nStartCol;
m_spSeriesName->setStartColumn( nStartCol );
}
void SeriesHeader::Show()
{
m_spSymbol->Show();
m_spSeriesName->Show();
m_spColorBar->Show();
}
void SeriesHeader::Hide()
{
m_spSymbol->Hide();
m_spSeriesName->Hide();
m_spColorBar->Hide();
}
void SeriesHeader::SetEditChangedHdl( const Link<SeriesHeaderEdit*,void> & rLink )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
m_aChangeLink = rLink;
}
IMPL_LINK_NOARG(SeriesHeader, SeriesNameChanged, Edit&, void)
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
notifyChanges();
}
IMPL_LINK_NOARG(SeriesHeader, SeriesNameEdited, Edit&, void)
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
m_bSeriesNameChangePending = true;
}
void SeriesHeader::SetGetFocusHdl( const Link<Control&,void>& rLink )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
m_spSeriesName->SetGetFocusHdl( rLink );
}
bool SeriesHeader::HasFocus() const
{
return m_spSeriesName->HasFocus();
}
Image SeriesHeader::GetChartTypeImage(
const Reference< chart2::XChartType > & xChartType,
2010-11-16 18:57:44 -08:00
bool bSwapXAndYAxis
)
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
Image aResult;
if( !xChartType.is())
return aResult;
OUString aChartTypeName( xChartType->getChartType());
if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_AREA )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
aResult = Image(BitmapEx(BMP_TYPE_AREA));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_COLUMN )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
if( bSwapXAndYAxis )
aResult = Image(BitmapEx(BMP_TYPE_BAR));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
else
aResult = Image(BitmapEx(BMP_TYPE_COLUMN));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_LINE )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
aResult = Image(BitmapEx(BMP_TYPE_LINE));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_SCATTER )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
aResult = Image(BitmapEx(BMP_TYPE_XY));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_PIE )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
aResult = Image(BitmapEx(BMP_TYPE_PIE));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_NET
|| aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
aResult = Image(BitmapEx(BMP_TYPE_NET));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
// @todo: correct image for candle-stick type
aResult = Image(BitmapEx(BMP_TYPE_STOCK));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else if( aChartTypeName == CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE )
CWS-TOOLING: integrate CWS bubblechart 2009-06-17 08:41:14 +0200 hde r273051 : i101635: added new charttype bubble 2009-06-17 08:39:37 +0200 hde r273050 : i101635: created new testcase tCreateNewBubbleChart 2009-06-17 08:38:07 +0200 hde r273049 : i101635: created new testcase tCreateNewBubbleChart 2009-06-15 15:22:32 +0200 hde r272991 : 101635 2009-06-11 12:44:01 +0200 iha r272864 : rebase to dev300m50 2009-06-10 23:27:54 +0200 iha r272841 : CWS-TOOLING: rebase CWS bubblechart to trunk@272827 (milestone: DEV300:m50) 2009-06-04 18:07:35 +0200 iha r272649 : #i64689# Bubble Chart 2009-06-04 17:26:44 +0200 iha r272647 : #i64689# Bubble Chart 2009-06-04 11:24:25 +0200 iha r272618 : #i64689# add more spacing between bubbles and data labels 2009-05-26 18:05:23 +0200 ufi r272314 : i101637 2009-04-22 14:37:50 +0200 iha r271115 : #i64689# bubble chart 2009-04-21 17:52:23 +0200 iha r271052 : #i64689# bubble chart 2009-04-21 17:50:48 +0200 iha r271051 : #i76728# type icon for xy chart 2009-04-21 17:25:52 +0200 iha r271049 : #i76728# type icon for xy chart 2009-04-09 11:18:09 +0200 iha r270685 : #i100977# autoscaling works not correct if missing values should be treated as zero 2009-04-08 16:39:43 +0200 iha r270656 : #i64689# bubble chart - missing value treatment 2009-04-08 15:13:25 +0200 iha r270655 : #i64689# bubble chart - remove unused code 2009-04-08 15:12:19 +0200 iha r270653 : #i64689# bubble chart - determine sereis length correctly on export 2009-04-08 14:22:43 +0200 iha r270650 : #i64689# bubble chart - remove unused code 2009-04-08 14:12:09 +0200 iha r270646 : #i64689# bubble chart - export domains even if no main sequence was found 2009-04-08 14:11:07 +0200 iha r270645 : #i64689# bubble chart - don't replace missing size values with 1.0 2009-04-07 16:20:22 +0200 iha r270602 : #i64689# bubble chart - do not offer percent values for data label display for xy and bubble chart 2009-04-07 16:17:42 +0200 iha r270601 : remove superfluous code 2009-04-06 16:39:32 +0200 iha r270569 : #i64689# bubble chart -correct automatic numberformat detection for axis, data table and data label + transport data label numberformat during copy paste in addition to axis numberformat 2009-04-02 17:33:33 +0200 iha r270427 : use input string for formatting in data table during edit 2009-04-02 16:00:29 +0200 iha r270413 : #i64689# bubble chart - when creating a new series within the data table give it the same number format as the former series, thus the new bubble size values can be edited with the same format immidiately 2009-04-02 11:25:33 +0200 iha r270385 : #i64689# bubble chart -correct automatic numberformat detection for axis, data table and data label + transport data label numberformat during copy paste in addition to axis numberformat 2009-04-01 11:32:03 +0200 iha r270312 : #i64689# bubble chart - add further parameter for view creation 2009-03-31 17:52:08 +0200 iha r270291 : #i64689# bubble chart - scale bubble size with diagram size 2009-03-31 13:38:13 +0200 iha r270278 : #i64689# bubble chart - wrong size for small values < 1 2009-03-27 19:11:07 +0100 iha r270169 : #i64689# bubble chart 2009-03-27 19:07:11 +0100 iha r270168 : #i64689# bubble chart - remove unused code 2009-03-27 18:33:57 +0100 iha r270167 : #i64689# bubble chart - create no shape for invalid sizes 2009-03-27 15:18:21 +0100 iha r270157 : #i76728# type icon for xy chart 2009-03-27 14:34:38 +0100 iha r270156 : #i64689# bubble chart - correct scaling 2009-03-27 14:27:27 +0100 iha r270155 : #i64689# bubble chart - images 2009-03-27 14:25:45 +0100 iha r270154 : #i64689# bubble chart - images 2009-03-27 11:38:57 +0100 iha r270142 : #i64689# bubble chart - values-size is the main series 2009-03-27 11:30:20 +0100 iha r270140 : #i64689# correct order of sequences after load thus switching charttypes afterwards produces expected results now 2009-03-26 10:22:55 +0100 iha r270056 : #i64689# bubble chart 2009-03-24 17:45:15 +0100 iha r269984 : #i64689# bubble chart - user properties from points (not only from the series) 2009-03-24 15:10:57 +0100 dr r269954 : #i64989# export bubble charts to xls 2009-03-24 14:55:29 +0100 dr r269952 : #i64989# import bubble charts from xls 2009-03-24 14:54:46 +0100 dr r269950 : #i64989# import bubble charts from ooxml 2009-03-23 18:59:08 +0100 iha r269895 : further cleanups possible with new member m_aGlobalSeriesImportInfo 2009-03-23 16:54:04 +0100 iha r269886 : #i64689# bubble chart - a single sequence must be interpreted as sizes because of ODF specification 2009-03-23 16:50:43 +0100 iha r269885 : #i64689# save&load bubble chart 2009-03-20 19:30:29 +0100 iha r269826 : CWS-TOOLING: rebase CWS bubblechart to trunk@269781 (milestone: DEV300:m44) 2009-03-19 11:30:33 +0100 iha r269732 : #i64689# rename SchXMLCategoriesDomainContext to SchXMLCategoriesContext avoid confusion with domains 2009-03-18 17:11:13 +0100 iha r269693 : #i64689# add charttype bubble 2009-03-18 17:09:22 +0100 iha r269692 : #i64689# remove unused code 2009-03-13 12:18:26 +0100 iha r269467 : #i64689# corrected lineends 2009-03-12 11:25:14 +0100 iha r269376 : #i64689# bubble chart (part 1)
2009-07-02 19:17:43 +00:00
{
aResult = Image(BitmapEx(BMP_TYPE_BUBBLE));
CWS-TOOLING: integrate CWS bubblechart 2009-06-17 08:41:14 +0200 hde r273051 : i101635: added new charttype bubble 2009-06-17 08:39:37 +0200 hde r273050 : i101635: created new testcase tCreateNewBubbleChart 2009-06-17 08:38:07 +0200 hde r273049 : i101635: created new testcase tCreateNewBubbleChart 2009-06-15 15:22:32 +0200 hde r272991 : 101635 2009-06-11 12:44:01 +0200 iha r272864 : rebase to dev300m50 2009-06-10 23:27:54 +0200 iha r272841 : CWS-TOOLING: rebase CWS bubblechart to trunk@272827 (milestone: DEV300:m50) 2009-06-04 18:07:35 +0200 iha r272649 : #i64689# Bubble Chart 2009-06-04 17:26:44 +0200 iha r272647 : #i64689# Bubble Chart 2009-06-04 11:24:25 +0200 iha r272618 : #i64689# add more spacing between bubbles and data labels 2009-05-26 18:05:23 +0200 ufi r272314 : i101637 2009-04-22 14:37:50 +0200 iha r271115 : #i64689# bubble chart 2009-04-21 17:52:23 +0200 iha r271052 : #i64689# bubble chart 2009-04-21 17:50:48 +0200 iha r271051 : #i76728# type icon for xy chart 2009-04-21 17:25:52 +0200 iha r271049 : #i76728# type icon for xy chart 2009-04-09 11:18:09 +0200 iha r270685 : #i100977# autoscaling works not correct if missing values should be treated as zero 2009-04-08 16:39:43 +0200 iha r270656 : #i64689# bubble chart - missing value treatment 2009-04-08 15:13:25 +0200 iha r270655 : #i64689# bubble chart - remove unused code 2009-04-08 15:12:19 +0200 iha r270653 : #i64689# bubble chart - determine sereis length correctly on export 2009-04-08 14:22:43 +0200 iha r270650 : #i64689# bubble chart - remove unused code 2009-04-08 14:12:09 +0200 iha r270646 : #i64689# bubble chart - export domains even if no main sequence was found 2009-04-08 14:11:07 +0200 iha r270645 : #i64689# bubble chart - don't replace missing size values with 1.0 2009-04-07 16:20:22 +0200 iha r270602 : #i64689# bubble chart - do not offer percent values for data label display for xy and bubble chart 2009-04-07 16:17:42 +0200 iha r270601 : remove superfluous code 2009-04-06 16:39:32 +0200 iha r270569 : #i64689# bubble chart -correct automatic numberformat detection for axis, data table and data label + transport data label numberformat during copy paste in addition to axis numberformat 2009-04-02 17:33:33 +0200 iha r270427 : use input string for formatting in data table during edit 2009-04-02 16:00:29 +0200 iha r270413 : #i64689# bubble chart - when creating a new series within the data table give it the same number format as the former series, thus the new bubble size values can be edited with the same format immidiately 2009-04-02 11:25:33 +0200 iha r270385 : #i64689# bubble chart -correct automatic numberformat detection for axis, data table and data label + transport data label numberformat during copy paste in addition to axis numberformat 2009-04-01 11:32:03 +0200 iha r270312 : #i64689# bubble chart - add further parameter for view creation 2009-03-31 17:52:08 +0200 iha r270291 : #i64689# bubble chart - scale bubble size with diagram size 2009-03-31 13:38:13 +0200 iha r270278 : #i64689# bubble chart - wrong size for small values < 1 2009-03-27 19:11:07 +0100 iha r270169 : #i64689# bubble chart 2009-03-27 19:07:11 +0100 iha r270168 : #i64689# bubble chart - remove unused code 2009-03-27 18:33:57 +0100 iha r270167 : #i64689# bubble chart - create no shape for invalid sizes 2009-03-27 15:18:21 +0100 iha r270157 : #i76728# type icon for xy chart 2009-03-27 14:34:38 +0100 iha r270156 : #i64689# bubble chart - correct scaling 2009-03-27 14:27:27 +0100 iha r270155 : #i64689# bubble chart - images 2009-03-27 14:25:45 +0100 iha r270154 : #i64689# bubble chart - images 2009-03-27 11:38:57 +0100 iha r270142 : #i64689# bubble chart - values-size is the main series 2009-03-27 11:30:20 +0100 iha r270140 : #i64689# correct order of sequences after load thus switching charttypes afterwards produces expected results now 2009-03-26 10:22:55 +0100 iha r270056 : #i64689# bubble chart 2009-03-24 17:45:15 +0100 iha r269984 : #i64689# bubble chart - user properties from points (not only from the series) 2009-03-24 15:10:57 +0100 dr r269954 : #i64989# export bubble charts to xls 2009-03-24 14:55:29 +0100 dr r269952 : #i64989# import bubble charts from xls 2009-03-24 14:54:46 +0100 dr r269950 : #i64989# import bubble charts from ooxml 2009-03-23 18:59:08 +0100 iha r269895 : further cleanups possible with new member m_aGlobalSeriesImportInfo 2009-03-23 16:54:04 +0100 iha r269886 : #i64689# bubble chart - a single sequence must be interpreted as sizes because of ODF specification 2009-03-23 16:50:43 +0100 iha r269885 : #i64689# save&load bubble chart 2009-03-20 19:30:29 +0100 iha r269826 : CWS-TOOLING: rebase CWS bubblechart to trunk@269781 (milestone: DEV300:m44) 2009-03-19 11:30:33 +0100 iha r269732 : #i64689# rename SchXMLCategoriesDomainContext to SchXMLCategoriesContext avoid confusion with domains 2009-03-18 17:11:13 +0100 iha r269693 : #i64689# add charttype bubble 2009-03-18 17:09:22 +0100 iha r269692 : #i64689# remove unused code 2009-03-13 12:18:26 +0100 iha r269467 : #i64689# corrected lineends 2009-03-12 11:25:14 +0100 iha r269376 : #i64689# bubble chart (part 1)
2009-07-02 19:17:43 +00:00
}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
return aResult;
}
} // namespace impl
namespace
{
/** returns false, if no header as the focus.
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
If a header has the focus, true is returned and the index of the header
with focus is set at pIndex if pOutIndex is not 0.
*/
bool lcl_SeriesHeaderHasFocus(
const std::vector< std::shared_ptr< ::chart::impl::SeriesHeader > > & rSeriesHeader,
sal_Int32 * pOutIndex = nullptr )
{
sal_Int32 nIndex = 0;
for( auto aIt = rSeriesHeader.begin(); aIt != rSeriesHeader.end(); ++aIt, ++nIndex )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
if( (*aIt)->HasFocus())
{
if( pOutIndex )
*pOutIndex = nIndex;
return true;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
}
return false;
}
sal_Int32 lcl_getColumnInDataOrHeader(
sal_uInt16 nCol, const std::vector< std::shared_ptr< ::chart::impl::SeriesHeader > > & rSeriesHeader )
{
sal_Int32 nColIdx = 0;
bool bHeaderHasFocus( lcl_SeriesHeaderHasFocus( rSeriesHeader, &nColIdx ));
if( bHeaderHasFocus )
nColIdx = lcl_getColumnInData( static_cast< sal_uInt16 >( rSeriesHeader[nColIdx]->GetStartColumn()));
else
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
nColIdx = lcl_getColumnInData( nCol );
return nColIdx;
}
} // anonymous namespace
DataBrowser::DataBrowser( vcl::Window* pParent, WinBits nStyle, bool bLiveUpdate ) :
::svt::EditBrowseBox( pParent, EditBrowseBoxFlags::SMART_TAB_TRAVEL | EditBrowseBoxFlags::HANDLE_COLUMN_TEXT, nStyle, BrowserStdFlags ),
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
m_nSeekRow( 0 ),
m_bIsReadOnly( false ),
m_bIsDirty( false ),
m_bLiveUpdate( bLiveUpdate ),
m_bDataValid( true ),
m_aNumberEditField( VclPtr<FormattedField>::Create( & EditBrowseBox::GetDataWindow(), WB_NOBORDER ) ),
m_aTextEditField( VclPtr<Edit>::Create( & EditBrowseBox::GetDataWindow(), WB_NOBORDER ) ),
m_rNumberEditController( new ::svt::FormattedFieldCellController( m_aNumberEditField.get() )),
m_rTextEditController( new ::svt::EditCellController( m_aTextEditField.get() ))
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
double fNan;
::rtl::math::setNan( & fNan );
m_aNumberEditField->SetDefaultValue( fNan );
m_aNumberEditField->TreatAsNumber( true );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
RenewTable();
SetClean();
}
DataBrowser::~DataBrowser()
{
disposeOnce();
}
void DataBrowser::dispose()
{
m_aNumberEditField.disposeAndClear();
m_aTextEditField.disposeAndClear();
::svt::EditBrowseBox::dispose();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
bool DataBrowser::MayInsertRow() const
{
return ! IsReadOnly()
&& ( !lcl_SeriesHeaderHasFocus( m_aSeriesHeaders ));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
bool DataBrowser::MayInsertColumn() const
{
return ! IsReadOnly();
}
bool DataBrowser::MayDeleteRow() const
{
return ! IsReadOnly()
&& ( !lcl_SeriesHeaderHasFocus( m_aSeriesHeaders ))
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
&& ( GetCurRow() >= 0 )
&& ( GetRowCount() > 1 );
}
bool DataBrowser::MayDeleteColumn() const
{
// if a series header has the focus
if( lcl_SeriesHeaderHasFocus( m_aSeriesHeaders ))
return true;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
return ! IsReadOnly()
&& ( GetCurColumnId() > 1 )
&& ( ColCount() > 2 );
}
bool DataBrowser::MayMoveUpRows() const
{
return ! IsReadOnly()
&& ( !lcl_SeriesHeaderHasFocus( m_aSeriesHeaders ))
&& ( GetCurRow() > 0 )
&& ( GetCurRow() <= GetRowCount() - 1 );
}
bool DataBrowser::MayMoveDownRows() const
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
return ! IsReadOnly()
&& ( !lcl_SeriesHeaderHasFocus( m_aSeriesHeaders ))
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
&& ( GetCurRow() >= 0 )
&& ( GetCurRow() < GetRowCount() - 1 );
}
bool DataBrowser::MayMoveLeftColumns() const
{
// if a series header (except the last one) has the focus
{
sal_Int32 nColIndex(0);
if( lcl_SeriesHeaderHasFocus( m_aSeriesHeaders, &nColIndex ))
return (static_cast< sal_uInt32 >( nColIndex ) <= (m_aSeriesHeaders.size() - 1)) && (static_cast< sal_uInt32 >( nColIndex ) != 0);
}
sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders );
return ! IsReadOnly()
&& ( nColIdx > 1 )
&& ( nColIdx <= ColCount() - 2 )
&& m_apDataBrowserModel.get()
&& !m_apDataBrowserModel->isCategoriesColumn( nColIdx );
}
bool DataBrowser::MayMoveRightColumns() const
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
// if a series header (except the last one) has the focus
{
sal_Int32 nColIndex(0);
if( lcl_SeriesHeaderHasFocus( m_aSeriesHeaders, &nColIndex ))
return (static_cast< sal_uInt32 >( nColIndex ) < (m_aSeriesHeaders.size() - 1));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
return ! IsReadOnly()
&& ( nColIdx > 0 )
&& ( nColIdx < ColCount()-2 )
&& m_apDataBrowserModel.get()
&& !m_apDataBrowserModel->isCategoriesColumn( nColIdx );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
void DataBrowser::clearHeaders()
{
for( const auto& spHeader : m_aSeriesHeaders )
spHeader->applyChanges();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
m_aSeriesHeaders.clear();
}
void DataBrowser::RenewTable()
{
if( ! m_apDataBrowserModel.get())
return;
long nOldRow = GetCurRow();
sal_uInt16 nOldColId = GetCurColumnId();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
bool bLastUpdateMode = GetUpdateMode();
SetUpdateMode( false );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
if( IsModified() )
SaveModified();
DeactivateCell();
RemoveColumns();
RowRemoved( 1, GetRowCount() );
// for row numbers
InsertHandleColumn( static_cast< sal_uInt16 >(
GetDataWindow().LogicToPixel( Size( 42, 0 )).getWidth() ));
OUString aDefaultSeriesName(SCH_RESSTR(STR_COLUMN_LABEL));
replaceParamterInString( aDefaultSeriesName, "%COLUMNNUMBER", OUString::number( 24 ) );
sal_Int32 nColumnWidth = GetDataWindow().GetTextWidth( aDefaultSeriesName )
+ GetDataWindow().LogicToPixel( Point( 4 + impl::SeriesHeader::GetRelativeAppFontXPosForNameField(), 0 ), MapUnit::MapAppFont ).X();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
sal_Int32 nColumnCount = m_apDataBrowserModel->getColumnCount();
// nRowCount is a member of a base class
sal_Int32 nRowCountLocal = m_apDataBrowserModel->getMaxRowCount();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
for( sal_Int32 nColIdx=1; nColIdx<=nColumnCount; ++nColIdx )
{
InsertDataColumn( static_cast< sal_uInt16 >( nColIdx ), GetColString( nColIdx ), nColumnWidth );
}
RowInserted( 1, nRowCountLocal );
GoToRow( std::min( nOldRow, GetRowCount() - 1 ));
GoToColumnId( std::min( nOldColId, static_cast< sal_uInt16 >( ColCount() - 1 )));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
Dialog* pDialog = GetParentDialog();
vcl::Window* pWin = pDialog->get<VclContainer>("columns");
vcl::Window* pColorWin = pDialog->get<VclContainer>("colorcolumns");
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
// fill series headers
clearHeaders();
const DataBrowserModel::tDataHeaderVector& aHeaders( m_apDataBrowserModel->getDataHeaders());
Link<Control&,void> aFocusLink( LINK( this, DataBrowser, SeriesHeaderGotFocus ));
Link<impl::SeriesHeaderEdit*,void> aSeriesHeaderChangedLink( LINK( this, DataBrowser, SeriesHeaderChanged ));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
for( DataBrowserModel::tDataHeaderVector::const_iterator aIt( aHeaders.begin());
aIt != aHeaders.end(); ++aIt )
{
std::shared_ptr< impl::SeriesHeader > spHeader( new impl::SeriesHeader( pWin, pColorWin ));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
Reference< beans::XPropertySet > xSeriesProp( aIt->m_xDataSeries, uno::UNO_QUERY );
sal_Int32 nColor = 0;
// @todo: Set "DraftColor", i.e. interpolated colors for gradients, bitmaps, etc.
if( xSeriesProp.is() &&
( xSeriesProp->getPropertyValue( "Color" ) >>= nColor ))
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
spHeader->SetColor( Color( nColor ));
spHeader->SetChartType( aIt->m_xChartType, aIt->m_bSwapXAndYAxis );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
spHeader->SetSeriesName(
OUString( DataSeriesHelper::getDataSeriesLabel(
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
aIt->m_xDataSeries,
(aIt->m_xChartType.is() ?
aIt->m_xChartType->getRoleOfSequenceForSeriesLabel() :
OUString("values-y")))));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
// index is 1-based, as 0 is for the column that contains the row-numbers
spHeader->SetRange( aIt->m_nStartColumn + 1, aIt->m_nEndColumn + 1 );
spHeader->SetGetFocusHdl( aFocusLink );
spHeader->SetEditChangedHdl( aSeriesHeaderChangedLink );
m_aSeriesHeaders.push_back( spHeader );
}
ImplAdjustHeaderControls();
SetDirty();
SetUpdateMode( bLastUpdateMode );
ActivateCell();
Invalidate();
}
OUString DataBrowser::GetColString( sal_Int32 nColumnId ) const
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
OSL_ASSERT( m_apDataBrowserModel.get());
if( nColumnId > 0 )
return OUString( m_apDataBrowserModel->getRoleOfColumn( nColumnId - 1 ));
return OUString();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
OUString aResult;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
if( nColumnId == 0 )
{
aResult = OUString::number(static_cast< sal_Int32 >( nRow ) + 1);
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else if( nRow >= 0 && m_apDataBrowserModel.get())
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
sal_Int32 nColIndex = static_cast< sal_Int32 >( nColumnId ) - 1;
if( m_apDataBrowserModel->getCellType( nColIndex, nRow ) == DataBrowserModel::NUMBER )
{
double fData( m_apDataBrowserModel->getCellNumber( nColIndex, nRow ));
sal_Int32 nLabelColor;
if( ! ::rtl::math::isNan( fData ) &&
m_spNumberFormatterWrapper.get() )
{
bool bColorChanged = false;
aResult = m_spNumberFormatterWrapper->getFormattedString(
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
GetNumberFormatKey( nRow, nColumnId ),
fData, nLabelColor, bColorChanged );
}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else if( m_apDataBrowserModel->getCellType( nColIndex, nRow ) == DataBrowserModel::TEXTORDATE )
{
uno::Any aAny = m_apDataBrowserModel->getCellAny( nColIndex, nRow );
OUString aText;
double fDouble=0.0;
if( aAny>>=aText )
aResult = aText;
else if( aAny>>=fDouble )
{
if( ! ::rtl::math::isNan( fDouble ) && m_spNumberFormatterWrapper.get() )
{
// If a numberformat was available here we could directly
// obtain the corresponding edit format in
// getDateTimeInputNumberFormat() instead of doing the
// guess work.
sal_Int32 nNumberFormat = DiagramHelper::getDateTimeInputNumberFormat(
Reference< util::XNumberFormatsSupplier >( m_xChartDoc, uno::UNO_QUERY), fDouble );
sal_Int32 nLabelColor;
bool bColorChanged = false;
aResult = m_spNumberFormatterWrapper->getFormattedString(
nNumberFormat, fDouble, nLabelColor, bColorChanged );
}
}
}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
else
{
OSL_ASSERT( m_apDataBrowserModel->getCellType( nColIndex, nRow ) == DataBrowserModel::TEXT );
aResult = m_apDataBrowserModel->getCellText( nColIndex, nRow );
}
}
return aResult;
}
double DataBrowser::GetCellNumber( long nRow, sal_uInt16 nColumnId ) const
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
double fResult;
::rtl::math::setNan( & fResult );
if(( nColumnId >= 1 ) && ( nRow >= 0 ) &&
m_apDataBrowserModel.get())
{
fResult = m_apDataBrowserModel->getCellNumber(
static_cast< sal_Int32 >( nColumnId ) - 1, nRow );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
return fResult;
}
void DataBrowser::Resize()
{
bool bLastUpdateMode = GetUpdateMode();
SetUpdateMode( false );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
::svt::EditBrowseBox::Resize();
ImplAdjustHeaderControls();
SetUpdateMode( bLastUpdateMode );
}
void DataBrowser::SetReadOnly( bool bNewState )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
if( m_bIsReadOnly != bNewState )
{
m_bIsReadOnly = bNewState;
Invalidate();
DeactivateCell();
}
}
void DataBrowser::SetClean()
{
m_bIsDirty = false;
}
void DataBrowser::SetDirty()
{
if( !m_bLiveUpdate )
m_bIsDirty = true;
}
void DataBrowser::CursorMoved()
{
EditBrowseBox::CursorMoved();
if( GetUpdateMode() )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
m_aCursorMovedHdlLink.Call( this );
}
void DataBrowser::MouseButtonDown( const BrowserMouseEvent& rEvt )
{
if( !m_bDataValid )
ShowWarningBox();
else
EditBrowseBox::MouseButtonDown( rEvt );
}
void DataBrowser::ShowWarningBox()
{
ScopedVclPtrInstance<WarningBox>(this, WinBits( WB_OK ),
SCH_RESSTR(STR_INVALID_NUMBER))->Execute();
}
bool DataBrowser::ShowQueryBox()
{
ScopedVclPtrInstance<QueryBox> pQueryBox(this, WB_YES_NO, SCH_RESSTR(STR_DATA_EDITOR_INCORRECT_INPUT));
return pQueryBox->Execute() == RET_YES;
}
bool DataBrowser::IsDataValid()
{
bool bValid = true;
const sal_Int32 nRow = lcl_getRowInData( GetCurRow());
const sal_Int32 nCol = lcl_getColumnInData( GetCurColumnId());
if( m_apDataBrowserModel->getCellType( nCol, nRow ) == DataBrowserModel::NUMBER )
{
sal_uInt32 nDummy = 0;
double fDummy = 0.0;
OUString aText( m_aNumberEditField->GetText());
if( !aText.isEmpty() &&
m_spNumberFormatterWrapper.get() &&
m_spNumberFormatterWrapper->getSvNumberFormatter() &&
! m_spNumberFormatterWrapper->getSvNumberFormatter()->IsNumberFormat(
aText, nDummy, fDummy ))
{
bValid = false;
}
}
return bValid;
}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
void DataBrowser::CellModified()
{
m_bDataValid = IsDataValid();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
SetDirty();
m_aCursorMovedHdlLink.Call( this );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
void DataBrowser::SetDataFromModel(
const Reference< chart2::XChartDocument > & xChartDoc,
const Reference< uno::XComponentContext > & xContext )
{
if( m_bLiveUpdate )
{
m_xChartDoc.set( xChartDoc );
}
else
{
Reference< util::XCloneable > xCloneable( xChartDoc, uno::UNO_QUERY );
if( xCloneable.is())
m_xChartDoc.set( xCloneable->createClone(), uno::UNO_QUERY );
}
m_apDataBrowserModel.reset( new DataBrowserModel( m_xChartDoc, xContext ));
m_spNumberFormatterWrapper.reset(
new NumberFormatterWrapper(
Reference< util::XNumberFormatsSupplier >( m_xChartDoc, uno::UNO_QUERY )));
if( m_spNumberFormatterWrapper.get() )
m_aNumberEditField->SetFormatter( m_spNumberFormatterWrapper->getSvNumberFormatter() );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
RenewTable();
const sal_Int32 nColCnt = m_apDataBrowserModel->getColumnCount();
const sal_Int32 nRowCnt = m_apDataBrowserModel->getMaxRowCount();
if( nRowCnt && nColCnt )
{
GoToRow( 0 );
GoToColumnId( 1 );
}
SetClean();
}
void DataBrowser::InsertColumn()
{
sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders );
if( nColIdx >= 0 &&
m_apDataBrowserModel.get())
{
// save changes made to edit-field
if( IsModified() )
SaveModified();
m_apDataBrowserModel->insertDataSeries( nColIdx );
RenewTable();
}
}
void DataBrowser::InsertTextColumn()
{
sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders );
if( nColIdx >= 0 &&
m_apDataBrowserModel.get())
{
// save changes made to edit-field
if( IsModified() )
SaveModified();
m_apDataBrowserModel->insertComplexCategoryLevel( nColIdx );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
RenewTable();
}
}
void DataBrowser::RemoveColumn()
{
sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders );
if( nColIdx >= 0 &&
m_apDataBrowserModel.get())
{
// save changes made to edit-field
if( IsModified() )
SaveModified();
m_bDataValid = true;
m_apDataBrowserModel->removeDataSeriesOrComplexCategoryLevel( nColIdx );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
RenewTable();
}
}
void DataBrowser::InsertRow()
{
sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow());
if( nRowIdx >= 0 &&
m_apDataBrowserModel.get())
{
// save changes made to edit-field
if( IsModified() )
SaveModified();
m_apDataBrowserModel->insertDataPointForAllSeries( nRowIdx );
RenewTable();
}
}
void DataBrowser::RemoveRow()
{
sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow());
if( nRowIdx >= 0 &&
m_apDataBrowserModel.get())
{
// save changes made to edit-field
if( IsModified() )
SaveModified();
m_bDataValid = true;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
m_apDataBrowserModel->removeDataPointForAllSeries( nRowIdx );
RenewTable();
}
}
void DataBrowser::MoveLeftColumn()
{
sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders );
if( nColIdx > 0 &&
m_apDataBrowserModel.get())
{
// save changes made to edit-field
if( IsModified() )
SaveModified();
m_apDataBrowserModel->swapDataSeries( nColIdx - 1 );
// keep cursor in swapped column
if(( 0 < GetCurColumnId() ) && ( GetCurColumnId() <= ColCount() - 1 ))
{
Dispatch( BROWSER_CURSORLEFT );
}
RenewTable();
}
}
void DataBrowser::MoveRightColumn()
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
sal_Int32 nColIdx = lcl_getColumnInDataOrHeader( GetCurColumnId(), m_aSeriesHeaders );
if( nColIdx >= 0 &&
m_apDataBrowserModel.get())
{
// save changes made to edit-field
if( IsModified() )
SaveModified();
m_apDataBrowserModel->swapDataSeries( nColIdx );
// keep cursor in swapped column
if( GetCurColumnId() < ColCount() - 1 )
{
Dispatch( BROWSER_CURSORRIGHT );
}
RenewTable();
}
}
void DataBrowser::MoveUpRow()
{
sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow());
if( nRowIdx > 0 &&
m_apDataBrowserModel.get())
{
// save changes made to edit-field
if( IsModified() )
SaveModified();
m_apDataBrowserModel->swapDataPointForAllSeries( nRowIdx - 1 );
// keep cursor in swapped row
if(( 0 < GetCurRow() ) && ( GetCurRow() <= GetRowCount() - 1 ))
{
Dispatch( BROWSER_CURSORUP );
}
RenewTable();
}
}
void DataBrowser::MoveDownRow()
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow());
if( nRowIdx >= 0 &&
m_apDataBrowserModel.get())
{
// save changes made to edit-field
if( IsModified() )
SaveModified();
m_apDataBrowserModel->swapDataPointForAllSeries( nRowIdx );
// keep cursor in swapped row
if( GetCurRow() < GetRowCount() - 1 )
{
Dispatch( BROWSER_CURSORDOWN );
}
RenewTable();
}
}
void DataBrowser::SetCursorMovedHdl( const Link<DataBrowser*,void>& rLink )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
m_aCursorMovedHdlLink = rLink;
}
// implementations for ::svt::EditBrowseBox (pure virtual methods)
void DataBrowser::PaintCell(
OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
Point aPos( rRect.TopLeft());
aPos.X() += 1;
OUString aText = GetCellText( m_nSeekRow, nColumnId );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
Size TxtSize( GetDataWindow().GetTextWidth( aText ), GetDataWindow().GetTextHeight());
// clipping
if( aPos.X() < rRect.Right() || aPos.X() + TxtSize.Width() > rRect.Right() ||
aPos.Y() < rRect.Top() || aPos.Y() + TxtSize.Height() > rRect.Bottom())
rDev.SetClipRegion(vcl::Region(rRect));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
// allow for a disabled control ...
bool bEnabled = IsEnabled();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
Color aOriginalColor = rDev.GetTextColor();
if( ! bEnabled )
rDev.SetTextColor( GetSettings().GetStyleSettings().GetDisableColor() );
// draw the text
rDev.DrawText( aPos, aText );
// reset the color (if necessary)
if( ! bEnabled )
rDev.SetTextColor( aOriginalColor );
if( rDev.IsClipRegion())
rDev.SetClipRegion();
}
bool DataBrowser::SeekRow( long nRow )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
if( ! EditBrowseBox::SeekRow( nRow ))
return false;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
if( nRow < 0 )
m_nSeekRow = - 1;
else
m_nSeekRow = nRow;
return true;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
bool DataBrowser::IsTabAllowed( bool bForward ) const
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
long nRow = GetCurRow();
long nCol = GetCurColumnId();
// column 0 is header-column
long nBadCol = bForward
? GetColumnCount() - 1
: 1;
long nBadRow = bForward
? GetRowCount() - 1
: 0;
if( !m_bDataValid )
{
const_cast< DataBrowser* >( this )->ShowWarningBox();
return false;
}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
return ( nRow != nBadRow ||
nCol != nBadCol );
}
::svt::CellController* DataBrowser::GetController( long nRow, sal_uInt16 nCol )
{
if( m_bIsReadOnly )
return nullptr;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
if( CellContainsNumbers( nRow, nCol ))
{
m_aNumberEditField->UseInputStringForFormatting();
m_aNumberEditField->SetFormatKey( GetNumberFormatKey( nRow, nCol ));
return m_rNumberEditController.get();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
return m_rTextEditController.get();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
void DataBrowser::InitController(
::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol )
{
if( rController == m_rTextEditController )
{
OUString aText( GetCellText( nRow, nCol ) );
m_aTextEditField->SetText( aText );
m_aTextEditField->SetSelection( Selection( 0, aText.getLength() ));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else if( rController == m_rNumberEditController )
{
// treat invalid and empty text as Nan
m_aNumberEditField->EnableNotANumber( true );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
if( ::rtl::math::isNan( GetCellNumber( nRow, nCol )))
m_aNumberEditField->SetTextValue( OUString());
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
else
m_aNumberEditField->SetValue( GetCellNumber( nRow, nCol ) );
OUString aText( m_aNumberEditField->GetText());
m_aNumberEditField->SetSelection( Selection( 0, aText.getLength()));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else
{
2011-03-01 19:05:02 +01:00
OSL_FAIL( "Invalid Controller" );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
}
bool DataBrowser::CellContainsNumbers( sal_Int32 nRow, sal_uInt16 nCol ) const
{
if( ! m_apDataBrowserModel.get())
return false;
return (m_apDataBrowserModel->getCellType( lcl_getColumnInData( nCol ), lcl_getRowInData( nRow )) ==
DataBrowserModel::NUMBER);
}
sal_uInt32 DataBrowser::GetNumberFormatKey( sal_Int32 nRow, sal_uInt16 nCol ) const
{
if( ! m_apDataBrowserModel.get())
return 0;
return m_apDataBrowserModel->getNumberFormatKey( lcl_getColumnInData( nCol ), lcl_getRowInData( nRow ));
}
bool DataBrowser::isDateTimeString( const OUString& aInputString, double& fOutDateTimeValue )
{
sal_uInt32 nNumberFormat=0;
SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : nullptr;
if( !aInputString.isEmpty() && pSvNumberFormatter && pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, fOutDateTimeValue ) )
{
short nType = pSvNumberFormatter->GetType( nNumberFormat);
return (nType & util::NumberFormat::DATE) || (nType & util::NumberFormat::TIME);
}
return false;
}
bool DataBrowser::SaveModified()
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
if( ! IsModified() )
return true;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
bool bChangeValid = true;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
const sal_Int32 nRow = lcl_getRowInData( GetCurRow());
const sal_Int32 nCol = lcl_getColumnInData( GetCurColumnId());
OSL_ENSURE( nRow >= 0 || nCol >= 0, "This cell should not be modified!" );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : nullptr;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
switch( m_apDataBrowserModel->getCellType( nCol, nRow ))
{
case DataBrowserModel::NUMBER:
{
sal_uInt32 nDummy = 0;
double fDummy = 0.0;
OUString aText( m_aNumberEditField->GetText());
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
// an empty string is valid, if no numberformatter exists, all
// values are treated as valid
if( !aText.isEmpty() && pSvNumberFormatter &&
! pSvNumberFormatter->IsNumberFormat( aText, nDummy, fDummy ) )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
bChangeValid = false;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else
{
double fData = m_aNumberEditField->GetValue();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
bChangeValid = m_apDataBrowserModel->setCellNumber( nCol, nRow, fData );
}
}
break;
case DataBrowserModel::TEXTORDATE:
{
OUString aText( m_aTextEditField->GetText() );
double fValue = 0.0;
bChangeValid = false;
if( isDateTimeString( aText, fValue ) )
bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, uno::Any( fValue ) );
if(!bChangeValid)
bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, uno::Any( aText ) );
}
break;
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
case DataBrowserModel::TEXT:
{
OUString aText( m_aTextEditField->GetText());
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
bChangeValid = m_apDataBrowserModel->setCellText( nCol, nRow, aText );
}
break;
}
// the first valid change changes this to true
if( bChangeValid )
{
RowModified( GetCurRow(), GetCurColumnId());
::svt::CellController* pCtrl = GetController( GetCurRow(), GetCurColumnId());
if( pCtrl )
pCtrl->ClearModified();
SetDirty();
}
return bChangeValid;
}
bool DataBrowser::EndEditing()
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
SaveModified();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
// apply changes made to series headers
for( const auto& spHeader : m_aSeriesHeaders )
spHeader->applyChanges();
if( m_bDataValid )
return true;
else
return ShowQueryBox();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
void DataBrowser::ColumnResized( sal_uInt16 nColId )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
bool bLastUpdateMode = GetUpdateMode();
SetUpdateMode( false );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
EditBrowseBox::ColumnResized( nColId );
ImplAdjustHeaderControls();
SetUpdateMode( bLastUpdateMode );
}
void DataBrowser::EndScroll()
{
bool bLastUpdateMode = GetUpdateMode();
SetUpdateMode( false );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
EditBrowseBox::EndScroll();
RenewSeriesHeaders();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
SetUpdateMode( bLastUpdateMode );
}
void DataBrowser::RenewSeriesHeaders()
{
Dialog* pDialog = GetParentDialog();
vcl::Window* pWin = pDialog->get<VclContainer>("columns");
vcl::Window* pColorWin = pDialog->get<VclContainer>("colorcolumns");
clearHeaders();
DataBrowserModel::tDataHeaderVector aHeaders( m_apDataBrowserModel->getDataHeaders());
Link<Control&,void> aFocusLink( LINK( this, DataBrowser, SeriesHeaderGotFocus ));
Link<impl::SeriesHeaderEdit*,void> aSeriesHeaderChangedLink( LINK( this, DataBrowser, SeriesHeaderChanged ));
for( DataBrowserModel::tDataHeaderVector::const_iterator aIt( aHeaders.begin());
aIt != aHeaders.end(); ++aIt )
{
std::shared_ptr< impl::SeriesHeader > spHeader( new impl::SeriesHeader( pWin, pColorWin ));
Reference< beans::XPropertySet > xSeriesProp( aIt->m_xDataSeries, uno::UNO_QUERY );
sal_Int32 nColor = 0;
if( xSeriesProp.is() &&
( xSeriesProp->getPropertyValue( "Color" ) >>= nColor ))
spHeader->SetColor( Color( nColor ));
spHeader->SetChartType( aIt->m_xChartType, aIt->m_bSwapXAndYAxis );
spHeader->SetSeriesName(
DataSeriesHelper::getDataSeriesLabel(
aIt->m_xDataSeries,
(aIt->m_xChartType.is() ?
aIt->m_xChartType->getRoleOfSequenceForSeriesLabel() :
OUString( "values-y"))));
spHeader->SetRange( aIt->m_nStartColumn + 1, aIt->m_nEndColumn + 1 );
spHeader->SetGetFocusHdl( aFocusLink );
spHeader->SetEditChangedHdl( aSeriesHeaderChangedLink );
m_aSeriesHeaders.push_back( spHeader );
}
ImplAdjustHeaderControls();
}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
void DataBrowser::ImplAdjustHeaderControls()
{
sal_uInt16 nColCount = this->GetColumnCount();
sal_uInt32 nCurrentPos = this->GetPosPixel().getX();
sal_uInt32 nMaxPos = nCurrentPos + this->GetOutputSizePixel().getWidth();
sal_uInt32 nStartPos = nCurrentPos;
// width of header column
nCurrentPos += this->GetColumnWidth( 0 );
Dialog* pDialog = GetParentDialog();
vcl::Window* pWin = pDialog->get<VclContainer>("columns");
vcl::Window* pColorWin = pDialog->get<VclContainer>("colorcolumns");
pWin->set_margin_left(nCurrentPos);
pColorWin->set_margin_left(nCurrentPos);
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
tSeriesHeaderContainer::iterator aIt( m_aSeriesHeaders.begin());
sal_uInt16 i = GetFirstVisibleColNumber();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
while( (aIt != m_aSeriesHeaders.end()) && ((*aIt)->GetStartColumn() < i) )
{
(*aIt)->Hide();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
++aIt;
}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
for( ; i < nColCount && aIt != m_aSeriesHeaders.end(); ++i )
{
if( (*aIt)->GetStartColumn() == i )
nStartPos = nCurrentPos;
nCurrentPos += (this->GetColumnWidth( i ));
if( (*aIt)->GetEndColumn() == i )
{
if( nStartPos < nMaxPos )
{
(*aIt)->SetPixelWidth( nCurrentPos - nStartPos - 3 );
(*aIt)->Show();
if (pWin)
{
pWin->set_margin_left(nStartPos);
pColorWin->set_margin_left(nStartPos);
pWin = pColorWin = nullptr;
}
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
else
(*aIt)->Hide();
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
++aIt;
}
}
}
IMPL_LINK( DataBrowser, SeriesHeaderGotFocus, Control&, rControl, void )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
impl::SeriesHeaderEdit* pEdit = static_cast<impl::SeriesHeaderEdit*>(&rControl);
pEdit->SetShowWarningBox( !m_bDataValid );
if( !m_bDataValid )
GoToCell( 0, 0 );
else
{
MakeFieldVisible( GetCurRow(), static_cast< sal_uInt16 >( pEdit->getStartColumn()) );
ActivateCell();
m_aCursorMovedHdlLink.Call( this );
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
}
IMPL_LINK( DataBrowser, SeriesHeaderChanged, impl::SeriesHeaderEdit*, pEdit, void )
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
{
if( pEdit )
{
Reference< chart2::XDataSeries > xSeries(
m_apDataBrowserModel->getDataSeriesByColumn( pEdit->getStartColumn() - 1 ));
Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY );
if( xSource.is())
{
Reference< chart2::XChartType > xChartType(
m_apDataBrowserModel->getHeaderForSeries( xSeries ).m_xChartType );
if( xChartType.is())
{
Reference< chart2::data::XLabeledDataSequence > xLabeledSeq(
DataSeriesHelper::getDataSequenceByRole( xSource, xChartType->getRoleOfSequenceForSeriesLabel()));
if( xLabeledSeq.is())
{
Reference< container::XIndexReplace > xIndexReplace( xLabeledSeq->getLabel(), uno::UNO_QUERY );
if( xIndexReplace.is())
xIndexReplace->replaceByIndex(
0, uno::Any( OUString( pEdit->GetText())));
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED 2007/03/26 15:37:33 bm 1.1.2.18: #i73162# allow column-based commands also in header columns 2007/02/09 12:23:25 bm 1.1.2.17: #i73171# warning box if invalid number was entered 2007/02/08 21:25:31 iha 1.1.2.16: resync m195 -> m202 2007/01/12 16:10:46 bm 1.1.2.15: #i74172# Don't show #1.NAN for empty number cells 2006/12/12 14:39:59 bm 1.1.2.14: #i71845# allow changes with mouse click, make first cell visible in xy-charts 2006/12/08 16:38:55 bm 1.1.2.13: #i72361# setting help id for edit field containing the series labels 2006/11/20 13:40:35 bm 1.1.2.12: do not clear first cell (was always empty in old chart but no longer is) 2006/07/25 16:46:02 bm 1.1.2.11: #i64824# handle number formats in the data browser 2006/07/19 15:55:23 bm 1.1.2.10: #i64824# improvement of the data editor for internal data. Especially the handling of flexible data and series with more than one role 2006/03/13 16:54:40 bm 1.1.2.9: #126133# add changes made to sch/../databrws.cxx also here 2006/03/08 17:53:15 bm 1.1.2.8: new UI design for data dialog 2006/03/08 10:38:51 bm 1.1.2.7: new UI for DataEditor. Define TEST_NEW_UI in dlg_DataEditor.hrc to activate 2005/10/11 09:20:04 bm 1.1.2.6: license header change 2005/08/19 14:29:37 bm 1.1.2.5: remove sort functionality 2005/08/19 09:10:12 bm 1.1.2.4: deletion of rows/columns corrected, swapping implemented 2005/08/18 16:29:48 bm 1.1.2.3: +add/remove columns/rows 2005/08/18 14:10:16 bm 1.1.2.2: internal data in in rows 2005/08/17 16:52:56 bm 1.1.2.1: data editor for standalone data (first approach)
2007-05-22 16:27:33 +00:00
}
}
}
}
}
} // namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */