diff options
author | Behrend Cornelius <bc@openoffice.org> | 2002-07-08 12:44:13 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2002-07-08 12:44:13 +0000 |
commit | a3a80aa49890b8aa1db646690793afde52702de9 (patch) | |
tree | 06cdb3d79f89cac4e8df1d154f13737ed7ce3fc4 /wizards/source/importwizard/FilesModul.xba | |
parent | b31b30ea6e8d541a8791c65a61b6c915438bd694 (diff) |
#100058# Log information added
Diffstat (limited to 'wizards/source/importwizard/FilesModul.xba')
-rw-r--r-- | wizards/source/importwizard/FilesModul.xba | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/wizards/source/importwizard/FilesModul.xba b/wizards/source/importwizard/FilesModul.xba index 41d50ae2df3f..69841e7fff0b 100644 --- a/wizards/source/importwizard/FilesModul.xba +++ b/wizards/source/importwizard/FilesModul.xba @@ -95,6 +95,7 @@ Dim bDoSave as Boolean Dim sCurFileExists as String Dim oModel as Object Dim MaxFileIndex as Integer +Dim FileCount as Integer Dim sOldExtension as String bConversionIsRunnig = True AbsTemplateFound = 0 @@ -119,6 +120,7 @@ Dim sOldExtension as String OpenProperties(0).Value = True OpenProperties(1).Name = "AsTemplate" MaxFileIndex = Ubound(FilesList(),1) + FileCount = 0 For i = 0 To MaxFileIndex If bCancelTask Or RetValue = 0 Then bConversionIsRunnig = False @@ -184,12 +186,14 @@ Dim sOldExtension as String FileProperties(0).Name = "FilterName" FileProperties(0).Value = CurFilterName oDocument.StoreAsUrl(TargetFile,FileProperties()) + FileCount = FileCount + 1 oDocument.Dispose() On Local Error Goto 0 End If End If Next i End If + AddLogStatistics(FileCount) ImportDialog.cmdCancel.Label = sCloseButton ImportDialog.cmdGoOn.Label = sReady ImportDialog.cmdGoOn.Enabled = True @@ -302,6 +306,7 @@ Dim bLogExists as Boolean oLogDocument = StarDesktop.LoadComponentFromURL("private:factory/swriter", "_blank", 4, NoArgs())' HiddenProperties()) ' HiddenProperties()) oLogCursor = oLogDocument.Text.CreateTextCursor oLogTable = oLogDocument.CreateInstance("com.sun.star.text.TextTable") + oLogTable.RepeatHeadline = true oLogCursor.Text.InsertTextContent(oLogCursor, oLogTable, True) oLogCursor = oLogTable.GetCellbyPosition(0,0).createTextCursor oLogCursor.SetString(sSourceDocuments) @@ -352,4 +357,25 @@ Dim i as Integer Next i oLogDocument.Store() End If +End Sub + + +Sub AddLogStatistics(FileCount as Integer) +Dim oCell as Object +Dim oLogCursor as Object +Dim MaxRowIndex as Integer +Dim oTableCursor as Object + If ImportDialog.chkLogfile.State = 1 Then + MaxRowIndex = oLogTable.Rows.Count + sLogSummary = ReplaceString(sLogSummary, FileCount, "<COUNT>") + oLogTable.Rows.InsertByIndex(MaxRowIndex, 1) + oCell = oLogTable.GetCellbyPosition(0, MaxRowIndex) + oLogCursor = oCell.createTextCursor() + oCell.InsertString(oLogCursor, sLogSummary,False) + oTableCursor = oLogTable.createCursorByCellName("A1") + oTableCursor.goDown(MaxRowIndex, false) + oTableCursor.goRight(1, True) + oTableCursor.mergeRange() + oLogDocument.Store() + End If End Sub</script:module>
\ No newline at end of file |