https://bz.apache.org/ooo/show_bug.cgi?id=127597

          Issue ID: 127597
        Issue Type: DEFECT
           Summary: Save with password fails
           Product: Writer
           Version: 4.1.4
          Hardware: PC
                OS: Linux 32-bit
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P5 (lowest)
         Component: save-export
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 86263
  --> https://bz.apache.org/ooo/attachment.cgi?id=86263&action=edit
Error popup when saving with password protection.

Saving with a password fails. This happens only on the 32 bit version, the 64
bit version is fine (Linux, not able to test on Win or Mac).
I've looked at the recent other password save failures, this seems different.

OS: Slackware 14.2 Linux, fully patched, tested on both 32 & 64 bit versions.
Aooo: 4.1.4 (also happens on Aooo 4.1.3)

Detailed instructions:
1) Open new Writer document
2) Enter some arbitrary text
3) Save to file with password via: "File | Save As" 
    - Click "Save with password" check box
    - Enter new filename
    - Enter passwords as requested (For testing I used: 123qweASD)
    - Click "OK"
    - Receive "I/O Error" message (see attached for png)

Note, there is one curious bit of data. When I start with an existing file
(file exists on disk) and "Save As" with a password and new filename, then the
error box has the Old/Original filename in it (not the New filename that I gave
in the "Save As" dialog box).

Further investigations:
Next, I created a OO Basic macro to create and save two files, one without a
password, one with a password.

The save without password succeeds, the save with password fails. 
The failure is shown by a popup box which declares:
    "BASIC Runtime Error."
    "An exception occurred"
    "Type: com.sun.star.task.ErrorCodeIOException"
    "Message:."

The OO Basic macros are:

REM  *****  BASIC  *****

Sub Main
        printDocumentArgs()

        SaveNoPWD()

        SavePWD()

End Sub

REM #############################################
Sub printDocumentArgs

Dim vArgs       'Media descriptor as an array of
com.sun.star.beans.PropertyValue
Dim s$          'Display string
Dim i%          'Index Variable

vArgs = ThisComponent.getArgs()

For i = 0 to Ubound(vArgs)
        s = s & vArgs(i).Name & " = "
        s = s & TypeName(vArgs(i).Value)
        s = s & CHR$(10)
Next

MsgBox s, 0, "Args"

End Sub

REM #############################################
Sub SaveNoPWD
        Dim args(0) as New com.sun.star.beans.PropertyValue
        Dim sUrl As String

        sHome = Environ("HOME")
        sTemp = Environ("TEMP")

        sUrl = "file:///" & sTemp & "/test_file_nopwd.odt"

        args(0).Name  = "Overwrite"
        args(0).Value = True

        ThisComponent.storeAsUrl(sUrl, args())  ' This one works

End Sub

REM #############################################
Sub SavePWD
        Dim args(1) as New com.sun.star.beans.PropertyValue
        Dim sUrl As String

        sHome = Environ("HOME")
        sTemp = Environ("TEMP")

        sUrl = "file:///" & sTemp & "/test_file_pwd.odt"

        args(0).Name  = "Overwrite"
        args(0).Value = True
        args(1).Name  = "Password"
        args(1).Value = "1234"

        ThisComponent.storeAsUrl(sUrl, args())  ' Here is where the runtime
error occurs

End Sub
REM ################################################

I can provide the document and error message as attachments is needed
(apparently only one attachment per)

-- 
You are receiving this mail because:
You are the assignee for the issue.

Reply via email to