diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-05-22 14:29:07 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-05-28 16:41:41 +0200 |
commit | a8e7c82a26996e4cbfb42dea5dbe0098046ba701 (patch) | |
tree | d5491b2d81e27b49105919a0b8088a9c1053b5a1 /cui | |
parent | 7ac940d278f9bb3fbb1988a74dfa4909960bd998 (diff) |
lo: disable under-used hyperlink fields that are buggy online.
Reviewed-on: https://gerrit.libreoffice.org/72781
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 418adc09f503a5714f58f56619161fed6d668088)
Change-Id: If2069288fac14c6113754288eb9136449626393d
Reviewed-on: https://gerrit.libreoffice.org/72782
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/hltpbase.cxx | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 4d92ba429528..d47e3792589b 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -36,6 +36,7 @@ #include <dialmgr.hxx> #include <bitmaps.hlst> #include <vcl/builderfactory.hxx> +#include <comphelper/lok.hxx> using namespace ::ucbhelper; @@ -240,27 +241,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 |