[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - include/svx include/vcl starmath/inc starmath/source svx/source vcl/source
Katarina Behrens
Katarina.Behrens at cib.de
Thu Jul 23 02:05:57 PDT 2015
include/svx/charmap.hxx | 1 +
include/vcl/ctrl.hxx | 2 --
starmath/inc/dialog.hxx | 1 +
starmath/source/dialog.cxx | 4 ++++
svx/source/dialog/charmap.cxx | 4 ++++
vcl/source/control/ctrl.cxx | 20 +++++---------------
6 files changed, 15 insertions(+), 17 deletions(-)
New commits:
commit 21afa91c527297a322d29722af05e1410faae41d
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Wed Jul 22 11:27:24 2015 +0200
tdf#92600: Restore ability to apply font settings to controls
SmShowSymbol handles font/fg/bg settings by itself, so make
ApplySettings noop there.
This partially reverts commit b010e4074e5d5ee3a3905f1351f04efafe937c2a
Reviewed-on: https://gerrit.libreoffice.org/17288
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 94ceda8b2fea37587424b664e17fa9ee8b01e158)
squashed commit from László Németh <laszlo.nemeth at collabora.com>
tdf#92600 fix missing font preview in character set widget
The previous fix for tdf#92600 (missing bold text in dialogs)
brought back the regression in the special character set
widget: the characters show always the default font
of the Control class instead of the chosen font, see in
the Insert->Special Character... dialog window of Writer.
Change-Id: Ib5074684ef1277d9b9b4646bd73dce4cbff3943e
2bdc2300f481dd680877f84ea2a717b9e749c64c
Reviewed-on: https://gerrit.libreoffice.org/17303
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index e56fe98..447dcf4 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -43,6 +43,7 @@ public:
SvxShowCharSet( vcl::Window* pParent );
virtual ~SvxShowCharSet();
virtual void dispose() SAL_OVERRIDE;
+ virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
void RecalculateFont(vcl::RenderContext& rRenderContext);
diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx
index 69a3569..6741a22 100644
--- a/include/vcl/ctrl.hxx
+++ b/include/vcl/ctrl.hxx
@@ -41,8 +41,6 @@ protected:
private:
bool mbHasControlFocus;
- bool mbFont;
- bool mbForeground;
Link<> maGetFocusHdl;
Link<> maLoseFocusHdl;
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 4a64ca5..aaf4c0f 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -328,6 +328,7 @@ class SmShowSymbol : public Control
Link<> aDblClickHdlLink;
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE;
+ virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 5ec5228..840c2a7 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1384,6 +1384,10 @@ void SmShowSymbol::Resize()
Invalidate();
}
+void SmShowSymbol::ApplySettings(vcl::RenderContext& /*rRenderContext*/ )
+{
+}
+
void SmShowSymbol::setFontSize(vcl::Font &rFont) const
{
rFont.SetSize(Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3));
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index f5e9595..df7d68e 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -66,6 +66,10 @@ SvxShowCharSet::SvxShowCharSet(vcl::Window* pParent)
init();
}
+void SvxShowCharSet::ApplySettings(vcl::RenderContext& /*rRenderContext*/ )
+{
+}
+
void SvxShowCharSet::init()
{
nSelectedIndex = -1; // TODO: move into init list when it is no longer static
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 21056db..fa7090b 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -36,8 +36,6 @@ using namespace vcl;
void Control::ImplInitControlData()
{
mbHasControlFocus = false;
- mbFont = false;
- mbForeground = false;
mpControlData = new ImplControlData;
}
@@ -419,23 +417,15 @@ void Control::ApplySettings(vcl::RenderContext& rRenderContext)
{
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- if (mbFont)
- {
- vcl::Font rFont(GetCanonicalFont(rStyleSettings));
- ApplyControlFont(rRenderContext, rFont);
- }
+ vcl::Font rFont(GetCanonicalFont(rStyleSettings));
+ ApplyControlFont(rRenderContext, rFont);
- if (mbFont || mbForeground)
- {
- ApplyControlForeground(rRenderContext, GetCanonicalTextColor(rStyleSettings));
- rRenderContext.SetTextFillColor();
- }
+ ApplyControlForeground(rRenderContext, GetCanonicalTextColor(rStyleSettings));
+ rRenderContext.SetTextFillColor();
}
-void Control::ImplInitSettings(const bool _bFont, const bool _bForeground)
+void Control::ImplInitSettings(const bool, const bool)
{
- mbFont = _bFont;
- mbForeground = _bForeground;
ApplySettings(*this);
}
More information about the Libreoffice-commits
mailing list