Re: [api-dev] xStorable.getLocation() return old MS-DOS style path - How to solve?
Tobias Krais wrote: Hi together, I have a litte application and need to know the full path of the current document. Thus I use the XStorable interface. Using the xStorable.getLocation() method returns on a Windows XP system (using OOo 2.3): file:/F:/DOKUME1/Tobias/EIGENE1/... in Basic i use a function and the URL of the document convertfromURL(thiscomponent.url) Hope it helps Fernand Correct would be: file:/F:/Dokumente und Einstellungen/Tobias/Eigene Dateien/... Is there a way to get the REAL full path of the document? Please help! Greetings, Tobias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] xStorable.getLocation() return old MS-DOS style path - How to solve?
Message de Tobias Krais date 2008-02-19 12:28 : Hi together, I have a litte application and need to know the full path of the current document. Thus I use the XStorable interface. Using the xStorable.getLocation() method returns on a Windows XP system (using OOo 2.3): file:/F:/DOKUME1/Tobias/EIGENE1/... Correct would be: file:/F:/Dokumente und Einstellungen/Tobias/Eigene Dateien/... Is there a way to get the REAL full path of the document? Hi, I don't have this problem on Windows XP Home, using NTFS file system. Both getLocation on XStorable and getURL on the XModel return the complete address, not the 8+3 Dos-compatible notation. Perhaps a particular config of your Win XP? Bernard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] xStorable.getLocation() return old MS-DOS style path - How to solve?
Hi Tobias, Tobias Krais ha scritto: > Hi together, > > I have a litte application and need to know the full path of the current > document. Thus I use the XStorable interface. Using the > xStorable.getLocation() method returns on a Windows XP system (using OOo > 2.3): file:/F:/DOKUME1/Tobias/EIGENE1/... > Correct would be: file:/F:/Dokumente und Einstellungen/Tobias/Eigene > Dateien/... > Is there a way to get the REAL full path of the document? Some time ago it was reported a similar issue on my extension BasicAddonBuilder: http://extensions.services.openoffice.org/project/BasicAddonBuilder This is the thread: http://extensions.openoffice.org/servlets/BrowseList?list=dev&by=thread&from=1830122 And this is the fix that I've applied: -- Declare Function GetLongPathName Lib "kernel32.dll" Alias "GetLongPathNameA" ( _ ByVal lpszShortPath As String, lpszLongPath As String, ByVal cchBuffer As Long) As Long Function FixDOSFilePath(ByVal sDOSFilePath As String) As String Dim lLen As Long Dim sBuffer As String sBuffer = String(260, Chr(0)) lLen = GetLongPathName(sDOSFilePath, sBuffer, Len(sBuffer)) FixDOSFilePath = Left(sBuffer, lLen) End Function -- HTH Paolo M - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] xStorable.getLocation() return old MS-DOS style path - How to solve?
Hi togehter, thanks for your answers. I will reply soon. Currently I have an other severe failure... Greetings, Tobais Tobias Krais schrieb: > Hi together, > > I have a litte application and need to know the full path of the current > document. Thus I use the XStorable interface. Using the > xStorable.getLocation() method returns on a Windows XP system (using OOo > 2.3): file:/F:/DOKUME1/Tobias/EIGENE1/... > Correct would be: file:/F:/Dokumente und Einstellungen/Tobias/Eigene > Dateien/... > Is there a way to get the REAL full path of the document? > > Please help! > > Greetings, Tobias > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] xStorable.getLocation() return old MS-DOS style path - How to solve?
Hi together, > I have a litte application and need to know the full path of the current > document. Thus I use the XStorable interface. Using the > xStorable.getLocation() method returns on a Windows XP system (using OOo > 2.3): file:/F:/DOKUME1/Tobias/EIGENE1/... > Correct would be: file:/F:/Dokumente und Einstellungen/Tobias/Eigene > Dateien/... > Is there a way to get the REAL full path of the document? I found the reason for the old style path: the application opening the document calls OOo with an old style path. OOo then returns the old style path. Calling OOo with an new style path will return the new style one. My question: should OOo not always return the new style path name? Greetings, Tobias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]