Kaydet (Commit) 4e58aa02 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Scope reduction.

Change-Id: Id677971ccd6959356a781a2d8c35ab864b35a62e
üst b26b1f79
...@@ -1384,15 +1384,15 @@ void lcl_setDefaultWritingMode( ::boost::shared_ptr< DrawModelWrapper > pDrawMod ...@@ -1384,15 +1384,15 @@ void lcl_setDefaultWritingMode( ::boost::shared_ptr< DrawModelWrapper > pDrawMod
} }
} }
sal_Int16 lcl_getDefaultWritingModeFromPool( ::boost::shared_ptr< DrawModelWrapper > pDrawModelWrapper ) sal_Int16 lcl_getDefaultWritingModeFromPool( const boost::shared_ptr<DrawModelWrapper>& pDrawModelWrapper )
{ {
sal_Int16 nWritingMode = text::WritingMode2::LR_TB; sal_Int16 nWritingMode = text::WritingMode2::LR_TB;
if( pDrawModelWrapper.get() ) if(!pDrawModelWrapper)
{ return nWritingMode;
const SfxPoolItem* pItem = &(pDrawModelWrapper->GetItemPool().GetDefaultItem( EE_PARA_WRITINGDIR ));
if( pItem ) const SfxPoolItem* pItem = &(pDrawModelWrapper->GetItemPool().GetDefaultItem( EE_PARA_WRITINGDIR ));
nWritingMode = static_cast< sal_Int16 >((static_cast< const SvxFrameDirectionItem * >( pItem ))->GetValue()); if( pItem )
} nWritingMode = static_cast< sal_Int16 >((static_cast< const SvxFrameDirectionItem * >( pItem ))->GetValue());
return nWritingMode; return nWritingMode;
} }
...@@ -2327,17 +2327,16 @@ bool lcl_createLegend( const uno::Reference< XLegend > & xLegend ...@@ -2327,17 +2327,16 @@ bool lcl_createLegend( const uno::Reference< XLegend > & xLegend
, const std::vector< LegendEntryProvider* >& rLegendEntryProviderList , const std::vector< LegendEntryProvider* >& rLegendEntryProviderList
, sal_Int16 nDefaultWritingMode ) , sal_Int16 nDefaultWritingMode )
{ {
if( VLegend::isVisible( xLegend )) if (!VLegend::isVisible(xLegend))
{ return false;
VLegend aVLegend( xLegend, xContext, rLegendEntryProviderList,
xPageShapes, xShapeFactory, rModel); VLegend aVLegend( xLegend, xContext, rLegendEntryProviderList,
aVLegend.setDefaultWritingMode( nDefaultWritingMode ); xPageShapes, xShapeFactory, rModel);
aVLegend.createShapes( awt::Size( rRemainingSpace.Width, rRemainingSpace.Height ), aVLegend.setDefaultWritingMode( nDefaultWritingMode );
rPageSize ); aVLegend.createShapes( awt::Size( rRemainingSpace.Width, rRemainingSpace.Height ),
aVLegend.changePosition( rRemainingSpace, rPageSize ); rPageSize );
return true; aVLegend.changePosition( rRemainingSpace, rPageSize );
} return true;
return false;
} }
void formatPage( void formatPage(
......
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