[Libreoffice-commits] dev-tools.git: helpauthoring/HelpAuthoring

Yousuf Philips philipz85 at hotmail.com
Mon Sep 14 00:15:54 PDT 2015


 helpauthoring/HelpAuthoring/_Main.xba |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 84f91a57539f7841cf50c924440f6890341c29c6
Author: Yousuf Philips <philipz85 at hotmail.com>
Date:   Sun Sep 13 16:21:04 2015 +0400

    Use last used directory in the open dialog
    
    Change-Id: I67db6dc4032b1de22c1eec484a0da4d673973b79
    Reviewed-on: https://gerrit.libreoffice.org/18530
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/helpauthoring/HelpAuthoring/_Main.xba b/helpauthoring/HelpAuthoring/_Main.xba
index 61abba5..c181ab1 100644
--- a/helpauthoring/HelpAuthoring/_Main.xba
+++ b/helpauthoring/HelpAuthoring/_Main.xba
@@ -266,11 +266,16 @@ Dim FileProperties(1) As New com.sun.star.beans.PropertyValue
     ListAny(0) = com.sun.star.ui.dialogs.TemplateDescription.FILEOPEN_SIMPLE
     oFileDialog = CreateUnoService("com.sun.star.ui.dialogs.FilePicker")
     oFileDialog.Initialize(ListAny())
-    oFileDialog.DisplayDirectory = sDocRoot
+    If sLastSaveDir <> "" AND IsSubDir(sLastSaveDir,sDocRoot) Then
+        oFileDialog.setDisplayDirectory(sLastSaveDir)
+    Else
+	    oFileDialog.DisplayDirectory = sDocRoot
+    End If
     oFileDialog.AppendFilter("Help", "*.xhp")
     oFileDialog.SetTitle("Open Help File")
     iAccept = oFileDialog.Execute()
     If iAccept = 1 Then
+        WriteConfig("LastSaveDir",oFileDialog.getDisplayDirectory+"/")
         sPath = oFileDialog.Files(0)
         FileProperties(0).Name = "FilterName"
         FileProperties(0).Value ="XHP_Help"


More information about the Libreoffice-commits mailing list