summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-30 09:43:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-09-07 14:42:31 +0200
commita2304f62e963b413b7575bedfb8d34e5f2d3ea58 (patch)
treee92b8fce9d381deb02a9823ca24cd20a272c08d0
parent1a86f5643f3c36ead2f9aee42571664c2454ccf7 (diff)
weld writer page style dialog and SvxBorderBackgroundDlg
writer, format page is complete Change-Id: I09f6e4354461c4374cdb0d0e0754dfee35415b45 Reviewed-on: https://gerrit.libreoffice.org/60058 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--compilerplugins/clang/vclwidgets.cxx3
-rw-r--r--cui/source/dialogs/colorpicker.cxx6
-rw-r--r--cui/source/dialogs/cuicharmap.cxx2
-rw-r--r--cui/source/factory/dlgfact.cxx8
-rw-r--r--cui/source/factory/dlgfact.hxx2
-rw-r--r--cui/source/inc/bbdlg.hxx9
-rw-r--r--cui/source/inc/cuitabarea.hxx4
-rw-r--r--cui/source/tabpages/bbdlg.cxx27
-rw-r--r--cui/source/tabpages/tparea.cxx14
-rw-r--r--cui/source/tabpages/tpbitmap.cxx14
-rw-r--r--cui/source/tabpages/tpcolor.cxx6
-rw-r--r--cui/source/tabpages/tpgradnt.cxx14
-rw-r--r--cui/source/tabpages/tphatch.cxx14
-rw-r--r--cui/source/tabpages/tppattern.cxx47
-rw-r--r--cui/uiconfig/ui/areatabpage.ui5
-rw-r--r--cui/uiconfig/ui/bitmaptabpage.ui100
-rw-r--r--cui/uiconfig/ui/colorpage.ui9
-rw-r--r--cui/uiconfig/ui/gradientpage.ui180
-rw-r--r--cui/uiconfig/ui/hatchpage.ui27
-rw-r--r--cui/uiconfig/ui/pageformatpage.ui4
-rw-r--r--cui/uiconfig/ui/patterntabpage.ui41
-rw-r--r--cui/uiconfig/ui/transparencytabpage.ui45
-rw-r--r--include/sfx2/tabdlg.hxx28
-rw-r--r--include/sfx2/viewsh.hxx2
-rw-r--r--include/svx/hdft.hxx2
-rw-r--r--include/svx/svxdlg.hxx2
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx2
-rw-r--r--sc/source/ui/inc/prevwsh.hxx2
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx4
-rw-r--r--sfx2/source/control/charwin.cxx2
-rw-r--r--sfx2/source/dialog/mgetempl.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx43
-rw-r--r--sfx2/source/view/printer.cxx2
-rw-r--r--sfx2/source/view/viewprn.cxx2
-rw-r--r--sfx2/uiconfig/ui/managestylepage.ui2
-rw-r--r--starmath/inc/dialog.hxx6
-rw-r--r--starmath/inc/view.hxx2
-rw-r--r--starmath/source/smmod.cxx4
-rw-r--r--starmath/source/view.cxx4
-rw-r--r--svtools/source/control/valueset.cxx2
-rw-r--r--svtools/uiconfig/ui/linewindow.ui1
-rw-r--r--svx/source/dialog/charmap.cxx2
-rw-r--r--svx/source/dialog/dialcontrol.cxx2
-rw-r--r--svx/source/dialog/dlgctrl.cxx4
-rw-r--r--svx/source/dialog/fntctrl.cxx3
-rw-r--r--svx/source/dialog/frmsel.cxx2
-rw-r--r--svx/source/dialog/hdft.cxx6
-rw-r--r--svx/source/dialog/pagectrl.cxx3
-rw-r--r--svx/source/dialog/paraprev.cxx2
-rw-r--r--svx/source/dialog/swframeexample.cxx2
-rw-r--r--svx/uiconfig/ui/colorwindow.ui1
-rw-r--r--sw/inc/view.hxx8
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx21
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx16
-rw-r--r--sw/source/ui/envelp/envlop1.cxx2
-rw-r--r--sw/source/ui/envelp/envprt.cxx2
-rw-r--r--sw/source/ui/envelp/labfmt.cxx4
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx203
-rw-r--r--sw/source/ui/frmdlg/column.cxx2
-rw-r--r--sw/source/ui/misc/pggrid.cxx4
-rw-r--r--sw/source/uibase/docvw/HeaderFooterWin.cxx2
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx2
-rw-r--r--sw/source/uibase/inc/pview.hxx2
-rw-r--r--sw/source/uibase/inc/tmpdlg.hxx24
-rw-r--r--sw/source/uibase/uiview/pview.cxx6
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx12
-rw-r--r--sw/uiconfig/swriter/ui/columnpage.ui2
-rw-r--r--sw/uiconfig/swriter/ui/templatedialog1.ui39
-rw-r--r--sw/uiconfig/swriter/ui/templatedialog16.ui33
-rw-r--r--sw/uiconfig/swriter/ui/templatedialog2.ui39
-rw-r--r--sw/uiconfig/swriter/ui/templatedialog4.ui39
-rw-r--r--sw/uiconfig/swriter/ui/templatedialog8.ui34
-rw-r--r--sw/uiconfig/swriter/ui/textgridpage.ui2
-rw-r--r--vcl/source/app/salvtables.cxx4
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx8
78 files changed, 764 insertions, 476 deletions
diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx
index 6b8e8125daa7..8f625f5cdfdf 100644
--- a/compilerplugins/clang/vclwidgets.cxx
+++ b/compilerplugins/clang/vclwidgets.cxx
@@ -242,7 +242,8 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD
StringRef filename = getFileNameOfSpellingLoc(spellingLocation);
if ( !(loplugin::isSamePathname(filename, SRCDIR "/vcl/source/window/window.cxx"))
&& !(loplugin::isSamePathname(filename, SRCDIR "/vcl/source/gdi/virdev.cxx"))
- && !(loplugin::isSamePathname(filename, SRCDIR "/vcl/qa/cppunit/lifecycle.cxx")) )
+ && !(loplugin::isSamePathname(filename, SRCDIR "/vcl/qa/cppunit/lifecycle.cxx"))
+ && !(loplugin::isSamePathname(filename, SRCDIR "/sfx2/source/dialog/tabdlg.cxx")) )
{
report(
DiagnosticsEngine::Warning,
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index 24a498238d2f..e11a70acbbce 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -164,9 +164,9 @@ public:
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 10,
pDrawingArea->get_text_height() * 2);
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void SetColor(const Color& rCol)
@@ -202,9 +202,9 @@ public:
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 40,
pDrawingArea->get_text_height() * 10);
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
virtual ~ColorFieldControl() override
@@ -548,8 +548,8 @@ ColorSliderControl::ColorSliderControl()
void ColorSliderControl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
- pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 3, -1);
CustomWidgetController::SetDrawingArea(pDrawingArea);
+ pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 3, -1);
}
ColorSliderControl::~ColorSliderControl()
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index e544ff18fce5..06169a053109 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -1136,6 +1136,7 @@ SvxShowText::SvxShowText(const VclPtr<VirtualDevice>& rVirDev)
void SvxShowText::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
vcl::Font aFont = m_xVirDev->GetFont();
Size aFontSize(aFont.GetFontSize().Width() * 5, aFont.GetFontSize().Height() * 5);
aFont.SetFontSize(aFontSize);
@@ -1143,7 +1144,6 @@ void SvxShowText::SetDrawingArea(weld::DrawingArea* pDrawingArea)
m_xVirDev->SetFont(aFont);
pDrawingArea->set_size_request(m_xVirDev->approximate_digit_width() + 2 * 12,
m_xVirDev->LogicToPixel(aFontSize).Height() * 2);
- CustomWidgetController::SetDrawingArea(pDrawingArea);
m_xVirDev->Pop();
}
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 8874dedd834e..973a5ed3b26c 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1150,17 +1150,15 @@ VclPtr<AbstractSvxSearchSimilarityDialog> AbstractDialogFactory_Impl::CreateSvxS
}
VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxBorderBackgroundDlg(
- vcl::Window* pParent,
+ weld::Window* pParent,
const SfxItemSet& rCoreSet,
bool bEnableDrawingLayerFillStyles)
{
- VclPtrInstance<SvxBorderBackgroundDlg> pDlg(
+ return VclPtr<CuiAbstractTabController_Impl>::Create(o3tl::make_unique<SvxBorderBackgroundDlg>(
pParent,
rCoreSet,
/*bEnableSelector*/true,
- bEnableDrawingLayerFillStyles);
-
- return VclPtr<CuiAbstractTabDialog_Impl>::Create(pDlg);
+ bEnableDrawingLayerFillStyles));
}
VclPtr<AbstractSvxTransformTabDialog> AbstractDialogFactory_Impl::CreateSvxTransformTabDialog(weld::Window* pParent,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 73b8bb9521d9..bfe749ba4142 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -668,7 +668,7 @@ public:
virtual VclPtr<AbstractSvxZoomDialog> CreateSvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) override;
// add for SvxBorderBackgroundDlg
virtual VclPtr<SfxAbstractTabDialog> CreateSvxBorderBackgroundDlg(
- vcl::Window* pParent,
+ weld::Window* pParent,
const SfxItemSet& rCoreSet,
bool bEnableDrawingLayerFillStyles) override;
diff --git a/cui/source/inc/bbdlg.hxx b/cui/source/inc/bbdlg.hxx
index 7176890b1c4f..b25b7cc098da 100644
--- a/cui/source/inc/bbdlg.hxx
+++ b/cui/source/inc/bbdlg.hxx
@@ -25,21 +25,18 @@
Description: bunch the border background pages
--------------------------------------------------------------------*/
-class SvxBorderBackgroundDlg: public SfxTabDialog
+class SvxBorderBackgroundDlg: public SfxTabDialogController
{
public:
- SvxBorderBackgroundDlg(vcl::Window *pParent,
+ SvxBorderBackgroundDlg(weld::Window *pParent,
const SfxItemSet& rCoreSet,
bool bEnableSelector,
bool bEnableDrawingLayerFillStyles);
protected:
- virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) override;
+ virtual void PageCreated(const OString& rPageId, SfxTabPage& rTabPage) override;
private:
bool mbEnableBackgroundSelector : 1; ///< for Border/Background
- sal_uInt16 m_nBackgroundPageId;
- sal_uInt16 m_nAreaPageId;
- sal_uInt16 m_nTransparencePageId;
};
#endif
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index de7fd90cc3e7..fc256c66312f 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -609,14 +609,14 @@ private:
XFillAttrSetItem m_aXFillAttr;
SfxItemSet& m_rXFSet;
- SvxPixelCtl m_aCtlPixel;
XRectPreview m_aCtlPreview;
+ std::unique_ptr<SvxPixelCtl> m_xCtlPixel;
std::unique_ptr<ColorListBox> m_xLbColor;
std::unique_ptr<ColorListBox> m_xLbBackgroundColor;
std::unique_ptr<PresetListBox> m_xPatternLB;
std::unique_ptr<weld::Button> m_xBtnAdd;
std::unique_ptr<weld::Button> m_xBtnModify;
- std::unique_ptr<weld::CustomWeld> m_xCtlPixel;
+ std::unique_ptr<weld::CustomWeld> m_xCtlPixelWin;
std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
std::unique_ptr<weld::CustomWeld> m_xPatternLBWin;
std::unique_ptr<SvxBitmapCtl> m_xBitmapCtl;
diff --git a/cui/source/tabpages/bbdlg.cxx b/cui/source/tabpages/bbdlg.cxx
index 034a43132b83..a17122b0f66b 100644
--- a/cui/source/tabpages/bbdlg.cxx
+++ b/cui/source/tabpages/bbdlg.cxx
@@ -23,39 +23,36 @@
#include <svx/svxids.hrc>
#include <cuitabarea.hxx>
-SvxBorderBackgroundDlg::SvxBorderBackgroundDlg(vcl::Window *pParent,
+SvxBorderBackgroundDlg::SvxBorderBackgroundDlg(weld::Window *pParent,
const SfxItemSet& rCoreSet,
bool bEnableSelector,
bool bEnableDrawingLayerFillStyles)
- : SfxTabDialog(pParent,
- bEnableDrawingLayerFillStyles
- ? OUString("BorderAreaTransparencyDialog")
- : OUString("BorderBackgroundDialog"),
+ : SfxTabDialogController(pParent,
bEnableDrawingLayerFillStyles
? OUString("cui/ui/borderareatransparencydialog.ui")
: OUString("cui/ui/borderbackgrounddialog.ui"),
+ bEnableDrawingLayerFillStyles
+ ? OString("BorderAreaTransparencyDialog")
+ : OString("BorderBackgroundDialog"),
&rCoreSet)
, mbEnableBackgroundSelector(bEnableSelector)
- , m_nBackgroundPageId(0)
- , m_nAreaPageId(0)
- , m_nTransparencePageId(0)
{
AddTabPage("borders", SvxBorderTabPage::Create, nullptr );
if (bEnableDrawingLayerFillStyles)
{
// Here we want full DrawingLayer FillStyle access, so add Area and Transparency TabPages
- m_nAreaPageId = AddTabPage("area", SvxAreaTabPage::Create, nullptr);
- m_nTransparencePageId = AddTabPage("transparence", SvxTransparenceTabPage::Create, nullptr);
+ AddTabPage("area", SvxAreaTabPage::Create, nullptr);
+ AddTabPage("transparence", SvxTransparenceTabPage::Create, nullptr);
}
else
{
- m_nBackgroundPageId = AddTabPage("background", SvxBackgroundTabPage::Create, nullptr );
+ AddTabPage("background", SvxBackgroundTabPage::Create, nullptr );
}
}
-void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
+void SvxBorderBackgroundDlg::PageCreated(const OString& rPageId, SfxTabPage& rTabPage)
{
- if (nPageId == m_nBackgroundPageId)
+ if (rPageId == "background")
{
// allow switching between Color/graphic
if(mbEnableBackgroundSelector)
@@ -69,7 +66,7 @@ void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPa
// these pages find the needed attributes for fill style suggestions.
// These are added in SwDocStyleSheet::GetItemSet() for the SfxStyleFamily::Para on
// demand, but could also be directly added from the DrawModel.
- else if (nPageId == m_nAreaPageId)
+ else if (rPageId == "area")
{
SfxItemSet aNew(
*GetInputSetImpl()->GetPool(),
@@ -83,7 +80,7 @@ void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPa
rTabPage.PageCreated(aNew);
}
- else if (nPageId == m_nTransparencePageId)
+ else if (rPageId == "transparence")
{
rTabPage.PageCreated(*GetInputSetImpl());
}
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 2386d48f527f..40b3e970f877 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -118,7 +118,10 @@ SvxAreaTabPage::SvxAreaTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs
SetExchangeSupport();
- TabPageParent aFillTab(m_xFillTab.get());
+ TabPageParent aFillTab(m_xFillTab.get(), pParent.pController);
+ // TEMP
+ if (!aFillTab.pController)
+ aFillTab.pParent = GetParentDialog();
// Calculate optimal size of all pages..
m_pFillTabPage.disposeAndReset(SvxColorTabPage::Create(aFillTab, &m_rXFSet));
@@ -346,9 +349,16 @@ IMPL_LINK(SvxAreaTabPage, SelectFillTypeHdl_Impl, weld::ToggleButton&, rButton,
{
maBox.SelectButton(&rButton);
FillType eFillType = static_cast<FillType>(maBox.GetCurrentButtonPos());
- m_pFillTabPage.disposeAndReset(lcl_CreateFillStyleTabPage(eFillType, m_xFillTab.get(), m_rXFSet));
+ TabPageParent aFillTab(m_xFillTab.get(), GetDialogController());
+ // TEMP
+ if (!aFillTab.pController)
+ aFillTab.pParent = GetParentDialog();
+ m_pFillTabPage.disposeAndReset(lcl_CreateFillStyleTabPage(eFillType, aFillTab, m_rXFSet));
if (m_pFillTabPage)
+ {
m_pFillTabPage->SetTabDialog(GetTabDialog());
+ m_pFillTabPage->SetDialogController(GetDialogController());
+ }
CreatePage( eFillType , m_pFillTabPage);
}
}
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 089e07342d39..c7e71b665820 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -522,7 +522,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickRenameHdl, PresetListBox*, void)
OUString aName( m_pBitmapList->GetBitmap( nPos )->GetName() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetTabDialog()->GetFrameWeld(), aName, aDesc));
+ ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetDialogFrameWeld(), aName, aDesc));
bool bLoop = true;
while( bLoop && pDlg->Execute() == RET_OK )
@@ -543,7 +543,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickRenameHdl, PresetListBox*, void)
}
else
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("DuplicateNameDialog"));
xBox->run();
}
@@ -558,7 +558,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl, PresetListBox*, void)
if( nPos != VALUESET_ITEM_NOTFOUND )
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/querydeletebitmapdialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/querydeletebitmapdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("AskDelBitmapDialog"));
if (xQueryBox->run() == RET_YES)
@@ -708,7 +708,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyTileOffsetHdl, weld::MetricSpinButton&,
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void)
{
- SvxOpenGraphicDialog aDlg("Import", GetTabDialog()->GetFrameWeld());
+ SvxOpenGraphicDialog aDlg("Import", GetDialogFrameWeld());
aDlg.EnableLink(false);
long nCount = m_pBitmapList->Count();
@@ -728,7 +728,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void)
OUString aName;
INetURLObject aURL( aDlg.GetPath() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetTabDialog()->GetFrameWeld(), aURL.GetName().getToken(0, '.'), aDesc));
+ ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetDialogFrameWeld(), aURL.GetName().getToken(0, '.'), aDesc));
nError = ErrCode(1);
while( pDlg->Execute() == RET_OK )
@@ -746,7 +746,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void)
break;
}
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("DuplicateNameDialog"));
if (xBox->run() != RET_OK)
break;
@@ -771,7 +771,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void)
else
{
// graphic couldn't be loaded
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/querynoloadedfiledialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/querynoloadedfiledialog.ui"));
std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("NoLoadedFileDialog"));
xBox->run();
}
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 857bd6391276..f5449bcbd09b 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -341,7 +341,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void)
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetTabDialog()->GetFrameWeld(), aName, aDesc));
+ ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetDialogFrameWeld(), aName, aDesc));
sal_uInt16 nError = 1;
while (pDlg->Execute() == RET_OK)
@@ -355,7 +355,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void)
break;
}
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog"));
if (xWarnBox->run() != RET_OK)
break;
@@ -395,7 +395,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickWorkOnHdl_Impl, weld::Button&, void)
aColorDlg.SetColor (aCurrentColor);
aColorDlg.SetMode( svtools::ColorPickerMode::Modify );
- if (aColorDlg.Execute(GetTabDialog()->GetFrameWeld()) == RET_OK)
+ if (aColorDlg.Execute(GetDialogFrameWeld()) == RET_OK)
{
Color aPreviewColor = aColorDlg.GetColor();
aCurrentColor = aPreviewColor;
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 9e9c4342561f..42d1ab3096a9 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -64,9 +64,9 @@ SvxGradientTabPage::SvxGradientTabPage(TabPageParent pParent, const SfxItemSet&
, m_xMtrAngle(m_xBuilder->weld_metric_spin_button("anglemtr", FUNIT_DEGREE))
, m_xMtrBorder(m_xBuilder->weld_metric_spin_button("bordermtr", FUNIT_PERCENT))
, m_xSliderBorder(m_xBuilder->weld_scale("borderslider"))
- , m_xLbColorFrom(new ColorListBox(m_xBuilder->weld_menu_button("colorfromlb"), GetFrameWeld()))
+ , m_xLbColorFrom(new ColorListBox(m_xBuilder->weld_menu_button("colorfromlb"), pParent.GetFrameWeld()))
, m_xMtrColorFrom(m_xBuilder->weld_metric_spin_button("colorfrommtr", FUNIT_PERCENT))
- , m_xLbColorTo(new ColorListBox(m_xBuilder->weld_menu_button("colortolb"), GetFrameWeld()))
+ , m_xLbColorTo(new ColorListBox(m_xBuilder->weld_menu_button("colortolb"), pParent.GetFrameWeld()))
, m_xMtrColorTo(m_xBuilder->weld_metric_spin_button("colortomtr", FUNIT_PERCENT))
, m_xGradientLB(new PresetListBox(m_xBuilder->weld_scrolled_window("gradientpresetlistwin")))
, m_xMtrIncrement(m_xBuilder->weld_spin_button("incrementmtr"))
@@ -351,7 +351,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl, weld::Button&, void)
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetTabDialog()->GetFrameWeld(), aName, aDesc));
+ ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetDialogFrameWeld(), aName, aDesc));
sal_uInt16 nError = 1;
while (pDlg->Execute() == RET_OK)
@@ -366,7 +366,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl, weld::Button&, void)
break;
}
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog"));
if (xWarnBox->run() != RET_OK)
break;
@@ -443,7 +443,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickDeleteHdl_Impl, PresetListBox*, void)
if( nPos != VALUESET_ITEM_NOTFOUND )
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/querydeletegradientdialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/querydeletegradientdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("AskDelGradientDialog"));
if (xQueryBox->run() == RET_YES)
{
@@ -476,7 +476,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickRenameHdl_Impl, PresetListBox*, void)
OUString aName( m_pGradientList->GetGradient( nPos )->GetName() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetTabDialog()->GetFrameWeld(), aName, aDesc));
+ ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetDialogFrameWeld(), aName, aDesc));
bool bLoop = true;
while( bLoop && pDlg->Execute() == RET_OK )
@@ -497,7 +497,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickRenameHdl_Impl, PresetListBox*, void)
}
else
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("DuplicateNameDialog"));
xBox->run();
}
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 110df65ceecd..aa7e81177265 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -60,9 +60,9 @@ SvxHatchTabPage::SvxHatchTabPage(TabPageParent pParent, const SfxItemSet& rInAtt
, m_xMtrAngle(m_xBuilder->weld_metric_spin_button("anglemtr", FUNIT_DEGREE))
, m_xSliderAngle(m_xBuilder->weld_scale("angleslider"))
, m_xLbLineType(m_xBuilder->weld_combo_box_text("linetypelb"))
- , m_xLbLineColor(new ColorListBox(m_xBuilder->weld_menu_button("linecolorlb"), GetFrameWeld()))
+ , m_xLbLineColor(new ColorListBox(m_xBuilder->weld_menu_button("linecolorlb"), pParent.GetFrameWeld()))
, m_xCbBackgroundColor(m_xBuilder->weld_check_button("backgroundcolor"))
- , m_xLbBackgroundColor(new ColorListBox(m_xBuilder->weld_menu_button("backgroundcolorlb"), GetFrameWeld()))
+ , m_xLbBackgroundColor(new ColorListBox(m_xBuilder->weld_menu_button("backgroundcolorlb"), pParent.GetFrameWeld()))
, m_xHatchLB(new PresetListBox(m_xBuilder->weld_scrolled_window("hatchpresetlistwin")))
, m_xBtnAdd(m_xBuilder->weld_button("add"))
, m_xBtnModify(m_xBuilder->weld_button("modify"))
@@ -425,7 +425,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl, weld::Button&, void)
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetTabDialog()->GetFrameWeld(), aName, aDesc));
+ ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetDialogFrameWeld(), aName, aDesc));
sal_uInt16 nError = 1;
while( pDlg->Execute() == RET_OK )
@@ -439,7 +439,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl, weld::Button&, void)
break;
}
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog"));
if (xWarnBox->run() != RET_OK)
break;
@@ -507,7 +507,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickDeleteHdl_Impl, PresetListBox*, void)
if( nPos != VALUESET_ITEM_NOTFOUND )
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/querydeletehatchdialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/querydeletehatchdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("AskDelHatchDialog"));
if (xQueryBox->run() == RET_YES)
{
@@ -537,7 +537,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickRenameHdl_Impl, PresetListBox*, void )
OUString aName( m_pHatchingList->GetHatch( nPos )->GetName() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetTabDialog()->GetFrameWeld(), aName, aDesc));
+ ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetDialogFrameWeld(), aName, aDesc));
bool bLoop = true;
while( bLoop && pDlg->Execute() == RET_OK )
@@ -558,7 +558,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickRenameHdl_Impl, PresetListBox*, void )
}
else
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("DuplicateNameDialog"));
xBox->run();
}
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx
index b7f72a6cbe01..a8e5e4865bb5 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -90,13 +90,13 @@ SvxPatternTabPage::SvxPatternTabPage(TabPageParent pParent, const SfxItemSet& rI
, m_pnColorListState(nullptr)
, m_aXFillAttr(rInAttrs.GetPool())
, m_rXFSet(m_aXFillAttr.GetItemSet())
- , m_aCtlPixel(this)
- , m_xLbColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_COLOR"), GetFrameWeld()))
- , m_xLbBackgroundColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_BACKGROUND_COLOR"), GetFrameWeld()))
+ , m_xCtlPixel(new SvxPixelCtl(this))
+ , m_xLbColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_COLOR"), pParent.GetFrameWeld()))
+ , m_xLbBackgroundColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_BACKGROUND_COLOR"), pParent.GetFrameWeld()))
, m_xPatternLB(new PresetListBox(m_xBuilder->weld_scrolled_window("patternpresetlistwin")))
, m_xBtnAdd(m_xBuilder->weld_button("BTN_ADD"))
, m_xBtnModify(m_xBuilder->weld_button("BTN_MODIFY"))
- , m_xCtlPixel(new weld::CustomWeld(*m_xBuilder, "CTL_PIXEL", m_aCtlPixel))
+ , m_xCtlPixelWin(new weld::CustomWeld(*m_xBuilder, "CTL_PIXEL", *m_xCtlPixel))
, m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "CTL_PREVIEW", m_aCtlPreview))
, m_xPatternLBWin(new weld::CustomWeld(*m_xBuilder, "patternpresetlist", *m_xPatternLB))
{
@@ -133,10 +133,11 @@ void SvxPatternTabPage::dispose()
{
m_xPatternLBWin.reset();
m_xCtlPreview.reset();
- m_xCtlPixel.reset();
+ m_xCtlPixelWin.reset();
m_xPatternLB.reset();
m_xLbBackgroundColor.reset();
m_xLbColor.reset();
+ m_xCtlPixel.reset();
SvxTabPage::dispose();
}
@@ -219,7 +220,7 @@ void SvxPatternTabPage::Reset( const SfxItemSet* )
{
m_xBitmapCtl->SetPixelColor( m_xLbColor->GetSelectEntryColor() );
m_xBitmapCtl->SetBackgroundColor( m_xLbBackgroundColor->GetSelectEntryColor() );
- m_xBitmapCtl->SetBmpArray( m_aCtlPixel.GetBitmapPixelPtr() );
+ m_xBitmapCtl->SetBmpArray( m_xCtlPixel->GetBitmapPixelPtr() );
// get bitmap and display it
const XFillBitmapItem aBmpItem(OUString(), Graphic(m_xBitmapCtl->GetBitmapEx()));
@@ -294,13 +295,13 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, SvtValueSet*, void)
if(bIs8x8)
{
- m_aCtlPixel.SetPaintable( true );
+ m_xCtlPixel->SetPaintable( true );
m_xBtnModify->set_sensitive(true);
m_xBtnAdd->set_sensitive(true);
// setting the pixel control
- m_aCtlPixel.SetXBitmap(pGraphicObject->GetGraphic().GetBitmapEx());
+ m_xCtlPixel->SetXBitmap(pGraphicObject->GetGraphic().GetBitmapEx());
Color aPixelColor = aFront.GetColor();
Color aBackColor = aBack.GetColor();
@@ -319,13 +320,13 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, SvtValueSet*, void)
}
else
{
- m_aCtlPixel.Reset();
- m_aCtlPixel.SetPaintable( false );
+ m_xCtlPixel->Reset();
+ m_xCtlPixel->SetPaintable( false );
m_xBtnModify->set_sensitive(false);
m_xBtnAdd->set_sensitive(false);
}
- m_aCtlPixel.Invalidate();
+ m_xCtlPixel->Invalidate();
}
}
@@ -347,7 +348,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, weld::Button&, void)
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetTabDialog()->GetFrameWeld(), aName, aDesc));
+ ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetDialogFrameWeld(), aName, aDesc));
sal_uInt16 nError(1);
while( pDlg->Execute() == RET_OK )
@@ -361,7 +362,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, weld::Button&, void)
break;
}
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog"));
if (xWarnBox->run() != RET_OK)
break;
@@ -372,7 +373,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, weld::Button&, void)
if( !nError )
{
std::unique_ptr<XBitmapEntry> pEntry;
- if( m_aCtlPixel.IsEnabled() )
+ if( m_xCtlPixel->IsEnabled() )
{
const BitmapEx aBitmapEx(m_xBitmapCtl->GetBitmapEx());
@@ -447,7 +448,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickRenameHdl_Impl, PresetListBox*, void)
OUString aName(m_pPatternList->GetBitmap(nPos)->GetName());
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetTabDialog()->GetFrameWeld(), aName, aDesc));
+ ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetDialogFrameWeld(), aName, aDesc));
bool bLoop = true;
@@ -470,7 +471,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickRenameHdl_Impl, PresetListBox*, void)
}
else
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog"));
xWarnBox->run();
}
@@ -485,7 +486,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickDeleteHdl_Impl, PresetListBox*, void)
if( nPos != VALUESET_ITEM_NOTFOUND )
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/querydeletebitmapdialog.ui"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDialogFrameWeld(), "cui/ui/querydeletebitmapdialog.ui"));
std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("AskDelBitmapDialog"));
if (xQueryBox->run() == RET_YES)
{
@@ -496,7 +497,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickDeleteHdl_Impl, PresetListBox*, void)
m_xPatternLB->Resize();
m_aCtlPreview.Invalidate();
- m_aCtlPixel.Invalidate();
+ m_xCtlPixel->Invalidate();
ChangePatternHdl_Impl(m_xPatternLB.get());
@@ -518,9 +519,9 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangeColorHdl_Impl, ColorListBox&, void)
void SvxPatternTabPage::ChangeColor_Impl()
{
- m_aCtlPixel.SetPixelColor( m_xLbColor->GetSelectEntryColor() );
- m_aCtlPixel.SetBackgroundColor( m_xLbBackgroundColor->GetSelectEntryColor() );
- m_aCtlPixel.Invalidate();
+ m_xCtlPixel->SetPixelColor( m_xLbColor->GetSelectEntryColor() );
+ m_xCtlPixel->SetBackgroundColor( m_xLbBackgroundColor->GetSelectEntryColor() );
+ m_xCtlPixel->Invalidate();
m_xBitmapCtl->SetPixelColor( m_xLbColor->GetSelectEntryColor() );
m_xBitmapCtl->SetBackgroundColor( m_xLbBackgroundColor->GetSelectEntryColor() );
@@ -538,9 +539,9 @@ void SvxPatternTabPage::PointChanged( vcl::Window*, RectPoint )
void SvxPatternTabPage::PointChanged(weld::DrawingArea* pDrawingArea, RectPoint)
{
- if (pDrawingArea == m_aCtlPixel.GetDrawingArea())
+ if (pDrawingArea == m_xCtlPixel->GetDrawingArea())
{
- m_xBitmapCtl->SetBmpArray(m_aCtlPixel.GetBitmapPixelPtr());
+ m_xBitmapCtl->SetBmpArray(m_xCtlPixel->GetBitmapPixelPtr());
// get bitmap and display it
m_rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmapEx())));
diff --git a/cui/uiconfig/ui/areatabpage.ui b/cui/uiconfig/ui/areatabpage.ui
index 6f21498a0467..493114017f15 100644
--- a/cui/uiconfig/ui/areatabpage.ui
+++ b/cui/uiconfig/ui/areatabpage.ui
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
- <!-- interface-requires LibreOffice 1.0 -->
<object class="GtkBox" id="AreaTabPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="spacing">6</property>
<child>
diff --git a/cui/uiconfig/ui/bitmaptabpage.ui b/cui/uiconfig/ui/bitmaptabpage.ui
index 78792593c776..6be64b47549d 100644
--- a/cui/uiconfig/ui/bitmaptabpage.ui
+++ b/cui/uiconfig/ui/bitmaptabpage.ui
@@ -18,28 +18,24 @@
<object class="GtkFrame" id="Fill Frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="bitmapwin">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
@@ -52,7 +48,7 @@
<object class="GtkDrawingArea" id="BITMAP">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hexpand">True</property>
+ <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="vexpand">True</property>
</object>
</child>
@@ -104,6 +100,8 @@
<object class="GtkFrame" id="frame1">
<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>
@@ -111,6 +109,7 @@
<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>
@@ -215,6 +214,34 @@
<property name="position">1</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="scaletsb">
+ <property name="label" translatable="yes" context="bitmaptabpage|scaletsb">Scale</property>
+ <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="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
@@ -226,7 +253,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -238,30 +265,14 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="scaletsb">
- <property name="label" translatable="yes" context="bitmaptabpage|scaletsb">Scale</property>
- <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="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
@@ -371,6 +382,19 @@
<property name="position">1</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
@@ -382,7 +406,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -393,14 +417,14 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -441,6 +465,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
+ <property name="active">0</property>
<items>
<item translatable="yes" context="bitmaptabpage|tileofflb">Row</item>
<item translatable="yes" context="bitmaptabpage|tileofflb">Column</item>
@@ -512,22 +537,17 @@
<object class="GtkAlignment" id="alignment8">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">end</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="valign">start</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="can_focus">False</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
<property name="shadow_type">in</property>
@@ -539,8 +559,6 @@
<object class="GtkDrawingArea" id="CTL_BITMAP_PREVIEW">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="CTL_BITMAP_PREVIEW-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="bitmaptabpage|CTL_BITMAP_PREVIEW-atkobject">Example</property>
@@ -580,4 +598,16 @@
</packing>
</child>
</object>
+ <object class="GtkSizeGroup">
+ <widgets>
+ <widget name="label10"/>
+ <widget name="label11"/>
+ </widgets>
+ </object>
+ <object class="GtkSizeGroup">
+ <widgets>
+ <widget name="label5"/>
+ <widget name="label6"/>
+ </widgets>
+ </object>
</interface>
diff --git a/cui/uiconfig/ui/colorpage.ui b/cui/uiconfig/ui/colorpage.ui
index 431f0a7511c3..d1941ef2dee3 100644
--- a/cui/uiconfig/ui/colorpage.ui
+++ b/cui/uiconfig/ui/colorpage.ui
@@ -40,7 +40,7 @@
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="pixbuf">res/sc10350.png</property>
+ <property name="icon_name">res/sc10350.png</property>
</object>
<object class="GtkBox" id="ColorPage">
<property name="visible">True</property>
@@ -134,6 +134,7 @@
<object class="GtkDrawingArea" id="recentcolorset">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
@@ -254,6 +255,7 @@
<object class="GtkDrawingArea" id="colorset">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
@@ -311,6 +313,7 @@
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
@@ -321,7 +324,7 @@
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
@@ -640,7 +643,7 @@
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
diff --git a/cui/uiconfig/ui/gradientpage.ui b/cui/uiconfig/ui/gradientpage.ui
index 2021908ed03d..cdaf2f3f8840 100644
--- a/cui/uiconfig/ui/gradientpage.ui
+++ b/cui/uiconfig/ui/gradientpage.ui
@@ -2,6 +2,7 @@
<!-- Generated with glade 3.22.1 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
+ <object class="GtkSizeGroup"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">3</property>
<property name="upper">256</property>
@@ -47,6 +48,8 @@
<object class="GtkBox" id="GradientPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="spacing">6</property>
<child>
@@ -71,7 +74,6 @@
<object class="GtkScrolledWindow" id="gradientpresetlistwin">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
@@ -84,7 +86,7 @@
<object class="GtkDrawingArea" id="gradientpresetlist">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hexpand">True</property>
+ <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="vexpand">True</property>
</object>
</child>
@@ -164,12 +166,16 @@
<object class="GtkFrame" id="frame1">
<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>
<object class="GtkAlignment" id="alignment1">
<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>
@@ -177,6 +183,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
+ <property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
@@ -247,6 +254,7 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
+ <property name="width">2</property>
</packing>
</child>
<child>
@@ -288,14 +296,9 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
+ <property name="width">2</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -311,32 +314,6 @@
<property name="row_spacing">3</property>
<property name="column_spacing">6</property>
<child>
- <object class="GtkLabel" id="angleft">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="gradientpage|angleft">A_ngle:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">anglemtr</property>
- <property name="xalign">0</property>
- <property name="yalign">0.43999999761581421</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="anglemtr">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">angleadjustment</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="centerft">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -396,6 +373,9 @@
</packing>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -414,7 +394,8 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">2</property>
</packing>
</child>
<child>
@@ -429,7 +410,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -441,34 +422,30 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkSpinButton" id="anglemtr">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">angleadjustment</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
</child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="grid2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="valign">start</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
<child>
- <object class="GtkLabel" id="colorfromft">
+ <object class="GtkLabel" id="angleft">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="gradientpage|colorfromft">_From Color:</property>
+ <property name="hexpand">True</property>
+ <property name="label" translatable="yes" context="gradientpage|angleft">A_ngle:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">colorfromlb</property>
- <property name="xalign">0</property>
+ <property name="mnemonic_widget">anglemtr</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0.43999999761581421</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -476,9 +453,20 @@
</packing>
</child>
<child>
- <object class="GtkMenuButton" id="colorfromlb">
+ <object class="GtkSpinButton" id="colortomtr">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">percentadjustment2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkMenuButton" id="colortolb">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<child>
@@ -487,42 +475,28 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">6</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="colorfrommtr">
+ <object class="GtkLabel" id="colortoft">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="margin_left">6</property>
- <property name="adjustment">percentadjustment1</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="gradientpage|colortoft">_To Color:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">colortolb</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">2</property>
</packing>
</child>
<child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="grid1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="valign">start</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkMenuButton" id="colortolb">
+ <object class="GtkMenuButton" id="colorfromlb">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<child>
@@ -531,43 +505,40 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="colortomtr">
+ <object class="GtkSpinButton" id="colorfrommtr">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="margin_left">6</property>
- <property name="adjustment">percentadjustment2</property>
+ <property name="adjustment">percentadjustment1</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="colortoft">
+ <object class="GtkLabel" id="colorfromft">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="gradientpage|colortoft">_To Color:</property>
+ <property name="label" translatable="yes" context="gradientpage|colorfromft">_From Color:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">colortolb</property>
+ <property name="mnemonic_widget">colorfromlb</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">2</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
@@ -633,7 +604,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">8</property>
+ <property name="position">9</property>
</packing>
</child>
</object>
@@ -661,7 +632,7 @@
<object class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
+ <property name="halign">end</property>
<property name="valign">start</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
@@ -669,23 +640,17 @@
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="valign">start</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="valign">start</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="can_focus">False</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
<property name="shadow_type">in</property>
@@ -697,8 +662,6 @@
<object class="GtkDrawingArea" id="previewctl">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="previewctl-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="gradientpage|previewctl-atkobject">Example</property>
@@ -733,6 +696,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
diff --git a/cui/uiconfig/ui/hatchpage.ui b/cui/uiconfig/ui/hatchpage.ui
index e55dc25ea25e..b683522f5c55 100644
--- a/cui/uiconfig/ui/hatchpage.ui
+++ b/cui/uiconfig/ui/hatchpage.ui
@@ -45,7 +45,6 @@
<object class="GtkScrolledWindow" id="hatchpresetlistwin">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
@@ -58,7 +57,7 @@
<object class="GtkDrawingArea" id="hatchpresetlist">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hexpand">True</property>
+ <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="vexpand">True</property>
</object>
</child>
@@ -154,6 +153,8 @@
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
+ <property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
@@ -285,7 +286,7 @@
<child>
<object class="GtkMenuButton" id="linecolorlb">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
@@ -322,7 +323,7 @@
<child>
<object class="GtkMenuButton" id="backgroundcolorlb">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
@@ -356,7 +357,7 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
@@ -365,7 +366,7 @@
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
+ <property name="halign">end</property>
<property name="valign">start</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
@@ -373,23 +374,18 @@
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="valign">start</property>
+ <property name="halign">end</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="valign">start</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="can_focus">False</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
<property name="shadow_type">in</property>
@@ -401,8 +397,6 @@
<object class="GtkDrawingArea" id="previewctl">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="previewctl-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="hatchpage|previewctl-atkobject">Example</property>
@@ -436,7 +430,8 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
diff --git a/cui/uiconfig/ui/pageformatpage.ui b/cui/uiconfig/ui/pageformatpage.ui
index 0097688fa8f4..f864e9f6fdd9 100644
--- a/cui/uiconfig/ui/pageformatpage.ui
+++ b/cui/uiconfig/ui/pageformatpage.ui
@@ -5,6 +5,7 @@
<object class="GtkGrid" id="PageFormatPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
<property name="hexpand">True</property>
<property name="border_width">6</property>
<property name="row_spacing">12</property>
@@ -20,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>
@@ -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="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
@@ -221,7 +220,6 @@
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
<packing>
diff --git a/cui/uiconfig/ui/patterntabpage.ui b/cui/uiconfig/ui/patterntabpage.ui
index 57bf90ca763f..1d882b507029 100644
--- a/cui/uiconfig/ui/patterntabpage.ui
+++ b/cui/uiconfig/ui/patterntabpage.ui
@@ -31,7 +31,6 @@
<object class="GtkScrolledWindow" id="patternpresetlistwin">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
@@ -39,12 +38,12 @@
<child>
<object class="GtkViewport">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<child>
<object class="GtkDrawingArea" id="patternpresetlist">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hexpand">True</property>
+ <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="vexpand">True</property>
</object>
</child>
@@ -68,7 +67,7 @@
<object class="GtkButton" id="BTN_ADD">
<property name="label">gtk-add</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
@@ -82,7 +81,7 @@
<object class="GtkButton" id="BTN_MODIFY">
<property name="label" translatable="yes" context="patterntabpage|BTN_MODIFY">_Modify</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
@@ -116,7 +115,7 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -124,19 +123,24 @@
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<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>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
+ <property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
@@ -224,7 +228,7 @@
<child>
<object class="GtkMenuButton" id="LB_COLOR">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<child>
@@ -268,7 +272,7 @@
<child>
<object class="GtkMenuButton" id="LB_BACKGROUND_COLOR">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<child>
@@ -304,8 +308,8 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -313,30 +317,25 @@
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
+ <property name="halign">end</property>
+ <property name="valign">start</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="halign">start</property>
- <property name="valign">start</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="valign">start</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="can_focus">False</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">never</property>
<property name="shadow_type">in</property>
@@ -348,11 +347,9 @@
<object class="GtkDrawingArea" id="CTL_PREVIEW">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="CTL_PREVIEW-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes" context="patterntabpage|CTL_PREVIEW-atkobject">Example</property>
+ <property name="AtkObject::accessible-name" translatable="yes" context="patterntabpage|CTL_PREVIEW-atkobject">Example</property>
</object>
</child>
</object>
diff --git a/cui/uiconfig/ui/transparencytabpage.ui b/cui/uiconfig/ui/transparencytabpage.ui
index efb31b319517..f2c6ff5b77a3 100644
--- a/cui/uiconfig/ui/transparencytabpage.ui
+++ b/cui/uiconfig/ui/transparencytabpage.ui
@@ -37,40 +37,6 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
- <object class="GtkListStore" id="liststoreTYPE">
- <columns>
- <!-- column-name gchararray1 -->
- <column type="gchararray"/>
- <!-- column-name guint1 -->
- <column type="guint"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes" context="transparencytabpage|liststoreTYPE">Linear</col>
- <col id="1">0</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="transparencytabpage|liststoreTYPE">Axial</col>
- <col id="1">0</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="transparencytabpage|liststoreTYPE">Radial</col>
- <col id="1">0</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="transparencytabpage|liststoreTYPE">Ellipsoid</col>
- <col id="1">0</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="transparencytabpage|liststoreTYPE">Quadratic</col>
- <col id="1">0</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="transparencytabpage|liststoreTYPE">Square</col>
- <col id="1">0</col>
- </row>
- </data>
- </object>
<object class="GtkFrame" id="TransparencyTabPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -264,10 +230,17 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="LB_TRGR_GRADIENT_TYPES">
+ <object class="GtkComboBoxText" id="LB_TRGR_GRADIENT_TYPES">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="model">liststoreTYPE</property>
+ <items>
+ <item translatable="yes" context="transparencytabpage|liststoreTYPE">Linear</item>
+ <item translatable="yes" context="transparencytabpage|liststoreTYPE">Axial</item>
+ <item translatable="yes" context="transparencytabpage|liststoreTYPE">Radial</item>
+ <item translatable="yes" context="transparencytabpage|liststoreTYPE">Ellipsoid</item>
+ <item translatable="yes" context="transparencytabpage|liststoreTYPE">Quadratic</item>
+ <item translatable="yes" context="transparencytabpage|liststoreTYPE">Square</item>
+ </items>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index d0c28f1c30f9..8102ff3ba0b6 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -45,15 +45,24 @@ struct TabPageParent
TabPageParent(vcl::Window* _pParent)
: pParent(_pParent)
, pPage(nullptr)
+ , pController(nullptr)
{
}
- TabPageParent(weld::Container* _pPage)
+ TabPageParent(weld::Container* _pPage, weld::DialogController* _pController)
: pParent(nullptr)
, pPage(_pPage)
+ , pController(_pController)
{
}
+ weld::Window* GetFrameWeld() const
+ {
+ if (pController)
+ return pController->getDialog();
+ return pParent->GetFrameWeld();
+ }
VclPtr<vcl::Window> pParent;
weld::Container* pPage;
+ weld::DialogController* pController;
};
typedef VclPtr<SfxTabPage> (*CreateTabPage)(TabPageParent pParent, const SfxItemSet *rAttrSet);
@@ -256,7 +265,7 @@ private:
protected:
virtual short Ok();
- void RefreshInputSet();
+ virtual void RefreshInputSet();
virtual void PageCreated(const OString &rName, SfxTabPage &rPage);
std::unique_ptr<SfxItemSet> m_xExampleSet;
@@ -308,6 +317,11 @@ public:
const std::function<void(sal_Int32)>&);
const SfxItemSet* GetExampleSet() const { return m_xExampleSet.get(); }
+
+ void SetApplyHandler(const Link<weld::Button&,void>& _rHdl);
+
+ //calls Ok without closing dialog
+ bool Apply();
};
namespace sfx { class ItemConnectionBase; }
@@ -352,15 +366,12 @@ protected:
}
SfxTabDialog* GetTabDialog() const;
+ SfxTabDialogController* GetDialogController() const;
public:
void SetTabDialog(SfxTabDialog* pDialog);
-protected:
-
- SfxTabDialogController* GetDialogController() const;
void SetDialogController(SfxTabDialogController* pDialog);
-
+protected:
void AddItemConnection( sfx::ItemConnectionBase* pConnection );
-
public:
virtual ~SfxTabPage() override;
virtual void dispose() override;
@@ -397,6 +408,9 @@ public:
OString GetConfigId() const;
+ //TODO rename to GetFrameWeld when SfxTabPage doesn't inherit from anything
+ weld::Window* GetDialogFrameWeld() const;
+
//TODO rename to get_preferred_size when SfxTabPage doesn't inherit from anything
Size get_container_size() const
{
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 37f051a8167b..b1c27bdd4321 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -245,7 +245,7 @@ public:
virtual SfxPrinter* GetPrinter( bool bCreate = false );
virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL );
virtual bool HasPrintOptionsPage() const;
- virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(weld::Container* pPage, const SfxItemSet &rOptions);
+ virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions);
Printer* GetActivePrinter() const;
// Working set
diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
index c5a92c5e01d3..e7c0e56269e2 100644
--- a/include/svx/hdft.hxx
+++ b/include/svx/hdft.hxx
@@ -34,7 +34,7 @@
namespace svx
{
- SVX_DLLPUBLIC bool ShowBorderBackgroundDlg( vcl::Window* pParent, SfxItemSet* pBBSet );
+ SVX_DLLPUBLIC bool ShowBorderBackgroundDlg(weld::Window* pParent, SfxItemSet* pBBSet);
}
class SVX_DLLPUBLIC SvxHFPage : public SfxTabPage
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index d1bd463d953c..92457870721b 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -380,7 +380,7 @@ public:
sal_uInt16 nLonger ) = 0;
// add for SvxBorderBackgroundDlg
virtual VclPtr<SfxAbstractTabDialog> CreateSvxBorderBackgroundDlg(
- vcl::Window* pParent,
+ weld::Window* pParent,
const SfxItemSet& rCoreSet,
bool bEnableDrawingLayerFillStyles) = 0;
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 1f7a71c249be..0663f6eaea12 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -755,7 +755,7 @@ DeactivateRC ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP )
if ( !bPosInputOk )
{
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetDialogController()->getDialog(),
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetDialogFrameWeld(),
VclMessageType::Warning, VclButtonsType::Ok,
ScResId(STR_INVALID_TABREF)));
xBox->run();
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index da22608854fd..7f7f6b71b9a4 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -104,7 +104,7 @@ public:
virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
virtual bool HasPrintOptionsPage() const override;
- virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(weld::Container* pPage, const SfxItemSet &rOptions) override;
+ virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions) override;
void AddAccessibilityObject( SfxListener& rObject );
void RemoveAccessibilityObject( SfxListener& rObject );
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index ebdbab699253..cf5b8723df9a 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -319,7 +319,7 @@ public:
SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
virtual bool HasPrintOptionsPage() const override;
- virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(weld::Container* pPage, const SfxItemSet &rOptions) override;
+ virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions) override;
void ConnectObject( const SdrOle2Obj* pObj );
void ActivateObject( SdrOle2Obj* pObj, long nVerb );
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 3417cee7b66d..42d6700d0ab5 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -514,12 +514,12 @@ bool ScPreviewShell::HasPrintOptionsPage() const
return true;
}
-VclPtr<SfxTabPage> ScPreviewShell::CreatePrintOptionsPage(weld::Container* pPage, const SfxItemSet &rOptions)
+VclPtr<SfxTabPage> ScPreviewShell::CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions)
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc(RID_SC_TP_PRINT);
if ( ScTpPrintOptionsCreate )
- return ScTpPrintOptionsCreate(pPage, &rOptions);
+ return ScTpPrintOptionsCreate(pParent, &rOptions);
return VclPtr<SfxTabPage>();
}
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index c128f81c27f1..ad67410443d0 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1048,12 +1048,12 @@ bool ScTabViewShell::HasPrintOptionsPage() const
return true;
}
-VclPtr<SfxTabPage> ScTabViewShell::CreatePrintOptionsPage(weld::Container* pPage, const SfxItemSet &rOptions )
+VclPtr<SfxTabPage> ScTabViewShell::CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc(RID_SC_TP_PRINT);
if ( ScTpPrintOptionsCreate )
- return ScTpPrintOptionsCreate(pPage, &rOptions);
+ return ScTpPrintOptionsCreate(pParent, &rOptions);
return VclPtr<SfxTabPage>();
}
diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx
index a585361a3296..1a1fac096ac2 100644
--- a/sfx2/source/control/charwin.cxx
+++ b/sfx2/source/control/charwin.cxx
@@ -38,6 +38,7 @@ SvxCharView::SvxCharView(const VclPtr<VirtualDevice>& rVirDev)
void SvxCharView::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
vcl::Font aFont = rStyleSettings.GetLabelFont();
const Size aFontSize = aFont.GetFontSize();
@@ -47,7 +48,6 @@ void SvxCharView::SetDrawingArea(weld::DrawingArea* pDrawingArea)
pDrawingArea->set_size_request(mxVirDev->approximate_digit_width() * 2,
mxVirDev->GetTextHeight());
mxVirDev->Pop();
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void SvxCharView::GetFocus()
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 663a26295453..86cbaef7b9f5 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -47,7 +47,7 @@
*/
SfxManageStyleSheetPage::SfxManageStyleSheetPage(TabPageParent pParent, const SfxItemSet& rAttrSet)
: SfxTabPage(pParent, "sfx/ui/managestylepage.ui", "ManageStylePage", &rAttrSet)
- , pStyle(&static_cast<SfxStyleDialog*>(GetParentDialog())->GetStyleSheet())
+ , pStyle(pParent.pPage ? &static_cast<SfxStyleDialogController*>(pParent.pController)->GetStyleSheet() : &static_cast<SfxStyleDialog*>(GetParentDialog())->GetStyleSheet())
, pItem(nullptr)
, bModified(false)
, aName(pStyle->GetName())
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 57c3f291084e..7f763e306532 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -196,13 +196,19 @@ SfxTabPage::SfxTabPage(TabPageParent pParent, const OUString& rUIXMLDescription,
SfxTabPage::~SfxTabPage()
{
+ if (m_xContainer)
+ {
+ std::unique_ptr<weld::Container> xParent(m_xContainer->weld_parent());
+ if (xParent)
+ xParent->move(m_xContainer.get(), nullptr);
+ }
+ m_xContainer.reset();
disposeOnce();
}
void SfxTabPage::dispose()
{
pImpl.reset();
- m_xContainer.reset();
m_xBuilder.reset();
TabPage::dispose();
}
@@ -356,6 +362,13 @@ OString SfxTabPage::GetConfigId() const
return sId;
}
+weld::Window* SfxTabPage::GetDialogFrameWeld() const
+{
+ if (pImpl->mpDialogController)
+ return pImpl->mpDialogController->getDialog();
+ return GetFrameWeld();
+}
+
SfxTabDialog::SfxTabDialog
/* [Description]
@@ -2003,7 +2016,8 @@ void SfxTabDialogController::CreatePages()
if (pDataObject->pTabPage)
continue;
weld::Container* pPage = m_xTabCtrl->get_page(pDataObject->sId);
- pDataObject->pTabPage = (pDataObject->fnCreatePage)(pPage, m_pSet.get());
+ // TODO eventually pass DialogController as distinct argument instead of bundling into TabPageParent
+ pDataObject->pTabPage = (pDataObject->fnCreatePage)(TabPageParent(pPage, this), m_pSet.get());
pDataObject->pTabPage->SetDialogController(this);
OUString sConfigId = OStringToOUString(pDataObject->pTabPage->GetConfigId(), RTL_TEXTENCODING_UTF8);
@@ -2189,4 +2203,29 @@ SfxTabPage* SfxTabDialogController::GetTabPage(const OString& rPageId) const
return nullptr;
}
+void SfxTabDialogController::SetApplyHandler(const Link<weld::Button&, void>& _rHdl)
+{
+ DBG_ASSERT( m_xApplyBtn, "SfxTabDialog::GetApplyHandler: no apply button enabled!" );
+ if (m_xApplyBtn)
+ m_xApplyBtn->connect_clicked(_rHdl);
+}
+
+bool SfxTabDialogController::Apply()
+{
+ bool bApplied = false;
+ if (PrepareLeaveCurrentPage())
+ {
+ bApplied = (Ok() == RET_OK);
+ //let the pages update their saved values
+ GetInputSetImpl()->Put(*GetOutputItemSet());
+ for (auto pDataObject : m_pImpl->aData)
+ {
+ if (!pDataObject->pTabPage)
+ continue;
+ pDataObject->pTabPage->ChangesApplied();
+ }
+ }
+ return bApplied;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index 7d04b54226aa..31139afaca0d 100644
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -200,7 +200,7 @@ SfxPrintOptionsDialog::SfxPrintOptionsDialog(weld::Window *pParent,
, m_xContainer(m_xDialog->weld_content_area())
{
// Insert TabPage
- pPage.reset(pViewShell->CreatePrintOptionsPage(m_xContainer.get(), *pOptions));
+ pPage.reset(pViewShell->CreatePrintOptionsPage(TabPageParent(m_xContainer.get(), this), *pOptions));
DBG_ASSERT( pPage, "CreatePrintOptions != SFX_VIEW_HAS_PRINTOPTIONS" );
if( pPage )
{
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 2d29c7b378e6..1bbc296bf371 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -893,7 +893,7 @@ sal_uInt16 SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, SfxPrinterChan
VclPtr<SfxTabPage> SfxViewShell::CreatePrintOptionsPage
(
- weld::Container* /*pPage*/,
+ TabPageParent /*pParent*/,
const SfxItemSet& /*rOptions*/
)
{
diff --git a/sfx2/uiconfig/ui/managestylepage.ui b/sfx2/uiconfig/ui/managestylepage.ui
index fd0c855a99d6..30dbb6ddf707 100644
--- a/sfx2/uiconfig/ui/managestylepage.ui
+++ b/sfx2/uiconfig/ui/managestylepage.ui
@@ -165,7 +165,7 @@
</packing>
</child>
<child>
- <object class="GtkScrolledWindow">
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 37dcbd5bd45a..847f65783ed4 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -284,9 +284,9 @@ public:
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 27,
pDrawingArea->get_text_height() * 9);
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void calccols(vcl::RenderContext& rRenderContext);
@@ -315,9 +315,9 @@ public:
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 27,
pDrawingArea->get_text_height() * 9);
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void SetText(const OUString& rText) { m_aText = rText; }
@@ -386,9 +386,9 @@ public:
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 7,
pDrawingArea->get_text_height() * 3);
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void SetSymbol(const SmSym *pSym);
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index f0d8af2424f5..7b6e741895bb 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -251,7 +251,7 @@ protected:
void InsertFrom(SfxMedium &rMedium);
virtual bool HasPrintOptionsPage() const override;
- virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(weld::Container* pPage,
+ virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent,
const SfxItemSet &rOptions) override;
virtual void Deactivate(bool IsMDIActivate) override;
virtual void Activate(bool IsMDIActivate) override;
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 3a4722da4b61..32cd5550d9e5 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -237,8 +237,8 @@ void SmModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
VclPtr<SfxTabPage> SmModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet )
{
VclPtr<SfxTabPage> pRet;
- if(nId == SID_SM_TP_PRINTOPTIONS)
- pRet = SmPrintOptionsTabPage::Create( TabPageParent(pParent.pParent), rSet );
+ if (nId == SID_SM_TP_PRINTOPTIONS)
+ pRet = SmPrintOptionsTabPage::Create(pParent, rSet);
return pRet;
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index f817343dd5e0..ddf3e23e49b4 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1261,10 +1261,10 @@ bool SmViewShell::HasPrintOptionsPage() const
return true;
}
-VclPtr<SfxTabPage> SmViewShell::CreatePrintOptionsPage(weld::Container* pPage,
+VclPtr<SfxTabPage> SmViewShell::CreatePrintOptionsPage(TabPageParent pParent,
const SfxItemSet &rOptions)
{
- return SmPrintOptionsTabPage::Create(pPage, rOptions);
+ return SmPrintOptionsTabPage::Create(pParent, rOptions);
}
SmEditWindow *SmViewShell::GetEditWindow()
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index d61762644e98..827dce66ee99 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -2322,9 +2322,9 @@ SvtValueSet::SvtValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow)
void SvtValueSet::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
// #106446#, #106601# force mirroring of virtual device
maVirDev->EnableRTL(pDrawingArea->get_direction());
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
Reference<XAccessible> SvtValueSet::CreateAccessible()
diff --git a/svtools/uiconfig/ui/linewindow.ui b/svtools/uiconfig/ui/linewindow.ui
index e438cf8b4a96..db8c559f5436 100644
--- a/svtools/uiconfig/ui/linewindow.ui
+++ b/svtools/uiconfig/ui/linewindow.ui
@@ -4,6 +4,7 @@
<requires lib="gtk+" version="3.20"/>
<object class="GtkPopover" id="line_popup_window">
<property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
<property name="border_width">4</property>
<child>
<object class="GtkBox" id="box1">
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 0e8f30204fcb..0d28ecf57e1c 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -81,9 +81,9 @@ SvxShowCharSet::SvxShowCharSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWi
void SvxShowCharSet::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
mxScrollArea->set_size_request(COLUMN_COUNT * pDrawingArea->get_approximate_digit_width() * 4,
ROW_COUNT * pDrawingArea->get_text_height() * 2);
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void SvxShowCharSet::init()
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx
index 81978611458f..ab0b12dcff86 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -547,11 +547,11 @@ void SvxDialControl::DialControl_Impl::SetSize( const Size& rWinSize )
void SvxDialControl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
//use same logic as DialControl_Impl::SetSize
int nDim = (std::min<int>(pDrawingArea->get_approximate_digit_width() * 12,
pDrawingArea->get_text_height() * 6) - 1) | 1;
pDrawingArea->set_size_request(nDim, nDim);
- CustomWidgetController::SetDrawingArea(pDrawingArea);
mpImpl.reset(new DialControl_Impl(pDrawingArea->get_ref_device()));
//set size and use that
Init(GetOutputSizePixel());
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 626debc835a8..43432664296e 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -634,9 +634,9 @@ RectCtl::RectCtl(SvxTabPage* pPage, RectPoint eRpt, sal_uInt16 nBorder)
void RectCtl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 25,
pDrawingArea->get_text_height() * 5);
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void RectCtl::SetControlSettings(RectPoint eRpt, sal_uInt16 nBorder)
@@ -1200,9 +1200,9 @@ void SvxPixelCtl::Resize()
void SvxPixelCtl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 25,
pDrawingArea->get_text_height() * 10);
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
SvxPixelCtl::~SvxPixelCtl()
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 2cdbfbfb0372..2f179ecb20b8 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -1469,11 +1469,10 @@ void FontPrevWindow::ApplySettings(vcl::RenderContext& rRenderContext)
void FontPrevWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
Size aPrefSize(getPreviewStripSize(pDrawingArea->get_ref_device()));
pDrawingArea->set_size_request(aPrefSize.Width(), aPrefSize.Height());
- CustomWidgetController::SetDrawingArea(pDrawingArea);
-
pImpl.reset(new FontPrevWin_Impl);
SfxViewShell* pSh = SfxViewShell::Current();
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index c8340e80726f..1742efa03597 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -820,9 +820,9 @@ FrameSelector::FrameSelector()
void FrameSelector::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
Size aPrefSize = pDrawingArea->get_ref_device().LogicToPixel(Size(61, 65), MapMode(MapUnit::MapAppFont));
pDrawingArea->set_size_request(aPrefSize.Width(), aPrefSize.Height());
- CustomWidgetController::SetDrawingArea(pDrawingArea);
mxImpl.reset( new FrameSelectorImpl( *this ) );
EnableRTL( false ); // #107808# don't mirror the mouse handling
}
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index b0e8661f1c03..9e03e1d51c9d 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -84,11 +84,11 @@ const sal_uInt16 SvxHFPage::pRanges[] =
namespace svx {
- bool ShowBorderBackgroundDlg( vcl::Window* pParent, SfxItemSet* pBBSet )
+ bool ShowBorderBackgroundDlg(weld::Window* pParent, SfxItemSet* pBBSet)
{
bool bRes = false;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxBorderBackgroundDlg( pParent, *pBBSet, false/*bEnableDrawingLayerFillStyles*/ ));
+ ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxBorderBackgroundDlg(pParent, *pBBSet, false /*bEnableDrawingLayerFillStyles*/));
if ( pDlg->Execute() == RET_OK && pDlg->GetOutputItemSet() )
{
SfxItemIter aIter( *pDlg->GetOutputItemSet() );
@@ -619,7 +619,7 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, weld::Button&, void)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxBorderBackgroundDlg(
- this,
+ GetDialogFrameWeld(),
*pBBSet,
mbEnableDrawingLayerFillStyles));
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index e8db9c9fad0e..324a7373daa7 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -395,13 +395,14 @@ void SvxPageWindow::ResetBackground()
void SvxPageWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
+
OutputDevice& rRefDevice = pDrawingArea->get_ref_device();
// Count in Twips by default
rRefDevice.Push(PushFlags::MAPMODE);
rRefDevice.SetMapMode(MapMode(MapUnit::MapTwip));
aWinSize = rRefDevice.LogicToPixel(Size(75, 46), MapMode(MapUnit::MapAppFont));
pDrawingArea->set_size_request(aWinSize.Width(), aWinSize.Height());
- CustomWidgetController::SetDrawingArea(pDrawingArea);
aWinSize.AdjustHeight( -4 );
aWinSize.AdjustWidth( -4 );
diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx
index 07d33436c9e0..081a362e0149 100644
--- a/svx/source/dialog/paraprev.cxx
+++ b/svx/source/dialog/paraprev.cxx
@@ -128,9 +128,9 @@ ParaPrevWindow::ParaPrevWindow() :
void ParaPrevWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
Size aOptimalSize(getParagraphPreviewOptimalSize(pDrawingArea->get_ref_device()));
pDrawingArea->set_size_request(aOptimalSize.Width(), aOptimalSize.Height());
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void ParaPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index da8fd7d40a83..5b6fd26ce804 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -729,9 +729,9 @@ SwFrameExample::SwFrameExample()
void SwFrameExample::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 16,
pDrawingArea->get_text_height() * 12);
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void SwFrameExample::InitColors_Impl()
diff --git a/svx/uiconfig/ui/colorwindow.ui b/svx/uiconfig/ui/colorwindow.ui
index d90a5777ffa6..04cebea74eff 100644
--- a/svx/uiconfig/ui/colorwindow.ui
+++ b/svx/uiconfig/ui/colorwindow.ui
@@ -22,6 +22,7 @@
</object>
<object class="GtkPopover" id="palette_popup_window">
<property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
<property name="border_width">4</property>
<child>
<object class="GtkBox" id="box1">
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index c2543d6e463b..2bddda1a67cd 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -631,7 +631,7 @@ public:
// methods for printing
SAL_DLLPRIVATE virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
SAL_DLLPRIVATE virtual bool HasPrintOptionsPage() const override;
- SAL_DLLPRIVATE virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(weld::Container* pParent,
+ SAL_DLLPRIVATE virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent,
const SfxItemSet& rSet) override;
static SvxSearchItem* GetSearchItem() { return m_pSrchItem; }
/// See SfxViewShell::getPart().
@@ -660,9 +660,9 @@ inline const SwDocShell *SwView::GetDocShell() const
return const_cast<SwView*>(this)->GetDocShell();
}
-VclPtr<SfxTabPage> CreatePrintOptionsPage( weld::Container* pPage,
- const SfxItemSet &rOptions,
- bool bPreview);
+VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent,
+ const SfxItemSet &rOptions,
+ bool bPreview);
extern bool bDocSzUpdated;
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index fafe26d3ca07..be094bddc51f 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -66,9 +66,9 @@ void SwDropCapsPict::SetText( const OUString& rT )
void SwDropCapsPict::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
Size aPrefSize(getParagraphPreviewOptimalSize(pDrawingArea->get_ref_device()));
pDrawingArea->set_size_request(aPrefSize.Width(), aPrefSize.Height());
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void SwDropCapsPict::Resize()
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 413f886a78b4..971fd2a057bb 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -240,6 +240,11 @@ void AbstractTabController_Impl::SetInputSet( const SfxItemSet* pInSet )
m_xDlg->SetInputSet( pInSet );
}
+bool AbstractTabController_Impl::StartExecuteAsync(AsyncContext &rCtx)
+{
+ return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
//From class Window.
void AbstractTabController_Impl::SetText( const OUString& rStr )
{
@@ -258,6 +263,18 @@ void AbstractApplyTabDialog_Impl::SetApplyHdl( const Link<LinkParamNone*,void>&
pDlg->SetApplyHandler(LINK(this, AbstractApplyTabDialog_Impl, ApplyHdl));
}
+IMPL_LINK_NOARG(AbstractApplyTabController_Impl, ApplyHdl, weld::Button&, void)
+{
+ if (m_xDlg->Apply())
+ m_aHandler.Call(nullptr);
+}
+
+void AbstractApplyTabController_Impl::SetApplyHdl( const Link<LinkParamNone*,void>& rLink )
+{
+ m_aHandler = rLink;
+ m_xDlg->SetApplyHandler(LINK(this, AbstractApplyTabController_Impl, ApplyHdl));
+}
+
sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetLevel() const
{
return pDlg->GetLevel();
@@ -930,6 +947,10 @@ VclPtr<SfxAbstractApplyTabDialog> SwAbstractDialogFactory_Impl::CreateTemplateDi
SwWrtShell* pActShell,
bool bNew )
{
+ if (nRegion == SfxStyleFamily::Page)
+ {
+ return VclPtr<AbstractApplyTabController_Impl>::Create(o3tl::make_unique<SwTemplateDlgController>(pParent ? pParent->GetFrameWeld() : nullptr, rBase, nRegion, sPage, pActShell, bNew));
+ }
VclPtr<SfxTabDialog> pDlg = VclPtr<SwTemplateDlg>::Create(pParent, rBase, nRegion, sPage, pActShell, bNew);
return VclPtr<AbstractApplyTabDialog_Impl>::Create(pDlg);
}
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index c7315197ecb5..ef655833b3fc 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -227,13 +227,14 @@ class AbstractTabDialog_Impl : virtual public SfxAbstractTabDialog
class AbstractTabController_Impl : virtual public SfxAbstractTabDialog
{
protected:
- std::unique_ptr<SfxTabDialogController> m_xDlg;
+ std::shared_ptr<SfxTabDialogController> m_xDlg;
public:
explicit AbstractTabController_Impl(std::unique_ptr<SfxTabDialogController> p)
: m_xDlg(std::move(p))
{
}
virtual short Execute() override;
+ virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
virtual void SetCurPageId( const OString &rName ) override;
virtual const SfxItemSet* GetOutputItemSet() const override;
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override;
@@ -255,6 +256,19 @@ private:
virtual void SetApplyHdl( const Link<LinkParamNone*,void>& rLink ) override;
};
+class AbstractApplyTabController_Impl : public AbstractTabController_Impl, virtual public SfxAbstractApplyTabDialog
+{
+public:
+ explicit AbstractApplyTabController_Impl(std::unique_ptr<SfxTabDialogController> p)
+ : AbstractTabController_Impl(std::move(p))
+ {
+ }
+ DECL_LINK(ApplyHdl, weld::Button&, void);
+private:
+ Link<LinkParamNone*,void> m_aHandler;
+ virtual void SetApplyHdl( const Link<LinkParamNone*,void>& rLink ) override;
+};
+
class AbstractSwConvertTableDlg_Impl : public AbstractSwConvertTableDlg
{
protected:
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 730351caeca3..16118d2ab258 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -51,9 +51,9 @@ SwEnvPreview::SwEnvPreview()
void SwEnvPreview::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ CustomWidgetController::SetDrawingArea(pDrawingArea);
pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 20,
pDrawingArea->get_text_height() * 8);
- CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void SwEnvPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index 9807e760e455..74860a832ff4 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -118,7 +118,7 @@ IMPL_LINK(SwEnvPrtPage, ButtonHdl, weld::Button&, rBtn, void)
// Call printer setup
if (m_xPrt)
{
- PrinterSetupDialog aDlg(GetDialogController()->getDialog());
+ PrinterSetupDialog aDlg(GetDialogFrameWeld());
aDlg.SetPrinter(m_xPrt);
aDlg.execute();
rBtn.grab_focus();
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index eb7d9621b0c0..09f6792ccc0c 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -122,6 +122,8 @@ SwLabPreview::SwLabPreview()
void SwLabPreview::SetDrawingArea(weld::DrawingArea* pWidget)
{
+ CustomWidgetController::SetDrawingArea(pWidget);
+
pWidget->set_size_request(pWidget->get_approximate_digit_width() * 54,
pWidget->get_text_height() * 15);
@@ -133,8 +135,6 @@ void SwLabPreview::SetDrawingArea(weld::DrawingArea* pWidget)
m_lColsWidth = pWidget->get_pixel_size(m_aColsStr).Width();
m_lXWidth = pWidget->get_pixel_size(OUString('X')).Width();
m_lXHeight = pWidget->get_text_height();
-
- CustomWidgetController::SetDrawingArea(pWidget);
}
void SwLabPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 9cdba0b23534..9e7f661872f1 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -107,7 +107,7 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
{
nHtmlMode = ::GetHtmlMode(pWrtShell->GetView().GetDocShell());
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- // tinker TabPages together
+ // stitch TabPages together
switch( nRegion )
{
// character styles
@@ -253,11 +253,6 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
// page styles
case SfxStyleFamily::Page:
{
- // remove?
- //OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
- //OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!");
- //m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) );
-
// add Area and Transparence TabPages
m_nAreaId = AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
m_nTransparenceId = AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
@@ -595,4 +590,200 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
}
}
+// the dialog's carrier
+SwTemplateDlgController::SwTemplateDlgController(weld::Window* pParent,
+ SfxStyleSheetBase& rBase,
+ SfxStyleFamily nRegion,
+ const OString& sPage,
+ SwWrtShell* pActShell,
+ bool /*bNew*/)
+ : SfxStyleDialogController(pParent,
+ "modules/swriter/ui/templatedialog" +
+ OUString::number(static_cast<sal_uInt16>(nRegion)) + ".ui",
+ "TemplateDialog" + OString::number(static_cast<sal_uInt16>(nRegion)),
+ rBase)
+ , nType(nRegion)
+ , pWrtShell(pActShell)
+{
+ nHtmlMode = ::GetHtmlMode(pWrtShell->GetView().GetDocShell());
+ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
+ // stitch TabPages together
+ switch( nRegion )
+ {
+ // page styles
+ case SfxStyleFamily::Page:
+ {
+ // add Area and Transparence TabPages
+ AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
+ AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
+ AddTabPage("header", SvxHeaderPage::Create, SvxHeaderPage::GetRanges);
+ AddTabPage("footer", SvxFooterPage::Create, SvxFooterPage::GetRanges);
+ AddTabPage("page", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PAGE), pFact->GetTabPageRangesFunc(RID_SVXPAGE_PAGE));
+ if (0 == ::GetHtmlMode(pWrtShell->GetView().GetDocShell()))
+ {
+ AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
+ AddTabPage("columns", SwColumnPage::Create, SwColumnPage::GetRanges );
+ AddTabPage("footnotes", SwFootNotePage::Create, SwFootNotePage::GetRanges );
+ AddTabPage("textgrid", SwTextGridPage::Create, SwTextGridPage::GetRanges );
+ SvtCJKOptions aCJKOptions;
+ if(!aCJKOptions.IsAsianTypographyEnabled())
+ RemoveTabPage("textgrid");
+ }
+ else
+ {
+ RemoveTabPage("borders");
+ RemoveTabPage("columns");
+ RemoveTabPage("footnotes");
+ RemoveTabPage("textgrid");
+ }
+ }
+ break;
+ default:
+ OSL_ENSURE(false, "wrong family");
+ }
+
+ if (!sPage.isEmpty())
+ SetCurPageId(sPage);
+}
+
+short SwTemplateDlgController::Ok()
+{
+ short nRet = SfxTabDialogController::Ok();
+ if( RET_OK == nRet )
+ {
+ const SfxPoolItem *pOutItem, *pExItem;
+ if( SfxItemState::SET == m_xExampleSet->GetItemState(
+ SID_ATTR_NUMBERING_RULE, false, &pExItem ) &&
+ ( !GetOutputItemSet() ||
+ SfxItemState::SET != GetOutputItemSet()->GetItemState(
+ SID_ATTR_NUMBERING_RULE, false, &pOutItem ) ||
+ *pExItem != *pOutItem ))
+ {
+ if( GetOutputItemSet() )
+ const_cast<SfxItemSet*>(GetOutputItemSet())->Put( *pExItem );
+ else
+ nRet = RET_CANCEL;
+ }
+ }
+ else
+ {
+ //JP 09.01.98 Bug #46446#:
+ // that's the Ok-Handler, so OK has to be default!
+ nRet = RET_OK;
+ }
+ return nRet;
+}
+
+void SwTemplateDlgController::RefreshInputSet()
+{
+ SfxItemSet* pInSet = GetInputSetImpl();
+ pInSet->ClearItem();
+ pInSet->SetParent( &GetStyleSheet().GetItemSet() );
+}
+
+void SwTemplateDlgController::PageCreated(const OString& rId, SfxTabPage &rPage )
+{
+ // set style's and metric's names
+ OUString sNumCharFormat, sBulletCharFormat;
+ SwStyleNameMapper::FillUIName( RES_POOLCHR_NUM_LEVEL, sNumCharFormat);
+ SwStyleNameMapper::FillUIName( RES_POOLCHR_BUL_LEVEL, sBulletCharFormat);
+ SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
+
+ if (rId == "columns")
+ {
+ if( nType == SfxStyleFamily::Frame )
+ static_cast<SwColumnPage&>(rPage).SetFrameMode(true);
+ static_cast<SwColumnPage&>(rPage).SetFormatUsed( true );
+ }
+ // do not remove; many other style dialog combinations still use the SfxTabPage
+ // for the SvxBrushItem (see RID_SVXPAGE_BACKGROUND)
+ else if (rId == "background")
+ {
+ SvxBackgroundTabFlags nFlagType = SvxBackgroundTabFlags::NONE;
+ if( SfxStyleFamily::Char == nType || SfxStyleFamily::Para == nType )
+ nFlagType |= SvxBackgroundTabFlags::SHOW_HIGHLIGHTING;
+ aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(nFlagType)));
+ rPage.PageCreated(aSet);
+ }
+ else if (rId == "page")
+ {
+ if(0 == (nHtmlMode & HTMLMODE_ON ))
+ {
+ std::vector<OUString> aList;
+ OUString aNew;
+ SwStyleNameMapper::FillUIName( RES_POOLCOLL_TEXT, aNew );
+ aList.push_back( aNew );
+ if( pWrtShell )
+ {
+ SfxStyleSheetBasePool* pStyleSheetPool = pWrtShell->
+ GetView().GetDocShell()->GetStyleSheetPool();
+ pStyleSheetPool->SetSearchMask(SfxStyleFamily::Para);
+ SfxStyleSheetBase *pFirstStyle = pStyleSheetPool->First();
+ while(pFirstStyle)
+ {
+ aList.push_back( pFirstStyle->GetName() );
+ pFirstStyle = pStyleSheetPool->Next();
+ }
+ }
+ // set DrawingLayer FillStyles active
+ aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
+ aSet.Put(SfxStringListItem(SID_COLLECT_LIST, &aList));
+ rPage.PageCreated(aSet);
+ }
+ }
+ else if (rId == "header")
+ {
+ if(0 == (nHtmlMode & HTMLMODE_ON ))
+ {
+ static_cast<SvxHeaderPage&>(rPage).EnableDynamicSpacing();
+ }
+
+ // set DrawingLayer FillStyles active
+ aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
+ rPage.PageCreated(aSet);
+ }
+ else if (rId == "footer")
+ {
+ if(0 == (nHtmlMode & HTMLMODE_ON ))
+ {
+ static_cast<SvxFooterPage&>(rPage).EnableDynamicSpacing();
+ }
+
+ // set DrawingLayer FillStyles active
+ aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
+ rPage.PageCreated(aSet);
+ }
+ else if (rId == "border")
+ {
+ if( SfxStyleFamily::Para == nType )
+ {
+ aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::PARA)));
+ }
+ else if( SfxStyleFamily::Frame == nType )
+ {
+ aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::FRAME)));
+ }
+ rPage.PageCreated(aSet);
+ }
+ // inits for Area and Transparency TabPages
+ // The selection attribute lists (XPropertyList derivates, e.g. XColorList for
+ // the color table) need to be added as items (e.g. SvxColorTableItem) to make
+ // these pages find the needed attributes for fill style suggestions.
+ // These are added in SwDocStyleSheet::GetItemSet() for the SfxStyleFamily::Para on
+ // demand, but could also be directly added from the DrawModel.
+ else if (rId == "area")
+ {
+ aSet.Put(GetStyleSheet().GetItemSet());
+
+ // add flag for direct graphic content selection
+ aSet.Put(SfxBoolItem(SID_OFFER_IMPORT, true));
+
+ rPage.PageCreated(aSet);
+ }
+ else if (rId == "transparence")
+ {
+ rPage.PageCreated(GetStyleSheet().GetItemSet());
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 205510a2d8d0..5ad0abb3ae6c 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -164,7 +164,7 @@ SwColumnDlg::SwColumnDlg(weld::Window* pParent, SwWrtShell& rSh)
assert(pColPgSet);
// create TabPage
- m_pTabPage = static_cast<SwColumnPage*>(SwColumnPage::Create(m_xContentArea.get(), pColPgSet).get());
+ m_pTabPage = static_cast<SwColumnPage*>(SwColumnPage::Create(TabPageParent(m_xContentArea.get(), this), pColPgSet).get());
m_pTabPage->GetApplyLabel()->show();
weld::ComboBoxText* pApplyToLB = m_pTabPage->GetApplyComboBox();
pApplyToLB->show();
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index d12fc4de6ffb..98dd7a271e87 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -70,7 +70,7 @@ SwTextGridPage::SwTextGridPage(TabPageParent pParent, const SfxItemSet &rSet)
, m_xDisplayFL(m_xBuilder->weld_widget("frameFL_DISPLAY"))
, m_xDisplayCB(m_xBuilder->weld_check_button("checkCB_DISPLAY"))
, m_xPrintCB(m_xBuilder->weld_check_button("checkCB_PRINT"))
- , m_xColorLB(new ColorListBox(m_xBuilder->weld_menu_button("listLB_COLOR"), GetFrameWeld(), true))
+ , m_xColorLB(new ColorListBox(m_xBuilder->weld_menu_button("listLB_COLOR"), GetFrameWeld()))
{
Link<weld::SpinButton&,void> aLink = LINK(this, SwTextGridPage, CharorLineChangedHdl);
m_xCharsPerLineNF->connect_value_changed(aLink);
@@ -487,7 +487,7 @@ void SwTextGridPage::GridModifyHdl()
{
const SfxItemSet& rOldSet = GetItemSet();
SfxItemSet aSet(rOldSet);
- const SfxItemSet* pExSet = GetTabDialog()->GetExampleSet();
+ const SfxItemSet* pExSet = GetDialogController()->GetExampleSet();
if(pExSet)
aSet.Put(*pExSet);
PutGridItem(aSet);
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index e1c157ee3afe..84927a6a8d13 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -438,7 +438,7 @@ void SwHeaderFooterWin::ExecuteCommand(const OString& rIdent)
aBoxInfo.SetValid( SvxBoxInfoItemValidFlags::DISABLE );
aSet.Put( aBoxInfo );
- if ( svx::ShowBorderBackgroundDlg( this, &aSet ) )
+ if (svx::ShowBorderBackgroundDlg(GetFrameWeld(), &aSet))
{
const SfxPoolItem* pItem;
if ( SfxItemState::SET == aSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) {
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 4b10642a0ed5..5a31e58e4ad1 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -479,10 +479,10 @@ void SwColumnOnlyExample::SetColumns(const SwFormatCol& rCol)
void SwColumnOnlyExample::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
+ weld::CustomWidgetController::SetDrawingArea(pDrawingArea);
OutputDevice& rRefDevice = pDrawingArea->get_ref_device();
Size aPrefSize(rRefDevice.LogicToPixel(Size(75, 46), MapMode(MapUnit::MapAppFont)));
pDrawingArea->set_size_request(aPrefSize.Width(), aPrefSize.Height());
- weld::CustomWidgetController::SetDrawingArea(pDrawingArea);
}
void SwColumnOnlyExample::Resize()
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index 059aecd1c060..5d046f60933e 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -201,7 +201,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
SAL_DLLPRIVATE virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
SAL_DLLPRIVATE virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
SAL_DLLPRIVATE virtual bool HasPrintOptionsPage() const override;
- SAL_DLLPRIVATE virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(weld::Container* pParent, const SfxItemSet &rOptions) override;
+ SAL_DLLPRIVATE virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions) override;
SAL_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill );
diff --git a/sw/source/uibase/inc/tmpdlg.hxx b/sw/source/uibase/inc/tmpdlg.hxx
index 803e1820a007..b9a2c7253782 100644
--- a/sw/source/uibase/inc/tmpdlg.hxx
+++ b/sw/source/uibase/inc/tmpdlg.hxx
@@ -74,6 +74,30 @@ public:
virtual short Ok() override;
};
+// the tab dialog carrier of TabPages
+class SwTemplateDlgController : public SfxStyleDialogController
+{
+
+ SfxStyleFamily nType;
+ sal_uInt16 nHtmlMode;
+ SwWrtShell* pWrtShell;
+
+public:
+ /// @param sPage
+ /// Identifies name of page to open at by default
+ SwTemplateDlgController(weld::Window* pParent,
+ SfxStyleSheetBase& rBase,
+ SfxStyleFamily nRegion,
+ const OString& sPage,
+ SwWrtShell* pActShell,
+ bool bNew);
+
+ virtual void RefreshInputSet() override;
+
+ virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+ virtual short Ok() override;
+};
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 3f4e568aa60c..f9da9a579afb 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1702,10 +1702,10 @@ bool SwPagePreview::HasPrintOptionsPage() const
return true;
}
-VclPtr<SfxTabPage> SwPagePreview::CreatePrintOptionsPage( weld::Container* pPage,
- const SfxItemSet &rOptions )
+VclPtr<SfxTabPage> SwPagePreview::CreatePrintOptionsPage(TabPageParent pParent,
+ const SfxItemSet &rOptions)
{
- return ::CreatePrintOptionsPage(pPage, rOptions, !m_bNormalPrint);
+ return ::CreatePrintOptionsPage(pParent, rOptions, !m_bNormalPrint);
}
void SwPagePreviewWin::SetViewShell( SwViewShell* pShell )
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index f3138353331c..f824291a7518 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -170,10 +170,10 @@ namespace
// TabPage for application-specific print options
-VclPtr<SfxTabPage> SwView::CreatePrintOptionsPage(weld::Container* pPage,
+VclPtr<SfxTabPage> SwView::CreatePrintOptionsPage(TabPageParent pParent,
const SfxItemSet& rSet)
{
- return ::CreatePrintOptionsPage(pPage, rSet, false);
+ return ::CreatePrintOptionsPage(pParent, rSet, false);
}
// Print dispatcher
@@ -303,9 +303,9 @@ void SwView::NotifyCursor(SfxViewShell* pViewShell) const
// Create page printer/additions for SwView and SwPagePreview
-VclPtr<SfxTabPage> CreatePrintOptionsPage( weld::Container* pPage,
- const SfxItemSet &rOptions,
- bool bPreview )
+VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent,
+ const SfxItemSet &rOptions,
+ bool bPreview)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -314,7 +314,7 @@ VclPtr<SfxTabPage> CreatePrintOptionsPage( weld::Container* pPage,
if (!fnCreatePage)
return nullptr;
- VclPtr<SfxTabPage> pSfxPage = fnCreatePage(pPage, &rOptions);
+ VclPtr<SfxTabPage> pSfxPage = fnCreatePage(pParent, &rOptions);
OSL_ENSURE(pSfxPage, "No page");
if (!pSfxPage)
return nullptr;
diff --git a/sw/uiconfig/swriter/ui/columnpage.ui b/sw/uiconfig/swriter/ui/columnpage.ui
index b44a54bdfc8a..f2ba8e98ca6f 100644
--- a/sw/uiconfig/swriter/ui/columnpage.ui
+++ b/sw/uiconfig/swriter/ui/columnpage.ui
@@ -66,6 +66,7 @@
<object class="GtkGrid" id="ColumnPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="valign">start</property>
<property name="hexpand">True</property>
<property name="border_width">6</property>
<property name="row_spacing">12</property>
@@ -555,7 +556,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkFrame" id="frame2">
diff --git a/sw/uiconfig/swriter/ui/templatedialog1.ui b/sw/uiconfig/swriter/ui/templatedialog1.ui
index 652c3e1ccc2a..b00290b5bac6 100644
--- a/sw/uiconfig/swriter/ui/templatedialog1.ui
+++ b/sw/uiconfig/swriter/ui/templatedialog1.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.4 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="TemplateDialog1">
@@ -8,6 +8,9 @@
<property name="title" translatable="yes" context="templatedialog1|TemplateDialog1">Character Style</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
@@ -18,8 +21,8 @@
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="help">
- <property name="label">gtk-help</property>
+ <object class="GtkButton" id="reset">
+ <property name="label">gtk-revert-to-saved</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -29,14 +32,15 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
- <property name="secondary">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="reset">
- <property name="label">gtk-revert-to-saved</property>
+ <object class="GtkButton" id="apply">
+ <property name="label">gtk-apply</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
@@ -78,24 +82,22 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="apply">
- <property name="label">gtk-apply</property>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</property>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -104,7 +106,8 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">6</property>
+ <property name="position">5</property>
+ <property name="secondary">True</property>
</packing>
</child>
</object>
@@ -456,15 +459,9 @@
</object>
</child>
<action-widgets>
- <action-widget response="-11">help</action-widget>
- <action-widget response="0">reset</action-widget>
- <action-widget response="0">standard</action-widget>
<action-widget response="-5">ok</action-widget>
- <action-widget response="0">apply</action-widget>
<action-widget response="-6">cancel</action-widget>
+ <action-widget response="-11">help</action-widget>
</action-widgets>
- <child>
- <placeholder/>
- </child>
</object>
</interface>
diff --git a/sw/uiconfig/swriter/ui/templatedialog16.ui b/sw/uiconfig/swriter/ui/templatedialog16.ui
index b6d68421f324..815970c71fe1 100644
--- a/sw/uiconfig/swriter/ui/templatedialog16.ui
+++ b/sw/uiconfig/swriter/ui/templatedialog16.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.4 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="TemplateDialog16">
@@ -8,6 +8,9 @@
<property name="title" translatable="yes" context="templatedialog16|TemplateDialog16">Numbering Style</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
@@ -48,8 +51,8 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="ok">
- <property name="label">gtk-ok</property>
+ <object class="GtkButton" id="apply">
+ <property name="label">gtk-apply</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@@ -64,8 +67,23 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="apply">
- <property name="label">gtk-apply</property>
+ <object class="GtkButton" id="standard">
+ <property name="label">Standard</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@@ -443,13 +461,8 @@
</child>
<action-widgets>
<action-widget response="-11">help</action-widget>
- <action-widget response="0">reset</action-widget>
<action-widget response="-5">ok</action-widget>
- <action-widget response="0">apply</action-widget>
<action-widget response="-6">cancel</action-widget>
</action-widgets>
- <child>
- <placeholder/>
- </child>
</object>
</interface>
diff --git a/sw/uiconfig/swriter/ui/templatedialog2.ui b/sw/uiconfig/swriter/ui/templatedialog2.ui
index 500f092a2407..7b4527418ede 100644
--- a/sw/uiconfig/swriter/ui/templatedialog2.ui
+++ b/sw/uiconfig/swriter/ui/templatedialog2.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.4 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="TemplateDialog2">
@@ -8,6 +8,9 @@
<property name="title" translatable="yes" context="templatedialog2|TemplateDialog2">Paragraph Style</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
@@ -18,8 +21,8 @@
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="help">
- <property name="label">gtk-help</property>
+ <object class="GtkButton" id="reset">
+ <property name="label">gtk-revert-to-saved</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -29,14 +32,15 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
- <property name="secondary">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="reset">
- <property name="label">gtk-revert-to-saved</property>
+ <object class="GtkButton" id="apply">
+ <property name="label">gtk-apply</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
@@ -78,24 +82,22 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="apply">
- <property name="label">gtk-apply</property>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</property>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -104,7 +106,8 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">6</property>
+ <property name="position">5</property>
+ <property name="secondary">True</property>
</packing>
</child>
</object>
@@ -926,15 +929,9 @@
</object>
</child>
<action-widgets>
- <action-widget response="-11">help</action-widget>
- <action-widget response="0">reset</action-widget>
- <action-widget response="0">standard</action-widget>
<action-widget response="-5">ok</action-widget>
- <action-widget response="0">apply</action-widget>
<action-widget response="-6">cancel</action-widget>
+ <action-widget response="-11">help</action-widget>
</action-widgets>
- <child>
- <placeholder/>
- </child>
</object>
</interface>
diff --git a/sw/uiconfig/swriter/ui/templatedialog4.ui b/sw/uiconfig/swriter/ui/templatedialog4.ui
index 6a74407d2b2c..3f26a7034d6c 100644
--- a/sw/uiconfig/swriter/ui/templatedialog4.ui
+++ b/sw/uiconfig/swriter/ui/templatedialog4.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.4 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="TemplateDialog4">
@@ -8,6 +8,9 @@
<property name="title" translatable="yes" context="templatedialog4|TemplateDialog4">Frame Style</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
@@ -18,8 +21,8 @@
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="help">
- <property name="label">gtk-help</property>
+ <object class="GtkButton" id="reset">
+ <property name="label">gtk-revert-to-saved</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -29,14 +32,15 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
- <property name="secondary">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="reset">
- <property name="label">gtk-revert-to-saved</property>
+ <object class="GtkButton" id="apply">
+ <property name="label">gtk-apply</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
@@ -78,24 +82,22 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="apply">
- <property name="label">gtk-apply</property>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</property>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -104,7 +106,8 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">6</property>
+ <property name="position">5</property>
+ <property name="secondary">True</property>
</packing>
</child>
</object>
@@ -550,15 +553,9 @@
</object>
</child>
<action-widgets>
- <action-widget response="-11">help</action-widget>
- <action-widget response="0">reset</action-widget>
- <action-widget response="0">standard</action-widget>
<action-widget response="-5">ok</action-widget>
- <action-widget response="0">apply</action-widget>
<action-widget response="-6">cancel</action-widget>
+ <action-widget response="-11">help</action-widget>
</action-widgets>
- <child>
- <placeholder/>
- </child>
</object>
</interface>
diff --git a/sw/uiconfig/swriter/ui/templatedialog8.ui b/sw/uiconfig/swriter/ui/templatedialog8.ui
index cc63cdc72407..0e8a16c7f99d 100644
--- a/sw/uiconfig/swriter/ui/templatedialog8.ui
+++ b/sw/uiconfig/swriter/ui/templatedialog8.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.4 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="TemplateDialog8">
@@ -8,6 +8,9 @@
<property name="title" translatable="yes" context="templatedialog8|TemplateDialog8">Page Style</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
@@ -48,8 +51,8 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="ok">
- <property name="label">gtk-ok</property>
+ <object class="GtkButton" id="apply">
+ <property name="label">gtk-apply</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@@ -64,8 +67,23 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="apply">
- <property name="label">gtk-apply</property>
+ <object class="GtkButton" id="standard">
+ <property name="label">Standard</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@@ -107,6 +125,7 @@
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="scrollable">True</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
@@ -584,13 +603,8 @@
</child>
<action-widgets>
<action-widget response="-11">help</action-widget>
- <action-widget response="0">reset</action-widget>
<action-widget response="-5">ok</action-widget>
- <action-widget response="0">apply</action-widget>
<action-widget response="-6">cancel</action-widget>
</action-widgets>
- <child>
- <placeholder/>
- </child>
</object>
</interface>
diff --git a/sw/uiconfig/swriter/ui/textgridpage.ui b/sw/uiconfig/swriter/ui/textgridpage.ui
index 64ec3e518079..76cc6d1435d0 100644
--- a/sw/uiconfig/swriter/ui/textgridpage.ui
+++ b/sw/uiconfig/swriter/ui/textgridpage.ui
@@ -142,8 +142,6 @@
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
</object>
<packing>
<property name="expand">True</property>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 2d7b54bfbdca..6eff8ea00b1e 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -519,8 +519,8 @@ public:
SalInstanceWidget* pVclWidget = dynamic_cast<SalInstanceWidget*>(pWidget);
assert(pVclWidget);
SalInstanceContainer* pNewVclParent = dynamic_cast<SalInstanceContainer*>(pNewParent);
- assert(pNewVclParent);
- pVclWidget->getWidget()->SetParent(pNewVclParent->getWidget());
+ assert(!pNewParent || pNewVclParent);
+ pVclWidget->getWidget()->SetParent(pNewVclParent ? pNewVclParent->getWidget() : nullptr);
}
};
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index eaf73883d3b2..762eeabc8911 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1837,12 +1837,14 @@ public:
{
GtkInstanceWidget* pGtkWidget = dynamic_cast<GtkInstanceWidget*>(pWidget);
assert(pGtkWidget);
- GtkInstanceContainer* pNewGtkParent = dynamic_cast<GtkInstanceContainer*>(pNewParent);
- assert(pNewGtkParent);
GtkWidget* pChild = pGtkWidget->getWidget();
g_object_ref(pChild);
gtk_container_remove(getContainer(), pChild);
- gtk_container_add(pNewGtkParent->getContainer(), pChild);
+
+ GtkInstanceContainer* pNewGtkParent = dynamic_cast<GtkInstanceContainer*>(pNewParent);
+ assert(!pNewParent || pNewGtkParent);
+ if (pNewGtkParent)
+ gtk_container_add(pNewGtkParent->getContainer(), pChild);
g_object_unref(pChild);
}
};