[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - vcl/inc vcl/win
Michael Stahl
mstahl at redhat.com
Wed Apr 26 13:09:12 UTC 2017
vcl/inc/win/saldata.hxx | 4 +++-
vcl/win/gdi/winlayout.cxx | 18 ++++++++++++------
2 files changed, 15 insertions(+), 7 deletions(-)
New commits:
commit 8f51b4272450b6220f563740538f143c0bc70175
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Apr 24 18:21:50 2017 +0200
tdf#107205 vcl: don't always use D2DWriteTextOutRenderer
... because it cannot rotate text.
(regression from commit df556aa47da22f96b3fcd356c12419d3035cba3c)
Change-Id: If9bc6e98b8979c5eb02f1a5cfc12b4d19bdc481b
(cherry picked from commit 2eb91035c2f60e9dc476336474d51b23b666bb04)
Reviewed-on: https://gerrit.libreoffice.org/36904
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index cf11a04ddace..61a5d91d9b88 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -121,7 +121,9 @@ public:
std::map< UINT,sal_uInt16 > maVKMap; // map some dynamic VK_* entries
// must be deleted before exit(), so delete it in DeInitSalData()
- std::unique_ptr<TextOutRenderer> m_pTextOutRenderer;
+ std::unique_ptr<TextOutRenderer> m_pD2DWriteTextOutRenderer;
+ // tdf#107205 need 2 instances because D2DWrite can't rotate text
+ std::unique_ptr<TextOutRenderer> m_pExTextOutRenderer;
};
inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = pData; }
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 22a6fb268f55..782f56c31e48 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -3080,18 +3080,24 @@ TextOutRenderer & TextOutRenderer::get(bool bUseDWrite)
abort();
}
- if (!pSalData->m_pTextOutRenderer)
+ if (bUseDWrite)
{
- if (bUseDWrite && D2DWriteTextOutRenderer::InitModules())
+ static bool const bSuccess(D2DWriteTextOutRenderer::InitModules());
+ if (bSuccess && !pSalData->m_pD2DWriteTextOutRenderer)
{
- pSalData->m_pTextOutRenderer.reset(new D2DWriteTextOutRenderer());
+ pSalData->m_pD2DWriteTextOutRenderer.reset(new D2DWriteTextOutRenderer());
}
- else
+ if (pSalData->m_pD2DWriteTextOutRenderer)
{
- pSalData->m_pTextOutRenderer.reset(new ExTextOutRenderer());
+ return *pSalData->m_pD2DWriteTextOutRenderer;
}
+ // else: fall back to GDI
+ }
+ if (!pSalData->m_pExTextOutRenderer)
+ {
+ pSalData->m_pExTextOutRenderer.reset(new ExTextOutRenderer);
}
- return *pSalData->m_pTextOutRenderer;
+ return *pSalData->m_pExTextOutRenderer;
}
More information about the Libreoffice-commits
mailing list