[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source

2018-09-14 Thread Libreoffice Gerrit user
 cui/source/options/personalization.cxx |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 6a113caf17974eb07a9f06ef09b1b1737d4d07bc
Author: Muhammet Kara 
AuthorDate: Thu Sep 13 14:59:28 2018 +0300
Commit: Muhammet Kara 
CommitDate: Fri Sep 14 13:04:51 2018 +0200

tdf#118881: Fix HTML parsing for personas

This is just a band-aid to make personas feature
work again.

Change-Id: I80b54fe9a8ddc93d93744fcf2c7f739d81f6face
Reviewed-on: https://gerrit.libreoffice.org/60432
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 
Reviewed-by: Muhammet Kara 
(cherry picked from commit e98ac43ec42ff398ad489d6719960d595f0327be)
Reviewed-on: https://gerrit.libreoffice.org/60468
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 
(cherry picked from commit 2f52a8e0f1098a51631434129707cfb0b60fecb3)
Reviewed-on: https://gerrit.libreoffice.org/60481

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index dab788d8b824..478be7d99193 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -550,14 +550,14 @@ static OUString searchValue( const OString , 
sal_Int32 from, const OStri
 
 where += rIdentifier.getLength();
 
-sal_Int32 end = rBuffer.indexOf( "", where );
+sal_Int32 end = rBuffer.indexOf( "\"", where );
 if ( end < 0 )
 return OUString();
 
 OString aOString( rBuffer.copy( where, end - where ) );
 OUString aString( aOString.getStr(),  aOString.getLength(), 
RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS );
 
-return aString.replaceAll( "\\/", "/" );
+return aString.replaceAll( "\\u002F", "/" );
 }
 
 /// Parse the Persona web page, and find where to get the bitmaps + the color 
values.
@@ -569,32 +569,32 @@ static bool parsePersonaInfo( const OString , 
OUString *pHeaderURL, O
 // let's replace the whole buffer with last one so we can treat it easily
 OString rBuffer = rBufferArg.replaceAll(OString(""), 
OString(""));
 // it is the first attribute that contains "persona="
-sal_Int32 persona = rBuffer.indexOf( "data-browsertheme=\"{" );
+sal_Int32 persona = rBuffer.indexOf( "\"type\":\"persona\"" );
 if ( persona < 0 )
 return false;
 
 // now search inside
-*pHeaderURL = searchValue( rBuffer, persona, "headerURL:" );
+*pHeaderURL = searchValue( rBuffer, persona, "\"headerURL\":\"" );
 if ( pHeaderURL->isEmpty() )
 return false;
 
-*pFooterURL = searchValue( rBuffer, persona, "footerURL:" );
+*pFooterURL = searchValue( rBuffer, persona, "\"footerURL\":\"" );
 if ( pFooterURL->isEmpty() )
 return false;
 
-*pTextColor = searchValue( rBuffer, persona, "textcolor:" );
+*pTextColor = searchValue( rBuffer, persona, "\"textcolor\":\"" );
 if ( pTextColor->isEmpty() )
 return false;
 
-*pAccentColor = searchValue( rBuffer, persona, 
"accentcolor:" );
+*pAccentColor = searchValue( rBuffer, persona, "\"accentcolor\":\"" );
 if ( pAccentColor->isEmpty() )
 return false;
 
-*pPreviewURL = searchValue( rBuffer, persona, "previewURL:" 
);
+*pPreviewURL = searchValue( rBuffer, persona, "\"previewURL\":\"" );
 if ( pPreviewURL->isEmpty() )
 return false;
 
-*pName = searchValue( rBuffer, persona, "name:" );
+*pName = searchValue( rBuffer, persona, "\"name\":\"" );
 return !pName->isEmpty();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source

2018-07-25 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuicharmap.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 39bf66b0384182970939334c98743551e7e95910
Author: Mark Vecsernyes 
AuthorDate: Fri Nov 24 21:06:00 2017 +0100
Commit: Eike Rathke 
CommitDate: Thu Jul 26 00:40:12 2018 +0200

tdf#113860 - Selecting a recent or favorite special character is not applied

Change-Id: Ia000e4d83b8012eff54647205f6e044920aed74b
Reviewed-on: https://gerrit.libreoffice.org/45259
Reviewed-by: Tamás Zolnai 
Tested-by: Tamás Zolnai 
(cherry picked from commit eb384cf3792e3efc2473f26eee86b335804f2f9b)
Reviewed-on: https://gerrit.libreoffice.org/57645
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 0bc4db911c28..16d81440a0dd 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -215,7 +215,7 @@ void SvxCharacterMap::SetChar( sal_UCS4 c )
 
 sal_UCS4 SvxCharacterMap::GetChar() const
 {
-return m_pShowSet->GetSelectCharacter();
+   return (m_pShowChar->GetText()).toChar();
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source

2018-06-29 Thread Miklos Vajna
 cui/source/options/personalization.cxx |   14 +++---
 cui/source/options/personalization.hxx |4 +++-
 2 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit ec8e973f7e681b0ae25e4b781918dd98ea0e8176
Author: Miklos Vajna 
Date:   Mon Jun 4 16:28:22 2018 +0200

tdf#117866 cui: avoid deadlock in personalization dialog

The deadlock happened as the main thread wanted to join
SearchAndParseThread (while owning the solar mutex), but
SearchAndParseThread wanted to take the solar mutex to import a graphic.

Fix the deadlock by checking for the termination flag earlier, so we
don't take any new mutexes if termination was requested already.

(cherry picked from commit 766c85a4f67f5d50645340e31cebd5956998c6fc)

Related: tdf#117866 cui: use std::atomic for thread termination flag

(cherry picked from commit f4ac7b5a084a7cf483bb89a2fa411f9df70df4d0)

tdf#117866 cui personalization: fix a possible race

The case when the thread is re-scheduled exactly after checking for
m_bExecute but before taking the solar mutex.

(cherry picked from commit f4c73f90da2a2c31f0d29572180aa97e10c3dbad)

Change-Id: Idddaadadc693610d9f31a14300b22aff8d452756
Reviewed-on: https://gerrit.libreoffice.org/55347
Reviewed-by: Luboš Luňák 
Tested-by: Jenkins

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index a9ff29edf078..dab788d8b824 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -99,7 +99,13 @@ SelectPersonaDialog::~SelectPersonaDialog()
 void SelectPersonaDialog::dispose()
 {
 if (m_pSearchThread.is())
+{
+// Release the solar mutex, so the thread is not affected by the race
+// when it's after the m_bExecute check but before taking the solar
+// mutex.
+SolarMutexReleaser aReleaser;
 m_pSearchThread->join();
+}
 
 m_pEdit.clear();
 m_pSearchButton.clear();
@@ -772,14 +778,16 @@ void SearchAndParseThread::execute()
 continue;
 }
 INetURLObject aURLObj( sPreviewFile );
+
+// Stop the thread if requested -- before taking the solar mutex.
+if( !m_bExecute )
+return;
+
 // for VCL to be able to create bitmaps / do visual changes in the 
thread
 SolarMutexGuard aGuard;
 aFilter.ImportGraphic( aGraphic, aURLObj );
 Bitmap aBmp = aGraphic.GetBitmap();
 
-if( !m_bExecute )
-return;
-
 m_pPersonaDialog->SetImages( Image( aBmp ), nIndex++ );
 m_pPersonaDialog->setOptimalLayoutSize();
 m_pPersonaDialog->AddPersonaSetting( aPersonaSetting );
diff --git a/cui/source/options/personalization.hxx 
b/cui/source/options/personalization.hxx
index 9d5e057c8c34..5153fc98b1b5 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define CATEGORYCOUNT 6// Number of persona categories
 
@@ -119,7 +120,8 @@ private:
 
 VclPtr m_pPersonaDialog;
 OUString m_aURL;
-bool m_bExecute, m_bDirectURL;
+std::atomic m_bExecute;
+bool m_bDirectURL;
 
 virtual ~SearchAndParseThread() override;
 virtual void execute() override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source

2018-05-27 Thread Miklos Vajna
 cui/source/options/optgdlg.cxx |9 +
 cui/source/options/optgdlg.hxx |1 +
 2 files changed, 10 insertions(+)

New commits:
commit 6e37f748096a7fd7d7a3a07b2393c5f8960cfeb5
Author: Miklos Vajna 
Date:   Wed May 23 17:54:37 2018 +0200

tdf#104086 cui: enable OpenGL when ignoring its blacklist

"Ignore OpenGL blacklist" is called "force OpenGL" in the code, so it
make sense that OpenGLHelper::isVCLOpenGLEnabled() returns true in that
case. But the UI suggested that enabling ignore doesn't enable OpenGL
itself.

Fix this by auto-checking the parent UI widget when enabling the
blacklist.

(cherry picked from commit 8118a5d2eb1524768784adc0b143b8cc1b9f3f61)

Conflicts:
cui/source/options/optgdlg.cxx

Change-Id: I16bec69aebd645858260850f15ea8e687566fd0e
Reviewed-on: https://gerrit.libreoffice.org/54763
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 1c90931c7afb..38acc1d22b4f 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -663,6 +663,8 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const 
SfxItemSet& rSet)
 
 #endif
 
+m_pForceOpenGL->SetToggleHdl(LINK(this, OfaViewTabPage, 
OnForceOpenGLToggled));
+
 // Set known icon themes
 OUString sAutoStr( m_pIconStyleLB->GetEntry( 0 ) );
 m_pIconStyleLB->Clear();
@@ -739,6 +741,13 @@ IMPL_LINK_NOARG( OfaViewTabPage, OnAntialiasingToggled, 
CheckBox&, void )
 }
 #endif
 
+IMPL_LINK_NOARG(OfaViewTabPage, OnForceOpenGLToggled, CheckBox&, void)
+{
+if (m_pForceOpenGL->IsChecked())
+// Ignoring the opengl blacklist implies that opengl is on.
+m_pUseOpenGL->Check();
+}
+
 VclPtr OfaViewTabPage::Create( vcl::Window* pParent, const 
SfxItemSet* rAttrSet )
 {
 return VclPtr::Create(pParent, *rAttrSet);
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index ceba711ede24..b7e47e722edc 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -121,6 +121,7 @@ private:
 #if defined( UNX )
 DECL_LINK( OnAntialiasingToggled, CheckBox&, void );
 #endif
+DECL_LINK(OnForceOpenGLToggled, CheckBox&, void);
 void UpdateOGLStatus();
 
 public:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source

2018-04-26 Thread Miklos Vajna
 cui/source/options/personalization.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 980e19af46dae68c800d55582e8f6b2c7fdd
Author: Miklos Vajna 
Date:   Tue Apr 24 17:44:54 2018 +0200

tdf#113377 cui personalization: fix calling into VCL without necessary 
locking

We assume the SolarMutex is always taken when doing GL calls, but
putting DBG_TESTSOLARMUTEX() into WinOpenGLContext::makeCurrent()
pointed out two places in the persona code where this invariant wasn't
hold, fix those.

Opening the dialog and downloading previews of one category, then
clicking on an other button to download previews of an other category no
longer results in a crash while calling glBindFramebuffer() with this.

(cherry picked from commit 336d91a6f2bc12ff0342f984cdbb2cf64abd0b56)

Change-Id: Ib8148a709f89c2dc44da102e2023cc61ba890744
Reviewed-on: https://gerrit.libreoffice.org/53434
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 9b3e482b55d2..a9ff29edf078 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -252,6 +252,8 @@ void SelectPersonaDialog::AddPersonaSetting( OUString const 
& rPersonaSetting )
 
 void SelectPersonaDialog::ClearSearchResults()
 {
+// for VCL to be able to destroy bitmaps
+SolarMutexGuard aGuard;
 m_vPersonaSettings.clear();
 m_aSelectedPersona.clear();
 for(VclPtr & nIndex : m_vResultList)
@@ -770,14 +772,14 @@ void SearchAndParseThread::execute()
 continue;
 }
 INetURLObject aURLObj( sPreviewFile );
+// for VCL to be able to create bitmaps / do visual changes in the 
thread
+SolarMutexGuard aGuard;
 aFilter.ImportGraphic( aGraphic, aURLObj );
 Bitmap aBmp = aGraphic.GetBitmap();
 
 if( !m_bExecute )
 return;
 
-// for VCL to be able to do visual changes in the thread
-SolarMutexGuard aGuard;
 m_pPersonaDialog->SetImages( Image( aBmp ), nIndex++ );
 m_pPersonaDialog->setOptimalLayoutSize();
 m_pPersonaDialog->AddPersonaSetting( aPersonaSetting );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source

2018-04-16 Thread Caolán McNamara
 cui/source/factory/init.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cc34e1c5d6a10d5a7dc315080b26bce848d3aa32
Author: Caolán McNamara 
Date:   Mon Apr 16 09:21:12 2018 +0100

Resolves: tdf#116138 insert special char problem in chapter numbering

Change-Id: If79d23d7c5e99a88d0026295db002c25c1b07ff3
Reviewed-on: https://gerrit.libreoffice.org/52944
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/factory/init.cxx b/cui/source/factory/init.cxx
index d11370702024..045333f113d3 100644
--- a/cui/source/factory/init.cxx
+++ b/cui/source/factory/init.cxx
@@ -27,7 +27,7 @@ extern "C"
 SAL_DLLPUBLIC_EXPORT bool GetSpecialCharsForEdit(vcl::Window* i_pParent, const 
vcl::Font& i_rFont, OUString& o_rResult)
 {
 bool bRet = false;
-ScopedVclPtrInstance aDlg(i_pParent);
+ScopedVclPtrInstance aDlg(i_pParent, nullptr, false);
 aDlg->DisableFontSelection();
 aDlg->SetCharFont(i_rFont);
 if ( aDlg->Execute() == RET_OK )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source include/svtools

2018-04-12 Thread Katarina Behrens
 cui/source/inc/treeopt.hxx|   13 +++--
 cui/source/options/optjava.cxx|   22 +-
 cui/source/options/optjava.hxx|4 
 cui/source/options/treeopt.cxx|   20 +++-
 include/svtools/restartdialog.hxx |2 ++
 5 files changed, 49 insertions(+), 12 deletions(-)

New commits:
commit f8d654bba844050a01a232eb8013561da57ed6e0
Author: Katarina Behrens 
Date:   Thu Mar 1 12:23:21 2018 +0100

After Java settings have changed, restart LibO for real

Previously restart LibO dialog was shown, but did nothing. I haven't
found an easy way to close all frames with 3 modal dialogs opened, so
now restart dialog simply pops up later (after user bonks OK button
on Tools > Options dialog)

Change-Id: I6e61fa1fc41199c2f16cb80da771202c255f3810
Reviewed-on: https://gerrit.libreoffice.org/50566
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 
(cherry picked from commit 683a68cb5106e99db0fbe892b5784d837cf8cb27)
Reviewed-on: https://gerrit.libreoffice.org/50829
Reviewed-by: Noel Grandin 
Reviewed-by: Thorsten Behrens 

diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index efad9eb74137..29870a16bc88 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -24,6 +24,8 @@
 
 #include 
 
+#include 
+#include 
 #include 
 
 class SfxModule;
@@ -129,14 +131,16 @@ class SvxColorTabPage;
 class OfaTreeOptionsDialog final: public SfxModalDialog
 {
 private:
-SvTreeListEntry*pCurrentPageEntry;
-
 VclPtr   pOkPB;
 VclPtr pBackPB;
 
 VclPtr  pTreeLB;
 VclPtr pTabBox;
 
+VclPtrm_pParent;
+
+SvTreeListEntry*   pCurrentPageEntry;
+
 OUString   sTitle;
 OUString   sNotLoadedError;
 
@@ -146,6 +150,9 @@ private:
 // check "for the current document only" and set focus to "Western" 
languages box
 bool   bIsForSetDocumentLanguage;
 
+bool   bNeedsRestart;
+svtools::RestartReason eRestartReason;
+
 css::uno::Reference < css::awt::XContainerWindowProvider >
 m_xContainerWinProvider;
 
@@ -192,6 +199,8 @@ public:
 
 // helper functions to call the language settings TabPage from the 
SpellDialog
 static void ApplyLanguageOptions(const SfxItemSet& rSet);
+
+voidSetNeedsRestart( svtools::RestartReason eReason );
 };
 
 // class ExtensionsTabPage ---
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index b3443d7734c4..150a13011480 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -26,6 +26,7 @@
 
 #include "optaboutconfig.hxx"
 #include "optjava.hxx"
+#include 
 #include 
 
 #include 
@@ -126,6 +127,7 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( vcl::Window* 
pParent, const SfxItemSet&
 get(m_pExperimentalCB, "experimental");
 get(m_pMacroCB, "macrorecording");
 get(m_pExpertConfigBtn, "expertconfig");
+m_pParentDlg.reset( 
dynamic_cast(getNonLayoutParent(pParent)) );
 m_sAccessibilityText = get("a11y")->GetText();
 m_sAddDialogText = get("selectruntime")->GetText();
 
@@ -192,6 +194,7 @@ void SvxJavaOptionsPage::dispose()
 
 jfw_unlock();
 #endif
+m_pParentDlg.clear();
 m_pJavaEnableCB.clear();
 m_pJavaBox.clear();
 m_pJavaPathText.clear();
@@ -287,8 +290,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl, 
Button*, void)
 aParameterList = m_pParamDlg->GetParameters();
 if ( jfw_isVMRunning() )
 {
-SolarMutexGuard aGuard;
-
svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_ASSIGNING_JAVAPARAMETERS);
+RequestRestart( 
svtools::RESTART_REASON_ASSIGNING_JAVAPARAMETERS );
 }
 }
 }
@@ -327,8 +329,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl, 
Button*, void)
 sClassPath = m_pPathDlg->GetClassPath();
 if ( jfw_isVMRunning() )
 {
-SolarMutexGuard aGuard;
-
svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_ASSIGNING_FOLDERS);
+RequestRestart( svtools::RESTART_REASON_ASSIGNING_FOLDERS );
 }
 }
 }
@@ -559,6 +560,12 @@ void SvxJavaOptionsPage::AddFolder( const OUString& 
_rFolder )
 #endif
 }
 
+void SvxJavaOptionsPage::RequestRestart( svtools::RestartReason eReason )
+{
+if ( m_pParentDlg )
+m_pParentDlg->SetNeedsRestart( eReason );
+}
+
 
 VclPtr SvxJavaOptionsPage::Create( vcl::Window* pParent, const 
SfxItemSet* rAttrSet )
 {
@@ -575,8 +582,7 @@ bool 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source cui/uiconfig

2018-03-08 Thread Katarina Behrens
 cui/source/options/optgenrl.cxx |   14 +-
 cui/source/options/treeopt.cxx  |7 +++
 cui/uiconfig/ui/optuserpage.ui  |7 +--
 3 files changed, 25 insertions(+), 3 deletions(-)

New commits:
commit 1bf5ced5335e110f5e402d292e6c31bac617a655
Author: Katarina Behrens 
Date:   Tue Feb 20 10:08:55 2018 +0100

tdf#115015: make crypto settings better fit allocated space

Oh dear how much do I dislike fixed size dialogs. Everytime they
are enlarged to fit new content (esp. gtk3 is rather space-greedy
there) someone starts to whine the dialog is now too large

Doing what e6d7d7375221 does is not really an option, since there
are some 30+ tabpages to try and test for optimal size here.

And two more squashed commits:

tdf#1155015: Make sure checkbox text really wraps

for :wrap property to be effective, a reasonable height request is
needed so the text is not forced into single line again

tdf#115994: Extensions' option pages need fixed pref. size

as they are fixed size .xdl-based dialogs mostly
But because of tdf#115015 calculate this preferred size as approx.
14 text edits + some padding to make sure crypto settings will fit
the allocated space

Change-Id: I3ffb2d794f76781eb62186093b928289593585cf
Reviewed-on: https://gerrit.libreoffice.org/50596
Tested-by: Jenkins 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 0816a8c49821..eca06bb66f6a 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -302,7 +302,7 @@ void SvxGeneralTabPage::InitCryptography()
 {
 #if HAVE_FEATURE_GPGME
 m_pCryptoFrame->Show();
-// unused yet, I just wanted to see if this delivers the desired results
+
 uno::Reference< xml::crypto::XSEInitializer > xSEInitializer;
 try
 {
@@ -321,6 +321,18 @@ void SvxGeneralTabPage::InitCryptography()
 m_pEncryptionKeyLB->InsertEntry( xCert->getIssuerName());
 }
 }
+
+ //tdf#115015: wrap checkbox text and listboxes if necessary
+ Size aPrefSize(m_pEncryptToSelfCB->get_preferred_size());
+ Size 
aSize(m_pEncryptToSelfCB->CalcMinimumSize(40*approximate_char_width()));
+ if (aPrefSize.Width() > aSize.Width())
+ {
+ m_pSigningKeyLB->set_width_request(aSize.Width());
+ m_pEncryptionKeyLB->set_width_request(aSize.Width());
+ m_pEncryptToSelfCB->set_width_request(aSize.Width());
+ m_pEncryptToSelfCB->set_height_request(aSize.Height());
+ }
+
 }
 }
 catch ( uno::Exception const & )
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 076a000d86b2..fccf0c14df59 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -490,9 +491,15 @@ void OfaTreeOptionsDialog::InitWidgets()
 get(pTabBox, "box");
 Size aSize(pTabBox->LogicToPixel(Size(278, 259), 
MapMode(MapUnit::MapAppFont)));
 pTabBox->set_width_request(aSize.Width());
+#if HAVE_FEATURE_GPGME
+// tdf#115015: make enough space for crypto settings (approx. 14 text 
edits + padding)
+pTabBox->set_height_request((Edit::GetMinimumEditSize().Height() + 6) * 
14);
+#else
 pTabBox->set_height_request(aSize.Height() - 
get_action_area()->get_preferred_size().Height());
+#endif
 pTreeLB->set_width_request(pTreeLB->approximate_char_width() * 25);
 pTreeLB->set_height_request(pTabBox->get_height_request());
+
 }
 
 // Ctor() with Frame -
diff --git a/cui/uiconfig/ui/optuserpage.ui b/cui/uiconfig/ui/optuserpage.ui
index 96c0a77cfad0..ac080f43b32c 100644
--- a/cui/uiconfig/ui/optuserpage.ui
+++ b/cui/uiconfig/ui/optuserpage.ui
@@ -883,8 +883,9 @@
 
 
   
-False
 True
+False
+True
 liststore1
   
   
@@ -896,6 +897,7 @@
   
 True
 False
+True
 liststore1
   
   
@@ -904,10 +906,11 @@
   
 
 
-  
+  
 When encrypting documents, always encrypt 
to self
 True
 True
+0
 False
 True
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source

2018-02-13 Thread Tamás Zolnai
 cui/source/dialogs/sdrcelldlg.cxx |2 ++
 cui/source/inc/sdrcelldlg.hxx |1 +
 2 files changed, 3 insertions(+)

New commits:
commit 10a5ea8f6365236fcc1d31b940113b3363f56209
Author: Tamás Zolnai 
Date:   Wed Feb 7 15:54:41 2018 +0100

tdf#115506: Crash when trying to set pattern fill for tables in Impress

Setting pattern list was missed in this specific dialog.

Change-Id: I9f47e9e0dd4f99bf5403c70685508b0f14a5bd61
Reviewed-on: https://gerrit.libreoffice.org/49361
Reviewed-by: Julien Nabet 
Tested-by: Jenkins 
(cherry picked from commit de8a1b4f6c8fcca9fc9cc5ad83c393ecd7292f76)
Reviewed-on: https://gerrit.libreoffice.org/49404
Reviewed-by: Katarina Behrens 

diff --git a/cui/source/dialogs/sdrcelldlg.cxx 
b/cui/source/dialogs/sdrcelldlg.cxx
index 7011a4de1d9c..7789ddd64c13 100644
--- a/cui/source/dialogs/sdrcelldlg.cxx
+++ b/cui/source/dialogs/sdrcelldlg.cxx
@@ -33,6 +33,7 @@ SvxFormatCellsDialog::SvxFormatCellsDialog( vcl::Window* 
pParent, const SfxItemS
 , mpGradientList(pModel->GetGradientList())
 , mpHatchingList(pModel->GetHatchList())
 , mpBitmapList(pModel->GetBitmapList())
+, mpPatternList(pModel->GetPatternList())
 , m_nAreaPageId(0)
 {
 AddTabPage("name", RID_SVXPAGE_CHAR_NAME);
@@ -50,6 +51,7 @@ void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, 
SfxTabPage  )
 rAreaPage.SetGradientList( mpGradientList );
 rAreaPage.SetHatchingList( mpHatchingList );
 rAreaPage.SetBitmapList( mpBitmapList );
+rAreaPage.SetPatternList( mpPatternList );;
 rAreaPage.ActivatePage( mrOutAttrs );
 }
 else if (nId == m_nBorderPageId)
diff --git a/cui/source/inc/sdrcelldlg.hxx b/cui/source/inc/sdrcelldlg.hxx
index f5976be5d7f6..97a2abeec613 100644
--- a/cui/source/inc/sdrcelldlg.hxx
+++ b/cui/source/inc/sdrcelldlg.hxx
@@ -34,6 +34,7 @@ private:
 XGradientListRefmpGradientList;
 XHatchListRef   mpHatchingList;
 XBitmapListRef  mpBitmapList;
+XPatternListRef mpPatternList;
 
 sal_uInt16  m_nAreaPageId;
 sal_uInt16  m_nBorderPageId;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source

2018-02-06 Thread Julien Nabet
 cui/source/options/personalization.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0ca6361e138d21b7151f926609d497afb47e6966
Author: Julien Nabet 
Date:   Sat Feb 3 15:23:48 2018 +0100

tdf#114731: persona html can contain  instead of 

So let's replace all  with  in the retrieved html

Change-Id: I4a90ecc51e7ce6d1e080e6c1b17b82fe9a29d65e
Reviewed-on: https://gerrit.libreoffice.org/49179
Tested-by: Julien Nabet 
Tested-by: Jenkins 
(cherry picked from commit 2e6bbc04d906ed308fc5ca769bad7b8b4676594e)
Reviewed-on: https://gerrit.libreoffice.org/49285
Reviewed-by: Katarina Behrens 

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index c75a78c8ef2e..9b3e482b55d2 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -553,10 +553,13 @@ static OUString searchValue( const OString , 
sal_Int32 from, const OStri
 }
 
 /// Parse the Persona web page, and find where to get the bitmaps + the color 
values.
-static bool parsePersonaInfo( const OString , OUString *pHeaderURL, 
OUString *pFooterURL,
+static bool parsePersonaInfo( const OString , OUString *pHeaderURL, 
OUString *pFooterURL,
   OUString *pTextColor, OUString *pAccentColor, 
OUString *pPreviewURL,
   OUString *pName )
 {
+// tdf#115417: buffer retrieved from html response can contain  or 

+// let's replace the whole buffer with last one so we can treat it easily
+OString rBuffer = rBufferArg.replaceAll(OString(""), 
OString(""));
 // it is the first attribute that contains "persona="
 sal_Int32 persona = rBuffer.indexOf( "data-browsertheme=\"{" );
 if ( persona < 0 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source

2018-02-04 Thread Caolán McNamara
 cui/source/tabpages/border.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6ff4bf9a2720b504e5134f5b34ac6c3b51fefd1f
Author: Caolán McNamara 
Date:   Fri Feb 2 21:12:31 2018 +

Resolves: tdf#115369 wrong cell shadow icons

regression from...

commit 910f91a3e5228f26f0692f870a3fd3919835eb27
Author: Caolán McNamara 
Date:   Wed Dec 21 13:04:30 2016 +

unwind IL_SDW_BITMAPS ImageList

Change-Id: I9ecb5c45c240af0214666c56401abb07eb99e5f1
Reviewed-on: https://gerrit.libreoffice.org/49167
Tested-by: Jenkins 
Reviewed-by: Andras Timar 

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 79416476b750..ce41f82989e7 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -170,8 +170,8 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, 
const SfxItemSet& rCore
 {
 RID_SVXBMP_SHADOWNONE,
 RID_SVXBMP_SHADOW_BOT_RIGHT,
-RID_SVXBMP_SHADOW_BOT_LEFT,
 RID_SVXBMP_SHADOW_TOP_RIGHT,
+RID_SVXBMP_SHADOW_BOT_LEFT,
 RID_SVXBMP_SHADOW_TOP_LEFT
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source vcl/source

2018-01-08 Thread Xisco Fauli
 cui/source/options/personalization.cxx |4 
 vcl/source/window/msgbox.cxx   |2 ++
 2 files changed, 6 insertions(+)

New commits:
commit 8fb6d980868bc08b1eef4c95bd820131c2b03640
Author: Xisco Fauli 
Date:   Thu Jan 4 12:41:07 2018 +0100

tdf#114818 hold the mutex before executing the error dialog

Also add an assert to ErrorBox to ensure the mutex is acquired

Change-Id: I3e426024dad6ddfc5cffc7861b0cba9e8989c018
Reviewed-on: https://gerrit.libreoffice.org/47388
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 
(cherry picked from commit 0ddd15c1134dde249552ebe763c1cd005e8b4591)
Reviewed-on: https://gerrit.libreoffice.org/47570
Reviewed-by: Michael Stahl 

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index d18d56b06fb6..c75a78c8ef2e 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -702,6 +702,7 @@ void SearchAndParseThread::execute()
 {
 // in case of a returned CommandFailedException
 // SimpleFileAccess serves it, returning an empty stream
+SolarMutexGuard aGuard;
 sError = CuiResId(RID_SVXSTR_SEARCHERROR);
 sError = sError.replaceAll("%1", m_aURL);
 m_pPersonaDialog->SetProgress( OUString() );
@@ -714,6 +715,7 @@ void SearchAndParseThread::execute()
 {
 // a catch all clause, in case the exception is not
 // served elsewhere
+SolarMutexGuard aGuard;
 sError = CuiResId(RID_SVXSTR_SEARCHERROR);
 sError = sError.replaceAll("%1", m_aURL);
 m_pPersonaDialog->SetProgress( OUString() );
@@ -754,6 +756,7 @@ void SearchAndParseThread::execute()
 {
 if( m_bDirectURL )
 {
+SolarMutexGuard aGuard;
 sError = CuiResId(RID_SVXSTR_SEARCHERROR);
 sError = sError.replaceAll("%1", m_aURL);
 m_pPersonaDialog->SetProgress( OUString() );
@@ -837,6 +840,7 @@ void SearchAndParseThread::execute()
 }
 catch ( const uno::Exception & )
 {
+SolarMutexGuard aGuard;
 sError = CuiResId( RID_SVXSTR_SEARCHERROR );
 sError = sError.replaceAll("%1", m_aURL);
 m_pPersonaDialog->SetProgress( OUString() );
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 67b3edf1df37..e45dfd0dee4f 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -433,6 +433,7 @@ OUString WarningBox::GetStandardText()
 ErrorBox::ErrorBox( vcl::Window* pParent, const OUString& rMessage ) :
 MessBox( pParent, MessBoxStyle::Ok | MessBoxStyle::DefaultOk, 0, 
OUString(), rMessage )
 {
+DBG_TESTSOLARMUTEX();
 // Default Text is the display title from the application
 if ( GetText().isEmpty() )
 SetText( GetStandardText() );
@@ -450,6 +451,7 @@ ErrorBox::ErrorBox( vcl::Window* pParent, MessBoxStyle 
nStyle, WinBits nWinBits,
 const OUString& rMessage ) :
 MessBox( pParent, nStyle, nWinBits, OUString(), rMessage )
 {
+DBG_TESTSOLARMUTEX();
 // Default Text is the display title from the application
 if ( GetText().isEmpty() )
 SetText( GetStandardText() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source

2017-12-31 Thread Maxim Monastirsky
 cui/source/customize/SvxConfigPageHelper.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5bd8887e8def134ba59b9524f9d6c85dad14c693
Author: Maxim Monastirsky 
Date:   Thu Dec 21 12:50:42 2017 +0200

tdf#106784 Also handle automatic icon size

... like before b1426b5b502fd591402d666994e3f1fb3a8ad959
("tdf#95014 initial support for 32 px icons in toolbar").
The original code used SvtMiscOptions::AreCurrentSymbolsLarge()
which calls GetCurrentSymbolsSize() internally, thus properly
resolves the icon size, when the current setting is "automatic".

Change-Id: Iabcbbcff666eecc2e7534eb1533610f08ac28bf1
Reviewed-on: https://gerrit.libreoffice.org/46899
Tested-by: Jenkins 
Reviewed-by: Maxim Monastirsky 
(cherry picked from commit 1d55c1baed9977bad449691012807c6f09e2fca8)
Reviewed-on: https://gerrit.libreoffice.org/47027
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/customize/SvxConfigPageHelper.cxx 
b/cui/source/customize/SvxConfigPageHelper.cxx
index 0a182e13ec1b..05b801da9081 100644
--- a/cui/source/customize/SvxConfigPageHelper.cxx
+++ b/cui/source/customize/SvxConfigPageHelper.cxx
@@ -68,11 +68,11 @@ void SvxConfigPageHelper::InitImageType()
 css::ui::ImageType::COLOR_NORMAL |
 css::ui::ImageType::SIZE_DEFAULT;
 
-if (SvtMiscOptions().GetSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE)
+if (SvtMiscOptions().GetCurrentSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE)
 {
 theImageType |= css::ui::ImageType::SIZE_LARGE;
 }
-else if (SvtMiscOptions().GetSymbolsSize() == SFX_SYMBOLS_SIZE_32)
+else if (SvtMiscOptions().GetCurrentSymbolsSize() == SFX_SYMBOLS_SIZE_32)
 {
 theImageType |= css::ui::ImageType::SIZE_32;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source

2017-12-26 Thread Tor Lillqvist
 cui/source/options/optgenrl.cxx |   17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 29840645e2cb8231040bcbac1b1fe98f494c92c9
Author: Tor Lillqvist 
Date:   Fri Dec 22 15:23:43 2017 +0200

Avoid crash without GPG

Change-Id: I5489012544fdf736784608b274359ea99f9ffe45
(cherry picked from commit 1b73ed91e1cce20b3b552a36d449fb96cc57bf4f)
Reviewed-on: https://gerrit.libreoffice.org/46977
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 

diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index c25144f04266..0816a8c49821 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -308,15 +308,18 @@ void SvxGeneralTabPage::InitCryptography()
 {
 xSEInitializer = xml::crypto::GPGSEInitializer::create( 
comphelper::getProcessComponentContext() );
 uno::Reference xSC = 
xSEInitializer->createSecurityContext( OUString() );
-uno::Reference xSE = 
xSC->getSecurityEnvironment();
-uno::Sequence xCertificates = 
xSE->getPersonalCertificates();
-
-if (xCertificates.hasElements())
+if (xSC.is())
 {
-for (auto& xCert : xCertificates)
+uno::Reference xSE = 
xSC->getSecurityEnvironment();
+uno::Sequence 
xCertificates = xSE->getPersonalCertificates();
+
+if (xCertificates.hasElements())
 {
-m_pSigningKeyLB->InsertEntry( xCert->getIssuerName());
-m_pEncryptionKeyLB->InsertEntry( xCert->getIssuerName());
+for (auto& xCert : xCertificates)
+{
+m_pSigningKeyLB->InsertEntry( xCert->getIssuerName());
+m_pEncryptionKeyLB->InsertEntry( xCert->getIssuerName());
+}
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - cui/source cui/uiconfig

2017-12-18 Thread Katarina Behrens
 cui/source/inc/cuioptgenrl.hxx  |6 
 cui/source/options/optgenrl.cxx |   56 ++--
 cui/uiconfig/ui/optuserpage.ui  |   27 +--
 3 files changed, 73 insertions(+), 16 deletions(-)

New commits:
commit 5aa5843d4dc668899776192d8200b06a6156
Author: Katarina Behrens 
Date:   Tue Dec 12 14:03:05 2017 +0100

List private GPG keys in crypto config dialog

Change-Id: I7cb6a14adcc5424b432589120c66deeddf86b652
Reviewed-on: https://gerrit.libreoffice.org/46691
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 
(cherry picked from commit e0c3e356fd9151819db13d844f87ec200e2dbee3)
Reviewed-on: https://gerrit.libreoffice.org/46758
Tested-by: Jenkins 

diff --git a/cui/source/inc/cuioptgenrl.hxx b/cui/source/inc/cuioptgenrl.hxx
index 0c56b6cdcde6..b612ccf687ff 100644
--- a/cui/source/inc/cuioptgenrl.hxx
+++ b/cui/source/inc/cuioptgenrl.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -40,6 +41,10 @@ class SvxGeneralTabPage : public SfxTabPage
 private:
 // the "Use data for document properties" checkbox
 VclPtr m_pUseDataCB;
+VclPtr m_pCryptoFrame;
+VclPtr m_pSigningKeyLB;
+VclPtr m_pEncryptionKeyLB;
+VclPtr m_pEncryptToSelfCB;
 // rows
 struct Row;
 std::vector vRows;
@@ -56,6 +61,7 @@ private:
 voidSetData_Impl();
 
 void InitControls ();
+void InitCryptography();
 void SetLinks ();
 
 protected:
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 5750cc9ff7a0..b63fbf580b69 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -211,22 +212,20 @@ SvxGeneralTabPage::SvxGeneralTabPage(vcl::Window* 
pParent, const SfxItemSet& rCo
 : SfxTabPage(pParent, "OptUserPage", "cui/ui/optuserpage.ui", )
 {
 get(m_pUseDataCB, "usefordocprop");
+
+get(m_pCryptoFrame, "cryptography");
+get(m_pSigningKeyLB, "signingkey");
+get(m_pEncryptionKeyLB, "encryptionkey");
+get(m_pEncryptToSelfCB, "encrypttoself");
 InitControls();
-SetExchangeSupport(); // this page needs ExchangeSupport
-SetLinks();
 #if HAVE_FEATURE_GPGME
-// unused yet, I just wanted to see if this delivers the desired results
-uno::Reference< xml::crypto::XSEInitializer > xSEInitializer;
-try
-{
-xSEInitializer = xml::crypto::GPGSEInitializer::create( 
comphelper::getProcessComponentContext() );
-uno::Reference xSC = 
xSEInitializer->createSecurityContext( OUString() );
-// completely bogus, this is just to appease loplugins
-xSEInitializer->freeSecurityContext( xSC );
-}
-catch ( uno::Exception const & )
-{}
+InitCryptography();
+#else
+m_pCryptoFrame->Hide();
 #endif
+
+SetExchangeSupport(); // this page needs ExchangeSupport
+SetLinks();
 }
 
 SvxGeneralTabPage::~SvxGeneralTabPage()
@@ -237,6 +236,10 @@ SvxGeneralTabPage::~SvxGeneralTabPage()
 void SvxGeneralTabPage::dispose()
 {
 m_pUseDataCB.clear();
+m_pSigningKeyLB.clear();
+m_pEncryptionKeyLB.clear();
+m_pEncryptToSelfCB.clear();
+m_pCryptoFrame.clear();
 SfxTabPage::dispose();
 }
 
@@ -295,6 +298,33 @@ void SvxGeneralTabPage::InitControls ()
 }
 }
 
+void SvxGeneralTabPage::InitCryptography()
+{
+#if HAVE_FEATURE_GPGME
+m_pCryptoFrame->Show();
+// unused yet, I just wanted to see if this delivers the desired results
+uno::Reference< xml::crypto::XSEInitializer > xSEInitializer;
+try
+{
+xSEInitializer = xml::crypto::GPGSEInitializer::create( 
comphelper::getProcessComponentContext() );
+uno::Reference xSC = 
xSEInitializer->createSecurityContext( OUString() );
+uno::Reference xSE = 
xSC->getSecurityEnvironment();
+uno::Sequence xCertificates = 
xSE->getPersonalCertificates();
+
+if (xCertificates.hasElements())
+{
+for (auto& xCert : xCertificates)
+{
+m_pSigningKeyLB->InsertEntry( xCert->getIssuerName());
+m_pEncryptionKeyLB->InsertEntry( xCert->getIssuerName());
+}
+}
+}
+catch ( uno::Exception const & )
+{}
+#endif
+
+}
 
 void SvxGeneralTabPage::SetLinks ()
 {
diff --git a/cui/uiconfig/ui/optuserpage.ui b/cui/uiconfig/ui/optuserpage.ui
index ad893936cb0f..96c0a77cfad0 100644
--- a/cui/uiconfig/ui/optuserpage.ui
+++ b/cui/uiconfig/ui/optuserpage.ui
@@ -2,6 +2,17 @@
 
 
   
+  
+
+  
+  
+
+
+  
+No 
key
+  
+
+  
   
 True
 False
@@ -825,7 +836,8 @@
   
 
 
-  
+  
+True
 False
 0
 none
@@ -837,11 +849,13 @@
 12