[Libreoffice-commits] .: wizards/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 4 04:04:57 PDT 2012


 wizards/source/importwizard/DialogModul.xba |   48 -------------------------
 wizards/source/importwizard/FilesModul.xba  |   53 +---------------------------
 2 files changed, 2 insertions(+), 99 deletions(-)

New commits:
commit 39d440ed92457de8b2b03d9a39bc3ce872caf3ba
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 4 12:04:17 2012 +0100

    drop rather useless filtertrace stuff from wizards
    
    Change-Id: I6df855031f1941590472bf8901625fe8b2c22926

diff --git a/wizards/source/importwizard/DialogModul.xba b/wizards/source/importwizard/DialogModul.xba
index 379e20d..70f9a6b 100644
--- a/wizards/source/importwizard/DialogModul.xba
+++ b/wizards/source/importwizard/DialogModul.xba
@@ -25,7 +25,6 @@ Public Const SBFIRSTAPPLCHECKED = 0
 Public Const SBSECONDAPPLCHECKED = 1
 Public Const SBTHIRDAPPLCHECKED = 2
 Public Const SBFOURTHAPPLCHECKED = 3
-Public bFilterTracingAvailable as Boolean
 Public WizardMode as String
 Public Const SBMICROSOFTMODE = "MS"
 Public Const SBXMLMODE = "SO"
@@ -49,10 +48,6 @@ Public sValueName(SBMAXAPPLCOUNT-1) as String
 Public sCRLF as String
 Public MSFilterName(5,4) as String
 Public XMLFilterName(7,3) as String 'Number of different formats
-Public FilterTracingLogPath(2) as String
-Public bMSApplFilterTracingAvailable(2) as String
-Public bTakeOverTargetName(2) as Boolean
-Public bTakeOverPathName(2) as Boolean
 
 ' e.g.:
 ' XMLFilterName(x,0) = "sdw" 						' in documents we take the extensions; in SO-templates the appropriate Filtername
@@ -272,7 +267,6 @@ Dim Index as Integer
 Dim sAddText as String
 	For i = 0 To ApplCount -1
 		Index = Applications(i,SBAPPLKEY)
-		GetFilterTracingLogPath(i, Index)
 		If 	Applications(i,SBTEMPLCONVERT) Then
 			' Templates are to be converted
 			sAddText = ""
@@ -347,48 +341,6 @@ Sub FillStep_Progress()
 End Sub
 
 
-Sub GetFilterTracingLogPath(i as Integer, Index as Integer)
-Dim aNodePath(0) as new com.sun.star.beans.PropertyValue
-Dim oMasterKey
-Dim oImportKey	
-Dim oWordKey
-Dim oExcelkey
-Dim oPowerpointKey
-Dim oFilterService
-	aNodePath(0).Name = "nodepath"
-	aNodePath(0).Value = "org.openoffice.Office.Tracing"
-	oFilterService = createUnoService("com.sun.star.util.FilterTracer")
-	bFilterTracingAvailable = Not IsNull(oFilterService)
-	If bFilterTracingAvailable Then
-		oMasterkey = GetRegistryKeyContent("org.openoffice.Office.Tracing/")
-		If oMasterKey.hasbyName("Import") Then
-			oImportKey = GetRegistryKeyContent("org.openoffice.Office.Tracing/Import")
-			bMSApplFilterTracingAvailable(i) = CheckMSImportAvailability(oImportkey, MSFiltername(Index, 4), FilterTracingLogPath(i), bTakeOverTargetName(i), bTakeOverPathName(i))
-		End If
-	End If
-End Sub
-
-
-Function CheckMSImportAvailability(oImportkey, MSApplName as String, MSLogPath as String, bTakeOverTargetname as String, bTakeOverpathName as String) as Boolean
-Dim bApplIsAvailable as Boolean
-Dim oApplKey
-Dim LocApplName as String
-Dim LocApplPath as String
-	bApplIsAvailable = oImportKey.hasbyName(MSApplName)
-	If bApplIsAvailable Then
-		oApplKey = oImportKey.getByName(MSApplName)
-		bApplIsAvailable = oApplKey.On
-		LocApplName = oApplKey.Name
-		LocApplPath = oApplKey.Path
-		bTakeOverTargetName = (LocApplName = "")
-		bTakeOverPathName = (LocApplPath = "")		
-		MSLogPath = LocApplPath & "/" & LocApplName & ".log"
-	End If
-	CheckMSImportAvailability() = bApplIsAvailable
-End Function
-
-
-
 Sub	SetupMSConfiguration()
 	iApplSection = 0
 	Wizardmode = SBMICROSOFTMODE
diff --git a/wizards/source/importwizard/FilesModul.xba b/wizards/source/importwizard/FilesModul.xba
index 17b0f60..710f46b 100644
--- a/wizards/source/importwizard/FilesModul.xba
+++ b/wizards/source/importwizard/FilesModul.xba
@@ -33,7 +33,6 @@ Public FileCount as Integer
 Public XMLTemplateCount as Integer
 Public PathCollection(7,3) as String
 Public bIsFirstLogTable as Boolean
-Public bFilterTracerIsinsideTable as Boolean
 
 
 Function ReadCollectionPaths(FilesList() as String, sFilterName() as String)
@@ -415,7 +414,7 @@ Dim sPrevMimeTypeorExtension as String
 							FileCount = FileCount + 1
 						End If
 						oDocument.Dispose()
-						InsertTargetUrlToLogDocument(sTargetUrl, sComment, ApplIndex)
+						InsertTargetUrlToLogDocument(sTargetUrl, sComment)
 					Else
 						sCurcouldnotopenDocument = ReplaceString(scouldnotopenDocument, ConvertFromUrl(sSourceUrl), "<1>")
 						sComment = ConcatComment(sComment, sCurCouldnotopenDocument)
@@ -537,7 +536,6 @@ Dim oCell
 	If Not bLogExists Then
         Exit Sub
     End If 
-	bFilterTracerIsinsideTable = False
 	FilterIndex = GetIndexForPartStringinMultiArray(sFilterName(), CurFileContent, 0)
 	sDocumentType = sFiltername(FilterIndex,3)
 	oLogCursor = oLogDocument.Text.createTextCursor()
@@ -552,36 +550,15 @@ Dim oCell
 	oLogCursor.HyperLinkTarget = ""
 	oLogCursor.ParaStyleName = "Heading 1"
 	oLogCursor.setString(sDocumentType)
-	If WizardMode = SBMICROSOFTMODE Then
-		If bFilterTracingAvailable Then
-			If bMSApplFilterTracingAvailable(ApplIndex) Then
-				Dim CurFilterTracingPath as String
-				CurFilterTracingPath = FilterTracingLogPath(ApplIndex)
-				bFilterTracerIsinsideTable = (bTakeOverTargetName(ApplIndex) Or bTakeOverPathName(ApplIndex))
-				If Not bFilterTracerIsinsideTable Then
-					oLogCursor.CollapseToEnd()
-					oLogDocument.Text.insertControlCharacter(oLogCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
-					InsertCommandButtonatViewCursor(oLogDocument, oLogCursor, CurFilterTracingPath)
-				End If
-			End If
-		End If
-	End If
 	oLogCursor.CollapsetoEnd()
 	oLogDocument.Text.insertControlCharacter(oLogCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
 	oLogTable =  oLogDocument.CreateInstance("com.sun.star.text.TextTable")
 	oLogTable.RepeatHeadline = true
-	If bFilterTracerIsinsideTable Then
-		oLogTable.initialize(2,3)
-	End If
 	oLogCursor.Text.InsertTextContent(oLogCursor, oLogTable, True)
 	oTextCursor = oLogTable.GetCellbyPosition(0,0).createTextCursor()
 	oTextCursor.SetString(sSourceDocuments)	
 	oTextCursor = oLogTable.GetCellbyPosition(1,0).createTextCursor()
 	oTextCursor.SetString(sTargetDocuments)
-	If bFilterTracerIsinsideTable Then
-		oTextCursor = oLogTable.GetCellbyPosition(2,0).createTextCursor()
-		oTextCursor.SetString("FilterTracer")
-	End If
 	bInsertRow = False
 End Sub
 
@@ -648,27 +625,7 @@ Dim bLogIsThere as Boolean
 End Sub
 
 
-Function GetFilterTracingLogPath(sTargetUrl as String, ApplIndex) as String				
-Dim TargetFileName as String
-Dim sTargetFolder as String
-Dim CurFilterTracingPath as String
-Dim CurFilterTracingname as String
-Dim CurFilterFolder as String
-		CurFilterTracingPath = FilterTracingLogPath(ApplIndex)
-		If bTakeOverTargetName(ApplIndex) Then			
-			TargetFilename = GetFileNameWithoutextension(sTargetUrl, "/")
-			CurFilterFolder = DirectoryNameoutofPath(FilterTracingLogPath(ApplIndex), "/")
-			CurFilterTracingpath = CurFilterFolder & "/" & TargetFilename & ".log"
-		End If
-		If bTakeOverPathName(ApplIndex) Then  'Replace the Folder in the FilterTracerpath by the Folder of the targetUrl
-			sTargetFolder = DirectoryNameoutofPath(sTargetUrl,"/")
-			CurFilterTracingPath = sTargetFolder & "/" & FileNameoutofPath(CurFilterTracingPath, "/")
-		End If
-		GetFilterTracingLogPath() = CurFilterTracingPath
-End Function
-
-
-Sub InsertTargetUrlToLogDocument(sTargetUrl as String, sComment as String, ApplIndex as Integer)
+Sub InsertTargetUrlToLogDocument(sTargetUrl as String, sComment as String)
 Dim oCell
 Dim oTextCursor
 Dim CurFilterTracingpath as String
@@ -677,12 +634,6 @@ Dim CurFilterTracingpath as String
 			oCell = oLogTable.GetCellbyPosition(1,oLogTable.Rows.Count-1)
 			InsertCommentToLogCell(sComment, oCell)
 			InsertHyperLinkToLogCell(sTargetUrl, oCell)
-			If bFilterTracerIsinsideTable Then
-				oCell = oLogTable.getCellByPosition(2, oLogTable.Rows.Count-1)
-				oTextCursor = oCell.Text.CreateTextCursor()
-				CurFilterTracingpath = GetFilterTracingLogPath(sTargetUrl, ApplIndex)
-				InsertCommandButtonatViewCursor(oLogDocument, oTextCursor, CurFilterTracingPath)
-			End If
 			oLogDocument.Store()
 		End If
 	End If


More information about the Libreoffice-commits mailing list