Kaydet (Commit) ae4e0a81 authored tarafından Justin Luth's avatar Justin Luth

tdf#116404 DOC: check locale if BiDi inherits Environment

In addition to the general patch, DOC needs to check the locale
setting when it "bails out". The functions were identical other
than that, so use the shared function instead.

Change-Id: I705c5ed39cd07d0df4abb40c622da499375ce7b1
Reviewed-on: https://gerrit.libreoffice.org/66965
Tested-by: Jenkins
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
üst 41e56742
...@@ -4766,30 +4766,8 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir ...@@ -4766,30 +4766,8 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir
SvxFrameDirection nDir = rDirection.GetValue(); SvxFrameDirection nDir = rDirection.GetValue();
if ( nDir == SvxFrameDirection::Environment ) if ( nDir == SvxFrameDirection::Environment )
{ nDir = GetExport( ).GetDefaultFrameDirection( );
if ( m_rWW8Export.m_bOutPageDescs )
nDir = m_rWW8Export.GetCurrentPageDirection();
else if ( m_rWW8Export.m_pOutFormatNode )
{
if ( m_rWW8Export.m_bOutFlyFrameAttrs ) //frame
{
nDir = m_rWW8Export.TrueFrameDirection(
*static_cast<const SwFrameFormat*>(m_rWW8Export.m_pOutFormatNode) );
}
else if ( dynamic_cast< const SwContentNode *>( m_rWW8Export.m_pOutFormatNode ) != nullptr ) //pagagraph
{
const SwContentNode* pNd =
static_cast<const SwContentNode*>(m_rWW8Export.m_pOutFormatNode);
SwPosition aPos( *pNd );
nDir = m_rWW8Export.m_pDoc->GetTextDirection( aPos );
}
else if ( dynamic_cast< const SwTextFormatColl *>( m_rWW8Export.m_pOutFormatNode ) != nullptr )
nDir = SvxFrameDirection::Horizontal_LR_TB; //what else can we do :-(
}
if ( nDir == SvxFrameDirection::Environment )
nDir = SvxFrameDirection::Horizontal_LR_TB; //Set something
}
switch ( nDir ) switch ( nDir )
{ {
......
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