summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2011-01-18 17:50:24 +0100
committerIvo Hinkelmann <ihi@openoffice.org>2011-01-18 17:50:24 +0100
commit05463782f43bb6d5d125fb635d8236863253ef8c (patch)
treeb94401277309027eab28bf95d00515450d698b29 /oox
parent6efd5a51be9b886775f2a90d10aae95bc936c767 (diff)
parentb0386b57360965453007a0c1165aa5b1f68f1076 (diff)
CWS-TOOLING: integrate CWS chartextensibility
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/oox/drawingml/chart/chartspacemodel.hxx1
-rw-r--r--oox/source/drawingml/chart/chartspaceconverter.cxx24
-rw-r--r--oox/source/drawingml/chart/chartspacefragment.cxx3
-rw-r--r--oox/source/drawingml/chart/chartspacemodel.cxx3
-rw-r--r--oox/source/token/properties.txt2
5 files changed, 32 insertions, 1 deletions
diff --git a/oox/inc/oox/drawingml/chart/chartspacemodel.hxx b/oox/inc/oox/drawingml/chart/chartspacemodel.hxx
index 37c39e315e3e..79390c8b8022 100644
--- a/oox/inc/oox/drawingml/chart/chartspacemodel.hxx
+++ b/oox/inc/oox/drawingml/chart/chartspacemodel.hxx
@@ -63,6 +63,7 @@ struct ChartSpaceModel
bool mbAutoTitleDel; /// True = automatic title deleted manually.
bool mbPlotVisOnly; /// True = plot visible cells in a sheet only.
bool mbShowLabelsOverMax;/// True = show labels over chart maximum.
+ bool mbPivotChart; /// True = pivot chart.
explicit ChartSpaceModel();
~ChartSpaceModel();
diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx
index b16ac91e09c9..fe7eb2352003 100644
--- a/oox/source/drawingml/chart/chartspaceconverter.cxx
+++ b/oox/source/drawingml/chart/chartspaceconverter.cxx
@@ -39,6 +39,22 @@
#include "oox/drawingml/chart/chartspacemodel.hxx"
#include "oox/drawingml/chart/plotareaconverter.hxx"
#include "oox/drawingml/chart/titleconverter.hxx"
+#include "properties.hxx"
+
+using ::rtl::OUString;
+using ::com::sun::star::awt::Point;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Exception;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::uno::makeAny;
+using ::com::sun::star::util::XNumberFormatsSupplier;
+using ::com::sun::star::drawing::XDrawPageSupplier;
+using ::com::sun::star::drawing::XShapes;
+using ::com::sun::star::chart2::XDiagram;
+using ::com::sun::star::chart2::XTitled;
+using ::com::sun::star::chart2::data::XDataReceiver;
+using ::com::sun::star::beans::XPropertySet;
namespace oox {
namespace drawingml {
@@ -197,6 +213,14 @@ void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExtern
catch( Exception& )
{
}
+
+ // pivot chart
+ if ( mrModel.mbPivotChart )
+ {
+ PropertySet aProps( getChartDocument() );
+ aProps.setProperty( PROP_DisableDataTableDialog , true );
+ aProps.setProperty( PROP_DisableComplexChartTypes , true );
+ }
}
// ============================================================================
diff --git a/oox/source/drawingml/chart/chartspacefragment.cxx b/oox/source/drawingml/chart/chartspacefragment.cxx
index d4b4a66f361f..06da27c02d01 100644
--- a/oox/source/drawingml/chart/chartspacefragment.cxx
+++ b/oox/source/drawingml/chart/chartspacefragment.cxx
@@ -81,6 +81,9 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const
case C_TOKEN( userShapes ):
mrModel.maDrawingPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
return 0;
+ case C_TOKEN( pivotSource ):
+ mrModel.mbPivotChart = true;
+ return 0;
}
break;
diff --git a/oox/source/drawingml/chart/chartspacemodel.cxx b/oox/source/drawingml/chart/chartspacemodel.cxx
index 3e2253a2ffc1..7f86448c8d08 100644
--- a/oox/source/drawingml/chart/chartspacemodel.cxx
+++ b/oox/source/drawingml/chart/chartspacemodel.cxx
@@ -38,7 +38,8 @@ ChartSpaceModel::ChartSpaceModel() :
mnStyle( 2 ),
mbAutoTitleDel( false ),
mbPlotVisOnly( false ),
- mbShowLabelsOverMax( false )
+ mbShowLabelsOverMax( false ),
+ mbPivotChart( false )
{
}
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 7d41b89bfa68..016ffc28bac5 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -116,6 +116,8 @@ DefaultValue
DiagonalBLTR
DiagonalTLBR
DialogLibraries
+DisableComplexChartTypes
+DisableDataTableDialog
DisplayLabels
DrillDownOnDoubleClick
Dropdown