diff options
Diffstat (limited to 'svtools/source/config/apearcfg.cxx')
-rw-r--r-- | svtools/source/config/apearcfg.cxx | 105 |
1 files changed, 28 insertions, 77 deletions
diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx index a40b149d780b..1c581dbf8f53 100644 --- a/svtools/source/config/apearcfg.cxx +++ b/svtools/source/config/apearcfg.cxx @@ -52,7 +52,6 @@ sal_Bool SvtTabAppearanceCfg::bInitialized = sal_False; --------------------------------------------------------------------*/ SvtTabAppearanceCfg::SvtTabAppearanceCfg() :ConfigItem(OUString::createFromAscii("Office.Common/View")) - ,nLookNFeel ( DEFAULT_LOOKNFEEL ) ,nDragMode ( DEFAULT_DRAGMODE ) ,nScaleFactor ( DEFAULT_SCALEFACTOR ) ,nSnapMode ( DEFAULT_SNAPMODE ) @@ -60,11 +59,9 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) ,nAAMinPixelHeight ( DEFAULT_AAMINHEIGHT ) #endif - ,bMenuMouseFollow(FALSE) - ,bSingleLineTabCtrl(FALSE) - ,bColoredTabCtrl(FALSE) + ,bMenuMouseFollow(sal_False) #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - ,bFontAntialiasing ( TRUE ) + ,bFontAntialiasing ( sal_True ) #endif { RTL_LOGFILE_CONTEXT(aLog, "svtools SvtTabAppearanceCfg::SvtTabAppearanceCfg()"); @@ -83,16 +80,13 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() switch(nProp) { case 0: *pValues >>= nScaleFactor; break; //"FontScaling", - case 1: *pValues >>= nLookNFeel; break; //"LookAndFeel", - case 2: *pValues >>= nDragMode; break; //"Window/Drag", - case 3: bMenuMouseFollow = *(sal_Bool*)pValues->getValue(); break; //"Menu/FollowMouse", - case 4: bSingleLineTabCtrl = *(sal_Bool*)pValues->getValue(); break; //"Dialog/SingleLineTab", - case 5: bColoredTabCtrl = *(sal_Bool*)pValues->getValue(); break; //"Dialog/ColoredTab", - case 6: *pValues >>= nSnapMode; break; //"Dialog/MousePositioning", - case 7: *pValues >>= nMiddleMouse; break; //"Dialog/MiddleMouseButton", + case 1: *pValues >>= nDragMode; break; //"Window/Drag", + case 2: bMenuMouseFollow = *(sal_Bool*)pValues->getValue(); break; //"Menu/FollowMouse", + case 3: *pValues >>= nSnapMode; break; //"Dialog/MousePositioning", + case 4: *pValues >>= nMiddleMouse; break; //"Dialog/MiddleMouseButton", #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - case 8: bFontAntialiasing = *(sal_Bool*)pValues->getValue(); break; // "FontAntialising/Enabled", - case 9: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", + case 5: bFontAntialiasing = *(sal_Bool*)pValues->getValue(); break; // "FontAntialising/Enabled", + case 6: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", #endif } } @@ -116,16 +110,13 @@ const Sequence<OUString>& SvtTabAppearanceCfg::GetPropertyNames() static const sal_Char* aPropNames[] = { "FontScaling" // 0 - ,"LookAndFeel" // 1 - ,"Window/Drag" // 2 - ,"Menu/FollowMouse" // 3 - ,"Dialog/SingleLineTab" // 4 - ,"Dialog/ColoredTab" // 5 - ,"Dialog/MousePositioning" // 6 - ,"Dialog/MiddleMouseButton" // 7 + ,"Window/Drag" // 1 + ,"Menu/FollowMouse" // 2 + ,"Dialog/MousePositioning" // 3 + ,"Dialog/MiddleMouseButton" // 4 #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - ,"FontAntiAliasing/Enabled" // 8 - ,"FontAntiAliasing/MinPixelHeight" // 9 + ,"FontAntiAliasing/Enabled" // 5 + ,"FontAntiAliasing/MinPixelHeight" // 6 #endif }; const int nCount = sizeof( aPropNames ) / sizeof( aPropNames[0] ); @@ -153,16 +144,13 @@ void SvtTabAppearanceCfg::Commit() switch(nProp) { case 0: pValues[nProp] <<= nScaleFactor; break; // "FontScaling", - case 1: pValues[nProp] <<= nLookNFeel; break; //"LookAndFeel", - case 2: pValues[nProp] <<= nDragMode; break; //"Window/Drag", - case 3: pValues[nProp].setValue(&bMenuMouseFollow, rType); break; //"Menu/FollowMouse", - case 4: pValues[nProp].setValue(&bSingleLineTabCtrl, rType); break; //"Dialog/SingleLineTab", - case 5: pValues[nProp].setValue(&bColoredTabCtrl, rType); break; //"Dialog/ColoredTab", - case 6: pValues[nProp] <<= nSnapMode; break; //"Dialog/MousePositioning", - case 7: pValues[nProp] <<= nMiddleMouse; break; //"Dialog/MiddleMouseButton", + 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", #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - case 8: pValues[nProp].setValue(&bFontAntialiasing, rType); break; // "FontAntialising/Enabled", - case 9: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", + case 5: pValues[nProp].setValue(&bFontAntialiasing, rType); break; // "FontAntialising/Enabled", + case 6: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", #endif } } @@ -177,17 +165,7 @@ void SvtTabAppearanceCfg::Notify( const com::sun::star::uno::Sequence< rtl::OUSt Beschreibung: --------------------------------------------------------------------*/ -void SvtTabAppearanceCfg::SetLookNFeel ( USHORT nSet ) -{ - nLookNFeel = nSet; - SetModified(); -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -void SvtTabAppearanceCfg::SetDragMode ( USHORT nSet ) +void SvtTabAppearanceCfg::SetDragMode ( sal_uInt16 nSet ) { nDragMode = nSet; SetModified(); @@ -197,7 +175,7 @@ void SvtTabAppearanceCfg::SetDragMode ( USHORT nSet ) Beschreibung: --------------------------------------------------------------------*/ -void SvtTabAppearanceCfg::SetScaleFactor ( USHORT nSet ) +void SvtTabAppearanceCfg::SetScaleFactor ( sal_uInt16 nSet ) { nScaleFactor = nSet; SetModified(); @@ -207,7 +185,7 @@ void SvtTabAppearanceCfg::SetScaleFactor ( USHORT nSet ) Beschreibung: --------------------------------------------------------------------*/ -void SvtTabAppearanceCfg::SetSnapMode ( USHORT nSet ) +void SvtTabAppearanceCfg::SetSnapMode ( sal_uInt16 nSet ) { nSnapMode = nSet; SetModified(); @@ -215,7 +193,7 @@ void SvtTabAppearanceCfg::SetSnapMode ( USHORT nSet ) /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ -void SvtTabAppearanceCfg::SetMiddleMouseButton ( USHORT nSet ) +void SvtTabAppearanceCfg::SetMiddleMouseButton ( sal_uInt16 nSet ) { nMiddleMouse = nSet; SetModified(); @@ -233,27 +211,8 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) // SetStandard...Styles() resets the UseSystemUIFonts flag, // but we don't want to change it now, so save the flag before ... - BOOL bUseSystemUIFonts = hAppStyle.GetUseSystemUIFonts(); - - switch ( nLookNFeel ) - { - case LookMotif: - hAppStyle.SetStandardUnixStyles(); break; - - case LookOSTwo: - hAppStyle.SetStandardOS2Styles(); break; - - case LookMacintosh: - hAppStyle.SetStandardMacStyles(); break; - - case LookWindows: - hAppStyle.SetStandardWinStyles(); break; - - case LookStardivision: - default: - hAppStyle.SetStandardStyles(); break; - } - + sal_Bool bUseSystemUIFonts = hAppStyle.GetUseSystemUIFonts(); + hAppStyle.SetStandardStyles(); // and set it here hAppStyle.SetUseSystemUIFonts( bUseSystemUIFonts ); @@ -271,7 +230,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) // Mouse Snap MouseSettings hMouseSettings = hAppSettings.GetMouseSettings(); - ULONG nMouseOptions = hMouseSettings.GetOptions(); + sal_uLong nMouseOptions = hMouseSettings.GetOptions(); nMouseOptions &= ! (MOUSE_OPTION_AUTOCENTERPOS | MOUSE_OPTION_AUTODEFBTNPOS); @@ -292,20 +251,12 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) // Merge and Publish Settings - ULONG nFollow = hMouseSettings.GetFollow(); + sal_uLong nFollow = hMouseSettings.GetFollow(); if(bMenuMouseFollow) nFollow |= MOUSE_FOLLOW_MENU; else nFollow &= ~MOUSE_FOLLOW_MENU; hMouseSettings.SetFollow( nFollow ); - sal_uInt16 nTabStyle = 0; - if(bSingleLineTabCtrl) - nTabStyle |= STYLE_TABCONTROL_SINGLELINE; - - if(bColoredTabCtrl) - nTabStyle |= STYLE_TABCONTROL_COLOR; - hAppStyle.SetTabControlStyle(nTabStyle); - hAppSettings.SetMouseSettings( hMouseSettings ); |