[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/unx
include/vcl/sysdata.hxx |2 -- vcl/inc/unx/salgdi.h |2 -- vcl/unx/generic/gdi/cairo_xlib_cairo.cxx |4 +--- vcl/unx/generic/gdi/salgdi.cxx |3 --- vcl/unx/generic/gdi/salvd.cxx| 12 +--- 5 files changed, 2 insertions(+), 21 deletions(-) New commits: commit 62a8b202782e38b766304b882b14ace80c0d8a8d Author: Caolán McNamara AuthorDate: Tue Jan 10 16:18:44 2023 + Commit: Caolán McNamara CommitDate: Wed Jan 11 12:12:54 2023 + remove defunct pXRenderFormat field Change-Id: Id48feeb0738bc89e9ba8580871db6e5fb307bfd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145290 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx index f7374a06d54e..b7bdb56228d1 100644 --- a/include/vcl/sysdata.hxx +++ b/include/vcl/sysdata.hxx @@ -156,7 +156,6 @@ struct SystemGraphicsData sal_uIntPtr hDrawable; // a drawable void* pVisual;// the visual in use int nScreen;// the current screen of the drawable -void* pXRenderFormat; // render format for drawable #endif #if USE_HEADLESS_CODE void* pSurface; // the cairo surface when using svp-based backends, which includes gtk[3|4] @@ -177,7 +176,6 @@ struct SystemGraphicsData , hDrawable( 0 ) , pVisual( nullptr ) , nScreen( 0 ) -, pXRenderFormat( nullptr ) #endif #if USE_HEADLESS_CODE , pSurface( nullptr ) diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index ed0a9d10ad9e..4302f849337a 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -101,7 +101,6 @@ public: virtual SalGraphicsImpl*GetImpl() const override; SalGeometryProvider*GetGeometryProvider() const; voidSetDrawable(Drawable d, cairo_surface_t* surface, SalX11Screen nXScreen); -voidSetXRenderFormat( XRenderPictFormat* pXRenderFormat ) { m_pXRenderFormat = pXRenderFormat; } const SalX11Screen& GetScreenNumber() const { return m_nXScreen; } @@ -166,7 +165,6 @@ private: std::unique_ptrm_pDeleteColormap; SalX11Screenm_nXScreen; -mutable XRenderPictFormat* m_pXRenderFormat; Region mpClipRegion; Pixmap hBrush_;// Dither diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx index 6ff9c8bd205c..9ec8167fbfdd 100644 --- a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx +++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx @@ -65,8 +65,7 @@ namespace cairo pDisplay(pSysDat.pDisplay), hDrawable(pSysDat.hDrawable), pVisual(pSysDat.pVisual), -nScreen(pSysDat.nScreen), -pRenderFormat(pSysDat.pXRenderFormat) +nScreen(pSysDat.nScreen) {} X11SysData::X11SysData( const SystemEnvData& pSysDat, const SalFrame* pReference ) : @@ -248,7 +247,6 @@ namespace cairo aSystemGraphicsData.nSize = sizeof(SystemGraphicsData); aSystemGraphicsData.hDrawable = mpPixmap ? mpPixmap->mhDrawable : maSysData.hDrawable; -aSystemGraphicsData.pXRenderFormat = maSysData.pRenderFormat; aSystemGraphicsData.pSurface = pSurface; int width = cairo_xlib_surface_get_width(pSurface); diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 6a534ac4e236..b4347c0dfa59 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -83,7 +83,6 @@ X11SalGraphics::X11SalGraphics(): m_pFrame(nullptr), m_pVDev(nullptr), m_nXScreen( 0 ), -m_pXRenderFormat(nullptr), mpClipRegion(nullptr), hBrush_(None), bWindow_(false), @@ -162,7 +161,6 @@ void X11SalGraphics::SetDrawable(Drawable aDrawable, cairo_surface_t* pSurface, } maX11Common.m_hDrawable = aDrawable; -SetXRenderFormat( nullptr ); } void X11SalGraphics::Init( X11SalFrame& rFrame, Drawable aTarget, @@ -341,7 +339,6 @@ SystemGraphicsData X11SalGraphics::GetGraphicsData() const aRes.hDrawable = maX11Common.m_hDrawable; aRes.pVisual = GetVisual().visual; aRes.nScreen = m_nXScreen.getXScreen(); -aRes.pXRenderFormat = m_pXRenderFormat; return aRes; } diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index 047437a7f78c..ee23e9112d96 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -135,17 +135,7 @@ X11SalVirtualDevice::X11SalVirtualDevice(const SalGraphics& rGraphics, tools::Lo bExternPixmap_ = false; } -XRenderPictFormat* pXRenderFormat = pData ? static_cast(pData->pXRenderFormat) : nullptr; -if( pXRenderFormat ) -{ -pGraphics_->SetXRenderFormat( pXRenderFormat ); -if( pXRenderFormat-
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/unx
include/vcl/weldutils.hxx | 128 ++ vcl/inc/unx/gtk/gtkinst.hxx | 99 +-- vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx |2 3 files changed, 136 insertions(+), 93 deletions(-) New commits: commit 20d5f61abfd47fc76da3be8241653fdb7ae10491 Author: Caolán McNamara AuthorDate: Wed Nov 13 21:28:12 2019 + Commit: Caolán McNamara CommitDate: Wed Dec 4 17:37:34 2019 +0100 factor out 'weld::Widget as XWindow' Change-Id: I24b52c5b8908fdf1a66fd26b2dc438b9557afa6e Reviewed-on: https://gerrit.libreoffice.org/82641 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/vcl/weldutils.hxx b/include/vcl/weldutils.hxx index 4144803e8b3d..764d343902df 100644 --- a/include/vcl/weldutils.hxx +++ b/include/vcl/weldutils.hxx @@ -10,8 +10,11 @@ #ifndef INCLUDED_VCL_WELDUTILS_HXX #define INCLUDED_VCL_WELDUTILS_HXX +#include #include #include +#include +#include #include #include @@ -29,6 +32,131 @@ public: // fill in the label and icons for actions and dispatch the action on item click ToolbarUnoDispatcher(Toolbar& rToolbar, const css::uno::Reference& rFrame); }; + +typedef cppu::WeakComponentImplHelper TransportAsXWindow_Base; + +class VCL_DLLPUBLIC TransportAsXWindow : public TransportAsXWindow_Base +{ +private: +osl::Mutex m_aHelperMtx; +weld::Widget* m_pWeldWidget; + +comphelper::OInterfaceContainerHelper2 m_aWindowListeners; +comphelper::OInterfaceContainerHelper2 m_aKeyListeners; +comphelper::OInterfaceContainerHelper2 m_aFocusListeners; +comphelper::OInterfaceContainerHelper2 m_aMouseListeners; +comphelper::OInterfaceContainerHelper2 m_aMotionListeners; +comphelper::OInterfaceContainerHelper2 m_aPaintListeners; + +public: +TransportAsXWindow(weld::Widget* pWeldWidget) +: TransportAsXWindow_Base(m_aHelperMtx) +, m_pWeldWidget(pWeldWidget) +, m_aWindowListeners(m_aHelperMtx) +, m_aKeyListeners(m_aHelperMtx) +, m_aFocusListeners(m_aHelperMtx) +, m_aMouseListeners(m_aHelperMtx) +, m_aMotionListeners(m_aHelperMtx) +, m_aPaintListeners(m_aHelperMtx) +{ +} + +weld::Widget* getWidget() const { return m_pWeldWidget; } + +virtual void clear() { m_pWeldWidget = nullptr; } + +// css::awt::XWindow +void SAL_CALL setPosSize(sal_Int32, sal_Int32, sal_Int32, sal_Int32, sal_Int16) override +{ +throw css::uno::RuntimeException("not implemented"); +} + +css::awt::Rectangle SAL_CALL getPosSize() override +{ +throw css::uno::RuntimeException("not implemented"); +} + +void SAL_CALL setVisible(sal_Bool bVisible) override { m_pWeldWidget->set_visible(bVisible); } + +void SAL_CALL setEnable(sal_Bool bSensitive) override +{ +m_pWeldWidget->set_sensitive(bSensitive); +} + +void SAL_CALL setFocus() override { m_pWeldWidget->grab_focus(); } + +void SAL_CALL +addWindowListener(const css::uno::Reference& rListener) override +{ +m_aWindowListeners.addInterface(rListener); +} + +void SAL_CALL +removeWindowListener(const css::uno::Reference& rListener) override +{ +m_aWindowListeners.removeInterface(rListener); +} + +void SAL_CALL +addFocusListener(const css::uno::Reference& rListener) override +{ +m_aFocusListeners.addInterface(rListener); +} + +void SAL_CALL +removeFocusListener(const css::uno::Reference& rListener) override +{ +m_aFocusListeners.removeInterface(rListener); +} + +void SAL_CALL +addKeyListener(const css::uno::Reference& rListener) override +{ +m_aKeyListeners.addInterface(rListener); +} + +void SAL_CALL +removeKeyListener(const css::uno::Reference& rListener) override +{ +m_aKeyListeners.removeInterface(rListener); +} + +void SAL_CALL +addMouseListener(const css::uno::Reference& rListener) override +{ +m_aMouseListeners.addInterface(rListener); +} + +void SAL_CALL +removeMouseListener(const css::uno::Reference& rListener) override +{ +m_aMouseListeners.removeInterface(rListener); +} + +void SAL_CALL addMouseMotionListener( +const css::uno::Reference& rListener) override +{ +m_aMotionListeners.addInterface(rListener); +} + +void SAL_CALL removeMouseMotionListener( +const css::uno::Reference& rListener) override +{ +m_aMotionListeners.removeInterface(rListener); +} + +void SAL_CALL +addPaintListener(const css::uno::Reference& rListener) override +{ +m_aPaintListeners.addInterface(rListener); +} + +void SAL_CALL +removePaintListener(const css::uno::Reference& rListener) override +{ +m_aPaintListeners.removeInterface(rListener); +} +}; } #endif diff --g
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/unx
include/vcl/ppdparser.hxx |3 vcl/inc/unx/cpdmgr.hxx| 78 +++- vcl/unx/generic/printer/cpdmgr.cxx| 654 ++ vcl/unx/generic/printer/ppdparser.cxx | 124 ++ 4 files changed, 698 insertions(+), 161 deletions(-) New commits: commit 7fbf98d99737ac916cc2dc374f3139e2ea81e47b Author: Yash Srivastav Date: Thu Jul 27 08:11:34 2017 +0530 Add Common Printing Dialog Functionality Summary: These set of commits add support for the Common Printing Dialog Backends being developed as part of GSoC'17. All backends exist as dbus-services which can be queried for printers, their options, etc. Test Plan: Firstly, without adding any CPD backend, LO printing should work as it works now with graceful fallback to CUPS. Next, we need to install a backend. The backend providing CUPS interface is at g...@github.com:NilanjanaLodh/PrintDialog_Backend.git See README.md for installation instructions. After this, run LO and existing CUPS Printers should show up. Also printing does send a job to cups which can be seen at: http://localhost:631/jobs?which_jobs=completed Due to LO shutdown not being handled properly currently, the backend might need to be killed via `pkill print_backend_cups` Future Plans: * Fix shutdown actions. Change-Id: I3bdea5d3272ec4c9c0dfe510f5848fcb398b4b14 Reviewed-on: https://gerrit.libreoffice.org/40565 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/vcl/ppdparser.hxx b/include/vcl/ppdparser.hxx index 9212516fc8e5..ecbda153af79 100644 --- a/include/vcl/ppdparser.hxx +++ b/include/vcl/ppdparser.hxx @@ -60,6 +60,7 @@ struct VCL_DLLPUBLIC PPDValue class VCL_DLLPUBLIC PPDKey { friend class PPDParser; +friend class CPDManager; typedef std::unordered_map< OUString, PPDValue, OUStringHash > hash_type; typedef std::vector< PPDValue* > value_type; @@ -120,6 +121,7 @@ class VCL_DLLPUBLIC PPDParser { friend class PPDContext; friend class CUPSManager; +friend class CPDManager; friend class PPDCache; typedef std::unordered_map< OUString, PPDKey*, OUStringHash > hash_type; @@ -174,6 +176,7 @@ private: PPDTranslator* m_pTranslator; PPDParser( const OUString& rFile ); +PPDParser( const OUString& rFile, std::vector keys ); ~PPDParser(); void parseOrderDependency(const OString& rLine); diff --git a/vcl/inc/unx/cpdmgr.hxx b/vcl/inc/unx/cpdmgr.hxx index d60f098435fb..48fb02ab3a2a 100644 --- a/vcl/inc/unx/cpdmgr.hxx +++ b/vcl/inc/unx/cpdmgr.hxx @@ -30,52 +30,100 @@ #include "printerinfomanager.hxx" #include "cupsmgr.hxx" +#define BACKEND_DIR "/usr/share/print-backends" +#define FRONTEND_INTERFACE "/usr/share/dbus-1/interfaces/org.openprinting.Frontend.xml" +#define BACKEND_INTERFACE "/usr/share/dbus-1/interfaces/org.openprinting.Backend.xml" + namespace psp { +class PPDParser; + struct CPDPrinter { -std::string name; -std::string info; -std::string location; -std::string make_and_model; -std::string printer_state; +const char* id; +const char* name; +const char* info; +const char* location; +const char* make_and_model; +const char* printer_state; +const char* backend_name; bool is_accepting_jobs; GDBusProxy* backend; }; +struct CPDPrinterOption +{ +OUString name; +OUString default_value; +int num_supported_values; +std::vector supported_values; +}; + class CPDManager : public PrinterInfoManager { #if ENABLE_DBUS && ENABLE_GIO GDBusConnection * m_pConnection = nullptr; bool m_aPrintersChanged = true; +std::vector> m_tBackends; std::unordered_map< std::string, GDBusProxy * > m_pBackends; std::unordered_map< FILE*, OString, FPtrHash > m_aSpoolFiles; std::unordered_map< OUString, CPDPrinter *, OUStringHash > m_aCPDDestMap; +std::unordered_map< OUString, PPDContext, OUStringHash > m_aDefaultContexts; #endif CPDManager(); +// Function called when CPDManager is destroyed +virtual ~CPDManager() override; + +static void onNameAcquired(GDBusConnection *connection, const char* name, void* user_data); +static void onNameLost (GDBusConnection *, const char *name, void*); +static void printerAdded (GDBusConnection *connection, + const gchar *sender_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *signal_name, + GVariant*parameters, + gpointeruser_data); +static void printerRemoved (GDBusConnection *connection, +const gchar *sender_name, +
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/unx
include/vcl/sysdata.hxx |2 +- vcl/inc/unx/gtk/gtkframe.hxx |2 +- vcl/unx/gtk/gtkdata.cxx |4 ++-- vcl/unx/gtk/gtksalframe.cxx |6 +++--- vcl/unx/gtk3/gtk3gtkframe.cxx |4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) New commits: commit d9527fd01fd2674deb6868084d056861db5447fa Author: Caolán McNamara Date: Thu Aug 31 21:08:17 2017 +0100 remove some casting Change-Id: Idf6c82b0c609d8680e2017602bfe9a93acb093b9 Reviewed-on: https://gerrit.libreoffice.org/41807 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx index ae9e57f0344c..fba387e01b87 100644 --- a/include/vcl/sysdata.hxx +++ b/include/vcl/sysdata.hxx @@ -64,7 +64,7 @@ struct SystemEnvData // Nothing #elif defined( UNX ) void* pDisplay; // the relevant display connection -longaWindow;// the window of the object +sal_uIntPtr aWindow;// the window of the object void* pSalFrame; // contains a salframe, if object has one void* pWidget;// the corresponding widget void* pVisual;// the visual in use diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index 1a536795f403..772033b49b76 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -55,7 +55,7 @@ class GtkSalGraphics; class GtkSalDisplay; #if GTK_CHECK_VERSION(3,0,0) -typedef ::Window GdkNativeWindow; +typedef sal_uIntPtr GdkNativeWindow; #define GDK_WINDOW_XWINDOW(o) GDK_WINDOW_XID(o) #define gdk_set_sm_client_id(i) gdk_x11_set_sm_client_id(i) #define gdk_window_foreign_new_for_display(a,b) gdk_x11_window_foreign_new_for_display(a,b) diff --git a/vcl/unx/gtk/gtkdata.cxx b/vcl/unx/gtk/gtkdata.cxx index 29f7d33be75e..afc0aa8c7dce 100644 --- a/vcl/unx/gtk/gtkdata.cxx +++ b/vcl/unx/gtk/gtkdata.cxx @@ -146,7 +146,7 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* sys_event ) it != m_aFrames.end(); ++it ) { GtkSalFrame* pFrame = static_cast(*it); -if( (GdkNativeWindow)pFrame->GetSystemData()->aWindow == pEvent->xany.window || +if( pFrame->GetSystemData()->aWindow == pEvent->xany.window || ( pFrame->getForeignParent() && pFrame->getForeignParentWindow() == pEvent->xany.window ) || ( pFrame->getForeignTopLevel() && pFrame->getForeignTopLevelWindow() == pEvent->xany.window ) ) @@ -216,7 +216,7 @@ bool GtkSalDisplay::Dispatch( XEvent* pEvent ) for( std::list< SalFrame* >::const_iterator it = m_aFrames.begin(); it != m_aFrames.end(); ++it ) { -if( (GdkNativeWindow)(*it)->GetSystemData()->aWindow == pEvent->xany.window ) +if ((*it)->GetSystemData()->aWindow == pEvent->xany.window) return static_cast(*it)->Dispatch( pEvent ); } } diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index e64f68266d01..b8cac669deb4 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -1250,7 +1250,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle ) } } -GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow ) +GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow(GdkNativeWindow aWindow) { ::Window aRoot, aParent; ::Window* pChildren; @@ -1282,9 +1282,9 @@ GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow ) void GtkSalFrame::Init( SystemParentData* pSysData ) { m_pParent = nullptr; -m_aForeignParentWindow = (GdkNativeWindow)pSysData->aWindow; +m_aForeignParentWindow = pSysData->aWindow; m_pForeignParent = nullptr; -m_aForeignTopLevelWindow = findTopLevelSystemWindow( (GdkNativeWindow)pSysData->aWindow ); +m_aForeignTopLevelWindow = findTopLevelSystemWindow(pSysData->aWindow); m_pForeignTopLevel = gdk_window_foreign_new_for_display( getGdkDisplay(), m_aForeignTopLevelWindow ); gdk_window_set_events( m_pForeignTopLevel, GDK_STRUCTURE_MASK ); diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 1b17ef67bf0d..1d43d1999811 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -1271,9 +1271,9 @@ GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow ) void GtkSalFrame::Init( SystemParentData* pSysData ) { m_pParent = nullptr; -m_aForeignParentWindow = (GdkNativeWindow)pSysData->aWindow; +m_aForeignParentWindow = pSysData->aWindow; m_pForeignParent = nullptr; -m_aForeignTopLevelWindow = findTopLevelSystemWindow( (GdkNativeWindow)pSysData->aWindow ); +m_aForeignTopLevelWindow = findTopLevelSystemWindow(pSysData->aWindow); m_pForeignTopLevel = gdk_window_foreign_n
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/unx
include/vcl/vclenum.hxx|2 +- vcl/inc/unx/fc_fontoptions.hxx |4 ++-- vcl/unx/generic/fontmanager/fontconfig.cxx |8 vcl/unx/generic/glyphs/freetype_glyphcache.cxx |8 4 files changed, 11 insertions(+), 11 deletions(-) New commits: commit 2a4f9cbf01c8ee4ecf571e4a8b9e121050e7bd95 Author: Noel Grandin Date: Tue May 24 10:23:42 2016 +0200 Convert FontHintStyle to scoped enum Change-Id: I6e59bf8beacc524897aede45420574148c0fecde Reviewed-on: https://gerrit.libreoffice.org/25397 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx index 45f9ed2..8dcafe1 100644 --- a/include/vcl/vclenum.hxx +++ b/include/vcl/vclenum.hxx @@ -77,7 +77,7 @@ enum FontAutoHint { AUTOHINT_DONTKNOW, AUTOHINT_FALSE, AUTOHINT_TRUE }; enum FontHinting { HINTING_DONTKNOW, HINTING_FALSE, HINTING_TRUE }; -enum FontHintStyle { HINT_NONE, HINT_SLIGHT, HINT_MEDIUM, HINT_FULL }; +enum class FontHintStyle { NONE, Slight, Medium, Full }; typedef sal_uInt32 sal_UCS4;// TODO: this should be moved to rtl diff --git a/vcl/inc/unx/fc_fontoptions.hxx b/vcl/inc/unx/fc_fontoptions.hxx index d99870d..d085e26 100644 --- a/vcl/inc/unx/fc_fontoptions.hxx +++ b/vcl/inc/unx/fc_fontoptions.hxx @@ -42,7 +42,7 @@ public: meAntiAlias(ANTIALIAS_DONTKNOW), meAutoHint(AUTOHINT_DONTKNOW), meHinting(HINTING_DONTKNOW), -meHintStyle(HINT_SLIGHT), +meHintStyle(FontHintStyle::Slight), mpPattern(pPattern) {} ~FontConfigFontOptions(); @@ -50,7 +50,7 @@ public: FontHintStyle GetHintStyle() const { return meHintStyle; } boolDontUseEmbeddedBitmaps() const { return meEmbeddedBitmap == EMBEDDEDBITMAP_FALSE; } boolDontUseAntiAlias() const { return meAntiAlias == ANTIALIAS_FALSE; } -boolDontUseHinting() const { return (meHinting == HINTING_FALSE) || (GetHintStyle() == HINT_NONE); } +boolDontUseHinting() const { return (meHinting == HINTING_FALSE) || (GetHintStyle() == FontHintStyle::NONE); } void* GetPattern(void * /*pFace*/, bool /*bEmbolden*/) const; private: FcPattern* mpPattern; diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index 73ad87a..957afb14 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -1215,11 +1215,11 @@ FontConfigFontOptions* PrintFontManager::getFontOptions( pOptions->meHinting = hinting ? HINTING_TRUE : HINTING_FALSE; switch (hintstyle) { -case FC_HINT_NONE: pOptions->meHintStyle = HINT_NONE; break; -case FC_HINT_SLIGHT: pOptions->meHintStyle = HINT_SLIGHT; break; -case FC_HINT_MEDIUM: pOptions->meHintStyle = HINT_MEDIUM; break; +case FC_HINT_NONE: pOptions->meHintStyle = FontHintStyle::NONE; break; +case FC_HINT_SLIGHT: pOptions->meHintStyle = FontHintStyle::Slight; break; +case FC_HINT_MEDIUM: pOptions->meHintStyle = FontHintStyle::Medium; break; default: // fall through -case FC_HINT_FULL: pOptions->meHintStyle = HINT_FULL; break; +case FC_HINT_FULL: pOptions->meHintStyle = FontHintStyle::Full; break; } } diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 7e1dbc9..933771c 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -571,15 +571,15 @@ void ServerFont::SetFontOptions(const std::shared_ptr& xF mnLoadFlags |= FT_LOAD_TARGET_NORMAL; switch (mxFontOptions->GetHintStyle()) { - case HINT_NONE: + case FontHintStyle::NONE: mnLoadFlags |= FT_LOAD_NO_HINTING; break; - case HINT_SLIGHT: + case FontHintStyle::Slight: mnLoadFlags |= FT_LOAD_TARGET_LIGHT; break; - case HINT_MEDIUM: + case FontHintStyle::Medium: break; - case HINT_FULL: + case FontHintStyle::Full: default: break; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits