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 )); const SfxPoolItem* pItem = &(pDrawModelWrapper->GetItemPool().GetDefaultItem( EE_PARA_WRITINGDIR ));
if( pItem ) if( pItem )
nWritingMode = static_cast< sal_Int16 >((static_cast< const SvxFrameDirectionItem * >( pItem ))->GetValue()); nWritingMode = static_cast< sal_Int16 >((static_cast< const SvxFrameDirectionItem * >( pItem ))->GetValue());
}
return nWritingMode; return nWritingMode;
} }
...@@ -2327,8 +2327,9 @@ bool lcl_createLegend( const uno::Reference< XLegend > & xLegend ...@@ -2327,8 +2327,9 @@ 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, VLegend aVLegend( xLegend, xContext, rLegendEntryProviderList,
xPageShapes, xShapeFactory, rModel); xPageShapes, xShapeFactory, rModel);
aVLegend.setDefaultWritingMode( nDefaultWritingMode ); aVLegend.setDefaultWritingMode( nDefaultWritingMode );
...@@ -2336,8 +2337,6 @@ bool lcl_createLegend( const uno::Reference< XLegend > & xLegend ...@@ -2336,8 +2337,6 @@ bool lcl_createLegend( const uno::Reference< XLegend > & xLegend
rPageSize ); rPageSize );
aVLegend.changePosition( rRemainingSpace, rPageSize ); aVLegend.changePosition( rRemainingSpace, rPageSize );
return true; 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