diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/outliner/outlin2.cxx | 5 | ||||
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 29 |
2 files changed, 28 insertions, 6 deletions
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index 08495c39fa07..45efe99362ed 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -536,6 +536,11 @@ bool Outliner::IsVertical() const return pEditEngine->IsVertical(); } +bool Outliner::IsTopToBottom() const +{ + return pEditEngine->IsTopToBottom(); +} + void Outliner::SetFixedCellHeight( bool bUseFixedCellHeight ) { pEditEngine->SetFixedCellHeight( bUseFixedCellHeight ); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 3f7914ff2ad2..6ffaf540edfe 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -861,7 +861,7 @@ vcl::Font Outliner::ImpCalcBulletFont( sal_Int32 nPara ) const aBulletFont.SetFontSize( Size( 0, nScaledLineHeight ) ); bool bVertical = IsVertical(); aBulletFont.SetVertical( bVertical ); - aBulletFont.SetOrientation( bVertical ? 2700 : 0 ); + aBulletFont.SetOrientation( bVertical ? (IsTopToBottom() ? 2700 : 900) : 0 ); Color aColor( COL_AUTO ); if( !pEditEngine->IsFlatMode() && !( pEditEngine->GetControlWord() & EEControlBits::NOCOLORS ) ) @@ -890,6 +890,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, if (bDrawBullet && ImplHasNumberFormat(nPara)) { bool bVertical = IsVertical(); + bool bTopToBottom = IsTopToBottom(); bool bRightToLeftPara = pEditEngine->IsRightToLeft( nPara ); @@ -927,9 +928,17 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, } else { -// aTextPos.X() = rStartPos.X() - aBulletArea.Bottom(); - aTextPos.X() = rStartPos.X() - ( bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent ); - aTextPos.Y() = rStartPos.Y() + aBulletArea.Left(); + if (bTopToBottom) + { +// aTextPos.X() = rStartPos.X() - aBulletArea.Bottom(); + aTextPos.X() = rStartPos.X() - (bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent); + aTextPos.Y() = rStartPos.Y() + aBulletArea.Left(); + } + else + { + aTextPos.X() = rStartPos.X() + (bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent); + aTextPos.Y() = rStartPos.Y() + aBulletArea.Left(); + } } if ( nOrientation ) @@ -998,8 +1007,16 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, } else { - aBulletPos.X() = rStartPos.X() - aBulletArea.Bottom(); - aBulletPos.Y() = rStartPos.Y() + aBulletArea.Left(); + if (bTopToBottom) + { + aBulletPos.X() = rStartPos.X() - aBulletArea.Bottom(); + aBulletPos.Y() = rStartPos.Y() + aBulletArea.Left(); + } + else + { + aBulletPos.X() = rStartPos.X() + aBulletArea.Top(); + aBulletPos.Y() = rStartPos.Y() - aBulletArea.Right(); + } } if(bStrippingPortions) |