Kaydet (Commit) f9857727 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst 27eb0966
...@@ -303,7 +303,7 @@ bool DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const ...@@ -303,7 +303,7 @@ bool DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const
} }
if( m_pLB_TextDirection->GetSelectEntryCount() > 0 ) 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() ) if( m_pDC_Dial->IsVisible() )
{ {
......
...@@ -129,7 +129,7 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs ) ...@@ -129,7 +129,7 @@ bool SchAxisLabelTabPage::FillItemSet( SfxItemSet* rOutAttrs )
rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, m_pCbShowDescription->IsChecked() ) ); rOutAttrs->Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, m_pCbShowDescription->IsChecked() ) );
if( m_pLbTextDirection->GetSelectEntryCount() > 0 ) 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; return true;
} }
......
...@@ -51,7 +51,7 @@ bool SchLegendPosTabPage::FillItemSet(SfxItemSet* rOutAttrs) ...@@ -51,7 +51,7 @@ bool SchLegendPosTabPage::FillItemSet(SfxItemSet* rOutAttrs)
m_aLegendPositionResources.writeToItemSet(*rOutAttrs); m_aLegendPositionResources.writeToItemSet(*rOutAttrs);
if( m_pLbTextDirection->GetSelectEntryCount() > 0 ) 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; return true;
} }
......
...@@ -82,7 +82,7 @@ bool SchAlignmentTabPage::FillItemSet(SfxItemSet* rOutAttrs) ...@@ -82,7 +82,7 @@ bool SchAlignmentTabPage::FillItemSet(SfxItemSet* rOutAttrs)
rOutAttrs->Put( SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) ); rOutAttrs->Put( SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) );
SvxFrameDirection aDirection( m_pLbTextDirection->GetSelectEntryValue() ); SvxFrameDirection aDirection( m_pLbTextDirection->GetSelectEntryValue() );
rOutAttrs->Put( SfxInt32Item( EE_PARA_WRITINGDIR, aDirection ) ); rOutAttrs->Put( SvxFrameDirectionItem( aDirection, EE_PARA_WRITINGDIR ) );
return true; return true;
} }
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <GL3DBarChart.hxx> #include <GL3DBarChart.hxx>
#include <GL3DHelper.hxx> #include <GL3DHelper.hxx>
#include <editeng/frmdiritem.hxx>
#include <rtl/uuid.h> #include <rtl/uuid.h>
#include <comphelper/scopeguard.hxx> #include <comphelper/scopeguard.hxx>
#include <comphelper/servicehelper.hxx> #include <comphelper/servicehelper.hxx>
...@@ -1366,7 +1367,7 @@ void lcl_setDefaultWritingMode( ::boost::shared_ptr< DrawModelWrapper > pDrawMod ...@@ -1366,7 +1367,7 @@ void lcl_setDefaultWritingMode( ::boost::shared_ptr< DrawModelWrapper > pDrawMod
if( nWritingMode != -1 && nWritingMode != text::WritingMode2::PAGE ) if( nWritingMode != -1 && nWritingMode != text::WritingMode2::PAGE )
{ {
if( pDrawModelWrapper.get() ) 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 ) catch( const uno::Exception& ex )
...@@ -1383,7 +1384,7 @@ sal_Int16 lcl_getDefaultWritingModeFromPool( ::boost::shared_ptr< DrawModelWrapp ...@@ -1383,7 +1384,7 @@ sal_Int16 lcl_getDefaultWritingModeFromPool( ::boost::shared_ptr< DrawModelWrapp
{ {
const SfxPoolItem* pItem = &(pDrawModelWrapper->GetItemPool().GetDefaultItem( EE_PARA_WRITINGDIR )); const SfxPoolItem* pItem = &(pDrawModelWrapper->GetItemPool().GetDefaultItem( EE_PARA_WRITINGDIR ));
if( pItem ) 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; return nWritingMode;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment