diff options
Diffstat (limited to 'svtools/source/config')
-rw-r--r-- | svtools/source/config/apearcfg.cxx | 46 | ||||
-rw-r--r-- | svtools/source/config/colorcfg.cxx | 28 | ||||
-rw-r--r-- | svtools/source/config/helpopt.cxx | 98 | ||||
-rw-r--r-- | svtools/source/config/htmlcfg.cxx | 120 |
4 files changed, 146 insertions, 146 deletions
diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx index 7ccfa0f142a9..e74cbe33ae84 100644 --- a/svtools/source/config/apearcfg.cxx +++ b/svtools/source/config/apearcfg.cxx @@ -54,35 +54,35 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() const Any* pValues = aValues.getConstArray(); DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed"); - if(aValues.getLength() == rNames.getLength()) + if(aValues.getLength() != rNames.getLength()) + return; + + for(int nProp = 0; nProp < rNames.getLength(); ++nProp, ++pValues) { - for(int nProp = 0; nProp < rNames.getLength(); ++nProp, ++pValues) + if(pValues->hasValue()) { - if(pValues->hasValue()) + switch(nProp) { - switch(nProp) + case 0: //"Window/Drag" + { + short nTmp; + if (*pValues >>= nTmp) + nDragMode = (DragMode)nTmp; + break; + } + case 1: bMenuMouseFollow = *o3tl::doAccess<bool>(*pValues); break; //"Menu/FollowMouse", + case 2: { - case 0: //"Window/Drag" - { - short nTmp; - if (*pValues >>= nTmp) - nDragMode = (DragMode)nTmp; - break; - } - case 1: bMenuMouseFollow = *o3tl::doAccess<bool>(*pValues); break; //"Menu/FollowMouse", - case 2: - { - short nTmp; - if (*pValues >>= nTmp) - nSnapMode = (SnapType)nTmp; //"Dialog/MousePositioning", - break; - } - case 3: { short nTmp = 0; *pValues >>= nTmp; nMiddleMouse = static_cast<MouseMiddleButtonAction>(nTmp); break; } //"Dialog/MiddleMouseButton", + short nTmp; + if (*pValues >>= nTmp) + nSnapMode = (SnapType)nTmp; //"Dialog/MousePositioning", + break; + } + case 3: { short nTmp = 0; *pValues >>= nTmp; nMiddleMouse = static_cast<MouseMiddleButtonAction>(nTmp); break; } //"Dialog/MiddleMouseButton", #if defined( UNX ) - case 4: bFontAntialiasing = *o3tl::doAccess<bool>(*pValues); break; // "FontAntialising/Enabled", - case 5: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", + case 4: bFontAntialiasing = *o3tl::doAccess<bool>(*pValues); break; // "FontAntialising/Enabled", + case 5: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", #endif - } } } } diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index 9acf01a6326c..c7be767896a3 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -346,24 +346,24 @@ IMPL_LINK( ColorConfig_Impl, DataChangedEventListener, VclSimpleEvent&, rEvent, void ColorConfig_Impl::ImplUpdateApplicationSettings() { Application* pApp = GetpApp(); - if( pApp ) - { - AllSettings aSettings = Application::GetSettings(); - StyleSettings aStyleSettings( aSettings.GetStyleSettings() ); + if( !pApp ) + return; - ColorConfigValue aRet = GetColorConfigValue(svtools::FONTCOLOR); - if(COL_AUTO == sal::static_int_cast<ColorData>(aRet.nColor)) - aRet.nColor = ColorConfig::GetDefaultColor(svtools::FONTCOLOR).GetColor(); + AllSettings aSettings = Application::GetSettings(); + StyleSettings aStyleSettings( aSettings.GetStyleSettings() ); - Color aFontColor(aRet.nColor); + ColorConfigValue aRet = GetColorConfigValue(svtools::FONTCOLOR); + if(COL_AUTO == sal::static_int_cast<ColorData>(aRet.nColor)) + aRet.nColor = ColorConfig::GetDefaultColor(svtools::FONTCOLOR).GetColor(); - if( aStyleSettings.GetFontColor() != aFontColor ) - { - aStyleSettings.SetFontColor( aFontColor ); + Color aFontColor(aRet.nColor); - aSettings.SetStyleSettings( aStyleSettings ); - Application::SetSettings( aSettings ); - } + if( aStyleSettings.GetFontColor() != aFontColor ) + { + aStyleSettings.SetFontColor( aFontColor ); + + aSettings.SetStyleSettings( aStyleSettings ); + Application::SetSettings( aSettings ); } } diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx index bc1ac4d014c1..3a2ec50d60da 100644 --- a/svtools/source/config/helpopt.cxx +++ b/svtools/source/config/helpopt.cxx @@ -136,66 +136,66 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< OUString>& rPropertyNames) Sequence< Any > aValues = GetProperties( rPropertyNames ); const Any* pValues = aValues.getConstArray(); DBG_ASSERT( aValues.getLength() == rPropertyNames.getLength(), "GetProperties failed" ); - if ( aValues.getLength() == rPropertyNames.getLength() ) + if ( aValues.getLength() != rPropertyNames.getLength() ) + return; + + for ( int nProp = 0; nProp < rPropertyNames.getLength(); nProp++ ) { - for ( int nProp = 0; nProp < rPropertyNames.getLength(); nProp++ ) + assert(pValues[nProp].hasValue() && "property value missing"); + if ( pValues[nProp].hasValue() ) { - assert(pValues[nProp].hasValue() && "property value missing"); - if ( pValues[nProp].hasValue() ) + bool bTmp; + OUString aTmpStr; + sal_Int32 nTmpInt = 0; + if ( pValues[nProp] >>= bTmp ) { - bool bTmp; - OUString aTmpStr; - sal_Int32 nTmpInt = 0; - if ( pValues[nProp] >>= bTmp ) - { - switch ( static_cast< HelpProperty >( - lcl_MapPropertyName(rPropertyNames[nProp], aInternalPropertyNames) ) ) - { - case HelpProperty::ExtendedHelp: - bExtendedHelp = bTmp; - break; - case HelpProperty::HelpTips: - bHelpTips = bTmp; - break; - default: - SAL_WARN( "svtools.config", "Wrong Member!" ); - break; - } - } - else if ( pValues[nProp] >>= aTmpStr ) + switch ( static_cast< HelpProperty >( + lcl_MapPropertyName(rPropertyNames[nProp], aInternalPropertyNames) ) ) { - switch ( static_cast< HelpProperty >(nProp) ) - { - case HelpProperty::Locale: - aLocale = aTmpStr; - break; - - case HelpProperty::System: - aSystem = aTmpStr; - break; - case HelpProperty::StyleSheet: - sHelpStyleSheet = aTmpStr; + case HelpProperty::ExtendedHelp: + bExtendedHelp = bTmp; + break; + case HelpProperty::HelpTips: + bHelpTips = bTmp; + break; + default: + SAL_WARN( "svtools.config", "Wrong Member!" ); break; - default: - SAL_WARN( "svtools.config", "Wrong Member!" ); - break; - } - } - else if ( pValues[nProp] >>= nTmpInt ) - { - SAL_WARN( "svtools.config", "Wrong Member!" ); } - else + } + else if ( pValues[nProp] >>= aTmpStr ) + { + switch ( static_cast< HelpProperty >(nProp) ) { - SAL_WARN( "svtools.config", "Wrong Type!" ); + case HelpProperty::Locale: + aLocale = aTmpStr; + break; + + case HelpProperty::System: + aSystem = aTmpStr; + break; + case HelpProperty::StyleSheet: + sHelpStyleSheet = aTmpStr; + break; + default: + SAL_WARN( "svtools.config", "Wrong Member!" ); + break; } } + else if ( pValues[nProp] >>= nTmpInt ) + { + SAL_WARN( "svtools.config", "Wrong Member!" ); + } + else + { + SAL_WARN( "svtools.config", "Wrong Type!" ); + } } - if ( IsHelpTips() != Help::IsQuickHelpEnabled() ) - IsHelpTips() ? Help::EnableQuickHelp() : Help::DisableQuickHelp(); - if ( IsExtendedHelp() != Help::IsBalloonHelpEnabled() ) - IsExtendedHelp() ? Help::EnableBalloonHelp() : Help::DisableBalloonHelp(); } + if ( IsHelpTips() != Help::IsQuickHelpEnabled() ) + IsHelpTips() ? Help::EnableQuickHelp() : Help::DisableQuickHelp(); + if ( IsExtendedHelp() != Help::IsBalloonHelpEnabled() ) + IsExtendedHelp() ? Help::EnableBalloonHelp() : Help::DisableBalloonHelp(); } void SvtHelpOptions_Impl::ImplCommit() diff --git a/svtools/source/config/htmlcfg.cxx b/svtools/source/config/htmlcfg.cxx index f20d725f8e28..cbf6cff6282e 100644 --- a/svtools/source/config/htmlcfg.cxx +++ b/svtools/source/config/htmlcfg.cxx @@ -123,71 +123,71 @@ void SvxHtmlOptions::Load( const Sequence< OUString >& aNames ) Sequence<Any> aValues = GetProperties(aNames); const Any* pValues = aValues.getConstArray(); DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed"); - if(aValues.getLength() == aNames.getLength()) + if(aValues.getLength() != aNames.getLength()) + return; + + pImpl->nFlags = HtmlCfgFlags::NONE; + for(int nProp = 0; nProp < aNames.getLength(); nProp++) { - pImpl->nFlags = HtmlCfgFlags::NONE; - for(int nProp = 0; nProp < aNames.getLength(); nProp++) + if(pValues[nProp].hasValue()) { - if(pValues[nProp].hasValue()) + switch(nProp) { - switch(nProp) - { - case 0: - if(*o3tl::doAccess<bool>(pValues[nProp])) - pImpl->nFlags |= HtmlCfgFlags::UnknownTags; - break;//"Import/UnknownTag", - case 1: - if(*o3tl::doAccess<bool>(pValues[nProp])) - pImpl->nFlags |= HtmlCfgFlags::IgnoreFontFamily; - break;//"Import/FontSetting", - case 2: pValues[nProp] >>= pImpl->aFontSizeArr[0]; break;//"Import/FontSize/Size_1", - case 3: pValues[nProp] >>= pImpl->aFontSizeArr[1]; break;//"Import/FontSize/Size_2", - case 4: pValues[nProp] >>= pImpl->aFontSizeArr[2]; break;//"Import/FontSize/Size_3", - case 5: pValues[nProp] >>= pImpl->aFontSizeArr[3]; break;//"Import/FontSize/Size_4", - case 6: pValues[nProp] >>= pImpl->aFontSizeArr[4]; break;//"Import/FontSize/Size_5", - case 7: pValues[nProp] >>= pImpl->aFontSizeArr[5]; break;//"Import/FontSize/Size_6", - case 8: pValues[nProp] >>= pImpl->aFontSizeArr[6]; break;//"Import/FontSize/Size_7", - case 9://"Export/Browser", + case 0: + if(*o3tl::doAccess<bool>(pValues[nProp])) + pImpl->nFlags |= HtmlCfgFlags::UnknownTags; + break;//"Import/UnknownTag", + case 1: + if(*o3tl::doAccess<bool>(pValues[nProp])) + pImpl->nFlags |= HtmlCfgFlags::IgnoreFontFamily; + break;//"Import/FontSetting", + case 2: pValues[nProp] >>= pImpl->aFontSizeArr[0]; break;//"Import/FontSize/Size_1", + case 3: pValues[nProp] >>= pImpl->aFontSizeArr[1]; break;//"Import/FontSize/Size_2", + case 4: pValues[nProp] >>= pImpl->aFontSizeArr[2]; break;//"Import/FontSize/Size_3", + case 5: pValues[nProp] >>= pImpl->aFontSizeArr[3]; break;//"Import/FontSize/Size_4", + case 6: pValues[nProp] >>= pImpl->aFontSizeArr[4]; break;//"Import/FontSize/Size_5", + case 7: pValues[nProp] >>= pImpl->aFontSizeArr[5]; break;//"Import/FontSize/Size_6", + case 8: pValues[nProp] >>= pImpl->aFontSizeArr[6]; break;//"Import/FontSize/Size_7", + case 9://"Export/Browser", + { + sal_Int32 nExpMode = 0; + pValues[nProp] >>= nExpMode; + switch( nExpMode ) { - sal_Int32 nExpMode = 0; - pValues[nProp] >>= nExpMode; - switch( nExpMode ) - { - case 1: nExpMode = HTML_CFG_MSIE; break; - case 3: nExpMode = HTML_CFG_WRITER; break; - case 4: nExpMode = HTML_CFG_NS40; break; - default: nExpMode = HTML_CFG_NS40; break; - } - - pImpl->nExportMode = nExpMode; + case 1: nExpMode = HTML_CFG_MSIE; break; + case 3: nExpMode = HTML_CFG_WRITER; break; + case 4: nExpMode = HTML_CFG_NS40; break; + default: nExpMode = HTML_CFG_NS40; break; } - break; - case 10: - if(*o3tl::doAccess<bool>(pValues[nProp])) - pImpl->nFlags |= HtmlCfgFlags::StarBasic; - break;//"Export/Basic", - case 11: - if(*o3tl::doAccess<bool>(pValues[nProp])) - pImpl->nFlags |= HtmlCfgFlags::PrintLayoutExtension; - break;//"Export/PrintLayout", - case 12: - if(*o3tl::doAccess<bool>(pValues[nProp])) - pImpl->nFlags |= HtmlCfgFlags::LocalGrf; - break;//"Export/LocalGraphic", - case 13: - if(*o3tl::doAccess<bool>(pValues[nProp])) - pImpl->nFlags |= HtmlCfgFlags::IsBasicWarning; - break;//"Export/Warning" - - case 14: pValues[nProp] >>= pImpl->eEncoding; - pImpl->bIsEncodingDefault = false; - break;//"Export/Encoding" - - case 15: - if(*o3tl::doAccess<bool>(pValues[nProp])) - pImpl->nFlags |= HtmlCfgFlags::NumbersEnglishUS; - break;//"Import/NumbersEnglishUS" - } + + pImpl->nExportMode = nExpMode; + } + break; + case 10: + if(*o3tl::doAccess<bool>(pValues[nProp])) + pImpl->nFlags |= HtmlCfgFlags::StarBasic; + break;//"Export/Basic", + case 11: + if(*o3tl::doAccess<bool>(pValues[nProp])) + pImpl->nFlags |= HtmlCfgFlags::PrintLayoutExtension; + break;//"Export/PrintLayout", + case 12: + if(*o3tl::doAccess<bool>(pValues[nProp])) + pImpl->nFlags |= HtmlCfgFlags::LocalGrf; + break;//"Export/LocalGraphic", + case 13: + if(*o3tl::doAccess<bool>(pValues[nProp])) + pImpl->nFlags |= HtmlCfgFlags::IsBasicWarning; + break;//"Export/Warning" + + case 14: pValues[nProp] >>= pImpl->eEncoding; + pImpl->bIsEncodingDefault = false; + break;//"Export/Encoding" + + case 15: + if(*o3tl::doAccess<bool>(pValues[nProp])) + pImpl->nFlags |= HtmlCfgFlags::NumbersEnglishUS; + break;//"Import/NumbersEnglishUS" } } } |