Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
bd277973
Kaydet (Commit)
bd277973
authored
Agu 10, 2015
tarafından
Szymon Kłos
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Show 'change password' only if is password is stored
Change-Id: I04275d2e45ff32ed003a2487cd87500d550e9d73
üst
0ab1f6a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
20 deletions
+49
-20
RemoteFilesDialog.cxx
fpicker/source/office/RemoteFilesDialog.cxx
+49
-20
No files found.
fpicker/source/office/RemoteFilesDialog.cxx
Dosyayı görüntüle @
bd277973
...
@@ -578,7 +578,39 @@ void RemoteFilesDialog::AddFileExtension()
...
@@ -578,7 +578,39 @@ void RemoteFilesDialog::AddFileExtension()
void
RemoteFilesDialog
::
EnableControls
()
void
RemoteFilesDialog
::
EnableControls
()
{
{
if
(
m_pServices_lb
->
GetEntryCount
()
>
0
)
if
(
m_pServices_lb
->
GetEntryCount
()
>
0
)
{
m_pServices_lb
->
Enable
(
true
);
m_pServices_lb
->
Enable
(
true
);
if
(
m_pServices_lb
->
GetSelectEntryCount
()
)
{
m_pAddMenu
->
EnableItem
(
"change_password"
,
false
);
try
{
Reference
<
XPasswordContainer2
>
xMasterPasswd
(
PasswordContainer
::
create
(
comphelper
::
getProcessComponentContext
()
)
);
if
(
xMasterPasswd
->
isPersistentStoringAllowed
()
)
{
int
nPos
=
GetSelectedServicePos
();
if
(
nPos
>=
0
)
{
OUString
sUrl
(
m_aServices
[
nPos
]
->
GetUrl
()
);
UrlRecord
aURLEntries
=
xMasterPasswd
->
find
(
sUrl
,
Reference
<
XInteractionHandler
>
()
);
if
(
aURLEntries
.
UserList
.
getLength
()
)
{
m_pAddMenu
->
EnableItem
(
"change_password"
);
}
}
}
}
catch
(
const
Exception
&
)
{}
}
}
else
else
m_pServices_lb
->
Enable
(
false
);
m_pServices_lb
->
Enable
(
false
);
...
@@ -745,7 +777,7 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
...
@@ -745,7 +777,7 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
Reference
<
XPasswordContainer2
>
xMasterPasswd
(
Reference
<
XPasswordContainer2
>
xMasterPasswd
(
PasswordContainer
::
create
(
comphelper
::
getProcessComponentContext
()
)
);
PasswordContainer
::
create
(
comphelper
::
getProcessComponentContext
()
)
);
if
(
xMasterPasswd
->
isPersistentStoringAllowed
()
)
if
(
xMasterPasswd
->
isPersistentStoringAllowed
()
&&
xMasterPasswd
->
authorizateWithMasterPassword
(
Reference
<
XInteractionHandler
>
()
)
)
{
{
int
nPos
=
GetSelectedServicePos
();
int
nPos
=
GetSelectedServicePos
();
...
@@ -759,29 +791,26 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
...
@@ -759,29 +791,26 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
UrlRecord
aURLEntries
=
xMasterPasswd
->
find
(
sUrl
,
xInteractionHandler
);
UrlRecord
aURLEntries
=
xMasterPasswd
->
find
(
sUrl
,
xInteractionHandler
);
if
(
aURLEntries
.
Url
==
sUrl
)
if
(
aURLEntries
.
Url
==
sUrl
&&
aURLEntries
.
UserList
.
getLength
()
)
{
{
if
(
aURLEntries
.
UserList
.
getLength
()
)
OUString
sUserName
=
aURLEntries
.
UserList
[
0
].
UserName
;
{
OUString
sUserName
=
aURLEntries
.
UserList
[
0
].
UserName
;
::
comphelper
::
SimplePasswordRequest
*
pPasswordRequest
::
comphelper
::
SimplePasswordRequest
*
pPasswordRequest
=
new
::
comphelper
::
SimplePasswordRequest
(
PasswordRequestMode_PASSWORD_CREATE
);
=
new
::
comphelper
::
SimplePasswordRequest
(
PasswordRequestMode_PASSWORD_CREATE
);
Reference
<
XInteractionRequest
>
rRequest
(
pPasswordRequest
);
Reference
<
XInteractionRequest
>
rRequest
(
pPasswordRequest
);
xInteractionHandler
->
handle
(
rRequest
);
xInteractionHandler
->
handle
(
rRequest
);
if
(
pPasswordRequest
->
isPassword
()
)
if
(
pPasswordRequest
->
isPassword
()
)
{
{
OUString
aNewPass
=
pPasswordRequest
->
getPassword
();
OUString
aNewPass
=
pPasswordRequest
->
getPassword
();
Sequence
<
OUString
>
aPasswd
(
1
);
Sequence
<
OUString
>
aPasswd
(
1
);
aPasswd
[
0
]
=
aNewPass
;
aPasswd
[
0
]
=
aNewPass
;
Reference
<
XPasswordContainer2
>
xPasswdContainer
(
Reference
<
XPasswordContainer2
>
xPasswdContainer
(
PasswordContainer
::
create
(
comphelper
::
getProcessComponentContext
()));
PasswordContainer
::
create
(
comphelper
::
getProcessComponentContext
()
)
);
xPasswdContainer
->
addPersistent
(
xPasswdContainer
->
addPersistent
(
sUrl
,
sUserName
,
aPasswd
,
xInteractionHandler
);
sUrl
,
sUserName
,
aPasswd
,
xInteractionHandler
);
}
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment