diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-12-15 12:01:46 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-12-15 12:01:46 +0000 |
commit | e675e98a9bb1ae81f93486b80f5bf2f84b570e25 (patch) | |
tree | abde8aae8a1e5a9b90b7016736e72afe3611aeb0 /sc/source/ui | |
parent | 90f49bad18059f150dc8ccc432808b9a29d368ac (diff) |
CWS-TOOLING: integrate CWS tl56_DEV300
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 90 | ||||
-rw-r--r-- | sc/source/ui/app/scmod2.cxx | 15 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh3.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/unoobj/viewuno.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 5 |
7 files changed, 9 insertions, 119 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 4f35841b70f6..e6cbe303c3f0 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -556,7 +556,6 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab ) { ScViewData* pViewData = pActiveViewSh->GetViewData(); BOOL bOnlineSpell = pViewData->GetDocument()->GetDocOptions().IsAutoSpell(); - BOOL bHideSpell = pViewData->GetOptions().IsHideAutoSpell(); // SetDefaultLanguage is independent of the language attributes, // ScGlobal::GetEditDefaultLanguage is always used. @@ -571,10 +570,6 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab ) { ULONG nCntrl = pEngine->GetControlWord(); ULONG nOld = nCntrl; - if( bHideSpell ) - nCntrl |= EE_CNTRL_NOREDLINES; - else - nCntrl &= ~EE_CNTRL_NOREDLINES; if( bOnlineSpell ) nCntrl |= EE_CNTRL_ONLINESPELLING; else diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 7de6580f22c0..1572d2d90183 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -492,31 +492,6 @@ void ScModule::Execute( SfxRequest& rReq ) } break; - case SID_AUTOSPELL_MARKOFF: - { - BOOL bSet; - const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) ) - bSet = ((const SfxBoolItem*)pItem)->GetValue(); - else - { // Toggle - ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell, SfxViewShell::Current()); - ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current()); - if ( pViewSh ) - bSet = !pViewSh->GetViewData()->GetOptions().IsHideAutoSpell(); - else if ( pDocSh ) - bSet = !pDocSh->GetDocument()->GetViewOptions().IsHideAutoSpell(); - else - bSet = !GetViewOptions().IsHideAutoSpell(); - } - - SfxItemSet aSet( GetPool(), SID_AUTOSPELL_MARKOFF, SID_AUTOSPELL_MARKOFF ); - aSet.Put( SfxBoolItem( SID_AUTOSPELL_MARKOFF, bSet ) ); - ModifyOptions( aSet ); - rReq.Done(); - } - break; - case SID_ATTR_METRIC: { const SfxPoolItem* pItem; @@ -704,30 +679,11 @@ void ScModule::GetState( SfxItemSet& rSet ) else { USHORT nDummyLang, nDummyCjk, nDummyCtl; - BOOL bDummyHide; - GetSpellSettings( nDummyLang, nDummyCjk, nDummyCtl, bAuto, bDummyHide ); + GetSpellSettings( nDummyLang, nDummyCjk, nDummyCtl, bAuto ); } rSet.Put( SfxBoolItem( nWhich, bAuto ) ); } break; - case SID_AUTOSPELL_MARKOFF: - { - BOOL bHide; - ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell, SfxViewShell::Current()); - ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current()); - if ( pViewSh ) - bHide = pViewSh->GetViewData()->GetOptions().IsHideAutoSpell(); - else if ( pDocSh ) - bHide = pDocSh->GetDocument()->GetViewOptions().IsHideAutoSpell(); - else - { - USHORT nDummyLang, nDummyCjk, nDummyCtl; - BOOL bDummyAuto; - GetSpellSettings( nDummyLang, nDummyCjk, nDummyCtl, bDummyAuto, bHide ); - } - rSet.Put( SfxBoolItem( nWhich, bHide ) ); - } - break; case SID_ATTR_LANGUAGE: case ATTR_CJK_FONT_LANGUAGE: // WID for SID_ATTR_CHAR_CJK_LANGUAGE case ATTR_CTL_FONT_LANGUAGE: // WID for SID_ATTR_CHAR_CTL_LANGUAGE @@ -1063,7 +1019,7 @@ USHORT ScModule::GetOptDigitLanguage() // // ModifyOptions - Items aus Calc-Options-Dialog -// und SID_AUTOSPELL_CHECK / SID_AUTOSPELL_MARKOFF +// und SID_AUTOSPELL_CHECK // #define IS_AVAILABLE(w,item) (SFX_ITEM_SET==rOptSet.GetItemState((w),TRUE,&item)) @@ -1071,8 +1027,8 @@ USHORT ScModule::GetOptDigitLanguage() void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) { USHORT nOldSpellLang, nOldCjkLang, nOldCtlLang; - BOOL bOldAutoSpell, bOldHideAuto; - GetSpellSettings( nOldSpellLang, nOldCjkLang, nOldCtlLang, bOldAutoSpell, bOldHideAuto ); + BOOL bOldAutoSpell; + GetSpellSettings( nOldSpellLang, nOldCjkLang, nOldCtlLang, bOldAutoSpell ); if (!pAppCfg) GetAppOptions(); @@ -1189,44 +1145,6 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) } } - // - // AutoSpell ausblenden auch nach den ViewOptions - // - - if ( IS_AVAILABLE(SID_AUTOSPELL_MARKOFF,pItem) ) // an View-Options - { - BOOL bHideAutoSpell = ((const SfxBoolItem*)pItem)->GetValue(); - - if (pViewSh) - { - ScViewData* pViewData = pViewSh->GetViewData(); - ScViewOptions aNewOpt = pViewData->GetOptions(); - if ( aNewOpt.IsHideAutoSpell() != bHideAutoSpell ) - { - aNewOpt.SetHideAutoSpell( bHideAutoSpell ); - pViewData->SetOptions( aNewOpt ); - bRepaint = TRUE; - } - ScViewOptions aDocView = pDoc->GetViewOptions(); // auch am Dokument - if ( aDocView.IsHideAutoSpell() != bHideAutoSpell ) - { - aDocView.SetHideAutoSpell( bHideAutoSpell ); - pDoc->SetViewOptions( aDocView ); - //#92038#; don't set document modified, because this flag is no longer saved -// pDocSh->SetDocumentModified(); - } - } - if ( bOldHideAuto != bHideAutoSpell ) - { - SetHideAutoProperty( bHideAutoSpell ); - bSaveSpellCheck = TRUE; - } - ScInputHandler* pInputHandler = GetInputHdl(); - if ( pInputHandler ) - pInputHandler->UpdateSpellSettings(); // EditEngine-Flags - if ( pViewSh ) - pViewSh->UpdateDrawTextOutliner(); // EditEngine-Flags - } //============================================ // DocOptions diff --git a/sc/source/ui/app/scmod2.cxx b/sc/source/ui/app/scmod2.cxx index 8f901f8ce0ac..2424b62c5414 100644 --- a/sc/source/ui/app/scmod2.cxx +++ b/sc/source/ui/app/scmod2.cxx @@ -48,13 +48,12 @@ using namespace com::sun::star; //------------------------------------------------------------------ #define LINGUPROP_AUTOSPELL "IsSpellAuto" -#define LINGUPROP_HIDEAUTO "IsSpellHide" //------------------------------------------------------------------ // static void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCtlLang, - BOOL& rAutoSpell, BOOL& rHideAuto ) + BOOL& rAutoSpell ) { // use SvtLinguConfig instead of service LinguProperties to avoid // loading the linguistic component @@ -67,7 +66,6 @@ void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCt rCjkLang = aOptions.nDefaultLanguage_CJK; rCtlLang = aOptions.nDefaultLanguage_CTL; rAutoSpell = aOptions.bIsSpellAuto; - rHideAuto = aOptions.bIsSpellHideMarkings; } // static @@ -82,17 +80,6 @@ void ScModule::SetAutoSpellProperty( BOOL bSet ) aConfig.SetProperty( rtl::OUString::createFromAscii( LINGUPROP_AUTOSPELL ), aAny ); } -// static -void ScModule::SetHideAutoProperty( BOOL bSet ) -{ - // use SvtLinguConfig instead of service LinguProperties to avoid - // loading the linguistic component - SvtLinguConfig aConfig; - - uno::Any aAny; - aAny <<= bSet; - aConfig.SetProperty( rtl::OUString::createFromAscii( LINGUPROP_HIDEAUTO ), aAny ); -} // static diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 4b1c26f0e20b..2a627bc2d047 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -429,14 +429,13 @@ void ScDocShell::InitOptions() // Fortsetzung von InitNew (CLOOKs) // Einstellungen aus dem SpellCheckCfg kommen in Doc- und ViewOptions USHORT nDefLang, nCjkLang, nCtlLang; - BOOL bAutoSpell, bHideAuto; - ScModule::GetSpellSettings( nDefLang, nCjkLang, nCtlLang, bAutoSpell, bHideAuto ); + BOOL bAutoSpell; + ScModule::GetSpellSettings( nDefLang, nCjkLang, nCtlLang, bAutoSpell ); ScModule* pScMod = SC_MOD(); ScDocOptions aDocOpt = pScMod->GetDocOptions(); ScViewOptions aViewOpt = pScMod->GetViewOptions(); aDocOpt.SetAutoSpell( bAutoSpell ); - aViewOpt.SetHideAutoSpell( bHideAuto ); // zweistellige Jahreszahleneingabe aus Extras->Optionen->Allgemein->Sonstiges aDocOpt.SetYear2000( sal::static_int_cast<USHORT>( SFX_APP()->GetMiscConfig()->GetYear2000() ) ); diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index b79e2ab0e54a..21910e719d60 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -90,7 +90,7 @@ const SfxItemPropertyMap* lcl_GetViewOptPropertyMap() {MAP_CHAR_LEN(SC_UNO_HORSCROLL), 0, &getBooleanCppuType(), 0, 0}, {MAP_CHAR_LEN(SC_UNO_SHEETTABS), 0, &getBooleanCppuType(), 0, 0}, {MAP_CHAR_LEN(SC_UNO_VERTSCROLL), 0, &getBooleanCppuType(), 0, 0}, - {MAP_CHAR_LEN(SC_UNO_HIDESPELL), 0, &getBooleanCppuType(), 0, 0}, + {MAP_CHAR_LEN(SC_UNO_HIDESPELL), 0, &getBooleanCppuType(), 0, 0}, /* deprecated #i91949 */ {MAP_CHAR_LEN(OLD_UNO_HORSCROLL), 0, &getBooleanCppuType(), 0, 0}, {MAP_CHAR_LEN(SC_UNO_OUTLSYMB), 0, &getBooleanCppuType(), 0, 0}, {MAP_CHAR_LEN(SC_UNO_VALUEHIGH), 0, &getBooleanCppuType(), 0, 0}, @@ -1802,8 +1802,6 @@ void SAL_CALL ScTabViewObj::setPropertyValue( if ( aValue >>= nIntVal ) aNewOpt.SetGridColor( nIntVal, String() ); } - else if ( aString.EqualsAscii( SC_UNO_HIDESPELL ) ) - aNewOpt.SetHideAutoSpell( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); else if ( aString.EqualsAscii( SC_UNO_ZOOMTYPE ) ) { sal_Int16 nIntVal = 0; @@ -1879,7 +1877,6 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const rtl::OUString& aProperty else if ( aString.EqualsAscii( SC_UNO_SHOWCHARTS ) ) aRet <<= (sal_Int16)( rOpt.GetObjMode( VOBJ_TYPE_CHART ) ); else if ( aString.EqualsAscii( SC_UNO_SHOWDRAW ) ) aRet <<= (sal_Int16)( rOpt.GetObjMode( VOBJ_TYPE_DRAW ) ); else if ( aString.EqualsAscii( SC_UNO_GRIDCOLOR ) ) aRet <<= (sal_Int32)( rOpt.GetGridColor().GetColor() ); - else if ( aString.EqualsAscii( SC_UNO_HIDESPELL ) ) ScUnoHelpFunctions::SetBoolInAny( aRet, rOpt.IsHideAutoSpell() ); else if ( aString.EqualsAscii( SC_UNO_VISAREA ) ) aRet <<= GetVisArea(); else if ( aString.EqualsAscii( SC_UNO_ZOOMTYPE ) ) aRet <<= GetZoomType(); else if ( aString.EqualsAscii( SC_UNO_ZOOMVALUE ) ) aRet <<= GetZoom(); diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 748d3591418e..e73cf2508db0 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -563,8 +563,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.SetGridColor ( aGridColor ); aOutputData.SetShowNullValues ( rOpts.GetOption( VOPT_NULLVALS ) ); aOutputData.SetShowFormulas ( bFormulaMode ); - aOutputData.SetShowSpellErrors ( !rOpts.IsHideAutoSpell() && - pDoc->GetDocOptions().IsAutoSpell() ); + aOutputData.SetShowSpellErrors ( pDoc->GetDocOptions().IsAutoSpell() ); aOutputData.SetMarkClipped ( bMarkClipped ); aOutputData.SetUseStyleColor( TRUE ); // always set in table view diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 16a6fa47de29..c3848b76b92b 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -2994,16 +2994,11 @@ void ScViewData::UpdateOutlinerFlags( Outliner& rOutl ) const { ScDocument* pLocalDoc = GetDocument(); BOOL bOnlineSpell = pLocalDoc->GetDocOptions().IsAutoSpell(); - BOOL bHideSpell = GetOptions().IsHideAutoSpell(); ULONG nCntrl = rOutl.GetControlWord(); nCntrl |= EE_CNTRL_URLSFXEXECUTE; nCntrl |= EE_CNTRL_MARKFIELDS; nCntrl |= EE_CNTRL_AUTOCORRECT; - if( bHideSpell ) - nCntrl |= EE_CNTRL_NOREDLINES; - else - nCntrl &= ~EE_CNTRL_NOREDLINES; if( bOnlineSpell ) nCntrl |= EE_CNTRL_ONLINESPELLING; else |