svx/source/dialog/hyperdlg.cxx |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit ba03709243100b70c9f2fca315c0252e5f03ca0e
Author:     Heiko Tietze <[email protected]>
AuthorDate: Fri Sep 26 12:50:32 2025 +0200
Commit:     Heiko Tietze <[email protected]>
CommitDate: Fri Sep 26 14:34:01 2025 +0200

    Resolves tdf#168548 - Always use vertical tabs for the hyperlink dialog
    
    Dirty hack until the dialog is turned into a true SfxTabDialog
    
    Change-Id: Ia22e6b91db78f1b603d6403d5458e7384eb2b976
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191541
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <[email protected]>

diff --git a/svx/source/dialog/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx
index 6d94d8add6c8..72397c6f8702 100644
--- a/svx/source/dialog/hyperdlg.cxx
+++ b/svx/source/dialog/hyperdlg.cxx
@@ -21,7 +21,7 @@
 #include <svx/svxdlg.hxx>
 #include <sfx2/app.hxx>
 #include <sfx2/sfxsids.hrc>
-
+#include <officecfg/Office/Common.hxx>
 //#                                                                      #
 //# Childwindow-Wrapper-Class                                            #
 //#                                                                      #
@@ -35,6 +35,13 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( vcl::Window* 
_pParent, sal_uInt16 nId,
     mpDlg( nullptr )
 
 {
+    // dirty hack to always show vertical tabs on the hyperlink dialog
+    const bool bVert = 
officecfg::Office::Common::Misc::UseVerticalNotebookbar::get();
+    std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
+        comphelper::ConfigurationChanges::create());
+    officecfg::Office::Common::Misc::UseVerticalNotebookbar::set(true, 
xChanges);
+    xChanges->commit();
+
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
     mpDlg = pFact->CreateSvxHpLinkDlg(this, pBindings, 
_pParent->GetFrameWeld());
     SetController( mpDlg->GetController() );
@@ -61,6 +68,9 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( vcl::Window* 
_pParent, sal_uInt16 nId,
         }
     }
     SetHideNotDelete( true );
+
+    officecfg::Office::Common::Misc::UseVerticalNotebookbar::set(bVert, 
xChanges);
+    xChanges->commit();
 }
 
 SfxChildWinInfo SvxHlinkDlgWrapper::GetInfo() const

Reply via email to