update ooo310-m15
[ooovba.git] / applied_patches / 0190-calc-status-bar-func.diff
blobe940380a9f7ce8b4f731e141bf659ef26b94cd65
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();
22 - if ( nErrCode > 0 )
23 - rSet.Put( SfxStringItem( nWhich,
24 - ScGlobal::GetLongErrorString( nErrCode ) ) );
25 - else
26 - {
27 - String aFuncStr;
28 - if ( pTabViewShell->GetFunction( aFuncStr ) )
29 - rSet.Put( SfxStringItem( nWhich, aFuncStr ) );
30 - }
31 + String aFuncStr;
32 + if ( pTabViewShell->GetFunction( aFuncStr, nErrCode ) )
33 + rSet.Put( SfxStringItem( nWhich, aFuncStr ) );
36 break;
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
41 @@ -71,12 +71,21 @@
42 #include "compiler.hxx"
45 -BOOL ScTabViewShell::GetFunction( String& rFuncStr )
46 +BOOL ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode )
48 String aStr;
50 ScSubTotalFunc eFunc = (ScSubTotalFunc) SC_MOD()->GetAppOptions().GetStatusFunc();
52 + if (eFunc == SUBTOTAL_FUNC_CNT || eFunc == SUBTOTAL_FUNC_CNT2)
53 + nErrCode = 0;
55 + if (nErrCode)
56 + {
57 + rFuncStr = ScGlobal::GetLongErrorString(nErrCode);
58 + return true;
59 + }
61 USHORT nGlobStrId = 0;
62 switch (eFunc)