[Libreoffice-commits] core.git: 10 commits - basctl/source canvas/source chart2/source cui/source dbaccess/source desktop/source drawinglayer/source editeng/source extensions/source filter/source include/drawinglayer include/svx include/vcl reportdesign/source sc/source sd/source sfx2/source starmath/source svtools/source svx/source sw/source toolkit/source vcl/generic vcl/inc vcl/opengl vcl/osx vcl/qa vcl/quartz vcl/source vcl/unx vcl/win vcl/workben xmlsecurity/source

Noel Grandin noel at peralex.com
Wed May 20 00:52:56 PDT 2015


 basctl/source/basicide/baside2b.cxx                           |    2 
 basctl/source/basicide/moduldl2.cxx                           |    2 
 canvas/source/directx/dx_textlayout_drawhelper.cxx            |    2 
 canvas/source/vcl/backbuffer.cxx                              |    4 
 canvas/source/vcl/bitmapbackbuffer.cxx                        |   10 
 canvas/source/vcl/canvascustomsprite.cxx                      |    8 
 canvas/source/vcl/canvashelper.cxx                            |   24 
 canvas/source/vcl/impltools.hxx                               |   10 
 canvas/source/vcl/spritecanvashelper.cxx                      |    8 
 canvas/source/vcl/spritedevicehelper.cxx                      |    6 
 chart2/source/controller/main/ChartWindow.cxx                 |   10 
 chart2/source/tools/CharacterProperties.cxx                   |    6 
 cui/source/customize/acccfg.cxx                               |    2 
 cui/source/dialogs/hangulhanjadlg.cxx                         |   41 -
 cui/source/dialogs/hlmarkwn.cxx                               |    2 
 cui/source/dialogs/linkdlg.cxx                                |    2 
 cui/source/options/connpooloptions.cxx                        |    8 
 cui/source/tabpages/autocdlg.cxx                              |    2 
 cui/source/tabpages/numpages.cxx                              |    2 
 dbaccess/source/ui/control/sqledit.cxx                        |    2 
 dbaccess/source/ui/dlg/sqlmessage.cxx                         |    4 
 dbaccess/source/ui/misc/TokenWriter.cxx                       |    2 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx         |    6 
 dbaccess/source/ui/relationdesign/RTableConnection.cxx        |    4 
 dbaccess/source/ui/tabledesign/TEditControl.cxx               |    2 
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx           |    4 
 drawinglayer/source/primitive2d/textlayoutdevice.cxx          |    2 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx    |   16 
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx       |   36 -
 drawinglayer/source/processor2d/vclprocessor2d.cxx            |   72 +-
 editeng/source/editeng/eehtml.cxx                             |    2 
 editeng/source/editeng/impedit.hxx                            |    4 
 editeng/source/items/bulitem.cxx                              |    2 
 editeng/source/items/textitem.cxx                             |    2 
 extensions/source/propctrlr/inspectorhelpwindow.cxx           |    2 
 extensions/source/update/ui/updatecheckui.cxx                 |    8 
 filter/source/graphicfilter/ieps/ieps.cxx                     |    2 
 include/drawinglayer/primitive2d/textlayoutdevice.hxx         |    4 
 include/svx/dlgutil.hxx                                       |    4 
 include/vcl/button.hxx                                        |    6 
 include/vcl/ctrl.hxx                                          |    2 
 include/vcl/fixed.hxx                                         |    2 
 include/vcl/metaact.hxx                                       |    9 
 include/vcl/outdev.hxx                                        |  342 +++++-----
 include/vcl/pdfwriter.hxx                                     |   19 
 include/vcl/print.hxx                                         |   12 
 include/vcl/prntypes.hxx                                      |   60 -
 include/vcl/window.hxx                                        |    2 
 reportdesign/source/core/api/ReportComponent.cxx              |    6 
 sc/source/core/data/docpool.cxx                               |    2 
 sc/source/core/data/stlpool.cxx                               |    2 
 sc/source/core/tool/autoform.cxx                              |    6 
 sc/source/ui/cctrl/checklistmenu.cxx                          |    2 
 sc/source/ui/dbgui/csvgrid.cxx                                |    6 
 sc/source/ui/miscdlgs/autofmt.cxx                             |    2 
 sc/source/ui/sidebar/CellLineStyleValueSet.cxx                |    4 
 sc/source/ui/view/cellsh1.cxx                                 |    2 
 sc/source/ui/view/gridmerg.cxx                                |    4 
 sc/source/ui/view/notemark.cxx                                |    6 
 sc/source/ui/view/output.cxx                                  |   16 
 sc/source/ui/view/output3.cxx                                 |    6 
 sd/source/core/drawdoc4.cxx                                   |    6 
 sd/source/filter/html/htmlattr.cxx                            |    8 
 sd/source/ui/animations/CustomAnimationCreateDialog.cxx       |    2 
 sd/source/ui/animations/CustomAnimationList.cxx               |    2 
 sd/source/ui/dlg/RemoteDialogClientBox.cxx                    |    2 
 sd/source/ui/dlg/animobjs.cxx                                 |    8 
 sd/source/ui/dlg/docprev.cxx                                  |    4 
 sd/source/ui/docshell/docshel4.cxx                            |    6 
 sd/source/ui/func/fuhhconv.cxx                                |    2 
 sd/source/ui/inc/FrameView.hxx                                |   32 
 sd/source/ui/inc/ViewShell.hxx                                |   26 
 sd/source/ui/presenter/PresenterTextView.cxx                  |    2 
 sd/source/ui/slidesorter/controller/SlideSorterController.cxx |   30 
 sd/source/ui/slidesorter/view/SlideSorterView.cxx             |    2 
 sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx        |    6 
 sd/source/ui/tools/PreviewRenderer.cxx                        |   22 
 sd/source/ui/view/DocumentRenderer.cxx                        |   36 -
 sd/source/ui/view/outlview.cxx                                |    4 
 sd/source/ui/view/sdwindow.cxx                                |   12 
 sd/source/ui/view/viewshel.cxx                                |    2 
 sfx2/source/control/recentdocsview.cxx                        |    2 
 sfx2/source/dialog/titledockwin.cxx                           |    2 
 sfx2/source/doc/doctemplates.cxx                              |    8 
 sfx2/source/sidebar/TabItem.cxx                               |    2 
 sfx2/source/sidebar/TitleBar.cxx                              |    4 
 starmath/source/ElementsDockingWindow.cxx                     |    2 
 starmath/source/document.cxx                                  |    6 
 starmath/source/format.cxx                                    |    2 
 svtools/source/brwbox/editbrowsebox.cxx                       |    6 
 svtools/source/config/fontsubstconfig.cxx                     |    6 
 svtools/source/contnr/imivctl.hxx                             |    2 
 svtools/source/contnr/imivctl1.cxx                            |   10 
 svtools/source/contnr/svlbitm.cxx                             |   14 
 svtools/source/contnr/treelistbox.cxx                         |    4 
 svtools/source/control/ctrlbox.cxx                            |    4 
 svtools/source/control/headbar.cxx                            |    6 
 svtools/source/control/roadmap.cxx                            |    2 
 svtools/source/control/tabbar.cxx                             |    4 
 svtools/source/control/toolbarmenu.cxx                        |   10 
 svtools/source/control/valueset.cxx                           |    4 
 svtools/source/dialogs/prnsetup.cxx                           |   52 -
 svtools/source/filter/DocumentToGraphicRenderer.cxx           |    2 
 svtools/source/graphic/grfcache.cxx                           |    8 
 svtools/source/graphic/grfmgr.cxx                             |    4 
 svtools/source/graphic/grfmgr2.cxx                            |    2 
 svtools/source/table/gridtablerenderer.cxx                    |   30 
 svtools/source/toolpanel/toolpaneldrawer.cxx                  |   10 
 svtools/source/toolpanel/toolpaneldrawer.hxx                  |    2 
 svtools/source/uno/treecontrolpeer.cxx                        |    6 
 svx/source/dialog/dialcontrol.cxx                             |    4 
 svx/source/dialog/dlgctrl.cxx                                 |    4 
 svx/source/dialog/svxbmpnumvalueset.cxx                       |    2 
 svx/source/dialog/swframeexample.cxx                          |    2 
 svx/source/fmcomp/gridcell.cxx                                |   34 
 svx/source/form/fmcontrollayout.cxx                           |    2 
 svx/source/sdr/contact/objectcontactofpageview.cxx            |   12 
 svx/source/sdr/overlay/overlaymanager.cxx                     |    6 
 svx/source/sidebar/line/LineWidthValueSet.cxx                 |    6 
 svx/source/sidebar/tools/ValueSetWithTextControl.cxx          |    8 
 svx/source/svdraw/svdetc.cxx                                  |    2 
 svx/source/svdraw/svdmodel.cxx                                |    6 
 svx/source/svdraw/svdotext.cxx                                |    2 
 svx/source/svdraw/svdpagv.cxx                                 |    4 
 svx/source/unodraw/UnoGraphicExporter.cxx                     |    4 
 svx/source/xoutdev/xtabdash.cxx                               |    4 
 svx/source/xoutdev/xtabgrdt.cxx                               |    4 
 svx/source/xoutdev/xtabhtch.cxx                               |    4 
 svx/source/xoutdev/xtablend.cxx                               |    4 
 sw/source/core/doc/DocumentStylePoolManager.cxx               |    6 
 sw/source/core/doc/notxtfrm.cxx                               |   10 
 sw/source/core/layout/paintfrm.cxx                            |   32 
 sw/source/core/txtnode/fntcache.cxx                           |    4 
 sw/source/core/view/pagepreviewlayout.cxx                     |    6 
 sw/source/core/view/vdraw.cxx                                 |    6 
 sw/source/filter/html/htmlform.cxx                            |    2 
 sw/source/filter/html/htmlforw.cxx                            |    2 
 sw/source/ui/config/optpage.cxx                               |    6 
 sw/source/ui/dialog/ascfldlg.cxx                              |    2 
 sw/source/ui/index/cnttab.cxx                                 |    2 
 sw/source/ui/misc/outline.cxx                                 |    2 
 sw/source/ui/table/tautofmt.cxx                               |    4 
 sw/source/uibase/app/docshini.cxx                             |    2 
 sw/source/uibase/config/fontcfg.cxx                           |    2 
 sw/source/uibase/docvw/AnnotationMenuButton.cxx               |    2 
 sw/source/uibase/docvw/edtwin2.cxx                            |    2 
 sw/source/uibase/docvw/srcedtw.cxx                            |    4 
 sw/source/uibase/shells/annotsh.cxx                           |    2 
 sw/source/uibase/shells/drwtxtsh.cxx                          |    2 
 sw/source/uibase/uiview/viewling.cxx                          |    2 
 toolkit/source/awt/vclxgraphics.cxx                           |    2 
 toolkit/source/helper/formpdfexport.cxx                       |   22 
 vcl/generic/glyphs/gcach_layout.cxx                           |   10 
 vcl/generic/print/genpspgraphics.cxx                          |   10 
 vcl/inc/ilstbox.hxx                                           |    2 
 vcl/inc/image.h                                               |    2 
 vcl/inc/outdev.h                                              |   10 
 vcl/inc/salgdi.hxx                                            |    8 
 vcl/inc/sallayout.hxx                                         |    8 
 vcl/inc/salprn.hxx                                            |    4 
 vcl/inc/textlayout.hxx                                        |    2 
 vcl/opengl/x11/salvd.cxx                                      |    2 
 vcl/osx/printaccessoryview.mm                                 |    4 
 vcl/qa/cppunit/complextext.cxx                                |    2 
 vcl/quartz/ctlayout.cxx                                       |   20 
 vcl/source/app/dbggui.cxx                                     |    2 
 vcl/source/app/help.cxx                                       |   12 
 vcl/source/control/button.cxx                                 |   70 +-
 vcl/source/control/combobox.cxx                               |    8 
 vcl/source/control/ctrl.cxx                                   |    2 
 vcl/source/control/fixed.cxx                                  |   56 -
 vcl/source/control/group.cxx                                  |   12 
 vcl/source/control/ilstbox.cxx                                |   32 
 vcl/source/control/imgctrl.cxx                                |    8 
 vcl/source/control/lstbox.cxx                                 |    8 
 vcl/source/control/tabctrl.cxx                                |    6 
 vcl/source/gdi/impgraph.cxx                                   |    4 
 vcl/source/gdi/impimage.cxx                                   |   14 
 vcl/source/gdi/metaact.cxx                                    |   10 
 vcl/source/gdi/pdfwriter.cxx                                  |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                             |   88 +-
 vcl/source/gdi/pdfwriter_impl.hxx                             |    6 
 vcl/source/gdi/pdfwriter_impl2.cxx                            |    8 
 vcl/source/gdi/print.cxx                                      |   18 
 vcl/source/gdi/print3.cxx                                     |   12 
 vcl/source/gdi/salgdilayout.cxx                               |   84 +-
 vcl/source/gdi/sallayout.cxx                                  |   42 -
 vcl/source/gdi/textlayout.cxx                                 |    6 
 vcl/source/gdi/virdev.cxx                                     |    6 
 vcl/source/glyphs/graphite_layout.cxx                         |   22 
 vcl/source/outdev/bitmap.cxx                                  |   44 -
 vcl/source/outdev/font.cxx                                    |   22 
 vcl/source/outdev/gradient.cxx                                |   24 
 vcl/source/outdev/hatch.cxx                                   |   16 
 vcl/source/outdev/line.cxx                                    |    6 
 vcl/source/outdev/outdev.cxx                                  |   20 
 vcl/source/outdev/outdevstate.cxx                             |   52 -
 vcl/source/outdev/polygon.cxx                                 |   12 
 vcl/source/outdev/polyline.cxx                                |   10 
 vcl/source/outdev/rect.cxx                                    |   12 
 vcl/source/outdev/text.cxx                                    |  182 ++---
 vcl/source/outdev/textline.cxx                                |   32 
 vcl/source/outdev/transparent.cxx                             |   38 -
 vcl/source/window/brdwin.cxx                                  |    2 
 vcl/source/window/menu.cxx                                    |   16 
 vcl/source/window/msgbox.cxx                                  |    4 
 vcl/source/window/printdlg.cxx                                |   14 
 vcl/source/window/splitwin.cxx                                |    4 
 vcl/source/window/status.cxx                                  |    4 
 vcl/source/window/toolbox.cxx                                 |   12 
 vcl/source/window/window.cxx                                  |    8 
 vcl/source/window/window2.cxx                                 |    2 
 vcl/unx/generic/gdi/cairotextrender.cxx                       |    2 
 vcl/unx/generic/gdi/salvd.cxx                                 |    2 
 vcl/win/source/gdi/salprn.cxx                                 |   56 -
 vcl/win/source/gdi/salvd.cxx                                  |    2 
 vcl/win/source/gdi/winlayout.cxx                              |   50 -
 vcl/workben/outdevgrind.cxx                                   |    4 
 vcl/workben/svptest.cxx                                       |    2 
 vcl/workben/vcldemo.cxx                                       |    8 
 xmlsecurity/source/dialogs/certificateviewer.cxx              |    2 
 221 files changed, 1436 insertions(+), 1369 deletions(-)

New commits:
commit 4b57be7234ea61aad0a472a56a4f073270933c8e
Author: Noel Grandin <noel at peralex.com>
Date:   Tue May 19 15:15:13 2015 +0200

    convert QUEUE_STATUS constants to scoped enum
    
    Change-Id: I672e3a31c97fad91826dff1446d2d098d3d36150

diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index a313a28..9f381b4 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -87,7 +87,7 @@ private:
     OUString                   maDriver;
     OUString                   maLocation;
     OUString                   maComment;
-    sal_uInt32                 mnStatus;
+    PrintQueueFlags            mnStatus;
     sal_uInt32                 mnJobs;
 
 public:
@@ -99,7 +99,7 @@ public:
     const OUString&            GetDriver() const { return maDriver; }
     const OUString&            GetLocation() const { return maLocation; }
     const OUString&            GetComment() const { return maComment; }
-    sal_uInt32                 GetStatus() const { return mnStatus; }
+    PrintQueueFlags            GetStatus() const { return mnStatus; }
     sal_uInt32                 GetJobs() const { return mnJobs; }
 
     bool operator==( const QueueInfo& rInfo ) const;
diff --git a/include/vcl/prntypes.hxx b/include/vcl/prntypes.hxx
index eee3235..b077117 100644
--- a/include/vcl/prntypes.hxx
+++ b/include/vcl/prntypes.hxx
@@ -22,6 +22,7 @@
 
 #include <tools/solar.h>
 #include <i18nutil/paper.hxx>
+#include <o3tl/typed_flags_set.hxx>
 
 
 // - Duplex Mode -
@@ -38,32 +39,39 @@ enum Orientation { ORIENTATION_PORTRAIT, ORIENTATION_LANDSCAPE };
 
 // - QueueInfo-Types -
 
-
-#define QUEUE_STATUS_READY              ((sal_uLong)0x00000001)
-#define QUEUE_STATUS_PAUSED             ((sal_uLong)0x00000002)
-#define QUEUE_STATUS_PENDING_DELETION   ((sal_uLong)0x00000004)
-#define QUEUE_STATUS_BUSY               ((sal_uLong)0x00000008)
-#define QUEUE_STATUS_INITIALIZING       ((sal_uLong)0x00000010)
-#define QUEUE_STATUS_WAITING            ((sal_uLong)0x00000020)
-#define QUEUE_STATUS_WARMING_UP         ((sal_uLong)0x00000040)
-#define QUEUE_STATUS_PROCESSING         ((sal_uLong)0x00000080)
-#define QUEUE_STATUS_PRINTING           ((sal_uLong)0x00000100)
-#define QUEUE_STATUS_OFFLINE            ((sal_uLong)0x00000200)
-#define QUEUE_STATUS_ERROR              ((sal_uLong)0x00000400)
-#define QUEUE_STATUS_SERVER_UNKNOWN     ((sal_uLong)0x00000800)
-#define QUEUE_STATUS_PAPER_JAM          ((sal_uLong)0x00001000)
-#define QUEUE_STATUS_PAPER_OUT          ((sal_uLong)0x00002000)
-#define QUEUE_STATUS_MANUAL_FEED        ((sal_uLong)0x00004000)
-#define QUEUE_STATUS_PAPER_PROBLEM      ((sal_uLong)0x00008000)
-#define QUEUE_STATUS_IO_ACTIVE          ((sal_uLong)0x00010000)
-#define QUEUE_STATUS_OUTPUT_BIN_FULL    ((sal_uLong)0x00020000)
-#define QUEUE_STATUS_TONER_LOW          ((sal_uLong)0x00040000)
-#define QUEUE_STATUS_NO_TONER           ((sal_uLong)0x00080000)
-#define QUEUE_STATUS_PAGE_PUNT          ((sal_uLong)0x00100000)
-#define QUEUE_STATUS_USER_INTERVENTION  ((sal_uLong)0x00200000)
-#define QUEUE_STATUS_OUT_OF_MEMORY      ((sal_uLong)0x00400000)
-#define QUEUE_STATUS_DOOR_OPEN          ((sal_uLong)0x00800000)
-#define QUEUE_STATUS_POWER_SAVE         ((sal_uLong)0x01000000)
+enum class PrintQueueFlags
+{
+    NONE              = 0x00000000,
+    Ready             = 0x00000001,
+    Paused            = 0x00000002,
+    PendingDeletion   = 0x00000004,
+    Busy              = 0x00000008,
+    Initializing      = 0x00000010,
+    Waiting           = 0x00000020,
+    WarmingUp         = 0x00000040,
+    Processing        = 0x00000080,
+    Printing          = 0x00000100,
+    Offline           = 0x00000200,
+    Error             = 0x00000400,
+    StatusUnknown     = 0x00000800,
+    PaperJam          = 0x00001000,
+    PaperOut          = 0x00002000,
+    ManualFeed        = 0x00004000,
+    PaperProblem      = 0x00008000,
+    IOActive          = 0x00010000,
+    OutputBinFull     = 0x00020000,
+    TonerLow          = 0x00040000,
+    NoToner           = 0x00080000,
+    PagePunt          = 0x00100000,
+    UserIntervention  = 0x00200000,
+    OutOfMemory       = 0x00400000,
+    DoorOpen          = 0x00800000,
+    PowerSave         = 0x01000000,
+};
+namespace o3tl
+{
+    template<> struct typed_flags<PrintQueueFlags> : is_typed_flags<PrintQueueFlags, 0x01ffffff> {};
+}
 
 #define QUEUE_JOBS_DONTKNOW             ((sal_uLong)0xFFFFFFFF)
 
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx
index 957c64e..a4c4431 100644
--- a/svtools/source/dialogs/prnsetup.cxx
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -144,7 +144,7 @@ static OUString ImplPrnDlgAddResString(const OUString& rStr, sal_uInt16 nResId)
 OUString ImplPrnDlgGetStatusText( const QueueInfo& rInfo )
 {
     OUString aStr;
-    sal_uLong nStatus = rInfo.GetStatus();
+    PrintQueueFlags nStatus = rInfo.GetStatus();
 
     // Default-Printer
     if ( !rInfo.GetPrinterName().isEmpty() &&
@@ -152,55 +152,55 @@ OUString ImplPrnDlgGetStatusText( const QueueInfo& rInfo )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_DEFPRINTER );
 
     // Status
-    if ( nStatus & QUEUE_STATUS_READY )
+    if ( nStatus & PrintQueueFlags::Ready )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_READY );
-    if ( nStatus & QUEUE_STATUS_PAUSED )
+    if ( nStatus & PrintQueueFlags::Paused )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PAUSED );
-    if ( nStatus & QUEUE_STATUS_PENDING_DELETION )
+    if ( nStatus & PrintQueueFlags::PendingDeletion )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PENDING );
-    if ( nStatus & QUEUE_STATUS_BUSY )
+    if ( nStatus & PrintQueueFlags::Busy )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_BUSY );
-    if ( nStatus & QUEUE_STATUS_INITIALIZING )
+    if ( nStatus & PrintQueueFlags::Initializing )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_INITIALIZING );
-    if ( nStatus & QUEUE_STATUS_WAITING )
+    if ( nStatus & PrintQueueFlags::Waiting )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_WAITING );
-    if ( nStatus & QUEUE_STATUS_WARMING_UP )
+    if ( nStatus & PrintQueueFlags::WarmingUp )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_WARMING_UP );
-    if ( nStatus & QUEUE_STATUS_PROCESSING )
+    if ( nStatus & PrintQueueFlags::Processing )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PROCESSING );
-    if ( nStatus & QUEUE_STATUS_PRINTING )
+    if ( nStatus & PrintQueueFlags::Printing )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PRINTING );
-    if ( nStatus & QUEUE_STATUS_OFFLINE )
+    if ( nStatus & PrintQueueFlags::Offline )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_OFFLINE );
-    if ( nStatus & QUEUE_STATUS_ERROR )
+    if ( nStatus & PrintQueueFlags::Error )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_ERROR );
-    if ( nStatus & QUEUE_STATUS_SERVER_UNKNOWN )
+    if ( nStatus & PrintQueueFlags::StatusUnknown )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_SERVER_UNKNOWN );
-    if ( nStatus & QUEUE_STATUS_PAPER_JAM )
+    if ( nStatus & PrintQueueFlags::PaperJam )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PAPER_JAM );
-    if ( nStatus & QUEUE_STATUS_PAPER_OUT )
+    if ( nStatus & PrintQueueFlags::PaperOut )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PAPER_OUT );
-    if ( nStatus & QUEUE_STATUS_MANUAL_FEED )
+    if ( nStatus & PrintQueueFlags::ManualFeed )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_MANUAL_FEED );
-    if ( nStatus & QUEUE_STATUS_PAPER_PROBLEM )
+    if ( nStatus & PrintQueueFlags::PaperProblem )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PAPER_PROBLEM );
-    if ( nStatus & QUEUE_STATUS_IO_ACTIVE )
+    if ( nStatus & PrintQueueFlags::IOActive )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_IO_ACTIVE );
-    if ( nStatus & QUEUE_STATUS_OUTPUT_BIN_FULL )
+    if ( nStatus & PrintQueueFlags::OutputBinFull )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_OUTPUT_BIN_FULL );
-    if ( nStatus & QUEUE_STATUS_TONER_LOW )
+    if ( nStatus & PrintQueueFlags::TonerLow )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_TONER_LOW );
-    if ( nStatus & QUEUE_STATUS_NO_TONER )
+    if ( nStatus & PrintQueueFlags::NoToner )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_NO_TONER );
-    if ( nStatus & QUEUE_STATUS_PAGE_PUNT )
+    if ( nStatus & PrintQueueFlags::PagePunt )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_PAGE_PUNT );
-    if ( nStatus & QUEUE_STATUS_USER_INTERVENTION )
+    if ( nStatus & PrintQueueFlags::UserIntervention )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_USER_INTERVENTION );
-    if ( nStatus & QUEUE_STATUS_OUT_OF_MEMORY )
+    if ( nStatus & PrintQueueFlags::OutOfMemory )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_OUT_OF_MEMORY );
-    if ( nStatus & QUEUE_STATUS_DOOR_OPEN )
+    if ( nStatus & PrintQueueFlags::DoorOpen )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_DOOR_OPEN );
-    if ( nStatus & QUEUE_STATUS_POWER_SAVE )
+    if ( nStatus & PrintQueueFlags::PowerSave )
         aStr = ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_POWER_SAVE );
 
     // Anzahl Jobs
diff --git a/vcl/inc/salprn.hxx b/vcl/inc/salprn.hxx
index b7640a4..d3f89dd 100644
--- a/vcl/inc/salprn.hxx
+++ b/vcl/inc/salprn.hxx
@@ -39,8 +39,8 @@ struct VCL_PLUGIN_PUBLIC SalPrinterQueueInfo
     OUString               maDriver;
     OUString               maLocation;
     OUString               maComment;
-    sal_uLong                   mnStatus;
-    sal_uLong                   mnJobs;
+    PrintQueueFlags        mnStatus;
+    sal_uLong              mnJobs;
     OUString*              mpSysData;
 
                             SalPrinterQueueInfo();
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index c861466..b920cea 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -358,7 +358,7 @@ bool Printer::HasMirroredGraphics() const
 // QueueInfo
 QueueInfo::QueueInfo()
 {
-    mnStatus    = 0;
+    mnStatus    = PrintQueueFlags::NONE;
     mnJobs      = 0;
 }
 
@@ -395,7 +395,7 @@ SvStream& WriteQueueInfo( SvStream& rOStream, const QueueInfo& rInfo )
     write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rInfo.maDriver, RTL_TEXTENCODING_UTF8);
     write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rInfo.maLocation, RTL_TEXTENCODING_UTF8);
     write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rInfo.maComment, RTL_TEXTENCODING_UTF8);
-    rOStream.WriteUInt32( rInfo.mnStatus );
+    rOStream.WriteUInt32( static_cast<sal_uInt32>(rInfo.mnStatus) );
     rOStream.WriteUInt32( rInfo.mnJobs );
 
     return rOStream;
@@ -409,7 +409,9 @@ SvStream& ReadQueueInfo( SvStream& rIStream, QueueInfo& rInfo )
     rInfo.maDriver = read_uInt16_lenPrefixed_uInt8s_ToOUString(rIStream, RTL_TEXTENCODING_UTF8);
     rInfo.maLocation = read_uInt16_lenPrefixed_uInt8s_ToOUString(rIStream, RTL_TEXTENCODING_UTF8);
     rInfo.maComment = read_uInt16_lenPrefixed_uInt8s_ToOUString(rIStream, RTL_TEXTENCODING_UTF8);
-    rIStream.ReadUInt32( rInfo.mnStatus );
+    sal_uInt32 nTmp;
+    rIStream.ReadUInt32( nTmp );
+    rInfo.mnStatus = static_cast<PrintQueueFlags>(nTmp);
     rIStream.ReadUInt32( rInfo.mnJobs );
 
     return rIStream;
@@ -417,7 +419,7 @@ SvStream& ReadQueueInfo( SvStream& rIStream, QueueInfo& rInfo )
 
 SalPrinterQueueInfo::SalPrinterQueueInfo()
 {
-    mnStatus    = 0;
+    mnStatus    = PrintQueueFlags::NONE;
     mnJobs      = QUEUE_JOBS_DONTKNOW;
     mpSysData   = NULL;
 }
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index 300d2aa..f6c00be 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -100,59 +100,59 @@ static LPDEVMODEW SAL_DEVMODE_W( const ImplJobSetup* pSetupData )
     return pRet;
 }
 
-static sal_uLong ImplWinQueueStatusToSal( DWORD nWinStatus )
+static PrintQueueFlags ImplWinQueueStatusToSal( DWORD nWinStatus )
 {
-    sal_uLong nStatus = 0;
+    PrintQueueFlags nStatus = PrintQueueFlags::NONE;
     if ( nWinStatus & PRINTER_STATUS_PAUSED )
-        nStatus |= QUEUE_STATUS_PAUSED;
+        nStatus |= PrintQueueFlags::Paused;
     if ( nWinStatus & PRINTER_STATUS_ERROR )
-        nStatus |= QUEUE_STATUS_ERROR;
+        nStatus |= PrintQueueFlags::Error;
     if ( nWinStatus & PRINTER_STATUS_PENDING_DELETION )
-        nStatus |= QUEUE_STATUS_PENDING_DELETION;
+        nStatus |= PrintQueueFlags::PendingDeletion;
     if ( nWinStatus & PRINTER_STATUS_PAPER_JAM )
-        nStatus |= QUEUE_STATUS_PAPER_JAM;
+        nStatus |= PrintQueueFlags::PaperJam;
     if ( nWinStatus & PRINTER_STATUS_PAPER_OUT )
-        nStatus |= QUEUE_STATUS_PAPER_OUT;
+        nStatus |= PrintQueueFlags::PaperOut;
     if ( nWinStatus & PRINTER_STATUS_MANUAL_FEED )
-        nStatus |= QUEUE_STATUS_MANUAL_FEED;
+        nStatus |= PrintQueueFlags::ManualFeed;
     if ( nWinStatus & PRINTER_STATUS_PAPER_PROBLEM )
-        nStatus |= QUEUE_STATUS_PAPER_PROBLEM;
+        nStatus |= PrintQueueFlags::PaperProblem;
     if ( nWinStatus & PRINTER_STATUS_OFFLINE )
-        nStatus |= QUEUE_STATUS_OFFLINE;
+        nStatus |= PrintQueueFlags::Offline;
     if ( nWinStatus & PRINTER_STATUS_IO_ACTIVE )
-        nStatus |= QUEUE_STATUS_IO_ACTIVE;
+        nStatus |= PrintQueueFlags::IOActive;
     if ( nWinStatus & PRINTER_STATUS_BUSY )
-        nStatus |= QUEUE_STATUS_BUSY;
+        nStatus |= PrintQueueFlags::Busy;
     if ( nWinStatus & PRINTER_STATUS_PRINTING )
-        nStatus |= QUEUE_STATUS_PRINTING;
+        nStatus |= PrintQueueFlags::Printing;
     if ( nWinStatus & PRINTER_STATUS_OUTPUT_BIN_FULL )
-        nStatus |= QUEUE_STATUS_OUTPUT_BIN_FULL;
+        nStatus |= PrintQueueFlags::OutputBinFull;
     if ( nWinStatus & PRINTER_STATUS_WAITING )
-        nStatus |= QUEUE_STATUS_WAITING;
+        nStatus |= PrintQueueFlags::Waiting;
     if ( nWinStatus & PRINTER_STATUS_PROCESSING )
-        nStatus |= QUEUE_STATUS_PROCESSING;
+        nStatus |= PrintQueueFlags::Processing;
     if ( nWinStatus & PRINTER_STATUS_INITIALIZING )
-        nStatus |= QUEUE_STATUS_INITIALIZING;
+        nStatus |= PrintQueueFlags::Initializing;
     if ( nWinStatus & PRINTER_STATUS_WARMING_UP )
-        nStatus |= QUEUE_STATUS_WARMING_UP;
+        nStatus |= PrintQueueFlags::WarmingUp;
     if ( nWinStatus & PRINTER_STATUS_TONER_LOW )
-        nStatus |= QUEUE_STATUS_TONER_LOW;
+        nStatus |= PrintQueueFlags::TonerLow;
     if ( nWinStatus & PRINTER_STATUS_NO_TONER )
-        nStatus |= QUEUE_STATUS_NO_TONER;
+        nStatus |= PrintQueueFlags::NoToner;
     if ( nWinStatus & PRINTER_STATUS_PAGE_PUNT )
-        nStatus |= QUEUE_STATUS_PAGE_PUNT;
+        nStatus |= PrintQueueFlags::PagePunt;
     if ( nWinStatus & PRINTER_STATUS_USER_INTERVENTION )
-        nStatus |= QUEUE_STATUS_USER_INTERVENTION;
+        nStatus |= PrintQueueFlags::UserIntervention;
     if ( nWinStatus & PRINTER_STATUS_OUT_OF_MEMORY )
-        nStatus |= QUEUE_STATUS_OUT_OF_MEMORY;
+        nStatus |= PrintQueueFlags::OutOfMemory;
     if ( nWinStatus & PRINTER_STATUS_DOOR_OPEN )
-        nStatus |= QUEUE_STATUS_DOOR_OPEN;
+        nStatus |= PrintQueueFlags::DoorOpen;
     if ( nWinStatus & PRINTER_STATUS_SERVER_UNKNOWN )
-        nStatus |= QUEUE_STATUS_SERVER_UNKNOWN;
+        nStatus |= PrintQueueFlags::StatusUnknown;
     if ( nWinStatus & PRINTER_STATUS_POWER_SAVE )
-        nStatus |= QUEUE_STATUS_POWER_SAVE;
+        nStatus |= PrintQueueFlags::PowerSave;
     if ( !nStatus && !(nWinStatus & PRINTER_STATUS_NOT_AVAILABLE) )
-        nStatus |= QUEUE_STATUS_READY;
+        nStatus |= PrintQueueFlags::Ready;
     return nStatus;
 }
 
commit 23b439a664549e1b43347bc625c267fa3c4f4d3b
Author: Noel Grandin <noel at peralex.com>
Date:   Tue May 19 14:37:07 2015 +0200

    convert DEFAULTCONSTANT constant to scoped enum
    
    Change-Id: I5ebd77edfa29d6c6c7acea37e826ef1d625916c3

diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 9b5aa20..fe617dd 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1236,7 +1236,7 @@ void EditorWindow::ImplSetFont()
     {
         vcl::Font aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED,
                                                         Application::GetSettings().GetUILanguageTag().getLanguageType(),
-                                                        0 , this));
+                                                        GetDefaultFontFlags::NONE, this));
         sFontName = aTmpFont.GetName();
     }
     Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get());
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index 4fc88a2..6370f29 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -407,11 +407,11 @@ void CharacterProperties::AddDefaultsToMap(
     using namespace ::com::sun::star::i18n::ScriptType;
     LanguageType nLang;
     nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale, false), LATIN);
-    vcl::Font aFont = OutputDevice::GetDefaultFont( DefaultFontType::LATIN_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 );
+    vcl::Font aFont = OutputDevice::GetDefaultFont( DefaultFontType::LATIN_SPREADSHEET, nLang, GetDefaultFontFlags::OnlyOne, 0 );
     nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale_CJK, false), ASIAN);
-    vcl::Font aFontCJK = OutputDevice::GetDefaultFont( DefaultFontType::CJK_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 );
+    vcl::Font aFontCJK = OutputDevice::GetDefaultFont( DefaultFontType::CJK_SPREADSHEET, nLang, GetDefaultFontFlags::OnlyOne, 0 );
     nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale_CTL, false), COMPLEX);
-    vcl::Font aFontCTL = OutputDevice::GetDefaultFont( DefaultFontType::CTL_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 );
+    vcl::Font aFontCTL = OutputDevice::GetDefaultFont( DefaultFontType::CTL_SPREADSHEET, nLang, GetDefaultFontFlags::OnlyOne, 0 );
 
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_NAME, OUString( aFont.GetName() ) );
     ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_STYLE_NAME, OUString(aFont.GetStyleName()) );
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 7b2698f..09f6226 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2058,7 +2058,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn )
     // start character selection dialog
     ScopedVclPtrInstance< SvxCharacterMap > pMap( this, true );
     pMap->SetCharFont( OutputDevice::GetDefaultFont(DefaultFontType::LATIN_TEXT,
-                        LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE, 0 ));
+                        LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne, 0 ));
     pMap->SetText(nMode < SGL_END ? m_sStartQuoteDlg  : m_sEndQuoteDlg );
     sal_UCS4 cDlg;
     SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 0a3f789..86930e2 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2518,7 +2518,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectan
         // the whole height mustn't be used for a single level
         sal_uInt16 nYStep = sal::static_int_cast<sal_uInt16>((aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5));
 
-        aStdFont = OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE);
+        aStdFont = OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne);
         aStdFont.SetColor(aTextColor);
         aStdFont.SetFillColor(aBackColor);
 
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index c1b1580..9384046 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -237,7 +237,7 @@ void OSqlEdit::ImplSetFont()
         get_value_or( OUString() ) );
     if ( sFontName.isEmpty() )
     {
-        vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DefaultFontType::FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), 0 , this ) );
+        vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DefaultFontType::FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), GetDefaultFontFlags::NONE, this ) );
         sFontName = aTmpFont.GetName();
     }
     Size aFontSize(
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index f2f39c8..6d670c3e 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -323,7 +323,7 @@ void ODatabaseImportExport::initialize()
         vcl::Font aApplicationFont = OutputDevice::GetDefaultFont(
             DefaultFontType::SANS_UNICODE,
             Application::GetSettings().GetUILanguageTag().getLanguageType(),
-            DEFAULTFONT_FLAGS_ONLYONE
+            GetDefaultFontFlags::OnlyOne
         );
         m_aFont = VCLUnoHelper::CreateFontDescriptor( aApplicationFont );
     }
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 74006ea..4cddc7d 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -133,7 +133,7 @@ OSelectionBrowseBox::OSelectionBrowseBox( vcl::Window* pParent )
     // switch off triState of ::com::sun::star::form::CheckBox
     m_pVisibleCell->GetBox().EnableTriState( false );
 
-    vcl::Font aTitleFont = OutputDevice::GetDefaultFont( DefaultFontType::SANS_UNICODE,Window::GetSettings().GetLanguageTag().getLanguageType(),DEFAULTFONT_FLAGS_ONLYONE);
+    vcl::Font aTitleFont = OutputDevice::GetDefaultFont( DefaultFontType::SANS_UNICODE,Window::GetSettings().GetLanguageTag().getLanguageType(),GetDefaultFontFlags::OnlyOne);
     aTitleFont.SetSize(Size(0, 6));
     SetTitleFont(aTitleFont);
 
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index bf4fae4..70f3f2c 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -652,7 +652,7 @@ void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel )
     // Choose a proportional Font for Pre
     if ( nHLevel == STYLE_PRE )
     {
-        vcl::Font aFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_SYSTEM, 0 );
+        vcl::Font aFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_SYSTEM, GetDefaultFontFlags::NONE );
         SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO );
         aItems.Put( aFontItem );
 
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index 006d6f2..d35a20e 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -203,7 +203,7 @@ SfxPoolItem* SvxBulletItem::Create( SvStream& rStrm, sal_uInt16 /*nVersion*/ ) c
 
 void SvxBulletItem::SetDefaultFont_Impl()
 {
-    aFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_SYSTEM, 0 );
+    aFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_SYSTEM, GetDefaultFontFlags::NONE );
     aFont.SetAlign( ALIGN_BOTTOM);
     aFont.SetTransparent( true );
 }
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 629eec4..5014003 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -3521,7 +3521,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo
     {
         vcl::Font aFont( OutputDevice::GetDefaultFont( aOutTypeArr[ n ].nFontType,
                                                   aOutTypeArr[ n ].nLanguage,
-                                                  DEFAULTFONT_FLAGS_ONLYONE, 0 ) );
+                                                  GetDefaultFontFlags::OnlyOne, 0 ) );
         SvxFontItem* pItem = aItemArr[ n ];
         pItem->SetFamily( aFont.GetFamily() );
         pItem->SetFamilyName( aFont.GetName() );
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index f9586ca..27cee53 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -278,7 +278,16 @@ namespace o3tl
     template<> struct typed_flags<AddFontSubstituteFlags> : is_typed_flags<AddFontSubstituteFlags, 0x03> {};
 }
 
-#define DEFAULTFONT_FLAGS_ONLYONE       ((sal_uLong)0x00000001)
+// GetDefaultFont() flags
+enum GetDefaultFontFlags
+{
+    NONE          = 0x0000,
+    OnlyOne       = 0x0001,
+};
+namespace o3tl
+{
+    template<> struct typed_flags<GetDefaultFontFlags> : is_typed_flags<GetDefaultFontFlags, 0x01> {};
+}
 
 enum OutDevType { OUTDEV_DONTKNOW, OUTDEV_WINDOW, OUTDEV_PRINTER, OUTDEV_VIRDEV };
 
@@ -1273,7 +1282,7 @@ public:
 
     static vcl::Font            GetDefaultFont( DefaultFontType nType,
                                                 LanguageType eLang,
-                                                sal_uLong nFlags,
+                                                GetDefaultFontFlags nFlags,
                                                 const OutputDevice* pOutDev = NULL );
 
     SAL_DLLPRIVATE void         ImplInitFontList() const;
diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx
index 2d73e15..9bc9fd2 100644
--- a/reportdesign/source/core/api/ReportComponent.cxx
+++ b/reportdesign/source/core/api/ReportComponent.cxx
@@ -55,9 +55,9 @@ void lcl_getDefaultFonts( vcl::Font& rLatinFont, vcl::Font& rCJKFont, vcl::Font&
         if (MsLangId::isKorean(eUiLanguage))
             eLatin = eUiLanguage;
 
-        rLatinFont = OutputDevice::GetDefaultFont( DefaultFontType::LATIN_PRESENTATION, eLatin, DEFAULTFONT_FLAGS_ONLYONE );
-        rCJKFont = OutputDevice::GetDefaultFont( DefaultFontType::CJK_PRESENTATION, _eCJK, DEFAULTFONT_FLAGS_ONLYONE );
-        rCTLFont = OutputDevice::GetDefaultFont( DefaultFontType::CTL_PRESENTATION, _eCTL, DEFAULTFONT_FLAGS_ONLYONE ) ;
+        rLatinFont = OutputDevice::GetDefaultFont( DefaultFontType::LATIN_PRESENTATION, eLatin, GetDefaultFontFlags::OnlyOne );
+        rCJKFont = OutputDevice::GetDefaultFont( DefaultFontType::CJK_PRESENTATION, _eCJK, GetDefaultFontFlags::OnlyOne );
+        rCTLFont = OutputDevice::GetDefaultFont( DefaultFontType::CTL_PRESENTATION, _eCTL, GetDefaultFontFlags::OnlyOne ) ;
 }
 OFormatProperties::OFormatProperties()
     :nAlign(style::ParagraphAdjust_LEFT)
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 0588f1f..41b15ef 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -197,7 +197,7 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool)
 {
     //  latin font from GetDefaultFonts is not used, DEFAULTFONT_LATIN_SPREADSHEET instead
     vcl::Font aStdFont = OutputDevice::GetDefaultFont( DefaultFontType::LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US,
-                                                    DEFAULTFONT_FLAGS_ONLYONE );
+                                                    GetDefaultFontFlags::OnlyOne );
     SvxFontItem* pStdFont = new SvxFontItem( aStdFont.GetFamily(),
                                             aStdFont.GetName(), aStdFont.GetStyleName(),
                                             aStdFont.GetPitch(), aStdFont.GetCharSet(),
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index abd00b5..996a35a 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -201,7 +201,7 @@ static void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, DefaultFontType
 {
     if ( eLang != LANGUAGE_NONE && eLang != LANGUAGE_DONTKNOW && eLang != LANGUAGE_SYSTEM )
     {
-        vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, DEFAULTFONT_FLAGS_ONLYONE );
+        vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, GetDefaultFontFlags::OnlyOne );
         SvxFontItem aNewItem( aDefFont.GetFamily(), aDefFont.GetName(), aDefFont.GetStyleName(),
                               aDefFont.GetPitch(), aDefFont.GetCharSet(), nItemId );
         if ( aNewItem != rSet.Get( nItemId ) )
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 3878350..522e955 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -822,19 +822,19 @@ ScAutoFormat::ScAutoFormat() :
 
     //  default font, default height
     vcl::Font aStdFont = OutputDevice::GetDefaultFont(
-        DefaultFontType::LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE );
+        DefaultFontType::LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne );
     SvxFontItem aFontItem(
         aStdFont.GetFamily(), aStdFont.GetName(), aStdFont.GetStyleName(),
         aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_FONT );
 
     aStdFont = OutputDevice::GetDefaultFont(
-        DefaultFontType::CJK_SPREADSHEET, LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE );
+        DefaultFontType::CJK_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne );
     SvxFontItem aCJKFontItem(
         aStdFont.GetFamily(), aStdFont.GetName(), aStdFont.GetStyleName(),
         aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_CJK_FONT );
 
     aStdFont = OutputDevice::GetDefaultFont(
-        DefaultFontType::CTL_SPREADSHEET, LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE );
+        DefaultFontType::CTL_SPREADSHEET, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne );
     SvxFontItem aCTLFontItem(
         aStdFont.GetFamily(), aStdFont.GetName(), aStdFont.GetStyleName(),
         aStdFont.GetPitch(), aStdFont.GetCharSet(), ATTR_CTL_FONT );
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index a5c31e4..7d61724 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -226,7 +226,7 @@ void ScCsvGrid::InitColors()
 
 void ScCsvGrid::InitFonts()
 {
-    maMonoFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_ENGLISH_US, 0 );
+    maMonoFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::NONE );
     maMonoFont.SetSize( Size( maMonoFont.GetSize().Width(), maHeaderFont.GetSize().Height() ) );
 
     /* *** Set edit engine defaults ***
diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
index 81a33e9..b0da0a8 100644
--- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
@@ -80,7 +80,7 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt )
     Color aOldColor = pDev->GetLineColor();
     Color aOldFillColor = pDev->GetFillColor();
 
-    vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE));
+    vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne));
     Size aSize = aFont.GetSize();
     aSize.Height() = nRectHeight*3/5;
     aFont.SetSize( aSize );
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 32236d9..1b81de7 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1764,7 +1764,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 
                                 vcl::Font aTargetFont = OutputDevice::GetDefaultFont(
                                                     DefaultFontType::CJK_SPREADSHEET,
-                                                    eTargetLang, DEFAULTFONT_FLAGS_ONLYONE );
+                                                    eTargetLang, GetDefaultFontFlags::OnlyOne );
                                 ScConversionParam aConvParam( SC_CONVERSION_CHINESE_TRANSL,
                                     eSourceLang, eTargetLang, aTargetFont, nOptions, false );
                                 pTabViewShell->DoSheetConversion( aConvParam );
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index c6dcbde..2b26fda 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -1298,9 +1298,9 @@ void SdDrawDocument::getDefaultFonts( vcl::Font& rLatinFont, vcl::Font& rCJKFont
     if (MsLangId::isKorean(eUiLanguage))
         eLatin = eUiLanguage;
 
-    rLatinFont = OutputDevice::GetDefaultFont( DefaultFontType::LATIN_PRESENTATION, eLatin, DEFAULTFONT_FLAGS_ONLYONE );
-    rCJKFont = OutputDevice::GetDefaultFont( DefaultFontType::CJK_PRESENTATION, GetLanguage( EE_CHAR_LANGUAGE_CJK ), DEFAULTFONT_FLAGS_ONLYONE );
-    rCTLFont = OutputDevice::GetDefaultFont( DefaultFontType::CTL_PRESENTATION, GetLanguage( EE_CHAR_LANGUAGE_CTL ), DEFAULTFONT_FLAGS_ONLYONE ) ;
+    rLatinFont = OutputDevice::GetDefaultFont( DefaultFontType::LATIN_PRESENTATION, eLatin, GetDefaultFontFlags::OnlyOne );
+    rCJKFont = OutputDevice::GetDefaultFont( DefaultFontType::CJK_PRESENTATION, GetLanguage( EE_CHAR_LANGUAGE_CJK ), GetDefaultFontFlags::OnlyOne );
+    rCTLFont = OutputDevice::GetDefaultFont( DefaultFontType::CTL_PRESENTATION, GetLanguage( EE_CHAR_LANGUAGE_CTL ), GetDefaultFontFlags::OnlyOne ) ;
 }
 
 /* converts the given western font height to a corresponding ctl font height, depending on the system language */
diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx
index ad5fd9b..a833194 100644
--- a/sd/source/ui/func/fuhhconv.cxx
+++ b/sd/source/ui/func/fuhhconv.cxx
@@ -243,7 +243,7 @@ void FuHangulHanjaConversion::StartChineseConversion()
 
                     vcl::Font aTargetFont = OutputDevice::GetDefaultFont(
                                         DefaultFontType::CJK_PRESENTATION,
-                                        nTargetLang, DEFAULTFONT_FLAGS_ONLYONE );
+                                        nTargetLang, GetDefaultFontFlags::OnlyOne );
 
                     StartConversion( nSourceLang, nTargetLang, &aTargetFont, nOptions, false );
                     ConvertStyles( nTargetLang, &aTargetFont );
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index 4439d73..c8d9c36 100644
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -309,7 +309,7 @@ EditEngine* PresenterTextView::Implementation::CreateEditEngine()
             LanguageType nLang = (LANGUAGE_NONE == rFntDta.nLang) ?
                 rFntDta.nFallbackLang : rFntDta.nLang;
             vcl::Font aFont = OutputDevice::GetDefaultFont(
-                rFntDta.nFontType, nLang, DEFAULTFONT_FLAGS_ONLYONE);
+                rFntDta.nFontType, nLang, GetDefaultFontFlags::OnlyOne);
             mpEditEngineItemPool->SetPoolDefaultItem(
                 SvxFontItem(
                     aFont.GetFamily(),
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 15f462e..277d262 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -138,7 +138,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
         | tools::EventMultiplexerEvent::EID_PAGE_ORDER);
 
     LanguageType eLang = mrOutliner.GetDefaultLanguage();
-    maPageNumberFont = OutputDevice::GetDefaultFont( DefaultFontType::SANS_UNICODE, eLang, 0 );
+    maPageNumberFont = OutputDevice::GetDefaultFont( DefaultFontType::SANS_UNICODE, eLang, GetDefaultFontFlags::NONE );
     maPageNumberFont.SetHeight( 500 );
 
     maBulletFont.SetColor( COL_AUTO );
@@ -1720,7 +1720,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo)
             LanguageType eLang = rEditEngine.GetDefaultLanguage();
 
             Point aTextPos( aImagePos.X() - aOffset.Width(), pInfo->mrStartPos.Y() );
-            vcl::Font aNewFont( OutputDevice::GetDefaultFont( DefaultFontType::SANS_UNICODE, eLang, 0 ) );
+            vcl::Font aNewFont( OutputDevice::GetDefaultFont( DefaultFontType::SANS_UNICODE, eLang, GetDefaultFontFlags::NONE ) );
             aNewFont.SetSize( aFontSz );
             aNewFont.SetVertical( bVertical );
             aNewFont.SetOrientation( bVertical ? 2700 : 0 );
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index ff46474..26e95ad 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -337,7 +337,7 @@ void SetEditEngineDefaultFonts(SfxItemPool &rEditEngineItemPool)
             LanguageType nLang = (LANGUAGE_NONE == rFntDta.nLang) ?
                     rFntDta.nFallbackLang : rFntDta.nLang;
             vcl::Font aFont = OutputDevice::GetDefaultFont(
-                        rFntDta.nFontType, nLang, DEFAULTFONT_FLAGS_ONLYONE );
+                        rFntDta.nFontType, nLang, GetDefaultFontFlags::OnlyOne );
             rEditEngineItemPool.SetPoolDefaultItem(
                     SvxFontItem( aFont.GetFamily(), aFont.GetName(),
                         aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(),
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
index 870a828..9422282 100644
--- a/starmath/source/format.cxx
+++ b/starmath/source/format.cxx
@@ -89,7 +89,7 @@ OUString GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent )
 
         return OutputDevice::GetDefaultFont(
                         pTable[ nIdent ], nLang,
-                        DEFAULTFONT_FLAGS_ONLYONE ).GetName();
+                        GetDefaultFontFlags::OnlyOne ).GetName();
     }
 }
 
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx
index 8c31849..c8459b0 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -429,7 +429,7 @@ void DialControl::Init( const Size& rWinSize )
     vcl::Font aDefaultSize = GetFont();
 
     vcl::Font aFont( OutputDevice::GetDefaultFont(
-        DefaultFontType::UI_SANS, Application::GetSettings().GetUILanguageTag().getLanguageType(), DEFAULTFONT_FLAGS_ONLYONE ) );
+        DefaultFontType::UI_SANS, Application::GetSettings().GetUILanguageTag().getLanguageType(), GetDefaultFontFlags::OnlyOne ) );
 
     aFont.SetHeight(aDefaultSize.GetHeight());
     Init( rWinSize, aFont );
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 4ad4d87..e392e7a 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -156,7 +156,7 @@ void  SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
     Color aOldColor = pDev->GetLineColor();
     pDev->SetLineColor(aTextColor);
     vcl::Font aFont(OutputDevice::GetDefaultFont(
-                DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE));
+                DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne));
 
     Size aSize = aFont.GetSize();
 
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index e316381..f4dfca8 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -168,7 +168,7 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext)
     {
         vcl::Font aFont = OutputDevice::GetDefaultFont(
                                 DefaultFontType::LATIN_TEXT, Application::GetSettings().GetLanguageTag().getLanguageType(),
-                                DEFAULTFONT_FLAGS_ONLYONE, this );
+                                GetDefaultFontFlags::OnlyOne, this );
         aFont.SetColor( m_aTxtCol );
         aFont.SetFillColor( m_aBgCol );
         aFont.SetWeight(WEIGHT_NORMAL);
diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx
index 661b481..fecbb23 100644
--- a/svx/source/form/fmcontrollayout.cxx
+++ b/svx/source/form/fmcontrollayout.cxx
@@ -184,7 +184,7 @@ namespace svxform
                 }
 
                 // retrieve a default font for this locale, and set it at the control
-                vcl::Font aFont = OutputDevice::GetDefaultFont( DefaultFontType::SANS, LanguageTag::convertToLanguageType( aDocumentCharLocale ), DEFAULTFONT_FLAGS_ONLYONE );
+                vcl::Font aFont = OutputDevice::GetDefaultFont( DefaultFontType::SANS, LanguageTag::convertToLanguageType( aDocumentCharLocale ), GetDefaultFontFlags::OnlyOne );
                 FontDescriptor aFontDesc = VCLUnoHelper::CreateFontDescriptor( aFont );
                 _rxModel->setPropertyValue(
                     OUString( "FontDescriptor" ),
diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx
index 85b5969..db4fe23 100644
--- a/svx/source/sidebar/line/LineWidthValueSet.cxx
+++ b/svx/source/sidebar/line/LineWidthValueSet.cxx
@@ -116,7 +116,7 @@ void  LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt )
     Color aOldColor = pDev->GetLineColor();
     Color aOldFillColor = pDev->GetFillColor();
 
-    vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE));
+    vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne));
     Size aSize = aFont.GetSize();
     aSize.Height() = nRectHeight*3/5;
     aFont.SetSize( aSize );
diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index 889c837..1b47ccd 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -153,7 +153,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt )
     const long nRectHeight = aRect.GetHeight();
     const Point aBLPos = aRect.TopLeft();
 
-    vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE));
+    vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne));
     {
         Size aSize = aFont.GetSize();
         aSize.Height() = (nRectHeight*4)/9;
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index f6f7662..7f04c4a 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -386,7 +386,7 @@ bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
 }
 
 SdrEngineDefaults::SdrEngineDefaults():
-    aFontName( OutputDevice::GetDefaultFont( DefaultFontType::SERIF, LANGUAGE_SYSTEM, DEFAULTFONT_FLAGS_ONLYONE ).GetName() ),
+    aFontName( OutputDevice::GetDefaultFont( DefaultFontType::SERIF, LANGUAGE_SYSTEM, GetDefaultFontFlags::OnlyOne ).GetName() ),
     eFontFamily(FAMILY_ROMAN),
     aFontColor(COL_AUTO),
     nFontHeight(847),             // 847/100mm = ca. 24 Point
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 5880008..47c3c21 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -717,7 +717,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt
     sal_uInt16 nLanguage(Application::GetSettings().GetLanguageTag().getLanguageType());
 
     // get DEFAULTFONT_LATIN_TEXT and set at pool as dynamic default
-    vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::LATIN_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0));
+    vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::LATIN_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne, 0));
     aSvxFontItem.SetFamily(aFont.GetFamily());
     aSvxFontItem.SetFamilyName(aFont.GetName());
     aSvxFontItem.SetStyleName(OUString());
@@ -726,7 +726,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt
     pItemPool->SetPoolDefaultItem(aSvxFontItem);
 
     // get DEFAULTFONT_CJK_TEXT and set at pool as dynamic default
-    vcl::Font aFontCJK(OutputDevice::GetDefaultFont(DefaultFontType::CJK_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0));
+    vcl::Font aFontCJK(OutputDevice::GetDefaultFont(DefaultFontType::CJK_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne, 0));
     aSvxFontItemCJK.SetFamily( aFontCJK.GetFamily());
     aSvxFontItemCJK.SetFamilyName(aFontCJK.GetName());
     aSvxFontItemCJK.SetStyleName(OUString());
@@ -735,7 +735,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt
     pItemPool->SetPoolDefaultItem(aSvxFontItemCJK);
 
     // get DEFAULTFONT_CTL_TEXT and set at pool as dynamic default
-    vcl::Font aFontCTL(OutputDevice::GetDefaultFont(DefaultFontType::CTL_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0));
+    vcl::Font aFontCTL(OutputDevice::GetDefaultFont(DefaultFontType::CTL_TEXT, nLanguage, GetDefaultFontFlags::OnlyOne, 0));
     aSvxFontItemCTL.SetFamily(aFontCTL.GetFamily());
     aSvxFontItemCTL.SetFamilyName(aFontCTL.GetName());
     aSvxFontItemCTL.SetStyleName(OUString());
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index ac66106..47696fd 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -896,7 +896,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS
             pMtf->Pause(true);
 
         vcl::Font aFontMerk(pOut->GetFont());
-        vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DefaultFontType::SERIF, LANGUAGE_SYSTEM, DEFAULTFONT_FLAGS_ONLYONE ) );
+        vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DefaultFontType::SERIF, LANGUAGE_SYSTEM, GetDefaultFontFlags::OnlyOne ) );
 
         aTmpFont.SetSize(Size(0,100));
         pOut->SetFont(aTmpFont);
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index d6c10ff..b9403e8 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -117,7 +117,7 @@ namespace
             sal_uInt16 nLng = static_cast<const SvxLanguageItem&>(rSet.GetPool()->GetDefaultItem(
                                 aArr[n].nResLngId )).GetLanguage();
             vcl::Font aFnt( OutputDevice::GetDefaultFont( nFntType,
-                                    nLng, DEFAULTFONT_FLAGS_ONLYONE ) );
+                                    nLng, GetDefaultFontFlags::OnlyOne ) );
 
             rSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(),
                                 OUString(), aFnt.GetPitch(),
@@ -146,7 +146,7 @@ namespace
             sal_uInt16 nLng = static_cast<const SvxLanguageItem&>(rSet.GetPool()->GetDefaultItem(
                                 aArr[n].nResLngId )).GetLanguage();
             vcl::Font aFnt( OutputDevice::GetDefaultFont( aArr[n].nFntType,
-                                    nLng, DEFAULTFONT_FLAGS_ONLYONE ) );
+                                    nLng, GetDefaultFontFlags::OnlyOne ) );
 
             rSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(),
                                 OUString(), aFnt.GetPitch(),
@@ -455,7 +455,7 @@ SwTxtFmtColl* DocumentStylePoolManager::GetTxtCollFromPool( sal_uInt16 nId, bool
                         nLng = aLangs[i];
 
                     vcl::Font aFnt( OutputDevice::GetDefaultFont( nFontTypes[i],
-                                            nLng, DEFAULTFONT_FLAGS_ONLYONE ) );
+                                            nLng, GetDefaultFontFlags::OnlyOne ) );
 
                     aSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(),
                                             OUString(), aFnt.GetPitch(),
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index c99dd5f..13469b15 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -611,7 +611,7 @@ static void lcl_html_setFixedFontProperty(
 {
     vcl::Font aFixedFont( OutputDevice::GetDefaultFont(
                                     DefaultFontType::FIXED, LANGUAGE_ENGLISH_US,
-                                    DEFAULTFONT_FLAGS_ONLYONE )  );
+                                    GetDefaultFontFlags::OnlyOne )  );
     Any aTmp;
     aTmp <<= OUString( aFixedFont.GetName() );
     rPropSet->setPropertyValue("FontName", aTmp );
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index add3ced..6ae81f7 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -1077,7 +1077,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
             {
                 vcl::Font aFixedFont( OutputDevice::GetDefaultFont(
                                     DefaultFontType::FIXED, LANGUAGE_ENGLISH_US,
-                                    DEFAULTFONT_FLAGS_ONLYONE ) );
+                                    GetDefaultFontFlags::OnlyOne ) );
                 OUString aFName( *static_cast<OUString const *>(aTmp.getValue()) );
                 if( !bEdit || aFName != aFixedFont.GetName() )
                 {
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 47bfd67..271a91b 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -2314,11 +2314,11 @@ void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin)
     SvxFont&            rCTLFont = rExampleWin.GetCTLFont();
 
     vcl::Font           aFont( OutputDevice::GetDefaultFont( DefaultFontType::SERIF, eLangType,
-                                                        DEFAULTFONT_FLAGS_ONLYONE, &rExampleWin ) );
+                                                        GetDefaultFontFlags::OnlyOne, &rExampleWin ) );
     vcl::Font           aCJKFont( OutputDevice::GetDefaultFont( DefaultFontType::CJK_TEXT, eLangType,
-                                                        DEFAULTFONT_FLAGS_ONLYONE, &rExampleWin ) );
+                                                        GetDefaultFontFlags::OnlyOne, &rExampleWin ) );
     vcl::Font           aCTLFont( OutputDevice::GetDefaultFont( DefaultFontType::CTL_TEXT, eLangType,
-                                                        DEFAULTFONT_FLAGS_ONLYONE, &rExampleWin ) );
+                                                        GetDefaultFontFlags::OnlyOne, &rExampleWin ) );
     const Size          aDefSize( 0, 12 );
     aFont.SetSize( aDefSize );
     aCJKFont.SetSize( aDefSize );
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 588e190..85e040c 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -204,7 +204,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh,
             if( aOpt.GetFontName().isEmpty() )
             {
                 LanguageType eLang = aOpt.GetLanguage();
-                vcl::Font aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED, eLang, DEFAULTFONT_FLAGS_ONLYONE, pPrt));
+                vcl::Font aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED, eLang, GetDefaultFontFlags::OnlyOne, pPrt));
                 aOpt.SetFontName(aTmpFont.GetName());
             }
 
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index b19993f..3b58a69 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -948,7 +948,7 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle
         const long nYStep = (aSize.Height() - 6)/ MAXLEVEL;
         long nYStart = 4;
         aStdFont = OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, GetAppLanguage(),
-                                                DEFAULTFONT_FLAGS_ONLYONE, &rRenderContext);
+                                                GetDefaultFontFlags::OnlyOne, &rRenderContext);
         // #101524# OJ
         aStdFont.SetColor(SwViewOption::GetFontColor());
 
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index 7ea0063..dcd203d 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -206,7 +206,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
                 vcl::Font aLangDefFont = OutputDevice::GetDefaultFont(
                     nFontTypes[i],
                     eLanguage,
-                    DEFAULTFONT_FLAGS_ONLYONE );
+                    GetDefaultFontFlags::OnlyOne );
                 pFontItem.reset(new SvxFontItem(aLangDefFont.GetFamily(), aLangDefFont.GetName(),
                                                 aEmptyOUStr, aLangDefFont.GetPitch(), aLangDefFont.GetCharSet(), nFontWhich));
             }
diff --git a/sw/source/uibase/config/fontcfg.cxx b/sw/source/uibase/config/fontcfg.cxx
index 949b43b..7511424 100644
--- a/sw/source/uibase/config/fontcfg.cxx
+++ b/sw/source/uibase/config/fontcfg.cxx
@@ -253,7 +253,7 @@ OUString  SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLan
         default:
             nFontId = DefaultFontType::LATIN_TEXT;
     }
-    vcl::Font aFont = OutputDevice::GetDefaultFont(nFontId, eLang, DEFAULTFONT_FLAGS_ONLYONE);
+    vcl::Font aFont = OutputDevice::GetDefaultFont(nFontId, eLang, GetDefaultFontFlags::OnlyOne);
     return  aFont.GetName();
 }
 
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 012f34b..9687605 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -964,11 +964,11 @@ void SwSrcEditWindow::SetFont()
         if(lcl_GetLanguagesForEncoding(eSourceEncoding, aLanguages))
         {
             //TODO: check for multiple languages
-            aFont = OutputDevice::GetDefaultFont(DefaultFontType::FIXED, aLanguages[0], 0, this);
+            aFont = OutputDevice::GetDefaultFont(DefaultFontType::FIXED, aLanguages[0], GetDefaultFontFlags::NONE, this);
         }
         else
             aFont = OutputDevice::GetDefaultFont(DefaultFontType::SANS_UNICODE,
-                        Application::GetSettings().GetLanguageTag().getLanguageType(), 0, this);
+                        Application::GetSettings().GetLanguageTag().getLanguageType(), GetDefaultFontFlags::NONE, this);
         sFontName = aFont.GetName();
     }
     const SvxFontListItem* pFontListItem =
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 7a4f003..3b6c4e6 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -1285,7 +1285,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
                                     nOptions = nOptions | i18n::TextConversionOption::CHARACTER_BY_CHARACTER;
 
                                 vcl::Font aTargetFont = OutputDevice::GetDefaultFont( DefaultFontType::CJK_TEXT,
-                                            nTargetLang, DEFAULTFONT_FLAGS_ONLYONE );
+                                            nTargetLang, GetDefaultFontFlags::OnlyOne );
 
                                 pOLV->StartTextConversion( nSourceLang, nTargetLang, &aTargetFont, nOptions, false, false );
                             }
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index cb11915..e081614 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -359,7 +359,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
                     if(!bCommonTerms)
                         nOptions = nOptions | i18n::TextConversionOption::CHARACTER_BY_CHARACTER;
 
-                    vcl::Font aTargetFont = OutputDevice::GetDefaultFont(DefaultFontType::CJK_TEXT, nTargetLang, DEFAULTFONT_FLAGS_ONLYONE);
+                    vcl::Font aTargetFont = OutputDevice::GetDefaultFont(DefaultFontType::CJK_TEXT, nTargetLang, GetDefaultFontFlags::OnlyOne);
 
                     pOutlinerView->StartTextConversion(nSourceLang, nTargetLang, &aTargetFont, nOptions, false, false);
                 }
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index a86d367..4ae22cd 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -165,7 +165,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
                                 nOptions = nOptions | i18n::TextConversionOption::CHARACTER_BY_CHARACTER;
 
                             vcl::Font aTargetFont = OutputDevice::GetDefaultFont( DefaultFontType::CJK_TEXT,
-                                                    nTargetLang, DEFAULTFONT_FLAGS_ONLYONE );
+                                                    nTargetLang, GetDefaultFontFlags::OnlyOne );
 
                             // disallow formatting, updating the view, ... while
                             // converting the document. (saves time)
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index 126a5fb..e200ad2 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -51,7 +51,7 @@ void VclComplexTextTest::testArabic()
     vcl::Font aFont = OutputDevice::GetDefaultFont(
                         DefaultFontType::CTL_SPREADSHEET,
                         LANGUAGE_ARABIC_SAUDI_ARABIA,
-                        DEFAULTFONT_FLAGS_ONLYONE, 0 );
+                        GetDefaultFontFlags::OnlyOne, 0 );
     pOutDev->SetFont( aFont );
 
     // normal orientation
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 078baf1..8bf7467 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -404,7 +404,7 @@ DbgInfoDialog::DbgInfoDialog( vcl::Window* pParent, bool bHelpText ) :
 
     if ( !bHelpText )
     {
-        vcl::Font aFont = GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_ENGLISH_US, 0 );
+        vcl::Font aFont = GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::NONE );
         aFont.SetHeight( 8 );
         aFont.SetPitch( PITCH_FIXED );
         maListBox->SetControlFont( aFont );
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 05ff359..a5e54e4 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -773,7 +773,7 @@ void ImplFontSubstitute( OUString& rFontName )
 
 //hidpi TODO: This routine has hard-coded font-sizes that break places such as DialControl
 vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLang,
-                                        sal_uLong nFlags, const OutputDevice* pOutDev )
+                                        GetDefaultFontFlags nFlags, const OutputDevice* pOutDev )
 {
     if (!pOutDev) // default is NULL
         pOutDev = Application::GetDefaultDevice();
@@ -869,7 +869,7 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan
                 if( pFontFamily )
                 {
                     AddTokenFontName( aName, pFontFamily->GetFamilyName() );
-                    if( nFlags & DEFAULTFONT_FLAGS_ONLYONE )
+                    if( nFlags & GetDefaultFontFlags::OnlyOne )
                         break;
                 }
             }
@@ -880,7 +880,7 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan
         // No Name, than set all names
         if ( aFont.GetName().isEmpty() )
         {
-            if ( nFlags & DEFAULTFONT_FLAGS_ONLYONE )
+            if ( nFlags & GetDefaultFontFlags::OnlyOne )
             {
                 if( !pOutDev )
                 {
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index e15c8b4..dd436d9 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -550,7 +550,7 @@ void Window::SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::F
                 nType = DefaultFontType::FIXED;
             else
                 nType = DefaultFontType::UI_SANS;
-            vcl::Font aTempFont = OutputDevice::GetDefaultFont(nType, rRenderContext.GetSettings().GetLanguageTag().getLanguageType(), 0);
+            vcl::Font aTempFont = OutputDevice::GetDefaultFont(nType, rRenderContext.GetSettings().GetLanguageTag().getLanguageType(), GetDefaultFontFlags::NONE);
             aFont.SetName(aTempFont.GetName());
             SetPointFont(rRenderContext, aFont);
         }
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 576b3ed..3ed07b5 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -213,7 +213,7 @@ void CertificateViewerDetailsTP::InsertElement( const OUString& _rField, const O
 
 CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, CertificateViewer* _pDlg )
     :CertificateViewerTP    ( _pParent, "CertDetails", "xmlsec/ui/certdetails.ui", _pDlg  )
-    ,m_aFixedWidthFont( OutputDevice::GetDefaultFont( DefaultFontType::UI_FIXED, LANGUAGE_DONTKNOW, DEFAULTFONT_FLAGS_ONLYONE, this ) )
+    ,m_aFixedWidthFont( OutputDevice::GetDefaultFont( DefaultFontType::UI_FIXED, LANGUAGE_DONTKNOW, GetDefaultFontFlags::OnlyOne, this ) )
 {
     get( m_pValueDetails, "valuedetails" );
     get( m_pElementsLBContainer, "tablecontainer" );
commit 49e13aa41895e8562d83cff189ab6a78d5d902aa
Author: Noel Grandin <noel at peralex.com>
Date:   Tue May 19 13:12:35 2015 +0200

    convert FONT_SUBSTITUTE constants to scoped enum
    
    Change-Id: I8312f0117f33349218a09ccdfea946c66ceb1b3e

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index dda1507..f9586ca 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -266,9 +266,17 @@ namespace o3tl
     template<> struct typed_flags<AntialiasingFlags> : is_typed_flags<AntialiasingFlags, 0x07> {};
 }
 
-// AddFontSubstitute
-#define FONT_SUBSTITUTE_ALWAYS          ((sal_uInt16)0x0001)
-#define FONT_SUBSTITUTE_SCREENONLY      ((sal_uInt16)0x0002)
+// AddFontSubstitute() flags
+enum class AddFontSubstituteFlags
+{
+    NONE            = 0x00,
+    ALWAYS          = 0x01,
+    ScreenOnly      = 0x02,
+};
+namespace o3tl
+{
+    template<> struct typed_flags<AddFontSubstituteFlags> : is_typed_flags<AddFontSubstituteFlags, 0x03> {};
+}
 
 #define DEFAULTFONT_FLAGS_ONLYONE       ((sal_uLong)0x00000001)
 
@@ -1259,7 +1267,7 @@ public:
     static void                 EndFontSubstitution();
     static void                 AddFontSubstitute( const OUString& rFontName,
                                                    const OUString& rReplaceFontName,
-                                                   sal_uInt16 nFlags = 0 );
+                                                   AddFontSubstituteFlags nFlags = AddFontSubstituteFlags::NONE );
     static void                 RemoveFontSubstitute( sal_uInt16 n );
     static sal_uInt16           GetFontSubstituteCount();
 
diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx
index 6d7e337..8f37ba8 100644
--- a/svtools/source/config/fontsubstconfig.cxx
+++ b/svtools/source/config/fontsubstconfig.cxx
@@ -178,12 +178,12 @@ void SvtFontSubstConfig::Apply()
 
     for (sal_Int32  i = 0; i < nCount; i++)
     {
-        sal_uInt16 nFlags = 0;
+        AddFontSubstituteFlags nFlags = AddFontSubstituteFlags::NONE;
         const SubstitutionStruct* pSubs = GetSubstitution(i);
         if(pSubs->bReplaceAlways)
-            nFlags |= FONT_SUBSTITUTE_ALWAYS;
+            nFlags |= AddFontSubstituteFlags::ALWAYS;
         if(pSubs->bReplaceOnScreenOnly)
-            nFlags |= FONT_SUBSTITUTE_SCREENONLY;
+            nFlags |= AddFontSubstituteFlags::ScreenOnly;
         OutputDevice::AddFontSubstitute( pSubs->sFont, pSubs->sReplaceBy, nFlags );
     }
 
diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h
index eae0c59..7d44798 100644
--- a/vcl/inc/outdev.h
+++ b/vcl/inc/outdev.h
@@ -36,6 +36,8 @@ class VirtualDevice;
 class ImplGetDevFontList;
 class GetDevSizeList;
 class PhysicalFontCollection;
+enum class AddFontSubstituteFlags;
+
 // an ImplGetDevFontList is created by an PhysicalFontCollection
 // it becomes invalid when original PhysicalFontCollection is modified
 class ImplGetDevFontList
@@ -90,9 +92,9 @@ struct ImplFontSubstEntry
     OUString                  maReplaceName;
     OUString                  maSearchName;
     OUString                  maSearchReplaceName;
-    sal_uInt16                mnFlags;
+    AddFontSubstituteFlags    mnFlags;
 
-    ImplFontSubstEntry(  const OUString& rFontName, const OUString& rSubstFontName, sal_uInt16 nSubstFlags );
+    ImplFontSubstEntry(  const OUString& rFontName, const OUString& rSubstFontName, AddFontSubstituteFlags nSubstFlags );
 };
 
 class ImplDirectFontSubstitution
@@ -102,13 +104,13 @@ private:
     typedef std::list<ImplFontSubstEntry> FontSubstList;
     FontSubstList maFontSubstList;
 public:
-    void    AddFontSubstitute( const OUString& rFontName, const OUString& rSubstName, sal_uInt16 nFlags );
+    void    AddFontSubstitute( const OUString& rFontName, const OUString& rSubstName, AddFontSubstituteFlags nFlags );
     void    RemoveFontSubstitute( int nIndex );
     int     GetFontSubstituteCount() const { return maFontSubstList.size(); };
     bool    Empty() const { return maFontSubstList.empty(); }
     void    Clear() { maFontSubstList.clear(); }
 
-    bool    FindFontSubstitute( OUString& rSubstName, const OUString& rFontName, sal_uInt16 nFlags ) const;
+    bool    FindFontSubstitute( OUString& rSubstName, const OUString& rFontName, AddFontSubstituteFlags nFlags ) const;
 };
 
 // PreMatchFontSubstitution
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 94d3127..05ff359 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -687,7 +687,7 @@ void OutputDevice::EndFontSubstitution()
 
 void OutputDevice::AddFontSubstitute( const OUString& rFontName,
                                       const OUString& rReplaceFontName,
-                                      sal_uInt16 nFlags )
+                                      AddFontSubstituteFlags nFlags )
 {
     ImplDirectFontSubstitution*& rpSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst;
     if( !rpSubst )
@@ -697,13 +697,13 @@ void OutputDevice::AddFontSubstitute( const OUString& rFontName,
 }
 
 void ImplDirectFontSubstitution::AddFontSubstitute( const OUString& rFontName,
-    const OUString& rSubstFontName, sal_uInt16 nFlags )
+    const OUString& rSubstFontName, AddFontSubstituteFlags nFlags )
 {
     maFontSubstList.push_back( ImplFontSubstEntry( rFontName, rSubstFontName, nFlags ) );
 }
 
 ImplFontSubstEntry::ImplFontSubstEntry( const OUString& rFontName,
-    const OUString& rSubstFontName, sal_uInt16 nSubstFlags )
+    const OUString& rSubstFontName, AddFontSubstituteFlags nSubstFlags )
 :   maName( rFontName )
 ,   maReplaceName( rSubstFontName )
 ,   mnFlags( nSubstFlags )
@@ -737,14 +737,14 @@ sal_uInt16 OutputDevice::GetFontSubstituteCount()
 }
 
 bool ImplDirectFontSubstitution::FindFontSubstitute( OUString& rSubstName,
-    const OUString& rSearchName, sal_uInt16 nFlags ) const
+    const OUString& rSearchName, AddFontSubstituteFlags nFlags ) const
 {
     // TODO: get rid of O(N) searches
     FontSubstList::const_iterator it = maFontSubstList.begin();
     for(; it != maFontSubstList.end(); ++it )
     {
         const ImplFontSubstEntry& rEntry = *it;
-        if( ((rEntry.mnFlags & nFlags) || !nFlags)
+        if( ((rEntry.mnFlags & nFlags) || nFlags == AddFontSubstituteFlags::NONE)
         &&   (rEntry.maSearchName == rSearchName) )
         {
             rSubstName = rEntry.maSearchReplaceName;
@@ -764,7 +764,7 @@ void ImplFontSubstitute( OUString& rFontName )
 
     // apply user-configurable font replacement (eg, from the list in Tools->Options)
     const ImplDirectFontSubstitution* pSubst = ImplGetSVData()->maGDIData.mpDirectFontSubst;
-    if( pSubst && pSubst->FindFontSubstitute( aSubstFontName, rFontName, FONT_SUBSTITUTE_ALWAYS ) )
+    if( pSubst && pSubst->FindFontSubstitute( aSubstFontName, rFontName, AddFontSubstituteFlags::ALWAYS ) )
     {
         rFontName = aSubstFontName;
         return;
commit 456c379ffd8683cd8c22969268900787cf1ac28e
Author: Noel Grandin <noel at peralex.com>
Date:   Tue May 19 12:16:31 2015 +0200

    convert ANTIALIASING constants to scoped enum
    
    Change-Id: I175b8ea4e8bc01c3cdd3dd90506eba01b35e0085

diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index e9ae261..c46a49f 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -91,7 +91,7 @@ namespace dxcanvas
         // disable font antialiasing - GDI does not handle alpha
         // surfaces properly.
         if( bAlphaSurface )
-            aVirtualDevice.SetAntialiasing(ANTIALIASING_DISABLE_TEXT);
+            aVirtualDevice.SetAntialiasing(AntialiasingFlags::DisableText);
 
         if(rText.Length)
         {
diff --git a/canvas/source/vcl/backbuffer.cxx b/canvas/source/vcl/backbuffer.cxx
index 356caa9..8f3a980 100644
--- a/canvas/source/vcl/backbuffer.cxx
+++ b/canvas/source/vcl/backbuffer.cxx
@@ -33,12 +33,12 @@ namespace vclcanvas
             // #i95645#
 #if defined( MACOSX )
             // use AA on VCLCanvas for Mac
-            maVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | maVDev->GetAntialiasing() );
+            maVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw | maVDev->GetAntialiasing() );
 #else
             // switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and
             // is not required to do AA. It would need to be adapted to use it correctly
             // (especially gradient painting). This will need extra work.
-            maVDev->SetAntialiasing( maVDev->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW);
+            maVDev->SetAntialiasing( maVDev->GetAntialiasing() & ~AntialiasingFlags::EnableB2dDraw);
 #endif
         }
     }
diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx
index bd01d71..4fd79bc 100644
--- a/canvas/source/vcl/bitmapbackbuffer.cxx
+++ b/canvas/source/vcl/bitmapbackbuffer.cxx
@@ -77,7 +77,7 @@ namespace vclcanvas
         {
             // VDev content is more current than bitmap - copy contents before!
             mpVDev->EnableMapMode( false );
-            mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+            mpVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
             const Point aEmptyPoint;
             *maBitmap = mpVDev->GetBitmapEx( aEmptyPoint,
                                              mpVDev->GetOutputSizePixel() );
@@ -98,7 +98,7 @@ namespace vclcanvas
         if( mbVDevContentIsCurrent && mpVDev )
         {
             mpVDev->EnableMapMode( false );
-            mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+            mpVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
             aSize = mpVDev->GetOutputSizePixel();
         }
 
@@ -123,12 +123,12 @@ namespace vclcanvas
             // #i95645#
 #if defined( MACOSX )
             // use AA on VCLCanvas for Mac
-            mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | mpVDev->GetAntialiasing() );
+            mpVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw | mpVDev->GetAntialiasing() );
 #else
             // switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and
             // is not required to do AA. It would need to be adapted to use it correctly
             // (especially gradient painting). This will need extra work.
-            mpVDev->SetAntialiasing(mpVDev->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW);
+            mpVDev->SetAntialiasing(mpVDev->GetAntialiasing() & ~AntialiasingFlags::EnableB2dDraw);
 #endif
         }
     }
@@ -142,7 +142,7 @@ namespace vclcanvas
         {
             // fill with bitmap content
             mpVDev->EnableMapMode( false );
-            mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+            mpVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
             const Point aEmptyPoint;
             mpVDev->DrawBitmapEx( aEmptyPoint, *maBitmap );
         }
diff --git a/canvas/source/vcl/canvascustomsprite.cxx b/canvas/source/vcl/canvascustomsprite.cxx
index cb88336..030c603 100644
--- a/canvas/source/vcl/canvascustomsprite.cxx
+++ b/canvas/source/vcl/canvascustomsprite.cxx
@@ -83,8 +83,8 @@ namespace vclcanvas
         // antialiasing again, then)
 
         // disable font antialiasing (causes ugly shadows otherwise)
-        pBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_DISABLE_TEXT );
-        pBackBufferMask->getOutDev().SetAntialiasing( ANTIALIASING_DISABLE_TEXT );
+        pBackBuffer->getOutDev().SetAntialiasing( AntialiasingFlags::DisableText );
+        pBackBufferMask->getOutDev().SetAntialiasing( AntialiasingFlags::DisableText );
 
         // set mask vdev drawmode, such that everything is painted
         // black. That leaves us with a binary image, white for
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index 84ba546..5f3ee58 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -155,7 +155,7 @@ namespace vclcanvas
     {
         mp2ndOutDev = rOutDev;
         mp2ndOutDev->getOutDev().EnableMapMode( false );
-        mp2ndOutDev->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+        mp2ndOutDev->getOutDev().SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
     }
 
     void CanvasHelper::clear()
@@ -167,7 +167,7 @@ namespace vclcanvas
             tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
 
             rOutDev.EnableMapMode( false );
-            rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+            rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
             rOutDev.SetLineColor( COL_WHITE );
             rOutDev.SetFillColor( COL_WHITE );
             rOutDev.SetClipRegion();
@@ -180,7 +180,7 @@ namespace vclcanvas
 
                 rOutDev2.SetDrawMode( DrawModeFlags::Default );
                 rOutDev2.EnableMapMode( false );
-                rOutDev2.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+                rOutDev2.SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
                 rOutDev2.SetLineColor( COL_WHITE );
                 rOutDev2.SetFillColor( COL_WHITE );
                 rOutDev2.SetClipRegion();
@@ -917,7 +917,7 @@ namespace vclcanvas
 
         tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
         rOutDev.EnableMapMode( false );
-        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+        rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
 
         // TODO(F2): Support alpha vdev canvas here
         const Point aEmptyPoint(0,0);
@@ -947,7 +947,7 @@ namespace vclcanvas
 
         tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
         rOutDev.EnableMapMode( false );
-        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+        rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
 
         Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(),
                                           aRect.GetSize()) );
@@ -1000,7 +1000,7 @@ namespace vclcanvas
 
         tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
         rOutDev.EnableMapMode( false );
-        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+        rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
 
         const Rectangle aRect( vcl::unotools::rectangleFromIntegerRectangle2D(rect) );
         const sal_uInt16    nBitCount( ::std::min( (sal_uInt16)24U,
@@ -1125,7 +1125,7 @@ namespace vclcanvas
 
         tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
         rOutDev.EnableMapMode( false );
-        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+        rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
 
         const Size aBmpSize( rOutDev.GetOutputSizePixel() );
 
@@ -1163,7 +1163,7 @@ namespace vclcanvas
 
         tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
         rOutDev.EnableMapMode( false );
-        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+        rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
 
         const Size aBmpSize( rOutDev.GetOutputSizePixel() );
 
@@ -1207,7 +1207,7 @@ namespace vclcanvas
         OutputDevice* p2ndOutDev = NULL;
 
         rOutDev.EnableMapMode( false );
-        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+        rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
 
         if( mp2ndOutDev )
             p2ndOutDev = &mp2ndOutDev->getOutDev();
diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx
index c294efd..9d5e0b2 100644
--- a/canvas/source/vcl/impltools.hxx
+++ b/canvas/source/vcl/impltools.hxx
@@ -131,7 +131,7 @@ namespace vclcanvas
             explicit OutDevStateKeeper( const OutDevProviderSharedPtr& rOutDev ) :
                 mpOutDev( rOutDev.get() ? &(rOutDev->getOutDev()) : NULL ),
                 mbMappingWasEnabled( mpOutDev && mpOutDev->IsMapModeEnabled() ),
-                mnAntiAliasing( mpOutDev ? mpOutDev->GetAntialiasing() : 0 )
+                mnAntiAliasing( mpOutDev ? mpOutDev->GetAntialiasing() : AntialiasingFlags::NONE )
             {
                 init();
             }
@@ -154,13 +154,13 @@ namespace vclcanvas
                 {
                     mpOutDev->Push();
                     mpOutDev->EnableMapMode(false);
-                    mpOutDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+                    mpOutDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
                 }
             }
 
-            VclPtr<OutputDevice> mpOutDev;
-            const bool          mbMappingWasEnabled;
-            const sal_uInt16    mnAntiAliasing;
+            VclPtr<OutputDevice>    mpOutDev;
+            const bool              mbMappingWasEnabled;
+            const AntialiasingFlags mnAntiAliasing;
         };
 
         ::Point mapRealPoint2D( const ::com::sun::star::geometry::RealPoint2D&  rPoint,
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index d003736..095dae6 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -88,7 +88,7 @@ namespace vclcanvas
             // wouldn't save much render time, and b) will clutter
             // scrolled sprite content outside this area)
             rOutDev.EnableMapMode( false );
-            rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+            rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
             rOutDev.SetClipRegion(vcl::Region(rRequestedArea));
 
             // repaint affected sprite directly to output device (at
@@ -329,7 +329,7 @@ namespace vclcanvas
 
             // flush to screen
             rOutDev.EnableMapMode( false );
-            rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+            rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
             rOutDev.SetClipRegion();
             rOutDev.DrawOutDev( aEmptyPoint, aOutDevSize,
                                 aEmptyPoint, aOutDevSize,
@@ -571,7 +571,7 @@ namespace vclcanvas
 
         // paint background
         maVDev->EnableMapMode( false );
-        maVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+        maVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
         maVDev->SetClipRegion();
         maVDev->DrawOutDev( aEmptyPoint, aOutputSize,
                             aOutputPosition, aOutputSize,
@@ -589,7 +589,7 @@ namespace vclcanvas
 
         // flush to screen
         rOutDev.EnableMapMode( false );
-        rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+        rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
         rOutDev.DrawOutDev( aOutputPosition, aOutputSize,
                             aEmptyPoint, aOutputSize,
                             *maVDev );
diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx
index 7fedd46..076cca0 100644
--- a/canvas/source/vcl/spritedevicehelper.cxx
+++ b/canvas/source/vcl/spritedevicehelper.cxx
@@ -50,12 +50,12 @@ namespace vclcanvas
         // #i95645#
 #if defined( MACOSX )
         // use AA on VCLCanvas for Mac
-        mpBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | mpBackBuffer->getOutDev().GetAntialiasing() );
+        mpBackBuffer->getOutDev().SetAntialiasing( AntialiasingFlags::EnableB2dDraw | mpBackBuffer->getOutDev().GetAntialiasing() );
 #else
         // switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and
         // is not required to do AA. It would need to be adapted to use it correctly
         // (especially gradient painting). This will need extra work.
-        mpBackBuffer->getOutDev().SetAntialiasing(mpBackBuffer->getOutDev().GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW);
+        mpBackBuffer->getOutDev().SetAntialiasing(mpBackBuffer->getOutDev().GetAntialiasing() & ~AntialiasingFlags::EnableB2dDraw);
 #endif
     }
 
@@ -119,7 +119,7 @@ namespace vclcanvas
 
             const ::Point aEmptyPoint;
             mpBackBuffer->getOutDev().EnableMapMode( false );
-            mpBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+            mpBackBuffer->getOutDev().SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
             WriteDIB(mpBackBuffer->getOutDev().GetBitmap(aEmptyPoint, mpBackBuffer->getOutDev().GetOutputSizePixel()), aStream, false, true);
         }
 
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index 76592b4..f3e41c6 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -55,7 +55,7 @@ ChartWindow::ChartWindow( ChartController* pController, vcl::Window* pParent, Wi
     this->SetMapMode( MapMode(MAP_100TH_MM) );
     adjustHighContrastMode();
     // chart does not depend on exact pixel painting => enable antialiased drawing
-    SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | GetAntialiasing() );
+    SetAntialiasing( AntialiasingFlags::EnableB2dDraw | GetAntialiasing() );
     EnableRTL( false );
     if( pParent )
         pParent->EnableRTL( false );// #i96215# necessary for a correct position of the context menu in rtl mode
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index b644c4f..1240437 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -94,7 +94,7 @@ namespace drawinglayer
     {
         struct VclPixelProcessor2D::Impl
         {
-            sal_uInt16 m_nOrigAntiAliasing;
+            AntialiasingFlags m_nOrigAntiAliasing;
 
             explicit Impl(OutputDevice const& rOutDev)
                 : m_nOrigAntiAliasing(rOutDev.GetAntialiasing())
@@ -116,19 +116,19 @@ namespace drawinglayer
             if(getOptionsDrawinglayer().IsAntiAliasing())
             {
                 mpOutputDevice->SetAntialiasing(
-                   m_pImpl->m_nOrigAntiAliasing | ANTIALIASING_ENABLE_B2DDRAW);
+                   m_pImpl->m_nOrigAntiAliasing | AntialiasingFlags::EnableB2dDraw);
             }
             else
             {
                 mpOutputDevice->SetAntialiasing(
-                   m_pImpl->m_nOrigAntiAliasing & ~ANTIALIASING_ENABLE_B2DDRAW);
+                   m_pImpl->m_nOrigAntiAliasing & ~AntialiasingFlags::EnableB2dDraw);
             }
         }
 
         VclPixelProcessor2D::~VclPixelProcessor2D()
         {
             // restore MapMode
-               mpOutputDevice->Pop();
+            mpOutputDevice->Pop();
 
             // restore AntiAliasing
             mpOutputDevice->SetAntialiasing(m_pImpl->m_nOrigAntiAliasing);
@@ -794,7 +794,7 @@ namespace drawinglayer
                     // Caution: This is needed in both cases (!)
                     if(mnPolygonStrokePrimitive2D
                         && getOptionsDrawinglayer().IsAntiAliasing()
-                        && (mpOutputDevice->GetAntialiasing() & ANTIALIASING_ENABLE_B2DDRAW))
+                        && (mpOutputDevice->GetAntialiasing() & AntialiasingFlags::EnableB2dDraw))
                     {
                         const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rPolyPolygonColorPrimitive2D.getBColor()));
                         sal_uInt32 nCount(aLocalPolyPolygon.count());
@@ -821,11 +821,11 @@ namespace drawinglayer
                 {
                     // #i98289#
                     const bool bForceLineSnap(getOptionsDrawinglayer().IsAntiAliasing() && getOptionsDrawinglayer().IsSnapHorVerLinesToDiscrete());
-                    const sal_uInt16 nOldAntiAliase(mpOutputDevice->GetAntialiasing());
+                    const AntialiasingFlags nOldAntiAliase(mpOutputDevice->GetAntialiasing());
 
                     if(bForceLineSnap)
                     {
-                        mpOutputDevice->SetAntialiasing(nOldAntiAliase | ANTIALIASING_PIXELSNAPHAIRLINE);
+                        mpOutputDevice->SetAntialiasing(nOldAntiAliase | AntialiasingFlags::PixelSnapHairline);
                     }
 
                     const primitive2d::MetafilePrimitive2D& rMetafilePrimitive( static_cast< const primitive2d::MetafilePrimitive2D& >(rCandidate) );
@@ -1154,10 +1154,10 @@ namespace drawinglayer
                 {
                     // #i98404# Handle directly, especially when AA is active
                     const primitive2d::BackgroundColorPrimitive2D& rPrimitive = static_cast< const primitive2d::BackgroundColorPrimitive2D& >(rCandidate);
-                    const sal_uInt16 nOriginalAA(mpOutputDevice->GetAntialiasing());
+                    const AntialiasingFlags nOriginalAA(mpOutputDevice->GetAntialiasing());
 
                     // switch AA off in all cases
-                    mpOutputDevice->SetAntialiasing(mpOutputDevice->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW);
+                    mpOutputDevice->SetAntialiasing(mpOutputDevice->GetAntialiasing() & ~AntialiasingFlags::EnableB2dDraw);
 
                     // create color for fill
                     const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rPrimitive.getBColor()));
@@ -1192,8 +1192,8 @@ namespace drawinglayer
                     // Set OutDev to XOR and switch AA off (XOR does not work with AA)
                     mpOutputDevice->Push();
                     mpOutputDevice->SetRasterOp( ROP_XOR );
-                    const sal_uInt16 nAntiAliasing(mpOutputDevice->GetAntialiasing());
-                    mpOutputDevice->SetAntialiasing(nAntiAliasing & ~ANTIALIASING_ENABLE_B2DDRAW);
+                    const AntialiasingFlags nAntiAliasing(mpOutputDevice->GetAntialiasing());
+                    mpOutputDevice->SetAntialiasing(nAntiAliasing & ~AntialiasingFlags::EnableB2dDraw);
 
                     // process content recursively
                     process(rCandidate.get2DDecomposition(getViewInformation2D()));
@@ -1223,8 +1223,8 @@ namespace drawinglayer
                     // process recursively, but turn off anti-aliasing. Border
                     // lines are always rectangular, and look horrible when
                     // the anti-aliasing is enabled.
-                    sal_uInt16 nAntiAliasing = mpOutputDevice->GetAntialiasing();
-                    mpOutputDevice->SetAntialiasing(nAntiAliasing & ~ANTIALIASING_ENABLE_B2DDRAW);
+                    AntialiasingFlags nAntiAliasing = mpOutputDevice->GetAntialiasing();
+                    mpOutputDevice->SetAntialiasing(nAntiAliasing & ~AntialiasingFlags::EnableB2dDraw);
 
                     const drawinglayer::primitive2d::BorderLinePrimitive2D& rBorder =
                         static_cast<const drawinglayer::primitive2d::BorderLinePrimitive2D&>(rCandidate);
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 833c9da..dda1507 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -254,9 +254,17 @@ namespace o3tl
 }
 
 // Antialiasing
-#define ANTIALIASING_DISABLE_TEXT       ((sal_uInt16)0x0001)
-#define ANTIALIASING_ENABLE_B2DDRAW     ((sal_uInt16)0x0002)
-#define ANTIALIASING_PIXELSNAPHAIRLINE  ((sal_uInt16)0x0004)
+enum class AntialiasingFlags
+{
+    NONE                = 0x0000,
+    DisableText         = 0x0001,
+    EnableB2dDraw       = 0x0002,
+    PixelSnapHairline  = 0x0004,
+};
+namespace o3tl
+{
+    template<> struct typed_flags<AntialiasingFlags> : is_typed_flags<AntialiasingFlags, 0x07> {};
+}
 
 // AddFontSubstitute
 #define FONT_SUBSTITUTE_ALWAYS          ((sal_uInt16)0x0001)
@@ -381,7 +389,7 @@ private:
     std::unique_ptr<AllSettings>    mxSettings;
     MapMode                         maMapMode;
     Point                           maRefPoint;
-    sal_uInt16                      mnAntialiasing;
+    AntialiasingFlags               mnAntialiasing;
     LanguageType                    meTextLanguage;
 
     /// bitfield
@@ -614,8 +622,8 @@ public:
     bool                        IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); }
     bool                        IsOutputNecessary() const { return ((mbOutput && mbDevOutput) || (mpMetaFile != NULL)); }
 
-    void                        SetAntialiasing( sal_uInt16 nMode =  0 );
-    sal_uInt16                  GetAntialiasing() const { return mnAntialiasing; }
+    void                        SetAntialiasing( AntialiasingFlags nMode = AntialiasingFlags::NONE );
+    AntialiasingFlags           GetAntialiasing() const { return mnAntialiasing; }
 
     void                        SetDrawMode( DrawModeFlags nDrawMode );
     DrawModeFlags               GetDrawMode() const { return mnDrawMode; }
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
index 52020df..79eea55 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -74,8 +74,8 @@ void PageObjectPainter::PaintPageObject (
         PageObjectLayouter *pPageObjectLayouter = mrLayouter.GetPageObjectLayouter().get();
         // Turn off antialiasing to avoid the bitmaps from being
         // shifted by fractions of a pixel and thus show blurry edges.
-        const sal_uInt16 nSavedAntialiasingMode (rDevice.GetAntialiasing());
-        rDevice.SetAntialiasing(nSavedAntialiasingMode & ~ANTIALIASING_ENABLE_B2DDRAW);
+        const AntialiasingFlags nSavedAntialiasingMode (rDevice.GetAntialiasing());
+        rDevice.SetAntialiasing(nSavedAntialiasingMode & ~AntialiasingFlags::EnableB2dDraw);
 
         PaintBackground(pPageObjectLayouter, rDevice, rpDescriptor);
         PaintPreview(pPageObjectLayouter, rDevice, rpDescriptor);
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index e4c278d..9b7bb59 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -509,8 +509,8 @@ sal_uInt16 LineListBox::GetSelectEntryStyle( sal_Int32 nSelIndex ) const
 
 void lclDrawPolygon( OutputDevice& rDev, const basegfx::B2DPolygon& rPolygon, long nWidth, sal_uInt16 nDashing )
 {
-    sal_uInt16 nOldAA = rDev.GetAntialiasing();
-    rDev.SetAntialiasing( nOldAA & ~ANTIALIASING_ENABLE_B2DDRAW );
+    AntialiasingFlags nOldAA = rDev.GetAntialiasing();
+    rDev.SetAntialiasing( nOldAA & ~AntialiasingFlags::EnableB2dDraw );
 
     long nPix = rDev.PixelToLogic(Size(1, 1)).Width();
     basegfx::B2DPolyPolygon aPolygons = svtools::ApplyLineDashing(rPolygon, nDashing, nPix);
diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx
index 6078a3a..d410f4c 100644
--- a/svtools/source/filter/DocumentToGraphicRenderer.cxx
+++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx
@@ -119,7 +119,7 @@ Graphic DocumentToGraphicRenderer::renderToGraphic(
     GDIMetaFile aMtf;
 
     OutputDevice* pOutputDev = VCLUnoHelper::GetOutputDevice( xDevice );
-    pOutputDev->SetAntialiasing(pOutputDev->GetAntialiasing() | ANTIALIASING_ENABLE_B2DDRAW);
+    pOutputDev->SetAntialiasing(pOutputDev->GetAntialiasing() | AntialiasingFlags::EnableB2dDraw);
     MapMode mm = pOutputDev->GetMapMode();
     mm.SetScaleX( fScaleX );
     mm.SetScaleY( fScaleY );
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx
index 585e019..f54195f 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -43,7 +43,7 @@ namespace sdr
 
             if(nSize)
             {
-                const sal_uInt16 nOriginalAA(rDestinationDevice.GetAntialiasing());
+                const AntialiasingFlags nOriginalAA(rDestinationDevice.GetAntialiasing());
                 const bool bIsAntiAliasing(getDrawinglayerOpt().IsAntiAliasing());
 
                 // create processor
@@ -68,11 +68,11 @@ namespace sdr
                                 {
                                     if(bIsAntiAliasing && rCandidate.allowsAntiAliase())
                                     {
-                                        rDestinationDevice.SetAntialiasing(nOriginalAA | ANTIALIASING_ENABLE_B2DDRAW);
+                                        rDestinationDevice.SetAntialiasing(nOriginalAA | AntialiasingFlags::EnableB2dDraw);
                                     }
                                     else
                                     {
-                                        rDestinationDevice.SetAntialiasing(nOriginalAA & ~ANTIALIASING_ENABLE_B2DDRAW);
+                                        rDestinationDevice.SetAntialiasing(nOriginalAA & ~AntialiasingFlags::EnableB2dDraw);
                                     }
 
                                     pProcessor->process(rSequence);
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 1485579..d94c179 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -870,10 +870,10 @@ void SwNoTxtFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea
     if( pGrfNd )
     {
         // Fix for bug fdo#33781
-        const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
+        const AntialiasingFlags nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
         if (pShell->Imp()->GetDrawView()->IsAntiAliasing())
         {
-            pOut->SetAntialiasing( nFormerAntialiasingAtOutput | ANTIALIASING_ENABLE_B2DDRAW );
+            pOut->SetAntialiasing( nFormerAntialiasingAtOutput | AntialiasingFlags::EnableB2dDraw );
         }
 
         bool bContinue = true;
@@ -978,15 +978,15 @@ void SwNoTxtFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea
     else // bIsChart || pOLENd
     {
         // Fix for bug fdo#33781
-        const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
+        const AntialiasingFlags nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
         if (pShell->Imp()->GetDrawView()->IsAntiAliasing())
         {
-            sal_uInt16 nNewAntialiasingAtOutput = nFormerAntialiasingAtOutput | ANTIALIASING_ENABLE_B2DDRAW;
+            AntialiasingFlags nNewAntialiasingAtOutput = nFormerAntialiasingAtOutput | AntialiasingFlags::EnableB2dDraw;
 
             // #i99665#
             // Adjust AntiAliasing mode at output device for chart OLE
             if ( pOLENd->IsChart() )
-                nNewAntialiasingAtOutput |= ANTIALIASING_PIXELSNAPHAIRLINE;
+                nNewAntialiasingAtOutput |= AntialiasingFlags::PixelSnapHairline;
 
             pOut->SetAntialiasing( nNewAntialiasingAtOutput );
         }
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index a96bb61..1c62ab0 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -523,12 +523,12 @@ Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters)
             {
                 if(rParameters.getAntiAliase())
                 {
-                    aVDev->SetAntialiasing(aVDev->GetAntialiasing() | ANTIALIASING_ENABLE_B2DDRAW);
+                    aVDev->SetAntialiasing(aVDev->GetAntialiasing() | AntialiasingFlags::EnableB2dDraw);
                 }
 
                 if(rParameters.getSnapHorVerLines())
                 {
-                    aVDev->SetAntialiasing(aVDev->GetAntialiasing() | ANTIALIASING_PIXELSNAPHAIRLINE);
+                    aVDev->SetAntialiasing(aVDev->GetAntialiasing() | AntialiasingFlags::PixelSnapHairline);
                 }
 
                 ImplDraw( aVDev.get(), Point(), aDrawSize );
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index b971e1c..c861466 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -640,7 +640,7 @@ bool Printer::AcquireGraphics() const
     if ( mpGraphics )
     {
         mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp );
-        mpGraphics->setAntiAliasB2DDraw(mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW);
+        mpGraphics->setAntiAliasB2DDraw(bool(mnAntialiasing & AntialiasingFlags::EnableB2dDraw));
     }
 
     return mpGraphics != nullptr;
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index a31dc22..04ac2d7 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -86,7 +86,7 @@ bool VirtualDevice::AcquireGraphics() const
     if ( mpGraphics )
     {
         mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp );
-        mpGraphics->setAntiAliasB2DDraw(mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW);
+        mpGraphics->setAntiAliasB2DDraw(bool(mnAntialiasing & AntialiasingFlags::EnableB2dDraw));
     }
 
     return mpGraphics != nullptr;
@@ -165,7 +165,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
     mnAlphaDepth    = -1;
 
     if( mnBitCount < 8 )
-        SetAntialiasing( ANTIALIASING_DISABLE_TEXT );
+        SetAntialiasing( AntialiasingFlags::DisableText );
 
     if ( pOutDev->GetOutDevType() == OUTDEV_PRINTER )
         mbScreenComp = false;
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 3e7f009..94d3127 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1493,7 +1493,7 @@ void OutputDevice::InitFont() const
     if ( mbInitFont )
     {
         // decide if antialiasing is appropriate
-        bool bNonAntialiased = (GetAntialiasing() & ANTIALIASING_DISABLE_TEXT) != 0;
+        bool bNonAntialiased(GetAntialiasing() & AntialiasingFlags::DisableText);
         const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
         bNonAntialiased |= ((rStyleSettings.GetDisplayOptions() & DISPLAY_OPTION_AA_DISABLE) != 0);

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list