diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-02-12 14:03:59 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-02-12 14:03:59 +0000 |
commit | 20cea29aa241c198cfbd6cdda9f4cf198e6933bd (patch) | |
tree | 16b877dc84dbf8eff62614606d8f145d8cc2e9d7 /wizards/source | |
parent | bbef3ea39fc3fe0bed5bc6307e396fd434e02296 (diff) |
CWS-TOOLING: integrate CWS fwk99
2009-01-20 17:39:31 +0100 pb r266605 : fix: #i98280# new 'More templates'-URL
2009-01-15 20:17:58 +0100 mst r266391 : #i95702# convert wizards to DocumentProperties (partially based on patch by cmc)
2009-01-12 07:35:44 +0100 pb r266131 : fix: #i96851# HID_PASTE_DLG and HID_LINKDLG_TABLB added
2009-01-09 10:40:48 +0100 pb r266061 : fix: #i97386# Execute_Impl() while sub-dialog is open this could be deleted; #i68415# patch from cmc
2009-01-09 10:35:24 +0100 pb r266059 : fix: #i97386# struct Deleted added
2009-01-09 10:05:17 +0100 pb r266057 : fix: #i97365# ModalDialog RID_SVXPAGE_IMPROVEMENT removed
2009-01-09 10:02:39 +0100 pb r266056 : fix: #i97841# new: set InfoURL and HandleHyperLink()
2009-01-09 09:59:13 +0100 pb r266053 : fix: #i97391# MinWidth re-calculated; #i97365# SvxImprovementDialog2 removed
2009-01-09 09:55:00 +0100 pb r266051 : fix: #i97841# new: HandleHyperLink(); #i97365# SvxImprovementDialog2 removed
2009-01-06 14:24:24 +0100 cd r265921 : #i96831# Fix build problem with gcc 4.3.2 using the return value of link correctly.
2009-01-06 12:18:41 +0100 cd r265907 : #i96831# Fix build problem with gcc 4.3.2
2009-01-06 12:02:59 +0100 mst r265905 : fix #i97775#
- xmloff/source/core/nmspmap.cxx:
+ SvXMLNamespaceMap::GetQNameByKey does not handle default namespace
correctly
Diffstat (limited to 'wizards/source')
-rw-r--r-- | wizards/source/euro/AutoPilotRun.xba | 6 | ||||
-rw-r--r-- | wizards/source/gimmicks/AutoText.xba | 4 | ||||
-rw-r--r-- | wizards/source/gimmicks/GetTexts.xba | 34 | ||||
-rw-r--r-- | wizards/source/importwizard/FilesModul.xba | 5 | ||||
-rw-r--r-- | wizards/source/tools/UCB.xba | 19 | ||||
-rw-r--r-- | wizards/source/tutorials/Functions.xba | 22 | ||||
-rw-r--r-- | wizards/source/webwizard/HtmlAutoPilotBasic.xba | 38 |
7 files changed, 62 insertions, 66 deletions
diff --git a/wizards/source/euro/AutoPilotRun.xba b/wizards/source/euro/AutoPilotRun.xba index 052d71c2e27e..6c5adb9ea64a 100644 --- a/wizards/source/euro/AutoPilotRun.xba +++ b/wizards/source/euro/AutoPilotRun.xba @@ -17,7 +17,6 @@ Public DoUnprotect as Integer Public Password as String Public DocIndex as Integer Public oPathSettings as Object -Public oDocInfo as Object Public oUcb as Object Public TotDocCount as Integer Public sTotDocCount as String @@ -30,7 +29,6 @@ Dim oFactoryKey as Object BasicLibraries.LoadLibrary("Tools") BasicLibraries.LoadLibrary("ImportWizard") If InitResources("Euro Converter", "eur") Then - oDocInfo = CreateUnoService("com.sun.star.document.StandaloneDocumentInfo") oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") oLocale = GetStarOfficeLocale() InitializeConverter(oLocale, 2) @@ -303,7 +301,7 @@ Dim sNoDirMessage as String If bIsValid Then If DialogModel.optSingleFile.State = 1 Then If bCheckFileType Then - sLocMimeType = GetRealFileContent(oDocInfo, sPath) + sLocMimeType = GetRealFileContent(sPath) If DialogModel.chkTextDocuments.State = 1 Then If (Instr(1, sLocMimeType, "text") = 0) And (Instr(1, sLocMimeType, "calc") = 0) Then Msgbox(sMsgFileInvalid, 48, sMsgDLGTITLE) @@ -408,4 +406,4 @@ Sub PreviousStep() DialogModel.cmdGoOn.Label = sGOON DialogModel.cmdCancel.Label = sCANCEL End Sub -</script:module>
\ No newline at end of file +</script:module> diff --git a/wizards/source/gimmicks/AutoText.xba b/wizards/source/gimmicks/AutoText.xba index 6950b830eb79..5d3cc18e5e13 100644 --- a/wizards/source/gimmicks/AutoText.xba +++ b/wizards/source/gimmicks/AutoText.xba @@ -25,7 +25,7 @@ Dim n, m, iAutoCount as Integer ' Open a new empty document oDocument = CreateNewDocument("swriter") If Not IsNull(oDocument) Then - oDocument.DocumentInfo.Title = sDocumentTitle + oDocument.DocumentProperties.Title = sDocumentTitle oDocuText = oDocument.Text ' Create The Character-templates @@ -94,4 +94,4 @@ Dim oCellCursor as Object oCellCursor.CharStyleName = sCellStyle oCell.Text.insertString(oCellCursor,sCellString,False) oDocument.CurrentController.Select(oCellCursor) -End Sub</script:module>
\ No newline at end of file +End Sub</script:module> diff --git a/wizards/source/gimmicks/GetTexts.xba b/wizards/source/gimmicks/GetTexts.xba index af3ac041cb1e..c98e7d51f580 100644 --- a/wizards/source/gimmicks/GetTexts.xba +++ b/wizards/source/gimmicks/GetTexts.xba @@ -50,10 +50,10 @@ Dim oCharStyles as Object oHyperCursor.gotoStart(False) oHyperCursor.HyperLinkURL = oDocument.URL oHyperCursor.HyperLinkTarget = oDocument.URL - If oDocument.DocumentInfo.Title <> "" Then - oHyperCursor.HyperlinkName = oDocument.DocumentInfo.Title + If oDocument.DocumentProperties.Title <> "" Then + oHyperCursor.HyperlinkName = oDocument.DocumentProperties.Title End If - oLogText.insertString(oHyperCursor, oDocument.DocumentInfo.Title, False) + oLogText.insertString(oHyperCursor, oDocument.DocumentProperties.Title, False) oLogText.insertControlCharacter(oHyperCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False) oLogCursor = oLogText.createTextCursor() @@ -64,8 +64,8 @@ Dim oCharStyles as Object oLogCursor.SetPropertyToDefault("HyperLinkName") LogIndex = 0 - ' Get the Properties of the document Info - GetDocumentInfo() + ' Get the Properties of the document + GetDocumentProps() Select Case sDocType Case "swriter" @@ -400,18 +400,18 @@ End Sub ' ***********************************************Misc************************************************** -Sub GetDocumentInfo() -Dim oDocuInfo as Object +Sub GetDocumentProps() +Dim oDocuProps as Object MakeLogHeadLine("Document Properties") - oDocuInfo = oDocument.DocumentInfo - WriteStringToLogFile(oDocuInfo.Title) - WriteStringToLogFile(oDocuInfo.Description) - WriteStringToLogFile(oDocuInfo.Theme) - WriteStringToLogFile(oDocuInfo.Author) - WriteStringToLogFile(oDocuInfo.ReplyTo) - WriteStringToLogFile(oDocuInfo.Recipient) - WriteStringToLogFile(oDocuInfo.References) - WriteStringToLogFile(oDocuInfo.Keywords) + oDocuProps = oDocument.DocumentProperties + WriteStringToLogFile(oDocuProps.Title) + WriteStringToLogFile(oDocuProps.Description) + WriteStringToLogFile(oDocuProps.Subject) + WriteStringToLogFile(oDocuProps.Author) +' WriteStringToLogFile(oDocuProps.UserDefinedProperties.ReplyTo) +' WriteStringToLogFile(oDocuProps.UserDefinedProperties.Recipient) +' WriteStringToLogFile(oDocuProps.UserDefinedProperties.References) +' WriteStringToLogFile(oDocuProps.Keywords) End Sub @@ -519,4 +519,4 @@ Sub MakeLogHeadLine(HeadText as String) oLogText.insertControlCharacter(oLogCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False) oLogCursor.CharStyleName = "Log Body" End Sub -</script:module>
\ No newline at end of file +</script:module> diff --git a/wizards/source/importwizard/FilesModul.xba b/wizards/source/importwizard/FilesModul.xba index e7a09f3a4f63..cb999252b24c 100644 --- a/wizards/source/importwizard/FilesModul.xba +++ b/wizards/source/importwizard/FilesModul.xba @@ -41,7 +41,6 @@ Dim NewContentList() as String Dim XMLTemplateContentString as String Dim ApplIndex as Integer Dim bAssignFileName as Boolean - oDocInfo = CreateUnoService("com.sun.star.document.StandaloneDocumentInfo") bInterruptSearch = False For i = 0 To MaxCollectIndex SearchDir = PathCollection(i,0) @@ -71,7 +70,7 @@ Dim bAssignFileName as Boolean CurFileContent = "" CurFileName = NewList(n,0) If (FieldInList(NewList(n,1), XMLTemplateList())) Then - CurFileContent = GetRealFileContent(oDocInfo, CurFileName) + CurFileContent = GetRealFileContent(CurFileName) t = SearchArrayforPartString(CurFileContent, XMLTemplateContentList()) bAssignFileName = (t > -1) If bAssignFileName Then @@ -822,4 +821,4 @@ Function ConcatComment(sComment as String, AdditionalComment as String) End If ConcatComment = sComment End Function -</script:module>
\ No newline at end of file +</script:module> diff --git a/wizards/source/tools/UCB.xba b/wizards/source/tools/UCB.xba index 436fd551b944..524afe60c4d9 100644 --- a/wizards/source/tools/UCB.xba +++ b/wizards/source/tools/UCB.xba @@ -9,6 +9,7 @@ Dim sDirArray(SBMAXDIRCOUNT-1) as String Dim DirIndex As Integer Dim iDirCount as Integer Public bInterruptSearch as Boolean +Public NoArgs()as New com.sun.star.beans.PropertyValue Sub Main() Dim LocsfileContent(0) as String @@ -64,7 +65,7 @@ Dim sFileArray(StartUbound,1) as String End If Else If bcheckFileType Then - RealFileContent = GetRealFileContent(oDocInfo, FileName) + RealFileContent = GetRealFileContent(FileName) Else RealFileContent = GetFileNameExtension(FileName) End If @@ -143,14 +144,14 @@ Dim FileCount As Integer End Sub -Function RetrieveDocTitle(oDocInfo as Object, sFileName as String) As String +Function RetrieveDocTitle(oDocProps as Object, sFileName as String) As String Dim sDocTitle as String On Local Error Goto NOFILE - oDocInfo.Read(sFileName) - sDocTitle = oDocInfo.Title + oDocProps.loadFromMedium(sFileName, NoArgs()) + sDocTitle = oDocProps.Title NOFILE: If Err <> 0 Then - GetRealFileContent = "" + RetrieveDocTitle = "" RESUME CLR_ERROR End If CLR_ERROR: @@ -163,10 +164,10 @@ End Function ' Retrieves The Filecontent of a Document by extracting the content ' from the Header of the document -Function GetRealFileContent(oDocInfo as Object, FileName as String) As String +Function GetRealFileContent(FileName as String) As String On Local Error Goto NOFILE - oDocInfo.Read(FileName) - GetRealFileContent = oDocInfo.MIMEType + oTypeDetect = createUnoService("com.sun.star.document.TypeDetection") + GetRealFileContent = oTypeDetect.queryTypeByURL(FileName) NOFILE: If Err <> 0 Then GetRealFileContent = "" @@ -290,4 +291,4 @@ NOSPACEONDRIVE: End If GOON: End Function -</script:module>
\ No newline at end of file +</script:module> diff --git a/wizards/source/tutorials/Functions.xba b/wizards/source/tutorials/Functions.xba index 55420d860a5b..6524ec19338c 100644 --- a/wizards/source/tutorials/Functions.xba +++ b/wizards/source/tutorials/Functions.xba @@ -39,8 +39,8 @@ Sub LoadTutorialDialog(exampleToUse, documentTYP) SetTutorialDocumentPosSize() - documentInfo = ThisComponent.getDocumentInfo() - myDialog.Title = "Tutorials - " & documentInfo.Title + documentProps = ThisComponent.getDocumentProperties() + myDialog.Title = "Tutorials - " & documentProps.Title oTextField = myDialog.GetControl("myTextField") oTextField.setVisible(False) @@ -143,18 +143,16 @@ Sub Init End Sub Sub InitStep - userFieldName = ThisComponent.getDocumentInfo.getUserFieldName(0) - ResultString = InStr (userFieldName, "CurrentStep:") - If ResultString <> 0 Then - TutorStep = Val(ThisComponent.getDocumentInfo.getUserFieldValue(0)) - Else - ThisComponent.getDocumentInfo.setUserFieldName(0, "CurrentStep:") - ThisComponent.getDocumentInfo.setUserFieldValue(0, TutorStep) - End If + udProps = ThisComponent.DocumentProperties.UserDefinedProperties + If udProps.PropertySetInfo.hasPropertyByName("CurrentStep") Then + TutorStep = udProps.CurrentStep + Else + udProps.addProperty("CurrentStep", 0, TutorStep) + End If End Sub Sub setStep - ThisComponent.getDocumentInfo.setUserFieldValue(0, TutorStep) + ThisComponent.DocumentProperties.UserDefinedProperties.CurrentStep = TutorStep End Sub Sub InitAction() @@ -367,4 +365,4 @@ Sub ExitTutorial() msgBox "Error! Cannot close document." End If End Sub -</script:module>
\ No newline at end of file +</script:module> diff --git a/wizards/source/webwizard/HtmlAutoPilotBasic.xba b/wizards/source/webwizard/HtmlAutoPilotBasic.xba index f248b4e6c8b9..00675bbf0c74 100644 --- a/wizards/source/webwizard/HtmlAutoPilotBasic.xba +++ b/wizards/source/webwizard/HtmlAutoPilotBasic.xba @@ -153,11 +153,11 @@ Dim OldWebPageIndex as Integer CurrentNext$ = GraphicsDir + Style(CurWebPageIndex, 3) CurrentHome$ = GraphicsDir + Style(CurWebPageIndex, 4) CurrentTop$ = GraphicsDir + Style(CurWebPageIndex, 5) - With oBaseDocument.DocumentInfo - .GetUserFieldValue(0) = ExtractGraphicNames(CurWebPageIndex,2) - .GetUserFieldValue(1) = ExtractGraphicNames(CurWebPageIndex, 4) - .GetUserFieldValue(2) = Style(CurWebPageIndex, 6) ' Bullet - .GetUserFieldValue(3) = Style(CurWebPageIndex, 7) ' Background + With oBaseDocument.DocumentProperties.UserDefinedProperties + .AutoPilotName1 = ExtractGraphicNames(CurWebPageIndex,2) + .AutoPilotName2 = ExtractGraphicNames(CurWebPageIndex, 4) + .AutoPilotBullet = Style(CurWebPageIndex, 6) + .AutoPilotBackground = Style(CurWebPageIndex, 7) End With SetBulletAndGraphics() CheckControls(oBaseDocument.DrawPage) @@ -235,6 +235,7 @@ Sub CopyGraphics Dim oGraphicObjects as Object Dim oGraphic as Object Dim i as Integer +Dim udProps as Object Dim SavePath as String BasicLibraries.LoadLibrary("Tools") oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") @@ -255,12 +256,12 @@ Dim SavePath as String BulletUrlsToSavePath(SavePath) - With oBaseDocument.DocumentInfo - .GetUserFieldValue(0) = "" - .GetUserFieldValue(1) = "" - .GetUserFieldValue(2) = "" - .GetUserFieldValue(3) = "" - End With + udProps = oBaseDocument.DocumentProperties.UserDefinedProperties + udProps.addProperty("AutoPilotName1", 0, "") + udProps.addProperty("AutoPilotName2", 0, "") + udProps.addProperty("AutoPilotBullet", 0, "") + udProps.addProperty("AutoPilotBackground", 0, "") + AttachBasicMacroToEvent(oBaseDocument,"OnSaveDone", "") AttachBasicMacroToEvent(oBaseDocument,"OnSaveAsDone", "") AttachBasicMacroToEvent(oBaseDocument,"OnNew", "") @@ -284,7 +285,7 @@ End Function Function getListBoxArrays(oUcb as Object, sFileFilter as String) -Dim oDocInfo as Object +Dim oDocProps as Object Dim oListboxControl as Object Dim Description as String Dim sField as String @@ -301,10 +302,10 @@ Dim n as Integer Dim s as Integer Dim a as Integer Dim LocMaxIndex as Integer -Dim InfoNames() +Dim Properties() Dim DimCount as Integer Dim sExtension as String - oDocInfo = CreateUnoService("com.sun.star.document.DocumentProperties") + oDocProps = CreateUnoService("com.sun.star.document.DocumentProperties") FilterLen = Len(sFileFilter) bItemFound = False ' It has to be made sure that the TemplatePath <> "" @@ -325,7 +326,7 @@ Dim sExtension as String Dim SortList(LocMaxIndex,1) For i = 0 to LocMaxIndex SortList(i,0) = DirContent(i) - SortList(i,1) = RetrieveDocTitle(oDocInfo, DirContent(i)) + SortList(i,1) = RetrieveDocTitle(oDocProps, DirContent(i)) Next i SortList() = BubbleSortList(SortList(),True) For i = 0 to LocMaxIndex @@ -337,16 +338,15 @@ Dim sExtension as String sExtension = Ucase(GetFileNameExtension(FileName)) If Instr(1,Filename, sFileFilter) And sExtension = "STW" Then bItemFound = True - Description = RetrieveDocTitle(oDocInfo, FileName) - oDocInfo.Read(FileName) - InfoNames = oDocInfo.ElementNames() + Description = RetrieveDocTitle(oDocProps, FileName) + Properties = oDocProps.UserDefinedProperties.PropertyValues List(a,1) = Description If sFileFilter = "/cnt" Then List(a,2) = Filename Else m = 2 For n = 0 To 3 - sField = oDocInfo.GetByName(InfoNames(n)) + sField = Properties(n).Value sFieldList() = ArrayoutofString(sField, " ", MaxIndex) For s = 0 To MaxIndex If m < 6 Then |