Commits

Anonymous committed 0e86814 Merge

CWS-TOOLING: integrate CWS calc33stopper1

Comments (0)

Files changed (3)

sc/source/filter/excel/xiname.cxx

     mpScData( 0 ),
     mcBuiltIn( EXC_BUILTIN_UNKNOWN ),
     mnScTab( SCTAB_MAX ),
+    mbFunction( false ),
     mbVBName( false )
 {
     ExcelToSc& rFmlaConv = GetOldFmlaConverter();
 
     // 2) *** convert sheet index and name *** --------------------------------
 
-    // Visual Basic procedure
+    // functions and VBA
+    mbFunction = ::get_flag( nFlags, EXC_NAME_FUNC );
     mbVBName = ::get_flag( nFlags, EXC_NAME_VB );
 
     // get built-in name, or convert characters invalid in Calc
     // 4) *** create a defined name in the Calc document *** ------------------
 
     // #163146# do not ignore hidden names (may be regular names created by VBA scripts)
-    if( pTokArr /*&& (bBuiltIn || !::get_flag( nFlags, EXC_NAME_HIDDEN ))*/ && !mbVBName )
+    if( pTokArr /*&& (bBuiltIn || !::get_flag( nFlags, EXC_NAME_HIDDEN ))*/ && !mbFunction && !mbVBName )
     {
         // create the Calc name data
         ScRangeData* pData = new ScRangeData( GetDocPtr(), maScName, *pTokArr, ScAddress(), nNameType );

sc/source/filter/inc/xiname.hxx

     inline SCTAB        GetScTab() const { return mnScTab; }
     inline const ScRangeData* GetScRangeData() const { return mpScData; }
     inline bool         IsGlobal() const { return mnScTab == SCTAB_MAX; }
+    inline bool         IsFunction() const { return mbFunction; }
     inline bool         IsVBName() const { return mbVBName; }
 
 private:
     const ScRangeData*  mpScData;       /// Pointer to Calc defined name (no ownership).
     sal_Unicode         mcBuiltIn;      /// Excel built-in name index.
     SCTAB               mnScTab;        /// Calc sheet index of local names.
-    bool                mbVBName;       /// true = Visual Basic procedure.
+    bool                mbFunction;     /// true = Name refers to a function (add-in or VBA).
+    bool                mbVBName;       /// true = Visual Basic procedure or function.
 };
 
 // ----------------------------------------------------------------------------

sc/source/ui/miscdlgs/conflictsdlg.cxx

 #include "conflictsdlg.hrc"
 #include "scresid.hxx"
 #include "viewdata.hxx"
-#include "tabview.hxx"
+#include "dbfunc.hxx"
 
 
 //=============================================================================
         return 0;
     }
 
-    ScTabView* pTabView = reinterpret_cast< ScTabView* >( mpViewData->GetView() );
+    ScTabView* pTabView = mpViewData->GetView();
     pTabView->DoneBlockMode();
     BOOL bContMark = FALSE;
     SvLBoxEntry* pEntry = maLbConflicts.FirstSelected();