summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/options/optgdlg.cxx8
-rw-r--r--desktop/source/app/app.cxx10
-rw-r--r--editeng/source/editeng/impedit.cxx2
-rw-r--r--include/svtools/apearcfg.hxx7
-rw-r--r--include/vcl/settings.hxx172
-rw-r--r--reportdesign/source/ui/report/ScrollHelper.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--svtools/source/config/apearcfg.cxx24
-rw-r--r--svtools/source/config/miscopt.cxx4
-rw-r--r--svtools/source/control/fmtfield.cxx8
-rw-r--r--svtools/source/control/valueset.cxx2
-rw-r--r--svx/source/fmcomp/gridcell.cxx25
-rw-r--r--toolkit/source/awt/vclxwindow.cxx21
-rw-r--r--toolkit/source/awt/vclxwindows.cxx14
-rw-r--r--vcl/osx/salframe.cxx4
-rw-r--r--vcl/source/app/settings.cxx90
-rw-r--r--vcl/source/control/button.cxx15
-rw-r--r--vcl/source/control/combobox.cxx6
-rw-r--r--vcl/source/control/ctrl.cxx2
-rw-r--r--vcl/source/control/edit.cxx6
-rw-r--r--vcl/source/control/fixed.cxx4
-rw-r--r--vcl/source/control/group.cxx2
-rw-r--r--vcl/source/control/ilstbox.cxx2
-rw-r--r--vcl/source/control/lstbox.cxx6
-rw-r--r--vcl/source/control/scrbar.cxx6
-rw-r--r--vcl/source/control/spinfld.cxx12
-rw-r--r--vcl/source/control/tabctrl.cxx10
-rw-r--r--vcl/source/edit/textview.cxx4
-rw-r--r--vcl/source/edit/vclmedit.cxx2
-rw-r--r--vcl/source/outdev/font.cxx2
-rw-r--r--vcl/source/outdev/text.cxx6
-rw-r--r--vcl/source/window/brdwin.cxx8
-rw-r--r--vcl/source/window/decoview.cxx12
-rw-r--r--vcl/source/window/dialog.cxx6
-rw-r--r--vcl/source/window/dockwin.cxx2
-rw-r--r--vcl/source/window/split.cxx2
-rw-r--r--vcl/source/window/splitwin.cxx2
-rw-r--r--vcl/source/window/winproc.cxx8
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx2
-rw-r--r--vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx2
-rw-r--r--vcl/unx/kde/salnativewidgets-kde.cxx2
-rw-r--r--vcl/unx/kde4/KDESalFrame.cxx2
-rw-r--r--vcl/win/source/window/salframe.cxx8
44 files changed, 293 insertions, 245 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index fa0bb0e98676..893ab5338d86 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -826,14 +826,14 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
}
// Middle Mouse Button
- short eOldMiddleMouse = pAppearanceCfg->GetMiddleMouseButton();
+ MouseMiddleButtonAction eOldMiddleMouse = pAppearanceCfg->GetMiddleMouseButton();
short eNewMiddleMouse = m_pMouseMiddleLB->GetSelectEntryPos();
if(eNewMiddleMouse > 2)
eNewMiddleMouse = 2;
- if ( eNewMiddleMouse != eOldMiddleMouse )
+ if ( eNewMiddleMouse != static_cast<short>(eOldMiddleMouse) )
{
- pAppearanceCfg->SetMiddleMouseButton( eNewMiddleMouse );
+ pAppearanceCfg->SetMiddleMouseButton( static_cast<MouseMiddleButtonAction>(eNewMiddleMouse) );
bAppearanceChanged = true;
}
@@ -982,7 +982,7 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
m_pMousePosLB->SaveValue();
// Mouse Snap
- m_pMouseMiddleLB->SelectEntryPos(pAppearanceCfg->GetMiddleMouseButton());
+ m_pMouseMiddleLB->SelectEntryPos(static_cast<short>(pAppearanceCfg->GetMiddleMouseButton()));
m_pMouseMiddleLB->SaveValue();
#if defined( UNX )
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 8a86c5416ccc..504275222dd4 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1836,25 +1836,25 @@ void Desktop::OverrideSystemSettings( AllSettings& rSettings )
StyleSettings hStyleSettings = rSettings.GetStyleSettings();
MouseSettings hMouseSettings = rSettings.GetMouseSettings();
- sal_uLong nDragFullOptions = hStyleSettings.GetDragFullOptions();
+ DragFullOptions nDragFullOptions = hStyleSettings.GetDragFullOptions();
SvtTabAppearanceCfg aAppearanceCfg;
sal_uInt16 nDragMode = aAppearanceCfg.GetDragMode();
switch ( nDragMode )
{
case DragFullWindow:
- nDragFullOptions |= DRAGFULL_OPTION_ALL;
+ nDragFullOptions |= DragFullOptions::All;
break;
case DragFrame:
- nDragFullOptions &= ~DRAGFULL_OPTION_ALL;
+ nDragFullOptions &= ~DragFullOptions::All;
break;
case DragSystemDep:
default:
break;
}
- sal_uInt32 nFollow = hMouseSettings.GetFollow();
- hMouseSettings.SetFollow( aAppearanceCfg.IsMenuMouseFollow() ? (nFollow|MOUSE_FOLLOW_MENU) : (nFollow&~MOUSE_FOLLOW_MENU));
+ MouseFollowFlags nFollow = hMouseSettings.GetFollow();
+ hMouseSettings.SetFollow( aAppearanceCfg.IsMenuMouseFollow() ? (nFollow|MouseFollowFlags::Menu) : (nFollow&~MouseFollowFlags::Menu));
rSettings.SetMouseSettings(hMouseSettings);
SvtMenuOptions aMenuOpt;
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index d1f5d95aae3b..08d990b2d2ef 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1144,7 +1144,7 @@ bool ImpEditView::MouseButtonUp( const MouseEvent& rMouseEvent )
bClickedInSelection = false;
if ( rMouseEvent.IsMiddle() && !bReadOnly &&
- ( GetWindow()->GetSettings().GetMouseSettings().GetMiddleButtonAction() == MOUSE_MIDDLE_PASTESELECTION ) )
+ ( GetWindow()->GetSettings().GetMouseSettings().GetMiddleButtonAction() == MouseMiddleButtonAction::PasteSelection ) )
{
Reference<com::sun::star::datatransfer::clipboard::XClipboard> aClipBoard(GetWindow()->GetPrimarySelection());
Paste( aClipBoard );
diff --git a/include/svtools/apearcfg.hxx b/include/svtools/apearcfg.hxx
index cb308b821ae6..26a4413782a6 100644
--- a/include/svtools/apearcfg.hxx
+++ b/include/svtools/apearcfg.hxx
@@ -23,6 +23,7 @@
#include <unotools/configitem.hxx>
class Application;
+enum class MouseMiddleButtonAction;
typedef enum {
SnapToButton = 0,
@@ -42,7 +43,7 @@ class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem
short nDragMode ;
short nScaleFactor ;
short nSnapMode ;
- short nMiddleMouse;
+ MouseMiddleButtonAction nMiddleMouse;
#if defined( UNX )
short nAAMinPixelHeight ;
#endif
@@ -71,8 +72,8 @@ public:
sal_uInt16 GetSnapMode () const { return nSnapMode; }
void SetSnapMode ( sal_uInt16 nSet );
- sal_uInt16 GetMiddleMouseButton () const { return nMiddleMouse; }
- void SetMiddleMouseButton ( sal_uInt16 nSet );
+ MouseMiddleButtonAction GetMiddleMouseButton () const { return nMiddleMouse; }
+ void SetMiddleMouseButton ( MouseMiddleButtonAction nSet );
void SetApplicationDefaults ( Application* pApp );
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index c60aa6400ba0..965d47065d79 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -51,20 +51,37 @@ namespace vcl {
// - MouseSettings -
-#define MOUSE_OPTION_AUTOFOCUS ((sal_uLong)0x00000001)
-#define MOUSE_OPTION_AUTOCENTERPOS ((sal_uLong)0x00000002)
-#define MOUSE_OPTION_AUTODEFBTNPOS ((sal_uLong)0x00000004)
+enum class MouseSettingsOptions
+{
+ NONE = 0x00,
+ AutoFocus = 0x01,
+ AutoCenterPos = 0x02,
+ AutoDefBtnPos = 0x04,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<MouseSettingsOptions> : is_typed_flags<MouseSettingsOptions, 0x07> {};
+}
-#define MOUSE_FOLLOW_MENU ((sal_uLong)0x00000001)
-#define MOUSE_FOLLOW_DDLIST ((sal_uLong)0x00000002)
+enum class MouseFollowFlags
+{
+ Menu = 0x0001,
+ DDList = 0x0002,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<MouseFollowFlags> : is_typed_flags<MouseFollowFlags, 0x03> {};
+}
-#define MOUSE_MIDDLE_NOTHING ((sal_uInt16)0)
-#define MOUSE_MIDDLE_AUTOSCROLL ((sal_uInt16)1)
-#define MOUSE_MIDDLE_PASTESELECTION ((sal_uInt16)2)
+enum class MouseMiddleButtonAction
+{
+ Nothing, AutoScroll, PasteSelection
+};
-#define MOUSE_WHEEL_DISABLE ((sal_uInt16)0)
-#define MOUSE_WHEEL_FOCUS_ONLY ((sal_uInt16)1)
-#define MOUSE_WHEEL_ALWAYS ((sal_uInt16)2)
+enum class MouseWheelBehaviour
+{
+ Disable, FocusOnly, ALWAYS
+};
class VCL_DLLPUBLIC MouseSettings
{
@@ -77,8 +94,8 @@ public:
~MouseSettings();
- void SetOptions( sal_uLong nOptions );
- sal_uLong GetOptions() const;
+ void SetOptions( MouseSettingsOptions nOptions );
+ MouseSettingsOptions GetOptions() const;
void SetDoubleClickTime( sal_uInt64 nDoubleClkTime );
sal_uInt64 GetDoubleClickTime() const;
@@ -113,14 +130,14 @@ public:
void SetMenuDelay( sal_uLong nDelay );
sal_uLong GetMenuDelay() const;
- void SetFollow( sal_uLong nFollow );
- sal_uLong GetFollow() const;
+ void SetFollow( MouseFollowFlags nFollow );
+ MouseFollowFlags GetFollow() const;
- void SetMiddleButtonAction( sal_uInt16 nAction );
- sal_uInt16 GetMiddleButtonAction() const;
+ void SetMiddleButtonAction( MouseMiddleButtonAction nAction );
+ MouseMiddleButtonAction GetMiddleButtonAction() const;
- void SetWheelBehavior( sal_uInt16 nBehavior );
- sal_uInt16 GetWheelBehavior() const;
+ void SetWheelBehavior( MouseWheelBehaviour nBehavior );
+ MouseWheelBehaviour GetWheelBehavior() const;
bool operator ==( const MouseSettings& rSet ) const;
bool operator !=( const MouseSettings& rSet ) const;
@@ -159,40 +176,69 @@ struct FrameStyle
// - StyleSettings -
-#define STYLE_OPTION_MONO ((sal_uLong)0x00000001)
-#define STYLE_OPTION_COLOR ((sal_uLong)0x00000002)
-#define STYLE_OPTION_FLAT ((sal_uLong)0x00000004)
-#define STYLE_OPTION_GREAT ((sal_uLong)0x00000008)
-#define STYLE_OPTION_HIGHLIGHT ((sal_uLong)0x00000010)
-#define STYLE_OPTION_ADVANCEDUSER ((sal_uLong)0x00000020)
-#define STYLE_OPTION_SCROLLARROW ((sal_uLong)0x00000040)
-#define STYLE_OPTION_SPINARROW ((sal_uLong)0x00000080)
-#define STYLE_OPTION_SPINUPDOWN ((sal_uLong)0x00000100)
-#define STYLE_OPTION_NOMNEMONICS ((sal_uLong)0x00000200)
-
-#define DRAGFULL_OPTION_WINDOWMOVE ((sal_uLong)0x00000001)
-#define DRAGFULL_OPTION_WINDOWSIZE ((sal_uLong)0x00000002)
-#define DRAGFULL_OPTION_DOCKING ((sal_uLong)0x00000010)
-#define DRAGFULL_OPTION_SPLIT ((sal_uLong)0x00000020)
-#define DRAGFULL_OPTION_SCROLL ((sal_uLong)0x00000040)
-#define DRAGFULL_OPTION_ALL \
- ( DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE \
- | DRAGFULL_OPTION_DOCKING | DRAGFULL_OPTION_SPLIT \
- | DRAGFULL_OPTION_SCROLL )
-
-#define SELECTION_OPTION_WORD ((sal_uLong)0x00000001)
-#define SELECTION_OPTION_FOCUS ((sal_uLong)0x00000002)
-#define SELECTION_OPTION_INVERT ((sal_uLong)0x00000004)
-#define SELECTION_OPTION_SHOWFIRST ((sal_uLong)0x00000008)
-
-#define DISPLAY_OPTION_AA_DISABLE ((sal_uLong)0x00000001)
-
-#define STYLE_RADIOBUTTON_MONO ((sal_uInt16)0x0001) // legacy
-#define STYLE_CHECKBOX_MONO ((sal_uInt16)0x0001) // legacy
-
-#define STYLE_TOOLBAR_ICONSIZE_UNKNOWN ((sal_uLong)0)
-#define STYLE_TOOLBAR_ICONSIZE_SMALL ((sal_uLong)1)
-#define STYLE_TOOLBAR_ICONSIZE_LARGE ((sal_uLong)2)
+enum class StyleSettingsOptions
+{
+ NONE = 0x0000,
+ Mono = 0x0001,
+ Color = 0x0002,
+ Flat = 0x0004,
+ Great = 0x0008,
+ Highlight = 0x0010,
+ AdvancedUser = 0x0020,
+ ScrollArrow = 0x0040,
+ SpinArrow = 0x0080,
+ SpinUpDown = 0x0100,
+ NoMnemonics = 0x0200,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<StyleSettingsOptions> : is_typed_flags<StyleSettingsOptions, 0x03ff> {};
+}
+
+enum class DragFullOptions
+{
+ NONE = 0x0000,
+ WindowMove = 0x0001,
+ WindowSize = 0x0002,
+ Docking = 0x0010,
+ Split = 0x0020,
+ Scroll = 0x0040,
+ All = WindowMove | WindowSize | Docking | Split | Scroll,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<DragFullOptions> : is_typed_flags<DragFullOptions, 0x0073> {};
+}
+
+enum class SelectionOptions
+{
+ NONE = 0x0000,
+ Word = 0x0001,
+ Focus = 0x0002,
+ Invert = 0x0004,
+ ShowFirst = 0x0008,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SelectionOptions> : is_typed_flags<SelectionOptions, 0x000f> {};
+}
+
+enum class DisplayOptions
+{
+ NONE = 0x0000,
+ AADisable = 0x0001,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<DisplayOptions> : is_typed_flags<DisplayOptions, 0x0001> {};
+}
+
+enum class ToolbarIconSize
+{
+ Unknown = 0,
+ Small = 1,
+ Large = 2,
+};
#define STYLE_CURSOR_NOBLINKTIME SAL_MAX_UINT64
@@ -474,20 +520,20 @@ public:
void SetScreenFontZoom( sal_uInt16 nPercent );
sal_uInt16 GetScreenFontZoom() const;
- void SetDragFullOptions( sal_uLong nOptions );
- sal_uLong GetDragFullOptions() const;
+ void SetDragFullOptions( DragFullOptions nOptions );
+ DragFullOptions GetDragFullOptions() const;
- void SetSelectionOptions( sal_uLong nOptions );
- sal_uLong GetSelectionOptions() const;
+ void SetSelectionOptions( SelectionOptions nOptions );
+ SelectionOptions GetSelectionOptions() const;
- void SetDisplayOptions( sal_uLong nOptions );
- sal_uLong GetDisplayOptions() const;
+ void SetDisplayOptions( DisplayOptions nOptions );
+ DisplayOptions GetDisplayOptions() const;
void SetAntialiasingMinPixelHeight( long nMinPixel );
sal_uLong GetAntialiasingMinPixelHeight() const;
- void SetOptions( sal_uLong nOptions );
- sal_uLong GetOptions() const;
+ void SetOptions( StyleSettingsOptions nOptions );
+ StyleSettingsOptions GetOptions() const;
void SetAutoMnemonic( bool bAutoMnemonic );
bool GetAutoMnemonic() const;
@@ -495,8 +541,8 @@ public:
void SetFontColor( const Color& rColor );
const Color& GetFontColor() const;
- void SetToolbarIconSize( sal_uLong nSize );
- sal_uLong GetToolbarIconSize() const;
+ void SetToolbarIconSize( ToolbarIconSize nSize );
+ ToolbarIconSize GetToolbarIconSize() const;
/** Set the icon theme to use. */
void SetIconTheme(const OUString&);
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index 938fd45942db..02cbca064b5c 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -90,7 +90,7 @@ void OScrollWindowHelper::impl_initScrollBar( ScrollBar& _rScrollBar ) const
{
AllSettings aSettings( _rScrollBar.GetSettings() );
StyleSettings aStyle( aSettings.GetStyleSettings() );
- aStyle.SetDragFullOptions( aStyle.GetDragFullOptions() | DRAGFULL_OPTION_SCROLL ); // live scrolling
+ aStyle.SetDragFullOptions( aStyle.GetDragFullOptions() | DragFullOptions::Scroll ); // live scrolling
aSettings.SetStyleSettings( aStyle );
_rScrollBar.SetSettings( aSettings );
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 53767d8cfee0..d0415df1326a 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1579,7 +1579,7 @@ void ScTextWnd::MouseButtonUp( const MouseEvent& rMEvt )
if (pEditView->MouseButtonUp( rMEvt ))
{
if ( rMEvt.IsMiddle() &&
- GetSettings().GetMouseSettings().GetMiddleButtonAction() == MOUSE_MIDDLE_PASTESELECTION )
+ GetSettings().GetMouseSettings().GetMiddleButtonAction() == MouseMiddleButtonAction::PasteSelection )
{
// EditView may have pasted from selection
SC_MOD()->InputChanged( pEditView );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 956baa83296e..32b091ca3bfc 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2153,7 +2153,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
pEditView->MouseButtonUp( rMEvt );
if ( rMEvt.IsMiddle() &&
- GetSettings().GetMouseSettings().GetMiddleButtonAction() == MOUSE_MIDDLE_PASTESELECTION )
+ GetSettings().GetMouseSettings().GetMiddleButtonAction() == MouseMiddleButtonAction::PasteSelection )
{
// EditView may have pasted from selection
pScMod->InputChanged( pEditView );
diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx
index ebd55fe4db14..466da3dabaca 100644
--- a/svtools/source/config/apearcfg.cxx
+++ b/svtools/source/config/apearcfg.cxx
@@ -42,7 +42,7 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg()
,nDragMode ( DEFAULT_DRAGMODE )
,nScaleFactor ( DEFAULT_SCALEFACTOR )
,nSnapMode ( DEFAULT_SNAPMODE )
- ,nMiddleMouse ( MOUSE_MIDDLE_AUTOSCROLL )
+ ,nMiddleMouse ( MouseMiddleButtonAction::AutoScroll )
#if defined( UNX )
,nAAMinPixelHeight ( DEFAULT_AAMINHEIGHT )
#endif
@@ -68,7 +68,7 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg()
case 1: *pValues >>= nDragMode; break; //"Window/Drag",
case 2: bMenuMouseFollow = *static_cast<sal_Bool const *>(pValues->getValue()); break; //"Menu/FollowMouse",
case 3: *pValues >>= nSnapMode; break; //"Dialog/MousePositioning",
- case 4: *pValues >>= nMiddleMouse; break; //"Dialog/MiddleMouseButton",
+ case 4: { short nTmp = 0; *pValues >>= nTmp; nMiddleMouse = static_cast<MouseMiddleButtonAction>(nTmp); break; } //"Dialog/MiddleMouseButton",
#if defined( UNX )
case 5: bFontAntialiasing = *static_cast<sal_Bool const *>(pValues->getValue()); break; // "FontAntialising/Enabled",
case 6: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight",
@@ -126,7 +126,7 @@ void SvtTabAppearanceCfg::ImplCommit()
case 1: pValues[nProp] <<= nDragMode; break; //"Window/Drag",
case 2: pValues[nProp].setValue(&bMenuMouseFollow, rType); break; //"Menu/FollowMouse",
case 3: pValues[nProp] <<= nSnapMode; break; //"Dialog/MousePositioning",
- case 4: pValues[nProp] <<= nMiddleMouse; break; //"Dialog/MiddleMouseButton",
+ case 4: pValues[nProp] <<= static_cast<short>(nMiddleMouse); break; //"Dialog/MiddleMouseButton",
#if defined( UNX )
case 5: pValues[nProp].setValue(&bFontAntialiasing, rType); break; // "FontAntialising/Enabled",
case 6: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight",
@@ -152,7 +152,7 @@ void SvtTabAppearanceCfg::SetSnapMode ( sal_uInt16 nSet )
SetModified();
}
-void SvtTabAppearanceCfg::SetMiddleMouseButton ( sal_uInt16 nSet )
+void SvtTabAppearanceCfg::SetMiddleMouseButton ( MouseMiddleButtonAction nSet )
{
nMiddleMouse = nSet;
SetModified();
@@ -180,23 +180,23 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp )
#if defined( UNX )
// font anti aliasing
hAppStyle.SetAntialiasingMinPixelHeight( nAAMinPixelHeight );
- hAppStyle.SetDisplayOptions( bFontAntialiasing ? 0 : DISPLAY_OPTION_AA_DISABLE );
+ hAppStyle.SetDisplayOptions( bFontAntialiasing ? DisplayOptions::NONE : DisplayOptions::AADisable );
#endif
// Mouse Snap
MouseSettings hMouseSettings = hAppSettings.GetMouseSettings();
- sal_uLong nMouseOptions = hMouseSettings.GetOptions();
+ MouseSettingsOptions nMouseOptions = hMouseSettings.GetOptions();
- nMouseOptions &= ~ (MOUSE_OPTION_AUTOCENTERPOS | MOUSE_OPTION_AUTODEFBTNPOS);
+ nMouseOptions &= ~ MouseSettingsOptions(MouseSettingsOptions::AutoCenterPos | MouseSettingsOptions::AutoDefBtnPos);
switch ( nSnapMode )
{
case SnapToButton:
- nMouseOptions |= MOUSE_OPTION_AUTODEFBTNPOS;
+ nMouseOptions |= MouseSettingsOptions::AutoDefBtnPos;
break;
case SnapToMiddle:
- nMouseOptions |= MOUSE_OPTION_AUTOCENTERPOS;
+ nMouseOptions |= MouseSettingsOptions::AutoCenterPos;
break;
case NoSnap:
default:
@@ -207,11 +207,11 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp )
// Merge and Publish Settings
- sal_uLong nFollow = hMouseSettings.GetFollow();
+ MouseFollowFlags nFollow = hMouseSettings.GetFollow();
if(bMenuMouseFollow)
- nFollow |= MOUSE_FOLLOW_MENU;
+ nFollow |= MouseFollowFlags::Menu;
else
- nFollow &= ~MOUSE_FOLLOW_MENU;
+ nFollow &= ~MouseFollowFlags::Menu;
hMouseSettings.SetFollow( nFollow );
hAppSettings.SetMouseSettings( hMouseSettings );
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index be76a7607848..e3384e5c2e96 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -767,8 +767,8 @@ sal_Int16 SvtMiscOptions::GetCurrentSymbolsSize() const
{
// Use system settings, we have to retrieve the toolbar icon size from the
// Application class
- sal_uLong nStyleIconSize = Application::GetSettings().GetStyleSettings().GetToolbarIconSize();
- if ( nStyleIconSize == STYLE_TOOLBAR_ICONSIZE_LARGE )
+ ToolbarIconSize nStyleIconSize = Application::GetSettings().GetStyleSettings().GetToolbarIconSize();
+ if ( nStyleIconSize == ToolbarIconSize::Large )
eOptSymbolsSize = SFX_SYMBOLS_SIZE_LARGE;
else
eOptSymbolsSize = SFX_SYMBOLS_SIZE_SMALL;
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 720b2044565d..93b997a8664b 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -383,8 +383,8 @@ void FormattedField::SetTextFormatted(const OUString& rStr)
aNewSel.Max() = nNewLen;
if (!nCurrentLen)
{ // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options
- sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
- if (nSelOptions & SELECTION_OPTION_SHOWFIRST)
+ SelectionOptions nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
+ if (nSelOptions & SelectionOptions::ShowFirst)
{ // selection should be from right to left -> swap min and max
aNewSel.Min() = aNewSel.Max();
aNewSel.Max() = 0;
@@ -499,8 +499,8 @@ void FormattedField::ImplSetTextImpl(const OUString& rNew, Selection* pNewSel)
aSel.Max() = nNewLen;
if (!nCurrentLen)
{ // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options
- sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
- if (nSelOptions & SELECTION_OPTION_SHOWFIRST)
+ SelectionOptions nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
+ if (nSelOptions & SelectionOptions::ShowFirst)
{ // selection should be from right to left -> swap min and max
aSel.Min() = aSel.Max();
aSel.Max() = 0;
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index c0c8446189bc..49e784aa7a0c 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -980,7 +980,7 @@ void ValueSet::ImplDraw(vcl::RenderContext& rRenderContext)
Size aWinSize = rRenderContext.GetOutputSizePixel();
Point aPos1(NAME_LINE_OFF_X, mnTextOffset + NAME_LINE_OFF_Y);
Point aPos2(aWinSize.Width() - (NAME_LINE_OFF_X * 2), mnTextOffset + NAME_LINE_OFF_Y);
- if (!(rStyleSettings.GetOptions() & STYLE_OPTION_MONO))
+ if (!(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono))
{
rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
rRenderContext.DrawLine(aPos1, aPos2);
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 0b8e49e74856..52b828926c16 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -85,7 +85,6 @@ using namespace ::dbtools::DBTypeConversion;
using namespace ::dbtools;
using ::com::sun::star::util::XNumberFormatter;
-namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
const char INVALIDTEXT[] = "###";
const char OBJECTTEXT[] = "<OBJECT>";
@@ -890,14 +889,14 @@ void DbCellControl::Init( vcl::Window& rParent, const Reference< XRowSet >& _rxC
if ( xModelPSI->hasPropertyByName( FM_PROP_MOUSE_WHEEL_BEHAVIOR ) )
{
- sal_Int16 nWheelBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY;
+ sal_Int16 nWheelBehavior = css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY;
OSL_VERIFY( xModel->getPropertyValue( FM_PROP_MOUSE_WHEEL_BEHAVIOR ) >>= nWheelBehavior );
- sal_uInt16 nVclSetting = MOUSE_WHEEL_FOCUS_ONLY;
+ MouseWheelBehaviour nVclSetting = MouseWheelBehaviour::FocusOnly;
switch ( nWheelBehavior )
{
- case MouseWheelBehavior::SCROLL_DISABLED: nVclSetting = MOUSE_WHEEL_DISABLE; break;
- case MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclSetting = MOUSE_WHEEL_FOCUS_ONLY; break;
- case MouseWheelBehavior::SCROLL_ALWAYS: nVclSetting = MOUSE_WHEEL_ALWAYS; break;
+ case css::awt::MouseWheelBehavior::SCROLL_DISABLED: nVclSetting = MouseWheelBehaviour::Disable; break;
+ case css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclSetting = MouseWheelBehaviour::FocusOnly; break;
+ case css::awt::MouseWheelBehavior::SCROLL_ALWAYS: nVclSetting = MouseWheelBehaviour::ALWAYS; break;
default:
OSL_FAIL( "DbCellControl::Init: invalid MouseWheelBehavior!" );
break;
@@ -1143,7 +1142,7 @@ void DbTextField::Init( vcl::Window& rParent, const Reference< XRowSet >& xCurso
AllSettings aSettings = m_pWindow->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
aStyleSettings.SetSelectionOptions(
- aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST);
+ aStyleSettings.GetSelectionOptions() | SelectionOptions::ShowFirst);
aSettings.SetStyleSettings(aStyleSettings);
m_pWindow->SetSettings(aSettings);
}
@@ -1271,7 +1270,7 @@ void DbFormattedField::Init( vcl::Window& rParent, const Reference< XRowSet >& x
AllSettings aSettings = m_pWindow->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
aStyleSettings.SetSelectionOptions(
- aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST);
+ aStyleSettings.GetSelectionOptions() | SelectionOptions::ShowFirst);
aSettings.SetStyleSettings(aStyleSettings);
m_pWindow->SetSettings(aSettings);
}
@@ -1622,9 +1621,9 @@ namespace
AllSettings aSettings = _pWindow->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
if( bMono )
- aStyleSettings.SetOptions( aStyleSettings.GetOptions() | STYLE_OPTION_MONO );
+ aStyleSettings.SetOptions( aStyleSettings.GetOptions() | StyleSettingsOptions::Mono );
else
- aStyleSettings.SetOptions( aStyleSettings.GetOptions() & (~STYLE_OPTION_MONO) );
+ aStyleSettings.SetOptions( aStyleSettings.GetOptions() & (~StyleSettingsOptions::Mono) );
aSettings.SetStyleSettings( aStyleSettings );
_pWindow->SetSettings( aSettings );
}
@@ -2467,7 +2466,7 @@ void DbComboBox::Init( vcl::Window& rParent, const Reference< XRowSet >& xCursor
AllSettings aSettings = m_pWindow->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
aStyleSettings.SetSelectionOptions(
- aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST);
+ aStyleSettings.GetSelectionOptions() | SelectionOptions::ShowFirst);
aSettings.SetStyleSettings(aStyleSettings);
m_pWindow->SetSettings(aSettings, true);
@@ -2768,7 +2767,7 @@ void DbFilterField::CreateControl(vcl::Window* pParent, const Reference< ::com::
AllSettings aSettings = m_pWindow->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
aStyleSettings.SetSelectionOptions(
- aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST);
+ aStyleSettings.GetSelectionOptions() | SelectionOptions::ShowFirst);
aSettings.SetStyleSettings(aStyleSettings);
m_pWindow->SetSettings(aSettings, true);
@@ -2789,7 +2788,7 @@ void DbFilterField::CreateControl(vcl::Window* pParent, const Reference< ::com::
AllSettings aSettings = m_pWindow->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
aStyleSettings.SetSelectionOptions(
- aStyleSettings.GetSelectionOptions() | SELECTION_OPTION_SHOWFIRST);
+ aStyleSettings.GetSelectionOptions() | SelectionOptions::ShowFirst);
aSettings.SetStyleSettings(aStyleSettings);
m_pWindow->SetSettings(aSettings, true);
}
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 232ee05041d8..e2439fcad15a 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -82,7 +82,6 @@ using ::com::sun::star::style::VerticalAlignment_BOTTOM;
using ::com::sun::star::style::VerticalAlignment_MAKE_FIXED_SIZE;
namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
-namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
//= VCLXWindowImpl
@@ -1426,18 +1425,18 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st
case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR:
{
- sal_uInt16 nWheelBehavior( MouseWheelBehavior::SCROLL_FOCUS_ONLY );
+ sal_uInt16 nWheelBehavior( css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY );
OSL_VERIFY( Value >>= nWheelBehavior );
AllSettings aSettings = pWindow->GetSettings();
MouseSettings aMouseSettings = aSettings.GetMouseSettings();
- sal_uInt16 nVclBehavior( MOUSE_WHEEL_FOCUS_ONLY );
+ MouseWheelBehaviour nVclBehavior( MouseWheelBehaviour::FocusOnly );
switch ( nWheelBehavior )
{
- case MouseWheelBehavior::SCROLL_DISABLED: nVclBehavior = MOUSE_WHEEL_DISABLE; break;
- case MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclBehavior = MOUSE_WHEEL_FOCUS_ONLY; break;
- case MouseWheelBehavior::SCROLL_ALWAYS: nVclBehavior = MOUSE_WHEEL_ALWAYS; break;
+ case css::awt::MouseWheelBehavior::SCROLL_DISABLED: nVclBehavior = MouseWheelBehaviour::Disable; break;
+ case css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclBehavior = MouseWheelBehaviour::FocusOnly; break;
+ case css::awt::MouseWheelBehavior::SCROLL_ALWAYS: nVclBehavior = MouseWheelBehaviour::ALWAYS; break;
default:
OSL_FAIL( "VCLXWindow::setProperty( 'MouseWheelBehavior' ): illegal property value!" );
}
@@ -1943,13 +1942,13 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st
case BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR:
{
- sal_uInt16 nVclBehavior = GetWindow()->GetSettings().GetMouseSettings().GetWheelBehavior();
- sal_Int16 nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY;
+ MouseWheelBehaviour nVclBehavior = GetWindow()->GetSettings().GetMouseSettings().GetWheelBehavior();
+ sal_uInt16 nBehavior = css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY;
switch ( nVclBehavior )
{
- case MOUSE_WHEEL_DISABLE: nBehavior = MouseWheelBehavior::SCROLL_DISABLED; break;
- case MOUSE_WHEEL_FOCUS_ONLY: nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY; break;
- case MOUSE_WHEEL_ALWAYS: nBehavior = MouseWheelBehavior::SCROLL_ALWAYS; break;
+ case MouseWheelBehaviour::Disable: nBehavior = css::awt::MouseWheelBehavior::SCROLL_DISABLED; break;
+ case MouseWheelBehaviour::FocusOnly: nBehavior = css::awt::MouseWheelBehavior::SCROLL_FOCUS_ONLY; break;
+ case MouseWheelBehaviour::ALWAYS: nBehavior = css::awt::MouseWheelBehavior::SCROLL_ALWAYS; break;
default:
OSL_FAIL( "VCLXWindow::getProperty( 'MouseWheelBehavior' ): illegal VCL value!" );
}
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index d654f92a827b..937e48a84e6d 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -180,11 +180,11 @@ namespace toolkit
switch ( nStyle )
{
case FLAT:
- aStyleSettings.SetOptions( aStyleSettings.GetOptions() | STYLE_OPTION_MONO );
+ aStyleSettings.SetOptions( aStyleSettings.GetOptions() | StyleSettingsOptions::Mono );
break;
case LOOK3D:
default:
- aStyleSettings.SetOptions( aStyleSettings.GetOptions() & ~STYLE_OPTION_MONO );
+ aStyleSettings.SetOptions( aStyleSettings.GetOptions() & ~StyleSettingsOptions::Mono );
}
aSettings.SetStyleSettings( aStyleSettings );
_pWindow->SetSettings( aSettings );
@@ -195,7 +195,7 @@ namespace toolkit
Any aEffect;
StyleSettings aStyleSettings = _pWindow->GetSettings().GetStyleSettings();
- if ( (aStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
+ if ( (aStyleSettings.GetOptions() & StyleSettingsOptions::Mono) )
aEffect <<= (sal_Int16)FLAT;
else
aEffect <<= (sal_Int16)LOOK3D;
@@ -3529,11 +3529,11 @@ void VCLXScrollBar::setProperty( const OUString& PropertyName, const ::com::sun:
}
AllSettings aSettings( pScrollBar->GetSettings() );
StyleSettings aStyle( aSettings.GetStyleSettings() );
- sal_uLong nDragOptions = aStyle.GetDragFullOptions();
+ DragFullOptions nDragOptions = aStyle.GetDragFullOptions();
if ( bDo )
- nDragOptions |= DRAGFULL_OPTION_SCROLL;
+ nDragOptions |= DragFullOptions::Scroll;
else
- nDragOptions &= ~DRAGFULL_OPTION_SCROLL;
+ nDragOptions &= ~DragFullOptions::Scroll;
aStyle.SetDragFullOptions( nDragOptions );
aSettings.SetStyleSettings( aStyle );
pScrollBar->SetSettings( aSettings );
@@ -3637,7 +3637,7 @@ void VCLXScrollBar::setProperty( const OUString& PropertyName, const ::com::sun:
{
case BASEPROPERTY_LIVE_SCROLL:
{
- aProp <<= ( 0 != ( pScrollBar->GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_SCROLL ) );
+ aProp <<= bool( pScrollBar->GetSettings().GetStyleSettings().GetDragFullOptions() & DragFullOptions::Scroll );
}
break;
case BASEPROPERTY_SCROLLVALUE:
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 8a41aa769cac..251f5c3d08ab 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -1154,7 +1154,7 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
getResolution( nDPIX, nDPIY );
aAppFont = getFont( [NSFont systemFontOfSize: 0], nDPIY, aAppFont );
- aStyleSettings.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
+ aStyleSettings.SetToolbarIconSize( ToolbarIconSize::Large );
// TODO: better mapping of OS X<->LibreOffice font settings
aStyleSettings.SetAppFont( aAppFont );
@@ -1204,7 +1204,7 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetCursorBlinkTime( 500 );
// no mnemonics on OS X
- aStyleSettings.SetOptions( aStyleSettings.GetOptions() | STYLE_OPTION_NOMNEMONICS );
+ aStyleSettings.SetOptions( aStyleSettings.GetOptions() | StyleSettingsOptions::NoMnemonics );
getAppleScrollBarVariant(aStyleSettings);
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 3484e582f48e..bb75d8016a0b 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -60,23 +60,23 @@ struct ImplMouseData
ImplMouseData();
ImplMouseData( const ImplMouseData& rData );
- sal_uLong mnOptions;
- sal_uInt64 mnDoubleClkTime;
+ MouseSettingsOptions mnOptions;
+ sal_uInt64 mnDoubleClkTime;
long mnDoubleClkWidth;
long mnDoubleClkHeight;
long mnStartDragWidth;
long mnStartDragHeight;
- sal_uInt16 mnStartDragCode;
- sal_uInt16 mnContextMenuCode;
- sal_uInt16 mnContextMenuClicks;
- sal_uLong mnScrollRepeat;
- sal_uLong mnButtonStartRepeat;
- sal_uLong mnButtonRepeat;
- sal_uLong mnActionDelay;
- sal_uLong mnMenuDelay;
- sal_uLong mnFollow;
- sal_uInt16 mnMiddleButtonAction;
- sal_uInt16 mnWheelBehavior;
+ sal_uInt16 mnStartDragCode;
+ sal_uInt16 mnContextMenuCode;
+ sal_uInt16 mnContextMenuClicks;
+ sal_uLong mnScrollRepeat;
+ sal_uLong mnButtonStartRepeat;
+ sal_uLong mnButtonRepeat;
+ sal_uLong mnActionDelay;
+ sal_uLong mnMenuDelay;
+ MouseFollowFlags mnFollow;
+ MouseMiddleButtonAction mnMiddleButtonAction;
+ MouseWheelBehaviour mnWheelBehavior;
};
struct ImplStyleData
@@ -162,12 +162,12 @@ struct ImplStyleData
long mnCursorSize;
long mnAntialiasedMin;
sal_uInt64 mnCursorBlinkTime;
- sal_uLong mnDragFullOptions;
- sal_uLong mnSelectionOptions;
- sal_uLong mnDisplayOptions;
- sal_uLong mnToolbarIconSize;
+ DragFullOptions mnDragFullOptions;
+ SelectionOptions mnSelectionOptions;
+ DisplayOptions mnDisplayOptions;
+ ToolbarIconSize mnToolbarIconSize;
bool mnUseFlatMenus;
- sal_uLong mnOptions;
+ StyleSettingsOptions mnOptions;
sal_uInt16 mnScreenZoom;
sal_uInt16 mnScreenFontZoom;
bool mbHighContrast;
@@ -253,7 +253,7 @@ struct ImplAllSettingsData
ImplMouseData::ImplMouseData()
{
- mnOptions = 0;
+ mnOptions = MouseSettingsOptions::NONE;
mnDoubleClkTime = 500;
mnDoubleClkWidth = 2;
mnDoubleClkHeight = 2;
@@ -262,14 +262,14 @@ ImplMouseData::ImplMouseData()
mnStartDragCode = MOUSE_LEFT;
mnContextMenuCode = MOUSE_RIGHT;
mnContextMenuClicks = 1;
- mnMiddleButtonAction = MOUSE_MIDDLE_AUTOSCROLL;
+ mnMiddleButtonAction = MouseMiddleButtonAction::AutoScroll;
mnScrollRepeat = 100;
mnButtonStartRepeat = 370;
mnButtonRepeat = 90;
mnActionDelay = 250;
mnMenuDelay = 150;
- mnFollow = MOUSE_FOLLOW_MENU | MOUSE_FOLLOW_DDLIST;
- mnWheelBehavior = MOUSE_WHEEL_ALWAYS;
+ mnFollow = MouseFollowFlags::Menu | MouseFollowFlags::DDList;
+ mnWheelBehavior = MouseWheelBehaviour::ALWAYS;
}
ImplMouseData::ImplMouseData( const ImplMouseData& rData )
@@ -294,13 +294,13 @@ ImplMouseData::ImplMouseData( const ImplMouseData& rData )
}
void
-MouseSettings::SetOptions(sal_uLong nOptions)
+MouseSettings::SetOptions(MouseSettingsOptions nOptions)
{
CopyData();
mxData->mnOptions = nOptions;
}
-sal_uLong
+MouseSettingsOptions
MouseSettings::GetOptions() const
{
return mxData->mnOptions;
@@ -434,39 +434,39 @@ MouseSettings::GetMenuDelay() const
}
void
-MouseSettings::SetFollow( sal_uLong nFollow )
+MouseSettings::SetFollow( MouseFollowFlags nFollow )
{
CopyData();
mxData->mnFollow = nFollow;
}
-sal_uLong
+MouseFollowFlags
MouseSettings::GetFollow() const
{
return mxData->mnFollow;
}
void
-MouseSettings::SetMiddleButtonAction( sal_uInt16 nAction )
+MouseSettings::SetMiddleButtonAction( MouseMiddleButtonAction nAction )
{
CopyData();
mxData->mnMiddleButtonAction = nAction;
}
-sal_uInt16
+MouseMiddleButtonAction
MouseSettings::GetMiddleButtonAction() const
{
return mxData->mnMiddleButtonAction;
}
void
-MouseSettings::SetWheelBehavior( sal_uInt16 nBehavior )
+MouseSettings::SetWheelBehavior( MouseWheelBehaviour nBehavior )
{
CopyData();
mxData->mnWheelBehavior = nBehavior;
}
-sal_uInt16
+MouseWheelBehaviour
MouseSettings::GetWheelBehavior() const
{
return mxData->mnWheelBehavior;
@@ -539,12 +539,12 @@ ImplStyleData::ImplStyleData() :
mnCursorBlinkTime = STYLE_CURSOR_NOBLINKTIME;
mnScreenZoom = 100;
mnScreenFontZoom = 100;
- mnDragFullOptions = DRAGFULL_OPTION_ALL;
- mnSelectionOptions = 0;
- mnDisplayOptions = 0;
- mnOptions = 0;
+ mnDragFullOptions = DragFullOptions::All;
+ mnSelectionOptions = SelectionOptions::NONE;
+ mnDisplayOptions = DisplayOptions::NONE;
+ mnOptions = StyleSettingsOptions::NONE;
mbAutoMnemonic = true;
- mnToolbarIconSize = STYLE_TOOLBAR_ICONSIZE_UNKNOWN;
+ mnToolbarIconSize = ToolbarIconSize::Unknown;
meUseImagesInMenus = TRISTATE_INDET;
mpFontOptions = NULL;
mnEdgeBlending = 35;
@@ -1877,39 +1877,39 @@ StyleSettings::GetScreenFontZoom() const
}
void
-StyleSettings::SetDragFullOptions( sal_uLong nOptions )
+StyleSettings::SetDragFullOptions( DragFullOptions nOptions )
{
CopyData();
mxData->mnDragFullOptions = nOptions;
}
-sal_uLong
+DragFullOptions
StyleSettings::GetDragFullOptions() const
{
return mxData->mnDragFullOptions;
}
void
-StyleSettings::SetSelectionOptions( sal_uLong nOptions )
+StyleSettings::SetSelectionOptions( SelectionOptions nOptions )
{
CopyData();
mxData->mnSelectionOptions = nOptions;
}
-sal_uLong
+SelectionOptions
StyleSettings::GetSelectionOptions() const
{
return mxData->mnSelectionOptions;
}
void
-StyleSettings::SetDisplayOptions( sal_uLong nOptions )
+StyleSettings::SetDisplayOptions( DisplayOptions nOptions )
{
CopyData();
mxData->mnDisplayOptions = nOptions;
}
-sal_uLong
+DisplayOptions
StyleSettings::GetDisplayOptions() const
{
return mxData->mnDisplayOptions;
@@ -1929,7 +1929,7 @@ StyleSettings::GetAntialiasingMinPixelHeight() const
}
void
-StyleSettings::SetOptions( sal_uLong nOptions )
+StyleSettings::SetOptions( StyleSettingsOptions nOptions )
{
CopyData();
mxData->mnOptions = nOptions;
@@ -1962,13 +1962,13 @@ StyleSettings::GetFontColor() const
}
void
-StyleSettings::SetToolbarIconSize( sal_uLong nSize )
+StyleSettings::SetToolbarIconSize( ToolbarIconSize nSize )
{
CopyData();
mxData->mnToolbarIconSize = nSize;
}
-sal_uLong
+ToolbarIconSize
StyleSettings::GetToolbarIconSize() const
{
return mxData->mnToolbarIconSize;
@@ -2993,7 +2993,7 @@ AllSettings::GetStyleSettings() const
return mxData->maStyleSettings;
}
-sal_uLong
+StyleSettingsOptions
StyleSettings::GetOptions() const
{
return mxData->mnOptions;
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index b6256bde0656..3d034966ac69 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -61,6 +61,9 @@ using namespace css;
WB_TOP | WB_VCENTER | WB_BOTTOM | \
WB_WORDBREAK | WB_NOLABEL)
+#define STYLE_RADIOBUTTON_MONO ((sal_uInt16)0x0001) // legacy
+#define STYLE_CHECKBOX_MONO ((sal_uInt16)0x0001) // legacy
+
class ImplCommonButtonData
{
public:
@@ -228,7 +231,7 @@ DrawTextFlags Button::ImplGetTextStyle(OUString& rText, WinBits nWinStyle, sal_u
}
if ((nDrawFlags & WINDOW_DRAW_MONO) ||
- (rStyleSettings.GetOptions() & STYLE_OPTION_MONO))
+ (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono))
{
nTextStyle |= DrawTextFlags::Mono;
}
@@ -749,7 +752,7 @@ DrawTextFlags PushButton::ImplGetTextStyle( sal_uLong nDrawFlags ) const
DrawTextFlags nTextStyle = DrawTextFlags::Mnemonic | DrawTextFlags::MultiLine | DrawTextFlags::EndEllipsis;
- if ( ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO ) ||
+ if ( ( rStyleSettings.GetOptions() & StyleSettingsOptions::Mono ) ||
( nDrawFlags & WINDOW_DRAW_MONO ) )
nTextStyle |= DrawTextFlags::Mono;
@@ -2790,7 +2793,7 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, DrawButtonFlags
const StyleSettings& rStyleSettings = rSettings.GetStyleSettings();
sal_uInt16 nStyle = 0;
- if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
+ if ( rStyleSettings.GetOptions() & StyleSettingsOptions::Mono )
nStyle = STYLE_RADIOBUTTON_MONO;
if ( !pSVData->maCtrlData.mpRadioImgList ||
@@ -3156,13 +3159,13 @@ void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
rMouseRect.Right()-1-nLineSpace < rPos.X()+rSize.Width() )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
+ if ( rStyleSettings.GetOptions() & StyleSettingsOptions::Mono )
SetLineColor( Color( COL_BLACK ) );
else
SetLineColor( rStyleSettings.GetShadowColor() );
long nLineX = rMouseRect.Right()+nLineSpace;
DrawLine( Point( nLineX, nLineY ), Point( rPos.X() + rSize.Width()-1, nLineY ) );
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
+ if ( !(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) )
{
SetLineColor( rStyleSettings.GetLightColor() );
DrawLine( Point( nLineX, nLineY+1 ), Point( rPos.X() + rSize.Width()-1, nLineY+1 ) );
@@ -3660,7 +3663,7 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, DrawButtonFlags nFl
const StyleSettings& rStyleSettings = rSettings.GetStyleSettings();
sal_uInt16 nStyle = 0;
- if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
+ if ( rStyleSettings.GetOptions() & StyleSettingsOptions::Mono )
nStyle = STYLE_CHECKBOX_MONO;
if ( !pSVData->maCtrlData.mpCheckImgList ||
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 0d1bedbfbfbd..b9073a74d10b 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -759,9 +759,9 @@ bool ComboBox::Notify( NotifyEvent& rNEvt )
(rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel) &&
(rNEvt.GetWindow() == mpSubEdit) )
{
- sal_uInt16 nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
- if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
- || ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY )
+ MouseWheelBehaviour nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
+ if ( ( nWheelBehavior == MouseWheelBehaviour::ALWAYS )
+ || ( ( nWheelBehavior == MouseWheelBehaviour::FocusOnly )
&& HasChildPathFocus()
)
)
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 3c573bb1c48a..0c40a341b397 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -363,7 +363,7 @@ void Control::ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect )
// The *only known* clients of the Draw methods of the various VCL-controls are form controls:
// During print preview, and during printing, Draw is called. Thus, drawing always happens with a
// mono (colored) border
- aStyle.SetOptions( aStyle.GetOptions() | STYLE_OPTION_MONO );
+ aStyle.SetOptions( aStyle.GetOptions() | StyleSettingsOptions::Mono );
aStyle.SetMonoColor( GetSettings().GetStyleSettings().GetMonoColor() );
aNewSettings.SetStyleSettings( aStyle );
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 5f09d77cc103..81d5316c991b 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1388,7 +1388,7 @@ void Edit::MouseButtonUp( const MouseEvent& rMEvt )
mbClickedInSelection = false;
}
else if ( rMEvt.IsMiddle() && !mbReadOnly &&
- ( GetSettings().GetMouseSettings().GetMiddleButtonAction() == MOUSE_MIDDLE_PASTESELECTION ) )
+ ( GetSettings().GetMouseSettings().GetMiddleButtonAction() == MouseMiddleButtonAction::PasteSelection ) )
{
::com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboard> aSelection(Window::GetPrimarySelection());
ImplPaste( aSelection );
@@ -1895,11 +1895,11 @@ void Edit::GetFocus()
{
maUndoText = maText.toString();
- sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
+ SelectionOptions nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
if ( !( GetStyle() & (WB_NOHIDESELECTION|WB_READONLY) )
&& ( GetGetFocusFlags() & (GETFOCUS_INIT|GETFOCUS_TAB|GETFOCUS_CURSOR|GETFOCUS_MNEMONIC) ) )
{
- if ( nSelOptions & SELECTION_OPTION_SHOWFIRST )
+ if ( nSelOptions & SelectionOptions::ShowFirst )
{
maSelection.Min() = maText.getLength();
maSelection.Max() = 0;
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index c81725ebf3bf..92ff28c15aa6 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -191,7 +191,7 @@ void FixedText::ImplDraw(OutputDevice* pDev, sal_uLong nDrawFlags,
nTextStyle |= DrawTextFlags::Disable;
}
if ( (nDrawFlags & WINDOW_DRAW_MONO) ||
- (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
+ (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) )
nTextStyle |= DrawTextFlags::Mono;
if( bFillLayout )
@@ -571,7 +571,7 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
nStyle |= DrawTextFlags::Disable;
if (GetStyle() & WB_NOLABEL)
nStyle &= ~DrawTextFlags::Mnemonic;
- if (rStyleSettings.GetOptions() & STYLE_OPTION_MONO)
+ if (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono)
nStyle |= DrawTextFlags::Mono;
DrawControlText(*this, aRect, aText, nStyle, pVector, pDisplayText);
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index e1d871849553..c3f2231cd293 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -118,7 +118,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
nTextStyle |= DrawTextFlags::Disable;
}
if ( (nDrawFlags & WINDOW_DRAW_MONO) ||
- (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
+ (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) )
{
nTextStyle |= DrawTextFlags::Mono;
nDrawFlags |= WINDOW_DRAW_MONO;
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 8b8114221135..48ac8cc5bf89 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -49,7 +49,7 @@ using namespace ::com::sun::star;
void ImplInitDropDownButton( PushButton* pButton )
{
- if ( pButton->GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_SPINUPDOWN )
+ if ( pButton->GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::SpinUpDown )
pButton->SetSymbol( SymbolType::SPIN_UPDOWN );
else
pButton->SetSymbol( SymbolType::SPIN_DOWN );
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index f26a2078cab5..45894fd4697b 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -951,9 +951,9 @@ bool ListBox::PreNotify( NotifyEvent& rNEvt )
(rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel) &&
(rNEvt.GetWindow() == mpImplWin) )
{
- sal_uInt16 nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
- if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
- || ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY )
+ MouseWheelBehaviour nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
+ if ( ( nWheelBehavior == MouseWheelBehaviour::ALWAYS )
+ || ( ( nWheelBehavior == MouseWheelBehaviour::FocusOnly )
&& HasChildPathFocus()
)
)
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index da769c8836da..2db7fc1bdcc7 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -113,7 +113,7 @@ void ScrollBar::ImplInitStyle( WinBits nStyle )
if ( nStyle & WB_DRAG )
mbFullDrag = true;
else
- mbFullDrag = (GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_SCROLL) != 0;
+ mbFullDrag = bool(GetSettings().GetStyleSettings().GetDragFullOptions() & DragFullOptions::Scroll);
}
ScrollBar::ScrollBar( vcl::Window* pParent, WinBits nStyle ) :
@@ -660,7 +660,7 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
DrawSymbolFlags nSymbolStyle = DrawSymbolFlags::NONE;
if ((mnStateFlags & SCRBAR_STATE_BTN1_DISABLE) || !bEnabled)
nSymbolStyle |= DrawSymbolFlags::Disable;
- if (rStyleSettings.GetOptions() & STYLE_OPTION_SCROLLARROW)
+ if (rStyleSettings.GetOptions() & StyleSettingsOptions::ScrollArrow)
{
if (GetStyle() & WB_HORZ)
eSymbolType = SymbolType::ARROW_LEFT;
@@ -687,7 +687,7 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
DrawSymbolFlags nSymbolStyle = DrawSymbolFlags::NONE;
if ((mnStateFlags & SCRBAR_STATE_BTN2_DISABLE) || !bEnabled)
nSymbolStyle |= DrawSymbolFlags::Disable;
- if (rStyleSettings.GetOptions() & STYLE_OPTION_SCROLLARROW)
+ if (rStyleSettings.GetOptions() & StyleSettingsOptions::ScrollArrow)
{
if (GetStyle() & WB_HORZ)
eSymbolType = SymbolType::ARROW_RIGHT;
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index aa185e158dd2..6cf255832b03 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -149,7 +149,7 @@ void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow
SymbolType eType1, eType2;
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- if ( rStyleSettings.GetOptions() & STYLE_OPTION_SPINARROW )
+ if ( rStyleSettings.GetOptions() & StyleSettingsOptions::SpinArrow )
{
// arrows are only use in OS/2 look
if ( bHorz )
@@ -559,9 +559,9 @@ bool SpinField::Notify(NotifyEvent& rNEvt)
{
if ((rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel) && !IsReadOnly())
{
- sal_uInt16 nWheelBehavior(GetSettings().GetMouseSettings().GetWheelBehavior());
- if (nWheelBehavior == MOUSE_WHEEL_ALWAYS
- || (nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY && HasChildPathFocus()))
+ MouseWheelBehaviour nWheelBehavior(GetSettings().GetMouseSettings().GetWheelBehavior());
+ if (nWheelBehavior == MouseWheelBehaviour::ALWAYS
+ || (nWheelBehavior == MouseWheelBehaviour::FocusOnly && HasChildPathFocus()))
{
const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData();
if (pData->GetMode() == CommandWheelMode::SCROLL)
@@ -617,7 +617,7 @@ void SpinField::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
Rectangle aInnerRect = aView.DrawButton(maDropDownRect, nStyle);
SymbolType eSymbol = SymbolType::SPIN_DOWN;
- if (rRenderContext.GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_SPINUPDOWN)
+ if (rRenderContext.GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::SpinUpDown)
eSymbol = SymbolType::SPIN_UPDOWN;
DrawSymbolFlags nSymbolStyle = IsEnabled() ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable;
@@ -1021,7 +1021,7 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, s
DrawButtonFlags nStyle = DrawButtonFlags::NoLightBorder;
Rectangle aInnerRect = aView.DrawButton( aDD, nStyle );
SymbolType eSymbol = SymbolType::SPIN_DOWN;
- if (GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_SPINUPDOWN)
+ if (GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::SpinUpDown)
eSymbol = SymbolType::SPIN_UPDOWN;
DrawSymbolFlags nSymbolStyle = (IsEnabled() || (nFlags & WINDOW_DRAW_NODISABLE)) ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable;
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 1558b7304e6d..ae3111e22966 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -720,7 +720,7 @@ void TabControl::ImplShowFocus()
long nTextWidth = GetCtrlTextWidth( rItem.maFormatText );
sal_uInt16 nOff;
- if ( !(GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_MONO) )
+ if ( !(GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::Mono) )
nOff = 1;
else
nOff = 0;
@@ -785,7 +785,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
sal_uInt16 nOff2 = 0;
sal_uInt16 nOff3 = 0;
- if (!(rStyleSettings.GetOptions() & STYLE_OPTION_MONO))
+ if (!(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono))
nOff = 1;
else
nOff = 0;
@@ -866,7 +866,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
if (!bLayout && !bNativeOK)
{
- if (!(rStyleSettings.GetOptions() & STYLE_OPTION_MONO))
+ if (!(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono))
{
rRenderContext.SetLineColor(rStyleSettings.GetLightColor());
rRenderContext.DrawPixel(Point(aRect.Left() + 1 - nOff2, aRect.Top() + 1 - nOff2)); // diagonally indented top-left pixel
@@ -1143,7 +1143,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle&
else
{
long nTopOff = 1;
- if (!(rStyleSettings.GetOptions() & STYLE_OPTION_MONO))
+ if (!(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono))
rRenderContext.SetLineColor(rStyleSettings.GetLightColor());
else
rRenderContext.SetLineColor(Color(COL_BLACK));
@@ -1170,7 +1170,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle&
{
rRenderContext.DrawLine(aRect.TopLeft(), aRect.BottomLeft());
- if (!(rStyleSettings.GetOptions() & STYLE_OPTION_MONO))
+ if (!(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono))
{
// if we have not tab page the bottom line of the tab page
// directly touches the tab items, so choose a color that fits seamlessly
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 0720fd4c9cb8..0898838dbb00 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -210,7 +210,7 @@ TextView::TextView( TextEngine* pEng, vcl::Window* pWindow ) :
pWindow->SetCursor( mpImpl->mpCursor );
pWindow->SetInputContext( InputContext( pEng->GetFont(), InputContextFlags::Text|InputContextFlags::ExtText ) );
- if ( pWindow->GetSettings().GetStyleSettings().GetSelectionOptions() & SELECTION_OPTION_INVERT )
+ if ( pWindow->GetSettings().GetStyleSettings().GetSelectionOptions() & SelectionOptions::Invert )
mpImpl->mbHighlightSelection = true;
pWindow->SetLineColor();
@@ -806,7 +806,7 @@ void TextView::MouseButtonUp( const MouseEvent& rMouseEvent )
mpImpl->mnTravelXPos = TRAVEL_X_DONTKNOW;
mpImpl->mpSelEngine->SelMouseButtonUp( rMouseEvent );
if ( rMouseEvent.IsMiddle() && !IsReadOnly() &&
- ( GetWindow()->GetSettings().GetMouseSettings().GetMiddleButtonAction() == MOUSE_MIDDLE_PASTESELECTION ) )
+ ( GetWindow()->GetSettings().GetMouseSettings().GetMiddleButtonAction() == MouseMiddleButtonAction::PasteSelection ) )
{
uno::Reference<datatransfer::clipboard::XClipboard> aSelection(GetWindow()->GetPrimarySelection());
Paste( aSelection );
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index bb9cbf989efe..b6044dc6ab25 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -911,7 +911,7 @@ void TextWindow::GetFocus()
bool bGotoCursor = !mpExtTextView->IsReadOnly();
if ( mbFocusSelectionHide && IsReallyVisible() && !mpExtTextView->IsReadOnly()
&& ( mbSelectOnTab &&
- (!mbInMBDown || ( GetSettings().GetStyleSettings().GetSelectionOptions() & SELECTION_OPTION_FOCUS ) )) )
+ (!mbInMBDown || ( GetSettings().GetStyleSettings().GetSelectionOptions() & SelectionOptions::Focus ) )) )
{
// select everything, but do not scroll
bool bAutoScroll = mpExtTextView->IsAutoScroll();
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index d4c77d520876..216c8a6f8fcd 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1495,7 +1495,7 @@ void OutputDevice::InitFont() const
// decide if antialiasing is appropriate
bool bNonAntialiased(GetAntialiasing() & AntialiasingFlags::DisableText);
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- bNonAntialiased |= ((rStyleSettings.GetDisplayOptions() & DISPLAY_OPTION_AA_DISABLE) != 0);
+ bNonAntialiased |= bool(rStyleSettings.GetDisplayOptions() & DisplayOptions::AADisable);
bNonAntialiased |= (int(rStyleSettings.GetAntialiasingMinPixelHeight()) > mpFontEntry->maFontSelData.mnHeight);
mpFontEntry->maFontSelData.mbNonAntialiased = bNonAntialiased;
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index fbef3085fc57..cda2ba2d17ee 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1597,7 +1597,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
if ( nStyle & DrawTextFlags::Mnemonic )
aStr = GetNonMnemonicString( aStr, nMnemonicPos );
- const bool bDrawMnemonics = !(rTargetDevice.GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_NOMNEMONICS) && !pVector;
+ const bool bDrawMnemonics = !(rTargetDevice.GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::NoMnemonics) && !pVector;
// We treat multiline text differently
if ( nStyle & DrawTextFlags::MultiLine )
@@ -2258,7 +2258,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr,
SetTextColor( GetSettings().GetStyleSettings().GetDisableColor() );
DrawText( rPos, aStr, nIndex, nLen, pVector, pDisplayText );
- if ( !(GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_NOMNEMONICS) && !pVector )
+ if ( !(GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::NoMnemonics) && !pVector )
{
if ( nMnemonicPos != -1 )
ImplDrawMnemonicLine( nMnemonicX, nMnemonicY, nMnemonicWidth );
@@ -2270,7 +2270,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr,
else
{
DrawText( rPos, aStr, nIndex, nLen, pVector, pDisplayText );
- if ( !(GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_NOMNEMONICS) && !pVector )
+ if ( !(GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::NoMnemonics) && !pVector )
{
if ( nMnemonicPos != -1 )
ImplDrawMnemonicLine( nMnemonicX, nMnemonicY, nMnemonicWidth );
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 44afe837cfbf..ec15317fc532 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -337,7 +337,7 @@ bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons
pData->mnHitTest = ImplHitTest( pData, pData->maMouseOff );
if ( pData->mnHitTest )
{
- sal_uInt16 nDragFullTest = 0;
+ DragFullOptions nDragFullTest = DragFullOptions::NONE;
bool bTracking = true;
bool bHitTest = true;
@@ -397,9 +397,9 @@ bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons
pData->mnTrackHeight = aSize.Height();
if ( pData->mnHitTest & BORDERWINDOW_HITTEST_TITLE )
- nDragFullTest = DRAGFULL_OPTION_WINDOWMOVE;
+ nDragFullTest = DragFullOptions::WindowMove;
else
- nDragFullTest = DRAGFULL_OPTION_WINDOWSIZE;
+ nDragFullTest = DragFullOptions::WindowSize;
}
}
else
@@ -433,7 +433,7 @@ bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons
if ( bTracking )
{
pData->mbDragFull = false;
- if ( nDragFullTest )
+ if ( nDragFullTest != DragFullOptions::NONE )
pData->mbDragFull = true; // always fulldrag for proper docking, ignore system settings
pBorderWindow->StartTracking();
}
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index e560ccf29573..d0f42755a893 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -495,7 +495,7 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
if ( (nStyle & DrawButtonFlags::Mono) ||
- (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
+ (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) )
{
const Color aBlackColor( COL_BLACK );
@@ -645,7 +645,7 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
const bool bNoDraw(nFlags & DrawFrameFlags::NoDraw);
- if ( (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) ||
+ if ( (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ||
(pDev->GetOutDevType() == OUTDEV_PRINTER) ||
bFlatBorders )
nFlags |= DrawFrameFlags::Mono;
@@ -846,7 +846,7 @@ void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType,
Color nColor(rColor);
mpOutDev->EnableMapMode( false );
- if ( (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) ||
+ if ( (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ||
(mpOutDev->GetOutDevType() == OUTDEV_PRINTER) )
nStyle |= DrawSymbolFlags::Mono;
@@ -898,7 +898,7 @@ void DecorationView::DrawHighlightFrame( const Rectangle& rRect,
Color aLightColor = rStyleSettings.GetLightColor();
Color aShadowColor = rStyleSettings.GetShadowColor();
- if ( (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) ||
+ if ( (rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) ||
(mpOutDev->GetOutDevType() == OUTDEV_PRINTER) )
{
aLightColor = Color( COL_BLACK );
@@ -1068,13 +1068,13 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
}
mpOutDev->Push( PushFlags::LINECOLOR );
- if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
+ if ( rStyleSettings.GetOptions() & StyleSettingsOptions::Mono )
mpOutDev->SetLineColor( Color( COL_BLACK ) );
else
mpOutDev->SetLineColor( rStyleSettings.GetShadowColor() );
mpOutDev->DrawLine( aStart, aStop );
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
+ if ( !(rStyleSettings.GetOptions() & StyleSettingsOptions::Mono) )
{
mpOutDev->SetLineColor( rStyleSettings.GetLightColor() );
if( bVertical )
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index c87ed80c9533..e4aa836ffc18 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -310,13 +310,13 @@ static PushButton* ImplGetCancelButton( Dialog* pDialog )
static void ImplMouseAutoPos( Dialog* pDialog )
{
- sal_uLong nMouseOptions = pDialog->GetSettings().GetMouseSettings().GetOptions();
- if ( nMouseOptions & MOUSE_OPTION_AUTOCENTERPOS )
+ MouseSettingsOptions nMouseOptions = pDialog->GetSettings().GetMouseSettings().GetOptions();
+ if ( nMouseOptions & MouseSettingsOptions::AutoCenterPos )
{
Size aSize = pDialog->GetOutputSizePixel();
pDialog->SetPointerPosPixel( Point( aSize.Width()/2, aSize.Height()/2 ) );
}
- else if ( nMouseOptions & MOUSE_OPTION_AUTODEFBTNPOS )
+ else if ( nMouseOptions & MouseSettingsOptions::AutoDefBtnPos )
{
vcl::Window* pWindow = ImplGetDefaultButton( pDialog );
if ( !pWindow )
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index d7e8b4b7d04a..37f23599525f 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -288,7 +288,7 @@ bool DockingWindow::ImplStartDocking( const Point& rPos )
mnTrackHeight += mnDockTop+mnDockBottom;
}
- if ( GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_DOCKING &&
+ if ( GetSettings().GetStyleSettings().GetDragFullOptions() & DragFullOptions::Docking &&
!( mnFloatBits & ( WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) ) ) // no full drag when migrating to system window
mbDragFull = true;
else
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 6c97de76aa5c..2217797ced8e 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -492,7 +492,7 @@ void Splitter::StartDrag()
else
mnStartSplitPos = maDragPos.Y();
- mbDragFull = (Application::GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_SPLIT) != 0;
+ mbDragFull = bool(Application::GetSettings().GetStyleSettings().GetDragFullOptions() & DragFullOptions::Split);
if ( !mbDragFull )
ImplDrawSplitter();
}
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index ae529df3ecae..686348a9f1a6 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -2163,7 +2163,7 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
StartTracking();
- mbDragFull = (GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_SPLIT) != 0;
+ mbDragFull = bool(GetSettings().GetStyleSettings().GetDragFullOptions() & DragFullOptions::Split);
ImplSplitMousePos( aMousePosPixel );
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 3291feb8a5a2..738a64cd15fb 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -697,7 +697,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
{
// Auto-ToTop
if ( !pSVData->maWinData.mpCaptureWin &&
- (pChild->GetSettings().GetMouseSettings().GetOptions() & MOUSE_OPTION_AUTOFOCUS) )
+ (pChild->GetSettings().GetMouseSettings().GetOptions() & MouseSettingsOptions::AutoFocus) )
pChild->ToTop( TOTOP_NOGRABFOCUS );
if( aDelData.IsDead() )
@@ -785,10 +785,10 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
if ( /*!bRet &&*/ (nClicks == 1) && (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN) &&
(nCode == MOUSE_MIDDLE) )
{
- sal_uInt16 nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction();
- if ( nMiddleAction == MOUSE_MIDDLE_AUTOSCROLL )
+ MouseMiddleButtonAction nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction();
+ if ( nMiddleAction == MouseMiddleButtonAction::AutoScroll )
bRet = !ImplCallCommand( pChild, CommandEventId::StartAutoScroll, NULL, true, &aChildPos );
- else if ( nMiddleAction == MOUSE_MIDDLE_PASTESELECTION )
+ else if ( nMiddleAction == MouseMiddleButtonAction::PasteSelection )
bRet = !ImplCallCommand( pChild, CommandEventId::PasteSelection, NULL, true, &aChildPos );
}
else
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index b29c13a4f123..b4f1ba0ba346 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -4214,7 +4214,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetPreferredIconTheme( OUString::createFromAscii( pIconThemeName ) );
g_free( pIconThemeName );
- aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
+ aStyleSet.SetToolbarIconSize( ToolbarIconSize::Large );
const cairo_font_options_t* pNewOptions = gdk_screen_get_font_options( pScreen );
aStyleSet.SetCairoFontOptions( pNewOptions );
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index b59ccdebf3be..9cdf85052a42 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -1760,7 +1760,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetPreferredIconTheme( OUString::createFromAscii( pIconThemeName ) );
g_free( pIconThemeName );
- aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
+ aStyleSet.SetToolbarIconSize( ToolbarIconSize::Large );
const cairo_font_options_t* pNewOptions = gdk_screen_get_font_options(pScreen);
aStyleSet.SetCairoFontOptions( pNewOptions );
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index e014e78f3136..6ee56003a328 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -1843,7 +1843,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
StyleSettings aStyleSettings( rSettings.GetStyleSettings() );
bool bSetTitleFont = false;
- aStyleSettings.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
+ aStyleSettings.SetToolbarIconSize( ToolbarIconSize::Large );
// WM settings
KConfig *pConfig = KGlobal::config();
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 51f6cf59b363..b7806f4689a8 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -166,7 +166,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
// General settings
QPalette pal = QApplication::palette();
- style.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
+ style.SetToolbarIconSize( ToolbarIconSize::Large );
style.SetActiveColor(toColor(pal.color(QPalette::Active, QPalette::Window)));
style.SetDeactiveColor(toColor(pal.color(QPalette::Inactive, QPalette::Window)));
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 25058c5d2edd..f8e0b69623e6 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2784,7 +2784,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
ReleaseDC( 0, hDC );
- aStyleSettings.SetToolbarIconSize(STYLE_TOOLBAR_ICONSIZE_LARGE);
+ aStyleSettings.SetToolbarIconSize(ToolbarIconSize::Large);
aStyleSettings.SetMenuFont( aMenuFont );
aStyleSettings.SetTitleFont( aTitleFont );
@@ -2818,11 +2818,11 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
BOOL bDragFull;
if ( SystemParametersInfo( SPI_GETDRAGFULLWINDOWS, 0, &bDragFull, 0 ) )
{
- sal_uLong nDragFullOptions = aStyleSettings.GetDragFullOptions();
+ DragFullOptions nDragFullOptions = aStyleSettings.GetDragFullOptions();
if ( bDragFull )
- nDragFullOptions |= DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE | DRAGFULL_OPTION_DOCKING | DRAGFULL_OPTION_SPLIT;
+ nDragFullOptions |= DragFullOptions::WindowMove | DragFullOptions::WindowSize | DragFullOptions::Docking | DragFullOptions::Split;
else
- nDragFullOptions &= ~(DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE | DRAGFULL_OPTION_DOCKING | DRAGFULL_OPTION_SPLIT);
+ nDragFullOptions &= ~DragFullOptions(DragFullOptions::WindowMove | DragFullOptions::WindowSize | DragFullOptions::Docking | DragFullOptions::Split);
aStyleSettings.SetDragFullOptions( nDragFullOptions );
}