1 diff --git sc/source/ui/inc/tabvwsh.hxx sc/source/ui/inc/tabvwsh.hxx
2 index 6074c60..e7fa0ec 100644
3 --- sc/source/ui/inc/tabvwsh.hxx
4 +++ sc/source/ui/inc/tabvwsh.hxx
5 @@ -406,7 +406,7 @@ public:
7 void ExecuteCellFormatDlg ( SfxRequest& rReq, USHORT nTabPage = 0xffff );
9 - BOOL GetFunction( String& rFuncStr );
10 + BOOL GetFunction( String& rFuncStr, sal_uInt16 nErrCode = 0 );
12 void StartSimpleRefDialog( const String& rTitle, const String& rInitVal,
13 BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection );
14 diff --git sc/source/ui/view/cellsh.cxx sc/source/ui/view/cellsh.cxx
15 index bda4829..28e88df 100644
16 --- sc/source/ui/view/cellsh.cxx
17 +++ sc/source/ui/view/cellsh.cxx
18 @@ -691,15 +691,9 @@ void ScCellShell::GetState(SfxItemSet &rSet)
19 nErrCode = pFCell->GetErrCode();
23 - rSet.Put( SfxStringItem( nWhich,
24 - ScGlobal::GetLongErrorString( nErrCode ) ) );
28 - if ( pTabViewShell->GetFunction( aFuncStr ) )
29 - rSet.Put( SfxStringItem( nWhich, aFuncStr ) );
32 + if ( pTabViewShell->GetFunction( aFuncStr, nErrCode ) )
33 + rSet.Put( SfxStringItem( nWhich, aFuncStr ) );
37 diff --git sc/source/ui/view/tabvwsha.cxx sc/source/ui/view/tabvwsha.cxx
38 index ab3c2e7..0b83147 100644
39 --- sc/source/ui/view/tabvwsha.cxx
40 +++ sc/source/ui/view/tabvwsha.cxx
42 #include "compiler.hxx"
45 -BOOL ScTabViewShell::GetFunction( String& rFuncStr )
46 +BOOL ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode )
50 ScSubTotalFunc eFunc = (ScSubTotalFunc) SC_MOD()->GetAppOptions().GetStatusFunc();
52 + if (eFunc == SUBTOTAL_FUNC_CNT || eFunc == SUBTOTAL_FUNC_CNT2)
57 + rFuncStr = ScGlobal::GetLongErrorString(nErrCode);
61 USHORT nGlobStrId = 0;