From 803a7a4d8fb166825c2c1eb5ffc3c7c36f421dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipok?= <11089482+mlipok@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:38:19 +0200 Subject: [PATCH 1/2] ObjEvent ReOrdering ObjEvent ReOrdering --- LibreOfficeWriter.au3 | 369 +++++++++++++++++++++--------------------- 1 file changed, 186 insertions(+), 183 deletions(-) diff --git a/LibreOfficeWriter.au3 b/LibreOfficeWriter.au3 index 94760f1e..a04db21c 100644 --- a/LibreOfficeWriter.au3 +++ b/LibreOfficeWriter.au3 @@ -726,12 +726,12 @@ Global Const $__LOWCONST_FILL_STYLE_OFF = 0, $__LOWCONST_FILL_STYLE_SOLID = 1, $ ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CellBackColor(ByRef $oCell, $iBackColor = Null, $bBackTransparent = Null) - Local $iError = 0 - Local $avColor[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avColor[2] + If Not IsObj($oCell) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iBackColor, $bBackTransparent) Then @@ -887,12 +887,12 @@ EndFunc ;==>_LOWriter_CellBorderColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CellBorderPadding(ByRef $oCell, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $iError = 0 - Local $aiBPadding[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $aiBPadding[4] + If Not IsObj($oCell) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iTop, $iBottom, $iLeft, $iRight) Then @@ -1501,11 +1501,11 @@ EndFunc ;==>_LOWriter_CellVertOrient ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleBorderColor(ByRef $oCharStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not __LOWriter_VersionCheck(4.2) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -1572,11 +1572,11 @@ EndFunc ;==>_LOWriter_CharStyleBorderColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleBorderPadding(ByRef $oCharStyle, $iAll = Null, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not __LOWriter_VersionCheck(4.2) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -1671,11 +1671,11 @@ EndFunc ;==>_LOWriter_CharStyleBorderPadding ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleBorderStyle(ByRef $oCharStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not __LOWriter_VersionCheck(4.2) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -1746,11 +1746,11 @@ EndFunc ;==>_LOWriter_CharStyleBorderStyle ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleBorderWidth(ByRef $oCharStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not __LOWriter_VersionCheck(4.2) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -1794,11 +1794,11 @@ EndFunc ;==>_LOWriter_CharStyleBorderWidth ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleCreate(ByRef $oDoc, $sCharStyle) - Local $oCharStyles, $oStyle, $oCharStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oCharStyles, $oStyle, $oCharStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oCharStyles = $oDoc.StyleFamilies().getByName("CharacterStyles") @@ -1857,12 +1857,12 @@ EndFunc ;==>_LOWriter_CharStyleCreate ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleDelete(ByRef $oDoc, ByRef $oCharStyle, $bForceDelete = False, $sReplacementStyle = "") - Local $oCharStyles - Local $sCharStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oCharStyles + Local $sCharStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -1940,11 +1940,11 @@ EndFunc ;==>_LOWriter_CharStyleDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleEffect(ByRef $oCharStyle, $iRelief = Null, $iCase = Null, $bHidden = Null, $bOutline = Null, $bShadow = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -2052,11 +2052,11 @@ EndFunc ;==>_LOWriter_CharStyleExists ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleFont(ByRef $oDoc, ByRef $oCharStyle, $sFontName = Null, $nFontSize = Null, $iPosture = Null, $iWeight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -2134,11 +2134,11 @@ EndFunc ;==>_LOWriter_CharStyleFont ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleFontColor(ByRef $oCharStyle, $iFontColor = Null, $iTransparency = Null, $iHighlight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -2172,11 +2172,11 @@ EndFunc ;==>_LOWriter_CharStyleFontColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleGetObj(ByRef $oDoc, $sCharStyle) - Local $oCharStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oCharStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not _LOWriter_CharStyleExists($oDoc, $sCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -2236,12 +2236,12 @@ EndFunc ;==>_LOWriter_CharStyleGetObj ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleOrganizer(ByRef $oDoc, ByRef $oCharStyle, $sNewCharStyleName = Null, $sParentStyle = Null, $bHidden = Null) - Local $iError = 0 - Local $avOrganizer[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avOrganizer[2] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -2371,11 +2371,11 @@ EndFunc ;==>_LOWriter_CharStyleOrganizer ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleOverLine(ByRef $oCharStyle, $bWordOnly = Null, $iOverLineStyle = Null, $bOLHasColor = Null, $iOLColor = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -2441,11 +2441,11 @@ EndFunc ;==>_LOWriter_CharStyleOverLine ; =============================================================================================================================== Func _LOWriter_CharStylePosition(ByRef $oCharStyle, $bAutoSuper = Null, $iSuperScript = Null, $bAutoSub = Null, $iSubScript = Null, _ $iRelativeSize = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -2490,11 +2490,11 @@ EndFunc ;==>_LOWriter_CharStylePosition ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleRotateScale(ByRef $oCharStyle, $iRotation = Null, $iScaleWidth = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -2587,14 +2587,14 @@ EndFunc ;==>_LOWriter_CharStyleSet ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStylesGetNames(ByRef $oDoc, $bUserOnly = False, $bAppliedOnly = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oStyles Local $aStyles[0] Local $iCount = 0 Local $sExecute = "" - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bUserOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bAppliedOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -2700,11 +2700,11 @@ EndFunc ;==>_LOWriter_CharStylesGetNames ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleShadow(ByRef $oCharStyle, $iWidth = Null, $iColor = Null, $bTransparent = Null, $iLocation = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not __LOWriter_VersionCheck(4.2) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -2763,11 +2763,11 @@ EndFunc ;==>_LOWriter_CharStyleShadow ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleSpacing(ByRef $oCharStyle, $bAutoKerning = Null, $nKerning = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -2824,11 +2824,11 @@ EndFunc ;==>_LOWriter_CharStyleSpacing ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleStrikeOut(ByRef $oCharStyle, $bWordOnly = Null, $bStrikeOut = Null, $iStrikeLineStyle = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -2922,11 +2922,11 @@ EndFunc ;==>_LOWriter_CharStyleStrikeOut ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CharStyleUnderLine(ByRef $oCharStyle, $bWordOnly = Null, $iUnderLineStyle = Null, $bULHasColor = Null, $iULColor = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oCharStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oCharStyle.supportsService("com.sun.star.style.CharacterStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -3561,6 +3561,9 @@ EndFunc ;==>_LOWriter_CursorGetDataType ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CursorGetStatus(ByRef $oCursor, $iFlag) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iCursorType Local $vReturn Local $aiCommands[11] @@ -3576,9 +3579,6 @@ Func _LOWriter_CursorGetStatus(ByRef $oCursor, $iFlag) $aiCommands[$LOW_CURSOR_STAT_GET_PAGE] = ".getPage()" $aiCommands[$LOW_CURSOR_STAT_GET_RANGE_NAME] = ".getRangeName()" - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iFlag) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -3680,11 +3680,11 @@ EndFunc ;==>_LOWriter_CursorGetType ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_CursorGoToRange(ByRef $oCursor, ByRef $oRange, $bSelect = False) - Local $iCursorType, $iRangeType - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iCursorType, $iRangeType + If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oRange) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bSelect) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -3854,13 +3854,13 @@ EndFunc ;==>_LOWriter_CursorMove ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DateFormatKeyCreate(ByRef $oDoc, $sFormat) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iFormatKey Local $tLocale Local $oFormats - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sFormat) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $tLocale = __LOWriter_CreateStruct("com.sun.star.lang.Locale") @@ -3904,12 +3904,12 @@ EndFunc ;==>_LOWriter_DateFormatKeyCreate ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DateFormatKeyDelete(ByRef $oDoc, $iFormatKey) - Local $tLocale - Local $oFormats - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $tLocale + Local $oFormats + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iFormatKey) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not _LOWriter_DateFormatKeyExists($oDoc, $iFormatKey) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) ;Key not found. @@ -3986,11 +3986,11 @@ EndFunc ;==>_LOWriter_DateFormatKeyExists ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DateFormatKeyGetString(ByRef $oDoc, $iFormatKey) - Local $oFormatKey - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oFormatKey + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iFormatKey) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not _LOWriter_DateFormatKeyExists($oDoc, $iFormatKey) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -4042,15 +4042,15 @@ EndFunc ;==>_LOWriter_DateFormatKeyGetString ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DateFormatKeyList(ByRef $oDoc, $bIsUser = False, $bUserOnly = False, $bDateOnly = False, $bTimeOnly = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oFormats Local $aiFormatKeys Local $avDTFormats[0][3] Local $tLocale Local $iColumns = 3, $iCount = 0, $iQueryType = $LOW_FORMAT_KEYS_DATE_TIME - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bIsUser) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bUserOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -4141,11 +4141,11 @@ EndFunc ;==>_LOWriter_DateFormatKeyList ; =============================================================================================================================== Func _LOWriter_DateStructCreate($iYear = Null, $iMonth = Null, $iDay = Null, $iHours = Null, $iMinutes = Null, $iSeconds = Null, _ $iNanoSeconds = Null, $bIsUTC = Null) - Local $tDateStruct - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $tDateStruct + $tDateStruct = __LOWriter_CreateStruct("com.sun.star.util.DateTime") If Not IsObj($tDateStruct) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -4274,12 +4274,12 @@ EndFunc ;==>_LOWriter_DateStructCreate ; =============================================================================================================================== Func _LOWriter_DateStructModify(ByRef $tDateStruct, $iYear = Null, $iMonth = Null, $iDay = Null, $iHours = Null, $iMinutes = Null, _ $iSeconds = Null, $iNanoSeconds = Null, $bIsUTC = Null) - Local $iError = 0 - Local $avMod[7] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avMod[7] + If Not IsObj($tDateStruct) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iYear, $iMonth, $iDay, $iHours, $iMinutes, $iSeconds, $iNanoSeconds, $bIsUTC) Then @@ -4439,11 +4439,11 @@ EndFunc ;==>_LOWriter_DateStructModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtCharBorderColor(ByRef $oSelection, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null, $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not __LOWriter_VersionCheck(4.2) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -4533,11 +4533,11 @@ EndFunc ;==>_LOWriter_DirFrmtCharBorderColor ; =============================================================================================================================== Func _LOWriter_DirFrmtCharBorderPadding(ByRef $oSelection, $iAll = Null, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null, _ $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not __LOWriter_VersionCheck(4.2) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -4652,11 +4652,11 @@ EndFunc ;==>_LOWriter_DirFrmtCharBorderPadding ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtCharBorderStyle(ByRef $oSelection, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null, $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not __LOWriter_VersionCheck(4.2) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -4749,11 +4749,11 @@ EndFunc ;==>_LOWriter_DirFrmtCharBorderStyle ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtCharBorderWidth(ByRef $oSelection, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null, $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not __LOWriter_VersionCheck(4.2) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -4844,11 +4844,11 @@ EndFunc ;==>_LOWriter_DirFrmtCharBorderWidth ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtCharEffect(ByRef $oSelection, $iRelief = Null, $iCase = Null, $bHidden = Null, $bOutline = Null, $bShadow = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -4958,11 +4958,11 @@ EndFunc ;==>_LOWriter_DirFrmtCharEffect ; =============================================================================================================================== Func _LOWriter_DirFrmtCharPosition(ByRef $oSelection, $bAutoSuper = Null, $iSuperScript = Null, $bAutoSub = Null, $iSubScript = Null, _ $iRelativeSize = Null, $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -5033,11 +5033,11 @@ EndFunc ;==>_LOWriter_DirFrmtCharPosition ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtCharRotateScale(ByRef $oSelection, $iRotation = Null, $iScaleWidth = Null, $bRotateFitLine = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -5160,11 +5160,11 @@ EndFunc ;==>_LOWriter_DirFrmtCharRotateScale ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtCharShadow(ByRef $oSelection, $iWidth = Null, $iColor = Null, $bTransparent = Null, $iLocation = Null, $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not __LOWriter_VersionCheck(4.2) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -5242,11 +5242,11 @@ EndFunc ;==>_LOWriter_DirFrmtCharShadow ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtCharSpacing(ByRef $oSelection, $bAutoKerning = Null, $nKerning = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -5308,13 +5308,13 @@ EndFunc ;==>_LOWriter_DirFrmtCharSpacing ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtClear(ByRef $oDoc, ByRef $oSelection) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $aArray[0] Local $oServiceManager, $oDispatcher, $oText, $oViewCursor, $oViewCursorBackup Local $iCursorType - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -5440,11 +5440,11 @@ EndFunc ;==>_LOWriter_DirFrmtClear ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtFont(ByRef $oDoc, ByRef $oSelection, $sFontName = Null, $nFontSize = Null, $iPosture = Null, $iWeight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -5562,11 +5562,11 @@ EndFunc ;==>_LOWriter_DirFrmtFont ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtFontColor(ByRef $oSelection, $iFontColor = Null, $iTransparency = Null, $iHighlight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -5621,11 +5621,11 @@ EndFunc ;==>_LOWriter_DirFrmtFontColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtGetCurStyles(ByRef $oSelection) - Local $asStyles[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $asStyles[4] + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oSelection.supportsService("com.sun.star.style.ParagraphProperties") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oSelection.supportsService("com.sun.star.style.CharacterProperties") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -5738,11 +5738,11 @@ EndFunc ;==>_LOWriter_DirFrmtGetCurStyles ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtOverLine(ByRef $oSelection, $bWordOnly = Null, $iOverLineStyle = Null, $bOLHasColor = Null, $iOLColor = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -5873,11 +5873,11 @@ EndFunc ;==>_LOWriter_DirFrmtOverLine ; =============================================================================================================================== Func _LOWriter_DirFrmtParAlignment(ByRef $oSelection, $iHorAlign = Null, $iVertAlign = Null, $iLastLineAlign = Null, _ $bExpandSingleWord = Null, $bSnapToGrid = Null, $iTxtDirection = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -5991,11 +5991,11 @@ EndFunc ;==>_LOWriter_DirFrmtParAlignment ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtParBackColor(ByRef $oSelection, $iBackColor = Null, $bBackTransparent = Null, $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -6099,11 +6099,11 @@ EndFunc ;==>_LOWriter_DirFrmtParBackColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtParBorderColor(ByRef $oSelection, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null, $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -6190,11 +6190,11 @@ EndFunc ;==>_LOWriter_DirFrmtParBorderColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtParBorderPadding(ByRef $oSelection, $iAll = Null, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null, $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -6305,11 +6305,11 @@ EndFunc ;==>_LOWriter_DirFrmtParBorderPadding ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtParBorderStyle(ByRef $oSelection, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null, $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -6411,11 +6411,11 @@ EndFunc ;==>_LOWriter_DirFrmtParBorderStyle ; =============================================================================================================================== Func _LOWriter_DirFrmtParBorderWidth(ByRef $oSelection, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null, _ $bConnectBorder = Null, $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -6531,11 +6531,11 @@ EndFunc ;==>_LOWriter_DirFrmtParBorderWidth ; =============================================================================================================================== Func _LOWriter_DirFrmtParDropCaps(ByRef $oDoc, ByRef $oSelection, $iNumChar = Null, $iLines = Null, $iSpcTxt = Null, _ $bWholeWord = Null, $sCharStyle = Null, $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -6623,11 +6623,11 @@ EndFunc ;==>_LOWriter_DirFrmtParDropCaps ; =============================================================================================================================== Func _LOWriter_DirFrmtParHyphenation(ByRef $oSelection, $bAutoHyphen = Null, $bHyphenNoCaps = Null, $iMaxHyphens = Null, _ $iMinLeadingChar = Null, $iMinTrailingChar = Null, $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -6706,11 +6706,11 @@ EndFunc ;==>_LOWriter_DirFrmtParHyphenation ; =============================================================================================================================== Func _LOWriter_DirFrmtParIndent(ByRef $oSelection, $iBeforeTxt = Null, $iAfterTxt = Null, $iFirstLine = Null, $bAutoFirstLine = Null, _ $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -6805,11 +6805,11 @@ EndFunc ;==>_LOWriter_DirFrmtParIndent ; =============================================================================================================================== Func _LOWriter_DirFrmtParOutLineAndList(ByRef $oDoc, ByRef $oSelection, $iOutline = Null, $sNumStyle = Null, $bParLineCount = Null, _ $iLineCountVal = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -6927,11 +6927,11 @@ EndFunc ;==>_LOWriter_DirFrmtParOutLineAndList ; =============================================================================================================================== Func _LOWriter_DirFrmtParPageBreak(ByRef $oDoc, ByRef $oSelection, $iBreakType = Null, $iPgNumOffSet = Null, $sPageStyle = Null, _ $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -7041,11 +7041,11 @@ EndFunc ;==>_LOWriter_DirFrmtParPageBreak ; =============================================================================================================================== Func _LOWriter_DirFrmtParShadow(ByRef $oSelection, $iWidth = Null, $iColor = Null, $bTransparent = Null, $iLocation = Null, _ $bClearDirFrmt = False) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -7155,11 +7155,11 @@ EndFunc ;==>_LOWriter_DirFrmtParShadow ; =============================================================================================================================== Func _LOWriter_DirFrmtParSpace(ByRef $oSelection, $iAbovePar = Null, $iBelowPar = Null, $bAddSpace = Null, $iLineSpcMode = Null, _ $iLineSpcHeight = Null, $bPageLineSpc = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -7478,11 +7478,11 @@ EndFunc ;==>_LOWriter_DirFrmtParTabStopList ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtParTabStopMod(ByRef $oSelection, $iTabStop, $iPosition = Null, $iFillChar = Null, $iAlignment = Null, $iDecChar = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -7561,11 +7561,11 @@ EndFunc ;==>_LOWriter_DirFrmtParTabStopMod ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtParTxtFlowOpt(ByRef $oSelection, $bParSplit = Null, $bKeepTogether = Null, $iParOrphans = Null, $iParWidows = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -7661,11 +7661,11 @@ EndFunc ;==>_LOWriter_DirFrmtParTxtFlowOpt ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtStrikeOut(ByRef $oSelection, $bWordOnly = Null, $bStrikeOut = Null, $iStrikeLineStyle = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -7793,11 +7793,11 @@ EndFunc ;==>_LOWriter_DirFrmtStrikeOut ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DirFrmtUnderLine(ByRef $oSelection, $bWordOnly = Null, $iUnderLineStyle = Null, $bULHasColor = Null, $iULColor = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_DirFrmtCheck($oSelection) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -7856,11 +7856,11 @@ EndFunc ;==>_LOWriter_DirFrmtUnderLine ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocBookmarkDelete(ByRef $oDoc, ByRef $oBookmark) - Local $sBookmarkName - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $sBookmarkName + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oBookmark) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -7894,11 +7894,11 @@ EndFunc ;==>_LOWriter_DocBookmarkDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocBookmarkGetAnchor(ByRef $oBookmark) - Local $oBookAnchor - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oBookAnchor + If Not IsObj($oBookmark) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oBookAnchor = $oBookmark.Anchor.Text.createTextCursorByRange($oBookmark.Anchor()) @@ -7933,11 +7933,11 @@ EndFunc ;==>_LOWriter_DocBookmarkGetAnchor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocBookmarkGetObj(ByRef $oDoc, $sBookmarkName) - Local $oBookmark - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oBookmark + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sBookmarkName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -7988,11 +7988,11 @@ EndFunc ;==>_LOWriter_DocBookmarkGetObj ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocBookmarkInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $sBookmarkName = Null) - Local $oBookmark - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oBookmark + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -8050,11 +8050,11 @@ EndFunc ;==>_LOWriter_DocBookmarkInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocBookmarkModify(ByRef $oDoc, ByRef $oBookmark, $sBookmarkName = Null) - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oBookmark) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -8093,11 +8093,11 @@ EndFunc ;==>_LOWriter_DocBookmarkModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocBookmarksHasName(ByRef $oDoc, $sBookmarkName) - Local $oBookmarks - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oBookmarks + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sBookmarkName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -8132,11 +8132,11 @@ EndFunc ;==>_LOWriter_DocBookmarksHasName ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocBookmarksList(ByRef $oDoc) - Local $asBookmarkNames[0] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $asBookmarkNames[0] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $asBookmarkNames = $oDoc.Bookmarks.getElementNames() @@ -8187,12 +8187,12 @@ EndFunc ;==>_LOWriter_DocBookmarksList ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocClose(ByRef $oDoc, $bSaveChanges = True, $sSaveName = "", $bDeliverOwnership = True) - Local $sDocPath = "", $sSavePath, $sFilterName - Local $aArgs[1] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $sDocPath = "", $sSavePath, $sFilterName + Local $aArgs[1] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bSaveChanges) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsString($sSaveName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -8293,14 +8293,14 @@ EndFunc ;==>_LOWriter_DocClose ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocConnect($sFile, $bConnectCurrent = False, $bConnectAll = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iCount = 0 Local Const $STR_STRIPLEADING = 1 Local $aoConnectAll[1], $aoPartNameSearch[1] Local $oEnumDoc, $oDoc, $oServiceManager, $oDesktop - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsString($sFile) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bConnectCurrent) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bConnectAll) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -8437,13 +8437,13 @@ EndFunc ;==>_LOWriter_DocConnect ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocConvertTableToText(ByRef $oDoc, ByRef $oTable, $sDelimiter = @TAB) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $aArgs[1] Local $asCellNames Local $oServiceManager, $oDispatcher, $oCellTextCursor, $oViewCursor, $oViewCursorBackup - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsString($sDelimiter) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -8460,8 +8460,8 @@ Func _LOWriter_DocConvertTableToText(ByRef $oDoc, ByRef $oTable, $sDelimiter = @ ;Create a Text cursor at the current viewCursor position to move the Viewcursor back to. $oViewCursorBackup = _LOWriter_DocCreateTextCursor($oDoc, False, True) If Not IsObj($oViewCursorBackup) Then - $oViewCursorBackup = _LOWriter_DocCreateTextCursor($oDoc, False); If That Failed, create a Backup Cursor at the beginning of the document. - If Not IsObj($oViewCursorBackup) Then Return SetError($__LOW_STATUS_INIT_ERROR, 2, 0) + $oViewCursorBackup = _LOWriter_DocCreateTextCursor($oDoc, False) ; If That Failed, create a Backup Cursor at the beginning of the document. + If Not IsObj($oViewCursorBackup) Then Return SetError($__LOW_STATUS_INIT_ERROR, 2, 0) EndIf ;Retrieve the first cell in the table and create a text cursor in it to move the ViewCursor to. @@ -8539,14 +8539,14 @@ EndFunc ;==>_LOWriter_DocConvertTableToText ; =============================================================================================================================== Func _LOWriter_DocConvertTextToTable(ByRef $oDoc, ByRef $oCursor, $sDelimiter = @TAB, $bHeader = False, $iRepeatHeaderLines = 0, _ $bBorder = False, $bDontSplitTable = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $asTables[0] Local $atArgs[5] Local $oServiceManager, $oDispatcher, $oViewCursor, $oViewCursorBackup, $oTables, $oTable Local $iCursorType - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsString($sDelimiter) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -8657,14 +8657,14 @@ EndFunc ;==>_LOWriter_DocConvertTextToTable ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocCreate($bForceNew = True, $bHidden = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local Const $iURLFrameCreate = 8 ;frame will be created if not found Local $aArgs[1] Local $iError = 0 Local $oServiceManager, $oDesktop, $oDoc, $oEnumDoc - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsBool($bForceNew) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bHidden) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $aArgs[0] = __LOWriter_SetPropertyValue("Hidden", $bHidden) @@ -8740,12 +8740,12 @@ EndFunc ;==>_LOWriter_DocCreate ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocCreateTextCursor(ByRef $oDoc, $bCreateAtEnd = True, $bCreateAtViewCursor = False) - Local $oCursor, $oText, $oViewCursor - Local $iCursorType = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oCursor, $oText, $oViewCursor + Local $iCursorType = 0 + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bCreateAtEnd) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bCreateAtViewCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -8832,13 +8832,13 @@ EndFunc ;==>_LOWriter_DocCreateTextCursor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocDescription(ByRef $oDoc, $sTitle = Null, $sSubject = Null, $asKeywords = Null, $sComments = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oDocProp Local $iError = 0 Local $avDescription[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oDocProp = $oDoc.DocumentProperties() If Not IsObj($oDocProp) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -8906,13 +8906,13 @@ EndFunc ;==>_LOWriter_DocDescription ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocEnumPrinters($bDefaultOnly = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oServiceManager, $oPrintServer Local $sDefault Local $asPrinters[0] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not __LOWriter_VersionCheck(4.1) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsBool($bDefaultOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oServiceManager = ObjCreate("com.sun.star.ServiceManager") @@ -8969,15 +8969,15 @@ EndFunc ;==>_LOWriter_DocEnumPrinters ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocEnumPrintersAlt($sPrinterName = "", $bReturnDefault = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $asPrinterNames[10] Local $sFilter Local $iCount = 0 Local Const $wbemFlagReturnImmediately = 0x10, $wbemFlagForwardOnly = 0x20 Local $oWMIService, $oPrinters - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsString($sPrinterName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bReturnDefault) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If $sPrinterName <> "" Then $sFilter = StringReplace(" Where Name like '" & StringReplace($sPrinterName, "\", "\\") & "'", "*", "%") @@ -9068,12 +9068,12 @@ EndFunc ;==>_LOWriter_DocEnumPrintersAlt ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocExecuteDispatch(ByRef $oDoc, $sDispatch) - Local $aArray[0] - Local $oServiceManager, $oDispatcher - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $aArray[0] + Local $oServiceManager, $oDispatcher + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sDispatch) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -9138,12 +9138,12 @@ EndFunc ;==>_LOWriter_DocExecuteDispatch ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocExport(ByRef $oDoc, $sFilePath, $bSamePath = False, $sFilterName = "", $bOverwrite = Null, $sPassword = Null) - Local $aProperties[3] - Local $sOriginalPath, $sSavePath - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $aProperties[3] + Local $sOriginalPath, $sSavePath + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sFilePath) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bSamePath) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -9234,12 +9234,12 @@ EndFunc ;==>_LOWriter_DocExport ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocFindAll(ByRef $oDoc, ByRef $oSrchDescript, $sSearchString, ByRef $atFindFormat) - Local $oResults - Local $aoResults[0] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oResults + Local $aoResults[0] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oSrchDescript) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oSrchDescript.supportsService("com.sun.star.util.SearchDescriptor") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -9313,6 +9313,9 @@ EndFunc ;==>_LOWriter_DocFindAll ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocFindAllInRange(ByRef $oDoc, ByRef $oSrchDescript, $sSearchString, ByRef $atFindFormat, ByRef $oRange) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oResults, $oResult, $oRangeRegion, $oResultRegion, $oText, $oRangeAnchor Local $aoResults[0] Local $iCount = 0 From c8aee17a732dffe686a1d90e8bcf90c0c44595c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipok?= <11089482+mlipok@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:09:33 +0200 Subject: [PATCH 2/2] suplemented suplemented --- LibreOfficeWriter.au3 | 1838 ++++++++++++++++++++--------------------- 1 file changed, 917 insertions(+), 921 deletions(-) diff --git a/LibreOfficeWriter.au3 b/LibreOfficeWriter.au3 index a04db21c..b7e7ab0b 100644 --- a/LibreOfficeWriter.au3 +++ b/LibreOfficeWriter.au3 @@ -9321,8 +9321,6 @@ Func _LOWriter_DocFindAllInRange(ByRef $oDoc, ByRef $oSrchDescript, $sSearchStri Local $iCount = 0 _LOWriter_DocGetViewCursor _LOWriter_DocCreateTextCursor - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oSrchDescript) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -9451,11 +9449,11 @@ EndFunc ;==>_LOWriter_DocFindAllInRange ; =============================================================================================================================== Func _LOWriter_DocFindNext(ByRef $oDoc, ByRef $oSrchDescript, $sSearchString, ByRef $atFindFormat, $oRange = Null, $oLastFind = Null, _ $bExhaustive = False) - Local $oResult, $oRangeRegion, $oResultRegion, $oText, $oFindRange - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oResult, $oRangeRegion, $oResultRegion, $oText, $oFindRange + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oSrchDescript) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oSrchDescript.supportsService("com.sun.star.util.SearchDescriptor") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -9583,12 +9581,12 @@ EndFunc ;==>_LOWriter_DocFindNext ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocFooterGetTextCursor(ByRef $oPageStyle, $bFooter = False, $bFirstPage = False, $bLeftPage = False, $bRightPage = False) - Local $aoReturn[1] - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $aoReturn[1] + Local $vReturn + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bFooter) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bFirstPage) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -9673,13 +9671,13 @@ EndFunc ;==>_LOWriter_DocFooterGetTextCursor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocGenProp(ByRef $oDoc, $sNewAuthor = Null, $iRevisions = Null, $iEditDuration = Null, $bApplyUserData = Null, $bResetUserData = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oDocProp, $oSettings Local $iError = 0 Local $avGenProp[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oDocProp = $oDoc.DocumentProperties() @@ -9762,13 +9760,13 @@ EndFunc ;==>_LOWriter_DocGenProp ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocGenPropCreation(ByRef $oDoc, $sAuthor = Null, $tDateStruct = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oDocProp Local $iError = 0 Local $avCreate[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oDocProp = $oDoc.DocumentProperties() If Not IsObj($oDocProp) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -9829,13 +9827,13 @@ EndFunc ;==>_LOWriter_DocGenPropCreation ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocGenPropModification(ByRef $oDoc, $sModifiedBy = Null, $tDateStruct = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oDocProp Local $iError = 0 Local $avMod[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oDocProp = $oDoc.DocumentProperties() If Not IsObj($oDocProp) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -9897,13 +9895,13 @@ EndFunc ;==>_LOWriter_DocGenPropModification ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocGenPropPrint(ByRef $oDoc, $sPrintedBy = Null, $tDateStruct = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oDocProp Local $iError = 0 Local $avPrint[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oDocProp = $oDoc.DocumentProperties() If Not IsObj($oDocProp) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -9973,12 +9971,13 @@ EndFunc ;==>_LOWriter_DocGenPropPrint ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocGenPropTemplate(ByRef $oDoc, $sTemplateName = Null, $sTemplateURL = Null, $tDateStruct = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oDocProp Local $iError = 0 Local $avTemplate[3] _LOWriter_DateStructModify - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oDocProp = $oDoc.DocumentProperties() @@ -10037,11 +10036,11 @@ EndFunc ;==>_LOWriter_DocGenPropTemplate ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocGetCounts(ByRef $oDoc) - Local $aiCounts[9], $avDocStats - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $aiCounts[9], $avDocStats + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) __LOWriter_ArrayFill($aiCounts, $oDoc.CurrentController.PageCount(), $oDoc.CurrentController.LineCount(), $oDoc.ParagraphCount(), _ @@ -10086,11 +10085,11 @@ EndFunc ;==>_LOWriter_DocGetCounts ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocGetName(ByRef $oDoc, $bReturnFull = False) - Local $sName - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $sName + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bReturnFull) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -10127,11 +10126,11 @@ EndFunc ;==>_LOWriter_DocGetName ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocGetPath(ByRef $oDoc, $bReturnLibreURL = False) - Local $sPath - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $sPath + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bReturnLibreURL) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oDoc.hasLocation() Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -10212,11 +10211,11 @@ EndFunc ;==>_LOWriter_DocGetString ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocGetViewCursor(ByRef $oDoc) - Local $oViewCursor - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oViewCursor + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oViewCursor = $oDoc.CurrentController.getViewCursor() Return (IsObj($oViewCursor)) ? SetError($__LOW_STATUS_SUCCESS, 0, $oViewCursor) : SetError($__LOW_STATUS_INIT_ERROR, 1, 0) ;Failed to Create ViewCursor @@ -10251,11 +10250,11 @@ EndFunc ;==>_LOWriter_DocGetViewCursor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocHasFrameName(ByRef $oDoc, $sFrameName) - Local $oFrames, $oShapes - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oFrames, $oShapes + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sFrameName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oFrames = $oDoc.TextFrames() @@ -10335,11 +10334,11 @@ EndFunc ;==>_LOWriter_DocHasPath ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocHasTableName(ByRef $oDoc, $sTableName) - Local $oTables - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oTables + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sTableName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oTables = $oDoc.TextTables() @@ -10387,12 +10386,12 @@ EndFunc ;==>_LOWriter_DocHasTableName ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocHeaderGetTextCursor(ByRef $oPageStyle, $bHeader = False, $bFirstPage = False, $bLeftPage = False, $bRightPage = False) - Local $aoReturn[1] - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $aoReturn[1] + Local $vReturn + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bHeader) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bFirstPage) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -10475,12 +10474,12 @@ EndFunc ;==>_LOWriter_DocHeaderGetTextCursor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocHyperlinkInsert(ByRef $oDoc, ByRef $oCursor, $sLinkText, $sLinkAddress, $bInsertAtViewCursor = False, $bOverwrite = False) - Local $oText, $oTextCursor - Local $iCursorType = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oText, $oTextCursor + Local $iCursorType = 0 + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) And ($oCursor <> Default) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsString($sLinkText) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -10565,12 +10564,12 @@ EndFunc ;==>_LOWriter_DocHyperlinkInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocInsertControlChar(ByRef $oDoc, ByRef $oCursor, $iConChar, $bOverwrite = False) - Local $iCursorType - Local $oTextCursor = $oCursor - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iCursorType + Local $oTextCursor = $oCursor + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not __LOWriter_IntIsBetween($iConChar, 0, 5) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -10622,12 +10621,12 @@ EndFunc ;==>_LOWriter_DocInsertControlChar ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocInsertString(ByRef $oDoc, ByRef $oCursor, $sString, $bOverwrite = False) - Local $iCursorType - Local $oTextCursor = $oCursor - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iCursorType + Local $oTextCursor = $oCursor + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsString($sString) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -10976,14 +10975,14 @@ EndFunc ;==>_LOWriter_DocOpen ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocPosAndSize(ByRef $oDoc, $iX = Null, $iY = Null, $iWidth = Null, $iHeight = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tWindowSize Local Const $iPosSize = 15 ; adjust both size and position. Local $iError = 0 Local $aiWinPosSize[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $tWindowSize = $oDoc.CurrentController.Frame.ContainerWindow.getPosSize() @@ -11090,12 +11089,12 @@ EndFunc ;==>_LOWriter_DocPosAndSize ; =============================================================================================================================== Func _LOWriter_DocPrint(ByRef $oDoc, $iCopies = 1, $bCollate = True, $vPages = "ALL", $bWait = True, $iDuplexMode = $LOW_DUPLEX_OFF, _ $sPrinter = "", $sFilePathName = "") - Local Const $STR_STRIPLEADING = 1, $STR_STRIPTRAILING = 2, $STR_STRIPALL = 8 - Local $avPrintOpt[4], $asSetPrinterOpt[1] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local Const $STR_STRIPLEADING = 1, $STR_STRIPTRAILING = 2, $STR_STRIPALL = 8 + Local $avPrintOpt[4], $asSetPrinterOpt[1] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iCopies) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bCollate) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -11190,13 +11189,13 @@ EndFunc ;==>_LOWriter_DocPrint ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocPrintIncludedSettings(ByRef $oDoc, $bGraphics = Null, $bControls = Null, $bDrawings = Null, $bTables = Null, $bHiddenText = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oSettings Local $iError = 0 Local $abPrintSettings[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oSettings = $oDoc.createInstance("com.sun.star.text.DocumentSettings") If Not IsObj($oSettings) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -11308,6 +11307,9 @@ EndFunc ;==>_LOWriter_DocPrintIncludedSettings ; =============================================================================================================================== Func _LOWriter_DocPrintMiscSettings(ByRef $oDoc, $iPaperOrient = Null, $sPrinterName = Null, $iCommentsMode = Null, $bBrochure = Null, _ $bBrochureRTL = Null, $bReversed = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local Const $STR_STRIPLEADING = 1, $STR_STRIPTRAILING = 2 Local $iError = 0 Local $oSettings @@ -11315,9 +11317,6 @@ Func _LOWriter_DocPrintMiscSettings(ByRef $oDoc, $iPaperOrient = Null, $sPrinter Local $aoSetting[1] Local $avPrintSettings[6] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oSettings = $oDoc.createInstance("com.sun.star.text.DocumentSettings") If Not IsObj($oSettings) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -11428,13 +11427,13 @@ EndFunc ;==>_LOWriter_DocPrintMiscSettings ; =============================================================================================================================== Func _LOWriter_DocPrintPageSettings(ByRef $oDoc, $bBlackOnly = Null, $bLeftOnly = Null, $bRightOnly = Null, $bBackground = Null, _ $bEmptyPages = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iError = 0 Local $oSettings Local $abPrintSettings[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oSettings = $oDoc.createInstance("com.sun.star.text.DocumentSettings") If Not IsObj($oSettings) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -11598,15 +11597,15 @@ EndFunc ;==>_LOWriter_DocPrintPageSettings ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocPrintSizeSettings(ByRef $oDoc, $iPaperFormat = Null, $iPaperWidth = Null, $iPaperHeight = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $bCanSetPaperFormat = False, $bCanSetPaperSize = False Local $iError = 0 Local $tSize Local $aoSetting[1] Local $aiPrintSettings[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iPaperFormat, $iPaperWidth, $iPaperHeight) Then @@ -11834,11 +11833,11 @@ EndFunc ;==>_LOWriter_DocRedoIsPossible ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocReplaceAll(ByRef $oDoc, ByRef $oSrchDescript, $sSearchString, $sReplaceString, ByRef $atFindFormat, ByRef $atReplaceFormat) - Local $iReplacements - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iReplacements + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oSrchDescript) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oSrchDescript.supportsService("com.sun.star.util.SearchDescriptor") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -11949,6 +11948,9 @@ EndFunc ;==>_LOWriter_DocReplaceAll ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocReplaceAllInRange(ByRef $oDoc, ByRef $oSrchDescript, ByRef $oRange, $sSearchString, $sReplaceString, ByRef $atFindFormat, ByRef $atReplaceFormat) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $aoResults[0] Local $atArgs[7] Local Const $LOW_SEARCHFLAG_ABSOLUTE = 1, $LOW_SEARCHFLAG_REGEXP = 2, $LOW_SEARCHFLAG_REPLACE_ALL = 3, $LOW_SEARCHFLAG_SELECTION = 2048 @@ -11956,9 +11958,6 @@ Func _LOWriter_DocReplaceAllInRange(ByRef $oDoc, ByRef $oSrchDescript, ByRef $oR Local $iResults Local $bFormat = False - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oSrchDescript) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oSrchDescript.supportsService("com.sun.star.util.SearchDescriptor") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -12124,12 +12123,12 @@ EndFunc ;==>_LOWriter_DocSave ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocSaveAs(ByRef $oDoc, $sFilePath, $sFilterName = "", $bOverwrite = Null, $sPassword = Null) - Local $aProperties[1] - Local $sSavePath - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $aProperties[1] + Local $sSavePath + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sFilePath) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsString($sFilterName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -12352,11 +12351,11 @@ EndFunc ;==>_LOWriter_DocUndoIsPossible ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocViewCursorGetPosition(ByRef $oCursor) - Local $iCursorType - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iCursorType + If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $iCursorType = __LOWriter_Internal_CursorGetType($oCursor) @@ -12394,11 +12393,11 @@ EndFunc ;==>_LOWriter_DocViewCursorGetPosition ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocVisible(ByRef $oDoc, $bVisible = Null) - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If ($bVisible = Null) Then Return SetError($__LOW_STATUS_SUCCESS, 1, $oDoc.CurrentController.Frame.ContainerWindow.isVisible()) @@ -12440,13 +12439,13 @@ EndFunc ;==>_LOWriter_DocVisible ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_DocZoom(ByRef $oDoc, $iZoom = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iError = 0 Local $oServiceManager, $oDispatcher Local $aArgs[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If ($iZoom = Null) Then Return SetError($__LOW_STATUS_SUCCESS, 1, $oDoc.CurrentController.ViewSettings.ZoomValue()) @@ -12521,11 +12520,11 @@ EndFunc ;==>_LOWriter_EndnoteDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_EndnoteGetAnchor(ByRef $oEndNote) - Local $oAnchor - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oAnchor + If Not IsObj($oEndNote) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oAnchor = $oEndNote.Anchor.Text.createTextCursorByRange($oEndNote.Anchor()) @@ -12556,11 +12555,11 @@ EndFunc ;==>_LOWriter_EndnoteGetAnchor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_EndnoteGetTextCursor(ByRef $oEndNote) - Local $oTextCursor - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oTextCursor + If Not IsObj($oEndNote) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oTextCursor = $oEndNote.Text.createTextCursor() @@ -12605,11 +12604,11 @@ EndFunc ;==>_LOWriter_EndnoteGetTextCursor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_EndnoteInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $sLabel = Null) - Local $oEndNote - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oEndNote + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bOverwrite) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -12800,12 +12799,12 @@ EndFunc ;==>_LOWriter_EndnoteModifyAnchor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_EndnoteSettingsAutoNumber(ByRef $oDoc, $iNumFormat = Null, $iStartAt = Null, $sBefore = Null, $sAfter = Null) - Local $iError = 0 - Local $avENSettings[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avENSettings[4] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iNumFormat, $iStartAt, $sBefore, $sAfter) Then @@ -12888,12 +12887,12 @@ EndFunc ;==>_LOWriter_EndnoteSettingsAutoNumber ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_EndnoteSettingsStyles(ByRef $oDoc, $sParagraph = Null, $sPage = Null, $sTextArea = Null, $sEndnoteArea = Null) - Local $iError = 0 - Local $asENSettings[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $asENSettings[4] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($sParagraph, $sPage, $sTextArea, $sEndnoteArea) Then @@ -12963,13 +12962,13 @@ EndFunc ;==>_LOWriter_EndnoteSettingsStyles ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_EndnotesGetList(ByRef $oDoc) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oEndNotes Local $aoEndnotes[0] Local $iCount - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oEndNotes = $oDoc.getEndnotes() @@ -13032,11 +13031,11 @@ EndFunc ;==>_LOWriter_EndnotesGetList ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldAuthorInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $sAuthor = Null, $bFullName = Null) - Local $oAuthField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oAuthField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -13110,12 +13109,12 @@ EndFunc ;==>_LOWriter_FieldAuthorInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldAuthorModify(ByRef $oAuthField, $bIsFixed = Null, $sAuthor = Null, $bFullName = Null) - Local $iError = 0 - Local $avAuth[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avAuth[3] + If Not IsObj($oAuthField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bIsFixed, $sAuthor, $bFullName) Then @@ -13191,11 +13190,11 @@ EndFunc ;==>_LOWriter_FieldAuthorModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldChapterInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $iChapFrmt = Null, $iLevel = Null) - Local $oChapField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oChapField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -13262,12 +13261,12 @@ EndFunc ;==>_LOWriter_FieldChapterInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldChapterModify(ByRef $oChapField, $iChapFrmt = Null, $iLevel = Null) - Local $iError = 0 - Local $aiChap[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $aiChap[2] + If Not IsObj($oChapField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iChapFrmt, $iLevel) Then @@ -13329,11 +13328,11 @@ EndFunc ;==>_LOWriter_FieldChapterModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldCombCharInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $sCharacters = Null) - Local $oCombCharField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oCombCharField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -13387,11 +13386,11 @@ EndFunc ;==>_LOWriter_FieldCombCharInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldCombCharModify(ByRef $oCombCharField, $sCharacters = Null) - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + If Not IsObj($oCombCharField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($sCharacters) Then Return SetError($__LOW_STATUS_SUCCESS, 1, $oCombCharField.Content()) @@ -13460,11 +13459,11 @@ EndFunc ;==>_LOWriter_FieldCombCharModify ; =============================================================================================================================== Func _LOWriter_FieldCommentInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $sContent = Null, $sAuthor = Null, $tDateStruct = Null, _ $sInitials = Null, $sName = Null, $bResolved = Null) - Local $oCommentField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oCommentField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -13573,13 +13572,13 @@ EndFunc ;==>_LOWriter_FieldCommentInsert ; =============================================================================================================================== Func _LOWriter_FieldCommentModify(ByRef $oDoc, ByRef $oCommentField, $sContent = Null, $sAuthor = Null, $tDateStruct = Null, $sInitials = Null, _ $sName = Null, $bResolved = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iError = 0 Local $avAnnot[4] Local $bRefresh = False - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCommentField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -13687,11 +13686,11 @@ EndFunc ;==>_LOWriter_FieldCommentModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldCondTextInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $sCondition = Null, $sThen = Null, $sElse = Null) - Local $oCondTextField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oCondTextField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -13762,12 +13761,12 @@ EndFunc ;==>_LOWriter_FieldCondTextInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldCondTextModify(ByRef $oCondTextField, $sCondition = Null, $sThen = Null, $sElse = Null) - Local $iError = 0 - Local $avCond[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avCond[4] + If Not IsObj($oCondTextField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($sCondition, $sThen, $sElse) Then @@ -13821,11 +13820,11 @@ EndFunc ;==>_LOWriter_FieldCondTextModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldCurrentDisplayGet(ByRef $oField) - Local $sPresentation - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $sPresentation + If Not IsObj($oField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If ($oField.supportsService("com.sun.star.text.textfield.ConditionalText")) Then ;COnditional Text Fields don't update "CurrentPresentation" setting, @@ -13892,11 +13891,11 @@ EndFunc ;==>_LOWriter_FieldCurrentDisplayGet ; =============================================================================================================================== Func _LOWriter_FieldDateTimeInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $tDateStruct = Null, _ $bIsDate = Null, $iOffset = Null, $iDateFormatKey = Null) - Local $oDateTimeField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDateTimeField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -13999,12 +13998,12 @@ EndFunc ;==>_LOWriter_FieldDateTimeInsert ; =============================================================================================================================== Func _LOWriter_FieldDateTimeModify(ByRef $oDoc, ByRef $oDateTimeField, $bIsFixed = Null, $tDateStruct = Null, $bIsDate = Null, _ $iOffset = Null, $iDateFormatKey = Null) - Local $iError = 0, $iNumberFormat - Local $avDateTime[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0, $iNumberFormat + Local $avDateTime[5] + If Not IsObj($oDateTimeField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bIsFixed, $tDateStruct, $bIsDate, $iOffset, $iDateFormatKey) Then @@ -14090,12 +14089,12 @@ EndFunc ;==>_LOWriter_FieldDateTimeModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDelete(ByRef $oDoc, ByRef $oField, $bDeleteMaster = False) - Local $oFieldMaster - Local $aoDependents[0] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oFieldMaster + Local $aoDependents[0] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bDeleteMaster) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -14163,11 +14162,11 @@ EndFunc ;==>_LOWriter_FieldDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoCommentsInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $sComments = Null) - Local $oDocInfoCommentField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDocInfoCommentField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -14232,12 +14231,12 @@ EndFunc ;==>_LOWriter_FieldDocInfoCommentsInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoCommentsModify(ByRef $oDocInfoCommentField, $bIsFixed = Null, $sComments = Null) - Local $iError = 0 - Local $avDocInfoCom[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avDocInfoCom[2] + If Not IsObj($oDocInfoCommentField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bIsFixed, $sComments) Then @@ -14302,11 +14301,11 @@ EndFunc ;==>_LOWriter_FieldDocInfoCommentsModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoCreateAuthInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $sAuthor = Null) - Local $oDocInfoCreateAuthField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDocInfoCreateAuthField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -14371,12 +14370,12 @@ EndFunc ;==>_LOWriter_FieldDocInfoCreateAuthInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoCreateAuthModify(ByRef $oDocInfoCreateAuthField, $bIsFixed = Null, $sAuthor = Null) - Local $iError = 0 - Local $avDocInfoModAuth[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avDocInfoModAuth[2] + If Not IsObj($oDocInfoCreateAuthField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bIsFixed, $sAuthor) Then @@ -14443,11 +14442,11 @@ EndFunc ;==>_LOWriter_FieldDocInfoCreateAuthModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoCreateDateTimeInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $iDateFormatKey = Null) - Local $oDocInfoCreateDtTmField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDocInfoCreateDtTmField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -14515,12 +14514,12 @@ EndFunc ;==>_LOWriter_FieldDocInfoCreateDateTimeInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoCreateDateTimeModify(ByRef $oDoc, ByRef $oDocInfoCreateDtTmField, $bIsFixed = Null, $iDateFormatKey = Null) - Local $iError = 0, $iNumberFormat - Local $avDocInfoCrtDate[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0, $iNumberFormat + Local $avDocInfoCrtDate[2] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oDocInfoCreateDtTmField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -14595,11 +14594,11 @@ EndFunc ;==>_LOWriter_FieldDocInfoCreateDateTimeModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoEditTimeInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $iTimeFormatKey = Null) - Local $oDocInfoEditTimeField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDocInfoEditTimeField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -14667,12 +14666,12 @@ EndFunc ;==>_LOWriter_FieldDocInfoEditTimeInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoEditTimeModify(ByRef $oDoc, ByRef $oDocInfoEditTimeField, $bIsFixed = Null, $iTimeFormatKey = Null) - Local $iError = 0, $iNumberFormat - Local $avDocInfoEditTm[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0, $iNumberFormat + Local $avDocInfoEditTm[2] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oDocInfoEditTimeField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -14745,11 +14744,11 @@ EndFunc ;==>_LOWriter_FieldDocInfoEditTimeModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoKeywordsInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $sKeywords = Null) - Local $oDocInfoKeywordField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDocInfoKeywordField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -14814,12 +14813,12 @@ EndFunc ;==>_LOWriter_FieldDocInfoKeywordsInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoKeywordsModify(ByRef $oDocInfoKeywordField, $bIsFixed = Null, $sKeywords = Null) - Local $iError = 0 - Local $avDocInfoKyWrd[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avDocInfoKyWrd[2] + If Not IsObj($oDocInfoKeywordField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bIsFixed, $sKeywords) Then @@ -14884,11 +14883,11 @@ EndFunc ;==>_LOWriter_FieldDocInfoKeywordsModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoModAuthInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $sAuthor = Null) - Local $oDocInfoModAuthField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDocInfoModAuthField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -14953,12 +14952,12 @@ EndFunc ;==>_LOWriter_FieldDocInfoModAuthInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoModAuthModify(ByRef $oDocInfoModAuthField, $bIsFixed = Null, $sAuthor = Null) - Local $iError = 0 - Local $avDocInfoModAuth[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avDocInfoModAuth[2] + If Not IsObj($oDocInfoModAuthField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bIsFixed, $sAuthor) Then @@ -15026,11 +15025,11 @@ EndFunc ;==>_LOWriter_FieldDocInfoModAuthModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoModDateTimeInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $iDateFormatKey = Null) - Local $oDocInfoModDtTmField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDocInfoModDtTmField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -15098,12 +15097,12 @@ EndFunc ;==>_LOWriter_FieldDocInfoModDateTimeInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoModDateTimeModify(ByRef $oDoc, ByRef $oDocInfoModDtTmField, $bIsFixed = Null, $iDateFormatKey = Null) - Local $iError = 0, $iNumberFormat - Local $avDocInfoModDate[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0, $iNumberFormat + Local $avDocInfoModDate[2] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oDocInfoModDtTmField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -15176,11 +15175,11 @@ EndFunc ;==>_LOWriter_FieldDocInfoModDateTimeModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoPrintAuthInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $sAuthor = Null) - Local $oDocInfoPrintAuthField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDocInfoPrintAuthField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -15245,12 +15244,12 @@ EndFunc ;==>_LOWriter_FieldDocInfoPrintAuthInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoPrintAuthModify(ByRef $oDocInfoPrintAuthField, $bIsFixed = Null, $sAuthor = Null) - Local $iError = 0 - Local $avDocInfoModAuth[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avDocInfoModAuth[2] + If Not IsObj($oDocInfoPrintAuthField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bIsFixed, $sAuthor) Then @@ -15317,11 +15316,11 @@ EndFunc ;==>_LOWriter_FieldDocInfoPrintAuthModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoPrintDateTimeInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $iDateFormatKey = Null) - Local $oDocInfoPrintDtTmField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDocInfoPrintDtTmField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -15389,12 +15388,12 @@ EndFunc ;==>_LOWriter_FieldDocInfoPrintDateTimeInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoPrintDateTimeModify(ByRef $oDoc, ByRef $oDocInfoPrintDtTmField, $bIsFixed = Null, $iDateFormatKey = Null) - Local $iError = 0, $iNumberFormat - Local $avDocInfoPrntDate[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0, $iNumberFormat + Local $avDocInfoPrntDate[2] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oDocInfoPrintDtTmField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -15467,11 +15466,11 @@ EndFunc ;==>_LOWriter_FieldDocInfoPrintDateTimeModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoRevNumInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $iRevNum = Null) - Local $oDocInfoRevNumField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDocInfoRevNumField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -15536,12 +15535,12 @@ EndFunc ;==>_LOWriter_FieldDocInfoRevNumInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoRevNumModify(ByRef $oDocInfoRevNumField, $bIsFixed = Null, $iRevNum = Null) - Local $iError = 0 - Local $avDocInfoRev[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avDocInfoRev[2] + If Not IsObj($oDocInfoRevNumField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bIsFixed, $iRevNum) Then @@ -15606,11 +15605,11 @@ EndFunc ;==>_LOWriter_FieldDocInfoRevNumModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoSubjectInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $sSubject = Null) - Local $oDocInfoSubField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDocInfoSubField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -15675,12 +15674,12 @@ EndFunc ;==>_LOWriter_FieldDocInfoSubjectInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoSubjectModify(ByRef $oDocInfoSubField, $bIsFixed = Null, $sSubject = Null) - Local $iError = 0 - Local $avDocInfoSub[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avDocInfoSub[2] + If Not IsObj($oDocInfoSubField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bIsFixed, $sSubject) Then @@ -15745,11 +15744,11 @@ EndFunc ;==>_LOWriter_FieldDocInfoSubjectModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoTitleInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $sTitle = Null) - Local $oDocInfoTitleField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oDocInfoTitleField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -15814,12 +15813,12 @@ EndFunc ;==>_LOWriter_FieldDocInfoTitleInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldDocInfoTitleModify(ByRef $oDocInfoTitleField, $bIsFixed = Null, $sTitle = Null) - Local $iError = 0 - Local $avDocInfoTitle[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avDocInfoTitle[2] + If Not IsObj($oDocInfoTitleField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bIsFixed, $sTitle) Then @@ -15889,11 +15888,11 @@ EndFunc ;==>_LOWriter_FieldDocInfoTitleModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldFileNameInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $iFormat = Null) - Local $oFileNameField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oFileNameField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -15961,12 +15960,12 @@ EndFunc ;==>_LOWriter_FieldFileNameInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldFileNameModify(ByRef $oFileNameField, $bIsFixed = Null, $iFormat = Null) - Local $iError = 0 - Local $avFileName[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avFileName[2] + If Not IsObj($oFileNameField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iFormat, $bIsFixed) Then @@ -16026,11 +16025,11 @@ EndFunc ;==>_LOWriter_FieldFileNameModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldFuncHiddenParInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $sCondition = Null) - Local $oHidParField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oHidParField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -16083,12 +16082,12 @@ EndFunc ;==>_LOWriter_FieldFuncHiddenParInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldFuncHiddenParModify(ByRef $oHidParField, $sCondition = Null) - Local $iError = 0 - Local $avHidPar[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avHidPar[2] + If Not IsObj($oHidParField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($sCondition) Then @@ -16144,11 +16143,11 @@ EndFunc ;==>_LOWriter_FieldFuncHiddenParModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldFuncHiddenTextInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $sCondition = Null, $sText = Null) - Local $oHidTxtField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oHidTxtField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -16209,12 +16208,12 @@ EndFunc ;==>_LOWriter_FieldFuncHiddenTextInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldFuncHiddenTextModify(ByRef $oHidTxtField, $sCondition = Null, $sText = Null) - Local $iError = 0 - Local $avHidPar[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avHidPar[3] + If Not IsObj($oHidTxtField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($sCondition, $sText) Then @@ -16277,11 +16276,11 @@ EndFunc ;==>_LOWriter_FieldFuncHiddenTextModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldFuncInputInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $sReference = Null, $sText = Null) - Local $oInputField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oInputField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -16341,12 +16340,12 @@ EndFunc ;==>_LOWriter_FieldFuncInputInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldFuncInputModify(ByRef $oInputField, $sReference = Null, $sText = Null) - Local $iError = 0 - Local $asInput[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $asInput[2] + If Not IsObj($oInputField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($sReference, $sText) Then @@ -16418,11 +16417,11 @@ EndFunc ;==>_LOWriter_FieldFuncInputModify ; =============================================================================================================================== Func _LOWriter_FieldFuncPlaceholderInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $iPHolderType = Null, _ $sPHolderName = Null, $sReference = Null) - Local $oPHolderField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oPHolderField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -16496,12 +16495,12 @@ EndFunc ;==>_LOWriter_FieldFuncPlaceholderInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldFuncPlaceholderModify(ByRef $oPHolderField, $iPHolderType = Null, $sPHolderName = Null, $sReference = Null) - Local $iError = 0 - Local $asPHolder[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $asPHolder[3] + If Not IsObj($oPHolderField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iPHolderType, $sPHolderName, $sReference) Then @@ -16554,11 +16553,11 @@ EndFunc ;==>_LOWriter_FieldFuncPlaceholderModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldGetAnchor(ByRef $oField) - Local $oFieldAnchor - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oFieldAnchor + If Not IsObj($oField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oFieldAnchor = $oField.Anchor.Text.createTextCursorByRange($oField.Anchor()) @@ -16608,11 +16607,11 @@ EndFunc ;==>_LOWriter_FieldGetAnchor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldInputListInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $asItems = Null, $sName = Null, $sSelectedItem = Null) - Local $oInputField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oInputField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -16684,12 +16683,12 @@ EndFunc ;==>_LOWriter_FieldInputListInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldInputListModify(ByRef $oInputField, $asItems = Null, $sName = Null, $sSelectedItem = Null) - Local $iError = 0 - Local $avDropDwn[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avDropDwn[3] + If Not IsObj($oInputField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($asItems, $sName, $sSelectedItem) Then @@ -16841,11 +16840,11 @@ EndFunc ;==>_LOWriter_FieldInputListModify ; =============================================================================================================================== Func _LOWriter_FieldPageNumberInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $iNumFormat = Null, $iOffset = Null, _ $iPageNumType = Null, $sUserText = Null) - Local $oPageField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oPageField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -17014,13 +17013,13 @@ EndFunc ;==>_LOWriter_FieldPageNumberInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldPageNumberModify(ByRef $oDoc, ByRef $oPageNumField, $iNumFormat = Null, $iOffset = Null, $iPageNumType = Null, $sUserText = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $avField[4] Local $iError = 0 Local $oNewPageNumField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oPageNumField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -17125,11 +17124,11 @@ EndFunc ;==>_LOWriter_FieldPageNumberModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldRefBookMarkInsert(ByRef $oDoc, ByRef $oCursor, $sBookmarkName, $bOverwrite = False, $iRefUsing = Null) - Local $oBookmarkRefField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oBookmarkRefField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -17203,12 +17202,12 @@ EndFunc ;==>_LOWriter_FieldRefBookMarkInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldRefBookMarkModify(ByRef $oDoc, ByRef $oBookmarkRefField, $sBookmarkName = Null, $iRefUsing = Null) - Local $iError = 0 - Local $avBook[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avBook[2] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oBookmarkRefField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -17283,11 +17282,11 @@ EndFunc ;==>_LOWriter_FieldRefBookMarkModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldRefEndnoteInsert(ByRef $oDoc, ByRef $oCursor, ByRef $oEndNote, $bOverwrite = False, $iRefUsing = Null) - Local $oENoteRefField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oENoteRefField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -17362,12 +17361,12 @@ EndFunc ;==>_LOWriter_FieldRefEndnoteInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldRefEndnoteModify(ByRef $oDoc, ByRef $oEndNoteRefField, $oEndNote = Null, $iRefUsing = Null) - Local $iError = 0, $iSourceSeq - Local $avFoot[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0, $iSourceSeq + Local $avFoot[2] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oEndNoteRefField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -17453,11 +17452,11 @@ EndFunc ;==>_LOWriter_FieldRefEndnoteModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldRefFootnoteInsert(ByRef $oDoc, ByRef $oCursor, ByRef $oFootNote, $bOverwrite = False, $iRefUsing = Null) - Local $oFNoteRefField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oFNoteRefField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -17533,12 +17532,12 @@ EndFunc ;==>_LOWriter_FieldRefFootnoteInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldRefFootnoteModify(ByRef $oDoc, ByRef $oFootNoteRefField, $oFootNote = Null, $iRefUsing = Null) - Local $iError = 0, $iSourceSeq - Local $avFoot[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0, $iSourceSeq + Local $avFoot[2] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oFootNoteRefField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -17661,11 +17660,11 @@ EndFunc ;==>_LOWriter_FieldRefGetType ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldRefInsert(ByRef $oDoc, ByRef $oCursor, $sRefMarkName, $bOverwrite = False, $iRefUsing = Null) - Local $oRefMarks, $oMarkRefField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oRefMarks, $oMarkRefField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -17725,11 +17724,11 @@ EndFunc ;==>_LOWriter_FieldRefInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldRefMarkDelete(ByRef $oDoc, $sName) - Local $oRefMark, $oRefMarks - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oRefMark, $oRefMarks + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -17773,11 +17772,11 @@ EndFunc ;==>_LOWriter_FieldRefMarkDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldRefMarkGetAnchor(ByRef $oDoc, $sName) - Local $oRefMark, $oRefMarks - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oRefMark, $oRefMarks + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -17819,12 +17818,12 @@ EndFunc ;==>_LOWriter_FieldRefMarkGetAnchor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldRefMarkList(ByRef $oDoc) - Local $oRefMarks - Local $asRefMarks[0] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oRefMarks + Local $asRefMarks[0] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oRefMarks = $oDoc.getReferenceMarks() @@ -17873,11 +17872,11 @@ EndFunc ;==>_LOWriter_FieldRefMarkList ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldRefMarkSet(ByRef $oDoc, ByRef $oCursor, $sName, $bOverwrite = False) - Local $oRefMark, $oRefMarks - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oRefMark, $oRefMarks + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -17947,13 +17946,13 @@ EndFunc ;==>_LOWriter_FieldRefMarkSet ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldRefModify(ByRef $oDoc, ByRef $oRefField, $sRefMarkName = Null, $iRefUsing = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oRefMarks Local $iError = 0 Local $avRef[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oRefField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -18222,11 +18221,11 @@ EndFunc ;==>_LOWriter_FieldsDocInfoGetList ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldSenderInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bIsFixed = Null, $sContent = Null, $iDataType = Null) - Local $oSenderField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oSenderField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -18314,12 +18313,12 @@ EndFunc ;==>_LOWriter_FieldSenderInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldSenderModify(ByRef $oSenderField, $bIsFixed = Null, $sContent = Null, $iDataType = Null) - Local $iError = 0 - Local $avExtUser[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avExtUser[3] + If Not IsObj($oSenderField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bIsFixed, $sContent, $iDataType) Then @@ -18399,12 +18398,12 @@ EndFunc ;==>_LOWriter_FieldSenderModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldSetVarInsert(ByRef $oDoc, ByRef $oCursor, $sName, $sValue, $bOverwrite = False, $iNumFormatKey = Null, $bIsVisible = Null) - Local $oSetVarField, $oSetVarMaster - Local $iExtended = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oSetVarField, $oSetVarMaster + Local $iExtended = 0 + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -18476,13 +18475,13 @@ EndFunc ;==>_LOWriter_FieldSetVarInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldSetVarMasterCreate(ByRef $oDoc, $sMasterFieldName) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oMasterFields, $oMasterfield Local $sFullFieldName Local $sField = "com.sun.star.text.fieldmaster.SetExpression" - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sMasterFieldName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -18529,13 +18528,13 @@ EndFunc ;==>_LOWriter_FieldSetVarMasterCreate ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldSetVarMasterDelete(ByRef $oDoc, $vMasterField) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oMasterFields, $oMasterfield Local $sFullFieldName Local $sField = "com.sun.star.text.fieldmaster.SetExpression" - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($vMasterField) And Not IsObj($vMasterField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -18583,12 +18582,12 @@ EndFunc ;==>_LOWriter_FieldSetVarMasterDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldSetVarMasterExists(ByRef $oDoc, $sMasterFieldName) - Local $oMasterFields - Local $sFullFieldName = "com.sun.star.text.fieldmaster.SetExpression" & "." - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oMasterFields + Local $sFullFieldName = "com.sun.star.text.fieldmaster.SetExpression" & "." + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sMasterFieldName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $sFullFieldName &= $sMasterFieldName @@ -18627,12 +18626,12 @@ EndFunc ;==>_LOWriter_FieldSetVarMasterExists ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldSetVarMasterGetObj(ByRef $oDoc, $sMasterFieldName) - Local $oMasterFields, $oMasterfield - Local $sFullFieldName = "com.sun.star.text.fieldmaster.SetExpression" & "." - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oMasterFields, $oMasterfield + Local $sFullFieldName = "com.sun.star.text.fieldmaster.SetExpression" & "." + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sMasterFieldName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $sFullFieldName &= $sMasterFieldName @@ -18673,14 +18672,14 @@ EndFunc ;==>_LOWriter_FieldSetVarMasterGetObj ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldSetVarMasterList(ByRef $oDoc) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oMasterFields Local $asMasterFields[0], $asSetVarMasters[0] Local $iCount = 0 Local $sField = "com.sun.star.text.fieldmaster.SetExpression" - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oMasterFields = $oDoc.getTextFieldMasters() @@ -18734,11 +18733,11 @@ EndFunc ;==>_LOWriter_FieldSetVarMasterList ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldSetVarMasterListFields(ByRef $oDoc, ByRef $oMasterfield) - Local $aoDependFields[0] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $aoDependFields[0] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oMasterfield) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -18792,12 +18791,12 @@ EndFunc ;==>_LOWriter_FieldSetVarMasterListFields ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldSetVarModify(ByRef $oDoc, ByRef $oSetVarField, $sValue = Null, $iNumFormatKey = Null, $bIsVisible = Null) - Local $iError = 0, $iNumberFormat - Local $avSetVar[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0, $iNumberFormat + Local $avSetVar[4] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oSetVarField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -18997,11 +18996,11 @@ EndFunc ;==>_LOWriter_FieldsGetList ; =============================================================================================================================== Func _LOWriter_FieldShowVarInsert(ByRef $oDoc, ByRef $oCursor, $sSetVarName, $bOverwrite = False, $iNumFormatKey = Null, _ $bShowName = Null) - Local $oShowVarField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oShowVarField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -19077,12 +19076,12 @@ EndFunc ;==>_LOWriter_FieldShowVarInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldShowVarModify(ByRef $oDoc, ByRef $oShowVarField, $sSetVarName = Null, $iNumFormatKey = Null, $bShowName = Null) - Local $iError = 0, $iNumberFormat - Local $avShowVar[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0, $iNumberFormat + Local $avShowVar[3] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oShowVarField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -19243,12 +19242,12 @@ EndFunc ;==>_LOWriter_FieldShowVarModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldStatCountInsert(ByRef $oDoc, ByRef $oCursor, $iCountType, $bOverwrite = False, $iNumFormat = Null) - Local $oCountField - Local $sFieldType - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oCountField + Local $sFieldType + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -19398,14 +19397,14 @@ EndFunc ;==>_LOWriter_FieldStatCountInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldStatCountModify(ByRef $oDoc, ByRef $oCountField, $iCountType = Null, $iNumFormat = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iError = 0 Local $avCountField[2] Local $oNewCountField Local $sFieldType - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCountField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -19494,11 +19493,11 @@ EndFunc ;==>_LOWriter_FieldStatCountModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldStatTemplateInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $iFormat = Null) - Local $oTemplateField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oTemplateField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -19556,11 +19555,11 @@ EndFunc ;==>_LOWriter_FieldStatTemplateInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldStatTemplateModify(ByRef $oTemplateField, $iFormat = Null) - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + If Not IsObj($oTemplateField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iFormat) Then Return SetError($__LOW_STATUS_SUCCESS, 1, $oTemplateField.FileFormat()) @@ -19607,12 +19606,12 @@ EndFunc ;==>_LOWriter_FieldStatTemplateModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldUpdate(ByRef $oDoc, $oField = Null, $bForceUpdate = False) - Local $oTextFields, $oTextField - Local $iCount = 0, $iUpdated = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oTextFields, $oTextField + Local $iCount = 0, $iUpdated = 0 + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If $oField <> Null And Not IsObj($oField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bForceUpdate) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -19694,11 +19693,11 @@ EndFunc ;==>_LOWriter_FieldUpdate ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldVarSetPageInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $bRefOn = Null, $iOffset = Null) - Local $oPageVarSetField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oPageVarSetField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -19758,12 +19757,12 @@ EndFunc ;==>_LOWriter_FieldVarSetPageInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldVarSetPageModify(ByRef $oPageVarSetField, $bRefOn = Null, $iOffset = Null) - Local $iError = 0 - Local $avPage[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avPage[2] + If Not IsObj($oPageVarSetField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bRefOn, $iOffset) Then @@ -19896,11 +19895,11 @@ EndFunc ;==>_LOWriter_FieldVarSetPageModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldVarShowPageInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $iNumFormat = Null) - Local $oPageShowField - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oPageShowField + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -20026,11 +20025,11 @@ EndFunc ;==>_LOWriter_FieldVarShowPageInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FieldVarShowPageModify(ByRef $oPageShowField, $iNumFormat = Null) - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + If Not IsObj($oPageShowField) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iNumFormat) Then Return SetError($__LOW_STATUS_SUCCESS, 1, $oPageShowField.NumberingType()) @@ -20361,11 +20360,11 @@ EndFunc ;==>_LOWriter_FindFormatModifyEffects ; =============================================================================================================================== Func _LOWriter_FindFormatModifyFont(ByRef $oDoc, ByRef $atFormat, $sFontName = Null, $iFontSize = Null, $iFontWeight = Null, _ $iFontPosture = Null, $iFontColor = Null, $iTransparency = Null, $iHighlight = Null) - Local Const $UBOUND_COLUMNS = 2 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local Const $UBOUND_COLUMNS = 2 + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsArray($atFormat) Or (UBound($atFormat, $UBOUND_COLUMNS) > 1) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -20800,11 +20799,11 @@ EndFunc ;==>_LOWriter_FindFormatModifyOverline ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FindFormatModifyPageBreak(ByRef $oDoc, ByRef $atFormat, $iBreakType = Null, $sPageStyle = Null, $iPgNumOffSet = Null) - Local Const $UBOUND_COLUMNS = 2 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local Const $UBOUND_COLUMNS = 2 + If Not IsArray($atFormat) Or (UBound($atFormat, $UBOUND_COLUMNS) > 1) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If ($iBreakType <> Null) Then @@ -21114,12 +21113,12 @@ EndFunc ;==>_LOWriter_FindFormatModifyRotateScaleSpace ; =============================================================================================================================== Func _LOWriter_FindFormatModifySpacing(ByRef $atFormat, $iAbovePar = Null, $iBelowPar = Null, $bAddSpace = Null, _ $iLineSpcMode = Null, $iLineSpcHeight = Null) - Local $tLine - Local Const $UBOUND_COLUMNS = 2 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $tLine + Local Const $UBOUND_COLUMNS = 2 + If Not IsArray($atFormat) Or (UBound($atFormat, $UBOUND_COLUMNS) > 1) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If ($iAbovePar <> Null) Then @@ -21496,11 +21495,11 @@ EndFunc ;==>_LOWriter_FindFormatModifyUnderline ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FontExists(ByRef $oDoc, $sFontName) - Local $atFonts - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $atFonts + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sFontName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $atFonts = $oDoc.getCurrentController().getFrame().getContainerWindow().getFontDescriptors() @@ -21559,12 +21558,12 @@ EndFunc ;==>_LOWriter_FontExists ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FontsList(ByRef $oDoc) - Local $atFonts - Local $asFonts[0][4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $atFonts + Local $asFonts[0][4] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $atFonts = $oDoc.getCurrentController().getFrame().getContainerWindow().getFontDescriptors() If Not IsArray($atFonts) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -21633,11 +21632,11 @@ EndFunc ;==>_LOWriter_FootnoteDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FootnoteGetAnchor(ByRef $oFootNote) - Local $oAnchor - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oAnchor + If Not IsObj($oFootNote) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oAnchor = $oFootNote.Anchor.Text.createTextCursorByRange($oFootNote.Anchor()) @@ -21668,11 +21667,11 @@ EndFunc ;==>_LOWriter_FootnoteGetAnchor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FootnoteGetTextCursor(ByRef $oFootNote) - Local $oTextCursor - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oTextCursor + If Not IsObj($oFootNote) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oTextCursor = $oFootNote.Text.createTextCursor() @@ -21718,11 +21717,11 @@ EndFunc ;==>_LOWriter_FootnoteGetTextCursor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FootnoteInsert(ByRef $oDoc, ByRef $oCursor, $bOverwrite = False, $sLabel = Null) - Local $oFootNote - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oFootNote + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bOverwrite) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -21929,12 +21928,12 @@ EndFunc ;==>_LOWriter_FootnoteModifyAnchor ; =============================================================================================================================== Func _LOWriter_FootnoteSettingsAutoNumber(ByRef $oDoc, $iNumFormat = Null, $iStartAt = Null, $sBefore = Null, $sAfter = Null, $iCounting = Null, _ $bEndOfDoc = Null) - Local $iError = 0 - Local $avFNSettings[6] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avFNSettings[6] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iNumFormat, $iStartAt, $sBefore, $sAfter, $iCounting, $bEndOfDoc) Then @@ -22019,12 +22018,12 @@ EndFunc ;==>_LOWriter_FootnoteSettingsAutoNumber ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FootnoteSettingsContinuation(ByRef $oDoc, $sEnd = Null, $sBegin = Null) - Local $iError = 0 - Local $asFNSettings[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $asFNSettings[2] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($sEnd, $sBegin) Then @@ -22093,12 +22092,12 @@ EndFunc ;==>_LOWriter_FootnoteSettingsContinuation ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FootnoteSettingsStyles(ByRef $oDoc, $sParagraph = Null, $sPage = Null, $sTextArea = Null, $sFootnoteArea = Null) - Local $iError = 0 - Local $avFNSettings[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avFNSettings[4] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($sParagraph, $sPage, $sTextArea, $sFootnoteArea) Then @@ -22168,13 +22167,13 @@ EndFunc ;==>_LOWriter_FootnoteSettingsStyles ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FootnotesGetList(ByRef $oDoc) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oFootNotes Local $aoFootnotes[0] Local $iCount - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oFootNotes = $oDoc.getFootnotes() @@ -22223,13 +22222,13 @@ EndFunc ;==>_LOWriter_FootnotesGetList ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FormatKeyCreate(ByRef $oDoc, $sFormat) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iFormatKey Local $tLocale Local $oFormats - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sFormat) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $tLocale = __LOWriter_CreateStruct("com.sun.star.lang.Locale") @@ -22273,12 +22272,12 @@ EndFunc ;==>_LOWriter_FormatKeyCreate ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FormatKeyDelete(ByRef $oDoc, $iFormatKey) - Local $tLocale - Local $oFormats - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $tLocale + Local $oFormats + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iFormatKey) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not _LOWriter_FormatKeyExists($oDoc, $iFormatKey) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) ;Key not found. @@ -22338,13 +22337,13 @@ EndFunc ;==>_LOWriter_FormatKeyDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FormatKeyExists(ByRef $oDoc, $iFormatKey, $iFormatType = $LOW_FORMAT_KEYS_ALL) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oFormats Local $aiFormatKeys[0] Local $tLocale - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iFormatKey) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsInt($iFormatType) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -22388,11 +22387,11 @@ EndFunc ;==>_LOWriter_FormatKeyExists ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FormatKeyGetString(ByRef $oDoc, $iFormatKey) - Local $oFormatKey - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oFormatKey + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iFormatKey) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not _LOWriter_FormatKeyExists($oDoc, $iFormatKey) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -22455,15 +22454,15 @@ EndFunc ;==>_LOWriter_FormatKeyGetString ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FormatKeyList(ByRef $oDoc, $bIsUser = False, $bUserOnly = False, $iFormatKeyType = $LOW_FORMAT_KEYS_ALL) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oFormats Local $aiFormatKeys Local $avFormats[0][3] Local $tLocale Local $iColumns = 3, $iCount = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bIsUser) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bUserOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -22559,12 +22558,12 @@ EndFunc ;==>_LOWriter_FormatKeyList ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameAreaColor(ByRef $oFrame, $iBackColor = Null, $bBackTransparent = Null) - Local $iError = 0 - Local $avColor[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avColor[2] + If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iBackColor, $bBackTransparent) Then @@ -22721,14 +22720,14 @@ EndFunc ;==>_LOWriter_FrameAreaColor ; =============================================================================================================================== Func _LOWriter_FrameAreaGradient(ByRef $oDoc, ByRef $oFrame, $sGradientName = Null, $iType = Null, $iIncrement = Null, $iXCenter = Null, _ $iYCenter = Null, $iAngle = Null, $iBorder = Null, $iFromColor = Null, $iToColor = Null, $iFromIntense = Null, $iToIntense = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tStyleGradient Local $iError = 0 Local $avGradient[11] Local $sGradName - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $tStyleGradient = $oFrame.FillGradient() @@ -22906,11 +22905,11 @@ EndFunc ;==>_LOWriter_FrameAreaGradient ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameBorderColor(ByRef $oFrame, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If ($iTop <> Null) And Not __LOWriter_IntIsBetween($iTop, $LOW_COLOR_BLACK, $LOW_COLOR_WHITE) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -22971,12 +22970,12 @@ EndFunc ;==>_LOWriter_FrameBorderColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameBorderPadding(ByRef $oFrame, $iAll = Null, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $iError = 0 - Local $aiBPadding[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $aiBPadding[5] + If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iAll, $iTop, $iBottom, $iLeft, $iRight) Then @@ -23097,11 +23096,11 @@ EndFunc ;==>_LOWriter_FrameBorderPadding ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameBorderStyle(ByRef $oFrame, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If ($iTop <> Null) And Not __LOWriter_IntIsBetween($iTop, $LOW_BORDERSTYLE_SOLID, $LOW_BORDERSTYLE_DASH_DOT_DOT, "", $LOW_BORDERSTYLE_NONE) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -23164,11 +23163,11 @@ EndFunc ;==>_LOWriter_FrameBorderStyle ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameBorderWidth(ByRef $oFrame, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If ($iTop <> Null) And Not __LOWriter_IntIsBetween($iTop, 0, $iTop) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -23262,13 +23261,13 @@ EndFunc ;==>_LOWriter_FrameBorderWidth ; =============================================================================================================================== Func _LOWriter_FrameColumnSeparator(ByRef $oFrame, $bSeparatorOn = Null, $iStyle = Null, $iWidth = Null, $iColor = Null, _ $iHeight = Null, $iPosition = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oTextColumns Local $iError = 0 Local $avColumnLine[6] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oTextColumns = $oFrame.TextColumns() If Not IsObj($oTextColumns) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -23353,12 +23352,12 @@ EndFunc ;==>_LOWriter_FrameColumnSeparator ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameColumnSettings(ByRef $oFrame, $iColumns = Null) - Local $oTextColumns - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oTextColumns + Local $iError = 0 + If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oTextColumns = $oFrame.TextColumns() If Not IsObj($oTextColumns) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -23433,14 +23432,14 @@ EndFunc ;==>_LOWriter_FrameColumnSettings ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameColumnSize(ByRef $oFrame, $iColumn, $bAutoWidth = Null, $iGlobalSpacing = Null, $iSpacing = Null, $iWidth = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oTextColumns Local $atColumns Local $iError = 0, $iRightMargin, $iLeftMargin Local $avColumnSize[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iColumn) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oTextColumns = $oFrame.TextColumns() @@ -23589,12 +23588,12 @@ EndFunc ;==>_LOWriter_FrameColumnSize ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameCreate(ByRef $oDoc, ByRef $oCursor, $sFrameName = Null, $iWidth = Null, $iHeight = Null, $bOverwrite = False) - Local $oFrame - Local Const $iCONST_AutoHW_OFF = 1 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local Const $iCONST_AutoHW_OFF = 1 + Local $oFrame + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If (__LOWriter_Internal_CursorGetType($oCursor) = $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -23683,11 +23682,11 @@ EndFunc ;==>_LOWriter_FrameCreateTextCursor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameDelete(ByRef $oDoc, ByRef $oFrame) - Local $sFrameName - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $sFrameName + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $sFrameName = $oFrame.getName() @@ -23716,11 +23715,11 @@ EndFunc ;==>_LOWriter_FrameDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameGetAnchor(ByRef $oFrame) - Local $oAnchor - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oAnchor + If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oAnchor = $oFrame.Anchor.Text.createTextCursorByRange($oFrame.Anchor()) @@ -23793,11 +23792,11 @@ EndFunc ;==>_LOWriter_FrameGetObjByCursor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameGetObjByName(ByRef $oDoc, $sFrameName) - Local $oFrames, $oShapes - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oFrames, $oShapes + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sFrameName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oFrames = $oDoc.TextFrames() @@ -23870,12 +23869,12 @@ EndFunc ;==>_LOWriter_FrameGetObjByName ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameHyperlink(ByRef $oFrame, $sURL = Null, $sName = Null, $sFrameTarget = Null, $bServerSideMap = Null) - Local $iError = 0 - Local $avHyperlink[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avHyperlink[4] + If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($sURL, $sName, $sFrameTarget, $bServerSideMap) Then @@ -23988,12 +23987,12 @@ EndFunc ;==>_LOWriter_FrameHyperlink ; =============================================================================================================================== Func _LOWriter_FrameOptions(ByRef $oFrame, $bProtectContent = Null, $bProtectPos = Null, $bProtectSize = Null, $iVertAlign = Null, _ $bEditInRead = Null, $bPrint = Null, $iTxtDirection = Null) - Local $iError = 0 - Local $avOptions[7] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avOptions[7] + If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bProtectContent, $bProtectPos, $bProtectSize, $iVertAlign, $bEditInRead, $bPrint, $iTxtDirection) Then @@ -24096,12 +24095,12 @@ EndFunc ;==>_LOWriter_FrameOptions ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameOptionsName(ByRef $oDoc, ByRef $oFrame, $sName = Null, $sDesc = Null, $sPrevLink = Null, $sNextLink = Null) - Local $iError = 0 - Local $asName[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $asName[4] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -24169,13 +24168,13 @@ EndFunc ;==>_LOWriter_FrameOptionsName ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FramesGetNames(ByRef $oDoc, $bSearchShapes = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $asFrameNames[0], $asShapes[0] Local $oFrames, $oShapes Local $iCount = 0, $iEndofArray - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bSearchShapes) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oFrames = $oDoc.TextFrames() @@ -24296,13 +24295,13 @@ EndFunc ;==>_LOWriter_FramesGetNames ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameShadow(ByRef $oFrame, $iWidth = Null, $iColor = Null, $bTransparent = Null, $iLocation = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tShdwFrmt Local $iError = 0 Local $avShadow[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $tShdwFrmt = $oFrame.ShadowFormat() If Not IsObj($tShdwFrmt) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -24403,12 +24402,12 @@ EndFunc ;==>_LOWriter_FrameShadow ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleAreaColor(ByRef $oFrameStyle, $iBackColor = Null, $bBackTransparent = Null) - Local $iError = 0 - Local $avColor[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avColor[2] + If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -24567,14 +24566,14 @@ EndFunc ;==>_LOWriter_FrameStyleAreaColor ; =============================================================================================================================== Func _LOWriter_FrameStyleAreaGradient(ByRef $oDoc, ByRef $oFrameStyle, $sGradientName = Null, $iType = Null, $iIncrement = Null, $iXCenter = Null, _ $iYCenter = Null, $iAngle = Null, $iBorder = Null, $iFromColor = Null, $iToColor = Null, $iFromIntense = Null, $iToIntense = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tStyleGradient Local $iError = 0 Local $avGradient[11] Local $sGradName - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -24754,11 +24753,11 @@ EndFunc ;==>_LOWriter_FrameStyleAreaGradient ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleBorderColor(ByRef $oFrameStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -24821,12 +24820,12 @@ EndFunc ;==>_LOWriter_FrameStyleBorderColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleBorderPadding(ByRef $oFrameStyle, $iAll = Null, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $iError = 0 - Local $aiBPadding[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $aiBPadding[5] + If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -24949,11 +24948,11 @@ EndFunc ;==>_LOWriter_FrameStyleBorderPadding ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleBorderStyle(ByRef $oFrameStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -25018,11 +25017,11 @@ EndFunc ;==>_LOWriter_FrameStyleBorderStyle ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleBorderWidth(ByRef $oFrameStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -25117,13 +25116,13 @@ EndFunc ;==>_LOWriter_FrameStyleBorderWidth ; =============================================================================================================================== Func _LOWriter_FrameStyleColumnSeparator(ByRef $oFrameStyle, $bSeparatorOn = Null, $iStyle = Null, $iWidth = Null, _ $iColor = Null, $iHeight = Null, $iPosition = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oTextColumns Local $iError = 0 Local $avColumnLine[6] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oTextColumns = $oFrameStyle.TextColumns() @@ -25210,12 +25209,12 @@ EndFunc ;==>_LOWriter_FrameStyleColumnSeparator ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleColumnSettings(ByRef $oFrameStyle, $iColumns = Null) - Local $oTextColumns - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oTextColumns + Local $iError = 0 + If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oTextColumns = $oFrameStyle.TextColumns() @@ -25292,14 +25291,14 @@ EndFunc ;==>_LOWriter_FrameStyleColumnSettings ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleColumnSize(ByRef $oFrameStyle, $iColumn, $bAutoWidth = Null, $iGlobalSpacing = Null, $iSpacing = Null, $iWidth = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oTextColumns Local $atColumns Local $iError = 0, $iRightMargin, $iLeftMargin Local $avColumnSize[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsInt($iColumn) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -25438,11 +25437,11 @@ EndFunc ;==>_LOWriter_FrameStyleColumnSize ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleCreate(ByRef $oDoc, $sFrameStyle) - Local $oFrameStyles, $oStyle, $oFrameStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oFrameStyles, $oStyle, $oFrameStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oFrameStyles = $oDoc.StyleFamilies().getByName("FrameStyles") @@ -25501,12 +25500,12 @@ EndFunc ;==>_LOWriter_FrameStyleCreate ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleDelete(ByRef $oDoc, $oFrameStyle, $bForceDelete = False, $sReplacementStyle = "Frame") - Local $oFrameStyles - Local $sFrameStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oFrameStyles + Local $sFrameStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -25588,11 +25587,11 @@ EndFunc ;==>_LOWriter_FrameStyleExists ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleGetObj(ByRef $oDoc, $sFrameStyle) - Local $oFrameStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oFrameStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not _LOWriter_FrameStyleExists($oDoc, $sFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -25674,12 +25673,12 @@ EndFunc ;==>_LOWriter_FrameStyleGetObj ; =============================================================================================================================== Func _LOWriter_FrameStyleOptions(ByRef $oFrameStyle, $bProtectContent = Null, $bProtectPos = Null, $bProtectSize = Null, _ $iVertAlign = Null, $bEditInRead = Null, $bPrint = Null, $iTxtDirection = Null) - Local $iError = 0 - Local $avOptions[7] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avOptions[7] + If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -25790,12 +25789,12 @@ EndFunc ;==>_LOWriter_FrameStyleOptions ; =============================================================================================================================== Func _LOWriter_FrameStyleOrganizer(ByRef $oDoc, $oFrameStyle, $sNewFrameStyleName = Null, $sParentStyle = Null, $bAutoUpdate = Null, _ $bHidden = Null) - Local $iError = 0 - Local $avOrganizer[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avOrganizer[4] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -25918,14 +25917,14 @@ EndFunc ;==>_LOWriter_FrameStyleSet ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStylesGetNames(ByRef $oDoc, $bUserOnly = False, $bAppliedOnly = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oStyles Local $aStyles[0] Local $iCount = 0 Local $sExecute = "" - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bUserOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bAppliedOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -26030,13 +26029,13 @@ EndFunc ;==>_LOWriter_FrameStylesGetNames ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleShadow(ByRef $oFrameStyle, $iWidth = Null, $iColor = Null, $bTransparent = Null, $iLocation = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tShdwFrmt Local $iError = 0 Local $avShadow[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $tShdwFrmt = $oFrameStyle.ShadowFormat() @@ -26112,11 +26111,11 @@ EndFunc ;==>_LOWriter_FrameStyleShadow ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleTransparency(ByRef $oFrameStyle, $iTransparency = Null) - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -26209,14 +26208,14 @@ EndFunc ;==>_LOWriter_FrameStyleTransparency ; =============================================================================================================================== Func _LOWriter_FrameStyleTransparencyGradient(ByRef $oDoc, ByRef $oFrameStyle, $iType = Null, $iXCenter = Null, $iYCenter = Null, $iAngle = Null, _ $iBorder = Null, $iStart = Null, $iEnd = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tStyleGradient Local $iError = 0 Local $sTGradName Local $aiTransparent[7] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -26471,12 +26470,12 @@ EndFunc ;==>_LOWriter_FrameStyleTransparencyGradient ; =============================================================================================================================== Func _LOWriter_FrameStyleTypePosition(ByRef $oFrameStyle, $iHorAlign = Null, $iHorPos = Null, $iHorRelation = Null, $bMirror = Null, _ $iVertAlign = Null, $iVertPos = Null, $iVertRelation = Null, $bKeepInside = Null, $iAnchorPos = Null) - Local $iError = 0, $iCurrentAnchor - Local $avPosition[9] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0, $iCurrentAnchor + Local $avPosition[9] + If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -26689,13 +26688,13 @@ EndFunc ;==>_LOWriter_FrameStyleTypePosition ; =============================================================================================================================== Func _LOWriter_FrameStyleTypeSize(ByRef $oDoc, ByRef $oFrameStyle, $iWidth = Null, $iRelativeWidth = Null, $iWidthRelativeTo = Null, _ $bAutoWidth = Null, $iHeight = Null, $iRelativeHeight = Null, $iHeightRelativeTo = Null, $bAutoHeight = Null, $bKeepRatio = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iError = 0 Local $avSize[7] Local Const $iCONST_AutoHW_OFF = 1, $iCONST_AutoHW_ON = 2 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -26842,13 +26841,13 @@ EndFunc ;==>_LOWriter_FrameStyleTypeSize ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleWrap(ByRef $oFrameStyle, $iWrapType = Null, $iLeft = Null, $iRight = Null, $iTop = Null, $iBottom = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oPropInfo Local $iError = 0 Local $avWrap[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oPropInfo = $oFrameStyle.getPropertySetInfo() @@ -26948,12 +26947,12 @@ EndFunc ;==>_LOWriter_FrameStyleWrap ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameStyleWrapOptions(ByRef $oFrameStyle, $bFirstPar = Null, $bInBackground = Null, $bAllowOverlap = Null) - Local $iError = 0 - Local $abWrapOptions[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $abWrapOptions[3] + If Not IsObj($oFrameStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oFrameStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -27015,11 +27014,11 @@ EndFunc ;==>_LOWriter_FrameStyleWrapOptions ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameTransparency(ByRef $oFrame, $iTransparency = Null) - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iTransparency) Then Return SetError($__LOW_STATUS_SUCCESS, 1, $oFrame.FillTransparence()) @@ -27110,14 +27109,14 @@ EndFunc ;==>_LOWriter_FrameTransparency ; =============================================================================================================================== Func _LOWriter_FrameTransparencyGradient(ByRef $oDoc, ByRef $oFrame, $iType = Null, $iXCenter = Null, $iYCenter = Null, $iAngle = Null, _ $iBorder = Null, $iStart = Null, $iEnd = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tGradient Local $sTGradName Local $iError = 0 Local $aiTransparent[7] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $tGradient = $oFrame.FillTransparenceGradient() @@ -27369,12 +27368,12 @@ EndFunc ;==>_LOWriter_FrameTransparencyGradient ; =============================================================================================================================== Func _LOWriter_FrameTypePosition(ByRef $oFrame, $iHorAlign = Null, $iHorPos = Null, $iHorRelation = Null, $bMirror = Null, _ $iVertAlign = Null, $iVertPos = Null, $iVertRelation = Null, $bKeepInside = Null, $iAnchorPos = Null) - Local $iError = 0, $iCurrentAnchor - Local $avPosition[9] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0, $iCurrentAnchor + Local $avPosition[9] + If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($iHorAlign, $iHorPos, $iHorRelation, $bMirror, $iVertAlign, $iVertPos, $iVertRelation, $bKeepInside, _ @@ -27584,13 +27583,13 @@ EndFunc ;==>_LOWriter_FrameTypePosition ; =============================================================================================================================== Func _LOWriter_FrameTypeSize(ByRef $oDoc, ByRef $oFrame, $iWidth = Null, $iRelativeWidth = Null, $iWidthRelativeTo = Null, $bAutoWidth = Null, _ $iHeight = Null, $iRelativeHeight = Null, $iHeightRelativeTo = Null, $bAutoHeight = Null, $bKeepRatio = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iError = 0 Local $avSize[7] Local Const $iCONST_AutoHW_OFF = 1, $iCONST_AutoHW_ON = 2 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -27735,13 +27734,13 @@ EndFunc ;==>_LOWriter_FrameTypeSize ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameWrap(ByRef $oFrame, $iWrapType = Null, $iLeft = Null, $iRight = Null, $iTop = Null, $iBottom = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oPropInfo Local $iError = 0 Local $avWrap[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oPropInfo = $oFrame.getPropertySetInfo() If Not IsObj($oPropInfo) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -27843,12 +27842,12 @@ EndFunc ;==>_LOWriter_FrameWrap ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_FrameWrapOptions(ByRef $oFrame, $bFirstPar = Null, $bInBackground = Null, $bAllowOverlap = Null) - Local $iError = 0 - Local $abWrapOptions[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $abWrapOptions[3] + If Not IsObj($oFrame) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If __LOWriter_VarsAreNull($bFirstPar, $bInBackground, $bAllowOverlap) Then @@ -27908,11 +27907,11 @@ EndFunc ;==>_LOWriter_FrameWrapOptions ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_NumStyleCreate(ByRef $oDoc, $sNumStyle) - Local $oNumStyles, $oStyle, $oNumStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oNumStyles, $oStyle, $oNumStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sNumStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oNumStyles = $oDoc.StyleFamilies().getByName("NumberingStyles") @@ -28100,15 +28099,15 @@ EndFunc ;==>_LOWriter_NumStyleCreate ; =============================================================================================================================== Func _LOWriter_NumStyleCustomize(ByRef $oDoc, $oNumStyle, $iLevel, $iNumFormat = Null, $iStartAt = Null, $sCharStyle = Null, _ $iSubLevels = Null, $sSepBefore = Null, $sSepAfter = Null, $bConsecutiveNum = Null, $sBulletFont = Null, $iCharDecimal = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oNumRules Local $iError = 0 Local $aNumSettings[9][2] Local $iRowCount = 0 Local $avCustomize[7] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oNumStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oNumStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -28274,12 +28273,12 @@ EndFunc ;==>_LOWriter_NumStyleCustomize ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_NumStyleDelete(ByRef $oDoc, $oNumStyle) - Local $oNumStyles - Local $sNumStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oNumStyles + Local $sNumStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oNumStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oNumStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -28357,11 +28356,11 @@ EndFunc ;==>_LOWriter_NumStyleExists ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_NumStyleGetObj(ByRef $oDoc, $sNumStyle) - Local $oNumStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oNumStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sNumStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not _LOWriter_NumStyleExists($oDoc, $sNumStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -28414,12 +28413,12 @@ EndFunc ;==>_LOWriter_NumStyleGetObj ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_NumStyleOrganizer(ByRef $oDoc, $oNumStyle, $sNewNumStyleName = Null, $bHidden = Null) - Local $iError = 0 - Local $avOrganizer[1] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avOrganizer[1] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oNumStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oNumStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -28530,15 +28529,15 @@ EndFunc ;==>_LOWriter_NumStyleOrganizer ; =============================================================================================================================== Func _LOWriter_NumStylePosition(ByRef $oDoc, $oNumStyle, $iLevel, $iAlignedAt = Null, $iNumAlign = Null, $iFollowedBy = Null, _ $iTabStop = Null, $iIndent = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oNumRules Local $iError = 0 Local $aNumSettings[5][2] Local $iRowCount = 0 Local $avPosition[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oNumStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oNumStyle.supportsService("com.sun.star.style.Style") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -28742,13 +28741,13 @@ EndFunc ;==>_LOWriter_NumStyleSetLevel ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_NumStylesGetNames(ByRef $oDoc, $bUserOnly = False, $bAppliedOnly = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iCount = 0 Local $sExecute = "" Local $aStyles[0] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bUserOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bAppliedOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -28838,12 +28837,12 @@ EndFunc ;==>_LOWriter_NumStylesGetNames ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleAreaColor(ByRef $oPageStyle, $iBackColor = Null, $bBackTransparent = Null) - Local $iError = 0 - Local $avColor[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avColor[2] + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -29003,14 +29002,14 @@ EndFunc ;==>_LOWriter_PageStyleAreaColor ; =============================================================================================================================== Func _LOWriter_PageStyleAreaGradient(ByRef $oDoc, ByRef $oPageStyle, $sGradientName = Null, $iType = Null, $iIncrement = Null, $iXCenter = Null, _ $iYCenter = Null, $iAngle = Null, $iBorder = Null, $iFromColor = Null, $iToColor = Null, $iFromIntense = Null, $iToIntense = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tStyleGradient Local $iError = 0 Local $avGradient[11] Local $sGradName - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -29189,11 +29188,11 @@ EndFunc ;==>_LOWriter_PageStyleAreaGradient ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleBorderColor(ByRef $oPageStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -29256,12 +29255,12 @@ EndFunc ;==>_LOWriter_PageStyleBorderColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleBorderPadding(ByRef $oPageStyle, $iAll = Null, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $iError = 0 - Local $aiBPadding[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $aiBPadding[5] + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -29384,11 +29383,11 @@ EndFunc ;==>_LOWriter_PageStyleBorderPadding ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleBorderStyle(ByRef $oPageStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -29453,11 +29452,11 @@ EndFunc ;==>_LOWriter_PageStyleBorderStyle ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleBorderWidth(ByRef $oPageStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -29552,13 +29551,13 @@ EndFunc ;==>_LOWriter_PageStyleBorderWidth ; =============================================================================================================================== Func _LOWriter_PageStyleColumnSeparator(ByRef $oPageStyle, $bSeparatorOn = Null, $iStyle = Null, $iWidth = Null, $iColor = Null, _ $iHeight = Null, $iPosition = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oTextColumns Local $iError = 0 Local $avColumnLine[6] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oTextColumns = $oPageStyle.TextColumns() @@ -29645,12 +29644,12 @@ EndFunc ;==>_LOWriter_PageStyleColumnSeparator ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleColumnSettings(ByRef $oPageStyle, $iColumns = Null) - Local $oTextColumns - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oTextColumns + Local $iError = 0 + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oTextColumns = $oPageStyle.TextColumns() @@ -29727,14 +29726,14 @@ EndFunc ;==>_LOWriter_PageStyleColumnSettings ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleColumnSize(ByRef $oPageStyle, $iColumn, $bAutoWidth = Null, $iGlobalSpacing = Null, $iSpacing = Null, $iWidth = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oTextColumns Local $atColumns Local $iError = 0, $iRightMargin, $iLeftMargin Local $avColumnSize[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsInt($iColumn) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -29874,11 +29873,11 @@ EndFunc ;==>_LOWriter_PageStyleColumnSize ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleCreate(ByRef $oDoc, $sPageStyle) - Local $oPageStyles, $oStyle, $oPageStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oPageStyles, $oStyle, $oPageStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oPageStyles = $oDoc.StyleFamilies().getByName("PageStyles") @@ -29929,12 +29928,12 @@ EndFunc ;==>_LOWriter_PageStyleCreate ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleDelete(ByRef $oDoc, $oPageStyle) - Local $oPageStyles - Local $sPageStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oPageStyles + Local $sPageStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -30057,12 +30056,12 @@ EndFunc ;==>_LOWriter_PageStyleExists ; =============================================================================================================================== Func _LOWriter_PageStyleFooter(ByRef $oPageStyle, $bFooterOn = Null, $bSameLeftRight = Null, $bSameOnFirst = Null, $iLeftMargin = Null, _ $iRightMargin = Null, $iSpacing = Null, $bDynamicSpacing = Null, $iHeight = Null, $bAutoHeight = Null) - Local $iError = 0 - Local $avFooter[8] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avFooter[8] + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -30199,12 +30198,12 @@ EndFunc ;==>_LOWriter_PageStyleFooter ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleFooterAreaColor(ByRef $oPageStyle, $iBackColor = Null, $bBackTransparent = Null) - Local $iError = 0 - Local $avColor[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avColor[2] + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.FooterIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) @@ -30365,14 +30364,14 @@ EndFunc ;==>_LOWriter_PageStyleFooterAreaColor ; =============================================================================================================================== Func _LOWriter_PageStyleFooterAreaGradient(ByRef $oDoc, ByRef $oPageStyle, $sGradientName = Null, $iType = Null, $iIncrement = Null, $iXCenter = Null, _ $iYCenter = Null, $iAngle = Null, $iBorder = Null, $iFromColor = Null, $iToColor = Null, $iFromIntense = Null, $iToIntense = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tStyleGradient Local $iError = 0 Local $avGradient[11] Local $sGradName - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -30555,11 +30554,11 @@ EndFunc ;==>_LOWriter_PageStyleFooterAreaGradient ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleFooterBorderColor(ByRef $oPageStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.FooterIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 2, 0) @@ -30625,12 +30624,12 @@ EndFunc ;==>_LOWriter_PageStyleFooterBorderColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleFooterBorderPadding(ByRef $oPageStyle, $iAll = Null, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $iError = 0 - Local $aiBPadding[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $aiBPadding[5] + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.FooterIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) @@ -30753,11 +30752,11 @@ EndFunc ;==>_LOWriter_PageStyleFooterBorderPadding ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleFooterBorderStyle(ByRef $oPageStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.FooterIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 2, 0) @@ -30826,11 +30825,11 @@ EndFunc ;==>_LOWriter_PageStyleFooterBorderStyle ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleFooterBorderWidth(ByRef $oPageStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.FooterIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 2, 0) @@ -30918,13 +30917,13 @@ EndFunc ;==>_LOWriter_PageStyleFooterBorderWidth ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleFooterShadow(ByRef $oPageStyle, $iWidth = Null, $iColor = Null, $bTransparent = Null, $iLocation = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tShdwFrmt Local $iError = 0 Local $avShadow[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.FooterIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) @@ -31004,11 +31003,11 @@ EndFunc ;==>_LOWriter_PageStyleFooterShadow ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleFooterTransparency(ByRef $oPageStyle, $iTransparency = Null) - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.FooterIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) @@ -31103,14 +31102,14 @@ EndFunc ;==>_LOWriter_PageStyleFooterTransparency ; =============================================================================================================================== Func _LOWriter_PageStyleFooterTransparencyGradient(ByRef $oDoc, ByRef $oPageStyle, $iType = Null, $iXCenter = Null, $iYCenter = Null, $iAngle = Null, _ $iBorder = Null, $iStart = Null, $iEnd = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tStyleGradient Local $sTGradName Local $iError = 0 Local $aiTransparent[7] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -31224,12 +31223,12 @@ EndFunc ;==>_LOWriter_PageStyleFooterTransparencyGradient ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleFootnoteArea(ByRef $oPageStyle, $iFootnoteHeight = Null, $iSpaceToText = Null) - Local $iError = 0 - Local $aiFootnote[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $aiFootnote[2] + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -31334,12 +31333,12 @@ EndFunc ;==>_LOWriter_PageStyleFootnoteArea ; =============================================================================================================================== Func _LOWriter_PageStyleFootnoteLine(ByRef $oPageStyle, $iPosition = Null, $iStyle = Null, $nThickness = Null, $iColor = Null, _ $iLength = Null, $iSpacing = Null) - Local $iError = 0 - Local $avFootnoteLine[6] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avFootnoteLine[6] + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -31417,11 +31416,11 @@ EndFunc ;==>_LOWriter_PageStyleFootnoteLine ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleGetObj(ByRef $oDoc, $sPageStyle) - Local $oPageStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oPageStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not _LOWriter_PageStyleExists($oDoc, $sPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -31503,12 +31502,12 @@ EndFunc ;==>_LOWriter_PageStyleGetObj ; =============================================================================================================================== Func _LOWriter_PageStyleHeader(ByRef $oPageStyle, $bHeaderOn = Null, $bSameLeftRight = Null, $bSameOnFirst = Null, $iLeftMargin = Null, _ $iRightMargin = Null, $iSpacing = Null, $bDynamicSpacing = Null, $iHeight = Null, $bAutoHeight = Null) - Local $iError = 0 - Local $avHeader[8] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avHeader[8] + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -31645,12 +31644,12 @@ EndFunc ;==>_LOWriter_PageStyleHeader ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleHeaderAreaColor(ByRef $oPageStyle, $iBackColor = Null, $bBackTransparent = Null) - Local $iError = 0 - Local $avColor[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avColor[2] + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.HeaderIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) @@ -31811,14 +31810,14 @@ EndFunc ;==>_LOWriter_PageStyleHeaderAreaColor ; =============================================================================================================================== Func _LOWriter_PageStyleHeaderAreaGradient(ByRef $oDoc, ByRef $oPageStyle, $sGradientName = Null, $iType = Null, $iIncrement = Null, $iXCenter = Null, _ $iYCenter = Null, $iAngle = Null, $iBorder = Null, $iFromColor = Null, $iToColor = Null, $iFromIntense = Null, $iToIntense = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tStyleGradient Local $iError = 0 Local $avGradient[11] Local $sGradName - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -32001,11 +32000,11 @@ EndFunc ;==>_LOWriter_PageStyleHeaderAreaGradient ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleHeaderBorderColor(ByRef $oPageStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.HeaderIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 2, 0) @@ -32071,12 +32070,12 @@ EndFunc ;==>_LOWriter_PageStyleHeaderBorderColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleHeaderBorderPadding(ByRef $oPageStyle, $iAll = Null, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $iError = 0 - Local $aiBPadding[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $aiBPadding[5] + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.HeaderIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) @@ -32199,11 +32198,11 @@ EndFunc ;==>_LOWriter_PageStyleHeaderBorderPadding ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleHeaderBorderStyle(ByRef $oPageStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.HeaderIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 2, 0) @@ -32272,11 +32271,11 @@ EndFunc ;==>_LOWriter_PageStyleHeaderBorderStyle ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleHeaderBorderWidth(ByRef $oPageStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.HeaderIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 2, 0) @@ -32364,13 +32363,13 @@ EndFunc ;==>_LOWriter_PageStyleHeaderBorderWidth ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleHeaderShadow(ByRef $oPageStyle, $iWidth = Null, $iColor = Null, $bTransparent = Null, $iLocation = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tShdwFrmt Local $iError = 0 Local $avShadow[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.HeaderIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) @@ -32449,11 +32448,11 @@ EndFunc ;==>_LOWriter_PageStyleHeaderShadow ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleHeaderTransparency(ByRef $oPageStyle, $iTransparency = Null) - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($oPageStyle.HeaderIsOn() = False) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) @@ -32548,14 +32547,14 @@ EndFunc ;==>_LOWriter_PageStyleHeaderTransparency ; =============================================================================================================================== Func _LOWriter_PageStyleHeaderTransparencyGradient(ByRef $oDoc, ByRef $oPageStyle, $iType = Null, $iXCenter = Null, $iYCenter = Null, $iAngle = Null, _ $iBorder = Null, $iStart = Null, $iEnd = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tStyleGradient Local $sTGradName Local $iError = 0 Local $aiTransparent[7] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -32780,13 +32779,13 @@ EndFunc ;==>_LOWriter_PageStyleHeaderTransparencyGradient ; =============================================================================================================================== Func _LOWriter_PageStyleLayout(ByRef $oDoc, $oPageStyle, $iLayout = Null, $iNumFormat = Null, $sRefStyle = Null, _ $bGutterOnRight = Null, $bGutterAtTop = Null, $bBackCoversMargins = Null, $sPaperTray = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oSettings Local $iError = 0 Local $avLayout[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oSettings = $oDoc.createInstance("com.sun.star.text.DocumentSettings") @@ -32915,12 +32914,12 @@ EndFunc ;==>_LOWriter_PageStyleLayout ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleMargins(ByRef $oPageStyle, $iLeft = Null, $iRight = Null, $iTop = Null, $iBottom = Null, $iGutter = Null) - Local $iError = 0 - Local $aiMargins[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $aiMargins[4] + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -33017,12 +33016,12 @@ EndFunc ;==>_LOWriter_PageStyleMargins ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleOrganizer(ByRef $oDoc, $oPageStyle, $sNewPageStyleName = Null, $bHidden = Null, $sFollowStyle = Null) - Local $iError = 0 - Local $avOrganizer[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avOrganizer[2] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -33160,12 +33159,12 @@ EndFunc ;==>_LOWriter_PageStyleOrganizer ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStylePaperFormat(ByRef $oPageStyle, $iWidth = Null, $iHeight = Null, $bLandscape = Null) - Local $iError = 0 - Local $avFormat[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avFormat[3] + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -33288,13 +33287,13 @@ EndFunc ;==>_LOWriter_PageStyleSet ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStylesGetNames(ByRef $oDoc, $bUserOnly = False, $bAppliedOnly = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iCount = 0 Local $sExecute = "" Local $aStyles[0] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bUserOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bAppliedOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -33398,13 +33397,13 @@ EndFunc ;==>_LOWriter_PageStylesGetNames ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleShadow(ByRef $oPageStyle, $iWidth = Null, $iColor = Null, $bTransparent = Null, $iLocation = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tShdwFrmt Local $iError = 0 Local $avShadow[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $tShdwFrmt = $oPageStyle.ShadowFormat() @@ -33480,11 +33479,11 @@ EndFunc ;==>_LOWriter_PageStyleShadow ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_PageStyleTransparency(ByRef $oPageStyle, $iTransparency = Null) - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -33576,14 +33575,14 @@ EndFunc ;==>_LOWriter_PageStyleTransparency ; =============================================================================================================================== Func _LOWriter_PageStyleTransparencyGradient(ByRef $oDoc, ByRef $oPageStyle, $iType = Null, $iXCenter = Null, $iYCenter = Null, $iAngle = Null, _ $iBorder = Null, $iStart = Null, $iEnd = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tStyleGradient Local $sTGradName Local $iError = 0 Local $aiTransparent[7] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oPageStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oPageStyle.supportsService("com.sun.star.style.PageStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -33686,11 +33685,11 @@ EndFunc ;==>_LOWriter_PageStyleTransparencyGradient ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParObjCopy(ByRef $oDoc) - Local $oObj - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oObj + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oObj = $oDoc.CurrentController.getTransferable() ;Copy @@ -33733,13 +33732,13 @@ EndFunc ;==>_LOWriter_ParObjCopy ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParObjCreateList(ByRef $oCursor, $bTableCheck = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oEnum, $oPar Local $iCount = 0 Local $aoParagraphs[1] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bTableCheck) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -33796,7 +33795,6 @@ EndFunc ;==>_LOWriter_ParObjCreateList ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParObjDelete(ByRef $oParObj) - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler @@ -33835,7 +33833,6 @@ EndFunc ;==>_LOWriter_ParObjDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParObjPaste(ByRef $oDoc, ByRef $oParObj) - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler @@ -33889,13 +33886,13 @@ EndFunc ;==>_LOWriter_ParObjPaste ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParObjSectionsGet(ByRef $oParagraph) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oSecEnum, $oParSection Local $aoSections[1][2] Local $iCount = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oParagraph) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParagraph.supportsService("com.sun.star.text.Paragraph") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -33945,11 +33942,11 @@ EndFunc ;==>_LOWriter_ParObjSectionsGet ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParObjSelect(ByRef $oDoc, ByRef $oObj) - Local $oViewCursor - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oViewCursor + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -34055,11 +34052,11 @@ EndFunc ;==>_LOWriter_ParObjSelect ; =============================================================================================================================== Func _LOWriter_ParStyleAlignment(ByRef $oParStyle, $iHorAlign = Null, $iVertAlign = Null, $iLastLineAlign = Null, _ $bExpandSingleWord = Null, $bSnapToGrid = Null, $iTxtDirection = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -34125,11 +34122,11 @@ EndFunc ;==>_LOWriter_ParStyleAlignment ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleBackColor(ByRef $oParStyle, $iBackColor = Null, $bBackTransparent = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -34215,11 +34212,11 @@ EndFunc ;==>_LOWriter_ParStyleBackColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleBorderColor(ByRef $oParStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -34283,11 +34280,11 @@ EndFunc ;==>_LOWriter_ParStyleBorderColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleBorderPadding(ByRef $oParStyle, $iAll = Null, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -34381,11 +34378,11 @@ EndFunc ;==>_LOWriter_ParStyleBorderPadding ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleBorderStyle(ByRef $oParStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -34459,11 +34456,11 @@ EndFunc ;==>_LOWriter_ParStyleBorderStyle ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleBorderWidth(ByRef $oParStyle, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null, $bConnectBorder = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -34516,11 +34513,11 @@ EndFunc ;==>_LOWriter_ParStyleBorderWidth ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleCreate(ByRef $oDoc, $sParStyle) - Local $oParStyles, $oStyle, $oParStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oParStyles, $oStyle, $oParStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $oParStyles = $oDoc.StyleFamilies().getByName("ParagraphStyles") @@ -34579,12 +34576,12 @@ EndFunc ;==>_LOWriter_ParStyleCreate ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleDelete(ByRef $oDoc, ByRef $oParStyle, $bForceDelete = False, $sReplacementStyle = "Default Paragraph Style") - Local $oParStyles - Local $sParStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oParStyles + Local $sParStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -34670,11 +34667,11 @@ EndFunc ;==>_LOWriter_ParStyleDelete ; =============================================================================================================================== Func _LOWriter_ParStyleDropCaps(ByRef $oDoc, ByRef $oParStyle, $iNumChar = Null, $iLines = Null, $iSpcTxt = Null, $bWholeWord = Null, _ $sCharStyle = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -34739,11 +34736,11 @@ EndFunc ;==>_LOWriter_ParStyleDropCaps ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleEffect(ByRef $oParStyle, $iRelief = Null, $iCase = Null, $bHidden = Null, $bOutline = Null, $bShadow = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -34851,11 +34848,11 @@ EndFunc ;==>_LOWriter_ParStyleExists ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleFont(ByRef $oDoc, ByRef $oParStyle, $sFontName = Null, $nFontSize = Null, $iPosture = Null, $iWeight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -34934,11 +34931,11 @@ EndFunc ;==>_LOWriter_ParStyleFont ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleFontColor(ByRef $oParStyle, $iFontColor = Null, $iTransparency = Null, $iHighlight = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -34972,11 +34969,11 @@ EndFunc ;==>_LOWriter_ParStyleFontColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleGetObj(ByRef $oDoc, $sParStyle) - Local $oParStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oParStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not _LOWriter_ParStyleExists($oDoc, $sParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -35044,11 +35041,11 @@ EndFunc ;==>_LOWriter_ParStyleGetObj ; =============================================================================================================================== Func _LOWriter_ParStyleHyphenation(ByRef $oParStyle, $bAutoHyphen = Null, $bHyphenNoCaps = Null, $iMaxHyphens = Null, _ $iMinLeadingChar = Null, $iMinTrailingChar = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -35107,11 +35104,11 @@ EndFunc ;==>_LOWriter_ParStyleHyphenation ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleIndent(ByRef $oParStyle, $iBeforeTxt = Null, $iAfterTxt = Null, $iFirstLine = Null, $bAutoFirstLine = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -35180,12 +35177,12 @@ EndFunc ;==>_LOWriter_ParStyleIndent ; =============================================================================================================================== Func _LOWriter_ParStyleOrganizer(ByRef $oDoc, ByRef $oParStyle, $sNewParStyleName = Null, $sFollowStyle = Null, $sParentStyle = Null, _ $bAutoUpdate = Null, $bHidden = Null) - Local $iError = 0 - Local $avOrganizer[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avOrganizer[4] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -35304,11 +35301,11 @@ EndFunc ;==>_LOWriter_ParStyleOrganizer ; =============================================================================================================================== Func _LOWriter_ParStyleOutLineAndList(ByRef $oDoc, ByRef $oParStyle, $iOutline = Null, $sNumStyle = Null, $bParLineCount = Null, _ $iLineCountVal = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -35405,11 +35402,11 @@ EndFunc ;==>_LOWriter_ParStyleOutLineAndList ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleOverLine(ByRef $oParStyle, $bWordOnly = Null, $iOverLineStyle = Null, $bOLHasColor = Null, $iOLColor = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -35480,11 +35477,11 @@ EndFunc ;==>_LOWriter_ParStyleOverLine ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStylePageBreak(ByRef $oDoc, ByRef $oParStyle, $iBreakType = Null, $iPgNumOffSet = Null, $sPageStyle = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -35551,11 +35548,11 @@ EndFunc ;==>_LOWriter_ParStylePageBreak ; =============================================================================================================================== Func _LOWriter_ParStylePosition(ByRef $oParStyle, $bAutoSuper = Null, $iSuperScript = Null, $bAutoSub = Null, $iSubScript = Null, _ $iRelativeSize = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -35600,11 +35597,11 @@ EndFunc ;==>_LOWriter_ParStylePosition ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleRotateScale(ByRef $oParStyle, $iRotation = Null, $iScaleWidth = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -35693,14 +35690,14 @@ EndFunc ;==>_LOWriter_ParStyleSet ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStylesGetNames(ByRef $oDoc, $bUserOnly = False, $bAppliedOnly = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oStyles Local $aStyles[0] Local $iCount = 0 Local $sExecute = "" - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bUserOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bAppliedOnly) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -35804,11 +35801,11 @@ EndFunc ;==>_LOWriter_ParStylesGetNames ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleShadow(ByRef $oParStyle, $iWidth = Null, $iColor = Null, $bTransparent = Null, $iLocation = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -35899,11 +35896,11 @@ EndFunc ;==>_LOWriter_ParStyleShadow ; =============================================================================================================================== Func _LOWriter_ParStyleSpace(ByRef $oParStyle, $iAbovePar = Null, $iBelowPar = Null, $bAddSpace = Null, $iLineSpcMode = Null, _ $iLineSpcHeight = Null, $bPageLineSpc = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -35961,11 +35958,11 @@ EndFunc ;==>_LOWriter_ParStyleSpace ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleSpacing(ByRef $oParStyle, $bAutoKerning = Null, $nKerning = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -36022,11 +36019,11 @@ EndFunc ;==>_LOWriter_ParStyleSpacing ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleStrikeOut(ByRef $oParStyle, $bWordOnly = Null, $bStrikeOut = Null, $iStrikeLineStyle = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -36153,11 +36150,11 @@ EndFunc ;==>_LOWriter_ParStyleTabStopCreate ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleTabStopDelete(ByRef $oDoc, ByRef $oParStyle, $iTabStop) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -36193,11 +36190,11 @@ EndFunc ;==>_LOWriter_ParStyleTabStopDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleTabStopList(ByRef $oParStyle) - Local $aiTabList - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $aiTabList + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -36286,11 +36283,11 @@ EndFunc ;==>_LOWriter_ParStyleTabStopList ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleTabStopMod(ByRef $oParStyle, $iTabStop, $iPosition = Null, $iFillChar = Null, $iAlignment = Null, $iDecChar = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsInt($iTabStop) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -36349,11 +36346,11 @@ EndFunc ;==>_LOWriter_ParStyleTabStopMod ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleTxtFlowOpt(ByRef $oParStyle, $bParSplit = Null, $bKeepTogether = Null, $iParOrphans = Null, $iParWidows = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -36447,11 +36444,11 @@ EndFunc ;==>_LOWriter_ParStyleTxtFlowOpt ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ParStyleUnderLine(ByRef $oParStyle, $bWordOnly = Null, $iUnderLineStyle = Null, $bULHasColor = Null, $iULColor = Null) - Local $vReturn - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + If Not IsObj($oParStyle) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oParStyle.supportsService("com.sun.star.style.ParagraphStyle") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -36599,11 +36596,11 @@ EndFunc ;==>_LOWriter_PathConvert ; =============================================================================================================================== Func _LOWriter_SearchDescriptorCreate(ByRef $oDoc, $bBackwards = False, $bMatchCase = False, $bWholeWord = False, _ $bRegExp = False, $bStyles = False, $bSearchPropValues = False) - Local $oSrchDescript - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oSrchDescript + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bBackwards) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -36684,11 +36681,11 @@ EndFunc ;==>_LOWriter_SearchDescriptorCreate ; =============================================================================================================================== Func _LOWriter_SearchDescriptorModify(ByRef $oSrchDescript, $bBackwards = Null, $bMatchCase = Null, $bWholeWord = Null, _ $bRegExp = Null, $bStyles = Null, $bSearchPropValues = Null) - Local $avSrchDescript[6] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $avSrchDescript[6] + If Not IsObj($oSrchDescript) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oSrchDescript.supportsService("com.sun.star.util.SearchDescriptor") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -36777,11 +36774,11 @@ EndFunc ;==>_LOWriter_SearchDescriptorModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_SearchDescriptorSimilarityModify(ByRef $oSrchDescript, $bSimilarity = Null, $bCombine = Null, $iRemove = Null, $iAdd = Null, $iExchange = Null) - Local $avSrchDescript[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $avSrchDescript[5] + If Not IsObj($oSrchDescript) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not $oSrchDescript.supportsService("com.sun.star.util.SearchDescriptor") Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -36855,12 +36852,12 @@ EndFunc ;==>_LOWriter_SearchDescriptorSimilarityModify ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_ShapesGetNames(ByRef $oDoc) - Local $asShapeNames[0][2] - Local $oShapes - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $asShapeNames[0][2] + Local $oShapes + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oShapes = $oDoc.DrawPage() If Not IsObj($oShapes) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -37040,13 +37037,13 @@ EndFunc ;==>_LOWriter_TableBorderColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableBorderPadding(ByRef $oTable, $iTop = Null, $iBottom = Null, $iLeft = Null, $iRight = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iError = 0 Local $tBD Local $aiBPadding[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -37340,12 +37337,12 @@ EndFunc ;==>_LOWriter_TableBorderWidth ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableBreak(ByRef $oDoc, ByRef $oTable, $iBreakType = Null, $sPageStyle = Null, $iPgNumOffSet = Null) - Local $iError = 0 - Local $avBreaks[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avBreaks[3] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -37434,12 +37431,11 @@ EndFunc ;==>_LOWriter_TableBreak ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableColor(ByRef $oTable, $iBackColor = Null, $bBackTransparent = Null) - Local $iError = 0 - Local $avColor[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avColor[2] If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) @@ -37495,11 +37491,11 @@ EndFunc ;==>_LOWriter_TableColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableColumnDelete(ByRef $oTable, $iColumn, $iCount = 1) - Local $iColumnCount, $iReturn = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iColumnCount, $iReturn = 0 + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) ;can't delete columns if Table not in doc. If Not IsInt($iColumn) Or ($iColumn < 0) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -37535,11 +37531,11 @@ EndFunc ;==>_LOWriter_TableColumnDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableColumnGetCount(ByRef $oTable) - Local $iColumnSize = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iColumnSize = 0 + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) ;Not an Object. If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) ;can't get columns/rows if Table not in doc. $iColumnSize = $oTable.getColumns.getCount() @@ -37581,11 +37577,11 @@ EndFunc ;==>_LOWriter_TableColumnGetCount ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableColumnInsert(ByRef $oTable, $iCount, $iColumn = -1) - Local $iColumnCount - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iColumnCount + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) ;can't insert columns if Table not in doc. If Not IsInt($iCount) Or ($iCount < 1) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -37660,11 +37656,11 @@ EndFunc ;==>_LOWriter_TableColumnInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableCreate(ByRef $oDoc, $iRows = 3, $iColumns = 2, $bSplit = Null, $iBackColor = Null, $sTableName = "") - Local $oTable - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oTable + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iRows) Or ($iRows < 1) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsInt($iColumns) Or ($iColumns < 1) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -37734,12 +37730,12 @@ EndFunc ;==>_LOWriter_TableCreate ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableCreateCursor(ByRef $oDoc, ByRef $oTable, $sCellName = "", $oCursor = Null) - Local $oTableCursor - Local $asCells - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oTableCursor + Local $asCells + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oTable) And Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If IsObj($oTable) And IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -37808,12 +37804,12 @@ EndFunc ;==>_LOWriter_TableCreateCursor ; =============================================================================================================================== Func _LOWriter_TableCursor(ByRef $oCursor, $sGoToCellByName = Null, $bSelect = False, $bMergeRange = Null, $iSplitRangeInto = Null, _ $bSplitRangeHori = False) - Local $vReturn - Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $vReturn + Local $iError = 0 + If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If ((__LOWriter_Internal_CursorGetType($oCursor)) <> $LOW_CURTYPE_TABLE_CURSOR) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -37865,11 +37861,11 @@ EndFunc ;==>_LOWriter_TableCursor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableDelete(ByRef $oDoc, ByRef $oTable) - Local $sTableName - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $sTableName + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $sTableName = $oTable.getName() @@ -37902,11 +37898,11 @@ EndFunc ;==>_LOWriter_TableDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableGetCellNames(ByRef $oTable) - Local $asCellNames - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $asCellNames + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) ;Not an Object. $asCellNames = $oTable.getCellNames() If Not IsArray($asCellNames) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) ;failed to get array of names. @@ -37947,14 +37943,13 @@ EndFunc ;==>_LOWriter_TableGetCellNames ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableGetCellObjByCursor(ByRef $oDoc, ByRef $oTable, ByRef $oCursor) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iCursorType, $iCursorDataType Local $oCell, $oSelection Local $sCellRange - - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -38021,12 +38016,12 @@ EndFunc ;==>_LOWriter_TableGetCellObjByCursor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableGetCellObjByName(ByRef $oTable, $sCellName, $sToCellName = $sCellName) - Local $oCell - Local Const $STR_STRIPALL = 8 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local Const $STR_STRIPALL = 8 + Local $oCell + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sCellName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsString($sToCellName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -38098,11 +38093,11 @@ EndFunc ;==>_LOWriter_TableGetCellObjByName ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableGetCellObjByPosition(ByRef $oTable, $iColumn, $iRow, $iToColumn = $iColumn, $iToRow = $iRow) - Local $oCell - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oCell + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iColumn) Or ($iColumn < 0) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsInt($iRow) Or ($iRow < 0) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -38166,12 +38161,12 @@ EndFunc ;==>_LOWriter_TableGetCellObjByPosition ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableGetData(ByRef $oTable, $iRow = -1, $iColumn = -1) - Local $avTableDataReturn, $avTableData, $avTempArray - Local $iExtended - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $avTableDataReturn, $avTableData, $avTempArray + Local $iExtended + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) ;can't get data if Table not in doc. If Not IsInt($iRow) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -38327,12 +38322,12 @@ EndFunc ;==>_LOWriter_TableGetObjByName ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableInsert(ByRef $oDoc, $oCursor, ByRef $oTable, $bHeading = False) - Local $oText, $oInsertPoint, $oTextCursor - Local $iCursorDataType - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oText, $oInsertPoint, $oTextCursor + Local $iCursorDataType + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) And ($oCursor <> Default) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -38431,12 +38426,12 @@ EndFunc ;==>_LOWriter_TableInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableMargin(ByRef $oTable, $iTopMargin = Null, $iBottomMargin = Null, $iLeftMargin = Null, $iRightMargin = Null) - Local $iError = 0 - Local $aiMargins[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $aiMargins[4] + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) ;These settings don't work unless Table is inserted. @@ -38680,13 +38675,13 @@ EndFunc ;==>_LOWriter_TableProperties ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableRowColor(ByRef $oTable, $iRow, $iBackColor = Null, $bBackTransparent = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iError = 0 Local $oRow Local $avColor[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) ;can't set Row color if Table not in doc. If Not IsInt($iRow) Or ($iRow < 0) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -38746,11 +38741,11 @@ EndFunc ;==>_LOWriter_TableRowColor ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableRowDelete(ByRef $oTable, $iRow, $iCount = 1) - Local $iRowCount, $iReturn = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iRowCount, $iReturn = 0 + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) ;can't delete Rows if Table not in doc. If Not IsInt($iRow) Or ($iRow < 0) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -38786,11 +38781,11 @@ EndFunc ;==>_LOWriter_TableRowDelete ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableRowGetCount(ByRef $oTable) - Local $iRowSize = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iRowSize = 0 + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) ;Not an Object. If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) ;can't get columns/rows if Table not in doc. $iRowSize = $oTable.getRows.getCount() @@ -38831,11 +38826,11 @@ EndFunc ;==>_LOWriter_TableRowGetCount ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableRowInsert(ByRef $oTable, $iCount, $iRow = -1) - Local $iRowCount - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iRowCount + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) ;can't insert Rows if Table not in doc. If Not IsInt($iCount) Or ($iCount < 1) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -38893,13 +38888,13 @@ EndFunc ;==>_LOWriter_TableRowInsert ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableRowProperty(ByRef $oTable, $iRow, $iHeight = Null, $bIsAutoHeight = Null, $bIsSplitAllowed = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oRow Local $iError = 0 Local $avProperties[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) ;Table not already inserted into document. If Not IsInt($iRow) Or ($iRow < 0) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -38964,11 +38959,11 @@ EndFunc ;==>_LOWriter_TableRowProperty ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableSetData(ByRef $oTable, ByRef $avData) - Local $iColumns - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iColumns + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) ;can't set data if Table not in doc. If Not IsArray($avData) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -39005,12 +39000,12 @@ EndFunc ;==>_LOWriter_TableSetData ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TablesGetNames(ByRef $oDoc) - Local $oTable, $oTables - Local $asTableNames[0] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oTable, $oTables + Local $asTableNames[0] + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oTables = $oDoc.TextTables() If Not IsObj($oTables) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -39100,13 +39095,13 @@ EndFunc ;==>_LOWriter_TablesGetNames ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableShadow(ByRef $oTable, $iWidth = Null, $iColor = Null, $bTransparent = Null, $iLocation = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iError = 0 Local $tShdwFrmt Local $avShadow[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -39193,12 +39188,12 @@ EndFunc ;==>_LOWriter_TableShadow ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_TableWidth(ByRef $oTable, $iWidth = Null, $iRelativeWidth = Null) - Local $iError = 0 - Local $avWidthProps[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avWidthProps[3] + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IsTableInDoc($oTable) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) ;These settings don't work unless Table is inserted. @@ -39255,13 +39250,12 @@ EndFunc ;==>_LOWriter_TableWidth ; Example .......: Yes ; =============================================================================================================================== Func _LOWriter_VersionGet($bSimpleVersion = False, $bReturnName = False) - Local $sAccess = "com.sun.star.configuration.ConfigurationAccess", $sVersionName, $sVersion, $sReturn - Local $oSettings, $oConfigProvider - Local $aParamArray[1] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $sAccess = "com.sun.star.configuration.ConfigurationAccess", $sVersionName, $sVersion, $sReturn + Local $oSettings, $oConfigProvider + Local $aParamArray[1] If Not IsBool($bSimpleVersion) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsBool($bReturnName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -39496,12 +39490,12 @@ EndFunc ;==>__LOWriter_ArrayFill ; Example .......: No ; =============================================================================================================================== Func __LOWriter_Border(ByRef $oObj, $bWid, $bSty, $bCol, $iTop, $iBottom, $iLeft, $iRight) - Local $avBorder[4] - Local $tBL2 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $avBorder[4] + Local $tBL2 + If Not __LOWriter_VersionCheck(3.4) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If (($bWid + $bSty + $bCol) <> 1) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) ;If more than one Boolean is true = error @@ -39602,12 +39596,12 @@ EndFunc ;==>__LOWriter_Border ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CharBorder(ByRef $oObj, $bWid, $bSty, $bCol, $iTop, $iBottom, $iLeft, $iRight) - Local $avBorder[4] - Local $tBL2 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $avBorder[4] + Local $tBL2 + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If (($bWid + $bSty + $bCol) <> 1) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) ;If more than one Boolean is true = error @@ -39712,12 +39706,12 @@ EndFunc ;==>__LOWriter_CharBorder ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CharBorderPadding(ByRef $oObj, $iAll, $iTop, $iBottom, $iLeft, $iRight) - Local $iError = 0 - Local $aiBPadding[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $aiBPadding[5] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($iAll, $iTop, $iBottom, $iLeft, $iRight) Then @@ -39810,12 +39804,12 @@ EndFunc ;==>__LOWriter_CharBorderPadding ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CharEffect(ByRef $oObj, $iRelief, $iCase, $bHidden, $bOutline, $bShadow) - Local $iError = 0 - Local $avEffect[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avEffect[5] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($iRelief, $iCase, $bHidden, $bOutline, $bShadow) Then @@ -39915,12 +39909,12 @@ EndFunc ;==>__LOWriter_CharEffect ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CharFont(ByRef $oObj, $sFontName, $nFontSize, $iPosture, $iWeight) - Local $iError = 0 - Local $avFont[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avFont[4] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 5, 0) If __LOWriter_VarsAreNull($sFontName, $nFontSize, $iPosture, $iWeight) Then @@ -40021,12 +40015,12 @@ EndFunc ;==>__LOWriter_CharFont ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CharFontColor(ByRef $oObj, $iFontColor, $iTransparency, $iHighlight) - Local $iError = 0 - Local $avColor[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avColor[2] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($iFontColor, $iTransparency, $iHighlight) Then @@ -40150,12 +40144,12 @@ EndFunc ;==>__LOWriter_CharFontColor ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CharOverLine(ByRef $oObj, $bWordOnly, $iOverLineStyle, $bOLHasColor, $iOLColor) - Local $iError = 0 - Local $avOverLine[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avOverLine[4] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($bWordOnly, $iOverLineStyle, $bOLHasColor, $iOLColor) Then @@ -40242,12 +40236,12 @@ EndFunc ;==>__LOWriter_CharOverLine ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CharPosition(ByRef $oObj, $bAutoSuper, $iSuperScript, $bAutoSub, $iSubScript, $iRelativeSize) - Local $iError = 0 - Local $avPosition[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avPosition[5] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($bAutoSuper, $iSuperScript, $bAutoSub, $iSubScript, $iRelativeSize) Then @@ -40336,12 +40330,12 @@ EndFunc ;==>__LOWriter_CharPosition ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CharRotateScale(ByRef $oObj, $iRotation, $iScaleWidth, $bRotateFitLine = Null) - Local $iError = 0 - Local $avRotation[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avRotation[2] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($iRotation, $iScaleWidth, $bRotateFitLine) Then @@ -40442,13 +40436,13 @@ EndFunc ;==>__LOWriter_CharRotateScale ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CharShadow(ByRef $oObj, $iWidth, $iColor, $bTransparent, $iLocation) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iError = 0 Local $tShdwFrmt Local $avShadow[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) $tShdwFrmt = $oObj.CharShadowFormat() If Not IsObj($tShdwFrmt) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -40537,12 +40531,12 @@ EndFunc ;==>__LOWriter_CharShadow ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CharSpacing(ByRef $oObj, $bAutoKerning, $nKerning) - Local $iError = 0 - Local $avKerning[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avKerning[2] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($bAutoKerning, $nKerning) Then @@ -40615,12 +40609,12 @@ EndFunc ;==>__LOWriter_CharSpacing ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CharStrikeOut(ByRef $oObj, $bWordOnly, $bStrikeOut, $iStrikeLineStyle) - Local $iError = 0 - Local $avStrikeOut[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avStrikeOut[3] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($bWordOnly, $bStrikeOut, $iStrikeLineStyle) Then @@ -40777,12 +40771,12 @@ EndFunc ;==>__LOWriter_CharStyleNameToggle ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CharUnderLine(ByRef $oObj, $bWordOnly, $iUnderLineStyle, $bULHasColor, $iULColor) - Local $iError = 0 - Local $avUnderLine[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avUnderLine[4] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($bWordOnly, $iUnderLineStyle, $bULHasColor, $iULColor) Then @@ -40839,11 +40833,11 @@ EndFunc ;==>__LOWriter_CharUnderLine ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CreateStruct($sStructName) - Local $oServiceManager, $tStruct - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oServiceManager, $tStruct + If Not IsString($sStructName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $oServiceManager = ObjCreate("com.sun.star.ServiceManager") If Not IsObj($oServiceManager) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -40888,12 +40882,12 @@ EndFunc ;==>__LOWriter_CreateStruct ; Example .......: No ; =============================================================================================================================== Func __LOWriter_CursorGetText(ByRef $oDoc, ByRef $oCursor) - Local $oText, $oReturnedObj - Local $iCursorDataType - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oText, $oReturnedObj + Local $iCursorDataType + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -41028,6 +41022,9 @@ EndFunc ;==>__LOWriter_DirFrmtCheck ; Example .......: No ; =============================================================================================================================== Func __LOWriter_FieldCountType($vInput) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $asFieldTypes[7] $asFieldTypes[$LOW_FIELD_COUNT_TYPE_CHARACTERS] = "com.sun.star.text.TextField.CharacterCount" $asFieldTypes[$LOW_FIELD_COUNT_TYPE_IMAGES] = "com.sun.star.text.TextField.GraphicObjectCount" @@ -41038,8 +41035,6 @@ Func __LOWriter_FieldCountType($vInput) $asFieldTypes[$LOW_FIELD_COUNT_TYPE_WORDS] = "com.sun.star.text.TextField.WordCount" If IsObj($vInput) Then - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler For $i = 0 To UBound($asFieldTypes) - 1 @@ -41104,13 +41099,13 @@ EndFunc ;==>__LOWriter_FieldCountType ; Example .......: No ; =============================================================================================================================== Func __LOWriter_FieldsGetList(ByRef $oDoc, $bSupportedServices, $bFieldType, $bFieldTypeNum, ByRef $avFieldTypes) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oTextFields, $oTextField Local $iCount = 0, $iColumns = 4, $iFieldTypeCol = 2, $iFieldTypeNumCol = 3 Local $avTextFields[50][4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) ;Skip 2 to match other Funcs. If Not IsBool($bSupportedServices) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -41384,12 +41379,12 @@ EndFunc ;==>__LOWriter_FilterNameGet ; Example .......: No ; =============================================================================================================================== Func __LOWriter_FindFormatAddSetting(ByRef $atArray, $tSetting) - Local $bFound = False - Local $sSettingName - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $bFound = False + Local $sSettingName + If Not IsArray($atArray) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($tSetting) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) $sSettingName = $tSetting.Name() @@ -41435,11 +41430,11 @@ EndFunc ;==>__LOWriter_FindFormatAddSetting ; Example .......: No ; =============================================================================================================================== Func __LOWriter_FindFormatDeleteSetting(ByRef $atArray, $sSettingName) - Local $iCount = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iCount = 0 + If Not IsArray($atArray) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sSettingName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -41530,12 +41525,12 @@ EndFunc ;==>__LOWriter_FindFormatRetrieveSetting ; Example .......: No ; =============================================================================================================================== Func __LOWriter_FooterBorder(ByRef $oObj, $bWid, $bSty, $bCol, $iTop, $iBottom, $iLeft, $iRight) - Local $aiBorder[4] - Local $tBL2 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $aiBorder[4] + Local $tBL2 + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If (($bWid + $bSty + $bCol) <> 1) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) ;If more than one Boolean is true = error @@ -41635,12 +41630,12 @@ EndFunc ;==>__LOWriter_FooterBorder ; Example .......: No ; =============================================================================================================================== Func __LOWriter_FrameRelativeSize(ByRef $oDoc, ByRef $oFrameObj, $bRelativeWidth = False, $bRelativeHeight = False) - Local $iPageWidth, $iPageHeight, $iFrameWidth, $iFrameHeight - Local $oPageStyle - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iPageWidth, $iPageHeight, $iFrameWidth, $iFrameHeight + Local $oPageStyle + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oFrameObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bRelativeWidth) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -41702,11 +41697,11 @@ EndFunc ;==>__LOWriter_FrameRelativeSize ; Example .......: No ; =============================================================================================================================== Func __LOWriter_GetPrinterSetting(ByRef $oDoc, $sSetting) - Local $aoPrinterProperties - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $aoPrinterProperties + $aoPrinterProperties = $oDoc.getPrinter() If Not IsArray($aoPrinterProperties) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -41751,13 +41746,13 @@ EndFunc ;==>__LOWriter_GetPrinterSetting ; Example .......: No ; =============================================================================================================================== Func __LOWriter_GradientNameInsert(ByRef $oDoc, $tGradient, $sGradientName = "Gradient ") + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tNewGradient Local $oGradTable Local $iCount = 1 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($tGradient) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsString($sGradientName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -42128,12 +42123,12 @@ EndFunc ;==>__LOWriter_GradientPresets ; Example .......: No ; =============================================================================================================================== Func __LOWriter_HeaderBorder(ByRef $oObj, $bWid, $bSty, $bCol, $iTop, $iBottom, $iLeft, $iRight) - Local $tBL2 - Local $aiBorder[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $tBL2 + Local $aiBorder[4] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If (($bWid + $bSty + $bCol) <> 1) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) ;If more than one Boolean is true = error @@ -42239,14 +42234,14 @@ EndFunc ;==>__LOWriter_HeaderBorder ; Example .......: No ; =============================================================================================================================== Func __LOWriter_Internal_CursorGetDataType(ByRef $oDoc, ByRef $oCursor, $bReturnObject = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oEndNotes, $oFootNotes, $oFootEndNote, $oReturnObject Local $iLWFootEndNote = 0 Local $bFound = False Local $sNoteRefID - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsBool($bReturnObject) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -42531,11 +42526,11 @@ EndFunc ;==>__LOWriter_IsCellRange ; Example .......: No ; =============================================================================================================================== Func __LOWriter_IsTableInDoc(ByRef $oTable) - Local $aTableNames - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $aTableNames + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $aTableNames = $oTable.getCellNames() If Not IsArray($aTableNames) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) @@ -42627,15 +42622,15 @@ EndFunc ;==>__LOWriter_NumIsBetween ; Example .......: No ; =============================================================================================================================== Func __LOWriter_NumStyleCreateScript(ByRef $oDoc) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $sNumStyleScript = "Function ReplaceByIndex(oNumRules As Object, iIndex%, vSettings As Variant)" & @CRLF & _ "oNumRules.replaceByIndex(iIndex,vSettings)" & @CRLF & _ "ReplaceByIndex = oNumRules" & @CRLF & _ "End Function" Local $oStandardLibrary, $oScript - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) ;Retrieving the BasicLibrary.Standard Object fails when using a newly opened document, I found a workaround by updating the @@ -42679,11 +42674,11 @@ EndFunc ;==>__LOWriter_NumStyleCreateScript ; Example .......: No ; =============================================================================================================================== Func __LOWriter_NumStyleDeleteScript(ByRef $oDoc) - Local $oStandardLibrary - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $oStandardLibrary + If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) ;Retrieving the BasicLibrary.Standard Object fails when using a newly opened document, I found a workaround by updating the @@ -42729,15 +42724,15 @@ EndFunc ;==>__LOWriter_NumStyleDeleteScript ; Example .......: No ; =============================================================================================================================== Func __LOWriter_NumStyleInitiateDocument() + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local Const $iMacroExecMode_ALWAYS_EXECUTE_NO_WARN = 4, $iURLFrameCreate = 8 ;frame will be created if not found Local $iError = 0 Local $oNumStyleDoc, $oServiceManager, $oDesktop Local $atProperties[3] Local $vProperty - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - $oServiceManager = ObjCreate("com.sun.star.ServiceManager") If Not IsObj($oServiceManager) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) $oDesktop = $oServiceManager.createInstance("com.sun.star.frame.Desktop") @@ -42865,6 +42860,9 @@ EndFunc ;==>__LOWriter_NumStyleListFormat ; Example .......: No ; =============================================================================================================================== Func __LOWriter_NumStyleModify(ByRef $oDoc, ByRef $oNumRules, $iLevel, $avSettings) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $atNumLevel Local $iGetLevel, $iParentNumber, $iListFormatIndex, $iEndLevel Local $oNumStyleDoc, $oScript @@ -42873,9 +42871,6 @@ Func __LOWriter_NumStyleModify(ByRef $oDoc, ByRef $oNumRules, $iLevel, $avSettin Local $vSettingValue Local $bNumDocOpen = False - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($oNumRules) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not __LOWriter_IntIsBetween($iLevel, -1, 9) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -42994,12 +42989,12 @@ EndFunc ;==>__LOWriter_NumStyleModify ; Example .......: No ; =============================================================================================================================== Func __LOWriter_NumStyleRetrieve(ByRef $oNumRules, $iLevel, $sSettingName) - Local $atNumLevel - Local $iGetLevel = $iLevel - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $atNumLevel + Local $iGetLevel = $iLevel + If Not IsObj($oNumRules) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not __LOWriter_IntIsBetween($iLevel, 0, 9) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If Not IsString($sSettingName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -43128,12 +43123,12 @@ EndFunc ;==>__LOWriter_PageStyleNameToggle ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParAlignment(ByRef $oObj, $iHorAlign, $iVertAlign, $iLastLineAlign, $bExpandSingleWord, $bSnapToGrid, $iTxtDirection) - Local $iError = 0 - Local $avAlignment[6] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avAlignment[6] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($iHorAlign, $iVertAlign, $iLastLineAlign, $bExpandSingleWord, $bSnapToGrid, $iTxtDirection) Then @@ -43234,12 +43229,12 @@ EndFunc ;==>__LOWriter_ParAlignment ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParBackColor(ByRef $oObj, $iBackColor, $bBackTransparent) - Local $iError = 0 - Local $avColor[2] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avColor[2] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($iBackColor, $bBackTransparent) Then @@ -43307,12 +43302,12 @@ EndFunc ;==>__LOWriter_ParBackColor ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParBorderPadding(ByRef $oObj, $iAll, $iTop, $iBottom, $iLeft, $iRight) - Local $iError = 0 - Local $aiBPadding[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $aiBPadding[5] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($iAll, $iTop, $iBottom, $iLeft, $iRight) Then @@ -43403,13 +43398,13 @@ EndFunc ;==>__LOWriter_ParBorderPadding ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParDropCaps(ByRef $oObj, $iNumChar, $iLines, $iSpcTxt, $bWholeWord, $sCharStyle) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iError = 0 Local $tDCFrmt Local $avDropCaps[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 5, 0) $tDCFrmt = $oObj.DropCapFormat() If Not IsObj($tDCFrmt) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -43481,11 +43476,11 @@ EndFunc ;==>__LOWriter_ParDropCaps ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParHasTabStop(ByRef $oObj, $iTabStop) - Local $atTabStops - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $atTabStops + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iTabStop) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -43551,12 +43546,12 @@ EndFunc ;==>__LOWriter_ParHasTabStop ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParHyphenation(ByRef $oObj, $bAutoHyphen, $bHyphenNoCaps, $iMaxHyphens, $iMinLeadingChar, $iMinTrailingChar) - Local $iError = 0 - Local $avHyphenation[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avHyphenation[4] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($bAutoHyphen, $bHyphenNoCaps, $iMaxHyphens, $iMinLeadingChar, $iMinTrailingChar) Then @@ -43649,12 +43644,12 @@ EndFunc ;==>__LOWriter_ParHyphenation ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParIndent(ByRef $oObj, $iBeforeTxt, $iAfterTxt, $iFirstLine, $bAutoFirstLine) - Local $iError = 0 - Local $avIndent[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avIndent[4] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($iBeforeTxt, $iAfterTxt, $iFirstLine, $bAutoFirstLine) Then @@ -43742,12 +43737,12 @@ EndFunc ;==>__LOWriter_ParIndent ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParOutLineAndList(ByRef $oObj, $iOutline, $sNumStyle, $bParLineCount, $iLineCountVal) - Local $iError = 0 - Local $avOutlineNList[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avOutlineNList[4] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 5, 0) If __LOWriter_VarsAreNull($iOutline, $sNumStyle, $bParLineCount, $iLineCountVal) Then @@ -43839,12 +43834,12 @@ EndFunc ;==>__LOWriter_ParOutLineAndList ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParPageBreak(ByRef $oObj, $iBreakType, $iPgNumOffSet, $sPageStyle) - Local $iError = 0 - Local $avPageBreak[3] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avPageBreak[3] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 5, 0) If __LOWriter_VarsAreNull($iBreakType, $iPgNumOffSet, $sPageStyle) Then @@ -43941,13 +43936,13 @@ EndFunc ;==>__LOWriter_ParPageBreak ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParShadow(ByRef $oObj, $iWidth, $iColor, $bTransparent, $iLocation) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iError = 0 Local $tShdwFrmt Local $avShadow[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) $tShdwFrmt = $oObj.ParaShadowFormat() If Not IsObj($tShdwFrmt) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -44065,13 +44060,13 @@ EndFunc ;==>__LOWriter_ParShadow ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParSpace(ByRef $oObj, $iAbovePar, $iBelowPar, $bAddSpace, $iLineSpcMode, $iLineSpcHeight, $bPageLineSpc) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tLine Local $iError = 0 Local $avSpacing[5] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($iAbovePar, $iBelowPar, $bAddSpace, $iLineSpcMode, $iLineSpcHeight, $bPageLineSpc) Then @@ -44244,6 +44239,9 @@ EndFunc ;==>__LOWriter_ParStyleNameToggle ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParTabStopCreate(ByRef $oObj, $iPosition, $iAlignment, $iFillChar, $iDecChar) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $aiTabList Local $bFound = False Local $iNewPosition = -1 @@ -44251,9 +44249,6 @@ Func __LOWriter_ParTabStopCreate(ByRef $oObj, $iPosition, $iAlignment, $iFillCha Local $tFoundTabStop, $tTabStruct Local $iError = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 5, 0) $atTabStops = $oObj.ParaTabStops() @@ -44346,15 +44341,15 @@ EndFunc ;==>__LOWriter_ParTabStopCreate ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParTabStopDelete(ByRef $oObj, ByRef $oDoc, $iTabStop) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $oDefaults Local $tTabStruct Local $atOldTabStops[0], $atNewTabStops[0] Local $bDeleted = False Local $iCount = 0 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 6, 0) If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 7, 0) @@ -44410,12 +44405,12 @@ EndFunc ;==>__LOWriter_ParTabStopDelete ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParTabStopList(ByRef $oObj) - Local $atTabStops[0] - Local $aiTabList[0] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $atTabStops[0] + Local $aiTabList[0] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) $atTabStops = $oObj.ParaTabStops() If Not IsArray($atTabStops) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -44503,6 +44498,9 @@ EndFunc ;==>__LOWriter_ParTabStopList ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParTabStopMod(ByRef $oObj, $iTabStop, $iPosition, $iFillChar, $iAlignment, $iDecChar) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $atTabStops, $atNewTabStops Local $iError = 0, $iNewPosition = 0 Local $tTabStruct @@ -44510,9 +44508,6 @@ Func __LOWriter_ParTabStopMod(ByRef $oObj, $iTabStop, $iPosition, $iFillChar, $i Local $aiTabList Local $aiTabSettings[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 5, 0) $atTabStops = $oObj.ParaTabStops() If Not IsArray($atTabStops) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -44626,12 +44621,12 @@ EndFunc ;==>__LOWriter_ParTabStopMod ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ParTxtFlowOpt(ByRef $oObj, $bParSplit, $bKeepTogether, $iParOrphans, $iParWidows) - Local $iError = 0 - Local $avTxtFlowOpt[4] - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $iError = 0 + Local $avTxtFlowOpt[4] + If Not IsObj($oObj) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) If __LOWriter_VarsAreNull($bParSplit, $bKeepTogether, $iParOrphans, $iParWidows) Then @@ -44734,11 +44729,11 @@ EndFunc ;==>__LOWriter_RegExpConvert ; Example .......: No ; =============================================================================================================================== Func __LOWriter_SetPropertyValue($sName, $vValue) - Local $tProperties - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $tProperties + If Not IsString($sName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $tProperties = __LOWriter_CreateStruct("com.sun.star.beans.PropertyValue") If @error Or Not IsObj($tProperties) Then Return SetError($__LOW_STATUS_INIT_ERROR, 1, 0) @@ -44801,12 +44796,12 @@ EndFunc ;==>__LOWriter_SetPropertyValue ; Example .......: No ; =============================================================================================================================== Func __LOWriter_TableBorder(ByRef $oTable, $bWid, $bSty, $bCol, $iTop, $iBottom, $iLeft, $iRight, $iVert, $iHori) - Local $avBorder[6] - Local $tBL2, $tTB2 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $avBorder[6] + Local $tBL2, $tTB2 + If Not __LOWriter_VersionCheck(3.6) Then Return SetError($__LOW_STATUS_VER_ERROR, 1, 0) If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If (($bWid + $bSty + $bCol) <> 1) Then Return SetError($__LOW_STATUS_PROCESSING_ERROR, 1, 0) @@ -44990,6 +44985,9 @@ EndFunc ;==>__LOWriter_TableBorder ; Example .......: No ; =============================================================================================================================== Func __LOWriter_TableCursorMove(ByRef $oCursor, $iMove, $iCount, $bSelect = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iCounted = 0 Local $bMoved = False Local $asMoves[6] @@ -45001,9 +44999,6 @@ Func __LOWriter_TableCursorMove(ByRef $oCursor, $iMove, $iCount, $bSelect = Fals $asMoves[$LOW_TABLECUR_GOTO_START] = "gotoStart" $asMoves[$LOW_TABLECUR_GOTO_END] = "gotoEnd" - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iMove) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($iMove >= UBound($asMoves)) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -45050,11 +45045,11 @@ EndFunc ;==>__LOWriter_TableCursorMove ; Example .......: No ; =============================================================================================================================== Func __LOWriter_TableHasCellName(ByRef $oTable, ByRef $sCellName) - Local $aCellNames - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) #forceref $oCOM_ErrorHandler + Local $aCellNames + If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsString($sCellName) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -45163,11 +45158,12 @@ EndFunc ;==>__LOWriter_TableHasRowRange ; Example .......: No ; =============================================================================================================================== Func __LOWriter_TableRowSplitToggle(ByRef $oTable, $bSplitRows = Null) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iRows Local $bSplitRowTest - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler If Not IsObj($oTable) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) $iRows = $oTable.getRows.getCount() @@ -45295,6 +45291,9 @@ EndFunc ;==>__LOWriter_TableRowSplitToggle ; Example .......: No ; =============================================================================================================================== Func __LOWriter_TextCursorMove(ByRef $oCursor, $iMove, $iCount, $bSelect = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iCounted = 0 Local $bMoved = False Local $asMoves[18] @@ -45318,9 +45317,6 @@ Func __LOWriter_TextCursorMove(ByRef $oCursor, $iMove, $iCount, $bSelect = False $asMoves[$LOW_TEXTCUR_GOTO_END_OF_PARAGRAPH] = "gotoEndOfParagraph" $asMoves[$LOW_TEXTCUR_GOTO_START_OF_PARAGRAPH] = "gotoStartOfParagraph" - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iMove) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($iMove >= UBound($asMoves)) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0) @@ -45428,13 +45424,13 @@ EndFunc ;==>__LOWriter_TransparencyGradientConvert ; Example .......: No ; =============================================================================================================================== Func __LOWriter_TransparencyGradientNameInsert(ByRef $oDoc, $tTGradient) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $tNewTGradient Local $oTGradTable Local $iCount = 1 - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oDoc) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsObj($tTGradient) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) @@ -45779,6 +45775,9 @@ EndFunc ;==>__LOWriter_VersionCheck ; Example .......: No ; =============================================================================================================================== Func __LOWriter_ViewCursorMove(ByRef $oCursor, $iMove, $iCount, $bSelect = False) + Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) + #forceref $oCOM_ErrorHandler + Local $iCounted = 0 Local $bMoved = False Local $asMoves[17] @@ -45801,9 +45800,6 @@ Func __LOWriter_ViewCursorMove(ByRef $oCursor, $iMove, $iCount, $bSelect = False $asMoves[$LOW_VIEWCUR_GOTO_START] = "gotoStart" $asMoves[$LOW_VIEWCUR_GOTO_END] = "gotoEnd" - Local $oCOM_ErrorHandler = ObjEvent("AutoIt.Error", __LOWriter_InternalComErrorHandler) - #forceref $oCOM_ErrorHandler - If Not IsObj($oCursor) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 1, 0) If Not IsInt($iMove) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 2, 0) If ($iMove >= UBound($asMoves)) Then Return SetError($__LOW_STATUS_INPUT_ERROR, 3, 0)