diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-03 16:06:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-05 13:36:35 +0200 |
commit | 229483707c3ccb48d008d37f856bbeb6df199a90 (patch) | |
tree | c202bfb4777a66e6095fc971e317794f92399b4a /vcl | |
parent | 59b9fc4776940863d905de14e25d74421f7de603 (diff) |
weld SvxBorderTabPage
Change-Id: I33f12f160ac5fea14c9a53c3846c6d31c7fd0084
Reviewed-on: https://gerrit.libreoffice.org/59954
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 11 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 3 | ||||
-rw-r--r-- | vcl/source/outdev/rect.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 15 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 2 |
6 files changed, 25 insertions, 14 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 43eb8d510396..a65a973958dc 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -982,11 +982,16 @@ public: m_xButton->SetText(rText); } - virtual void set_image(VirtualDevice& rDevice) override + virtual void set_image(VirtualDevice* pDevice) override { - BitmapEx aBitmap(rDevice.GetBitmap(Point(0, 0), rDevice.GetOutputSize())); m_xButton->SetImageAlign(ImageAlign::Left); - m_xButton->SetModeImage(Image(aBitmap)); + if (pDevice) + { + BitmapEx aBitmap(pDevice->GetBitmap(Point(0, 0), pDevice->GetOutputSize())); + m_xButton->SetModeImage(Image(aBitmap)); + } + else + m_xButton->SetModeImage(Image()); } virtual OUString get_label() const override diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 39acdd39e955..d81565a68666 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -823,7 +823,6 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); tools::Rectangle aInRect = rRect; Color aColor; - OUString aText = PushButton::GetText(); // PushButton:: because of MoreButton DrawTextFlags nTextStyle = ImplGetTextStyle( nDrawFlags ); DrawSymbolFlags nStyle; @@ -872,7 +871,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl { long nSeparatorX = 0; tools::Rectangle aSymbolRect = aInRect; - if ( !aText.isEmpty() && ! (ImplGetButtonState() & DrawButtonFlags::NoText) ) + if (!(ImplGetButtonState() & DrawButtonFlags::NoText)) { // calculate symbol size long nSymbolSize = pDev->GetTextHeight() / 2 + 1; diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx index c9f0e7c460ce..049612c5501e 100644 --- a/vcl/source/outdev/rect.cxx +++ b/vcl/source/outdev/rect.cxx @@ -159,8 +159,8 @@ void OutputDevice::Invert( const tools::Rectangle& rRect, InvertFlags nFlags ) nSalFlags |= SalInvert::Highlight; if ( nFlags & InvertFlags::N50 ) nSalFlags |= SalInvert::N50; - if ( nFlags == InvertFlags(0xffff) ) // vcldemo trackframe test - nSalFlags = SalInvert::TrackFrame; + if ( nFlags & InvertFlags::TrackFrame ) + nSalFlags |= SalInvert::TrackFrame; mpGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), nSalFlags, this ); } @@ -195,6 +195,8 @@ void OutputDevice::Invert( const tools::Polygon& rPoly, InvertFlags nFlags ) nSalFlags |= SalInvert::Highlight; if ( nFlags & InvertFlags::N50 ) nSalFlags |= SalInvert::N50; + if ( nFlags & InvertFlags::TrackFrame ) + nSalFlags |= SalInvert::TrackFrame; const SalPoint* pPtAry = reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry()); mpGraphics->Invert( nPoints, pPtAry, nSalFlags, this ); } diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 458b836e77b3..6fd77952f24f 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1804,7 +1804,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString & else if (name == "GtkDrawingArea") { OUString sBorder = BuilderUtils::extractCustomProperty(rMap); - xWindow = VclPtr<VclDrawingArea>::Create(pParent, sBorder.isEmpty() ? 0 : WB_BORDER); + xWindow = VclPtr<VclDrawingArea>::Create(pParent, sBorder.isEmpty() ? WB_TABSTOP : WB_BORDER | WB_TABSTOP); } else if (name == "GtkTextView") { diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 039f4a78628a..eaf73883d3b2 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -2749,11 +2749,14 @@ public: ::set_label(m_pButton, rText); } - virtual void set_image(VirtualDevice& rDevice) override + virtual void set_image(VirtualDevice* pDevice) override { gtk_button_set_always_show_image(m_pButton, true); gtk_button_set_image_position(m_pButton, GTK_POS_LEFT); - gtk_button_set_image(m_pButton, gtk_image_new_from_surface(get_underlying_cairo_surface(rDevice))); + if (pDevice) + gtk_button_set_image(m_pButton, gtk_image_new_from_surface(get_underlying_cairo_surface(*pDevice))); + else + gtk_button_set_image(m_pButton, nullptr); } virtual OUString get_label() const override @@ -3097,11 +3100,11 @@ public: ::set_label(m_pLabel, rText); } - virtual void set_image(VirtualDevice& rDevice) override + virtual void set_image(VirtualDevice* pDevice) override { if (!m_pImage) { - m_pImage = GTK_IMAGE(gtk_image_new_from_surface(get_underlying_cairo_surface(rDevice))); + m_pImage = GTK_IMAGE(gtk_image_new()); GtkStyleContext *pContext = gtk_widget_get_style_context(GTK_WIDGET(m_pMenuButton)); gint nImageSpacing(0); gtk_style_context_get_style(pContext, "image-spacing", &nImageSpacing, nullptr); @@ -3109,8 +3112,10 @@ public: gtk_box_reorder_child(m_pBox, GTK_WIDGET(m_pImage), 0); gtk_widget_show(GTK_WIDGET(m_pImage)); } + if (pDevice) + gtk_image_set_from_surface(m_pImage, get_underlying_cairo_surface(*pDevice)); else - gtk_image_set_from_surface(m_pImage, get_underlying_cairo_surface(rDevice)); + gtk_image_set_from_surface(m_pImage, nullptr); } virtual void set_item_active(const OString& rIdent, bool bActive) override diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index f36009e200c9..4a812d370eea 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -768,7 +768,7 @@ public: doInvert(rDev, aRegions[0], InvertFlags::NONE); doInvert(rDev, aRegions[1], InvertFlags::N50); doInvert(rDev, aRegions[2], InvertFlags::Highlight); - doInvert(rDev, aRegions[3], InvertFlags(0xffff)); + doInvert(rDev, aRegions[3], InvertFlags::TrackFrame); } } }; |