diff options
author | Tomofumi Yagi <yagit@mknada.sakura.ne.jp> | 2015-02-28 17:43:00 +0900 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-10-20 09:42:13 +0000 |
commit | 7660e4dcecfb19ad8e9e21e5fe53637bd1b9dc6c (patch) | |
tree | 8e7ad943f635763507c3461fa86d5913c251c7c8 /uui | |
parent | 5378963b262ade09f5a55ecb185164b2eac8c782 (diff) |
tdf#89694 Password dialog for opening OOXML shows url-encoded path
We need to convert a path string to decoded it for OOXML with a password as ODF
is so. This patch adds the converting process for OOXML.
In addition, this patch moves the decoded-point of URL into
css.task.Document[MS]PasswordRequest ctor from the outside. This decoded-point of
URL into ctor is common for OOXML and ODF.
(notes: Strange to say, css.task.Document[MS]PasswordRequest ctor needs "aDocURL",
but methods in interaction-handler use "aDocumentName" as the parameter.
Probably this will be fixed in near future.)
Change-Id: I0ecfddf0f70ea5810df52d9ca8637f483a26df2f
Reviewed-on: https://gerrit.libreoffice.org/14677
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/passworddlg.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 3485a3cbf3b4..4831bd38df28 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -20,6 +20,7 @@ #include "passworddlg.hxx" #include "ids.hrc" +#include <tools/urlobj.hxx> #include <vcl/layout.hxx> using namespace ::com::sun::star; @@ -71,8 +72,10 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent, SetText( aTitle ); sal_uInt16 nStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN; - m_pFTPassword->SetText(ResId(nStrId, *pResourceMgr).toString()); - m_pFTPassword->SetText( m_pFTPassword->GetText() + aDocURL ); + OUString aMessage(ResId(nStrId, *pResourceMgr).toString()); + aMessage += INetURLObject(aDocURL).GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS); + m_pFTPassword->SetText(aMessage); + if (bIsSimplePasswordRequest) { DBG_ASSERT( aDocURL.isEmpty(), "A simple password request should not have a document URL! Use document password request instead." ); |