summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-09-17 12:50:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-09-20 21:20:51 +0200
commit94d6fa11d086187b82adf9aa596e0f334827e095 (patch)
tree4a44af903b2572efe89ae5e8aa67bb092644e038
parent3c84b18f4f0fe4058de60b1c62149275ed858b79 (diff)
weld OfaTreeOptionsDialog
including ability to host a vcl::Window based XWindow hierarchy inside a native widget, e.g. the dictionary extensions have option pages Change-Id: I17d933bac12679e10164214a9045b677291a6557 Reviewed-on: https://gerrit.libreoffice.org/79070 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--cui/source/factory/dlgfact.cxx42
-rw-r--r--cui/source/factory/dlgfact.hxx9
-rw-r--r--cui/source/inc/treeopt.hxx57
-rw-r--r--cui/source/options/fontsubs.cxx4
-rw-r--r--cui/source/options/optjava.cxx7
-rw-r--r--cui/source/options/personalization.cxx17
-rw-r--r--cui/source/options/personalization.hxx2
-rw-r--r--cui/source/options/treeopt.cxx510
-rw-r--r--cui/uiconfig/ui/opthtmlpage.ui56
-rw-r--r--cui/uiconfig/ui/optionsdialog.ui41
-rw-r--r--cui/uiconfig/ui/optlanguagespage.ui27
-rw-r--r--cui/uiconfig/ui/optpathspage.ui19
-rw-r--r--cui/uiconfig/ui/optsavepage.ui2
-rw-r--r--cui/uiconfig/ui/optsecuritypage.ui55
-rw-r--r--cui/uiconfig/ui/personalization_tab.ui50
-rw-r--r--extras/source/glade/libreoffice-catalog.xml.in21
-rw-r--r--include/sfx2/sfxdlg.hxx2
-rw-r--r--include/sfx2/tabdlg.hxx6
-rw-r--r--include/vcl/abstdlg.hxx2
-rw-r--r--include/vcl/weld.hxx7
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/uiconfig/scalc/ui/tpviewpage.ui89
-rw-r--r--sd/source/ui/docshell/docshel3.cxx2
-rw-r--r--sd/uiconfig/simpress/ui/optimpressgeneralpage.ui2
-rw-r--r--sfx2/source/appl/appserv.cxx2
-rwxr-xr-xsolenv/bin/native-code.py1
-rw-r--r--solenv/sanitizers/ui/cui.suppr18
-rw-r--r--svx/uiconfig/ui/optgridpage.ui5
-rw-r--r--sw/source/uibase/shells/langhelper.cxx2
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
-rw-r--r--sw/uiconfig/swriter/ui/mailconfigpage.ui5
-rw-r--r--sw/uiconfig/swriter/ui/optcompatpage.ui4
-rw-r--r--sw/uiconfig/swriter/ui/optfonttabpage.ui3
-rw-r--r--sw/uiconfig/swriter/ui/optredlinepage.ui16
-rw-r--r--vcl/source/app/salvtables.cxx6
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx34
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx59
37 files changed, 539 insertions, 649 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 289c79ccf8be..7608d9f8cd3e 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -108,8 +108,6 @@ short CuiAbstractSingleTabController_Impl::Execute()
return m_xDlg->run();
}
-IMPL_ABSTDLG_BASE(CuiVclAbstractDialog_Impl)
-
short AbstractSvxDistributeDialog_Impl::Execute()
{
return m_xDlg->run();
@@ -948,9 +946,9 @@ bool AbstractPasswordToOpenModifyDialog_Impl::IsRecommendToOpenReadonly() const
}
// Create dialogs with simplest interface
-VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog( vcl::Window* pParent, sal_uInt32 nResId )
+VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog(weld::Window* pParent, sal_uInt32 nResId)
{
- VclPtr<Dialog> pDlg;
+ std::unique_ptr<OfaTreeOptionsDialog> xDlg;
switch ( nResId )
{
case SID_OPTIONS_TREEDIALOG :
@@ -961,25 +959,24 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog( vcl::Wind
if (nResId == SID_OPTIONS_TREEDIALOG)
bActivateLastSelection = true;
Reference< frame::XFrame > xFrame;
- VclPtrInstance<OfaTreeOptionsDialog> pOptDlg( pParent, xFrame, bActivateLastSelection );
+ xDlg = std::make_unique<OfaTreeOptionsDialog>(pParent, xFrame, bActivateLastSelection);
if (nResId == SID_OPTIONS_DATABASES)
{
- pOptDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
+ xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
}
else if (nResId == SID_LANGUAGE_OPTIONS)
{
//open the tab page "tools/options/languages"
- pOptDlg->ActivatePage(OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE);
+ xDlg->ActivatePage(OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE);
}
- pDlg.reset(pOptDlg);
}
break;
default:
break;
}
- if ( pDlg )
- return VclPtr<CuiVclAbstractDialog_Impl>::Create( pDlg );
+ if (xDlg)
+ return VclPtr<CuiAbstractController_Impl>::Create(std::move(xDlg));
return nullptr;
}
@@ -988,26 +985,24 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateAboutDialog(weld::Wi
return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<AboutDialog>(pParent));
}
-VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog(vcl::Window* pParent, const Reference< frame::XFrame >& rxFrame,
+VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog(weld::Window* pParent, const Reference< frame::XFrame >& rxFrame,
sal_uInt32 nResId, const OUString& rParameter )
{
- VclPtr<Dialog> pDlg;
- if ( SID_OPTIONS_TREEDIALOG == nResId || SID_OPTIONS_DATABASES == nResId )
+ std::unique_ptr<OfaTreeOptionsDialog> xDlg;
+ if (SID_OPTIONS_TREEDIALOG == nResId || SID_OPTIONS_DATABASES == nResId)
{
// only activate last page if we don't want to activate a special page
bool bActivateLastSelection = ( nResId != SID_OPTIONS_DATABASES && rParameter.isEmpty() );
- VclPtrInstance<OfaTreeOptionsDialog> pOptDlg(pParent, rxFrame, bActivateLastSelection);
+ xDlg = std::make_unique<OfaTreeOptionsDialog>(pParent, rxFrame, bActivateLastSelection);
if ( nResId == SID_OPTIONS_DATABASES )
- pOptDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
+ xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
else if ( !rParameter.isEmpty() )
- pOptDlg->ActivatePage( rParameter );
- pDlg.reset(pOptDlg);
+ xDlg->ActivatePage( rParameter );
}
- if ( pDlg )
- return VclPtr<CuiVclAbstractDialog_Impl>::Create( pDlg );
- else
- return nullptr;
+ if (xDlg)
+ return VclPtr<CuiAbstractController_Impl>::Create(std::move(xDlg));
+ return nullptr;
}
// TabDialog outside the drawing layer
@@ -1594,10 +1589,9 @@ VclPtr<SvxAbstractNewTableDialog> AbstractDialogFactory_Impl::CreateSvxNewTableD
return VclPtr<SvxNewTableDialog>::Create(pParent);
}
-VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateOptionsDialog(
- weld::Window* /*pParent*/, const OUString& rExtensionId )
+VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateOptionsDialog(weld::Window* pParent, const OUString& rExtensionId)
{
- return VclPtr<CuiVclAbstractDialog_Impl>::Create( VclPtr<OfaTreeOptionsDialog>::Create(nullptr /* TODO: pParent*/, rExtensionId ) );
+ return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<OfaTreeOptionsDialog>(pParent, rExtensionId));
}
VclPtr<SvxAbstractInsRowColDlg> AbstractDialogFactory_Impl::CreateSvxInsRowColDlg(weld::Window* pParent, bool bCol, const OString& rHelpId)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 7d579b22ae20..dab0e9ae43d0 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -112,11 +112,6 @@ bool Class::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) \
return pDlg->StartExecuteAsync(rCtx); \
}
-class CuiVclAbstractDialog_Impl : public VclAbstractDialog
-{
- DECL_ABSTDLG_BASE(CuiVclAbstractDialog_Impl,Dialog)
-};
-
class CuiAbstractController_Impl : public VclAbstractDialog
{
std::unique_ptr<weld::DialogController> m_xDlg;
@@ -761,7 +756,7 @@ public:
class AbstractDialogFactory_Impl : public SvxAbstractDialogFactory
{
public:
- virtual VclPtr<VclAbstractDialog> CreateVclDialog( vcl::Window* pParent, sal_uInt32 nResId ) override;
+ virtual VclPtr<VclAbstractDialog> CreateVclDialog(weld::Window* pParent, sal_uInt32 nResId) override;
virtual VclPtr<VclAbstractDialog> CreateAboutDialog(weld::Window* pParent) override;
@@ -775,7 +770,7 @@ public:
virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Widget* pParent,
const SfxItemSet& rAttr,
const css::uno::Reference< css::frame::XFrame >& rFrame) override;
- virtual VclPtr<VclAbstractDialog> CreateFrameDialog(vcl::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame,
+ virtual VclPtr<VclAbstractDialog> CreateFrameDialog(weld::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame,
sal_uInt32 nResId,
const OUString& rParameter ) override;
virtual VclPtr<SfxAbstractTabDialog> CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet) override;
diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index 9afb955b8e70..a70e984bb3c1 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -116,19 +116,19 @@ struct Module;
class ExtensionsTabPage;
class SvxColorTabPage;
-class OfaTreeOptionsDialog final: public SfxModalDialog
+class OfaTreeOptionsDialog final: public SfxOkDialogController
{
private:
- VclPtr<OKButton> pOkPB;
- VclPtr<PushButton> pApplyPB;
- VclPtr<PushButton> pBackPB;
+ std::unique_ptr<weld::Button> xOkPB;
+ std::unique_ptr<weld::Button> xApplyPB;
+ std::unique_ptr<weld::Button> xBackPB;
- VclPtr<SvTreeListBox> pTreeLB;
- VclPtr<VclBox> pTabBox;
+ std::unique_ptr<weld::TreeView> xTreeLB;
+ std::unique_ptr<weld::Container> xTabBox;
- VclPtr<vcl::Window> m_pParent;
+ weld::Window* m_pParent;
- SvTreeListEntry* pCurrentPageEntry;
+ std::unique_ptr<weld::TreeIter> xCurrentPageEntry;
OUString sTitle;
@@ -161,23 +161,23 @@ private:
void ApplyOptions( bool deactivate );
- DECL_STATIC_LINK(OfaTreeOptionsDialog, ExpandedHdl_Impl, SvTreeListBox*, void );
- DECL_LINK(ShowPageHdl_Impl, SvTreeListBox*, void);
- DECL_LINK(BackHdl_Impl, Button*, void);
- DECL_LINK(ApplyHdl_Impl, Button*, void);
- DECL_LINK(OKHdl_Impl, Button*, void);
+ DECL_LINK(ShowPageHdl_Impl, weld::TreeView&, void);
+ DECL_LINK(BackHdl_Impl, weld::Button&, void);
+ DECL_LINK(ApplyHdl_Impl, weld::Button&, void);
+ DECL_LINK(OKHdl_Impl, weld::Button&, void);
void SelectHdl_Impl();
- virtual bool EventNotify( NotifyEvent& rNEvt ) override;
- virtual short Execute() override;
+ virtual short run() override;
+
+ virtual weld::Button& GetOKButton() const override { return *xOkPB; }
+ virtual const SfxItemSet* GetExampleSet() const override { return nullptr; }
public:
- OfaTreeOptionsDialog( vcl::Window* pParent,
+ OfaTreeOptionsDialog(weld::Window* pParent,
const css::uno::Reference< css::frame::XFrame >& _xFrame,
- bool bActivateLastSelection );
- OfaTreeOptionsDialog( vcl::Window* pParent, const OUString& rExtensionId );
+ bool bActivateLastSelection);
+ OfaTreeOptionsDialog(weld::Window* pParent, const OUString& rExtensionId);
virtual ~OfaTreeOptionsDialog() override;
- virtual void dispose() override;
OptionsPageInfo* AddTabPage( sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup );
sal_uInt16 AddGroup( const OUString& rGroupName, SfxShell* pCreateShell,
@@ -199,12 +199,13 @@ public:
namespace com { namespace sun { namespace star { namespace awt { class XWindow; } } } }
namespace com { namespace sun { namespace star { namespace awt { class XContainerWindowEventHandler; } } } }
-class ExtensionsTabPage : public TabPage
+class ExtensionsTabPage
{
private:
+ weld::Container* m_pContainer;
OUString m_sPageURL;
- css::uno::Reference< css::awt::XWindow >
- m_xPage;
+ css::uno::Reference<css::awt::XWindow> m_xPageParent;
+ css::uno::Reference<css::awt::XWindow> m_xPage;
OUString m_sEventHdl;
css::uno::Reference< css::awt::XContainerWindowEventHandler >
m_xEventHdl;
@@ -216,16 +217,18 @@ private:
public:
ExtensionsTabPage(
- vcl::Window* pParent, WinBits nStyle,
+ weld::Container* pParent,
const OUString& rPageURL, const OUString& rEvtHdl,
const css::uno::Reference<
css::awt::XContainerWindowProvider >& rProvider );
- virtual ~ExtensionsTabPage() override;
- virtual void dispose() override;
+ ~ExtensionsTabPage();
+
+ void Show();
+ void Hide();
- virtual void ActivatePage() override;
- virtual void DeactivatePage() override;
+ void ActivatePage();
+ void DeactivatePage();
void ResetPage();
void SavePage();
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 8fad18ebdcfa..b7ffaeabd6a9 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -121,8 +121,8 @@ IMPL_LINK(SvxFontSubstTabPage, HeaderBarClick, int, nColumn, void)
void SvxFontSubstTabPage::setColSizes()
{
- int nW1 = m_xCheckLB->get_pixel_size(m_xCheckLB->get_column_title(4)).Width();
- int nW2 = m_xCheckLB->get_pixel_size(m_xCheckLB->get_column_title(5)).Width();
+ int nW1 = m_xCheckLB->get_pixel_size(m_xCheckLB->get_column_title(3)).Width();
+ int nW2 = m_xCheckLB->get_pixel_size(m_xCheckLB->get_column_title(4)).Width();
int nMax = std::max( nW1, nW2 ) + 6; // width of the longest header + a little offset
int nMin = m_xCheckLB->get_checkbox_column_width();
nMax = std::max(nMax, nMin);
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 41234bfe0e31..5f536acf4d37 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -470,9 +470,9 @@ void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder )
void SvxJavaOptionsPage::RequestRestart(svtools::RestartReason eReason)
{
- VclPtr<OfaTreeOptionsDialog> xParentDlg(static_cast<OfaTreeOptionsDialog*>(GetParentDialog()));
- if (xParentDlg)
- xParentDlg->SetNeedsRestart(eReason);
+ OfaTreeOptionsDialog* pParentDlg(static_cast<OfaTreeOptionsDialog*>(GetDialogController()));
+ if (pParentDlg)
+ pParentDlg->SetNeedsRestart(eReason);
}
VclPtr<SfxTabPage> SvxJavaOptionsPage::Create( TabPageParent pParent, const SfxItemSet* rAttrSet )
@@ -480,7 +480,6 @@ VclPtr<SfxTabPage> SvxJavaOptionsPage::Create( TabPageParent pParent, const SfxI
return VclPtr<SvxJavaOptionsPage>::Create( pParent, *rAttrSet );
}
-
bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* /*rCoreSet*/ )
{
bool bModified = false;
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index ae06e77abf5d..8767c856482a 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -20,6 +20,7 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <vcl/graphicfilter.hxx>
+#include <vcl/virdev.hxx>
#include <vector>
@@ -36,7 +37,7 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage(TabPageParent pParent, cons
for (sal_uInt32 i = 0; i < MAX_DEFAULT_PERSONAS; ++i)
{
OString sDefaultId("default" + OString::number(i));
- m_vDefaultPersonaImages[i] = m_xBuilder->weld_button(sDefaultId);
+ m_vDefaultPersonaImages[i] = m_xBuilder->weld_toggle_button(sDefaultId);
m_vDefaultPersonaImages[i]->connect_clicked(
LINK(this, SvxPersonalizationTabPage, DefaultPersona));
}
@@ -137,7 +138,17 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
INetURLObject aURLObj(gallery + aPreviewFile);
aFilter.ImportGraphic(aGraphic, aURLObj);
- m_vDefaultPersonaImages[nIndex]->set_image(aGraphic.GetXGraphic());
+
+ Size aSize(aGraphic.GetSizePixel());
+ aSize.setWidth(aSize.Width() / 4);
+ aSize.setHeight(aSize.Height() / 1.5);
+ ScopedVclPtr<VirtualDevice> xVirDev
+ = m_vDefaultPersonaImages[nIndex]->create_virtual_device();
+ xVirDev->SetOutputSizePixel(aSize);
+ aGraphic.Draw(xVirDev.get(), Point(0, 0));
+ m_vDefaultPersonaImages[nIndex]->set_image(xVirDev.get());
+ xVirDev.disposeAndClear();
+
m_vDefaultPersonaImages[nIndex]->set_tooltip_text(aName);
m_vDefaultPersonaImages[nIndex++]->show();
foundOne = true;
@@ -153,6 +164,8 @@ IMPL_LINK(SvxPersonalizationTabPage, DefaultPersona, weld::Button&, rButton, voi
{
if (&rButton == m_vDefaultPersonaImages[nIndex].get())
m_aPersonaSettings = m_vDefaultPersonaSettings[nIndex];
+ else
+ m_vDefaultPersonaImages[nIndex]->set_active(false);
}
}
diff --git a/cui/source/options/personalization.hxx b/cui/source/options/personalization.hxx
index 09fb7956003e..9317041409e0 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -22,7 +22,7 @@ class SvxPersonalizationTabPage : public SfxTabPage
private:
std::unique_ptr<weld::RadioButton> m_xNoPersona; ///< Just the default look, without any bitmap
std::unique_ptr<weld::RadioButton> m_xDefaultPersona; ///< Use the built-in bitmap
- std::unique_ptr<weld::Button> m_vDefaultPersonaImages
+ std::unique_ptr<weld::ToggleButton> m_vDefaultPersonaImages
[MAX_DEFAULT_PERSONAS]; ///< Buttons to show the default persona images
OUString m_aPersonaSettings; ///< Header and footer images + color to be set in the settings.
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 8b593e86c362..42bd20cac460 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -444,9 +444,9 @@ struct OptionsPageInfo
sal_uInt16 m_nPageId;
OUString m_sPageURL;
OUString m_sEventHdl;
- VclPtr<ExtensionsTabPage> m_pExtPage;
+ std::unique_ptr<ExtensionsTabPage> m_xExtPage;
- explicit OptionsPageInfo( sal_uInt16 nId ) : m_pPage( nullptr ), m_nPageId( nId ), m_pExtPage( nullptr ) {}
+ explicit OptionsPageInfo( sal_uInt16 nId ) : m_pPage( nullptr ), m_nPageId( nId ) {}
};
struct OptionsGroupInfo
@@ -463,46 +463,36 @@ struct OptionsGroupInfo
};
#define INI_LIST() \
- m_pParent ( pParent ),\
- pCurrentPageEntry ( nullptr ),\
- sTitle ( GetText() ),\
- bForgetSelection ( false ),\
- bIsFromExtensionManager( false ), \
- bIsForSetDocumentLanguage( false ), \
- bNeedsRestart ( false ), \
- eRestartReason( svtools::RESTART_REASON_NONE )
+ , m_pParent ( pParent )\
+ , sTitle ( m_xDialog->get_title() )\
+ , bForgetSelection ( false )\
+ , bIsFromExtensionManager( false ) \
+ , bIsForSetDocumentLanguage( false ) \
+ , bNeedsRestart ( false ) \
+ , eRestartReason( svtools::RESTART_REASON_NONE )
void OfaTreeOptionsDialog::InitWidgets()
{
- VclButtonBox *pButtonBox = get_action_area();
- pButtonBox->sort_native_button_order();
-
- get(pOkPB, "ok");
- get(pApplyPB, "apply");
- get(pBackPB, "revert");
- get(pTreeLB, "pages");
- get(pTabBox, "box");
- Size aSize(pTabBox->LogicToPixel(Size(278, 259), MapMode(MapUnit::MapAppFont)));
- pTabBox->set_width_request(aSize.Width());
+ xOkPB = m_xBuilder->weld_button("ok");
+ xApplyPB = m_xBuilder->weld_button("apply");
+ xBackPB = m_xBuilder->weld_button("revert");
+ xTreeLB = m_xBuilder->weld_tree_view("pages");
+ xTabBox = m_xBuilder->weld_container("box");
+ Size aSize(xTreeLB->get_approximate_digit_width() * 82, xTreeLB->get_height_rows(32));
#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);
+ aSize.setHeight((Edit::GetMinimumEditSize().Height() + 6) * 14);
#else
- pTabBox->set_height_request(aSize.Height() - get_action_area()->get_preferred_size().Height());
+ aSize.setHeight(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());
-
+ xTabBox->set_size_request(aSize.Width(), aSize.Height());
+ xTreeLB->set_size_request(xTreeLB->get_approximate_digit_width() * 30, aSize.Height());
}
// Ctor() with Frame -----------------------------------------------------
-OfaTreeOptionsDialog::OfaTreeOptionsDialog(
- vcl::Window* pParent,
- const Reference< XFrame >& _xFrame,
- bool bActivateLastSelection ) :
-
- SfxModalDialog( pParent, "OptionsDialog", "cui/ui/optionsdialog.ui" ),
+OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, const Reference< XFrame >& _xFrame, bool bActivateLastSelection)
+ : SfxOkDialogController(pParent, "cui/ui/optionsdialog.ui", "OptionsDialog")
INI_LIST()
{
InitWidgets();
@@ -513,13 +503,12 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog(
if (bActivateLastSelection)
ActivateLastSelection();
- pTreeLB->SetAccessibleName(GetDisplayText());
+ xTreeLB->set_accessible_name(m_xDialog->get_title());
}
// Ctor() with ExtensionId -----------------------------------------------
-OfaTreeOptionsDialog::OfaTreeOptionsDialog( vcl::Window* pParent, const OUString& rExtensionId ) :
-
- SfxModalDialog( pParent, "OptionsDialog", "cui/ui/optionsdialog.ui" ),
+OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, const OUString& rExtensionId)
+ : SfxOkDialogController(pParent, "cui/ui/optionsdialog.ui", "OptionsDialog")
INI_LIST()
{
InitWidgets();
@@ -532,20 +521,17 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog( vcl::Window* pParent, const OUString
OfaTreeOptionsDialog::~OfaTreeOptionsDialog()
{
- disposeOnce();
-}
+ xCurrentPageEntry.reset();
-void OfaTreeOptionsDialog::dispose()
-{
- pCurrentPageEntry = nullptr;
- SvTreeListEntry* pEntry = pTreeLB ? pTreeLB->First() : nullptr;
+ std::unique_ptr<weld::TreeIter> xEntry = xTreeLB->make_iterator();
+ bool bEntry = xTreeLB->get_iter_first(*xEntry);
// first children
- while(pEntry)
+ while (bEntry)
{
// if Child (has parent), then OptionsPageInfo
- if(pTreeLB->GetParent(pEntry))
+ if (xTreeLB->get_iter_depth(*xEntry))
{
- OptionsPageInfo *pPageInfo = static_cast<OptionsPageInfo *>(pEntry->GetUserData());
+ OptionsPageInfo *pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xEntry).toInt64());
if(pPageInfo->m_pPage)
{
pPageInfo->m_pPage->FillUserData();
@@ -568,42 +554,39 @@ void OfaTreeOptionsDialog::dispose()
}
}
- pPageInfo->m_pExtPage.disposeAndClear();
+ pPageInfo->m_xExtPage.reset();
delete pPageInfo;
}
- pEntry = pTreeLB->Next(pEntry);
+ bEntry = xTreeLB->iter_next(*xEntry);
}
// and parents
- pEntry = pTreeLB ? pTreeLB->First() : nullptr;
- while(pEntry)
+ bEntry = xTreeLB->get_iter_first(*xEntry);
+ while (bEntry)
{
- if(!pTreeLB->GetParent(pEntry))
+ if (!xTreeLB->get_iter_depth(*xEntry))
{
- OptionsGroupInfo* pGroupInfo = static_cast<OptionsGroupInfo*>(pEntry->GetUserData());
+ OptionsGroupInfo* pGroupInfo = reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xEntry).toInt64());
delete pGroupInfo;
}
- pEntry = pTreeLB->Next(pEntry);
+ bEntry = xTreeLB->iter_next(*xEntry);
}
deleteGroupNames();
- m_pParent.clear();
- pOkPB.clear();
- pApplyPB.clear();
- pBackPB.clear();
- pTreeLB.clear();
- pTabBox.clear();
- SfxModalDialog::dispose();
}
OptionsPageInfo* OfaTreeOptionsDialog::AddTabPage(
sal_uInt16 nId, const OUString& rPageName, sal_uInt16 nGroup )
{
OptionsPageInfo* pPageInfo = new OptionsPageInfo( nId );
- SvTreeListEntry* pParent = pTreeLB->GetEntry( nullptr, nGroup );
- DBG_ASSERT( pParent, "OfaTreeOptionsDialog::AddTabPage(): no group found" );
- SvTreeListEntry* pEntry = pTreeLB->InsertEntry( rPageName, pParent );
- pEntry->SetUserData( pPageInfo );
+
+ std::unique_ptr<weld::TreeIter> xParent = xTreeLB->make_iterator();
+ xTreeLB->get_iter_first(*xParent);
+ xTreeLB->iter_nth_sibling(*xParent, nGroup);
+
+ OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pPageInfo)));;
+ xTreeLB->insert(xParent.get(), -1, &rPageName, &sId, nullptr, nullptr, nullptr, false, nullptr);
+
return pPageInfo;
}
@@ -613,64 +596,71 @@ sal_uInt16 OfaTreeOptionsDialog::AddGroup(const OUString& rGroupName,
SfxModule* pCreateModule,
sal_uInt16 nDialogId )
{
- SvTreeListEntry* pEntry = pTreeLB->InsertEntry(rGroupName);
OptionsGroupInfo* pInfo =
new OptionsGroupInfo( pCreateShell, pCreateModule, nDialogId );
- pEntry->SetUserData(pInfo);
+ OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pInfo)));;
+ xTreeLB->append(sId, rGroupName);
+
sal_uInt16 nRet = 0;
- pEntry = pTreeLB->First();
- while(pEntry)
+ std::unique_ptr<weld::TreeIter> xEntry = xTreeLB->make_iterator();
+ bool bEntry = xTreeLB->get_iter_first(*xEntry);
+ while (bEntry)
{
- if(!pTreeLB->GetParent(pEntry))
+ if (!xTreeLB->get_iter_depth(*xEntry))
nRet++;
- pEntry = pTreeLB->Next(pEntry);
+ bEntry = xTreeLB->iter_next(*xEntry);
}
return nRet - 1;
}
-IMPL_LINK_NOARG(OfaTreeOptionsDialog, ShowPageHdl_Impl, SvTreeListBox*, void)
+IMPL_LINK_NOARG(OfaTreeOptionsDialog, ShowPageHdl_Impl, weld::TreeView&, void)
{
SelectHdl_Impl();
}
-IMPL_LINK_NOARG(OfaTreeOptionsDialog, BackHdl_Impl, Button*, void)
+IMPL_LINK_NOARG(OfaTreeOptionsDialog, BackHdl_Impl, weld::Button&, void)
{
- if ( pCurrentPageEntry && pTreeLB->GetParent( pCurrentPageEntry ) )
+ if (xCurrentPageEntry && xTreeLB->get_iter_depth(*xCurrentPageEntry))
{
- OptionsPageInfo* pPageInfo = static_cast<OptionsPageInfo*>(pCurrentPageEntry->GetUserData());
- if ( pPageInfo->m_pPage )
+ OptionsPageInfo* pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xCurrentPageEntry).toInt64());
+ if (pPageInfo->m_pPage)
{
+ std::unique_ptr<weld::TreeIter> xParent = xTreeLB->make_iterator(xCurrentPageEntry.get());
+ xTreeLB->iter_parent(*xParent);
OptionsGroupInfo* pGroupInfo =
- static_cast<OptionsGroupInfo*>(pTreeLB->GetParent( pCurrentPageEntry )->GetUserData());
+ reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xParent).toInt64());
pPageInfo->m_pPage->Reset( pGroupInfo->m_pInItemSet.get() );
}
- else if ( pPageInfo->m_pExtPage )
- pPageInfo->m_pExtPage->ResetPage();
+ else if ( pPageInfo->m_xExtPage )
+ pPageInfo->m_xExtPage->ResetPage();
}
}
void OfaTreeOptionsDialog::ApplyOptions(bool deactivate)
{
- SvTreeListEntry* pEntry = pTreeLB->First();
- while ( pEntry )
+ std::unique_ptr<weld::TreeIter> xEntry = xTreeLB->make_iterator();
+ bool bEntry = xTreeLB->get_iter_first(*xEntry);
+ while (bEntry)
{
- if ( pTreeLB->GetParent( pEntry ) )
+ if (xTreeLB->get_iter_depth(*xEntry))
{
- OptionsPageInfo* pPageInfo = static_cast<OptionsPageInfo *>(pEntry->GetUserData());
+ OptionsPageInfo* pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xEntry).toInt64());
if ( pPageInfo->m_pPage && !pPageInfo->m_pPage->HasExchangeSupport() )
{
+ std::unique_ptr<weld::TreeIter> xParent = xTreeLB->make_iterator(xEntry.get());
+ xTreeLB->iter_parent(*xParent);
OptionsGroupInfo* pGroupInfo =
- static_cast<OptionsGroupInfo*>(pTreeLB->GetParent(pEntry)->GetUserData());
+ reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xParent).toInt64());
pPageInfo->m_pPage->FillItemSet(pGroupInfo->m_pOutItemSet.get());
}
- if ( pPageInfo->m_pExtPage )
+ if ( pPageInfo->m_xExtPage )
{
if ( deactivate )
{
- pPageInfo->m_pExtPage->DeactivatePage();
+ pPageInfo->m_xExtPage->DeactivatePage();
}
- pPageInfo->m_pExtPage->SavePage();
+ pPageInfo->m_xExtPage->SavePage();
}
if ( pPageInfo->m_pPage && RID_OPTPAGE_CHART_DEFCOLORS == pPageInfo->m_nPageId )
{
@@ -678,11 +668,11 @@ void OfaTreeOptionsDialog::ApplyOptions(bool deactivate)
pPage->SaveChartOptions();
}
}
- pEntry = pTreeLB->Next(pEntry);
+ bEntry = xTreeLB->iter_next(*xEntry);
}
}
-IMPL_LINK_NOARG(OfaTreeOptionsDialog, ApplyHdl_Impl, Button*, void)
+IMPL_LINK_NOARG(OfaTreeOptionsDialog, ApplyHdl_Impl, weld::Button&, void)
{
ApplyOptions(/*deactivate =*/false);
@@ -690,21 +680,22 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ApplyHdl_Impl, Button*, void)
{
SolarMutexGuard aGuard;
if (svtools::executeRestartDialog(comphelper::getProcessComponentContext(),
- GetFrameWeld(), eRestartReason))
- EndDialog(RET_OK);
+ m_xDialog.get(), eRestartReason))
+ m_xDialog->response(RET_OK);
}
}
-IMPL_LINK_NOARG(OfaTreeOptionsDialog, OKHdl_Impl, Button*, void)
+IMPL_LINK_NOARG(OfaTreeOptionsDialog, OKHdl_Impl, weld::Button&, void)
{
- pTreeLB->EndSelection();
- if ( pCurrentPageEntry && pTreeLB->GetParent( pCurrentPageEntry ) )
+ if (xCurrentPageEntry && xTreeLB->get_iter_depth(*xCurrentPageEntry))
{
- OptionsPageInfo* pPageInfo = static_cast<OptionsPageInfo *>(pCurrentPageEntry->GetUserData());
+ OptionsPageInfo* pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xCurrentPageEntry).toInt64());
if ( pPageInfo->m_pPage )
{
- OptionsGroupInfo* pGroupInfo =
- static_cast<OptionsGroupInfo *>(pTreeLB->GetParent(pCurrentPageEntry)->GetUserData());
+ std::unique_ptr<weld::TreeIter> xParent = xTreeLB->make_iterator(xCurrentPageEntry.get());
+ xTreeLB->iter_parent(*xParent);
+
+ OptionsGroupInfo* pGroupInfo = reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xParent).toInt64());
if ( RID_SVXPAGE_COLOR != pPageInfo->m_nPageId
&& pPageInfo->m_pPage->HasExchangeSupport() )
{
@@ -712,68 +703,34 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, OKHdl_Impl, Button*, void)
if ( nLeave == DeactivateRC::KeepPage )
{
// the page mustn't be left
- pTreeLB->Select(pCurrentPageEntry);
+ xTreeLB->select(*xCurrentPageEntry);
return;
}
}
- pPageInfo->m_pPage->Hide();
+ pPageInfo->m_pPage->set_visible(false);
}
}
ApplyOptions(/*deactivate =*/ true);
- EndDialog(RET_OK);
+ m_xDialog->response(RET_OK);
if ( bNeedsRestart )
{
SolarMutexGuard aGuard;
::svtools::executeRestartDialog(comphelper::getProcessComponentContext(),
- m_pParent->GetFrameWeld(), eRestartReason);
- }
-}
-
-// an opened group shall be completely visible
-IMPL_STATIC_LINK(
- OfaTreeOptionsDialog, ExpandedHdl_Impl, SvTreeListBox*, pBox, void )
-{
- pBox->Update();
- pBox->InitStartEntry();
- SvTreeListEntry* pEntry = pBox->GetHdlEntry();
- if(pEntry && pBox->IsExpanded(pEntry))
- {
- sal_uInt32 nChildCount = pBox->GetChildCount( pEntry );
-
- SvTreeListEntry* pNext = pEntry;
- for(sal_uInt32 i = 0; i < nChildCount;i++)
- {
- pNext = pBox->GetNextEntryInView(pNext);
- if(!pNext)
- {
- pBox->ScrollOutputArea( -static_cast<short>(nChildCount - i + 1) );
- break;
- }
- else
- {
- Size aSz(pBox->GetOutputSizePixel());
- int nHeight = pBox->GetEntryHeight();
- Point aPos(pBox->GetEntryPosition(pNext));
- if(aPos.Y()+nHeight > aSz.Height())
- {
- pBox->ScrollOutputArea( -static_cast<short>(nChildCount - i + 1) );
- break;
- }
- }
- }
+ m_pParent, eRestartReason);
}
}
void OfaTreeOptionsDialog::ApplyItemSets()
{
- SvTreeListEntry* pEntry = pTreeLB->First();
- while(pEntry)
+ std::unique_ptr<weld::TreeIter> xEntry = xTreeLB->make_iterator();
+ bool bEntry = xTreeLB->get_iter_first(*xEntry);
+ while (bEntry)
{
- if(!pTreeLB->GetParent(pEntry))
+ if (!xTreeLB->get_iter_depth(*xEntry))
{
- OptionsGroupInfo* pGroupInfo = static_cast<OptionsGroupInfo *>(pEntry->GetUserData());
+ OptionsGroupInfo* pGroupInfo = reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xEntry).toInt64());
if(pGroupInfo->m_pOutItemSet)
{
if(pGroupInfo->m_pShell)
@@ -782,28 +739,17 @@ void OfaTreeOptionsDialog::ApplyItemSets()
ApplyItemSet( pGroupInfo->m_nDialogId, *pGroupInfo->m_pOutItemSet);
}
}
- pEntry = pTreeLB->Next(pEntry);
+ bEntry = xTreeLB->iter_next(*xEntry);
}
}
void OfaTreeOptionsDialog::InitTreeAndHandler()
{
- pTreeLB->SetNodeDefaultImages();
-
- pTreeLB->SetHelpId( HID_OFADLG_TREELISTBOX );
- pTreeLB->SetStyle( pTreeLB->GetStyle()|WB_HASBUTTONS | WB_HASBUTTONSATROOT |
- WB_HASLINES | WB_HASLINESATROOT |
- WB_CLIPCHILDREN | WB_HSCROLL );
- pTreeLB->SetForceMakeVisible(true);
- pTreeLB->SetQuickSearch(true);
- pTreeLB->SetSpaceBetweenEntries( 0 );
- pTreeLB->SetSelectionMode( SelectionMode::Single );
- pTreeLB->SetSublistOpenWithLeftRight();
- pTreeLB->SetExpandedHdl( LINK( this, OfaTreeOptionsDialog, ExpandedHdl_Impl ) );
- pTreeLB->SetSelectHdl( LINK( this, OfaTreeOptionsDialog, ShowPageHdl_Impl ) );
- pBackPB->SetClickHdl( LINK( this, OfaTreeOptionsDialog, BackHdl_Impl ) );
- pApplyPB->SetClickHdl( LINK( this, OfaTreeOptionsDialog, ApplyHdl_Impl ) );
- pOkPB->SetClickHdl( LINK( this, OfaTreeOptionsDialog, OKHdl_Impl ) );
+ xTreeLB->set_help_id(HID_OFADLG_TREELISTBOX);
+ xTreeLB->connect_changed( LINK( this, OfaTreeOptionsDialog, ShowPageHdl_Impl ) );
+ xBackPB->connect_clicked( LINK( this, OfaTreeOptionsDialog, BackHdl_Impl ) );
+ xApplyPB->connect_clicked( LINK( this, OfaTreeOptionsDialog, ApplyHdl_Impl ) );
+ xOkPB->connect_clicked( LINK( this, OfaTreeOptionsDialog, OKHdl_Impl ) );
}
void OfaTreeOptionsDialog::ActivatePage( sal_uInt16 nResId )
@@ -838,8 +784,9 @@ void OfaTreeOptionsDialog::ActivatePage( const OUString& rPageURL )
void OfaTreeOptionsDialog::ActivateLastSelection()
{
- SvTreeListEntry* pEntry = nullptr;
- if ( pLastPageSaver )
+ std::unique_ptr<weld::TreeIter> xEntry;
+
+ if (pLastPageSaver)
{
OUString sLastURL = bIsFromExtensionManager ? pLastPageSaver->m_sLastPageURL_ExtMgr
: pLastPageSaver->m_sLastPageURL_Tools;
@@ -851,13 +798,14 @@ void OfaTreeOptionsDialog::ActivateLastSelection()
bool bMustExpand = ( INetURLObject( sLastURL ).GetProtocol() == INetProtocol::File );
- SvTreeListEntry* pTemp = pTreeLB->First();
- while( !pEntry && pTemp )
+ std::unique_ptr<weld::TreeIter> xTemp = xTreeLB->make_iterator();
+ bool bTemp = xTreeLB->get_iter_first(*xTemp);
+ while (!bTemp)
{
// restore only selection of a leaf
- if ( pTreeLB->GetParent( pTemp ) && pTemp->GetUserData() )
+ if (xTreeLB->get_iter_depth(*xTemp) && xTreeLB->get_id(*xTemp).toInt64())
{
- OptionsPageInfo* pPageInfo = static_cast<OptionsPageInfo*>(pTemp->GetUserData());
+ OptionsPageInfo* pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xTemp).toInt64());
OUString sPageURL = pPageInfo->m_sPageURL;
if ( bMustExpand )
{
@@ -868,102 +816,65 @@ void OfaTreeOptionsDialog::ActivateLastSelection()
if ( ( !bIsFromExtensionManager
&& pPageInfo->m_nPageId && pPageInfo->m_nPageId == pLastPageSaver->m_nLastPageId )
|| ( !pPageInfo->m_nPageId && sLastURL == sPageURL ) )
- pEntry = pTemp;
+ {
+ xEntry = xTreeLB->make_iterator(xTemp.get());
+ break;
+ }
}
- pTemp = pTreeLB->Next(pTemp);
+ bTemp = xTreeLB->iter_next(*xTemp);
}
}
- if ( !pEntry )
+ if (!xEntry)
{
- pEntry = pTreeLB->First();
- pEntry = pTreeLB->Next(pEntry);
+ xEntry = xTreeLB->make_iterator();
+ if (!xTreeLB->get_iter_first(*xEntry) || !xTreeLB->iter_next(*xEntry))
+ xEntry.reset();
}
- if ( !pEntry )
+ if (!xEntry)
return;
- SvTreeListEntry* pParent = pTreeLB->GetParent(pEntry);
- pTreeLB->Expand(pParent);
- pTreeLB->MakeVisible(pParent);
- pTreeLB->MakeVisible(pEntry);
- pTreeLB->Select(pEntry);
- pTreeLB->GrabFocus();
-}
-
-bool OfaTreeOptionsDialog::EventNotify( NotifyEvent& rNEvt )
-{
- if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
- {
- const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
- const vcl::KeyCode aKeyCode = pKEvt->GetKeyCode();
-
- if( aKeyCode.GetCode() == KEY_PAGEUP ||
- aKeyCode.GetCode() == KEY_PAGEDOWN)
- {
- SvTreeListEntry* pCurEntry = pTreeLB->FirstSelected();
- SvTreeListEntry* pTemp = nullptr;
- if(aKeyCode.GetCode() == KEY_PAGEDOWN)
- {
- pTemp = pTreeLB->Next( pCurEntry ) ;
- if(pTemp && !pTreeLB->GetParent(pTemp))
- {
- pTemp = pTreeLB->Next( pTemp ) ;
- pTreeLB->Select(pTemp);
- }
- }
- else
- {
- pTemp = pTreeLB->Prev( pCurEntry ) ;
- if(pTemp && !pTreeLB->GetParent(pTemp))
- {
- pTemp = pTreeLB->Prev( pTemp ) ;
- }
- }
- if(pTemp)
- {
- if(!pTreeLB->IsExpanded(pTreeLB->GetParent(pTemp)))
- pTreeLB->Expand(pTreeLB->GetParent(pTemp));
- pTreeLB->MakeVisible(pTemp);
- pTreeLB->Select(pTemp);
- }
- }
- }
- return SfxModalDialog::EventNotify(rNEvt);
+ std::unique_ptr<weld::TreeIter> xParent(xTreeLB->make_iterator(xEntry.get()));
+ xTreeLB->iter_parent(*xParent);
+ xTreeLB->expand_row(*xParent);
+ xTreeLB->scroll_to_row(*xParent);
+ xTreeLB->scroll_to_row(*xEntry);
+ xTreeLB->set_cursor(*xEntry);
+ xTreeLB->select(*xEntry);
+ xTreeLB->grab_focus();
+ SelectHdl_Impl();
}
void OfaTreeOptionsDialog::SelectHdl_Impl()
{
- SvTreeListBox* pBox = pTreeLB;
+ std::unique_ptr<weld::TreeIter> xEntry(xTreeLB->make_iterator());
- if(pCurrentPageEntry == pBox->GetCurEntry())
- {
- pBox->EndSelection();
+ xTreeLB->get_cursor(xEntry.get());
+ if (xCurrentPageEntry && xCurrentPageEntry->equal(*xEntry))
return;
- }
- SvTreeListEntry* pEntry = pBox->GetCurEntry();
- SvTreeListEntry* pParent = pBox->GetParent(pEntry);
+ std::unique_ptr<weld::TreeIter> xParent(xTreeLB->make_iterator(xEntry.get()));
+ bool bParent = xTreeLB->iter_parent(*xParent);
// If the user has selected a category, automatically switch to a suitable
// default sub-page instead.
- if (!pParent)
- {
- pBox->EndSelection();
+ if (!bParent)
return;
- }
-
- pBox->EndSelection();
TabPage* pOldPage = nullptr;
TabPage* pNewPage = nullptr;
- OptionsPageInfo* pOptPageInfo = ( pCurrentPageEntry && pTreeLB->GetParent( pCurrentPageEntry ) )
- ? static_cast<OptionsPageInfo*>(pCurrentPageEntry->GetUserData()) : nullptr;
+ OptionsPageInfo* pOptPageInfo = (xCurrentPageEntry && xTreeLB->get_iter_depth(*xCurrentPageEntry))
+ ? reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xCurrentPageEntry).toInt64()) : nullptr;
if ( pOptPageInfo && pOptPageInfo->m_pPage && pOptPageInfo->m_pPage->IsVisible() )
{
pOldPage = pOptPageInfo->m_pPage;
- OptionsGroupInfo* pGroupInfo = static_cast<OptionsGroupInfo*>(pTreeLB->GetParent(pCurrentPageEntry)->GetUserData());
+
+ std::unique_ptr<weld::TreeIter> xCurParent(xTreeLB->make_iterator(xCurrentPageEntry.get()));
+ xTreeLB->iter_parent(*xCurParent);
+
+ OptionsGroupInfo* pGroupInfo = reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xCurParent).toInt64());
DeactivateRC nLeave = DeactivateRC::LeavePage;
if ( RID_SVXPAGE_COLOR != pOptPageInfo->m_nPageId && pOptPageInfo->m_pPage->HasExchangeSupport() )
nLeave = pOptPageInfo->m_pPage->DeactivatePage( pGroupInfo->m_pOutItemSet.get() );
@@ -971,20 +882,20 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
if ( nLeave == DeactivateRC::KeepPage )
{
// we cannot leave this page
- pBox->Select( pCurrentPageEntry );
+ xTreeLB->select(*xCurrentPageEntry);
return;
}
else
- pOptPageInfo->m_pPage->Hide();
+ pOptPageInfo->m_pPage->set_visible(false);
}
- else if ( pOptPageInfo && pOptPageInfo->m_pExtPage )
+ else if ( pOptPageInfo && pOptPageInfo->m_xExtPage )
{
- pOptPageInfo->m_pExtPage->Hide();
- pOptPageInfo->m_pExtPage->DeactivatePage();
+ pOptPageInfo->m_xExtPage->Hide();
+ pOptPageInfo->m_xExtPage->DeactivatePage();
}
- OptionsPageInfo *pPageInfo = static_cast<OptionsPageInfo *>(pEntry->GetUserData());
- OptionsGroupInfo* pGroupInfo = static_cast<OptionsGroupInfo *>(pParent->GetUserData());
+ OptionsPageInfo *pPageInfo = reinterpret_cast<OptionsPageInfo*>(xTreeLB->get_id(*xEntry).toInt64());
+ OptionsGroupInfo* pGroupInfo = reinterpret_cast<OptionsGroupInfo*>(xTreeLB->get_id(*xParent).toInt64());
if(!pPageInfo->m_pPage && pPageInfo->m_nPageId > 0)
{
if(!pGroupInfo->m_pInItemSet)
@@ -996,7 +907,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
*pGroupInfo->m_pInItemSet->GetPool(),
pGroupInfo->m_pInItemSet->GetRanges());
- TabPageParent pPageParent(pTabBox);
+ TabPageParent pPageParent(xTabBox.get(), this);
pPageInfo->m_pPage.disposeAndReset( ::CreateGeneralTabPage(pPageInfo->m_nPageId, pPageParent, *pGroupInfo->m_pInItemSet ) );
@@ -1011,16 +922,15 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
pPageInfo->m_pPage->Reset( pGroupInfo->m_pInItemSet.get() );
}
}
- else if ( 0 == pPageInfo->m_nPageId && !pPageInfo->m_pExtPage )
+ else if ( 0 == pPageInfo->m_nPageId && !pPageInfo->m_xExtPage )
{
if ( !m_xContainerWinProvider.is() )
{
m_xContainerWinProvider = awt::ContainerWindowProvider::create( ::comphelper::getProcessComponentContext() );
}
- pPageInfo->m_pExtPage = VclPtr<ExtensionsTabPage>::Create(
-
- pTabBox, 0, pPageInfo->m_sPageURL, pPageInfo->m_sEventHdl, m_xContainerWinProvider );
+ pPageInfo->m_xExtPage = std::make_unique<ExtensionsTabPage>(
+ xTabBox.get(), pPageInfo->m_sPageURL, pPageInfo->m_sEventHdl, m_xContainerWinProvider);
}
if ( pPageInfo->m_pPage )
@@ -1030,29 +940,30 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
{
pPageInfo->m_pPage->ActivatePage(*pGroupInfo->m_pOutItemSet);
}
- pPageInfo->m_pPage->Show();
+ pPageInfo->m_pPage->set_visible(true);
}
- else if ( pPageInfo->m_pExtPage )
+ else if ( pPageInfo->m_xExtPage )
{
- pPageInfo->m_pExtPage->Show();
- pPageInfo->m_pExtPage->ActivatePage();
+ pPageInfo->m_xExtPage->Show();
+ pPageInfo->m_xExtPage->ActivatePage();
}
{
OUString sTitleText = sTitle
- + " - " + pTreeLB->GetEntryText(pParent)
- + " - " + pTreeLB->GetEntryText(pEntry);
- SetText(sTitleText);
+ + " - " + xTreeLB->get_text(*xParent)
+ + " - " + xTreeLB->get_text(*xEntry);
+ m_xDialog->set_title(sTitleText);
}
- pCurrentPageEntry = pEntry;
+ xCurrentPageEntry = std::move(xEntry);
+
if ( !bForgetSelection )
{
if ( !pLastPageSaver )
pLastPageSaver = new LastPageSaver;
if ( !bIsFromExtensionManager )
pLastPageSaver->m_nLastPageId = pPageInfo->m_nPageId;
- if ( pPageInfo->m_pExtPage )
+ if ( pPageInfo->m_xExtPage )
{
if ( bIsFromExtensionManager )
pLastPageSaver->m_sLastPageURL_ExtMgr = pPageInfo->m_sPageURL;
@@ -1065,9 +976,9 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
// restore lost focus, if necessary
vcl::Window* pFocusWin = Application::GetFocusWindow();
// if the focused window is not the options treebox and the old page has the focus
- if ( pFocusWin && pFocusWin != pBox && pOldPage && pOldPage->HasChildPathFocus() )
+ if ( pFocusWin && !xTreeLB->has_focus() && pOldPage && pOldPage->HasChildPathFocus() )
// then set the focus to the new page or if we are on a group set the focus to the options treebox
- pNewPage ? pNewPage->GrabFocus() : pBox->GrabFocus();
+ pNewPage ? pNewPage->GrabFocus() : xTreeLB->grab_focus();
//fdo#58170 use current page's layout child HelpId, unless there isn't a
//current page
@@ -1078,7 +989,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
assert(pFirstChild);
sHelpId = pFirstChild->GetHelpId();
}
- pBox->SetHelpId(sHelpId);
+ xTreeLB->set_help_id(sHelpId);
}
std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId )
@@ -1946,27 +1857,29 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
return aOutNodeList;
}
-static sal_uInt16 lcl_getGroupId( const OUString& rGroupName, const SvTreeListBox& rTreeLB )
+static sal_uInt16 lcl_getGroupId( const OUString& rGroupName, const weld::TreeView& rTreeLB )
{
sal_uInt16 nRet = 0;
- SvTreeListEntry* pEntry = rTreeLB.First();
- while( pEntry )
+
+ std::unique_ptr<weld::TreeIter> xEntry = rTreeLB.make_iterator();
+ bool bEntry = rTreeLB.get_iter_first(*xEntry);
+ while (bEntry)
{
- if ( !rTreeLB.GetParent( pEntry ) )
+ if (!rTreeLB.get_iter_depth(*xEntry))
{
- OUString sTemp( rTreeLB.GetEntryText( pEntry ) );
- if ( sTemp == rGroupName )
+ OUString sTemp(rTreeLB.get_text(*xEntry));
+ if (sTemp == rGroupName)
return nRet;
nRet++;
}
- pEntry = rTreeLB.Next( pEntry );
+ bEntry = rTreeLB.iter_next(*xEntry);
}
return USHRT_MAX;
}
static void lcl_insertLeaf(
- OfaTreeOptionsDialog* pDlg, OptionsNode const * pNode, OptionsLeaf const * pLeaf, const SvTreeListBox& rTreeLB )
+ OfaTreeOptionsDialog* pDlg, OptionsNode const * pNode, OptionsLeaf const * pLeaf, const weld::TreeView& rTreeLB )
{
sal_uInt16 nGrpId = lcl_getGroupId( pNode->m_sLabel, rTreeLB );
if ( USHRT_MAX == nGrpId )
@@ -1989,13 +1902,13 @@ void OfaTreeOptionsDialog::InsertNodes( const VectorOfNodes& rNodeList )
{
for ( size_t k = 0; k < j.size(); ++k )
{
- lcl_insertLeaf( this, node.get(), j[k].get(), *pTreeLB );
+ lcl_insertLeaf( this, node.get(), j[k].get(), *xTreeLB );
}
}
for ( auto const & j: node->m_aLeaves )
{
- lcl_insertLeaf( this, node.get(), j.get(), *pTreeLB );
+ lcl_insertLeaf( this, node.get(), j.get(), *xTreeLB );
}
}
}
@@ -2007,7 +1920,7 @@ void OfaTreeOptionsDialog::SetNeedsRestart( svtools::RestartReason eReason)
eRestartReason = eReason;
}
-short OfaTreeOptionsDialog::Execute()
+short OfaTreeOptionsDialog::run()
{
std::unique_ptr< SvxDicListChgClamp > pClamp;
if ( !bIsFromExtensionManager )
@@ -2016,7 +1929,8 @@ short OfaTreeOptionsDialog::Execute()
Reference<css::linguistic2::XSearchableDictionaryList> xDictionaryList(LinguMgr::GetDictionaryList());
pClamp.reset( new SvxDicListChgClamp( xDictionaryList ) );
}
- short nRet = SfxModalDialog::Execute();
+
+ short nRet = SfxOkDialogController::run();
if( RET_OK == nRet )
{
@@ -2029,24 +1943,17 @@ short OfaTreeOptionsDialog::Execute()
// class ExtensionsTabPage -----------------------------------------------
ExtensionsTabPage::ExtensionsTabPage(
- vcl::Window* pParent, WinBits nStyle, const OUString& rPageURL,
- const OUString& rEvtHdl, const Reference< awt::XContainerWindowProvider >& rProvider ) :
-
- TabPage( pParent, nStyle ),
-
- m_sPageURL ( rPageURL ),
- m_sEventHdl ( rEvtHdl ),
- m_xWinProvider ( rProvider )
+ weld::Container* pParent, const OUString& rPageURL,
+ const OUString& rEvtHdl, const Reference< awt::XContainerWindowProvider >& rProvider )
+ : m_pContainer(pParent)
+ , m_sPageURL(rPageURL)
+ , m_sEventHdl(rEvtHdl)
+ , m_xWinProvider(rProvider)
{
}
ExtensionsTabPage::~ExtensionsTabPage()
{
- disposeOnce();
-}
-
-void ExtensionsTabPage::dispose()
-{
Hide();
DeactivatePage();
@@ -2056,14 +1963,24 @@ void ExtensionsTabPage::dispose()
{
m_xPage->dispose();
}
- catch ( const Exception & )
+ catch (const Exception&)
{
}
m_xPage.clear();
}
- TabPage::dispose();
-}
+ if ( m_xPageParent.is() )
+ {
+ try
+ {
+ m_xPageParent->dispose();
+ }
+ catch (const Exception&)
+ {
+ }
+ m_xPageParent.clear();
+ }
+}
void ExtensionsTabPage::CreateDialogWithHandler()
{
@@ -2078,8 +1995,8 @@ void ExtensionsTabPage::CreateDialogWithHandler()
if ( !bWithHandler || m_xEventHdl.is() )
{
- SetStyle( GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL );
- Reference< awt::XWindowPeer > xParent( VCLUnoHelper::GetInterface( this ), UNO_QUERY );
+ m_xPageParent = m_pContainer->CreateChildFrame();
+ Reference<awt::XWindowPeer> xParent(m_xPageParent, UNO_QUERY);
m_xPage =
m_xWinProvider->createContainerWindow(
m_sPageURL, OUString(), xParent, m_xEventHdl );
@@ -2103,7 +2020,6 @@ void ExtensionsTabPage::CreateDialogWithHandler()
}
}
-
bool ExtensionsTabPage::DispatchAction( const OUString& rAction )
{
bool bRet = false;
@@ -2121,20 +2037,30 @@ bool ExtensionsTabPage::DispatchAction( const OUString& rAction )
return bRet;
}
-void ExtensionsTabPage::ActivatePage()
+void ExtensionsTabPage::Show()
{
- TabPage::ActivatePage();
+ if (!m_xPageParent.is())
+ return;
+ m_xPageParent->setVisible(true);
+}
+
+void ExtensionsTabPage::Hide()
+{
+ if (!m_xPageParent.is())
+ return;
+ m_xPageParent->setVisible(false);
+}
+void ExtensionsTabPage::ActivatePage()
+{
if ( !m_xPage.is() )
{
CreateDialogWithHandler();
if ( m_xPage.is() )
{
- Point aPos;
- Size aSize = GetParent()->get_preferred_size();
- m_xPage->setPosSize( aPos.X() + 1, aPos.Y() + 1,
- aSize.Width() - 2, aSize.Height() - 2, awt::PosSize::POSSIZE );
+ auto aWindowRect = m_xPageParent->getPosSize();
+ m_xPage->setPosSize(0, 0, aWindowRect.Width, aWindowRect.Height, awt::PosSize::POSSIZE);
if ( !m_sEventHdl.isEmpty() )
DispatchAction( "initialize" );
}
@@ -2148,20 +2074,16 @@ void ExtensionsTabPage::ActivatePage()
void ExtensionsTabPage::DeactivatePage()
{
- TabPage::DeactivatePage();
-
if ( m_xPage.is() )
m_xPage->setVisible( false );
}
-
void ExtensionsTabPage::ResetPage()
{
DispatchAction( "back" );
ActivatePage();
}
-
void ExtensionsTabPage::SavePage()
{
DispatchAction( "ok" );
diff --git a/cui/uiconfig/ui/opthtmlpage.ui b/cui/uiconfig/ui/opthtmlpage.ui
index 05087c50922e..15ccce9a9966 100644
--- a/cui/uiconfig/ui/opthtmlpage.ui
+++ b/cui/uiconfig/ui/opthtmlpage.ui
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
- <requires lib="LibreOffice" version="1.0"/>
<object class="GtkAdjustment" id="adjustsize1">
<property name="lower">1</property>
<property name="upper">50</property>
@@ -94,8 +93,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">6</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -107,8 +104,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">6</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -122,8 +117,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -135,8 +128,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -150,8 +141,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -163,8 +152,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -178,8 +165,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -191,8 +176,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -206,8 +189,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -219,8 +200,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -234,8 +213,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -247,8 +224,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -262,8 +237,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -275,8 +248,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -326,7 +297,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -349,8 +319,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -367,8 +335,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -385,8 +351,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -415,7 +379,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
@@ -423,7 +386,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -443,16 +405,14 @@
<object class="GtkLabel" id="charsetFT">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="opthtmlpage|charsetFT">Character _set:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">charset</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -465,16 +425,12 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -491,8 +447,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -509,8 +463,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -528,8 +480,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -546,8 +496,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
diff --git a/cui/uiconfig/ui/optionsdialog.ui b/cui/uiconfig/ui/optionsdialog.ui
index 9d7b4ff2df39..b96ec45a95ea 100644
--- a/cui/uiconfig/ui/optionsdialog.ui
+++ b/cui/uiconfig/ui/optionsdialog.ui
@@ -2,7 +2,14 @@
<!-- Generated with glade 3.22.1 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
- <requires lib="LibreOffice" version="1.0"/>
+ <object class="GtkTreeStore" id="liststore1">
+ <columns>
+ <!-- column-name text -->
+ <column type="gchararray"/>
+ <!-- column-name id -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
<object class="GtkDialog" id="OptionsDialog">
<property name="can_focus">False</property>
<property name="hexpand">True</property>
@@ -113,12 +120,38 @@
<property name="vexpand">True</property>
<property name="spacing">6</property>
<child>
- <object class="vcllo-SvTreeListBox" id="pages:border">
+ <object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vexpand">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="Tree List-selection"/>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="pages">
+ <property name="width_request">-1</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="vexpand">True</property>
+ <property name="model">liststore1</property>
+ <property name="headers_visible">False</property>
+ <property name="search_column">1</property>
+ <property name="show_expanders">True</property>
+ <property name="enable_tree_lines">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="Macro Library List-selection1"/>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn2">
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext2"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ </object>
</child>
</object>
<packing>
diff --git a/cui/uiconfig/ui/optlanguagespage.ui b/cui/uiconfig/ui/optlanguagespage.ui
index 8d49ba62aaee..6cf95c2d2981 100644
--- a/cui/uiconfig/ui/optlanguagespage.ui
+++ b/cui/uiconfig/ui/optlanguagespage.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
<object class="GtkListStore" id="liststore1">
@@ -62,10 +62,10 @@
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="optlanguagespage|label4">_User interface:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">userinterface</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -76,10 +76,10 @@
<object class="GtkLabel" id="localesettingFT">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="optlanguagespage|localesettingFT">Locale setting:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">localesetting</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -90,10 +90,10 @@
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="optlanguagespage|label6">Decimal separator key:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">decimalseparator</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -104,10 +104,10 @@
<object class="GtkLabel" id="defaultcurrency">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="optlanguagespage|defaultcurrency">_Default currency:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">currencylb</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -118,10 +118,10 @@
<object class="GtkLabel" id="dataaccpatterns">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="optlanguagespage|dataaccpatterns">Date acceptance _patterns:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">datepatterns</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -270,13 +270,13 @@
<property name="entry_text_column">0</property>
<property name="id_column">1</property>
<child>
- <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <object class="GtkCellRendererText" id="cellrenderertext3"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
<child>
- <object class="GtkCellRendererPixbuf" id="cellrenderertext2"/>
+ <object class="GtkCellRendererPixbuf" id="cellrenderertext4"/>
<attributes>
<attribute name="pixbuf">2</attribute>
</attributes>
@@ -297,13 +297,13 @@
<property name="entry_text_column">0</property>
<property name="id_column">1</property>
<child>
- <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <object class="GtkCellRendererText" id="cellrenderertext5"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
<child>
- <object class="GtkCellRendererPixbuf" id="cellrenderertext2"/>
+ <object class="GtkCellRendererPixbuf" id="cellrenderertext6"/>
<attributes>
<attribute name="pixbuf">2</attribute>
</attributes>
@@ -320,8 +320,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="halign">start</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
@@ -364,16 +364,19 @@
<object class="GtkLabel" id="western">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="optlanguagespage|western">Western:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">westernlanguage</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
diff --git a/cui/uiconfig/ui/optpathspage.ui b/cui/uiconfig/ui/optpathspage.ui
index 1bd03de34de0..79e33ae7c670 100644
--- a/cui/uiconfig/ui/optpathspage.ui
+++ b/cui/uiconfig/ui/optpathspage.ui
@@ -4,7 +4,7 @@
<requires lib="gtk+" version="3.18"/>
<object class="GtkTreeStore" id="liststore1">
<columns>
- <!-- column-name image -->
+ <!-- column-name image -->
<column type="GdkPixbuf"/>
<!-- column-name text -->
<column type="gchararray"/>
@@ -76,23 +76,20 @@
<object class="GtkTreeSelection" id="Macro Library List-selection2"/>
</child>
<child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+ <object class="GtkTreeViewColumn" id="treeviewcolumn5">
+ <property name="resizable">True</property>
+ <property name="spacing">6</property>
+ <property name="title" translatable="yes" context="optpathspage|type">Type</property>
<child>
<object class="GtkCellRendererPixbuf" id="cellrenderertext1"/>
<attributes>
<attribute name="pixbuf">0</attribute>
</attributes>
</child>
- </object>
- </child>
- <child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn5">
- <property name="resizable">True</property>
- <property name="spacing">6</property>
- <property name="title" translatable="yes" context="optpathspage|type">Type</property>
<child>
<object class="GtkCellRendererText" id="cellrenderer4"/>
<attributes>
+ <attribute name="sensitive">8</attribute>
<attribute name="text">1</attribute>
</attributes>
</child>
@@ -107,13 +104,14 @@
<child>
<object class="GtkCellRendererText" id="cellrenderer9"/>
<attributes>
+ <attribute name="sensitive">9</attribute>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+ <object class="GtkTreeViewColumn" id="treeviewcolumn2">
<property name="resizable">True</property>
<property name="spacing">6</property>
<property name="title" translatable="yes" context="optpathspage|internal_paths">Internal Paths</property>
@@ -121,6 +119,7 @@
<child>
<object class="GtkCellRendererText" id="cellrenderer1"/>
<attributes>
+ <attribute name="sensitive">10</attribute>
<attribute name="text">3</attribute>
</attributes>
</child>
diff --git a/cui/uiconfig/ui/optsavepage.ui b/cui/uiconfig/ui/optsavepage.ui
index 61e38e2d5563..689e71f370ff 100644
--- a/cui/uiconfig/ui/optsavepage.ui
+++ b/cui/uiconfig/ui/optsavepage.ui
@@ -37,7 +37,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="vexpand">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -53,7 +52,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="vexpand">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
diff --git a/cui/uiconfig/ui/optsecuritypage.ui b/cui/uiconfig/ui/optsecuritypage.ui
index aa815c6ebf1b..ca5e6aa68374 100644
--- a/cui/uiconfig/ui/optsecuritypage.ui
+++ b/cui/uiconfig/ui/optsecuritypage.ui
@@ -337,15 +337,25 @@ Do you want to delete password list and reset master password?</property>
<object class="GtkGrid" id="grid6">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="row_homogeneous">True</property>
<child>
- <object class="GtkButton" id="connections">
- <property name="label" translatable="yes" context="optsecuritypage|connections">Connect_ions...</property>
+ <object class="GtkGrid" id="grid9">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="valign">center</property>
- <property name="vexpand">True</property>
- <property name="use_underline">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkButton" id="connections">
+ <property name="label" translatable="yes" context="optsecuritypage|connections">Connect_ions...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="valign">center</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -353,14 +363,23 @@ Do you want to delete password list and reset master password?</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="masterpassword">
- <property name="label" translatable="yes" context="optsecuritypage|masterpassword">_Master Password...</property>
+ <object class="GtkGrid" id="grid10">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="valign">center</property>
- <property name="vexpand">True</property>
- <property name="use_underline">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkButton" id="masterpassword">
+ <property name="label" translatable="yes" context="optsecuritypage|masterpassword">_Master Password...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="valign">center</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -466,12 +485,12 @@ Do you want to delete password list and reset master password?</property>
</object>
<object class="GtkSizeGroup" id="sizegroup1">
<widgets>
- <widget name="options"/>
+ <widget name="tsas"/>
+ <widget name="cert"/>
+ <widget name="macro"/>
<widget name="connections"/>
<widget name="masterpassword"/>
- <widget name="macro"/>
- <widget name="cert"/>
- <widget name="tsas"/>
+ <widget name="options"/>
</widgets>
</object>
</interface>
diff --git a/cui/uiconfig/ui/personalization_tab.ui b/cui/uiconfig/ui/personalization_tab.ui
index 448cbf894634..77e67bc5a323 100644
--- a/cui/uiconfig/ui/personalization_tab.ui
+++ b/cui/uiconfig/ui/personalization_tab.ui
@@ -66,16 +66,16 @@
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">center</property>
<property name="margin_left">24</property>
<property name="margin_right">6</property>
- <property name="row_spacing">1</property>
- <property name="column_spacing">1</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
<child>
- <object class="GtkButton" id="default1">
+ <object class="GtkToggleButton" id="default1">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="always_show_image">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -83,11 +83,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="default0">
+ <object class="GtkToggleButton" id="default0">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="always_show_image">True</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -95,11 +94,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="default2">
+ <object class="GtkToggleButton" id="default2">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="always_show_image">True</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -107,11 +105,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="default3">
+ <object class="GtkToggleButton" id="default3">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="always_show_image">True</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -119,11 +116,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="default4">
+ <object class="GtkToggleButton" id="default4">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="always_show_image">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -131,11 +127,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="default5">
+ <object class="GtkToggleButton" id="default5">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="always_show_image">True</property>
</object>
<packing>
<property name="left_attach">2</property>
@@ -143,11 +138,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="default6">
+ <object class="GtkToggleButton" id="default6">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="always_show_image">True</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -155,11 +149,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="default7">
+ <object class="GtkToggleButton" id="default7">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="always_show_image">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -167,11 +160,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="default8">
+ <object class="GtkToggleButton" id="default8">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="always_show_image">True</property>
</object>
<packing>
<property name="left_attach">2</property>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 3bdad8e86e12..63d4c7a0520e 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -137,31 +137,18 @@
<glade-widget-class title="NUP Preview" name="vcllo-ShowNupOrderWindow"
generic-name="NUP Preview" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
- <glade-widget-class title="Tree List" name="vcllo-SvTreeListBox"
- generic-name="Tree List" parent="GtkTreeView"
- icon-name="widget-gtk-treeview">
- <properties>
- <property save="True" query="False" id="min-width-chars" default="-1" name="Minimum Width in Characters">
- <parameter-spec>
- <type>GParamInt</type>
- <min>-1</min>
- </parameter-spec>
- <tooltip>The desired minimum width of the SvTreeListBox, in characters</tooltip>
- </property>
- </properties>
- </glade-widget-class>
<glade-widget-class title="Content List Box" name="sfxlo-ContentListBox"
- generic-name="Content List Box" parent="vcllo-SvTreeListBox"
+ generic-name="Content List Box" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="Animation ListBox" name="sdlo-CustomAnimationList"
- generic-name="Animation ListBox" parent="vcllo-SvTreeListBox"
+ generic-name="Animation ListBox" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="Page Objs ListBox" name="sdlo-SdPageObjsTLB"
- generic-name="SdPageObjsTLB" parent="vcllo-SvTreeListBox"
+ generic-name="SdPageObjsTLB" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="Page List Control" name="sduilo-SdPageListControl"
- generic-name="Page List Control" parent="vcllo-SvTreeListBox"
+ generic-name="Page List Control" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="Sidebar Dial Control" name="svxlo-SidebarDialControl"
generic-name="Sidebar Dial Control" parent="GtkSpinner"
diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx
index d47b4f219bc6..b82db9001359 100644
--- a/include/sfx2/sfxdlg.hxx
+++ b/include/sfx2/sfxdlg.hxx
@@ -119,7 +119,7 @@ class SFX2_DLLPUBLIC SfxAbstractDialogFactory : virtual public VclAbstractDialog
public:
virtual ~SfxAbstractDialogFactory() override; // needed for export of vtable
static SfxAbstractDialogFactory* Create();
- virtual VclPtr<VclAbstractDialog> CreateFrameDialog(vcl::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rFrame, sal_uInt32 nResId, const OUString& rParameter ) = 0;
+ virtual VclPtr<VclAbstractDialog> CreateFrameDialog(weld::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rFrame, sal_uInt32 nResId, const OUString& rParameter) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateCustomizeTabDialog(weld::Window* pParent,
const SfxItemSet* pAttrSet,
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 791887059189..851b859796aa 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -196,6 +196,12 @@ public:
virtual ~SfxTabPage() override;
virtual void dispose() override;
+ void set_visible(bool bVisible)
+ {
+ m_xContainer->set_visible(bVisible);
+ Show(bVisible);
+ }
+
const SfxItemSet& GetItemSet() const { return *pSet; }
virtual bool FillItemSet( SfxItemSet* );
diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx
index 0870a72fed62..864799204ae8 100644
--- a/include/vcl/abstdlg.hxx
+++ b/include/vcl/abstdlg.hxx
@@ -145,7 +145,7 @@ public:
virtual ~VclAbstractDialogFactory(); // needed for export of vtable
static VclAbstractDialogFactory* Create();
// The Id is an implementation detail of the factory
- virtual VclPtr<VclAbstractDialog> CreateVclDialog(vcl::Window* pParent, sal_uInt32 nId) = 0;
+ virtual VclPtr<VclAbstractDialog> CreateVclDialog(weld::Window* pParent, sal_uInt32 nId) = 0;
// creates instance of PasswordToOpenModifyDialog from cui
virtual VclPtr<AbstractPasswordToOpenModifyDialog> CreatePasswordToOpenModifyDialog(weld::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify) = 0;
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 8fd763e434ac..8a1f7ae43d26 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -256,10 +256,13 @@ public:
class VCL_DLLPUBLIC Container : virtual public Widget
{
public:
- //remove and add in one go
+ // remove and add in one go
virtual void move(weld::Widget* pWidget, weld::Container* pNewParent) = 0;
- //recursively unset has-default on any buttons in the widget hierarchy
+ // recursively unset has-default on any buttons in the widget hierarchy
virtual void recursively_unset_default_buttons() = 0;
+ // create an XWindow as a child of this container. The XWindow is
+ // suitable to contain css::awt::XControl items
+ virtual css::uno::Reference<css::awt::XWindow> CreateChildFrame() = 0;
};
class VCL_DLLPUBLIC ScrolledWindow : virtual public Container
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 895ca4cf3ce6..40d694e6df8a 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1178,7 +1178,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
ScTabViewShell* pSh = GetBestViewShell();
- ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog(pSh ? pSh->GetLegacyDialogParent() : nullptr, SID_LANGUAGE_OPTIONS));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog(pSh ? pSh->GetDialogParent() : nullptr, SID_LANGUAGE_OPTIONS));
pDlg->Execute();
rDoc.GetLanguage( eLang, eCjk, eCtl );
diff --git a/sc/uiconfig/scalc/ui/tpviewpage.ui b/sc/uiconfig/scalc/ui/tpviewpage.ui
index f6e147c90485..a88f4db61c03 100644
--- a/sc/uiconfig/scalc/ui/tpviewpage.ui
+++ b/sc/uiconfig/scalc/ui/tpviewpage.ui
@@ -2,7 +2,6 @@
<!-- Generated with glade 3.22.1 -->
<interface domain="sc">
<requires lib="gtk+" version="3.18"/>
- <requires lib="LibreOffice" version="1.0"/>
<object class="GtkBox" id="TpViewPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -45,8 +44,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -62,8 +59,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -79,8 +74,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -96,8 +89,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -113,8 +104,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -130,8 +119,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -147,8 +134,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">6</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -169,22 +154,18 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -206,8 +187,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -223,8 +202,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -240,8 +217,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -257,8 +232,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -274,8 +247,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -288,8 +259,6 @@
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
- <property name="width">1</property>
- <property name="height">1</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -314,8 +283,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -345,7 +312,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -366,6 +332,7 @@
<object class="GtkMenuButton" id="color">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -374,24 +341,20 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="grid_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="tpviewpage|grid_label">_Grid lines:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">grid</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -399,16 +362,14 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="tpviewpage|color_label">_Color:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">color</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -425,16 +386,12 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -450,8 +407,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -467,8 +422,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -489,82 +442,76 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="vexpand">True</property>
+ <property name="hexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
+ <property name="hexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="objgrf_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="tpviewpage|objgrf_label">Ob_jects/Images:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">objgrf</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="diagram_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="tpviewpage|diagram_label">Cha_rts:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">diagram</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="draw_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="tpviewpage|draw_label">_Drawing objects:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">draw</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="objgrf">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<items>
<item translatable="yes" context="tpviewpage|objgrf">Show</item>
<item translatable="yes" context="tpviewpage|objgrf">Hide</item>
@@ -573,14 +520,13 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="diagram">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<items>
<item translatable="yes" context="tpviewpage|diagram">Show</item>
<item translatable="yes" context="tpviewpage|diagram">Hide</item>
@@ -589,14 +535,13 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="draw">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<items>
<item translatable="yes" context="tpviewpage|draw">Show</item>
<item translatable="yes" context="tpviewpage|draw">Hide</item>
@@ -605,8 +550,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -627,22 +570,20 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="valign">start</property>
- <property name="vexpand">True</property>
+ <property name="hexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -672,8 +613,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index f93681c6c2a3..54791875a733 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -271,7 +271,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
if (mpViewShell)
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( mpViewShell->GetActiveWindow(), SID_LANGUAGE_OPTIONS ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( mpViewShell->GetFrameWeld(), SID_LANGUAGE_OPTIONS ));
pDlg->Execute();
}
}
diff --git a/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui b/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui
index d5d7d80bad82..14a5b8504f8a 100644
--- a/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui
+++ b/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui
@@ -61,7 +61,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="vexpand">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -77,7 +76,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="vexpand">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="image_position">right</property>
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index cc892ba1ad67..9b5351e5aab9 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1335,7 +1335,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
Reference <XFrame> xFrame(GetRequestFrame(rReq));
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
VclPtr<VclAbstractDialog> pDlg =
- pFact->CreateFrameDialog(rReq.GetFrameWindow(), xFrame, rReq.GetSlot(), sPageURL );
+ pFact->CreateFrameDialog(rReq.GetFrameWeld(), xFrame, rReq.GetSlot(), sPageURL );
short nRet = pDlg->Execute();
pDlg.disposeAndClear();
SfxViewFrame* pView = SfxViewFrame::GetFirst();
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 5aabe03d2e76..8b796d9098f9 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -496,7 +496,6 @@ custom_widgets = [
'SidebarToolBox',
'SpacingListBox',
'SvSimpleTableContainer',
- 'SvTreeListBox',
'SvtFileView',
'SvtURLBox',
'Svx3DPreviewControl',
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index e87acaef9141..0e99cd7071d4 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -263,15 +263,15 @@ cui/uiconfig/ui/paratabspage.ui://GtkSpinButton[@id='SP_TABPOS'] no-labelled-by
cui/uiconfig/ui/paratabspage.ui://GtkEntry[@id='ED_TABPOS'] no-labelled-by
cui/uiconfig/ui/patterntabpage.ui://GtkLabel[@id='label4'] orphan-label
cui/uiconfig/ui/percentdialog.ui://GtkSpinButton[@id='margin'] no-labelled-by
-cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default0'] button-no-label
-cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default1'] button-no-label
-cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default2'] button-no-label
-cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default3'] button-no-label
-cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default4'] button-no-label
-cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default5'] button-no-label
-cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default6'] button-no-label
-cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default7'] button-no-label
-cui/uiconfig/ui/personalization_tab.ui://GtkButton[@id='default8'] button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default0'] button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default1'] button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default2'] button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default3'] button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default4'] button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default5'] button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default6'] button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default7'] button-no-label
+cui/uiconfig/ui/personalization_tab.ui://GtkToggleButton[@id='default8'] button-no-label
cui/uiconfig/ui/pickgraphicpage.ui://GtkLabel[@id='errorft'] orphan-label
cui/uiconfig/ui/positionpage.ui://GtkLabel[@id='rotateandscale'] orphan-label
cui/uiconfig/ui/positionpage.ui://GtkLabel[@id='scale'] orphan-label
diff --git a/svx/uiconfig/ui/optgridpage.ui b/svx/uiconfig/ui/optgridpage.ui
index 808572da6ad6..d4efd7836c53 100644
--- a/svx/uiconfig/ui/optgridpage.ui
+++ b/svx/uiconfig/ui/optgridpage.ui
@@ -61,7 +61,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -131,7 +130,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
@@ -139,7 +137,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -246,7 +243,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
@@ -254,7 +250,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index edca8bbf99de..32a6cb1a5793 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -123,7 +123,7 @@ namespace SwLangHelper
{
// open the dialog "Tools/Options/Language Settings - Language"
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( rView.GetFrameWeld(), SID_LANGUAGE_OPTIONS ));
pDlg->Execute();
}
else
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 10dd4bbb5bcf..06ed752d11a3 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -416,7 +416,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
// open the dialog "Tools/Options/Language Settings - Language"
// to set the documents default language
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( GetView().GetWindow(), SID_LANGUAGE_OPTIONS ));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateVclDialog(GetView().GetFrameWeld(), SID_LANGUAGE_OPTIONS));
pDlg->Execute();
}
else
diff --git a/sw/uiconfig/swriter/ui/mailconfigpage.ui b/sw/uiconfig/swriter/ui/mailconfigpage.ui
index f87777c683da..587850675492 100644
--- a/sw/uiconfig/swriter/ui/mailconfigpage.ui
+++ b/sw/uiconfig/swriter/ui/mailconfigpage.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.19.0 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
<object class="GtkAdjustment" id="adjustment1">
@@ -28,7 +28,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -158,7 +157,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
@@ -166,7 +164,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
diff --git a/sw/uiconfig/swriter/ui/optcompatpage.ui b/sw/uiconfig/swriter/ui/optcompatpage.ui
index 6ba2cda149ee..29a5c6eaee75 100644
--- a/sw/uiconfig/swriter/ui/optcompatpage.ui
+++ b/sw/uiconfig/swriter/ui/optcompatpage.ui
@@ -88,7 +88,7 @@
<child>
<object class="GtkCellRendererToggle" id="cellrenderer5"/>
<attributes>
- <attribute name="visible">4</attribute>
+ <attribute name="visible">3</attribute>
<attribute name="active">0</attribute>
</attributes>
</child>
@@ -227,7 +227,7 @@
<child>
<object class="GtkCellRendererToggle" id="cellrenderer7"/>
<attributes>
- <attribute name="visible">4</attribute>
+ <attribute name="visible">3</attribute>
<attribute name="active">0</attribute>
</attributes>
</child>
diff --git a/sw/uiconfig/swriter/ui/optfonttabpage.ui b/sw/uiconfig/swriter/ui/optfonttabpage.ui
index dd0e9fcccf28..478069819fb4 100644
--- a/sw/uiconfig/swriter/ui/optfonttabpage.ui
+++ b/sw/uiconfig/swriter/ui/optfonttabpage.ui
@@ -15,7 +15,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
@@ -23,7 +22,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -335,7 +333,6 @@
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="layout_style">start</property>
<child>
diff --git a/sw/uiconfig/swriter/ui/optredlinepage.ui b/sw/uiconfig/swriter/ui/optredlinepage.ui
index d3416690fe20..58bfab4d26c0 100644
--- a/sw/uiconfig/swriter/ui/optredlinepage.ui
+++ b/sw/uiconfig/swriter/ui/optredlinepage.ui
@@ -21,7 +21,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -111,7 +110,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
<property name="shadow_type">in</property>
@@ -124,7 +122,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
</object>
</child>
</object>
@@ -169,7 +166,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -208,7 +204,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="deleted">
+ <object class="GtkComboBoxText" id="deleted">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -246,7 +242,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
<property name="shadow_type">in</property>
@@ -259,7 +254,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
</object>
</child>
</object>
@@ -304,7 +298,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -343,7 +336,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="changed">
+ <object class="GtkComboBoxText" id="changed">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -381,7 +374,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
<property name="shadow_type">in</property>
@@ -394,7 +386,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
</object>
</child>
</object>
@@ -439,7 +430,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
@@ -505,7 +495,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
<property name="shadow_type">in</property>
@@ -518,7 +507,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
</object>
</child>
</object>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index e67024c063e5..4c08d45be1ef 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1039,6 +1039,12 @@ public:
{
implResetDefault(m_xContainer.get());
}
+ virtual css::uno::Reference<css::awt::XWindow> CreateChildFrame() override
+ {
+ auto xPage = VclPtr<VclBin>::Create(m_xContainer.get());
+ xPage->Show();
+ return css::uno::Reference<css::awt::XWindow>(xPage->GetComponentInterface(), css::uno::UNO_QUERY);
+ }
};
std::unique_ptr<weld::Container> SalInstanceWidget::weld_parent() const
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index f3edf71d9c41..96be79e3d106 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -971,16 +971,19 @@ void GtkSalFrame::InitCommon()
m_aSystemData.pWidget = m_pWindow;
m_aSystemData.nScreen = m_nXScreen.getXScreen();
m_aSystemData.pToolkit = "gtk3";
- GdkScreen* pScreen = gtk_window_get_screen(GTK_WINDOW(m_pWindow));
- GdkVisual* pVisual = gdk_screen_get_system_visual(pScreen);
#if defined(GDK_WINDOWING_X11)
GdkDisplay *pDisplay = getGdkDisplay();
if (DLSYM_GDK_IS_X11_DISPLAY(pDisplay))
{
m_aSystemData.pDisplay = gdk_x11_display_get_xdisplay(pDisplay);
- m_aSystemData.pVisual = gdk_x11_visual_get_xvisual(pVisual);
m_aSystemData.pPlatformName = "xcb";
+ if (GTK_IS_WINDOW(m_pWindow))
+ {
+ GdkScreen* pScreen = gtk_window_get_screen(GTK_WINDOW(m_pWindow));
+ GdkVisual* pVisual = gdk_screen_get_system_visual(pScreen);
+ m_aSystemData.pVisual = gdk_x11_visual_get_xvisual(pVisual);
+ }
}
#endif
#if defined(GDK_WINDOWING_WAYLAND)
@@ -1073,17 +1076,20 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
if( m_pParent && m_pParent->m_pWindow && ! isChild() )
gtk_window_set_screen( GTK_WINDOW(m_pWindow), gtk_window_get_screen( GTK_WINDOW(m_pParent->m_pWindow) ) );
- if (m_pParent)
- {
- if (!(m_pParent->m_nStyle & SalFrameStyleFlags::PLUG))
- gtk_window_set_transient_for( GTK_WINDOW(m_pWindow), GTK_WINDOW(m_pParent->m_pWindow) );
- m_pParent->m_aChildren.push_back( this );
- gtk_window_group_add_window(gtk_window_get_group(GTK_WINDOW(m_pParent->m_pWindow)), GTK_WINDOW(m_pWindow));
- }
- else
+ if (GTK_IS_WINDOW(m_pWindow))
{
- gtk_window_group_add_window(gtk_window_group_new(), GTK_WINDOW(m_pWindow));
- g_object_unref(gtk_window_get_group(GTK_WINDOW(m_pWindow)));
+ if (m_pParent)
+ {
+ if (!(m_pParent->m_nStyle & SalFrameStyleFlags::PLUG))
+ gtk_window_set_transient_for( GTK_WINDOW(m_pWindow), GTK_WINDOW(m_pParent->m_pWindow) );
+ m_pParent->m_aChildren.push_back( this );
+ gtk_window_group_add_window(gtk_window_get_group(GTK_WINDOW(m_pParent->m_pWindow)), GTK_WINDOW(m_pWindow));
+ }
+ else
+ {
+ gtk_window_group_add_window(gtk_window_group_new(), GTK_WINDOW(m_pWindow));
+ g_object_unref(gtk_window_get_group(GTK_WINDOW(m_pWindow)));
+ }
}
// set window type
@@ -1279,6 +1285,8 @@ void GtkSalFrame::DrawMenuBar()
void GtkSalFrame::Center()
{
+ if (!GTK_IS_WINDOW(m_pWindow))
+ return;
if (m_pParent)
gtk_window_set_position(GTK_WINDOW(m_pWindow), GTK_WIN_POS_CENTER_ON_PARENT);
else
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 1cd695cf5687..034d2f29f1f4 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -39,15 +39,16 @@
#include <unx/gstsink.hxx>
#include <vcl/ImageTree.hxx>
#include <vcl/button.hxx>
+#include <vcl/event.hxx>
#include <vcl/i18nhelp.hxx>
#include <vcl/quickselectionengine.hxx>
#include <vcl/mnemonic.hxx>
#include <vcl/pngwrite.hxx>
#include <vcl/stdtext.hxx>
#include <vcl/syswin.hxx>
-#include <vcl/weld.hxx>
#include <vcl/virdev.hxx>
-#include <vcl/event.hxx>
+#include <vcl/weld.hxx>
+#include <vcl/wrkwin.hxx>
#include <window.h>
#include <numeric>
@@ -2653,6 +2654,24 @@ public:
}
};
+namespace
+{
+ class ChildFrame : public WorkWindow
+ {
+ public:
+ ChildFrame(vcl::Window* pParent, WinBits nStyle)
+ : WorkWindow(pParent, nStyle)
+ {
+ }
+ virtual void Resize() override
+ {
+ WorkWindow::Resize();
+ if (vcl::Window *pChild = GetWindow(GetWindowType::FirstChild))
+ pChild->SetPosSizePixel(Point(0, 0), GetSizePixel());
+ }
+ };
+}
+
class GtkInstanceContainer : public GtkInstanceWidget, public virtual weld::Container
{
private:
@@ -2694,6 +2713,32 @@ public:
{
implResetDefault(GTK_WIDGET(m_pContainer), nullptr);
}
+
+ virtual css::uno::Reference<css::awt::XWindow> CreateChildFrame() override
+ {
+ // This will cause a GtkSalFrame to be created. With WB_SYSTEMCHILDWINDOW set it
+ // will create a toplevel GtkEventBox window
+ auto xEmbedWindow = VclPtr<ChildFrame>::Create(ImplGetDefaultWindow(), WB_SYSTEMCHILDWINDOW | WB_DIALOGCONTROL | WB_CHILDDLGCTRL);
+ SalFrame* pFrame = xEmbedWindow->ImplGetFrame();
+ GtkSalFrame* pGtkFrame = dynamic_cast<GtkSalFrame*>(pFrame);
+
+ // relocate that toplevel GtkEventBox into this widget
+ GtkWidget* pWindow = pGtkFrame->getWindow();
+
+ GtkWidget* pParent = gtk_widget_get_parent(pWindow);
+
+ g_object_ref(pWindow);
+ gtk_container_remove(GTK_CONTAINER(pParent), pWindow);
+ gtk_container_add(m_pContainer, pWindow);
+ gtk_container_child_set(m_pContainer, pWindow, "expand", true, "fill", true, nullptr);
+ gtk_widget_set_hexpand(pWindow, true);
+ gtk_widget_set_vexpand(pWindow, true);
+ g_object_unref(pWindow);
+
+ xEmbedWindow->Show();
+ css::uno::Reference<css::awt::XWindow> xWindow(xEmbedWindow->GetComponentInterface(), css::uno::UNO_QUERY);
+ return xWindow;
+ }
};
std::unique_ptr<weld::Container> GtkInstanceWidget::weld_parent() const
@@ -10003,9 +10048,13 @@ public:
gtk_widget_set_size_request(m_pWidget, min, -1);
int nNonCellWidth = get_preferred_size().Width() - min;
- // now set the cell to the max width which it can be within the
- // requested widget width
- gtk_cell_renderer_set_fixed_size(cell, nWidth - nNonCellWidth, -1);
+ int nCellWidth = nWidth - nNonCellWidth;
+ if (nCellWidth >= 0)
+ {
+ // now set the cell to the max width which it can be within the
+ // requested widget width
+ gtk_cell_renderer_set_fixed_size(cell, nWidth - nNonCellWidth, -1);
+ }
}
else
{