@@ -3186,10 +3186,12 @@ class ParaBuilder
31863186 // If there are inner piles in the line, align their corresponding components
31873187 IntVec vdyBaselines; // item is position of nth baseline
31883188 bool fNeedAdjust = false ;
3189+ bool bContainsInnerPileBox = false ;
31893190 for (pbox = m_pboxStartLine; ; pbox = pbox->Next ())
31903191 {
31913192 if (pbox->IsInnerPileBox ())
31923193 {
3194+ bContainsInnerPileBox = true ;
31933195 int irow = 0 ;
31943196 pbox->ComputeInnerPileBaselines (m_pvpbox, vdyBaselines, 0 , irow, fNeedAdjust );
31953197 }
@@ -3268,11 +3270,18 @@ class ParaBuilder
32683270 break ;
32693271 case ktalRight:
32703272 if (m_pvpbox->RightToLeft ()) {
3271- xPos = m_dxTrail + dxAlignMentAdjust ;
3273+ xPos = m_dxTrail;
32723274 }
32733275 else {
3274- xPos = m_dxLead + dxAlignMentAdjust ;
3276+ xPos = m_dxLead;
32753277 }
3278+
3279+ // Only add the adjustment if this box does not contain an inner pile. (LT-21004)
3280+ if (!bContainsInnerPileBox)
3281+ {
3282+ xPos += dxAlignMentAdjust;
3283+ }
3284+
32763285 xSpaceUsed = xPos;
32773286 dxExtraWidthRight = m_dxLead;
32783287 break ;
@@ -9993,10 +10002,6 @@ void VwConcParaBox::DoSpecialAlignment(IVwGraphics * pvg)
999310002{
999410003 if (m_cpo & kcpoAlign)
999510004 {
9996- // For now we can only do align left.
9997- // The trick otherwise is not just to do our alignment, but to undo what the
9998- // superclass Layout did.
9999- Assert (m_qzvps->ParaAlign () == ktalLeft || m_qzvps->ParaAlign () == ktalLeading);
1000010005 // Figure out where the key word is naturally displayed.
1000110006 // First find the box it is part of.
1000210007 VwStringBox * psbox = NULL ;
0 commit comments