diff options
-rw-r--r-- | sc/inc/scmod.hxx | 3 | ||||
-rw-r--r-- | sc/inc/unonames.hxx | 2 | ||||
-rw-r--r-- | sc/inc/viewopti.hxx | 4 | ||||
-rw-r--r-- | sc/sdi/app.sdi | 7 | ||||
-rw-r--r-- | sc/source/core/tool/viewopti.cxx | 4 | ||||
-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 |
12 files changed, 11 insertions, 137 deletions
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx index f1522f374ce1..5b791c506a29 100644 --- a/sc/inc/scmod.hxx +++ b/sc/inc/scmod.hxx @@ -207,9 +207,8 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO void RecentFunctionsChanged(); static void GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCtlLang, - BOOL& rAutoSpell, BOOL& rHideAuto ); + BOOL& rAutoSpell ); static void SetAutoSpellProperty( BOOL bSet ); - static void SetHideAutoProperty( BOOL bSet ); static BOOL HasThesaurusLanguage( USHORT nLang ); USHORT GetOptDigitLanguage(); // from CTL options diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx index 5174bfaddc5b..24309245787c 100644 --- a/sc/inc/unonames.hxx +++ b/sc/inc/unonames.hxx @@ -488,7 +488,7 @@ // view options #define SC_UNO_COLROWHDR "HasColumnRowHeaders" #define SC_UNO_GRIDCOLOR "GridColor" -#define SC_UNO_HIDESPELL "HideSpellMarks" +#define SC_UNO_HIDESPELL "HideSpellMarks" /* deprecated #i91949 */ #define SC_UNO_HORSCROLL "HasHorizontalScrollBar" #define SC_UNO_OUTLSYMB "IsOutlineSymbolsSet" #define SC_UNO_SHEETTABS "HasSheetTabs" diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx index fee3984449b7..bf6c59117b0f 100644 --- a/sc/inc/viewopti.hxx +++ b/sc/inc/viewopti.hxx @@ -118,9 +118,6 @@ public: void SetGridOptions( const ScGridOptions& rNew ) { aGridOpt = rNew; } SvxGridItem* CreateGridItem( USHORT nId = SID_ATTR_GRID_OPTIONS ) const; - BOOL IsHideAutoSpell() const { return bHideAutoSpell; } - void SetHideAutoSpell( BOOL bSet ) { bHideAutoSpell = bSet; } - const ScViewOptions& operator= ( const ScViewOptions& rCpy ); int operator== ( const ScViewOptions& rOpt ) const; int operator!= ( const ScViewOptions& rOpt ) const { return !(operator==(rOpt)); } @@ -131,7 +128,6 @@ private: Color aGridCol; String aGridColName; ScGridOptions aGridOpt; - BOOL bHideAutoSpell; }; //================================================================== diff --git a/sc/sdi/app.sdi b/sc/sdi/app.sdi index c13a570bfe7c..31323927fa52 100644 --- a/sc/sdi/app.sdi +++ b/sc/sdi/app.sdi @@ -47,13 +47,6 @@ interface StarCalc Export = FALSE; ] - SID_AUTOSPELL_MARKOFF - [ - ExecMethod = Execute ; - StateMethod = GetState ; - Export = FALSE; - ] - SID_ATTR_LANGUAGE [ ExecMethod = Execute; diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx index 2c21fcf8462f..de32467d561b 100644 --- a/sc/source/core/tool/viewopti.cxx +++ b/sc/source/core/tool/viewopti.cxx @@ -176,8 +176,6 @@ void ScViewOptions::SetDefaults() aGridColName = ScGlobal::GetRscString( STR_GRIDCOLOR ); aGridOpt.SetDefaults(); - - bHideAutoSpell = FALSE; } //------------------------------------------------------------------------ @@ -202,7 +200,6 @@ const ScViewOptions& ScViewOptions::operator=( const ScViewOptions& rCpy ) aGridCol = rCpy.aGridCol; aGridColName = rCpy.aGridColName; aGridOpt = rCpy.aGridOpt; - bHideAutoSpell = rCpy.bHideAutoSpell; return *this; } @@ -220,7 +217,6 @@ int ScViewOptions::operator==( const ScViewOptions& rOpt ) const bEqual = bEqual && (aGridCol == rOpt.aGridCol); bEqual = bEqual && (aGridColName == rOpt.aGridColName); bEqual = bEqual && (aGridOpt == rOpt.aGridOpt); - bEqual = bEqual && (bHideAutoSpell == rOpt.bHideAutoSpell); return bEqual; } 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 |