summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-04-11 14:05:32 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-04-11 14:05:32 +0000
commit1d122172deba514ae44ccdb5b98d2820f68739c5 (patch)
treedba19bc637d6300fe60476e34a2310ba1a7aff23
parentacbd3639005938236f4669d84a201c4692511cbc (diff)
INTEGRATION: CWS extras4 (1.21.34); FILE MERGED
2003/03/10 15:21:51 bc 1.21.34.1: #108107# depiction in 'Block -Labels above' mode improved
-rw-r--r--wizards/source/formwizard/develop.xba26
1 files changed, 18 insertions, 8 deletions
diff --git a/wizards/source/formwizard/develop.xba b/wizards/source/formwizard/develop.xba
index dfc20df2f896..8372a36a222f 100644
--- a/wizards/source/formwizard/develop.xba
+++ b/wizards/source/formwizard/develop.xba
@@ -363,6 +363,18 @@ Dim nBaseWidth as Long
End Sub
+
+Function GetCorrWidth(StartIndex as Integer, EndIndex as Integer, nDist as Long, Widthfactor as Integer) as Integer
+Dim ShapeCount as Integer
+ If WidthFactor &gt; 0 Then
+ ShapeCount = EndIndex-StartIndex + 1
+ Else
+ ShapeCount = iReduceWidth
+ End If
+ GetCorrWidth() = (nDist)/ShapeCount
+End Function
+
+
Sub AdjustLineWidth(StartIndex as Integer, EndIndex as Integer, nDist as Long, Widthfactor as Integer)
Dim i as Integer
Dim oLocDBShape as Object
@@ -371,13 +383,7 @@ Dim CorrWidth as Integer
Dim bAdjustPos as Boolean
Dim iLocTCPosX as Long
Dim iLocDBPosX as Long
-Dim ShapeCount as Integer
- If WidthFactor &gt; 0 Then
- ShapeCount = EndIndex-StartIndex + 1
- Else
- ShapeCount = iReduceWidth
- End If
- CorrWidth = (nDist)/ShapeCount
+ CorrWidth = GetCorrWidth(StartIndex, EndIndex, nDist, Widthfactor)
bAdjustPos = False
iLocTCPosX = cXOffset
For i = StartIndex To EndIndex
@@ -395,7 +401,11 @@ Dim ShapeCount as Integer
bAdjustPos = True
End If
If CDbl(FieldMetaValues(i,1)) &gt; 20 or WidthFactor &gt; 0 Then
- oLocDBShape.Size = GetSize(oLocDBShape.Size.Width + WidthFactor * CorrWidth, oLocDBShape.Size.Height)
+ If (CurArrangement = cTopJustified) And (oLocTCShape.Size.Width &gt; oLocDBShape.Size.Width) Then
+ oLocDBShape.Size = GetSize(oLocTCShape.Size.Width + WidthFactor * CorrWidth, oLocDBShape.Size.Height)
+ Else
+ oLocDBShape.Size = GetSize(oLocDBShape.Size.Width + WidthFactor * CorrWidth, oLocDBShape.Size.Height)
+ End If
End If
iLocTCPosX = oLocDBShape.Position.X + oLocDBShape.Size.Width + cHoriDistance
If CurArrangement = cTopJustified Then