diff options
author | Behrend Cornelius <bc@openoffice.org> | 2001-11-30 15:54:17 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2001-11-30 15:54:17 +0000 |
commit | b3097e5ad8d4126611eb1f789e2e9c24d7a15bca (patch) | |
tree | 307ecaae67a1d9834edaf4e125ca0ef7ea8ff40d /wizards/source/importwizard | |
parent | 53796978f568a81b12180f94e692ca459672ea98 (diff) |
#95469# CheckTextboxPath routine now modulized
Diffstat (limited to 'wizards/source/importwizard')
-rw-r--r-- | wizards/source/importwizard/DialogModul.xba | 28 | ||||
-rw-r--r-- | wizards/source/importwizard/FilesModul.xba | 2 | ||||
-rw-r--r-- | wizards/source/importwizard/ImportDialog.xdl | 2 |
3 files changed, 22 insertions, 10 deletions
diff --git a/wizards/source/importwizard/DialogModul.xba b/wizards/source/importwizard/DialogModul.xba index 5d7e55258f9f..83fef2a7be69 100644 --- a/wizards/source/importwizard/DialogModul.xba +++ b/wizards/source/importwizard/DialogModul.xba @@ -415,25 +415,37 @@ End Function Function CheckInputPaths() as Boolean Dim bChangePage as Boolean - bChangePage = CheckTextBoxPath(ImportDialog.txtTemplateImportPath, True, False) - bChangePage = CheckTextBoxPath(ImportDialog.txtTemplateExportPath, bChangePage, True) - bChangePage = CheckTextBoxPath(ImportDialog.txtDocumentImportPath, bChangePage, False) - bChangePage = CheckTextBoxPath(ImportDialog.txtDocumentExportPath, bChangePage, True) + bChangePage = CheckTextBoxPath(ImportDialog.txtTemplateImportPath, True, False, sTitle, False) + bChangePage = CheckTextBoxPath(ImportDialog.txtTemplateExportPath, bChangePage, True, sTitle, False) + bChangePage = CheckTextBoxPath(ImportDialog.txtDocumentImportPath, bChangePage, False, sTitle, False) + bChangePage = CheckTextBoxPath(ImportDialog.txtDocumentExportPath, bChangePage, True, sTitle, False) CheckInputPaths = bChangePage End Function -Function CheckTextBoxPath(oTextBox as Object, ByVal bCheck as Boolean, bCreateNew as Boolean) as Boolean +Function CheckTextBoxPath(oTextBox as Object, ByVal bCheck as Boolean, bCreateNew as Boolean, sTitle as String, bgetResources as Boolean) as Boolean Dim iCreate as Integer Dim sQueryMessage as String Dim sUrlPath as String Dim sMessageNoDir as String Dim sShowPath as String +Dim oLocUcb as Object + oLocUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") + If bGetResources Then + If InitResources("ImportWizard","imp") then + sNoDirCreation = GetResText(1050) + sMsgDirNotThere = GetResText(1051) + sQueryForNewCreation = GetResText(1052) + Else + CheckTextBoxPath() = False + Exit Function + End If + End If If oTextBox.Enabled Then If bCheck Then sShowPath = oTextBox.Text sUrlPath = ConvertToUrl(sShowPath) - If Not oUcb.Exists(sUrlPath) Then + If Not oLocUcb.Exists(sUrlPath) Then If Not bCreateNew Then ' Sourcedirectories must be existing, Targetdirectories may be created new sQueryMessage = ReplaceString(sMsgDirNotThere, sShowPath,"%1") @@ -446,8 +458,8 @@ Dim sShowPath as String iCreate = Msgbox (sQueryMessage, 36, sTitle) If iCreate = 6 Then On Local Error Goto NOVALIDPATH - oUcb.CreateFolder(sUrlPath) - If Not oUcb.Exists(sUrlPath) Then + oLocUcb.CreateFolder(sUrlPath) + If Not oLocUcb.Exists(sUrlPath) Then Goto NOVALIDPATH End If Else diff --git a/wizards/source/importwizard/FilesModul.xba b/wizards/source/importwizard/FilesModul.xba index f0728c69aa3a..06b01417899d 100644 --- a/wizards/source/importwizard/FilesModul.xba +++ b/wizards/source/importwizard/FilesModul.xba @@ -166,7 +166,7 @@ Dim sOldExtension as String TargetFile = TargetFile & sExtension TargetDir = RTrimStr(TargetFile, sFileName & "." & sExtension) If Not oUcb.Exists(TargetDir) Then - oUcb.CreateFolder(TargetDir) + CreateFolder(TargetDir) End If If oUcb.Exists(TargetFile) Then sCurFileExists = ReplaceString(sFileExists, ConvertFromUrl(TargetFile), "<1>") diff --git a/wizards/source/importwizard/ImportDialog.xdl b/wizards/source/importwizard/ImportDialog.xdl index 5cdd8b4edd16..5a97a8c3f46d 100644 --- a/wizards/source/importwizard/ImportDialog.xdl +++ b/wizards/source/importwizard/ImportDialog.xdl @@ -18,7 +18,7 @@ </dlg:textfield> <dlg:textfield dlg:id="txtDocumentExportPath" dlg:tab-index="8" dlg:left="73" dlg:top="165" dlg:width="170" dlg:height="12" dlg:page="2" dlg:help-url="HID:34589"/> <dlg:text dlg:id="SummaryHeaderLabel" dlg:tab-index="9" dlg:left="6" dlg:top="37" dlg:width="258" dlg:height="8" dlg:page="3" dlg:value="SummaryHeaderLabel"/> - <dlg:textfield dlg:id="SummaryTextbox" dlg:tab-index="10" dlg:left="5" dlg:top="48" dlg:width="259" dlg:height="125" dlg:page="3" dlg:help-url="HID:34595" dlg:vscroll="true" dlg:multiline="true"/> + <dlg:textfield dlg:id="SummaryTextbox" dlg:tab-index="10" dlg:left="5" dlg:top="48" dlg:width="259" dlg:height="125" dlg:page="3" dlg:help-url="HID:34595" dlg:vscroll="true" dlg:multiline="true" dlg:readonly="true"/> <dlg:text dlg:id="LabelRetrieval" dlg:tab-index="11" dlg:left="10" dlg:top="67" dlg:width="240" dlg:height="8" dlg:page="4" dlg:value="LabelRetrieval"/> <dlg:text dlg:id="LabelCurTemplateRetrieval" dlg:tab-index="12" dlg:left="15" dlg:top="79" dlg:width="235" dlg:height="8" dlg:page="4" dlg:value="LabelCurTemplateRetrieval"/> <dlg:text dlg:id="LabelCurDocumentRetrieval" dlg:tab-index="13" dlg:left="15" dlg:top="91" dlg:width="235" dlg:height="8" dlg:page="4" dlg:value="LabelCurDocumentRetrieval"/> |