Bug #185
Investigate weird QTF formatting (why is Udaj centered?)
Status: | Rejected | Start date: | 11/25/2011 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | Spent time: | - | |
Target version: | - |
Description
[ {{3:1:1:1:1:1@L [> Údaj]:: [= Zobrazení:: Kliky:: CTR:: Cena:: CPC]::@W [< V období 23.10.2011 - 22.11.2011:: ][> 7483:: 399:: 5.33%:: 1313.68:: 3.29]::@W [< Od za?átku kampan? do 22.11.2011:: ][> 70956:: 4792:: 6.75%:: 15231.57:: 3.18]::@W [< Celkový rozpo?et]:: [> :: :: :: 20000.00:: ]::@W [< Zbývá z rozpo?tu]:: [> :: :: :: 4768.43:: ]::@W [< Garantovaný po?et klik?]:: [> :: 500:: :: :: ]::@W [< Zbývá z rozpo?tu]:: [> :: -4292:: :: :: ]}}&]&[= [ $$0,0#00000000000000000000000000000000:Default]
History
#1 Updated by Sender Ghost over 13 years ago
why is Udaj centered?
Because of "[= [ $$0,0#00000000000000000000000000000000:Default]".
"[= " - align center paragraph, which applies to default style with "00000000000000000000000000000000" uuid.
Seems, default "[= " align applies to other aligns ("[< ") , except "[> " and "[# ".
The same with "[> " align, which applies to other aligns ("[< "), except "[= ", "[# ".
Which leads to following code:
if(!l.withtabs) switch(format.align) { case ALIGN_RIGHT: l.xpos += cx - l.cx; break; case ALIGN_CENTER: l.xpos += (cx - l.cx) / 2; break; }
Simplified test cases:
[ {{ [# Justify]:: [< Left ]:: [= Center ]:: [> Right]}}]& [ $$0,0#00000000000000000000000000000000:Default]
[ {{ [# Justify]:: [< Left ]:: [= Center ]:: [> Right]}}]& [= $$0,0#00000000000000000000000000000000:Default]
[ {{ [# Justify]:: [< Left ]:: [= Center ]:: [> Right]}}]& [> $$0,0#00000000000000000000000000000000:Default]
#2 Updated by Sender Ghost over 13 years ago
There is also another simplified test case:
[-= $$0,0#00000000000000000000000000000000:Default] [ {{ [ Text]:: [# Justify]:: [< Left]:: [= Center]:: [> Right]}}]& [-*> $$0,0#00000000000000000000000000000000:Default]& [ {{ [ Text]:: [# Justify]:: [< Left]:: [= Center]:: [> Right]}}]
Seems, this is due to merging of styles after target.SetStyle(id, style); for Default style.
#3 Updated by Miroslav Fidler almost 13 years ago
- Priority changed from Normal to High
#4 Updated by Miroslav Fidler over 12 years ago
- Status changed from New to Rejected