summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/dialogs')
-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
3 files changed, 24 insertions, 2 deletions
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 2a41d35313e8..448adbf3e89c 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -59,6 +59,7 @@
#include "chartview/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 3dcaa3092e57..87cc48ec6a55 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