summaryrefslogtreecommitdiff
path: root/wizards/source/tools
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/source/tools')
-rw-r--r--wizards/source/tools/DlgOverwriteAll.xdl17
-rw-r--r--wizards/source/tools/Misc.xba4
-rw-r--r--wizards/source/tools/ModuleControls.xba49
-rw-r--r--wizards/source/tools/dialog.xlb4
-rw-r--r--wizards/source/tools/script.xlb4
5 files changed, 73 insertions, 5 deletions
diff --git a/wizards/source/tools/DlgOverwriteAll.xdl b/wizards/source/tools/DlgOverwriteAll.xdl
new file mode 100644
index 000000000000..8cef0d04b55b
--- /dev/null
+++ b/wizards/source/tools/DlgOverwriteAll.xdl
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DlgOverwriteAll" dlg:left="138" dlg:top="75" dlg:width="230" dlg:height="69" dlg:closeable="true" dlg:moveable="true">
+ <dlg:bulletinboard>
+ <dlg:text dlg:id="lblQueryforSave" dlg:tab-index="0" dlg:left="6" dlg:top="6" dlg:width="218" dlg:height="35" dlg:value="lblQueryforSave" dlg:multiline="true"/>
+ <dlg:button dlg:id="cmdYes" dlg:tab-index="1" dlg:left="6" dlg:top="49" dlg:width="50" dlg:height="14" dlg:value="cmdYes">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tools.ModuleControls.SetOVERWRITEToQuery" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdYesToAll" dlg:tab-index="2" dlg:left="62" dlg:top="49" dlg:width="50" dlg:height="14" dlg:value="cmdYesToAll">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tools.ModuleControls.SetOVERWRITEToAlways" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdNo" dlg:tab-index="3" dlg:left="118" dlg:top="49" dlg:width="50" dlg:height="14" dlg:value="cmdNo">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tools.ModuleControls.SetOVERWRITEToNever" script:language="StarBasic"/>
+ </dlg:button>
+ <dlg:button dlg:id="cmdCancel" dlg:tab-index="4" dlg:left="174" dlg:top="49" dlg:width="50" dlg:height="14" dlg:value="cmdCancel" dlg:button-type="cancel"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba
index fa0722097305..30881aba9c18 100644
--- a/wizards/source/tools/Misc.xba
+++ b/wizards/source/tools/Misc.xba
@@ -113,7 +113,7 @@ Dim sProdName as String
oProdNameAccess = GetRegistryKeyContent(&quot;org.openoffice.Setup/Product&quot;)
sProdName = oProdNameAccess.getByName(&quot;ooName&quot;)
sVersion = oProdNameAccess.getByName(&quot;ooSetupVersion&quot;)
- GetProductName = sProdName &amp; sVersion
+ GetProductName = sProdName &amp; &quot; &quot; &amp; sVersion
End Function
@@ -807,4 +807,4 @@ Dim oFrame as Object
End If
End Sub
-</script:module>
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tools/ModuleControls.xba b/wizards/source/tools/ModuleControls.xba
index 37a5e23204ab..a94f0a9977af 100644
--- a/wizards/source/tools/ModuleControls.xba
+++ b/wizards/source/tools/ModuleControls.xba
@@ -2,6 +2,16 @@
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ModuleControls" script:language="StarBasic">Option Explicit
+Public DlgOverwrite as Object
+Public Const SBOVERWRITEUNDEFINED as Integer = 0
+Public Const SBOVERWRITECANCEL as Integer = 2
+Public Const SBOVERWRITEQUERY as Integer = 7
+Public Const SBOVERWRITEALWAYS as Integer = 6
+Public Const SBOVERWRITENEVER as Integer = 8
+Public iGeneralOverwrite as Integer
+
+
+
&apos; Accepts the name of a control and returns the respective control model as object
&apos; The Container can either be a whole document or a specific sheet of a Calc-Document
&apos; &apos;CName&apos; is the name of the Control
@@ -297,4 +307,43 @@ Dim oWindowPointer as Object
oWindowPointer.SetType(com.sun.star.awt.SystemPointer.WAIT)
End If
oWindowPeer.SetPointer(oWindowPointer)
+End Sub
+
+
+Sub ShowOverwriteAllDialog(FilePath as String, sTitle as String)
+Dim QueryString as String
+Dim LocRetValue as Integer
+ If InitResources(&quot;&quot;, &quot;com&quot;) Then
+ DlgOverwrite = LoadDialog(&quot;Tools&quot;, &quot;DlgOverwriteAll&quot;)
+ DlgOverwrite.Title = sTitle
+ QueryString = &quot;Das Dokument &apos;&lt;PATH&gt;&apos; existiert bereits.&lt;BR&gt;&lt;BR&gt;Möchten Sie Datei(en) überschreiben?&quot;
+ QueryString = ReplaceString(QueryString, ConvertFromUrl(FilePath), &quot;&lt;PATH&gt;&quot;)
+ QueryString = ReplaceString(QueryString, chr(13), &quot;&lt;BR&gt;&quot;)
+ DlgOverwrite.Model.lblQueryforSave.Label = QueryString
+ LocRetValue = DlgOverwrite.execute()
+ If LocRetValue = 0 Then
+ iGeneralOverwrite = SBOVERWRITECANCEL
+ End If
+ DlgOverwrite.dispose()
+ Else
+ iGeneralOverwrite = SBOVERWRITECANCEL
+ End If
+End Sub
+
+
+Sub SetOVERWRITEToQuery()
+ iGeneralOverwrite = SBOVERWRITEQUERY
+ DlgOverwrite.EndExecute()
+End Sub
+
+
+Sub SetOVERWRITEToAlways()
+ iGeneralOverwrite = SBOVERWRITEALWAYS
+ DlgOverwrite.EndExecute()
+End Sub
+
+
+Sub SetOVERWRITEToNever()
+ iGeneralOverwrite = SBOVERWRITENEVER
+ DlgOverwrite.EndExecute()
End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/tools/dialog.xlb b/wizards/source/tools/dialog.xlb
index 2666aa54567e..77170b682b93 100644
--- a/wizards/source/tools/dialog.xlb
+++ b/wizards/source/tools/dialog.xlb
@@ -1,3 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
-<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Tools" library:readonly="true" library:passwordprotected="false"/>
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Tools" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="DlgOverwriteAll"/>
+</library:library> \ No newline at end of file
diff --git a/wizards/source/tools/script.xlb b/wizards/source/tools/script.xlb
index c107f2c9bfb6..7e46dfbe680c 100644
--- a/wizards/source/tools/script.xlb
+++ b/wizards/source/tools/script.xlb
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
-<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Tools" library:readonly="true" library:passwordprotected="false">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Tools" library:readonly="false" library:passwordprotected="false">
<library:element library:name="ModuleControls"/>
<library:element library:name="Strings"/>
<library:element library:name="Misc"/>
<library:element library:name="UCB"/>
<library:element library:name="Listbox"/>
<library:element library:name="Debug"/>
-</library:library>
+</library:library> \ No newline at end of file