Files
libreoffice/xmloff/source/chart/SchXMLTableContext.cxx

1172 lines
47 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 16:07:07 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:07:07 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:07:07 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 16:07:07 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 16:07:07 +00:00
*
************************************************************************/
#include <sax/tools/converter.hxx>
2000-09-18 16:07:07 +00:00
#include "SchXMLTableContext.hxx"
#include "SchXMLParagraphContext.hxx"
#include "SchXMLTextListContext.hxx"
2000-09-18 16:07:07 +00:00
#include "SchXMLImport.hxx"
#include "SchXMLTools.hxx"
2000-09-18 16:07:07 +00:00
#include "transporttypes.hxx"
#include "XMLStringBufferImportContext.hxx"
#include <rtl/math.hxx>
#include "xmloff/xmlnmspe.hxx"
#include <xmloff/xmltoken.hxx>
#include <xmloff/nmspmap.hxx>
2000-09-18 16:07:07 +00:00
#include <com/sun/star/frame/XModel.hpp>
2010-11-30 01:45:03 +01:00
#include <com/sun/star/chart2/XAnyDescriptionAccess.hpp>
CWS-TOOLING: integrate CWS koheichart01 2009-05-15 06:32:38 +0200 hde r271925 : header fixed 2009-04-14 16:23:35 +0200 hde r270792 : #100231# 2009-04-14 16:13:48 +0200 hde r270790 : #100231# 2009-04-14 15:56:14 +0200 hde r270787 : #100231# 2009-04-14 14:28:40 +0200 hde r270767 : #100231# 2009-04-14 14:27:30 +0200 hde r270766 : #100231# 2009-04-14 09:43:07 +0200 hde r270749 : #100231# 2009-04-14 09:25:52 +0200 hde r270748 : #100231# 2009-03-25 16:18:26 +0100 iha r270034 : #i91578# removed compiler warning 2009-03-25 03:20:36 +0100 kohei r269992 : fixed a silly typo in in-line comment. 2009-03-24 17:03:57 +0100 kohei r269977 : Let's use row and column's hidden flags, instead of width/height, to determine cell's hidden state. 2009-03-24 16:53:10 +0100 kohei r269973 : The chart positioner no longer needs to skip hidden cells, as hidden cells are handled elsewhere. 2009-03-24 16:50:12 +0100 kohei r269971 : the index should be 0-based (although chart2 doesn't appear to make use of this data any more). 2009-03-24 16:47:56 +0100 kohei r269969 : Skip hidden cells during cache (re-)build, when the include hidden cells flag is false. Also avoid adding data cache when the cell is hidden. 2009-03-24 06:05:53 +0100 kohei r269909 : fixed the build breakage after the resync. 2009-03-24 06:05:34 +0100 kohei r269908 : fixed the build breakage after the resync. 2009-03-23 23:38:36 +0100 kohei r269900 : CWS-TOOLING: rebase CWS koheichart01 to trunk@269781 (milestone: DEV300:m44) 2009-03-17 13:11:40 +0100 iha r269597 : #i91578# import IncludeHiddenCells from xlsx 2009-03-17 12:56:09 +0100 iha r269594 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-17 12:49:13 +0100 iha r269592 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-16 17:03:55 +0100 iha r269561 : #i91578# remove unused variable 2009-03-16 10:22:30 +0100 iha r269509 : #i91578# changed wording 2009-03-04 17:07:16 +0100 iha r268846 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:04:22 +0100 iha r268845 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:03:43 +0100 iha r268844 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 16:24:30 +0100 iha r268843 : #i91578# display of hidden cells - added missing property description 2009-03-04 15:13:04 +0100 iha r268835 : #i91578# display of hidden cells - remove unused code 2009-03-04 14:38:44 +0100 iha r268832 : #i91578# display of hidden cells - reset state corretly when doing undo/redo 2009-03-04 13:42:10 +0100 iha r268822 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:40:10 +0100 iha r268821 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:37:05 +0100 iha r268820 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-03 11:18:39 +0100 iha r268713 : #i91578# display of hidden cells - hide control if the functionality is not offered by the data provider 2009-03-02 17:41:37 +0100 kohei r268684 : removed unintended change from DEV300_m38, which was probably introduced due to some sort of problem during rebase. 2009-02-27 18:51:34 +0100 iha r268613 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:45:48 +0100 iha r268612 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:44:17 +0100 iha r268611 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:35:09 +0100 iha r268610 : #i91578# display of hidden cells - copy-paste-scenario: export hidden flag per column on copy for migration to locale table during import upon paste 2009-02-19 06:47:56 +0100 kohei r268257 : also, set the default value of a cached cell to NaN just in case. 2009-02-19 06:42:08 +0100 kohei r268256 : Set the IsValue flag to false by default so that an empty cell is properly flaged as non-value. This fixes the broken missing value treatment. 2009-02-18 20:16:30 +0100 iha r268255 : #i91578# display of hidden cells - radio button 'leave gap' was not clickable anymore 2009-02-17 17:57:24 +0100 iha r268185 : #i91578# display of hidden cells - corrected range highlighting 2009-02-17 15:39:52 +0100 iha r268174 : #i91578# display of hidden cells - still display data point value in tip help of data points in writer 2009-02-17 11:21:00 +0100 iha r267861 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-17 11:15:14 +0100 iha r267853 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-16 16:48:10 +0100 iha r267826 : #i91578# display of hidden cells - group related ids and minimize changes 2009-02-16 14:32:11 +0100 iha r267813 : #i91578# display of hidden cells - don't share resource identifier as this easily produces conflicts -> move IDs for series options page into a separate file 2009-02-16 13:21:44 +0100 iha r267795 : #i91578# display of hidden cells - remove unused member 2009-02-16 13:13:40 +0100 iha r267794 : #i91578# display of hidden cells - remove unused methods 2009-02-16 13:00:10 +0100 iha r267792 : #i91578# display of hidden - avoid unnecessary data copy 2009-02-16 11:40:41 +0100 iha r267785 : #i91578# display of hidden - corrected typo 2009-02-16 11:28:39 +0100 iha r267783 : #i91578# display of hidden - set correct dirty state in method setIncludeHiddenCells 2009-02-13 17:04:50 +0100 iha r267734 : #i91578# corrected position and visibility of the controls for display of hidden cells in case of stock charts 2009-02-13 15:30:17 +0100 iha r267724 : #i91578# charts without category range and charts with data from writer table were broken causes by features changes for display of hidden cells 2009-01-14 19:47:28 +0100 kohei r266330 : #i91578# Fixed the issue with incorrect tooltip category values. 2009-01-05 22:27:03 +0100 kohei r265887 : fixed a regression where the x-axis failed to display values when they were numeric or dates. 2008-12-24 17:01:15 +0100 kohei r265800 : CWS-TOOLING: rebase CWS koheichart01 to trunk@265758 (milestone: DEV300:m38) 2008-12-24 16:03:08 +0100 kohei r265799 : a little more code cleanup, mostly on tab to whitespace conversion on modified lines and removal of unnecessary 'using' statements. 2008-12-24 15:52:00 +0100 kohei r265798 : removed unnecessary header inclusion & remove hidden data *only when* the 'include hidden cells' options it false! I'm glad I caught this. 2008-12-24 07:41:23 +0100 kohei r265796 : replaced duplicated local functions with a single template function. 2008-12-24 06:37:15 +0100 kohei r265795 : reverted my last commit, because it was not the right approach. Instead of using the original data point index in the object name, leave that index alone, and remove hidden data in the tooltip text value lookup code. 2008-12-23 23:10:42 +0100 kohei r265793 : fixed the tooltips so that they would display correct values, taking into account the hidden data points (if any). 2008-12-20 05:26:07 +0100 kohei r265739 : CWS-TOOLING: rebase CWS koheichart01 to trunk@264807 (milestone: DEV300:m37) 2008-12-18 15:49:59 +0100 kohei r265696 : removed markRangeDirty() for now, since that method is still a bit controvertial per Niklas's comment in i#91578. 2008-12-05 20:27:24 +0100 kohei r264918 : removed a compiler warning. 2008-12-05 20:24:02 +0100 kohei r264917 : removed a compilar warning. 2008-12-03 17:06:22 +0100 kohei r264800 : recovered the original keyword file before it was stripped. 2008-12-01 22:00:24 +0100 kohei r264640 : by default, "include hidden cells" attribute is true. 2008-12-01 19:03:07 +0100 kohei r264628 : added accelerator for the plot hidden values check box. 2008-12-01 18:32:02 +0100 kohei r264626 : changed wording per Ingrid's suggestion. 2008-11-26 08:09:36 +0100 kohei r264341 : the 'Starnding angle' fixed line was 6 pixel short. 2008-11-26 08:02:47 +0100 kohei r264340 : added include-hidden-cells check box for the pie chart type too & some code cleanup. 2008-11-26 07:41:45 +0100 kohei r264339 : relocate the controls correctly for line chart types. 2008-11-26 07:14:26 +0100 kohei r264337 : #i95714# fixed typos that caused incorrect scaling of the y-axis under some conditions. 2008-11-26 07:11:54 +0100 kohei r264336 : added "Include hidden cells" check box in the data series options tab page. 2008-11-25 21:04:58 +0100 kohei r264333 : don't check for the number of charts; when importing from xls, the count may be zero even when the document has charts. 2008-11-25 19:55:50 +0100 kohei r264332 : patch from ooo-build applied. This implements chart listener that listens on cells show/hide state for the chart's data areas. 2008-11-25 19:52:38 +0100 kohei r264331 : patch from ooo-build applied. 2008-11-25 19:29:54 +0100 kohei r264329 : new xml token for include-hidden-cells attribute.
2009-05-18 16:46:40 +00:00
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
CWS-TOOLING: integrate CWS koheichart01 2009-05-15 06:32:38 +0200 hde r271925 : header fixed 2009-04-14 16:23:35 +0200 hde r270792 : #100231# 2009-04-14 16:13:48 +0200 hde r270790 : #100231# 2009-04-14 15:56:14 +0200 hde r270787 : #100231# 2009-04-14 14:28:40 +0200 hde r270767 : #100231# 2009-04-14 14:27:30 +0200 hde r270766 : #100231# 2009-04-14 09:43:07 +0200 hde r270749 : #100231# 2009-04-14 09:25:52 +0200 hde r270748 : #100231# 2009-03-25 16:18:26 +0100 iha r270034 : #i91578# removed compiler warning 2009-03-25 03:20:36 +0100 kohei r269992 : fixed a silly typo in in-line comment. 2009-03-24 17:03:57 +0100 kohei r269977 : Let's use row and column's hidden flags, instead of width/height, to determine cell's hidden state. 2009-03-24 16:53:10 +0100 kohei r269973 : The chart positioner no longer needs to skip hidden cells, as hidden cells are handled elsewhere. 2009-03-24 16:50:12 +0100 kohei r269971 : the index should be 0-based (although chart2 doesn't appear to make use of this data any more). 2009-03-24 16:47:56 +0100 kohei r269969 : Skip hidden cells during cache (re-)build, when the include hidden cells flag is false. Also avoid adding data cache when the cell is hidden. 2009-03-24 06:05:53 +0100 kohei r269909 : fixed the build breakage after the resync. 2009-03-24 06:05:34 +0100 kohei r269908 : fixed the build breakage after the resync. 2009-03-23 23:38:36 +0100 kohei r269900 : CWS-TOOLING: rebase CWS koheichart01 to trunk@269781 (milestone: DEV300:m44) 2009-03-17 13:11:40 +0100 iha r269597 : #i91578# import IncludeHiddenCells from xlsx 2009-03-17 12:56:09 +0100 iha r269594 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-17 12:49:13 +0100 iha r269592 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-16 17:03:55 +0100 iha r269561 : #i91578# remove unused variable 2009-03-16 10:22:30 +0100 iha r269509 : #i91578# changed wording 2009-03-04 17:07:16 +0100 iha r268846 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:04:22 +0100 iha r268845 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:03:43 +0100 iha r268844 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 16:24:30 +0100 iha r268843 : #i91578# display of hidden cells - added missing property description 2009-03-04 15:13:04 +0100 iha r268835 : #i91578# display of hidden cells - remove unused code 2009-03-04 14:38:44 +0100 iha r268832 : #i91578# display of hidden cells - reset state corretly when doing undo/redo 2009-03-04 13:42:10 +0100 iha r268822 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:40:10 +0100 iha r268821 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:37:05 +0100 iha r268820 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-03 11:18:39 +0100 iha r268713 : #i91578# display of hidden cells - hide control if the functionality is not offered by the data provider 2009-03-02 17:41:37 +0100 kohei r268684 : removed unintended change from DEV300_m38, which was probably introduced due to some sort of problem during rebase. 2009-02-27 18:51:34 +0100 iha r268613 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:45:48 +0100 iha r268612 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:44:17 +0100 iha r268611 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:35:09 +0100 iha r268610 : #i91578# display of hidden cells - copy-paste-scenario: export hidden flag per column on copy for migration to locale table during import upon paste 2009-02-19 06:47:56 +0100 kohei r268257 : also, set the default value of a cached cell to NaN just in case. 2009-02-19 06:42:08 +0100 kohei r268256 : Set the IsValue flag to false by default so that an empty cell is properly flaged as non-value. This fixes the broken missing value treatment. 2009-02-18 20:16:30 +0100 iha r268255 : #i91578# display of hidden cells - radio button 'leave gap' was not clickable anymore 2009-02-17 17:57:24 +0100 iha r268185 : #i91578# display of hidden cells - corrected range highlighting 2009-02-17 15:39:52 +0100 iha r268174 : #i91578# display of hidden cells - still display data point value in tip help of data points in writer 2009-02-17 11:21:00 +0100 iha r267861 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-17 11:15:14 +0100 iha r267853 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-16 16:48:10 +0100 iha r267826 : #i91578# display of hidden cells - group related ids and minimize changes 2009-02-16 14:32:11 +0100 iha r267813 : #i91578# display of hidden cells - don't share resource identifier as this easily produces conflicts -> move IDs for series options page into a separate file 2009-02-16 13:21:44 +0100 iha r267795 : #i91578# display of hidden cells - remove unused member 2009-02-16 13:13:40 +0100 iha r267794 : #i91578# display of hidden cells - remove unused methods 2009-02-16 13:00:10 +0100 iha r267792 : #i91578# display of hidden - avoid unnecessary data copy 2009-02-16 11:40:41 +0100 iha r267785 : #i91578# display of hidden - corrected typo 2009-02-16 11:28:39 +0100 iha r267783 : #i91578# display of hidden - set correct dirty state in method setIncludeHiddenCells 2009-02-13 17:04:50 +0100 iha r267734 : #i91578# corrected position and visibility of the controls for display of hidden cells in case of stock charts 2009-02-13 15:30:17 +0100 iha r267724 : #i91578# charts without category range and charts with data from writer table were broken causes by features changes for display of hidden cells 2009-01-14 19:47:28 +0100 kohei r266330 : #i91578# Fixed the issue with incorrect tooltip category values. 2009-01-05 22:27:03 +0100 kohei r265887 : fixed a regression where the x-axis failed to display values when they were numeric or dates. 2008-12-24 17:01:15 +0100 kohei r265800 : CWS-TOOLING: rebase CWS koheichart01 to trunk@265758 (milestone: DEV300:m38) 2008-12-24 16:03:08 +0100 kohei r265799 : a little more code cleanup, mostly on tab to whitespace conversion on modified lines and removal of unnecessary 'using' statements. 2008-12-24 15:52:00 +0100 kohei r265798 : removed unnecessary header inclusion & remove hidden data *only when* the 'include hidden cells' options it false! I'm glad I caught this. 2008-12-24 07:41:23 +0100 kohei r265796 : replaced duplicated local functions with a single template function. 2008-12-24 06:37:15 +0100 kohei r265795 : reverted my last commit, because it was not the right approach. Instead of using the original data point index in the object name, leave that index alone, and remove hidden data in the tooltip text value lookup code. 2008-12-23 23:10:42 +0100 kohei r265793 : fixed the tooltips so that they would display correct values, taking into account the hidden data points (if any). 2008-12-20 05:26:07 +0100 kohei r265739 : CWS-TOOLING: rebase CWS koheichart01 to trunk@264807 (milestone: DEV300:m37) 2008-12-18 15:49:59 +0100 kohei r265696 : removed markRangeDirty() for now, since that method is still a bit controvertial per Niklas's comment in i#91578. 2008-12-05 20:27:24 +0100 kohei r264918 : removed a compiler warning. 2008-12-05 20:24:02 +0100 kohei r264917 : removed a compilar warning. 2008-12-03 17:06:22 +0100 kohei r264800 : recovered the original keyword file before it was stripped. 2008-12-01 22:00:24 +0100 kohei r264640 : by default, "include hidden cells" attribute is true. 2008-12-01 19:03:07 +0100 kohei r264628 : added accelerator for the plot hidden values check box. 2008-12-01 18:32:02 +0100 kohei r264626 : changed wording per Ingrid's suggestion. 2008-11-26 08:09:36 +0100 kohei r264341 : the 'Starnding angle' fixed line was 6 pixel short. 2008-11-26 08:02:47 +0100 kohei r264340 : added include-hidden-cells check box for the pie chart type too & some code cleanup. 2008-11-26 07:41:45 +0100 kohei r264339 : relocate the controls correctly for line chart types. 2008-11-26 07:14:26 +0100 kohei r264337 : #i95714# fixed typos that caused incorrect scaling of the y-axis under some conditions. 2008-11-26 07:11:54 +0100 kohei r264336 : added "Include hidden cells" check box in the data series options tab page. 2008-11-25 21:04:58 +0100 kohei r264333 : don't check for the number of charts; when importing from xls, the count may be zero even when the document has charts. 2008-11-25 19:55:50 +0100 kohei r264332 : patch from ooo-build applied. This implements chart listener that listens on cells show/hide state for the chart's data areas. 2008-11-25 19:52:38 +0100 kohei r264331 : patch from ooo-build applied. 2008-11-25 19:29:54 +0100 kohei r264329 : new xml token for include-hidden-cells attribute.
2009-05-18 16:46:40 +00:00
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XInternalDataProvider.hpp>
2000-09-18 16:07:07 +00:00
#include <com/sun/star/chart/ChartSeriesAddress.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/chart2/XAxis.hpp>
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/AxisType.hpp>
#include <vector>
#include <algorithm>
2000-09-18 16:07:07 +00:00
using namespace com::sun::star;
using namespace ::xmloff::token;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Reference;
using ::rtl::OUString;
namespace
{
const char aLabelPrefix[] = "label ";
const char aCategoriesRange[] = "categories";
typedef ::std::multimap< ::rtl::OUString, ::rtl::OUString >
lcl_tOriginalRangeToInternalRangeMap;
struct lcl_ApplyCellToData : public ::std::unary_function< SchXMLCell, void >
{
lcl_ApplyCellToData( Sequence< double > & rOutData ) :
m_rData( rOutData ),
m_nIndex( 0 ),
m_nSize( rOutData.getLength()),
m_fNaN( 0.0 )
{
::rtl::math::setNan( &m_fNaN );
}
void operator() ( const SchXMLCell & rCell )
{
if( m_nIndex < m_nSize )
{
if( rCell.eType == SCH_CELL_TYPE_FLOAT )
m_rData[m_nIndex] = rCell.fValue;
else
m_rData[m_nIndex] = m_fNaN;
}
++m_nIndex;
}
sal_Int32 getCurrentIndex() const
{
return m_nIndex;
}
private:
Sequence< double > & m_rData;
sal_Int32 m_nIndex;
sal_Int32 m_nSize;
double m_fNaN;
};
void lcl_fillRangeMapping(
const SchXMLTable & rTable,
lcl_tOriginalRangeToInternalRangeMap & rOutRangeMap,
chart::ChartDataRowSource eDataRowSource )
{
sal_Int32 nRowOffset = ( rTable.bHasHeaderRow ? 1 : 0 );
sal_Int32 nColOffset = ( rTable.bHasHeaderColumn ? 1 : 0 );
const OUString lcl_aCategoriesRange(aCategoriesRange);
const OUString lcl_aLabelPrefix(aLabelPrefix);
// Fill range mapping
const size_t nTableRowCount( rTable.aData.size());
for( size_t nRow = 0; nRow < nTableRowCount; ++nRow )
{
const ::std::vector< SchXMLCell > & rRow( rTable.aData[nRow] );
const size_t nTableColCount( rRow.size());
for( size_t nCol = 0; nCol < nTableColCount; ++nCol )
{
const OUString aRangeId( rRow[nCol].aRangeId );
if( !aRangeId.isEmpty())
{
if( eDataRowSource == chart::ChartDataRowSource_COLUMNS )
{
if( nCol == 0 && rTable.bHasHeaderColumn )
{
OSL_ASSERT( static_cast< sal_Int32 >( nRow ) == nRowOffset );
rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type(
aRangeId, lcl_aCategoriesRange ));
}
else
{
OUString aColNumStr = OUString::valueOf( static_cast< sal_Int32 >( nCol - nColOffset ));
if( nRow == 0 && rTable.bHasHeaderRow )
rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type(
aRangeId, lcl_aLabelPrefix + aColNumStr ));
else
rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type(
aRangeId, aColNumStr ));
}
}
else // eDataRowSource == chart::ChartDataRowSource_ROWS
{
if( nRow == 0 && rTable.bHasHeaderRow )
{
OSL_ASSERT( static_cast< sal_Int32 >( nCol ) == nColOffset );
rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type(
aRangeId, lcl_aCategoriesRange ));
}
else
{
OUString aRowNumStr = OUString::valueOf( static_cast< sal_Int32 >( nRow - nRowOffset ));
if( nCol == 0 && rTable.bHasHeaderColumn )
rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type(
aRangeId, lcl_aLabelPrefix + aRowNumStr ));
else
rOutRangeMap.insert( lcl_tOriginalRangeToInternalRangeMap::value_type(
aRangeId, aRowNumStr ));
}
}
}
}
}
}
Reference< chart2::data::XDataSequence >
lcl_reassignDataSequence(
const Reference< chart2::data::XDataSequence > & xSequence,
const Reference< chart2::data::XDataProvider > & xDataProvider,
lcl_tOriginalRangeToInternalRangeMap & rRangeMap,
const OUString & rRange )
{
Reference< chart2::data::XDataSequence > xResult( xSequence );
lcl_tOriginalRangeToInternalRangeMap::iterator aIt( rRangeMap.find( rRange ));
if( aIt != rRangeMap.end())
{
// set sequence with correct data
xResult.set( xDataProvider->createDataSequenceByRangeRepresentation( aIt->second ));
// remove translation, because it was used
rRangeMap.erase( aIt );
}
return xResult;
}
bool lcl_mapContainsRange(
lcl_tOriginalRangeToInternalRangeMap & rRangeMap,
const OUString & rRange )
{
lcl_tOriginalRangeToInternalRangeMap::iterator aIt( rRangeMap.find( rRange ));
return ( aIt != rRangeMap.end());
}
bool lcl_tableOfRangeMatches(
const ::rtl::OUString & rRange,
const ::rtl::OUString & rTableName )
{
// both strings are non-empty and the table name is part of the range
return ( !rRange.isEmpty() &&
!rTableName.isEmpty() &&
(rRange.indexOf( rTableName ) != -1 ));
}
template< typename T >
::std::vector< T > lcl_SequenceToVector( const uno::Sequence< T > & rSequence )
{
::std::vector< T > aResult( rSequence.getLength());
::std::copy( rSequence.getConstArray(), rSequence.getConstArray() + rSequence.getLength(),
aResult.begin());
return aResult;
}
} // anonymous namespace
2000-09-18 16:07:07 +00:00
// ----------------------------------------
// class SchXMLTableContext
// ----------------------------------------
SchXMLTableContext::SchXMLTableContext( SchXMLImportHelper& rImpHelper,
SvXMLImport& rImport,
const rtl::OUString& rLName,
2001-04-10 11:37:57 +00:00
SchXMLTable& aTable ) :
2000-09-18 16:07:07 +00:00
SvXMLImportContext( rImport, XML_NAMESPACE_TABLE, rLName ),
mrImportHelper( rImpHelper ),
mrTable( aTable ),
mbHasRowPermutation( false ),
mbHasColumnPermutation( false )
2000-09-18 16:07:07 +00:00
{
mrTable.nColumnIndex = -1;
mrTable.nMaxColumnIndex = -1;
mrTable.nRowIndex = -1;
mrTable.aData.clear();
}
SchXMLTableContext::~SchXMLTableContext()
{
}
SvXMLImportContext *SchXMLTableContext::CreateChildContext(
sal_uInt16 nPrefix,
2000-09-18 16:07:07 +00:00
const rtl::OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& )
2000-09-18 16:07:07 +00:00
{
SvXMLImportContext* pContext = 0;
const SvXMLTokenMap& rTokenMap = mrImportHelper.GetTableElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLocalName ))
{
case XML_TOK_TABLE_HEADER_COLS:
mrTable.bHasHeaderColumn = true;
// fall through intended
2000-09-18 16:07:07 +00:00
case XML_TOK_TABLE_COLUMNS:
pContext = new SchXMLTableColumnsContext( GetImport(), rLocalName, mrTable );
2000-09-18 16:07:07 +00:00
break;
case XML_TOK_TABLE_COLUMN:
pContext = new SchXMLTableColumnContext( GetImport(), rLocalName, mrTable );
2000-09-18 16:07:07 +00:00
break;
case XML_TOK_TABLE_HEADER_ROWS:
mrTable.bHasHeaderRow = true;
// fall through intended
2000-09-18 16:07:07 +00:00
case XML_TOK_TABLE_ROWS:
pContext = new SchXMLTableRowsContext( mrImportHelper, GetImport(), rLocalName, mrTable );
break;
case XML_TOK_TABLE_ROW:
pContext = new SchXMLTableRowContext( mrImportHelper, GetImport(), rLocalName, mrTable );
break;
default:
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
}
return pContext;
}
void SchXMLTableContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
{
// get table-name
sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
for( sal_Int16 i = 0; i < nAttrCount; i++ )
{
rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
rtl::OUString aLocalName;
sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
if ( nPrefix == XML_NAMESPACE_TABLE )
{
if ( IsXMLToken( aLocalName, XML_NAME ) )
{
mrTable.aTableNameOfFile = xAttrList->getValueByIndex( i );
}
else if ( IsXMLToken( aLocalName, XML_PROTECTED ) )
{
if ( IsXMLToken( xAttrList->getValueByIndex( i ), XML_TRUE ) )
{
mrTable.bProtected = true;
}
}
}
}
}
void SchXMLTableContext::EndElement()
{
if( mbHasColumnPermutation )
{
OSL_ASSERT( !mbHasRowPermutation );
::std::vector< sal_Int32 > aPermutation( lcl_SequenceToVector( maColumnPermutation ));
OSL_ASSERT( !aPermutation.empty());
if( aPermutation.empty())
return;
// permute the values of all rows according to aPermutation
for( ::std::vector< ::std::vector< SchXMLCell > >::iterator aRowIt( mrTable.aData.begin());
aRowIt != mrTable.aData.end(); ++aRowIt )
{
bool bModified = false;
::std::vector< SchXMLCell > aModifiedRow;
const size_t nPermSize = aPermutation.size();
OSL_ASSERT( static_cast< sal_Int32 >( nPermSize ) - 1 == *(::std::max_element( aPermutation.begin(), aPermutation.end())));
const size_t nRowSize = aRowIt->size();
const size_t nDestSize = ::std::min( nPermSize, nRowSize );
for( size_t nDestinationIndex = 0; nDestinationIndex < nDestSize; ++nDestinationIndex )
{
const size_t nSourceIndex = static_cast< size_t >( aPermutation[ nDestinationIndex ] );
if( nSourceIndex != nDestinationIndex &&
nSourceIndex < nRowSize )
{
// copy original on first real permutation
if( !bModified )
{
OSL_ASSERT( aModifiedRow.empty());
aModifiedRow.reserve( aRowIt->size());
::std::copy( aRowIt->begin(), aRowIt->end(), ::std::back_inserter( aModifiedRow ));
OSL_ASSERT( !aModifiedRow.empty());
}
OSL_ASSERT( nDestinationIndex < aModifiedRow.size());
aModifiedRow[ nDestinationIndex ] = (*aRowIt)[ nSourceIndex ];
bModified = true;
}
}
// copy back
if( bModified )
::std::copy( aModifiedRow.begin(), aModifiedRow.end(), aRowIt->begin());
}
}
else if( mbHasRowPermutation )
{
::std::vector< sal_Int32 > aPermutation( lcl_SequenceToVector( maRowPermutation ));
OSL_ASSERT( !aPermutation.empty());
if( aPermutation.empty())
return;
bool bModified = false;
const size_t nPermSize = aPermutation.size();
OSL_ASSERT( static_cast< sal_Int32 >( nPermSize ) - 1 == *(::std::max_element( aPermutation.begin(), aPermutation.end())));
const size_t nTableRowCount = mrTable.aData.size();
const size_t nDestSize = ::std::min( nPermSize, nTableRowCount );
::std::vector< ::std::vector< SchXMLCell > > aDestination;
for( size_t nDestinationIndex = 0; nDestinationIndex < nDestSize; ++nDestinationIndex )
{
const size_t nSourceIndex = static_cast< size_t >( aPermutation[ nDestinationIndex ] );
if( nSourceIndex != nDestinationIndex &&
nSourceIndex < nTableRowCount )
{
// copy original on first real permutation
if( !bModified )
{
OSL_ASSERT( aDestination.empty());
aDestination.reserve( mrTable.aData.size());
::std::copy( mrTable.aData.begin(), mrTable.aData.end(), ::std::back_inserter( aDestination ));
OSL_ASSERT( !aDestination.empty());
}
OSL_ASSERT( nDestinationIndex < aDestination.size());
aDestination[ nDestinationIndex ] = mrTable.aData[ nSourceIndex ];
bModified = true;
}
}
if( bModified )
{
// copy back
::std::copy( aDestination.begin(), aDestination.end(), mrTable.aData.begin());
}
}
}
void SchXMLTableContext::setRowPermutation( const uno::Sequence< sal_Int32 > & rPermutation )
{
maRowPermutation = rPermutation;
mbHasRowPermutation = ( rPermutation.getLength() > 0 );
if( mbHasRowPermutation && mbHasColumnPermutation )
{
mbHasColumnPermutation = false;
maColumnPermutation.realloc( 0 );
}
}
void SchXMLTableContext::setColumnPermutation( const uno::Sequence< sal_Int32 > & rPermutation )
{
maColumnPermutation = rPermutation;
mbHasColumnPermutation = ( rPermutation.getLength() > 0 );
if( mbHasColumnPermutation && mbHasRowPermutation )
{
mbHasRowPermutation = false;
maRowPermutation.realloc( 0 );
}
}
2000-09-18 16:07:07 +00:00
// ========================================
// classes for columns
// ========================================
// ----------------------------------------
// class SchXMLTableColumnsContext
// ----------------------------------------
SchXMLTableColumnsContext::SchXMLTableColumnsContext(
SvXMLImport& rImport,
const rtl::OUString& rLocalName,
SchXMLTable& aTable ) :
SvXMLImportContext( rImport, XML_NAMESPACE_TABLE, rLocalName ),
mrTable( aTable )
{
}
SchXMLTableColumnsContext::~SchXMLTableColumnsContext()
{
}
SvXMLImportContext* SchXMLTableColumnsContext::CreateChildContext(
sal_uInt16 nPrefix,
2000-09-18 16:07:07 +00:00
const rtl::OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& )
2000-09-18 16:07:07 +00:00
{
SvXMLImportContext* pContext = 0;
if( nPrefix == XML_NAMESPACE_TABLE &&
IsXMLToken( rLocalName, XML_TABLE_COLUMN ) )
2000-09-18 16:07:07 +00:00
{
pContext = new SchXMLTableColumnContext( GetImport(), rLocalName, mrTable );
2000-09-18 16:07:07 +00:00
}
else
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
return pContext;
}
// ----------------------------------------
// class SchXMLTableColumnContext
// ----------------------------------------
SchXMLTableColumnContext::SchXMLTableColumnContext(
SvXMLImport& rImport,
const rtl::OUString& rLocalName,
SchXMLTable& aTable ) :
SvXMLImportContext( rImport, XML_NAMESPACE_TABLE, rLocalName ),
mrTable( aTable )
{
}
void SchXMLTableColumnContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
{
// get number-columns-repeated attribute
sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
CWS-TOOLING: integrate CWS koheichart01 2009-05-15 06:32:38 +0200 hde r271925 : header fixed 2009-04-14 16:23:35 +0200 hde r270792 : #100231# 2009-04-14 16:13:48 +0200 hde r270790 : #100231# 2009-04-14 15:56:14 +0200 hde r270787 : #100231# 2009-04-14 14:28:40 +0200 hde r270767 : #100231# 2009-04-14 14:27:30 +0200 hde r270766 : #100231# 2009-04-14 09:43:07 +0200 hde r270749 : #100231# 2009-04-14 09:25:52 +0200 hde r270748 : #100231# 2009-03-25 16:18:26 +0100 iha r270034 : #i91578# removed compiler warning 2009-03-25 03:20:36 +0100 kohei r269992 : fixed a silly typo in in-line comment. 2009-03-24 17:03:57 +0100 kohei r269977 : Let's use row and column's hidden flags, instead of width/height, to determine cell's hidden state. 2009-03-24 16:53:10 +0100 kohei r269973 : The chart positioner no longer needs to skip hidden cells, as hidden cells are handled elsewhere. 2009-03-24 16:50:12 +0100 kohei r269971 : the index should be 0-based (although chart2 doesn't appear to make use of this data any more). 2009-03-24 16:47:56 +0100 kohei r269969 : Skip hidden cells during cache (re-)build, when the include hidden cells flag is false. Also avoid adding data cache when the cell is hidden. 2009-03-24 06:05:53 +0100 kohei r269909 : fixed the build breakage after the resync. 2009-03-24 06:05:34 +0100 kohei r269908 : fixed the build breakage after the resync. 2009-03-23 23:38:36 +0100 kohei r269900 : CWS-TOOLING: rebase CWS koheichart01 to trunk@269781 (milestone: DEV300:m44) 2009-03-17 13:11:40 +0100 iha r269597 : #i91578# import IncludeHiddenCells from xlsx 2009-03-17 12:56:09 +0100 iha r269594 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-17 12:49:13 +0100 iha r269592 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-16 17:03:55 +0100 iha r269561 : #i91578# remove unused variable 2009-03-16 10:22:30 +0100 iha r269509 : #i91578# changed wording 2009-03-04 17:07:16 +0100 iha r268846 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:04:22 +0100 iha r268845 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:03:43 +0100 iha r268844 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 16:24:30 +0100 iha r268843 : #i91578# display of hidden cells - added missing property description 2009-03-04 15:13:04 +0100 iha r268835 : #i91578# display of hidden cells - remove unused code 2009-03-04 14:38:44 +0100 iha r268832 : #i91578# display of hidden cells - reset state corretly when doing undo/redo 2009-03-04 13:42:10 +0100 iha r268822 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:40:10 +0100 iha r268821 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:37:05 +0100 iha r268820 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-03 11:18:39 +0100 iha r268713 : #i91578# display of hidden cells - hide control if the functionality is not offered by the data provider 2009-03-02 17:41:37 +0100 kohei r268684 : removed unintended change from DEV300_m38, which was probably introduced due to some sort of problem during rebase. 2009-02-27 18:51:34 +0100 iha r268613 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:45:48 +0100 iha r268612 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:44:17 +0100 iha r268611 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:35:09 +0100 iha r268610 : #i91578# display of hidden cells - copy-paste-scenario: export hidden flag per column on copy for migration to locale table during import upon paste 2009-02-19 06:47:56 +0100 kohei r268257 : also, set the default value of a cached cell to NaN just in case. 2009-02-19 06:42:08 +0100 kohei r268256 : Set the IsValue flag to false by default so that an empty cell is properly flaged as non-value. This fixes the broken missing value treatment. 2009-02-18 20:16:30 +0100 iha r268255 : #i91578# display of hidden cells - radio button 'leave gap' was not clickable anymore 2009-02-17 17:57:24 +0100 iha r268185 : #i91578# display of hidden cells - corrected range highlighting 2009-02-17 15:39:52 +0100 iha r268174 : #i91578# display of hidden cells - still display data point value in tip help of data points in writer 2009-02-17 11:21:00 +0100 iha r267861 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-17 11:15:14 +0100 iha r267853 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-16 16:48:10 +0100 iha r267826 : #i91578# display of hidden cells - group related ids and minimize changes 2009-02-16 14:32:11 +0100 iha r267813 : #i91578# display of hidden cells - don't share resource identifier as this easily produces conflicts -> move IDs for series options page into a separate file 2009-02-16 13:21:44 +0100 iha r267795 : #i91578# display of hidden cells - remove unused member 2009-02-16 13:13:40 +0100 iha r267794 : #i91578# display of hidden cells - remove unused methods 2009-02-16 13:00:10 +0100 iha r267792 : #i91578# display of hidden - avoid unnecessary data copy 2009-02-16 11:40:41 +0100 iha r267785 : #i91578# display of hidden - corrected typo 2009-02-16 11:28:39 +0100 iha r267783 : #i91578# display of hidden - set correct dirty state in method setIncludeHiddenCells 2009-02-13 17:04:50 +0100 iha r267734 : #i91578# corrected position and visibility of the controls for display of hidden cells in case of stock charts 2009-02-13 15:30:17 +0100 iha r267724 : #i91578# charts without category range and charts with data from writer table were broken causes by features changes for display of hidden cells 2009-01-14 19:47:28 +0100 kohei r266330 : #i91578# Fixed the issue with incorrect tooltip category values. 2009-01-05 22:27:03 +0100 kohei r265887 : fixed a regression where the x-axis failed to display values when they were numeric or dates. 2008-12-24 17:01:15 +0100 kohei r265800 : CWS-TOOLING: rebase CWS koheichart01 to trunk@265758 (milestone: DEV300:m38) 2008-12-24 16:03:08 +0100 kohei r265799 : a little more code cleanup, mostly on tab to whitespace conversion on modified lines and removal of unnecessary 'using' statements. 2008-12-24 15:52:00 +0100 kohei r265798 : removed unnecessary header inclusion & remove hidden data *only when* the 'include hidden cells' options it false! I'm glad I caught this. 2008-12-24 07:41:23 +0100 kohei r265796 : replaced duplicated local functions with a single template function. 2008-12-24 06:37:15 +0100 kohei r265795 : reverted my last commit, because it was not the right approach. Instead of using the original data point index in the object name, leave that index alone, and remove hidden data in the tooltip text value lookup code. 2008-12-23 23:10:42 +0100 kohei r265793 : fixed the tooltips so that they would display correct values, taking into account the hidden data points (if any). 2008-12-20 05:26:07 +0100 kohei r265739 : CWS-TOOLING: rebase CWS koheichart01 to trunk@264807 (milestone: DEV300:m37) 2008-12-18 15:49:59 +0100 kohei r265696 : removed markRangeDirty() for now, since that method is still a bit controvertial per Niklas's comment in i#91578. 2008-12-05 20:27:24 +0100 kohei r264918 : removed a compiler warning. 2008-12-05 20:24:02 +0100 kohei r264917 : removed a compilar warning. 2008-12-03 17:06:22 +0100 kohei r264800 : recovered the original keyword file before it was stripped. 2008-12-01 22:00:24 +0100 kohei r264640 : by default, "include hidden cells" attribute is true. 2008-12-01 19:03:07 +0100 kohei r264628 : added accelerator for the plot hidden values check box. 2008-12-01 18:32:02 +0100 kohei r264626 : changed wording per Ingrid's suggestion. 2008-11-26 08:09:36 +0100 kohei r264341 : the 'Starnding angle' fixed line was 6 pixel short. 2008-11-26 08:02:47 +0100 kohei r264340 : added include-hidden-cells check box for the pie chart type too & some code cleanup. 2008-11-26 07:41:45 +0100 kohei r264339 : relocate the controls correctly for line chart types. 2008-11-26 07:14:26 +0100 kohei r264337 : #i95714# fixed typos that caused incorrect scaling of the y-axis under some conditions. 2008-11-26 07:11:54 +0100 kohei r264336 : added "Include hidden cells" check box in the data series options tab page. 2008-11-25 21:04:58 +0100 kohei r264333 : don't check for the number of charts; when importing from xls, the count may be zero even when the document has charts. 2008-11-25 19:55:50 +0100 kohei r264332 : patch from ooo-build applied. This implements chart listener that listens on cells show/hide state for the chart's data areas. 2008-11-25 19:52:38 +0100 kohei r264331 : patch from ooo-build applied. 2008-11-25 19:29:54 +0100 kohei r264329 : new xml token for include-hidden-cells attribute.
2009-05-18 16:46:40 +00:00
sal_Int32 nRepeated = 1;
bool bHidden = false;
2000-09-18 16:07:07 +00:00
for( sal_Int16 i = 0; i < nAttrCount; i++ )
{
rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
rtl::OUString aLocalName;
sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
2000-09-18 16:07:07 +00:00
if( nPrefix == XML_NAMESPACE_TABLE &&
IsXMLToken( aLocalName, XML_NUMBER_COLUMNS_REPEATED ) )
2000-09-18 16:07:07 +00:00
{
CWS-TOOLING: integrate CWS koheichart01 2009-05-15 06:32:38 +0200 hde r271925 : header fixed 2009-04-14 16:23:35 +0200 hde r270792 : #100231# 2009-04-14 16:13:48 +0200 hde r270790 : #100231# 2009-04-14 15:56:14 +0200 hde r270787 : #100231# 2009-04-14 14:28:40 +0200 hde r270767 : #100231# 2009-04-14 14:27:30 +0200 hde r270766 : #100231# 2009-04-14 09:43:07 +0200 hde r270749 : #100231# 2009-04-14 09:25:52 +0200 hde r270748 : #100231# 2009-03-25 16:18:26 +0100 iha r270034 : #i91578# removed compiler warning 2009-03-25 03:20:36 +0100 kohei r269992 : fixed a silly typo in in-line comment. 2009-03-24 17:03:57 +0100 kohei r269977 : Let's use row and column's hidden flags, instead of width/height, to determine cell's hidden state. 2009-03-24 16:53:10 +0100 kohei r269973 : The chart positioner no longer needs to skip hidden cells, as hidden cells are handled elsewhere. 2009-03-24 16:50:12 +0100 kohei r269971 : the index should be 0-based (although chart2 doesn't appear to make use of this data any more). 2009-03-24 16:47:56 +0100 kohei r269969 : Skip hidden cells during cache (re-)build, when the include hidden cells flag is false. Also avoid adding data cache when the cell is hidden. 2009-03-24 06:05:53 +0100 kohei r269909 : fixed the build breakage after the resync. 2009-03-24 06:05:34 +0100 kohei r269908 : fixed the build breakage after the resync. 2009-03-23 23:38:36 +0100 kohei r269900 : CWS-TOOLING: rebase CWS koheichart01 to trunk@269781 (milestone: DEV300:m44) 2009-03-17 13:11:40 +0100 iha r269597 : #i91578# import IncludeHiddenCells from xlsx 2009-03-17 12:56:09 +0100 iha r269594 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-17 12:49:13 +0100 iha r269592 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-16 17:03:55 +0100 iha r269561 : #i91578# remove unused variable 2009-03-16 10:22:30 +0100 iha r269509 : #i91578# changed wording 2009-03-04 17:07:16 +0100 iha r268846 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:04:22 +0100 iha r268845 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:03:43 +0100 iha r268844 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 16:24:30 +0100 iha r268843 : #i91578# display of hidden cells - added missing property description 2009-03-04 15:13:04 +0100 iha r268835 : #i91578# display of hidden cells - remove unused code 2009-03-04 14:38:44 +0100 iha r268832 : #i91578# display of hidden cells - reset state corretly when doing undo/redo 2009-03-04 13:42:10 +0100 iha r268822 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:40:10 +0100 iha r268821 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:37:05 +0100 iha r268820 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-03 11:18:39 +0100 iha r268713 : #i91578# display of hidden cells - hide control if the functionality is not offered by the data provider 2009-03-02 17:41:37 +0100 kohei r268684 : removed unintended change from DEV300_m38, which was probably introduced due to some sort of problem during rebase. 2009-02-27 18:51:34 +0100 iha r268613 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:45:48 +0100 iha r268612 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:44:17 +0100 iha r268611 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:35:09 +0100 iha r268610 : #i91578# display of hidden cells - copy-paste-scenario: export hidden flag per column on copy for migration to locale table during import upon paste 2009-02-19 06:47:56 +0100 kohei r268257 : also, set the default value of a cached cell to NaN just in case. 2009-02-19 06:42:08 +0100 kohei r268256 : Set the IsValue flag to false by default so that an empty cell is properly flaged as non-value. This fixes the broken missing value treatment. 2009-02-18 20:16:30 +0100 iha r268255 : #i91578# display of hidden cells - radio button 'leave gap' was not clickable anymore 2009-02-17 17:57:24 +0100 iha r268185 : #i91578# display of hidden cells - corrected range highlighting 2009-02-17 15:39:52 +0100 iha r268174 : #i91578# display of hidden cells - still display data point value in tip help of data points in writer 2009-02-17 11:21:00 +0100 iha r267861 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-17 11:15:14 +0100 iha r267853 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-16 16:48:10 +0100 iha r267826 : #i91578# display of hidden cells - group related ids and minimize changes 2009-02-16 14:32:11 +0100 iha r267813 : #i91578# display of hidden cells - don't share resource identifier as this easily produces conflicts -> move IDs for series options page into a separate file 2009-02-16 13:21:44 +0100 iha r267795 : #i91578# display of hidden cells - remove unused member 2009-02-16 13:13:40 +0100 iha r267794 : #i91578# display of hidden cells - remove unused methods 2009-02-16 13:00:10 +0100 iha r267792 : #i91578# display of hidden - avoid unnecessary data copy 2009-02-16 11:40:41 +0100 iha r267785 : #i91578# display of hidden - corrected typo 2009-02-16 11:28:39 +0100 iha r267783 : #i91578# display of hidden - set correct dirty state in method setIncludeHiddenCells 2009-02-13 17:04:50 +0100 iha r267734 : #i91578# corrected position and visibility of the controls for display of hidden cells in case of stock charts 2009-02-13 15:30:17 +0100 iha r267724 : #i91578# charts without category range and charts with data from writer table were broken causes by features changes for display of hidden cells 2009-01-14 19:47:28 +0100 kohei r266330 : #i91578# Fixed the issue with incorrect tooltip category values. 2009-01-05 22:27:03 +0100 kohei r265887 : fixed a regression where the x-axis failed to display values when they were numeric or dates. 2008-12-24 17:01:15 +0100 kohei r265800 : CWS-TOOLING: rebase CWS koheichart01 to trunk@265758 (milestone: DEV300:m38) 2008-12-24 16:03:08 +0100 kohei r265799 : a little more code cleanup, mostly on tab to whitespace conversion on modified lines and removal of unnecessary 'using' statements. 2008-12-24 15:52:00 +0100 kohei r265798 : removed unnecessary header inclusion & remove hidden data *only when* the 'include hidden cells' options it false! I'm glad I caught this. 2008-12-24 07:41:23 +0100 kohei r265796 : replaced duplicated local functions with a single template function. 2008-12-24 06:37:15 +0100 kohei r265795 : reverted my last commit, because it was not the right approach. Instead of using the original data point index in the object name, leave that index alone, and remove hidden data in the tooltip text value lookup code. 2008-12-23 23:10:42 +0100 kohei r265793 : fixed the tooltips so that they would display correct values, taking into account the hidden data points (if any). 2008-12-20 05:26:07 +0100 kohei r265739 : CWS-TOOLING: rebase CWS koheichart01 to trunk@264807 (milestone: DEV300:m37) 2008-12-18 15:49:59 +0100 kohei r265696 : removed markRangeDirty() for now, since that method is still a bit controvertial per Niklas's comment in i#91578. 2008-12-05 20:27:24 +0100 kohei r264918 : removed a compiler warning. 2008-12-05 20:24:02 +0100 kohei r264917 : removed a compilar warning. 2008-12-03 17:06:22 +0100 kohei r264800 : recovered the original keyword file before it was stripped. 2008-12-01 22:00:24 +0100 kohei r264640 : by default, "include hidden cells" attribute is true. 2008-12-01 19:03:07 +0100 kohei r264628 : added accelerator for the plot hidden values check box. 2008-12-01 18:32:02 +0100 kohei r264626 : changed wording per Ingrid's suggestion. 2008-11-26 08:09:36 +0100 kohei r264341 : the 'Starnding angle' fixed line was 6 pixel short. 2008-11-26 08:02:47 +0100 kohei r264340 : added include-hidden-cells check box for the pie chart type too & some code cleanup. 2008-11-26 07:41:45 +0100 kohei r264339 : relocate the controls correctly for line chart types. 2008-11-26 07:14:26 +0100 kohei r264337 : #i95714# fixed typos that caused incorrect scaling of the y-axis under some conditions. 2008-11-26 07:11:54 +0100 kohei r264336 : added "Include hidden cells" check box in the data series options tab page. 2008-11-25 21:04:58 +0100 kohei r264333 : don't check for the number of charts; when importing from xls, the count may be zero even when the document has charts. 2008-11-25 19:55:50 +0100 kohei r264332 : patch from ooo-build applied. This implements chart listener that listens on cells show/hide state for the chart's data areas. 2008-11-25 19:52:38 +0100 kohei r264331 : patch from ooo-build applied. 2008-11-25 19:29:54 +0100 kohei r264329 : new xml token for include-hidden-cells attribute.
2009-05-18 16:46:40 +00:00
rtl::OUString aValue = xAttrList->getValueByIndex( i );
if( !aValue.isEmpty())
CWS-TOOLING: integrate CWS koheichart01 2009-05-15 06:32:38 +0200 hde r271925 : header fixed 2009-04-14 16:23:35 +0200 hde r270792 : #100231# 2009-04-14 16:13:48 +0200 hde r270790 : #100231# 2009-04-14 15:56:14 +0200 hde r270787 : #100231# 2009-04-14 14:28:40 +0200 hde r270767 : #100231# 2009-04-14 14:27:30 +0200 hde r270766 : #100231# 2009-04-14 09:43:07 +0200 hde r270749 : #100231# 2009-04-14 09:25:52 +0200 hde r270748 : #100231# 2009-03-25 16:18:26 +0100 iha r270034 : #i91578# removed compiler warning 2009-03-25 03:20:36 +0100 kohei r269992 : fixed a silly typo in in-line comment. 2009-03-24 17:03:57 +0100 kohei r269977 : Let's use row and column's hidden flags, instead of width/height, to determine cell's hidden state. 2009-03-24 16:53:10 +0100 kohei r269973 : The chart positioner no longer needs to skip hidden cells, as hidden cells are handled elsewhere. 2009-03-24 16:50:12 +0100 kohei r269971 : the index should be 0-based (although chart2 doesn't appear to make use of this data any more). 2009-03-24 16:47:56 +0100 kohei r269969 : Skip hidden cells during cache (re-)build, when the include hidden cells flag is false. Also avoid adding data cache when the cell is hidden. 2009-03-24 06:05:53 +0100 kohei r269909 : fixed the build breakage after the resync. 2009-03-24 06:05:34 +0100 kohei r269908 : fixed the build breakage after the resync. 2009-03-23 23:38:36 +0100 kohei r269900 : CWS-TOOLING: rebase CWS koheichart01 to trunk@269781 (milestone: DEV300:m44) 2009-03-17 13:11:40 +0100 iha r269597 : #i91578# import IncludeHiddenCells from xlsx 2009-03-17 12:56:09 +0100 iha r269594 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-17 12:49:13 +0100 iha r269592 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-16 17:03:55 +0100 iha r269561 : #i91578# remove unused variable 2009-03-16 10:22:30 +0100 iha r269509 : #i91578# changed wording 2009-03-04 17:07:16 +0100 iha r268846 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:04:22 +0100 iha r268845 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:03:43 +0100 iha r268844 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 16:24:30 +0100 iha r268843 : #i91578# display of hidden cells - added missing property description 2009-03-04 15:13:04 +0100 iha r268835 : #i91578# display of hidden cells - remove unused code 2009-03-04 14:38:44 +0100 iha r268832 : #i91578# display of hidden cells - reset state corretly when doing undo/redo 2009-03-04 13:42:10 +0100 iha r268822 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:40:10 +0100 iha r268821 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:37:05 +0100 iha r268820 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-03 11:18:39 +0100 iha r268713 : #i91578# display of hidden cells - hide control if the functionality is not offered by the data provider 2009-03-02 17:41:37 +0100 kohei r268684 : removed unintended change from DEV300_m38, which was probably introduced due to some sort of problem during rebase. 2009-02-27 18:51:34 +0100 iha r268613 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:45:48 +0100 iha r268612 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:44:17 +0100 iha r268611 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:35:09 +0100 iha r268610 : #i91578# display of hidden cells - copy-paste-scenario: export hidden flag per column on copy for migration to locale table during import upon paste 2009-02-19 06:47:56 +0100 kohei r268257 : also, set the default value of a cached cell to NaN just in case. 2009-02-19 06:42:08 +0100 kohei r268256 : Set the IsValue flag to false by default so that an empty cell is properly flaged as non-value. This fixes the broken missing value treatment. 2009-02-18 20:16:30 +0100 iha r268255 : #i91578# display of hidden cells - radio button 'leave gap' was not clickable anymore 2009-02-17 17:57:24 +0100 iha r268185 : #i91578# display of hidden cells - corrected range highlighting 2009-02-17 15:39:52 +0100 iha r268174 : #i91578# display of hidden cells - still display data point value in tip help of data points in writer 2009-02-17 11:21:00 +0100 iha r267861 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-17 11:15:14 +0100 iha r267853 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-16 16:48:10 +0100 iha r267826 : #i91578# display of hidden cells - group related ids and minimize changes 2009-02-16 14:32:11 +0100 iha r267813 : #i91578# display of hidden cells - don't share resource identifier as this easily produces conflicts -> move IDs for series options page into a separate file 2009-02-16 13:21:44 +0100 iha r267795 : #i91578# display of hidden cells - remove unused member 2009-02-16 13:13:40 +0100 iha r267794 : #i91578# display of hidden cells - remove unused methods 2009-02-16 13:00:10 +0100 iha r267792 : #i91578# display of hidden - avoid unnecessary data copy 2009-02-16 11:40:41 +0100 iha r267785 : #i91578# display of hidden - corrected typo 2009-02-16 11:28:39 +0100 iha r267783 : #i91578# display of hidden - set correct dirty state in method setIncludeHiddenCells 2009-02-13 17:04:50 +0100 iha r267734 : #i91578# corrected position and visibility of the controls for display of hidden cells in case of stock charts 2009-02-13 15:30:17 +0100 iha r267724 : #i91578# charts without category range and charts with data from writer table were broken causes by features changes for display of hidden cells 2009-01-14 19:47:28 +0100 kohei r266330 : #i91578# Fixed the issue with incorrect tooltip category values. 2009-01-05 22:27:03 +0100 kohei r265887 : fixed a regression where the x-axis failed to display values when they were numeric or dates. 2008-12-24 17:01:15 +0100 kohei r265800 : CWS-TOOLING: rebase CWS koheichart01 to trunk@265758 (milestone: DEV300:m38) 2008-12-24 16:03:08 +0100 kohei r265799 : a little more code cleanup, mostly on tab to whitespace conversion on modified lines and removal of unnecessary 'using' statements. 2008-12-24 15:52:00 +0100 kohei r265798 : removed unnecessary header inclusion & remove hidden data *only when* the 'include hidden cells' options it false! I'm glad I caught this. 2008-12-24 07:41:23 +0100 kohei r265796 : replaced duplicated local functions with a single template function. 2008-12-24 06:37:15 +0100 kohei r265795 : reverted my last commit, because it was not the right approach. Instead of using the original data point index in the object name, leave that index alone, and remove hidden data in the tooltip text value lookup code. 2008-12-23 23:10:42 +0100 kohei r265793 : fixed the tooltips so that they would display correct values, taking into account the hidden data points (if any). 2008-12-20 05:26:07 +0100 kohei r265739 : CWS-TOOLING: rebase CWS koheichart01 to trunk@264807 (milestone: DEV300:m37) 2008-12-18 15:49:59 +0100 kohei r265696 : removed markRangeDirty() for now, since that method is still a bit controvertial per Niklas's comment in i#91578. 2008-12-05 20:27:24 +0100 kohei r264918 : removed a compiler warning. 2008-12-05 20:24:02 +0100 kohei r264917 : removed a compilar warning. 2008-12-03 17:06:22 +0100 kohei r264800 : recovered the original keyword file before it was stripped. 2008-12-01 22:00:24 +0100 kohei r264640 : by default, "include hidden cells" attribute is true. 2008-12-01 19:03:07 +0100 kohei r264628 : added accelerator for the plot hidden values check box. 2008-12-01 18:32:02 +0100 kohei r264626 : changed wording per Ingrid's suggestion. 2008-11-26 08:09:36 +0100 kohei r264341 : the 'Starnding angle' fixed line was 6 pixel short. 2008-11-26 08:02:47 +0100 kohei r264340 : added include-hidden-cells check box for the pie chart type too & some code cleanup. 2008-11-26 07:41:45 +0100 kohei r264339 : relocate the controls correctly for line chart types. 2008-11-26 07:14:26 +0100 kohei r264337 : #i95714# fixed typos that caused incorrect scaling of the y-axis under some conditions. 2008-11-26 07:11:54 +0100 kohei r264336 : added "Include hidden cells" check box in the data series options tab page. 2008-11-25 21:04:58 +0100 kohei r264333 : don't check for the number of charts; when importing from xls, the count may be zero even when the document has charts. 2008-11-25 19:55:50 +0100 kohei r264332 : patch from ooo-build applied. This implements chart listener that listens on cells show/hide state for the chart's data areas. 2008-11-25 19:52:38 +0100 kohei r264331 : patch from ooo-build applied. 2008-11-25 19:29:54 +0100 kohei r264329 : new xml token for include-hidden-cells attribute.
2009-05-18 16:46:40 +00:00
nRepeated = aValue.toInt32();
}
else if( nPrefix == XML_NAMESPACE_TABLE &&
IsXMLToken( aLocalName, XML_VISIBILITY ) )
{
rtl::OUString aVisibility = xAttrList->getValueByIndex( i );
bHidden = aVisibility.equals( GetXMLToken( XML_COLLAPSE ) );
2000-09-18 16:07:07 +00:00
}
}
CWS-TOOLING: integrate CWS koheichart01 2009-05-15 06:32:38 +0200 hde r271925 : header fixed 2009-04-14 16:23:35 +0200 hde r270792 : #100231# 2009-04-14 16:13:48 +0200 hde r270790 : #100231# 2009-04-14 15:56:14 +0200 hde r270787 : #100231# 2009-04-14 14:28:40 +0200 hde r270767 : #100231# 2009-04-14 14:27:30 +0200 hde r270766 : #100231# 2009-04-14 09:43:07 +0200 hde r270749 : #100231# 2009-04-14 09:25:52 +0200 hde r270748 : #100231# 2009-03-25 16:18:26 +0100 iha r270034 : #i91578# removed compiler warning 2009-03-25 03:20:36 +0100 kohei r269992 : fixed a silly typo in in-line comment. 2009-03-24 17:03:57 +0100 kohei r269977 : Let's use row and column's hidden flags, instead of width/height, to determine cell's hidden state. 2009-03-24 16:53:10 +0100 kohei r269973 : The chart positioner no longer needs to skip hidden cells, as hidden cells are handled elsewhere. 2009-03-24 16:50:12 +0100 kohei r269971 : the index should be 0-based (although chart2 doesn't appear to make use of this data any more). 2009-03-24 16:47:56 +0100 kohei r269969 : Skip hidden cells during cache (re-)build, when the include hidden cells flag is false. Also avoid adding data cache when the cell is hidden. 2009-03-24 06:05:53 +0100 kohei r269909 : fixed the build breakage after the resync. 2009-03-24 06:05:34 +0100 kohei r269908 : fixed the build breakage after the resync. 2009-03-23 23:38:36 +0100 kohei r269900 : CWS-TOOLING: rebase CWS koheichart01 to trunk@269781 (milestone: DEV300:m44) 2009-03-17 13:11:40 +0100 iha r269597 : #i91578# import IncludeHiddenCells from xlsx 2009-03-17 12:56:09 +0100 iha r269594 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-17 12:49:13 +0100 iha r269592 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-16 17:03:55 +0100 iha r269561 : #i91578# remove unused variable 2009-03-16 10:22:30 +0100 iha r269509 : #i91578# changed wording 2009-03-04 17:07:16 +0100 iha r268846 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:04:22 +0100 iha r268845 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:03:43 +0100 iha r268844 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 16:24:30 +0100 iha r268843 : #i91578# display of hidden cells - added missing property description 2009-03-04 15:13:04 +0100 iha r268835 : #i91578# display of hidden cells - remove unused code 2009-03-04 14:38:44 +0100 iha r268832 : #i91578# display of hidden cells - reset state corretly when doing undo/redo 2009-03-04 13:42:10 +0100 iha r268822 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:40:10 +0100 iha r268821 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:37:05 +0100 iha r268820 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-03 11:18:39 +0100 iha r268713 : #i91578# display of hidden cells - hide control if the functionality is not offered by the data provider 2009-03-02 17:41:37 +0100 kohei r268684 : removed unintended change from DEV300_m38, which was probably introduced due to some sort of problem during rebase. 2009-02-27 18:51:34 +0100 iha r268613 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:45:48 +0100 iha r268612 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:44:17 +0100 iha r268611 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:35:09 +0100 iha r268610 : #i91578# display of hidden cells - copy-paste-scenario: export hidden flag per column on copy for migration to locale table during import upon paste 2009-02-19 06:47:56 +0100 kohei r268257 : also, set the default value of a cached cell to NaN just in case. 2009-02-19 06:42:08 +0100 kohei r268256 : Set the IsValue flag to false by default so that an empty cell is properly flaged as non-value. This fixes the broken missing value treatment. 2009-02-18 20:16:30 +0100 iha r268255 : #i91578# display of hidden cells - radio button 'leave gap' was not clickable anymore 2009-02-17 17:57:24 +0100 iha r268185 : #i91578# display of hidden cells - corrected range highlighting 2009-02-17 15:39:52 +0100 iha r268174 : #i91578# display of hidden cells - still display data point value in tip help of data points in writer 2009-02-17 11:21:00 +0100 iha r267861 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-17 11:15:14 +0100 iha r267853 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-16 16:48:10 +0100 iha r267826 : #i91578# display of hidden cells - group related ids and minimize changes 2009-02-16 14:32:11 +0100 iha r267813 : #i91578# display of hidden cells - don't share resource identifier as this easily produces conflicts -> move IDs for series options page into a separate file 2009-02-16 13:21:44 +0100 iha r267795 : #i91578# display of hidden cells - remove unused member 2009-02-16 13:13:40 +0100 iha r267794 : #i91578# display of hidden cells - remove unused methods 2009-02-16 13:00:10 +0100 iha r267792 : #i91578# display of hidden - avoid unnecessary data copy 2009-02-16 11:40:41 +0100 iha r267785 : #i91578# display of hidden - corrected typo 2009-02-16 11:28:39 +0100 iha r267783 : #i91578# display of hidden - set correct dirty state in method setIncludeHiddenCells 2009-02-13 17:04:50 +0100 iha r267734 : #i91578# corrected position and visibility of the controls for display of hidden cells in case of stock charts 2009-02-13 15:30:17 +0100 iha r267724 : #i91578# charts without category range and charts with data from writer table were broken causes by features changes for display of hidden cells 2009-01-14 19:47:28 +0100 kohei r266330 : #i91578# Fixed the issue with incorrect tooltip category values. 2009-01-05 22:27:03 +0100 kohei r265887 : fixed a regression where the x-axis failed to display values when they were numeric or dates. 2008-12-24 17:01:15 +0100 kohei r265800 : CWS-TOOLING: rebase CWS koheichart01 to trunk@265758 (milestone: DEV300:m38) 2008-12-24 16:03:08 +0100 kohei r265799 : a little more code cleanup, mostly on tab to whitespace conversion on modified lines and removal of unnecessary 'using' statements. 2008-12-24 15:52:00 +0100 kohei r265798 : removed unnecessary header inclusion & remove hidden data *only when* the 'include hidden cells' options it false! I'm glad I caught this. 2008-12-24 07:41:23 +0100 kohei r265796 : replaced duplicated local functions with a single template function. 2008-12-24 06:37:15 +0100 kohei r265795 : reverted my last commit, because it was not the right approach. Instead of using the original data point index in the object name, leave that index alone, and remove hidden data in the tooltip text value lookup code. 2008-12-23 23:10:42 +0100 kohei r265793 : fixed the tooltips so that they would display correct values, taking into account the hidden data points (if any). 2008-12-20 05:26:07 +0100 kohei r265739 : CWS-TOOLING: rebase CWS koheichart01 to trunk@264807 (milestone: DEV300:m37) 2008-12-18 15:49:59 +0100 kohei r265696 : removed markRangeDirty() for now, since that method is still a bit controvertial per Niklas's comment in i#91578. 2008-12-05 20:27:24 +0100 kohei r264918 : removed a compiler warning. 2008-12-05 20:24:02 +0100 kohei r264917 : removed a compilar warning. 2008-12-03 17:06:22 +0100 kohei r264800 : recovered the original keyword file before it was stripped. 2008-12-01 22:00:24 +0100 kohei r264640 : by default, "include hidden cells" attribute is true. 2008-12-01 19:03:07 +0100 kohei r264628 : added accelerator for the plot hidden values check box. 2008-12-01 18:32:02 +0100 kohei r264626 : changed wording per Ingrid's suggestion. 2008-11-26 08:09:36 +0100 kohei r264341 : the 'Starnding angle' fixed line was 6 pixel short. 2008-11-26 08:02:47 +0100 kohei r264340 : added include-hidden-cells check box for the pie chart type too & some code cleanup. 2008-11-26 07:41:45 +0100 kohei r264339 : relocate the controls correctly for line chart types. 2008-11-26 07:14:26 +0100 kohei r264337 : #i95714# fixed typos that caused incorrect scaling of the y-axis under some conditions. 2008-11-26 07:11:54 +0100 kohei r264336 : added "Include hidden cells" check box in the data series options tab page. 2008-11-25 21:04:58 +0100 kohei r264333 : don't check for the number of charts; when importing from xls, the count may be zero even when the document has charts. 2008-11-25 19:55:50 +0100 kohei r264332 : patch from ooo-build applied. This implements chart listener that listens on cells show/hide state for the chart's data areas. 2008-11-25 19:52:38 +0100 kohei r264331 : patch from ooo-build applied. 2008-11-25 19:29:54 +0100 kohei r264329 : new xml token for include-hidden-cells attribute.
2009-05-18 16:46:40 +00:00
sal_Int32 nOldCount = mrTable.nNumberOfColsEstimate;
sal_Int32 nNewCount = nOldCount + nRepeated;
mrTable.nNumberOfColsEstimate = nNewCount;
if( bHidden )
2000-09-18 16:07:07 +00:00
{
CWS-TOOLING: integrate CWS koheichart01 2009-05-15 06:32:38 +0200 hde r271925 : header fixed 2009-04-14 16:23:35 +0200 hde r270792 : #100231# 2009-04-14 16:13:48 +0200 hde r270790 : #100231# 2009-04-14 15:56:14 +0200 hde r270787 : #100231# 2009-04-14 14:28:40 +0200 hde r270767 : #100231# 2009-04-14 14:27:30 +0200 hde r270766 : #100231# 2009-04-14 09:43:07 +0200 hde r270749 : #100231# 2009-04-14 09:25:52 +0200 hde r270748 : #100231# 2009-03-25 16:18:26 +0100 iha r270034 : #i91578# removed compiler warning 2009-03-25 03:20:36 +0100 kohei r269992 : fixed a silly typo in in-line comment. 2009-03-24 17:03:57 +0100 kohei r269977 : Let's use row and column's hidden flags, instead of width/height, to determine cell's hidden state. 2009-03-24 16:53:10 +0100 kohei r269973 : The chart positioner no longer needs to skip hidden cells, as hidden cells are handled elsewhere. 2009-03-24 16:50:12 +0100 kohei r269971 : the index should be 0-based (although chart2 doesn't appear to make use of this data any more). 2009-03-24 16:47:56 +0100 kohei r269969 : Skip hidden cells during cache (re-)build, when the include hidden cells flag is false. Also avoid adding data cache when the cell is hidden. 2009-03-24 06:05:53 +0100 kohei r269909 : fixed the build breakage after the resync. 2009-03-24 06:05:34 +0100 kohei r269908 : fixed the build breakage after the resync. 2009-03-23 23:38:36 +0100 kohei r269900 : CWS-TOOLING: rebase CWS koheichart01 to trunk@269781 (milestone: DEV300:m44) 2009-03-17 13:11:40 +0100 iha r269597 : #i91578# import IncludeHiddenCells from xlsx 2009-03-17 12:56:09 +0100 iha r269594 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-17 12:49:13 +0100 iha r269592 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-16 17:03:55 +0100 iha r269561 : #i91578# remove unused variable 2009-03-16 10:22:30 +0100 iha r269509 : #i91578# changed wording 2009-03-04 17:07:16 +0100 iha r268846 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:04:22 +0100 iha r268845 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:03:43 +0100 iha r268844 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 16:24:30 +0100 iha r268843 : #i91578# display of hidden cells - added missing property description 2009-03-04 15:13:04 +0100 iha r268835 : #i91578# display of hidden cells - remove unused code 2009-03-04 14:38:44 +0100 iha r268832 : #i91578# display of hidden cells - reset state corretly when doing undo/redo 2009-03-04 13:42:10 +0100 iha r268822 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:40:10 +0100 iha r268821 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:37:05 +0100 iha r268820 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-03 11:18:39 +0100 iha r268713 : #i91578# display of hidden cells - hide control if the functionality is not offered by the data provider 2009-03-02 17:41:37 +0100 kohei r268684 : removed unintended change from DEV300_m38, which was probably introduced due to some sort of problem during rebase. 2009-02-27 18:51:34 +0100 iha r268613 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:45:48 +0100 iha r268612 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:44:17 +0100 iha r268611 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:35:09 +0100 iha r268610 : #i91578# display of hidden cells - copy-paste-scenario: export hidden flag per column on copy for migration to locale table during import upon paste 2009-02-19 06:47:56 +0100 kohei r268257 : also, set the default value of a cached cell to NaN just in case. 2009-02-19 06:42:08 +0100 kohei r268256 : Set the IsValue flag to false by default so that an empty cell is properly flaged as non-value. This fixes the broken missing value treatment. 2009-02-18 20:16:30 +0100 iha r268255 : #i91578# display of hidden cells - radio button 'leave gap' was not clickable anymore 2009-02-17 17:57:24 +0100 iha r268185 : #i91578# display of hidden cells - corrected range highlighting 2009-02-17 15:39:52 +0100 iha r268174 : #i91578# display of hidden cells - still display data point value in tip help of data points in writer 2009-02-17 11:21:00 +0100 iha r267861 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-17 11:15:14 +0100 iha r267853 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-16 16:48:10 +0100 iha r267826 : #i91578# display of hidden cells - group related ids and minimize changes 2009-02-16 14:32:11 +0100 iha r267813 : #i91578# display of hidden cells - don't share resource identifier as this easily produces conflicts -> move IDs for series options page into a separate file 2009-02-16 13:21:44 +0100 iha r267795 : #i91578# display of hidden cells - remove unused member 2009-02-16 13:13:40 +0100 iha r267794 : #i91578# display of hidden cells - remove unused methods 2009-02-16 13:00:10 +0100 iha r267792 : #i91578# display of hidden - avoid unnecessary data copy 2009-02-16 11:40:41 +0100 iha r267785 : #i91578# display of hidden - corrected typo 2009-02-16 11:28:39 +0100 iha r267783 : #i91578# display of hidden - set correct dirty state in method setIncludeHiddenCells 2009-02-13 17:04:50 +0100 iha r267734 : #i91578# corrected position and visibility of the controls for display of hidden cells in case of stock charts 2009-02-13 15:30:17 +0100 iha r267724 : #i91578# charts without category range and charts with data from writer table were broken causes by features changes for display of hidden cells 2009-01-14 19:47:28 +0100 kohei r266330 : #i91578# Fixed the issue with incorrect tooltip category values. 2009-01-05 22:27:03 +0100 kohei r265887 : fixed a regression where the x-axis failed to display values when they were numeric or dates. 2008-12-24 17:01:15 +0100 kohei r265800 : CWS-TOOLING: rebase CWS koheichart01 to trunk@265758 (milestone: DEV300:m38) 2008-12-24 16:03:08 +0100 kohei r265799 : a little more code cleanup, mostly on tab to whitespace conversion on modified lines and removal of unnecessary 'using' statements. 2008-12-24 15:52:00 +0100 kohei r265798 : removed unnecessary header inclusion & remove hidden data *only when* the 'include hidden cells' options it false! I'm glad I caught this. 2008-12-24 07:41:23 +0100 kohei r265796 : replaced duplicated local functions with a single template function. 2008-12-24 06:37:15 +0100 kohei r265795 : reverted my last commit, because it was not the right approach. Instead of using the original data point index in the object name, leave that index alone, and remove hidden data in the tooltip text value lookup code. 2008-12-23 23:10:42 +0100 kohei r265793 : fixed the tooltips so that they would display correct values, taking into account the hidden data points (if any). 2008-12-20 05:26:07 +0100 kohei r265739 : CWS-TOOLING: rebase CWS koheichart01 to trunk@264807 (milestone: DEV300:m37) 2008-12-18 15:49:59 +0100 kohei r265696 : removed markRangeDirty() for now, since that method is still a bit controvertial per Niklas's comment in i#91578. 2008-12-05 20:27:24 +0100 kohei r264918 : removed a compiler warning. 2008-12-05 20:24:02 +0100 kohei r264917 : removed a compilar warning. 2008-12-03 17:06:22 +0100 kohei r264800 : recovered the original keyword file before it was stripped. 2008-12-01 22:00:24 +0100 kohei r264640 : by default, "include hidden cells" attribute is true. 2008-12-01 19:03:07 +0100 kohei r264628 : added accelerator for the plot hidden values check box. 2008-12-01 18:32:02 +0100 kohei r264626 : changed wording per Ingrid's suggestion. 2008-11-26 08:09:36 +0100 kohei r264341 : the 'Starnding angle' fixed line was 6 pixel short. 2008-11-26 08:02:47 +0100 kohei r264340 : added include-hidden-cells check box for the pie chart type too & some code cleanup. 2008-11-26 07:41:45 +0100 kohei r264339 : relocate the controls correctly for line chart types. 2008-11-26 07:14:26 +0100 kohei r264337 : #i95714# fixed typos that caused incorrect scaling of the y-axis under some conditions. 2008-11-26 07:11:54 +0100 kohei r264336 : added "Include hidden cells" check box in the data series options tab page. 2008-11-25 21:04:58 +0100 kohei r264333 : don't check for the number of charts; when importing from xls, the count may be zero even when the document has charts. 2008-11-25 19:55:50 +0100 kohei r264332 : patch from ooo-build applied. This implements chart listener that listens on cells show/hide state for the chart's data areas. 2008-11-25 19:52:38 +0100 kohei r264331 : patch from ooo-build applied. 2008-11-25 19:29:54 +0100 kohei r264329 : new xml token for include-hidden-cells attribute.
2009-05-18 16:46:40 +00:00
//i91578 display of hidden values (copy paste scenario; use hidden flag during migration to locale table upon paste )
sal_Int32 nColOffset = ( mrTable.bHasHeaderColumn ? 1 : 0 );
for( sal_Int32 nN = nOldCount; nN<nNewCount; nN++ )
{
sal_Int32 nHiddenColumnIndex = nN-nColOffset;
if( nHiddenColumnIndex>=0 )
mrTable.aHiddenColumns.push_back(nHiddenColumnIndex);
}
2000-09-18 16:07:07 +00:00
}
}
SchXMLTableColumnContext::~SchXMLTableColumnContext()
{
}
// ========================================
// classes for rows
// ========================================
// ----------------------------------------
// class SchXMLTableRowsContext
// ----------------------------------------
SchXMLTableRowsContext::SchXMLTableRowsContext(
SchXMLImportHelper& rImpHelper,
SvXMLImport& rImport,
const rtl::OUString& rLocalName,
SchXMLTable& aTable ) :
SvXMLImportContext( rImport, XML_NAMESPACE_TABLE, rLocalName ),
mrImportHelper( rImpHelper ),
mrTable( aTable )
{
}
SchXMLTableRowsContext::~SchXMLTableRowsContext()
{
}
SvXMLImportContext* SchXMLTableRowsContext::CreateChildContext(
sal_uInt16 nPrefix,
2000-09-18 16:07:07 +00:00
const rtl::OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& )
2000-09-18 16:07:07 +00:00
{
SvXMLImportContext* pContext = 0;
if( nPrefix == XML_NAMESPACE_TABLE &&
IsXMLToken( rLocalName, XML_TABLE_ROW ) )
2000-09-18 16:07:07 +00:00
{
pContext = new SchXMLTableRowContext( mrImportHelper, GetImport(), rLocalName, mrTable );
}
else
{
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
}
return pContext;
}
// ----------------------------------------
// class SchXMLTableRowContext
// ----------------------------------------
SchXMLTableRowContext::SchXMLTableRowContext(
SchXMLImportHelper& rImpHelper,
SvXMLImport& rImport,
const rtl::OUString& rLocalName,
SchXMLTable& aTable ) :
SvXMLImportContext( rImport, XML_NAMESPACE_TABLE, rLocalName ),
mrImportHelper( rImpHelper ),
mrTable( aTable )
{
mrTable.nColumnIndex = -1;
mrTable.nRowIndex++;
std::vector< SchXMLCell > aNewRow;
aNewRow.reserve( mrTable.nNumberOfColsEstimate );
2001-03-15 19:18:32 +00:00
while( mrTable.aData.size() <= (unsigned long)mrTable.nRowIndex )
2000-09-18 16:07:07 +00:00
mrTable.aData.push_back( aNewRow );
}
SchXMLTableRowContext::~SchXMLTableRowContext()
{
}
SvXMLImportContext* SchXMLTableRowContext::CreateChildContext(
sal_uInt16 nPrefix,
2000-09-18 16:07:07 +00:00
const rtl::OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& )
2000-09-18 16:07:07 +00:00
{
SvXMLImportContext* pContext = 0;
// <table:table-cell> element
if( nPrefix == XML_NAMESPACE_TABLE &&
IsXMLToken(rLocalName, XML_TABLE_CELL ) )
2000-09-18 16:07:07 +00:00
{
pContext = new SchXMLTableCellContext( mrImportHelper, GetImport(), rLocalName, mrTable );
}
else
{
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
}
return pContext;
}
//---------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------
class SchXMLRangeSomewhereContext : public SvXMLImportContext
{
//#i113950# previously the range was exported to attribute text:id,
//but that attribute does not allow arbitrary strings anymore
//so we need to find an alternative to save that range info for copy/paste scenario ...
//-> use description at an empty group element for now
private:
::rtl::OUString& mrRangeString;
::rtl::OUStringBuffer maRangeStringBuffer;
public:
SchXMLRangeSomewhereContext( SvXMLImport& rImport,
sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
::rtl::OUString& rRangeString );
virtual ~SchXMLRangeSomewhereContext();
virtual SvXMLImportContext* CreateChildContext(
sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
virtual void EndElement();
};
//---------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
// ========================================
// classes for cells and their content
// ========================================
// ----------------------------------------
// class SchXMLTableCellContext
// ----------------------------------------
SchXMLTableCellContext::SchXMLTableCellContext(
SchXMLImportHelper& rImpHelper,
SvXMLImport& rImport,
const rtl::OUString& rLocalName,
SchXMLTable& aTable ) :
SvXMLImportContext( rImport, XML_NAMESPACE_TABLE, rLocalName ),
mrImportHelper( rImpHelper ),
mrTable( aTable )
{
}
SchXMLTableCellContext::~SchXMLTableCellContext()
{
}
void SchXMLTableCellContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
{
sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
rtl::OUString aValue;
rtl::OUString aLocalName;
rtl::OUString aCellContent;
SchXMLCellType eValueType = SCH_CELL_TYPE_UNKNOWN;
const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetCellAttrTokenMap();
for( sal_Int16 i = 0; i < nAttrCount; i++ )
{
rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
2000-09-18 16:07:07 +00:00
switch( rAttrTokenMap.Get( nPrefix, aLocalName ))
{
case XML_TOK_CELL_VAL_TYPE:
aValue = xAttrList->getValueByIndex( i );
if( IsXMLToken( aValue, XML_FLOAT ) )
2000-09-18 16:07:07 +00:00
eValueType = SCH_CELL_TYPE_FLOAT;
else if( IsXMLToken( aValue, XML_STRING ) )
2000-09-18 16:07:07 +00:00
eValueType = SCH_CELL_TYPE_STRING;
break;
case XML_TOK_CELL_VALUE:
aCellContent = xAttrList->getValueByIndex( i );
break;
}
}
mbReadText = sal_True;
2000-09-18 16:07:07 +00:00
SchXMLCell aCell;
aCell.eType = eValueType;
if( eValueType == SCH_CELL_TYPE_FLOAT )
{
double fData;
// the result may be false if a NaN is read, but that's ok
::sax::Converter::convertDouble( fData, aCellContent );
2000-09-18 16:07:07 +00:00
aCell.fValue = fData;
// dont read text from following <text:p> or <text:list> element
mbReadText = sal_False;
2000-09-18 16:07:07 +00:00
}
mrTable.aData[ mrTable.nRowIndex ].push_back( aCell );
mrTable.nColumnIndex++;
if( mrTable.nMaxColumnIndex < mrTable.nColumnIndex )
mrTable.nMaxColumnIndex = mrTable.nColumnIndex;
}
SvXMLImportContext* SchXMLTableCellContext::CreateChildContext(
sal_uInt16 nPrefix,
2000-09-18 16:07:07 +00:00
const rtl::OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& )
2000-09-18 16:07:07 +00:00
{
SvXMLImportContext* pContext = 0;
// <text:list> element
if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_LIST ) && mbReadText )
{
SchXMLCell& rCell = mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex ];
rCell.aComplexString = Sequence< OUString >();
rCell.eType = SCH_CELL_TYPE_COMPLEX_STRING;
pContext = new SchXMLTextListContext( GetImport(), rLocalName, rCell.aComplexString );
mbReadText = sal_False;//don't apply text from <text:p>
}
// <text:p> element - read text (and range from text:id old version)
else if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_P ) )
2000-09-18 16:07:07 +00:00
{
pContext = new SchXMLParagraphContext( GetImport(), rLocalName, maCellContent, &maRangeId );
2000-09-18 16:07:07 +00:00
}
// <draw:g> element - read range
else if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_G ) )
{
//#i113950# previously the range was exported to attribute text:id, but that attribute does not allow arbitrary strings anymore
//so we need to find an alternative to save that range info for copy/paste scenario ... -> use description at an empty group element for now
2010-09-23 13:38:12 +02:00
pContext = new SchXMLRangeSomewhereContext( GetImport(), nPrefix, rLocalName, maRangeId );
}
2000-09-18 16:07:07 +00:00
else
{
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
}
return pContext;
}
void SchXMLTableCellContext::EndElement()
{
if( mbReadText && !maCellContent.isEmpty() ) //apply text from <text:p> element
2000-09-18 16:07:07 +00:00
mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex ].aString = maCellContent;
if( !maRangeId.isEmpty())
mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex ].aRangeId = maRangeId;
2000-09-18 16:07:07 +00:00
}
// ========================================
static void lcl_ApplyCellToComplexLabel( const SchXMLCell& rCell, Sequence< uno::Any >& rComplexLabel )
{
if( rCell.eType == SCH_CELL_TYPE_STRING )
{
rComplexLabel.realloc(1);
2010-11-30 01:45:03 +01:00
rComplexLabel[0] = uno::makeAny( rCell.aString );
}
else if( rCell.aComplexString.getLength() && rCell.eType == SCH_CELL_TYPE_COMPLEX_STRING )
2010-11-30 01:45:03 +01:00
{
sal_Int32 nCount = rCell.aComplexString.getLength();
2010-11-30 01:45:03 +01:00
rComplexLabel.realloc( nCount );
for( sal_Int32 nN=0; nN<nCount; nN++)
rComplexLabel[nN] = uno::makeAny((rCell.aComplexString)[nN]);
2010-11-30 01:45:03 +01:00
}
else if( rCell.eType == SCH_CELL_TYPE_FLOAT )
{
rComplexLabel.realloc(1);
rComplexLabel[0] = uno::makeAny( rCell.fValue );
}
}
void SchXMLTableHelper::applyTableToInternalDataProvider(
const SchXMLTable& rTable,
uno::Reference< chart2::XChartDocument > xChartDoc )
{
// apply all data read from the local table to the internal data provider
if( !xChartDoc.is() || !xChartDoc->hasInternalDataProvider() )
return;
Reference< chart2::data::XDataProvider > xDataProv( xChartDoc->getDataProvider() );
if( !xDataProv.is() )
return;
//prepare the read local table data
sal_Int32 nNumRows( static_cast< sal_Int32 >( rTable.aData.size()));
sal_Int32 nRowOffset = 0;
if( rTable.bHasHeaderRow )
{
--nNumRows;
nRowOffset = 1;
}
sal_Int32 nNumColumns( rTable.nMaxColumnIndex + 1 );
sal_Int32 nColOffset = 0;
if( rTable.bHasHeaderColumn )
{
--nNumColumns;
nColOffset = 1;
}
Sequence< Sequence< double > > aDataInRows( nNumRows );
2010-11-30 01:45:03 +01:00
Sequence< Sequence< uno::Any > > aComplexRowDescriptions( nNumRows );
Sequence< Sequence< uno::Any > > aComplexColumnDescriptions( nNumColumns );
for( sal_Int32 i=0; i<nNumRows; ++i )
aDataInRows[i].realloc( nNumColumns );
if( rTable.aData.begin() != rTable.aData.end())
{
//apply column labels
if( rTable.bHasHeaderRow )
{
const ::std::vector< SchXMLCell >& rFirstRow = rTable.aData.front();
const sal_Int32 nColumnLabelsSize = aComplexColumnDescriptions.getLength();
const sal_Int32 nMax = ::std::min< sal_Int32 >( nColumnLabelsSize, static_cast< sal_Int32 >( rFirstRow.size()) - nColOffset );
OSL_ASSERT( nMax == nColumnLabelsSize );
for( sal_Int32 i=0; i<nMax; ++i )
lcl_ApplyCellToComplexLabel( rFirstRow[i+nColOffset], aComplexColumnDescriptions[i] );
}
std::vector< ::std::vector< SchXMLCell > >::const_iterator aRowIter( rTable.aData.begin() + nRowOffset );
std::vector< ::std::vector< SchXMLCell > >::const_iterator aEnd( rTable.aData.end() );
for( sal_Int32 nRow = 0; aRowIter != aEnd && nRow < nNumRows; ++aRowIter, ++nRow )
{
const ::std::vector< SchXMLCell >& rRow = *aRowIter;
if( !rRow.empty() )
{
// row label
if( rTable.bHasHeaderColumn )
lcl_ApplyCellToComplexLabel( rRow.front(), aComplexRowDescriptions[nRow] );
// values
Sequence< double >& rTargetRow = aDataInRows[nRow];
lcl_ApplyCellToData aApplyCellToData = ::std::for_each( rRow.begin() + nColOffset, rRow.end(), lcl_ApplyCellToData( rTargetRow ) );
double fNaN = 0.0;
::rtl::math::setNan( &fNaN );
for( sal_Int32 nCurrentIndex = aApplyCellToData.getCurrentIndex(); nCurrentIndex<nNumColumns; nCurrentIndex++ )
rTargetRow[nCurrentIndex] = fNaN;//#i110615#
}
}
}
//apply the collected data to the chart
2010-11-30 01:45:03 +01:00
Reference< chart2::XAnyDescriptionAccess > xDataAccess( xDataProv, uno::UNO_QUERY );
if( !xDataAccess.is() )
return;
xDataAccess->setData( aDataInRows );
if( rTable.bHasHeaderColumn )
2010-11-30 01:45:03 +01:00
xDataAccess->setAnyRowDescriptions( aComplexRowDescriptions );
if( rTable.bHasHeaderRow )
2010-11-30 01:45:03 +01:00
xDataAccess->setAnyColumnDescriptions( aComplexColumnDescriptions );
if ( rTable.bProtected )
{
try
{
Reference< beans::XPropertySet > xProps( xChartDoc, uno::UNO_QUERY_THROW );
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ), uno::makeAny( sal_True ) );
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableComplexChartTypes" ) ), uno::makeAny( sal_True ) );
}
catch ( uno::Exception& )
{
}
}
}
CWS-TOOLING: integrate CWS chart39 2009-06-30 16:55:46 +0200 iha r273522 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-30 16:45:59 +0200 iha r273521 : #i102701# apply patch for P1 issue on dev300m50 to be able to save again 2009-06-30 16:32:32 +0200 iha r273520 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-29 10:04:34 +0200 iha r273454 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-26 19:31:16 +0200 iha r273437 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-25 10:36:28 +0200 iha r273367 : #i101968# text values in data range cause incorrect x values 2009-06-24 17:34:18 +0200 iha r273357 : #i102428# x values are wrong in xy-scatter-chart with own data table if empty cells are contained in x values 2009-06-24 10:16:25 +0200 iha r273317 : #i99915# wrong matrix translation causes broken chart display for small values 2009-06-19 17:20:06 +0200 iha r273174 : #i78025# charts own borders are not completely visible 2009-06-19 17:18:41 +0200 iha r273172 : #i102950# don't paint additional borders for charts 2009-06-11 16:27:54 +0200 iha r272884 : CWS-TOOLING: rebase CWS chart39 to trunk@272827 (milestone: DEV300:m50) 2009-06-09 17:50:10 +0200 iha r272790 : #i97222# when converting a chart via API to 3D categories get lost and for line,area&xy the stacking mode is wrong 2009-06-09 16:00:27 +0200 iha r272775 : #i98319# data point properties get lost while copying charts from calc to impress 2009-06-09 10:26:51 +0200 iha r272755 : #i98392# correct orienation of gradient fillings on 3D walls 2009-05-29 10:35:16 +0200 iha r272436 : #i100529# Plot missing values - leave gap fails for smoothed lines 2009-05-04 18:20:31 +0200 iha r271478 : #i99841# Title with Vertically stacked attribute is wrong after editing 2009-05-04 18:03:01 +0200 iha r271477 : #i101050# avoid a corner in closed lines, which are smoothed by spline 2009-05-04 16:45:18 +0200 iha r271472 : #i101050# avoid crash in case the normals sequence has less points than the polygon
2009-07-28 10:25:31 +00:00
void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
const SchXMLTable& rTable,
const tSchXMLLSequencesPerIndex & rLSequencesPerIndex,
uno::Reference< chart2::XChartDocument > xChartDoc,
chart::ChartDataRowSource eDataRowSource )
{
if( ! (xChartDoc.is() && xChartDoc->hasInternalDataProvider()))
return;
CWS-TOOLING: integrate CWS chart39 2009-06-30 16:55:46 +0200 iha r273522 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-30 16:45:59 +0200 iha r273521 : #i102701# apply patch for P1 issue on dev300m50 to be able to save again 2009-06-30 16:32:32 +0200 iha r273520 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-29 10:04:34 +0200 iha r273454 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-26 19:31:16 +0200 iha r273437 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-25 10:36:28 +0200 iha r273367 : #i101968# text values in data range cause incorrect x values 2009-06-24 17:34:18 +0200 iha r273357 : #i102428# x values are wrong in xy-scatter-chart with own data table if empty cells are contained in x values 2009-06-24 10:16:25 +0200 iha r273317 : #i99915# wrong matrix translation causes broken chart display for small values 2009-06-19 17:20:06 +0200 iha r273174 : #i78025# charts own borders are not completely visible 2009-06-19 17:18:41 +0200 iha r273172 : #i102950# don't paint additional borders for charts 2009-06-11 16:27:54 +0200 iha r272884 : CWS-TOOLING: rebase CWS chart39 to trunk@272827 (milestone: DEV300:m50) 2009-06-09 17:50:10 +0200 iha r272790 : #i97222# when converting a chart via API to 3D categories get lost and for line,area&xy the stacking mode is wrong 2009-06-09 16:00:27 +0200 iha r272775 : #i98319# data point properties get lost while copying charts from calc to impress 2009-06-09 10:26:51 +0200 iha r272755 : #i98392# correct orienation of gradient fillings on 3D walls 2009-05-29 10:35:16 +0200 iha r272436 : #i100529# Plot missing values - leave gap fails for smoothed lines 2009-05-04 18:20:31 +0200 iha r271478 : #i99841# Title with Vertically stacked attribute is wrong after editing 2009-05-04 18:03:01 +0200 iha r271477 : #i101050# avoid a corner in closed lines, which are smoothed by spline 2009-05-04 16:45:18 +0200 iha r271472 : #i101050# avoid crash in case the normals sequence has less points than the polygon
2009-07-28 10:25:31 +00:00
// If the range-strings are valid (starting with "local-table") they should
// be interpreted like given, otherwise (when the ranges refer to Calc- or
// Writer-ranges, but the container is not available like when pasting a
// chart from Calc to Impress) the range is ignored, and every object gets
// one table column in the order of appearance, which is: 1. categories,
// 2. data series: 2.a) domains, 2.b) values (main-role, usually y-values)
Reference< chart2::data::XDataProvider > xDataProv( xChartDoc->getDataProvider());
// create a mapping from original ranges to new ranges
lcl_tOriginalRangeToInternalRangeMap aRangeMap;
lcl_fillRangeMapping( rTable, aRangeMap, eDataRowSource );
const OUString lcl_aCategoriesRange(aCategoriesRange);
bool bCategoriesApplied = false;
// translate ranges (using the map created before)
for( tSchXMLLSequencesPerIndex::const_iterator aLSeqIt( rLSequencesPerIndex.begin());
aLSeqIt != rLSequencesPerIndex.end(); ++aLSeqIt )
2000-09-18 16:07:07 +00:00
{
if( aLSeqIt->second.is())
2000-09-18 16:07:07 +00:00
{
// values/error bars/categories
if( aLSeqIt->first.second == SCH_XML_PART_VALUES ||
aLSeqIt->first.second == SCH_XML_PART_ERROR_BARS )
2000-09-18 16:07:07 +00:00
{
Reference< chart2::data::XDataSequence > xSeq( aLSeqIt->second->getValues());
OUString aRange;
if( xSeq.is() &&
SchXMLTools::getXMLRangePropertyFromDataSequence( xSeq, aRange, /* bClearProp = */ true ) &&
lcl_mapContainsRange( aRangeMap, aRange ))
2000-09-18 16:07:07 +00:00
{
Reference< chart2::data::XDataSequence > xNewSeq(
lcl_reassignDataSequence( xSeq, xDataProv, aRangeMap, aRange ));
if( xNewSeq != xSeq )
{
CWS-TOOLING: integrate CWS chart39 2009-06-30 16:55:46 +0200 iha r273522 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-30 16:45:59 +0200 iha r273521 : #i102701# apply patch for P1 issue on dev300m50 to be able to save again 2009-06-30 16:32:32 +0200 iha r273520 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-29 10:04:34 +0200 iha r273454 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-26 19:31:16 +0200 iha r273437 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-25 10:36:28 +0200 iha r273367 : #i101968# text values in data range cause incorrect x values 2009-06-24 17:34:18 +0200 iha r273357 : #i102428# x values are wrong in xy-scatter-chart with own data table if empty cells are contained in x values 2009-06-24 10:16:25 +0200 iha r273317 : #i99915# wrong matrix translation causes broken chart display for small values 2009-06-19 17:20:06 +0200 iha r273174 : #i78025# charts own borders are not completely visible 2009-06-19 17:18:41 +0200 iha r273172 : #i102950# don't paint additional borders for charts 2009-06-11 16:27:54 +0200 iha r272884 : CWS-TOOLING: rebase CWS chart39 to trunk@272827 (milestone: DEV300:m50) 2009-06-09 17:50:10 +0200 iha r272790 : #i97222# when converting a chart via API to 3D categories get lost and for line,area&xy the stacking mode is wrong 2009-06-09 16:00:27 +0200 iha r272775 : #i98319# data point properties get lost while copying charts from calc to impress 2009-06-09 10:26:51 +0200 iha r272755 : #i98392# correct orienation of gradient fillings on 3D walls 2009-05-29 10:35:16 +0200 iha r272436 : #i100529# Plot missing values - leave gap fails for smoothed lines 2009-05-04 18:20:31 +0200 iha r271478 : #i99841# Title with Vertically stacked attribute is wrong after editing 2009-05-04 18:03:01 +0200 iha r271477 : #i101050# avoid a corner in closed lines, which are smoothed by spline 2009-05-04 16:45:18 +0200 iha r271472 : #i101050# avoid crash in case the normals sequence has less points than the polygon
2009-07-28 10:25:31 +00:00
SchXMLTools::copyProperties( Reference< beans::XPropertySet >( xSeq, uno::UNO_QUERY ),
Reference< beans::XPropertySet >( xNewSeq, uno::UNO_QUERY ));
aLSeqIt->second->setValues( xNewSeq );
}
2000-09-18 16:07:07 +00:00
}
else
2000-09-18 16:07:07 +00:00
{
if( lcl_tableOfRangeMatches( aRange, rTable.aTableNameOfFile ))
{
if( aLSeqIt->first.first == SCH_XML_CATEGORIES_INDEX )
bCategoriesApplied = true;
}
else
{
if( aLSeqIt->first.first == SCH_XML_CATEGORIES_INDEX )
{
Reference< beans::XPropertySet > xOldSequenceProp( aLSeqIt->second->getValues(), uno::UNO_QUERY );
Reference< chart2::data::XDataSequence > xNewSequence(
xDataProv->createDataSequenceByRangeRepresentation(
OUString(RTL_CONSTASCII_USTRINGPARAM("categories"))));
CWS-TOOLING: integrate CWS chart39 2009-06-30 16:55:46 +0200 iha r273522 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-30 16:45:59 +0200 iha r273521 : #i102701# apply patch for P1 issue on dev300m50 to be able to save again 2009-06-30 16:32:32 +0200 iha r273520 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-29 10:04:34 +0200 iha r273454 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-26 19:31:16 +0200 iha r273437 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-25 10:36:28 +0200 iha r273367 : #i101968# text values in data range cause incorrect x values 2009-06-24 17:34:18 +0200 iha r273357 : #i102428# x values are wrong in xy-scatter-chart with own data table if empty cells are contained in x values 2009-06-24 10:16:25 +0200 iha r273317 : #i99915# wrong matrix translation causes broken chart display for small values 2009-06-19 17:20:06 +0200 iha r273174 : #i78025# charts own borders are not completely visible 2009-06-19 17:18:41 +0200 iha r273172 : #i102950# don't paint additional borders for charts 2009-06-11 16:27:54 +0200 iha r272884 : CWS-TOOLING: rebase CWS chart39 to trunk@272827 (milestone: DEV300:m50) 2009-06-09 17:50:10 +0200 iha r272790 : #i97222# when converting a chart via API to 3D categories get lost and for line,area&xy the stacking mode is wrong 2009-06-09 16:00:27 +0200 iha r272775 : #i98319# data point properties get lost while copying charts from calc to impress 2009-06-09 10:26:51 +0200 iha r272755 : #i98392# correct orienation of gradient fillings on 3D walls 2009-05-29 10:35:16 +0200 iha r272436 : #i100529# Plot missing values - leave gap fails for smoothed lines 2009-05-04 18:20:31 +0200 iha r271478 : #i99841# Title with Vertically stacked attribute is wrong after editing 2009-05-04 18:03:01 +0200 iha r271477 : #i101050# avoid a corner in closed lines, which are smoothed by spline 2009-05-04 16:45:18 +0200 iha r271472 : #i101050# avoid crash in case the normals sequence has less points than the polygon
2009-07-28 10:25:31 +00:00
SchXMLTools::copyProperties(
xOldSequenceProp, Reference< beans::XPropertySet >( xNewSequence, uno::UNO_QUERY ));
aLSeqIt->second->setValues( xNewSequence );
bCategoriesApplied = true;
}
else
{
Reference< beans::XPropertySet > xOldSequenceProp( aLSeqIt->second->getValues(), uno::UNO_QUERY );
OUString aRep( OUString::valueOf( aLSeqIt->first.first ));
Reference< chart2::data::XDataSequence > xNewSequence(
xDataProv->createDataSequenceByRangeRepresentation( aRep ));
CWS-TOOLING: integrate CWS chart39 2009-06-30 16:55:46 +0200 iha r273522 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-30 16:45:59 +0200 iha r273521 : #i102701# apply patch for P1 issue on dev300m50 to be able to save again 2009-06-30 16:32:32 +0200 iha r273520 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-29 10:04:34 +0200 iha r273454 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-26 19:31:16 +0200 iha r273437 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-25 10:36:28 +0200 iha r273367 : #i101968# text values in data range cause incorrect x values 2009-06-24 17:34:18 +0200 iha r273357 : #i102428# x values are wrong in xy-scatter-chart with own data table if empty cells are contained in x values 2009-06-24 10:16:25 +0200 iha r273317 : #i99915# wrong matrix translation causes broken chart display for small values 2009-06-19 17:20:06 +0200 iha r273174 : #i78025# charts own borders are not completely visible 2009-06-19 17:18:41 +0200 iha r273172 : #i102950# don't paint additional borders for charts 2009-06-11 16:27:54 +0200 iha r272884 : CWS-TOOLING: rebase CWS chart39 to trunk@272827 (milestone: DEV300:m50) 2009-06-09 17:50:10 +0200 iha r272790 : #i97222# when converting a chart via API to 3D categories get lost and for line,area&xy the stacking mode is wrong 2009-06-09 16:00:27 +0200 iha r272775 : #i98319# data point properties get lost while copying charts from calc to impress 2009-06-09 10:26:51 +0200 iha r272755 : #i98392# correct orienation of gradient fillings on 3D walls 2009-05-29 10:35:16 +0200 iha r272436 : #i100529# Plot missing values - leave gap fails for smoothed lines 2009-05-04 18:20:31 +0200 iha r271478 : #i99841# Title with Vertically stacked attribute is wrong after editing 2009-05-04 18:03:01 +0200 iha r271477 : #i101050# avoid a corner in closed lines, which are smoothed by spline 2009-05-04 16:45:18 +0200 iha r271472 : #i101050# avoid crash in case the normals sequence has less points than the polygon
2009-07-28 10:25:31 +00:00
SchXMLTools::copyProperties(
xOldSequenceProp, Reference< beans::XPropertySet >( xNewSequence, uno::UNO_QUERY ));
aLSeqIt->second->setValues( xNewSequence );
}
}
2000-09-18 16:07:07 +00:00
}
}
else // labels
2000-09-18 16:07:07 +00:00
{
OSL_ASSERT( aLSeqIt->first.second == SCH_XML_PART_LABEL );
// labels
Reference< chart2::data::XDataSequence > xSeq( aLSeqIt->second->getLabel());
OUString aRange;
if( xSeq.is() &&
SchXMLTools::getXMLRangePropertyFromDataSequence( xSeq, aRange, /* bClearProp = */ true ) &&
lcl_mapContainsRange( aRangeMap, aRange ))
{
Reference< chart2::data::XDataSequence > xNewSeq(
lcl_reassignDataSequence( xSeq, xDataProv, aRangeMap, aRange ));
if( xNewSeq != xSeq )
{
CWS-TOOLING: integrate CWS chart39 2009-06-30 16:55:46 +0200 iha r273522 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-30 16:45:59 +0200 iha r273521 : #i102701# apply patch for P1 issue on dev300m50 to be able to save again 2009-06-30 16:32:32 +0200 iha r273520 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-29 10:04:34 +0200 iha r273454 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-26 19:31:16 +0200 iha r273437 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-25 10:36:28 +0200 iha r273367 : #i101968# text values in data range cause incorrect x values 2009-06-24 17:34:18 +0200 iha r273357 : #i102428# x values are wrong in xy-scatter-chart with own data table if empty cells are contained in x values 2009-06-24 10:16:25 +0200 iha r273317 : #i99915# wrong matrix translation causes broken chart display for small values 2009-06-19 17:20:06 +0200 iha r273174 : #i78025# charts own borders are not completely visible 2009-06-19 17:18:41 +0200 iha r273172 : #i102950# don't paint additional borders for charts 2009-06-11 16:27:54 +0200 iha r272884 : CWS-TOOLING: rebase CWS chart39 to trunk@272827 (milestone: DEV300:m50) 2009-06-09 17:50:10 +0200 iha r272790 : #i97222# when converting a chart via API to 3D categories get lost and for line,area&xy the stacking mode is wrong 2009-06-09 16:00:27 +0200 iha r272775 : #i98319# data point properties get lost while copying charts from calc to impress 2009-06-09 10:26:51 +0200 iha r272755 : #i98392# correct orienation of gradient fillings on 3D walls 2009-05-29 10:35:16 +0200 iha r272436 : #i100529# Plot missing values - leave gap fails for smoothed lines 2009-05-04 18:20:31 +0200 iha r271478 : #i99841# Title with Vertically stacked attribute is wrong after editing 2009-05-04 18:03:01 +0200 iha r271477 : #i101050# avoid a corner in closed lines, which are smoothed by spline 2009-05-04 16:45:18 +0200 iha r271472 : #i101050# avoid crash in case the normals sequence has less points than the polygon
2009-07-28 10:25:31 +00:00
SchXMLTools::copyProperties( Reference< beans::XPropertySet >( xSeq, uno::UNO_QUERY ),
Reference< beans::XPropertySet >( xNewSeq, uno::UNO_QUERY ));
aLSeqIt->second->setLabel( xNewSeq );
}
}
else if( ! lcl_tableOfRangeMatches( aRange, rTable.aTableNameOfFile ))
{
OUString aRep( RTL_CONSTASCII_USTRINGPARAM("label "));
aRep += OUString::valueOf( aLSeqIt->first.first );
Reference< chart2::data::XDataSequence > xNewSeq(
xDataProv->createDataSequenceByRangeRepresentation( aRep ));
CWS-TOOLING: integrate CWS chart39 2009-06-30 16:55:46 +0200 iha r273522 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-30 16:45:59 +0200 iha r273521 : #i102701# apply patch for P1 issue on dev300m50 to be able to save again 2009-06-30 16:32:32 +0200 iha r273520 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-29 10:04:34 +0200 iha r273454 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-26 19:31:16 +0200 iha r273437 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-25 10:36:28 +0200 iha r273367 : #i101968# text values in data range cause incorrect x values 2009-06-24 17:34:18 +0200 iha r273357 : #i102428# x values are wrong in xy-scatter-chart with own data table if empty cells are contained in x values 2009-06-24 10:16:25 +0200 iha r273317 : #i99915# wrong matrix translation causes broken chart display for small values 2009-06-19 17:20:06 +0200 iha r273174 : #i78025# charts own borders are not completely visible 2009-06-19 17:18:41 +0200 iha r273172 : #i102950# don't paint additional borders for charts 2009-06-11 16:27:54 +0200 iha r272884 : CWS-TOOLING: rebase CWS chart39 to trunk@272827 (milestone: DEV300:m50) 2009-06-09 17:50:10 +0200 iha r272790 : #i97222# when converting a chart via API to 3D categories get lost and for line,area&xy the stacking mode is wrong 2009-06-09 16:00:27 +0200 iha r272775 : #i98319# data point properties get lost while copying charts from calc to impress 2009-06-09 10:26:51 +0200 iha r272755 : #i98392# correct orienation of gradient fillings on 3D walls 2009-05-29 10:35:16 +0200 iha r272436 : #i100529# Plot missing values - leave gap fails for smoothed lines 2009-05-04 18:20:31 +0200 iha r271478 : #i99841# Title with Vertically stacked attribute is wrong after editing 2009-05-04 18:03:01 +0200 iha r271477 : #i101050# avoid a corner in closed lines, which are smoothed by spline 2009-05-04 16:45:18 +0200 iha r271472 : #i101050# avoid crash in case the normals sequence has less points than the polygon
2009-07-28 10:25:31 +00:00
SchXMLTools::copyProperties( Reference< beans::XPropertySet >( xSeq, uno::UNO_QUERY ),
Reference< beans::XPropertySet >( xNewSeq, uno::UNO_QUERY ));
aLSeqIt->second->setLabel( xNewSeq );
}
2000-09-18 16:07:07 +00:00
}
}
}
// there exist files with own data without a categories element but with row
// descriptions. The row descriptions were used as categories even without
// the categories element
if( ! bCategoriesApplied )
{
SchXMLTools::CreateCategories(
xDataProv, xChartDoc, OUString(RTL_CONSTASCII_USTRINGPARAM("categories")),
0 /* nCooSysIndex */, 0 /* nDimension */ );
2000-09-18 16:07:07 +00:00
}
CWS-TOOLING: integrate CWS koheichart01 2009-05-15 06:32:38 +0200 hde r271925 : header fixed 2009-04-14 16:23:35 +0200 hde r270792 : #100231# 2009-04-14 16:13:48 +0200 hde r270790 : #100231# 2009-04-14 15:56:14 +0200 hde r270787 : #100231# 2009-04-14 14:28:40 +0200 hde r270767 : #100231# 2009-04-14 14:27:30 +0200 hde r270766 : #100231# 2009-04-14 09:43:07 +0200 hde r270749 : #100231# 2009-04-14 09:25:52 +0200 hde r270748 : #100231# 2009-03-25 16:18:26 +0100 iha r270034 : #i91578# removed compiler warning 2009-03-25 03:20:36 +0100 kohei r269992 : fixed a silly typo in in-line comment. 2009-03-24 17:03:57 +0100 kohei r269977 : Let's use row and column's hidden flags, instead of width/height, to determine cell's hidden state. 2009-03-24 16:53:10 +0100 kohei r269973 : The chart positioner no longer needs to skip hidden cells, as hidden cells are handled elsewhere. 2009-03-24 16:50:12 +0100 kohei r269971 : the index should be 0-based (although chart2 doesn't appear to make use of this data any more). 2009-03-24 16:47:56 +0100 kohei r269969 : Skip hidden cells during cache (re-)build, when the include hidden cells flag is false. Also avoid adding data cache when the cell is hidden. 2009-03-24 06:05:53 +0100 kohei r269909 : fixed the build breakage after the resync. 2009-03-24 06:05:34 +0100 kohei r269908 : fixed the build breakage after the resync. 2009-03-23 23:38:36 +0100 kohei r269900 : CWS-TOOLING: rebase CWS koheichart01 to trunk@269781 (milestone: DEV300:m44) 2009-03-17 13:11:40 +0100 iha r269597 : #i91578# import IncludeHiddenCells from xlsx 2009-03-17 12:56:09 +0100 iha r269594 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-17 12:49:13 +0100 iha r269592 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-16 17:03:55 +0100 iha r269561 : #i91578# remove unused variable 2009-03-16 10:22:30 +0100 iha r269509 : #i91578# changed wording 2009-03-04 17:07:16 +0100 iha r268846 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:04:22 +0100 iha r268845 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:03:43 +0100 iha r268844 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 16:24:30 +0100 iha r268843 : #i91578# display of hidden cells - added missing property description 2009-03-04 15:13:04 +0100 iha r268835 : #i91578# display of hidden cells - remove unused code 2009-03-04 14:38:44 +0100 iha r268832 : #i91578# display of hidden cells - reset state corretly when doing undo/redo 2009-03-04 13:42:10 +0100 iha r268822 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:40:10 +0100 iha r268821 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:37:05 +0100 iha r268820 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-03 11:18:39 +0100 iha r268713 : #i91578# display of hidden cells - hide control if the functionality is not offered by the data provider 2009-03-02 17:41:37 +0100 kohei r268684 : removed unintended change from DEV300_m38, which was probably introduced due to some sort of problem during rebase. 2009-02-27 18:51:34 +0100 iha r268613 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:45:48 +0100 iha r268612 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:44:17 +0100 iha r268611 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:35:09 +0100 iha r268610 : #i91578# display of hidden cells - copy-paste-scenario: export hidden flag per column on copy for migration to locale table during import upon paste 2009-02-19 06:47:56 +0100 kohei r268257 : also, set the default value of a cached cell to NaN just in case. 2009-02-19 06:42:08 +0100 kohei r268256 : Set the IsValue flag to false by default so that an empty cell is properly flaged as non-value. This fixes the broken missing value treatment. 2009-02-18 20:16:30 +0100 iha r268255 : #i91578# display of hidden cells - radio button 'leave gap' was not clickable anymore 2009-02-17 17:57:24 +0100 iha r268185 : #i91578# display of hidden cells - corrected range highlighting 2009-02-17 15:39:52 +0100 iha r268174 : #i91578# display of hidden cells - still display data point value in tip help of data points in writer 2009-02-17 11:21:00 +0100 iha r267861 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-17 11:15:14 +0100 iha r267853 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-16 16:48:10 +0100 iha r267826 : #i91578# display of hidden cells - group related ids and minimize changes 2009-02-16 14:32:11 +0100 iha r267813 : #i91578# display of hidden cells - don't share resource identifier as this easily produces conflicts -> move IDs for series options page into a separate file 2009-02-16 13:21:44 +0100 iha r267795 : #i91578# display of hidden cells - remove unused member 2009-02-16 13:13:40 +0100 iha r267794 : #i91578# display of hidden cells - remove unused methods 2009-02-16 13:00:10 +0100 iha r267792 : #i91578# display of hidden - avoid unnecessary data copy 2009-02-16 11:40:41 +0100 iha r267785 : #i91578# display of hidden - corrected typo 2009-02-16 11:28:39 +0100 iha r267783 : #i91578# display of hidden - set correct dirty state in method setIncludeHiddenCells 2009-02-13 17:04:50 +0100 iha r267734 : #i91578# corrected position and visibility of the controls for display of hidden cells in case of stock charts 2009-02-13 15:30:17 +0100 iha r267724 : #i91578# charts without category range and charts with data from writer table were broken causes by features changes for display of hidden cells 2009-01-14 19:47:28 +0100 kohei r266330 : #i91578# Fixed the issue with incorrect tooltip category values. 2009-01-05 22:27:03 +0100 kohei r265887 : fixed a regression where the x-axis failed to display values when they were numeric or dates. 2008-12-24 17:01:15 +0100 kohei r265800 : CWS-TOOLING: rebase CWS koheichart01 to trunk@265758 (milestone: DEV300:m38) 2008-12-24 16:03:08 +0100 kohei r265799 : a little more code cleanup, mostly on tab to whitespace conversion on modified lines and removal of unnecessary 'using' statements. 2008-12-24 15:52:00 +0100 kohei r265798 : removed unnecessary header inclusion & remove hidden data *only when* the 'include hidden cells' options it false! I'm glad I caught this. 2008-12-24 07:41:23 +0100 kohei r265796 : replaced duplicated local functions with a single template function. 2008-12-24 06:37:15 +0100 kohei r265795 : reverted my last commit, because it was not the right approach. Instead of using the original data point index in the object name, leave that index alone, and remove hidden data in the tooltip text value lookup code. 2008-12-23 23:10:42 +0100 kohei r265793 : fixed the tooltips so that they would display correct values, taking into account the hidden data points (if any). 2008-12-20 05:26:07 +0100 kohei r265739 : CWS-TOOLING: rebase CWS koheichart01 to trunk@264807 (milestone: DEV300:m37) 2008-12-18 15:49:59 +0100 kohei r265696 : removed markRangeDirty() for now, since that method is still a bit controvertial per Niklas's comment in i#91578. 2008-12-05 20:27:24 +0100 kohei r264918 : removed a compiler warning. 2008-12-05 20:24:02 +0100 kohei r264917 : removed a compilar warning. 2008-12-03 17:06:22 +0100 kohei r264800 : recovered the original keyword file before it was stripped. 2008-12-01 22:00:24 +0100 kohei r264640 : by default, "include hidden cells" attribute is true. 2008-12-01 19:03:07 +0100 kohei r264628 : added accelerator for the plot hidden values check box. 2008-12-01 18:32:02 +0100 kohei r264626 : changed wording per Ingrid's suggestion. 2008-11-26 08:09:36 +0100 kohei r264341 : the 'Starnding angle' fixed line was 6 pixel short. 2008-11-26 08:02:47 +0100 kohei r264340 : added include-hidden-cells check box for the pie chart type too & some code cleanup. 2008-11-26 07:41:45 +0100 kohei r264339 : relocate the controls correctly for line chart types. 2008-11-26 07:14:26 +0100 kohei r264337 : #i95714# fixed typos that caused incorrect scaling of the y-axis under some conditions. 2008-11-26 07:11:54 +0100 kohei r264336 : added "Include hidden cells" check box in the data series options tab page. 2008-11-25 21:04:58 +0100 kohei r264333 : don't check for the number of charts; when importing from xls, the count may be zero even when the document has charts. 2008-11-25 19:55:50 +0100 kohei r264332 : patch from ooo-build applied. This implements chart listener that listens on cells show/hide state for the chart's data areas. 2008-11-25 19:52:38 +0100 kohei r264331 : patch from ooo-build applied. 2008-11-25 19:29:54 +0100 kohei r264329 : new xml token for include-hidden-cells attribute.
2009-05-18 16:46:40 +00:00
//i91578 display of hidden values (copy paste scenario; use hidden flag during migration to locale table upon paste )
//remove series that consist only of hidden columns
Reference< chart2::XInternalDataProvider > xInternalDataProvider( xDataProv, uno::UNO_QUERY );
if( xInternalDataProvider.is() && !rTable.aHiddenColumns.empty() )
{
try
{
Reference< chart2::XCoordinateSystemContainer > xCooSysCnt( xChartDoc->getFirstDiagram(), uno::UNO_QUERY_THROW );
Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq( xCooSysCnt->getCoordinateSystems() );
for( sal_Int32 nC=0; nC<aCooSysSeq.getLength(); ++nC )
{
Reference< chart2::XChartTypeContainer > xCooSysContainer( aCooSysSeq[nC], uno::UNO_QUERY_THROW );
Sequence< Reference< chart2::XChartType > > aChartTypeSeq( xCooSysContainer->getChartTypes());
for( sal_Int32 nT=0; nT<aChartTypeSeq.getLength(); ++nT )
{
Reference< chart2::XDataSeriesContainer > xSeriesContainer( aChartTypeSeq[nT], uno::UNO_QUERY );
if(!xSeriesContainer.is())
continue;
Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesContainer->getDataSeries() );
std::vector< Reference< chart2::XDataSeries > > aRemainingSeries;
for( sal_Int32 nS = 0; nS < aSeriesSeq.getLength(); nS++ )
{
Reference< chart2::data::XDataSource > xDataSource( aSeriesSeq[nS], uno::UNO_QUERY );
if( xDataSource.is() )
{
bool bHasUnhiddenColumns = false;
rtl::OUString aRange;
uno::Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences( xDataSource->getDataSequences() );
for( sal_Int32 nN=0; nN< aSequences.getLength(); ++nN )
{
Reference< chart2::data::XLabeledDataSequence > xLabeledSequence( aSequences[nN] );
if(!xLabeledSequence.is())
continue;
Reference< chart2::data::XDataSequence > xValues( xLabeledSequence->getValues() );
if( xValues.is() )
{
aRange = xValues->getSourceRangeRepresentation();
if( ::std::find( rTable.aHiddenColumns.begin(), rTable.aHiddenColumns.end(), aRange.toInt32() ) == rTable.aHiddenColumns.end() )
bHasUnhiddenColumns = true;
}
if( !bHasUnhiddenColumns )
{
Reference< chart2::data::XDataSequence > xLabel( xLabeledSequence->getLabel() );
if( xLabel.is() )
{
aRange = xLabel->getSourceRangeRepresentation();
sal_Int32 nSearchIndex = 0;
OUString aSecondToken = aRange.getToken( 1, ' ', nSearchIndex );
if( ::std::find( rTable.aHiddenColumns.begin(), rTable.aHiddenColumns.end(), aSecondToken.toInt32() ) == rTable.aHiddenColumns.end() )
bHasUnhiddenColumns = true;
}
}
}
if( bHasUnhiddenColumns )
aRemainingSeries.push_back( aSeriesSeq[nS] );
}
}
if( static_cast<sal_Int32>(aRemainingSeries.size()) != aSeriesSeq.getLength() )
{
//remove the series that have only hidden data
Sequence< Reference< chart2::XDataSeries > > aRemainingSeriesSeq( aRemainingSeries.size());
::std::copy( aRemainingSeries.begin(), aRemainingSeries.end(), aRemainingSeriesSeq.getArray());
xSeriesContainer->setDataSeries( aRemainingSeriesSeq );
//remove unused sequences
Reference< chart2::data::XDataSource > xDataSource( xChartDoc, uno::UNO_QUERY );
if( xDataSource.is() )
{
//first detect which collumns are really used
std::map< sal_Int32, bool > aUsageMap;
rtl::OUString aRange;
Sequence< Reference< chart2::data::XLabeledDataSequence > > aUsedSequences( xDataSource->getDataSequences() );
for( sal_Int32 nN=0; nN< aUsedSequences.getLength(); ++nN )
{
Reference< chart2::data::XLabeledDataSequence > xLabeledSequence( aUsedSequences[nN] );
if(!xLabeledSequence.is())
continue;
Reference< chart2::data::XDataSequence > xValues( xLabeledSequence->getValues() );
if( xValues.is() )
{
aRange = xValues->getSourceRangeRepresentation();
sal_Int32 nIndex = aRange.toInt32();
if( nIndex!=0 || !aRange.equals(lcl_aCategoriesRange) )
aUsageMap[nIndex] = true;
}
Reference< chart2::data::XDataSequence > xLabel( xLabeledSequence->getLabel() );
if( xLabel.is() )
{
aRange = xLabel->getSourceRangeRepresentation();
sal_Int32 nSearchIndex = 0;
OUString aSecondToken = aRange.getToken( 1, ' ', nSearchIndex );
if( !aSecondToken.isEmpty() )
CWS-TOOLING: integrate CWS koheichart01 2009-05-15 06:32:38 +0200 hde r271925 : header fixed 2009-04-14 16:23:35 +0200 hde r270792 : #100231# 2009-04-14 16:13:48 +0200 hde r270790 : #100231# 2009-04-14 15:56:14 +0200 hde r270787 : #100231# 2009-04-14 14:28:40 +0200 hde r270767 : #100231# 2009-04-14 14:27:30 +0200 hde r270766 : #100231# 2009-04-14 09:43:07 +0200 hde r270749 : #100231# 2009-04-14 09:25:52 +0200 hde r270748 : #100231# 2009-03-25 16:18:26 +0100 iha r270034 : #i91578# removed compiler warning 2009-03-25 03:20:36 +0100 kohei r269992 : fixed a silly typo in in-line comment. 2009-03-24 17:03:57 +0100 kohei r269977 : Let's use row and column's hidden flags, instead of width/height, to determine cell's hidden state. 2009-03-24 16:53:10 +0100 kohei r269973 : The chart positioner no longer needs to skip hidden cells, as hidden cells are handled elsewhere. 2009-03-24 16:50:12 +0100 kohei r269971 : the index should be 0-based (although chart2 doesn't appear to make use of this data any more). 2009-03-24 16:47:56 +0100 kohei r269969 : Skip hidden cells during cache (re-)build, when the include hidden cells flag is false. Also avoid adding data cache when the cell is hidden. 2009-03-24 06:05:53 +0100 kohei r269909 : fixed the build breakage after the resync. 2009-03-24 06:05:34 +0100 kohei r269908 : fixed the build breakage after the resync. 2009-03-23 23:38:36 +0100 kohei r269900 : CWS-TOOLING: rebase CWS koheichart01 to trunk@269781 (milestone: DEV300:m44) 2009-03-17 13:11:40 +0100 iha r269597 : #i91578# import IncludeHiddenCells from xlsx 2009-03-17 12:56:09 +0100 iha r269594 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-17 12:49:13 +0100 iha r269592 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-16 17:03:55 +0100 iha r269561 : #i91578# remove unused variable 2009-03-16 10:22:30 +0100 iha r269509 : #i91578# changed wording 2009-03-04 17:07:16 +0100 iha r268846 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:04:22 +0100 iha r268845 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:03:43 +0100 iha r268844 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 16:24:30 +0100 iha r268843 : #i91578# display of hidden cells - added missing property description 2009-03-04 15:13:04 +0100 iha r268835 : #i91578# display of hidden cells - remove unused code 2009-03-04 14:38:44 +0100 iha r268832 : #i91578# display of hidden cells - reset state corretly when doing undo/redo 2009-03-04 13:42:10 +0100 iha r268822 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:40:10 +0100 iha r268821 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:37:05 +0100 iha r268820 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-03 11:18:39 +0100 iha r268713 : #i91578# display of hidden cells - hide control if the functionality is not offered by the data provider 2009-03-02 17:41:37 +0100 kohei r268684 : removed unintended change from DEV300_m38, which was probably introduced due to some sort of problem during rebase. 2009-02-27 18:51:34 +0100 iha r268613 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:45:48 +0100 iha r268612 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:44:17 +0100 iha r268611 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:35:09 +0100 iha r268610 : #i91578# display of hidden cells - copy-paste-scenario: export hidden flag per column on copy for migration to locale table during import upon paste 2009-02-19 06:47:56 +0100 kohei r268257 : also, set the default value of a cached cell to NaN just in case. 2009-02-19 06:42:08 +0100 kohei r268256 : Set the IsValue flag to false by default so that an empty cell is properly flaged as non-value. This fixes the broken missing value treatment. 2009-02-18 20:16:30 +0100 iha r268255 : #i91578# display of hidden cells - radio button 'leave gap' was not clickable anymore 2009-02-17 17:57:24 +0100 iha r268185 : #i91578# display of hidden cells - corrected range highlighting 2009-02-17 15:39:52 +0100 iha r268174 : #i91578# display of hidden cells - still display data point value in tip help of data points in writer 2009-02-17 11:21:00 +0100 iha r267861 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-17 11:15:14 +0100 iha r267853 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-16 16:48:10 +0100 iha r267826 : #i91578# display of hidden cells - group related ids and minimize changes 2009-02-16 14:32:11 +0100 iha r267813 : #i91578# display of hidden cells - don't share resource identifier as this easily produces conflicts -> move IDs for series options page into a separate file 2009-02-16 13:21:44 +0100 iha r267795 : #i91578# display of hidden cells - remove unused member 2009-02-16 13:13:40 +0100 iha r267794 : #i91578# display of hidden cells - remove unused methods 2009-02-16 13:00:10 +0100 iha r267792 : #i91578# display of hidden - avoid unnecessary data copy 2009-02-16 11:40:41 +0100 iha r267785 : #i91578# display of hidden - corrected typo 2009-02-16 11:28:39 +0100 iha r267783 : #i91578# display of hidden - set correct dirty state in method setIncludeHiddenCells 2009-02-13 17:04:50 +0100 iha r267734 : #i91578# corrected position and visibility of the controls for display of hidden cells in case of stock charts 2009-02-13 15:30:17 +0100 iha r267724 : #i91578# charts without category range and charts with data from writer table were broken causes by features changes for display of hidden cells 2009-01-14 19:47:28 +0100 kohei r266330 : #i91578# Fixed the issue with incorrect tooltip category values. 2009-01-05 22:27:03 +0100 kohei r265887 : fixed a regression where the x-axis failed to display values when they were numeric or dates. 2008-12-24 17:01:15 +0100 kohei r265800 : CWS-TOOLING: rebase CWS koheichart01 to trunk@265758 (milestone: DEV300:m38) 2008-12-24 16:03:08 +0100 kohei r265799 : a little more code cleanup, mostly on tab to whitespace conversion on modified lines and removal of unnecessary 'using' statements. 2008-12-24 15:52:00 +0100 kohei r265798 : removed unnecessary header inclusion & remove hidden data *only when* the 'include hidden cells' options it false! I'm glad I caught this. 2008-12-24 07:41:23 +0100 kohei r265796 : replaced duplicated local functions with a single template function. 2008-12-24 06:37:15 +0100 kohei r265795 : reverted my last commit, because it was not the right approach. Instead of using the original data point index in the object name, leave that index alone, and remove hidden data in the tooltip text value lookup code. 2008-12-23 23:10:42 +0100 kohei r265793 : fixed the tooltips so that they would display correct values, taking into account the hidden data points (if any). 2008-12-20 05:26:07 +0100 kohei r265739 : CWS-TOOLING: rebase CWS koheichart01 to trunk@264807 (milestone: DEV300:m37) 2008-12-18 15:49:59 +0100 kohei r265696 : removed markRangeDirty() for now, since that method is still a bit controvertial per Niklas's comment in i#91578. 2008-12-05 20:27:24 +0100 kohei r264918 : removed a compiler warning. 2008-12-05 20:24:02 +0100 kohei r264917 : removed a compilar warning. 2008-12-03 17:06:22 +0100 kohei r264800 : recovered the original keyword file before it was stripped. 2008-12-01 22:00:24 +0100 kohei r264640 : by default, "include hidden cells" attribute is true. 2008-12-01 19:03:07 +0100 kohei r264628 : added accelerator for the plot hidden values check box. 2008-12-01 18:32:02 +0100 kohei r264626 : changed wording per Ingrid's suggestion. 2008-11-26 08:09:36 +0100 kohei r264341 : the 'Starnding angle' fixed line was 6 pixel short. 2008-11-26 08:02:47 +0100 kohei r264340 : added include-hidden-cells check box for the pie chart type too & some code cleanup. 2008-11-26 07:41:45 +0100 kohei r264339 : relocate the controls correctly for line chart types. 2008-11-26 07:14:26 +0100 kohei r264337 : #i95714# fixed typos that caused incorrect scaling of the y-axis under some conditions. 2008-11-26 07:11:54 +0100 kohei r264336 : added "Include hidden cells" check box in the data series options tab page. 2008-11-25 21:04:58 +0100 kohei r264333 : don't check for the number of charts; when importing from xls, the count may be zero even when the document has charts. 2008-11-25 19:55:50 +0100 kohei r264332 : patch from ooo-build applied. This implements chart listener that listens on cells show/hide state for the chart's data areas. 2008-11-25 19:52:38 +0100 kohei r264331 : patch from ooo-build applied. 2008-11-25 19:29:54 +0100 kohei r264329 : new xml token for include-hidden-cells attribute.
2009-05-18 16:46:40 +00:00
aUsageMap[aSecondToken.toInt32()] = true;
}
}
::std::vector< sal_Int32 > aSequenceIndexesToDelete;
for( ::std::vector< sal_Int32 >::const_iterator aIt(
rTable.aHiddenColumns.begin()); aIt != rTable.aHiddenColumns.end(); ++aIt )
{
sal_Int32 nSequenceIndex = *aIt;
if( aUsageMap.find(nSequenceIndex) != aUsageMap.end() )
continue;
aSequenceIndexesToDelete.push_back(nSequenceIndex);
}
// delete unnecessary sequences of the internal data
// iterate using greatest index first, so that deletion does not
// shift other sequences that will be deleted later
::std::sort( aSequenceIndexesToDelete.begin(), aSequenceIndexesToDelete.end());
for( ::std::vector< sal_Int32 >::reverse_iterator aIt(
aSequenceIndexesToDelete.rbegin()); aIt != aSequenceIndexesToDelete.rend(); ++aIt )
{
if( *aIt != -1 )
xInternalDataProvider->deleteSequence( *aIt );
}
}
}
}
}
}
2012-01-09 03:16:33 +09:00
catch( const uno::Exception & )
CWS-TOOLING: integrate CWS koheichart01 2009-05-15 06:32:38 +0200 hde r271925 : header fixed 2009-04-14 16:23:35 +0200 hde r270792 : #100231# 2009-04-14 16:13:48 +0200 hde r270790 : #100231# 2009-04-14 15:56:14 +0200 hde r270787 : #100231# 2009-04-14 14:28:40 +0200 hde r270767 : #100231# 2009-04-14 14:27:30 +0200 hde r270766 : #100231# 2009-04-14 09:43:07 +0200 hde r270749 : #100231# 2009-04-14 09:25:52 +0200 hde r270748 : #100231# 2009-03-25 16:18:26 +0100 iha r270034 : #i91578# removed compiler warning 2009-03-25 03:20:36 +0100 kohei r269992 : fixed a silly typo in in-line comment. 2009-03-24 17:03:57 +0100 kohei r269977 : Let's use row and column's hidden flags, instead of width/height, to determine cell's hidden state. 2009-03-24 16:53:10 +0100 kohei r269973 : The chart positioner no longer needs to skip hidden cells, as hidden cells are handled elsewhere. 2009-03-24 16:50:12 +0100 kohei r269971 : the index should be 0-based (although chart2 doesn't appear to make use of this data any more). 2009-03-24 16:47:56 +0100 kohei r269969 : Skip hidden cells during cache (re-)build, when the include hidden cells flag is false. Also avoid adding data cache when the cell is hidden. 2009-03-24 06:05:53 +0100 kohei r269909 : fixed the build breakage after the resync. 2009-03-24 06:05:34 +0100 kohei r269908 : fixed the build breakage after the resync. 2009-03-23 23:38:36 +0100 kohei r269900 : CWS-TOOLING: rebase CWS koheichart01 to trunk@269781 (milestone: DEV300:m44) 2009-03-17 13:11:40 +0100 iha r269597 : #i91578# import IncludeHiddenCells from xlsx 2009-03-17 12:56:09 +0100 iha r269594 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-17 12:49:13 +0100 iha r269592 : #i91578# import IncludeHiddenCells from xls correctly 2009-03-16 17:03:55 +0100 iha r269561 : #i91578# remove unused variable 2009-03-16 10:22:30 +0100 iha r269509 : #i91578# changed wording 2009-03-04 17:07:16 +0100 iha r268846 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:04:22 +0100 iha r268845 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 17:03:43 +0100 iha r268844 : #i91578# display of hidden cells - remove unused property 'IsHidden' 2009-03-04 16:24:30 +0100 iha r268843 : #i91578# display of hidden cells - added missing property description 2009-03-04 15:13:04 +0100 iha r268835 : #i91578# display of hidden cells - remove unused code 2009-03-04 14:38:44 +0100 iha r268832 : #i91578# display of hidden cells - reset state corretly when doing undo/redo 2009-03-04 13:42:10 +0100 iha r268822 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:40:10 +0100 iha r268821 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-04 13:37:05 +0100 iha r268820 : #i81209# #i91578# display of hidden cells - don't show hidden cells per default but keep the hidden ranges 2009-03-03 11:18:39 +0100 iha r268713 : #i91578# display of hidden cells - hide control if the functionality is not offered by the data provider 2009-03-02 17:41:37 +0100 kohei r268684 : removed unintended change from DEV300_m38, which was probably introduced due to some sort of problem during rebase. 2009-02-27 18:51:34 +0100 iha r268613 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:45:48 +0100 iha r268612 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:44:17 +0100 iha r268611 : #i91578# display of hidden cells - interface redesign: data provider+sequences are now controlled by the chart via a new parameter 'IncludeHiddenCells' thus unwanted values can be removed early in the communication 2009-02-27 18:35:09 +0100 iha r268610 : #i91578# display of hidden cells - copy-paste-scenario: export hidden flag per column on copy for migration to locale table during import upon paste 2009-02-19 06:47:56 +0100 kohei r268257 : also, set the default value of a cached cell to NaN just in case. 2009-02-19 06:42:08 +0100 kohei r268256 : Set the IsValue flag to false by default so that an empty cell is properly flaged as non-value. This fixes the broken missing value treatment. 2009-02-18 20:16:30 +0100 iha r268255 : #i91578# display of hidden cells - radio button 'leave gap' was not clickable anymore 2009-02-17 17:57:24 +0100 iha r268185 : #i91578# display of hidden cells - corrected range highlighting 2009-02-17 15:39:52 +0100 iha r268174 : #i91578# display of hidden cells - still display data point value in tip help of data points in writer 2009-02-17 11:21:00 +0100 iha r267861 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-17 11:15:14 +0100 iha r267853 : #i91578# display of hidden cells - do not show a space nor a legend entry for hidden series 2009-02-16 16:48:10 +0100 iha r267826 : #i91578# display of hidden cells - group related ids and minimize changes 2009-02-16 14:32:11 +0100 iha r267813 : #i91578# display of hidden cells - don't share resource identifier as this easily produces conflicts -> move IDs for series options page into a separate file 2009-02-16 13:21:44 +0100 iha r267795 : #i91578# display of hidden cells - remove unused member 2009-02-16 13:13:40 +0100 iha r267794 : #i91578# display of hidden cells - remove unused methods 2009-02-16 13:00:10 +0100 iha r267792 : #i91578# display of hidden - avoid unnecessary data copy 2009-02-16 11:40:41 +0100 iha r267785 : #i91578# display of hidden - corrected typo 2009-02-16 11:28:39 +0100 iha r267783 : #i91578# display of hidden - set correct dirty state in method setIncludeHiddenCells 2009-02-13 17:04:50 +0100 iha r267734 : #i91578# corrected position and visibility of the controls for display of hidden cells in case of stock charts 2009-02-13 15:30:17 +0100 iha r267724 : #i91578# charts without category range and charts with data from writer table were broken causes by features changes for display of hidden cells 2009-01-14 19:47:28 +0100 kohei r266330 : #i91578# Fixed the issue with incorrect tooltip category values. 2009-01-05 22:27:03 +0100 kohei r265887 : fixed a regression where the x-axis failed to display values when they were numeric or dates. 2008-12-24 17:01:15 +0100 kohei r265800 : CWS-TOOLING: rebase CWS koheichart01 to trunk@265758 (milestone: DEV300:m38) 2008-12-24 16:03:08 +0100 kohei r265799 : a little more code cleanup, mostly on tab to whitespace conversion on modified lines and removal of unnecessary 'using' statements. 2008-12-24 15:52:00 +0100 kohei r265798 : removed unnecessary header inclusion & remove hidden data *only when* the 'include hidden cells' options it false! I'm glad I caught this. 2008-12-24 07:41:23 +0100 kohei r265796 : replaced duplicated local functions with a single template function. 2008-12-24 06:37:15 +0100 kohei r265795 : reverted my last commit, because it was not the right approach. Instead of using the original data point index in the object name, leave that index alone, and remove hidden data in the tooltip text value lookup code. 2008-12-23 23:10:42 +0100 kohei r265793 : fixed the tooltips so that they would display correct values, taking into account the hidden data points (if any). 2008-12-20 05:26:07 +0100 kohei r265739 : CWS-TOOLING: rebase CWS koheichart01 to trunk@264807 (milestone: DEV300:m37) 2008-12-18 15:49:59 +0100 kohei r265696 : removed markRangeDirty() for now, since that method is still a bit controvertial per Niklas's comment in i#91578. 2008-12-05 20:27:24 +0100 kohei r264918 : removed a compiler warning. 2008-12-05 20:24:02 +0100 kohei r264917 : removed a compilar warning. 2008-12-03 17:06:22 +0100 kohei r264800 : recovered the original keyword file before it was stripped. 2008-12-01 22:00:24 +0100 kohei r264640 : by default, "include hidden cells" attribute is true. 2008-12-01 19:03:07 +0100 kohei r264628 : added accelerator for the plot hidden values check box. 2008-12-01 18:32:02 +0100 kohei r264626 : changed wording per Ingrid's suggestion. 2008-11-26 08:09:36 +0100 kohei r264341 : the 'Starnding angle' fixed line was 6 pixel short. 2008-11-26 08:02:47 +0100 kohei r264340 : added include-hidden-cells check box for the pie chart type too & some code cleanup. 2008-11-26 07:41:45 +0100 kohei r264339 : relocate the controls correctly for line chart types. 2008-11-26 07:14:26 +0100 kohei r264337 : #i95714# fixed typos that caused incorrect scaling of the y-axis under some conditions. 2008-11-26 07:11:54 +0100 kohei r264336 : added "Include hidden cells" check box in the data series options tab page. 2008-11-25 21:04:58 +0100 kohei r264333 : don't check for the number of charts; when importing from xls, the count may be zero even when the document has charts. 2008-11-25 19:55:50 +0100 kohei r264332 : patch from ooo-build applied. This implements chart listener that listens on cells show/hide state for the chart's data areas. 2008-11-25 19:52:38 +0100 kohei r264331 : patch from ooo-build applied. 2008-11-25 19:29:54 +0100 kohei r264329 : new xml token for include-hidden-cells attribute.
2009-05-18 16:46:40 +00:00
{
}
}
2000-09-18 16:07:07 +00:00
}
//---------------------------------------------------------------------------------------------------
SchXMLRangeSomewhereContext::SchXMLRangeSomewhereContext( SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
OUString& rRangeString ) :
2010-09-23 13:38:12 +02:00
SvXMLImportContext( rImport, nPrefix, rLocalName ),
mrRangeString( rRangeString )
{
}
SchXMLRangeSomewhereContext::~SchXMLRangeSomewhereContext()
{
}
SvXMLImportContext* SchXMLRangeSomewhereContext::CreateChildContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& )
{
if( XML_NAMESPACE_SVG == nPrefix && IsXMLToken( rLocalName, XML_DESC ) )
{
return new XMLStringBufferImportContext(
GetImport(), nPrefix, rLocalName, maRangeStringBuffer );
}
return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
}
void SchXMLRangeSomewhereContext::EndElement()
{
mrRangeString = maRangeStringBuffer.makeStringAndClear();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */