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: Justin Luth <justin_luth@sil.org>
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 0208576..abbbd89 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4766,30 +4766,8 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir
SvxFrameDirection nDir = rDirection.GetValue();
if ( nDir == SvxFrameDirection::Environment )
{
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 :-(
}
nDir = GetExport( ).GetDefaultFrameDirection( );
if ( nDir == SvxFrameDirection::Environment )
nDir = SvxFrameDirection::Horizontal_LR_TB; //Set something
}
switch ( nDir )
{