summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller')
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx2
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx14
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.cxx10
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.hxx2
-rw-r--r--chart2/source/controller/inc/dlg_ObjectProperties.hxx4
5 files changed, 29 insertions, 3 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index fd94ae0e3076..3498b812557a 100644..100755
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -381,7 +381,7 @@ struct lcl_AnyColumnDescriptionsOperator : public lcl_Operator
virtual bool setsCategories( bool bDataInColumns )
{
- return !bDataInColumns;
+ return bDataInColumns;
}
virtual void apply( const Reference< XAnyDescriptionAccess >& xDataAccess )
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 431616714c00..fd14db521416 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -59,6 +59,7 @@
#include "NumberFormatterWrapper.hxx"
#include "AxisIndexDefines.hxx"
#include "AxisHelper.hxx"
+#include "ExplicitCategoriesProvider.hxx"
#include <com/sun/star/chart2/XAxis.hpp>
#include <com/sun/star/chart2/XChartType.hpp>
@@ -116,6 +117,7 @@ ObjectPropertiesDialogParameter::ObjectPropertiesDialogParameter( const rtl::OUS
, m_bIsCrossingAxisIsCategoryAxis(false)
, m_aCategories()
, m_xChartDocument( 0 )
+ , m_bComplexCategoriesAxis( false )
{
rtl::OUString aParticleID = ObjectIdentifier::getParticleID( m_aObjectCID );
m_bAffectsMultipleObjects = aParticleID.equals(C2U("ALLELEMENTS"));
@@ -206,6 +208,13 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
if( m_bIsCrossingAxisIsCategoryAxis )
m_aCategories = DiagramHelper::getExplicitSimpleCategories( Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY) );
}
+
+ m_bComplexCategoriesAxis = false;
+ if ( nDimensionIndex == 0 && aData.AxisType == chart2::AxisType::CATEGORY )
+ {
+ ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSys, xChartModel );
+ m_bComplexCategoriesAxis = aExplicitCategoriesProvider.hasComplexCategories();
+ }
}
}
@@ -322,6 +331,10 @@ uno::Reference< chart2::XChartDocument > ObjectPropertiesDialogParameter::getDoc
{
return m_xChartDocument;
}
+bool ObjectPropertiesDialogParameter::IsComplexCategoriesAxis() const
+{
+ return m_bComplexCategoriesAxis;
+}
//const USHORT nNoArrowDlg = 1100;
const USHORT nNoArrowNoShadowDlg = 1101;
@@ -566,6 +579,7 @@ void SchAttribTabDlg::PageCreated(USHORT nId, SfxTabPage &rPage)
{
bool bShowStaggeringControls = m_pParameter->CanAxisLabelsBeStaggered();
((SchAxisLabelTabPage&)rPage).ShowStaggeringControls( bShowStaggeringControls );
+ ( dynamic_cast< SchAxisLabelTabPage& >( rPage ) ).SetComplexCategories( m_pParameter->IsComplexCategoriesAxis() );
break;
}
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index 876cb0f78c91..58322534cba6 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -78,7 +78,8 @@ SchAxisLabelTabPage::SchAxisLabelTabPage( Window* pParent, const SfxItemSet& rIn
m_nInitialDegrees( 0 ),
m_bHasInitialDegrees( true ),
m_bInitialStacking( false ),
- m_bHasInitialStacking( true )
+ m_bHasInitialStacking( true ),
+ m_bComplexCategories( false )
{
FreeResource();
@@ -295,6 +296,11 @@ void SchAxisLabelTabPage::ShowStaggeringControls( BOOL bShowStaggeringControls )
}
}
+void SchAxisLabelTabPage::SetComplexCategories( bool bComplexCategories )
+{
+ m_bComplexCategories = bComplexCategories;
+}
+
// event handling routines
// -----------------------
@@ -310,7 +316,7 @@ IMPL_LINK ( SchAxisLabelTabPage, ToggleShowLabel, void *, EMPTYARG )
aRbAuto.Enable( bEnable );
aFlTextFlow.Enable( bEnable );
- aCbTextOverlap.Enable( bEnable );
+ aCbTextOverlap.Enable( bEnable && !m_bComplexCategories );
aCbTextBreak.Enable( bEnable );
m_aFtTextDirection.Enable( bEnable );
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
index 6043b16001ac..a1b8c7530743 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx
@@ -76,6 +76,7 @@ private:
bool m_bHasInitialDegrees; /// false = DialControl in tristate
bool m_bInitialStacking;
bool m_bHasInitialStacking; /// false = checkbox in tristate
+ bool m_bComplexCategories;
DECL_LINK ( ToggleShowLabel, void* );
@@ -90,6 +91,7 @@ public:
virtual void Reset( const SfxItemSet& rInAttrs );
void ShowStaggeringControls( BOOL bShowStaggeringControls );
+ void SetComplexCategories( bool bComplexCategories );
};
//.............................................................................
} //namespace chart
diff --git a/chart2/source/controller/inc/dlg_ObjectProperties.hxx b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
index 8ceabdbe33b7..140c33389fe3 100644
--- a/chart2/source/controller/inc/dlg_ObjectProperties.hxx
+++ b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
@@ -69,6 +69,8 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >
getDocument() const;
+ bool IsComplexCategoriesAxis() const;
+
private:
rtl::OUString m_aObjectCID;
ObjectType m_eObjectType;
@@ -96,6 +98,8 @@ private:
::com::sun::star::uno::Sequence< rtl::OUString > m_aCategories;
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > m_xChartDocument;
+
+ bool m_bComplexCategoriesAxis;
};
/*************************************************************************