cui/source/dialogs/hltpbase.cxx |   47 ++++++++++++++++++++++++++--------------
 1 file changed, 31 insertions(+), 16 deletions(-)

New commits:
commit 418adc09f503a5714f58f56619161fed6d668088
Author:     Michael Meeks <[email protected]>
AuthorDate: Wed May 22 14:29:07 2019 +0100
Commit:     Jan Holesovsky <[email protected]>
CommitDate: Wed May 22 16:16:47 2019 +0200

    lo: disable under-used hyperlink fields that are buggy online.
    
    Change-Id: If2069288fac14c6113754288eb9136449626393d
    Reviewed-on: https://gerrit.libreoffice.org/72781
    Reviewed-by: Jan Holesovsky <[email protected]>
    Tested-by: Jan Holesovsky <[email protected]>

diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index c89cb91dd375..c60a6bf39160 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -242,27 +242,42 @@ void SvxHyperlinkTabPageBase::ShowMarkWnd ()
 // Fill Dialogfields
 void SvxHyperlinkTabPageBase::FillStandardDlgFields ( const SvxHyperlinkItem* 
pHyperlinkItem )
 {
-    // Frame
-    sal_Int32 nPos = mpCbbFrame->GetEntryPos ( 
pHyperlinkItem->GetTargetFrame() );
-    if ( nPos != COMBOBOX_ENTRY_NOTFOUND)
-        mpCbbFrame->SetText ( pHyperlinkItem->GetTargetFrame() );
+    if (!comphelper::LibreOfficeKit::isActive())
+    {
+        // Frame
+        sal_Int32 nPos = mpCbbFrame->GetEntryPos ( 
pHyperlinkItem->GetTargetFrame() );
+        if ( nPos != COMBOBOX_ENTRY_NOTFOUND)
+            mpCbbFrame->SetText ( pHyperlinkItem->GetTargetFrame() );
 
-    // Form
-    OUString aStrFormText = CuiResId( RID_SVXSTR_HYPERDLG_FROM_TEXT );
-    OUString aStrFormButton = CuiResId( RID_SVXSTR_HYPERDLG_FORM_BUTTON );
+        // Form
+        OUString aStrFormText = CuiResId( RID_SVXSTR_HYPERDLG_FROM_TEXT );
 
-    if( pHyperlinkItem->GetInsertMode() & HLINK_HTMLMODE )
-    {
-        mpLbForm->Clear();
-        mpLbForm->InsertEntry( aStrFormText );
-        mpLbForm->SelectEntryPos ( 0 );
+        OUString aStrFormButton = CuiResId( RID_SVXSTR_HYPERDLG_FORM_BUTTON );
+
+        if( pHyperlinkItem->GetInsertMode() & HLINK_HTMLMODE )
+        {
+            mpLbForm->Clear();
+            mpLbForm->InsertEntry( aStrFormText );
+            mpLbForm->SelectEntryPos ( 0 );
+        }
+        else
+        {
+            mpLbForm->Clear();
+            mpLbForm->InsertEntry( aStrFormText );
+            mpLbForm->InsertEntry( aStrFormButton );
+            mpLbForm->SelectEntryPos ( pHyperlinkItem->GetInsertMode() == 
HLINK_BUTTON ? 1 : 0 );
+        }
     }
     else
     {
-        mpLbForm->Clear();
-        mpLbForm->InsertEntry( aStrFormText );
-        mpLbForm->InsertEntry( aStrFormButton );
-        mpLbForm->SelectEntryPos ( pHyperlinkItem->GetInsertMode() == 
HLINK_BUTTON ? 1 : 0 );
+        mpCbbFrame->Hide();
+        mpLbForm->Hide();
+
+        VclPtr<FixedText> pLabel;
+        get(pLabel, "form_label");
+        pLabel->Hide();
+        get(pLabel, "frame_label");
+        pLabel->Hide();
     }
 
     // URL
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to