summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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>
Diffstat (limited to 'svx')
-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
10 files changed, 14 insertions, 13 deletions
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">