summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-08-28 15:53:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-08-28 15:53:13 +0200
commitf9857727c619702e275c8ccb63a058a6be835707 (patch)
tree4e5045bf6813dab25cd349ce99e6a3986805d3e8 /chart2
parent27eb09662da8ca9bf44d424dec15d86a92b08b84 (diff)
EE_PARA_WRITINGDIR should presumably use an SvxFrameDirectionItem
...rather than an SfxInt32Item, just as it does everywhere else outside chart2. At least, running CppunitTest_chart2_export under -fsanitize=undefined complained about an invalid cast to SvxFrameDirectionItem. Change-Id: Ia7ea43a00d659de9642f801f390f45b9239d9c32
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_LegendPosition.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_TitleRotation.cxx2
-rw-r--r--chart2/source/view/main/ChartView.cxx5
5 files changed, 7 insertions, 6 deletions
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index 9185c154f118..b713879998e3 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -303,7 +303,7 @@ bool DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const
}
if( m_pLB_TextDirection->GetSelectEntryCount() > 0 )
- rOutAttrs->Put( SfxInt32Item( EE_PARA_WRITINGDIR, m_pLB_TextDirection->GetSelectEntryValue() ) );
+ rOutAttrs->Put( SvxFrameDirectionItem( m_pLB_TextDirection->GetSelectEntryValue(), EE_PARA_WRITINGDIR ) );
if( m_pDC_Dial->IsVisible() )
{
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index d44b48a076b9..7a6cf630735a 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -129,7 +129,7 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs )
rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, m_pCbShowDescription->IsChecked() ) );
if( m_pLbTextDirection->GetSelectEntryCount() > 0 )
- rOutAttrs->Put( SfxInt32Item( EE_PARA_WRITINGDIR, m_pLbTextDirection->GetSelectEntryValue() ) );
+ rOutAttrs->Put( SvxFrameDirectionItem( m_pLbTextDirection->GetSelectEntryValue(), EE_PARA_WRITINGDIR ) );
return true;
}
diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
index 13c2ff4c96d6..c80dc226c21f 100644
--- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx
@@ -51,7 +51,7 @@ bool SchLegendPosTabPage::FillItemSet(SfxItemSet* rOutAttrs)
m_aLegendPositionResources.writeToItemSet(*rOutAttrs);
if( m_pLbTextDirection->GetSelectEntryCount() > 0 )
- rOutAttrs->Put( SfxInt32Item( EE_PARA_WRITINGDIR, m_pLbTextDirection->GetSelectEntryValue() ) );
+ rOutAttrs->Put( SvxFrameDirectionItem( m_pLbTextDirection->GetSelectEntryValue(), EE_PARA_WRITINGDIR ) );
return true;
}
diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
index 56a8384f656c..9305545f1d86 100644
--- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx
+++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx
@@ -82,7 +82,7 @@ bool SchAlignmentTabPage::FillItemSet(SfxItemSet* rOutAttrs)
rOutAttrs->Put( SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) );
SvxFrameDirection aDirection( m_pLbTextDirection->GetSelectEntryValue() );
- rOutAttrs->Put( SfxInt32Item( EE_PARA_WRITINGDIR, aDirection ) );
+ rOutAttrs->Put( SvxFrameDirectionItem( aDirection, EE_PARA_WRITINGDIR ) );
return true;
}
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 902705b9ccfe..7f583f71179e 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -53,6 +53,7 @@
#include <GL3DBarChart.hxx>
#include <GL3DHelper.hxx>
+#include <editeng/frmdiritem.hxx>
#include <rtl/uuid.h>
#include <comphelper/scopeguard.hxx>
#include <comphelper/servicehelper.hxx>
@@ -1366,7 +1367,7 @@ void lcl_setDefaultWritingMode( ::boost::shared_ptr< DrawModelWrapper > pDrawMod
if( nWritingMode != -1 && nWritingMode != text::WritingMode2::PAGE )
{
if( pDrawModelWrapper.get() )
- pDrawModelWrapper->GetItemPool().SetPoolDefaultItem(SfxInt32Item(EE_PARA_WRITINGDIR, nWritingMode) );
+ pDrawModelWrapper->GetItemPool().SetPoolDefaultItem(SvxFrameDirectionItem(static_cast<SvxFrameDirection>(nWritingMode), EE_PARA_WRITINGDIR) );
}
}
catch( const uno::Exception& ex )
@@ -1383,7 +1384,7 @@ sal_Int16 lcl_getDefaultWritingModeFromPool( ::boost::shared_ptr< DrawModelWrapp
{
const SfxPoolItem* pItem = &(pDrawModelWrapper->GetItemPool().GetDefaultItem( EE_PARA_WRITINGDIR ));
if( pItem )
- nWritingMode = static_cast< sal_Int16 >((static_cast< const SfxInt32Item * >( pItem ))->GetValue());
+ nWritingMode = static_cast< sal_Int16 >((static_cast< const SvxFrameDirectionItem * >( pItem ))->GetValue());
}
return nWritingMode;
}