summaryrefslogtreecommitdiff
path: root/testautomation/graphics/tools/id_tools.inc
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/graphics/tools/id_tools.inc')
-rw-r--r--testautomation/graphics/tools/id_tools.inc80
1 files changed, 43 insertions, 37 deletions
diff --git a/testautomation/graphics/tools/id_tools.inc b/testautomation/graphics/tools/id_tools.inc
index 4f919dfe36fe..57bac12e8ce8 100644
--- a/testautomation/graphics/tools/id_tools.inc
+++ b/testautomation/graphics/tools/id_tools.inc
@@ -104,10 +104,10 @@ function LiberalMeasurement ( sShould$, sActual$) as Boolean
printlog "took units from http://gsl.openoffice.org/source/browse/gsl/vcl/source/src/units.src"
select case GetMeasUnit(sShould$)
case "mm", "ミリ", "公厘" : iTolerance = 2.0 '01, 81, 88
- case "cm","センチ","厘米","公分" : iTolerance = 0.5 '01, 81, 86, 88
+ case "cm","セン?","厘米","公分" : iTolerance = 0.5 '01, 81, 86, 88
case chr$(34) : iTolerance = 2.5
case "pi","ピクセル" : iTolerance = 2.5 '01, 81
- case "pt", "ポイント" : iTolerance = 2.5 '01, 81
+ case "pt", "?イント" : iTolerance = 2.5 '01, 81
case "" : iTolerance = 1.5 ' cm is presubposition in old functions
case else
iTolerance = 2.5
@@ -268,43 +268,49 @@ function fMakeDocumentWritable() as boolean
end function
'-------------------------------------------------------------------------------
-
function fGetSizeXY (sX as string, sY as string, bGet as boolean) as Boolean
- dim sTx as string
- dim sTy as string
- dim bReturn as boolean
-
- bReturn = True
- try
- ContextPositionAndSize
- catch
- warnlog "couldn't call 'ContextPositionAndSize' no object selected ?"
- endcatch
- kontext
- active.SetPage TabPositionAndSize
- kontext "TabPositionAndSize"
- if TabPositionAndSize.exists (5) then
- sTx = Width.GetText
- sTy = Height.GetText
- TabPositionAndSize.OK
- else
- warnlog "Couldn't switch tab page :-( "
- endif
- if bGet then ' Get the Values only
- sY = sTy
- sX = sTx
- else ' Get the Values and COMPARE them
- if (LiberalMeasurement (sX,sTx) <> TRUE) then
- warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519"
- bReturn = False
- endif
- if (LiberalMeasurement (sY,sTy) <> TRUE) then
- warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519"
- bReturn = False
- endif
- bGet = bReturn
- endif
+ dim sTx as string
+ dim sTy as string
+ dim bReturn as boolean
+
+ bReturn = True
+ try
+ printlog "Trying to open Position and size Dialog.."
+ ContextPositionAndSize
+ catch
+ warnlog "couldn't call 'ContextPositionAndSize' no object selected ?"
+ endcatch
+ kontext
+ active.SetPage TabPositionAndSize
+ kontext "TabPositionAndSize"
+ printlog "Getting some sizes from Position and Size dialog."
+ if TabPositionAndSize.exists (5) then
+ sTx = Width.GetText
+ printlog "Width, sTx=" & sTx
+ sTy = Height.GetText
+ printlog "Height, sTy=" & sTy
+ TabPositionAndSize.OK
+ else
+ warnlog "Couldn't switch tab page :-( "
+ endif
+ if bGet then ' Get the Values only
+ sY = sTy
+ printlog "sY=" & sY
+ sX = sTx
+ printlog "sX=" & sX
+ else ' Get the Values and COMPARE them
+ if (LiberalMeasurement (sX,sTx) <> TRUE) then
+ warnlog "width is different :-( XXXXXXXXXXXXX should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519"
+ bReturn = False
+ endif
+ if (LiberalMeasurement (sY,sTy) <> TRUE) then
+ warnlog "hight is different :-( xxxxxxxxxxxx should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519"
+ bReturn = False
+ endif
+ bGet = bReturn
+ endif
end function
+
'-------------------------------------------------------------------------
function hCallExport ( cFileName as String , sFilter as String, optional bSelection as boolean ) as Boolean