diff options
author | navin patidar <patidar@kacst.edu.sa> | 2013-05-01 09:45:58 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-05-02 07:03:22 +0000 |
commit | 5fc1ba6e6bf22effe4391e22fe94a2ec0fc10100 (patch) | |
tree | 5744eedcb70dc460037ea31f1bcf686c15f8dc0e /sc | |
parent | af41ad9b9473b782b50828b7e77ff23f30007c60 (diff) |
fix fdo#64085 : set proper alignment for justified align text.
According to cell writing direction, set alignment for justified align text.
Change-Id: I91e1c52f1aa13a806e2a91dc7120960a4cc3f5c1
Reviewed-on: https://gerrit.libreoffice.org/3704
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/output2.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index d4fb35f8f48f..76d3a5e50257 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -1673,7 +1673,14 @@ void ScOutputData::DrawStrings( sal_Bool bPixelToLogic ) eOutHorJust = aVars.GetHorJust(); if ( eOutHorJust == SVX_HOR_JUSTIFY_BLOCK || eOutHorJust == SVX_HOR_JUSTIFY_REPEAT ) - eOutHorJust = SVX_HOR_JUSTIFY_LEFT; // repeat is not yet implemented + { + const SfxPoolItem* pItem = mpDoc->GetAttr( nCellX, nCellY, nTab, ATTR_WRITINGDIR ); + const SvxFrameDirectionItem* pCurrentWritingMode = (const SvxFrameDirectionItem*) pItem; + if (pCurrentWritingMode->GetValue() == FRMDIR_HORI_LEFT_TOP) + eOutHorJust = SVX_HOR_JUSTIFY_LEFT; + else + eOutHorJust = SVX_HOR_JUSTIFY_RIGHT; + } bool bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SVX_HOR_JUSTIFY_BLOCK ); // #i111387# #o11817313# disable automatic line breaks only for "General" number format |