From a3a80aa49890b8aa1db646690793afde52702de9 Mon Sep 17 00:00:00 2001 From: Behrend Cornelius Date: Mon, 8 Jul 2002 12:44:13 +0000 Subject: #100058# Log information added --- wizards/source/importwizard/FilesModul.xba | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'wizards/source/importwizard/FilesModul.xba') 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 \ No newline at end of file -- cgit