diff options
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ruler.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index a422eb568f7a..d7f4e79ff8c2 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -1204,6 +1204,8 @@ void Ruler::ImplFormat() void Ruler::ImplInitExtraField( sal_Bool bUpdate ) { + Size aWinSize = GetOutputSizePixel(); + // Extra-Field beruecksichtigen if ( mnWinStyle & WB_EXTRAFIELD ) { @@ -1213,7 +1215,6 @@ void Ruler::ImplInitExtraField( sal_Bool bUpdate ) maExtraRect.Bottom() = RULER_OFF+mnVirHeight-1; if(mpData->bTextRTL) { - Size aWinSize = GetOutputSizePixel(); if(mnWinStyle & WB_HORZ) maExtraRect.Move(aWinSize.Width() - maExtraRect.GetWidth() - maExtraRect.Left(), 0); else @@ -1230,6 +1231,19 @@ void Ruler::ImplInitExtraField( sal_Bool bUpdate ) mnVirOff = 0; } + // mnVirWidth depends on mnVirOff + if ( (mnVirWidth > RULER_MIN_SIZE) || + ((aWinSize.Width() > RULER_MIN_SIZE) && (aWinSize.Height() > RULER_MIN_SIZE)) ) + { + if ( mnWinStyle & WB_HORZ ) + mnVirWidth = aWinSize.Width()-mnVirOff; + else + mnVirWidth = aWinSize.Height()-mnVirOff; + + if ( mnVirWidth < RULER_MIN_SIZE ) + mnVirWidth = 0; + } + if ( bUpdate ) { mbCalc = sal_True; |