[Libreoffice-commits] core.git: 2 commits - dbaccess/AllLangResTarget_dbu.mk dbaccess/inc dbaccess/source dbaccess/uiconfig dbaccess/UIConfig_dbaccess.mk sc/source

Caolán McNamara caolanm at redhat.com
Mon Feb 10 08:09:54 PST 2014


 dbaccess/AllLangResTarget_dbu.mk         |    1 
 dbaccess/UIConfig_dbaccess.mk            |    1 
 dbaccess/inc/dbaccess_helpid.hrc         |    8 
 dbaccess/source/ui/dlg/AutoControls.src  |   11 
 dbaccess/source/ui/dlg/adtabdlg.cxx      |  118 ++++-----
 dbaccess/source/ui/dlg/adtabdlg.hrc      |   39 ---
 dbaccess/source/ui/dlg/adtabdlg.src      |   97 -------
 dbaccess/source/ui/inc/adtabdlg.hxx      |   31 --
 dbaccess/source/ui/inc/dbu_dlg.hrc       |    4 
 dbaccess/uiconfig/ui/tablesjoindialog.ui |  190 ++++++++++++++
 sc/source/core/opencl/formulagroupcl.cxx |   55 +---
 sc/source/core/opencl/op_addin.cxx       |    4 
 sc/source/core/opencl/op_array.cxx       |    6 
 sc/source/core/opencl/op_database.cxx    |  110 ++++----
 sc/source/core/opencl/op_financial.cxx   |  318 ++++++++++++------------
 sc/source/core/opencl/op_logical.cxx     |   14 -
 sc/source/core/opencl/op_math.cxx        |  146 +++++------
 sc/source/core/opencl/op_spreadsheet.cxx |    4 
 sc/source/core/opencl/op_statistical.cxx |  398 ++++++++++++++-----------------
 sc/source/core/opencl/opbase.cxx         |    4 
 20 files changed, 774 insertions(+), 785 deletions(-)

New commits:
commit 5667ca141785f83c849caac7d76e250e852ac236
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Feb 10 15:28:03 2014 +0000

    convert add relationships dialog to .ui
    
    Change-Id: I984ff7e4fca6e7cd3529e921383bca4e6f2a464e

diff --git a/dbaccess/AllLangResTarget_dbu.mk b/dbaccess/AllLangResTarget_dbu.mk
index 3974924..f0b87a0 100644
--- a/dbaccess/AllLangResTarget_dbu.mk
+++ b/dbaccess/AllLangResTarget_dbu.mk
@@ -37,7 +37,6 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\
     dbaccess/source/ui/control/tabletree.src \
     dbaccess/source/ui/control/undosqledit.src \
     dbaccess/source/ui/dlg/admincontrols.src \
-    dbaccess/source/ui/dlg/adtabdlg.src \
     dbaccess/source/ui/dlg/AutoControls.src \
     dbaccess/source/ui/dlg/CollectionView.src \
     dbaccess/source/ui/dlg/ConnectionPage.src \
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index 206a81b..0d5ff65 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
     dbaccess/uiconfig/ui/sortdialog \
     dbaccess/uiconfig/ui/tablesfilterdialog \
     dbaccess/uiconfig/ui/tablesfilterpage \
+    dbaccess/uiconfig/ui/tablesjoindialog \
     dbaccess/uiconfig/ui/useradmindialog \
 ))
 
diff --git a/dbaccess/inc/dbaccess_helpid.hrc b/dbaccess/inc/dbaccess_helpid.hrc
index 04f230c..31f9f29 100644
--- a/dbaccess/inc/dbaccess_helpid.hrc
+++ b/dbaccess/inc/dbaccess_helpid.hrc
@@ -88,12 +88,9 @@
 #define HID_DSADMIN_PAGE_ADO                              "DBACCESS_HID_DSADMIN_PAGE_ADO"
 
 
-#define HID_JOINSH_ADDTAB_CLOSE                           "DBACCESS_HID_JOINSH_ADDTAB_CLOSE"
-#define HID_JOINSH_ADDTAB_TABLELIST                       "DBACCESS_HID_JOINSH_ADDTAB_TABLELIST"
 #define HID_CTL_QRYDGNTAB                                 "DBACCESS_HID_CTL_QRYDGNTAB"
 #define HID_DLG_QRY_JOIN                                  "DBACCESS_HID_DLG_QRY_JOIN"
 #define HID_DLG_QRY_JOINTYPE                              "DBACCESS_HID_DLG_QRY_JOINTYPE"
-#define HID_JOINSH_ADDTAB_QUERYLIST                       "DBACCESS_HID_JOINSH_ADDTAB_QUERYLIST"
 #define HID_DLG_QRY_HELPTEXT                              "DBACCESS_HID_DLG_QRY_HELPTEXT"
 
 #define HID_CTL_QRYDGNCRIT                                "DBACCESS_HID_CTL_QRYDGNCRIT"
@@ -376,11 +373,6 @@
 #define HID_DLG_QRY_JOIN_CONTROL                          "DBACCESS_HID_DLG_QRY_JOIN_CONTROL"
 #define HID_MACRO_MIGRATION_BACKUP_LOCATION               "DBACCESS_HID_MACRO_MIGRATION_BACKUP_LOCATION"
 
-// this one below have hid in number space HID_SBA_START
-
-#define HID_DLG_JOIN_TABADD                               "DBACCESS_HID_DLG_JOIN_TABADD"
-
-
 #endif // _DBA_DBACCESS_HELPID_HRC_
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/AutoControls.src b/dbaccess/source/ui/dlg/AutoControls.src
index fd890ca..265b64a 100644
--- a/dbaccess/source/ui/dlg/AutoControls.src
+++ b/dbaccess/source/ui/dlg/AutoControls.src
@@ -79,6 +79,17 @@ String STR_THUNDERBIRD_PROFILE_NAME
     Text[ en-US ] = "~Thunderbird profile name";
 };
 
+String STR_ADD_TABLES
+{
+    Text [ en-US ] = "Add Tables";
+};
+
+String STR_ADD_TABLE_OR_QUERY
+{
+    Text [ en-US ] = "Add Table or Query" ;
+};
+
+
 // -------------------------------------------------------------------------------------------------
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index f9621cd..aabdbd9 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -18,7 +18,6 @@
  */
 
 #include "adtabdlg.hxx"
-#include "adtabdlg.hrc"
 #include "sqlmessage.hxx"
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
@@ -316,61 +315,49 @@ bool QueryListFacade::isLeafSelected() const
 }
 
 OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext )
-             :ModelessDialog( pParent, ModuleRes(DLG_JOIN_TABADD) )
-             ,m_aCaseTables( this, ModuleRes( RB_CASE_TABLES ) )
-             ,m_aCaseQueries( this, ModuleRes( RB_CASE_QUERIES ) )
-             ,m_aTableList( this, ModuleRes( LB_TABLE_OR_QUERY ), sal_False )
-             ,m_aQueryList( this, ModuleRes( LB_TABLE_OR_QUERY ) )
-             ,aAddButton( this, ModuleRes( PB_ADDTABLE ) )
-             ,aCloseButton( this, ModuleRes( PB_CLOSE ) )
-             ,aHelpButton( this, ModuleRes( PB_HELP ) )
-             ,m_rContext( _rContext )
+   : ModelessDialog(pParent, "TablesJoinDialog", "dbaccess/ui/tablesjoindialog.ui")
+   , m_rContext(_rContext)
 {
-    // the Close-Button already has a standard help text which should not
-    // occur here. Therefore, resetting the text and giving a new ID
-    aCloseButton.SetHelpText(OUString());
-    aCloseButton.SetHelpId(HID_JOINSH_ADDTAB_CLOSE);
-
-    m_aTableList.SetHelpId( HID_JOINSH_ADDTAB_TABLELIST );
-    m_aQueryList.SetHelpId( HID_JOINSH_ADDTAB_QUERYLIST );
-
-    m_aCaseTables.SetClickHdl( LINK( this, OAddTableDlg, OnTypeSelected ) );
-    m_aCaseQueries.SetClickHdl( LINK( this, OAddTableDlg, OnTypeSelected ) );
-    aAddButton.SetClickHdl( LINK( this, OAddTableDlg, AddClickHdl ) );
-    aCloseButton.SetClickHdl( LINK( this, OAddTableDlg, CloseClickHdl ) );
-    m_aTableList.SetDoubleClickHdl( LINK( this, OAddTableDlg, TableListDoubleClickHdl ) );
-    m_aTableList.SetSelectHdl( LINK( this, OAddTableDlg, TableListSelectHdl ) );
-    m_aQueryList.SetDoubleClickHdl( LINK( this, OAddTableDlg, TableListDoubleClickHdl ) );
-    m_aQueryList.SetSelectHdl( LINK( this, OAddTableDlg, TableListSelectHdl ) );
-
-    m_aTableList.EnableInplaceEditing( false );
-    m_aTableList.SetStyle(m_aTableList.GetStyle() | WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HASLINESATROOT | WB_SORT | WB_HSCROLL );
-    m_aTableList.EnableCheckButton( NULL ); // do not show any buttons
-    m_aTableList.SetSelectionMode( SINGLE_SELECTION );
-    m_aTableList.notifyHiContrastChanged();
-    m_aTableList.suppressEmptyFolders();
-
-    m_aQueryList.EnableInplaceEditing( false );
-    m_aQueryList.SetSelectionMode( SINGLE_SELECTION );
+    get(m_pCaseTables, "tables");
+    get(m_pCaseQueries, "queries");
+
+    get(m_pTableList, "tablelist");
+    get(m_pQueryList, "querylist");
+    Size aSize(LogicToPixel(Size(106 , 122), MAP_APPFONT));
+    m_pTableList->set_height_request(aSize.Height());
+    m_pTableList->set_width_request(aSize.Width());
+    get(m_pQueryList, "querylist");
+    m_pQueryList->set_height_request(aSize.Height());
+    m_pQueryList->set_width_request(aSize.Width());
+
+    get(m_pAddButton, "add");
+    get(m_pCloseButton, "close");
+
+    m_pCaseTables->SetClickHdl( LINK( this, OAddTableDlg, OnTypeSelected ) );
+    m_pCaseQueries->SetClickHdl( LINK( this, OAddTableDlg, OnTypeSelected ) );
+    m_pAddButton->SetClickHdl( LINK( this, OAddTableDlg, AddClickHdl ) );
+    m_pCloseButton->SetClickHdl( LINK( this, OAddTableDlg, CloseClickHdl ) );
+    m_pTableList->SetDoubleClickHdl( LINK( this, OAddTableDlg, TableListDoubleClickHdl ) );
+    m_pTableList->SetSelectHdl( LINK( this, OAddTableDlg, TableListSelectHdl ) );
+    m_pQueryList->SetDoubleClickHdl( LINK( this, OAddTableDlg, TableListDoubleClickHdl ) );
+    m_pQueryList->SetSelectHdl( LINK( this, OAddTableDlg, TableListSelectHdl ) );
+
+    m_pTableList->EnableInplaceEditing( false );
+    m_pTableList->SetStyle(m_pTableList->GetStyle() | WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HASLINESATROOT | WB_SORT | WB_HSCROLL );
+    m_pTableList->EnableCheckButton( NULL ); // do not show any buttons
+    m_pTableList->SetSelectionMode( SINGLE_SELECTION );
+    m_pTableList->notifyHiContrastChanged();
+    m_pTableList->suppressEmptyFolders();
+
+    m_pQueryList->EnableInplaceEditing( false );
+    m_pQueryList->SetSelectionMode( SINGLE_SELECTION );
 
     if ( !m_rContext.allowQueries() )
     {
-        m_aCaseTables.Hide();
-        m_aCaseQueries.Hide();
-
-        long nPixelDiff = m_aTableList.GetPosPixel().Y() - m_aCaseTables.GetPosPixel().Y();
-
-        Point aListPos( m_aTableList.GetPosPixel() );
-        aListPos.Y() -= nPixelDiff;
-
-        Size aListSize( m_aTableList.GetSizePixel() );
-        aListSize.Height() += nPixelDiff;
-
-        m_aTableList.SetPosSizePixel( aListPos, aListSize );
+        m_pCaseTables->Hide();
+        m_pCaseQueries->Hide();
     }
 
-    FreeResource();
-
     SetText( getDialogTitleForContext( m_rContext ) );
 }
 
@@ -384,36 +371,36 @@ void OAddTableDlg::impl_switchTo( ObjectList _eList )
     switch ( _eList )
     {
     case Tables:
-        m_aTableList.Show( true );  m_aCaseTables.Check( sal_True );
-        m_aQueryList.Show( false ); m_aCaseQueries.Check( sal_False );
-        m_pCurrentList.reset( new TableListFacade( m_aTableList, m_rContext.getConnection() ) );
-        m_aTableList.GrabFocus();
+        m_pTableList->Show( true );  m_pCaseTables->Check( sal_True );
+        m_pQueryList->Show( false ); m_pCaseQueries->Check( sal_False );
+        m_xCurrentList.reset( new TableListFacade( *m_pTableList, m_rContext.getConnection() ) );
+        m_pTableList->GrabFocus();
         break;
 
     case Queries:
-        m_aTableList.Show( false ); m_aCaseTables.Check( sal_False );
-        m_aQueryList.Show( true );  m_aCaseQueries.Check( sal_True );
-        m_pCurrentList.reset( new QueryListFacade( m_aQueryList, m_rContext.getConnection() ) );
-        m_aQueryList.GrabFocus();
+        m_pTableList->Show( false ); m_pCaseTables->Check( sal_False );
+        m_pQueryList->Show( true );  m_pCaseQueries->Check( sal_True );
+        m_xCurrentList.reset( new QueryListFacade( *m_pQueryList, m_rContext.getConnection() ) );
+        m_pQueryList->GrabFocus();
         break;
     }
-    m_pCurrentList->updateTableObjectList( m_rContext.allowViews() );
+    m_xCurrentList->updateTableObjectList( m_rContext.allowViews() );
 }
 
 void OAddTableDlg::Update()
 {
-    if ( !m_pCurrentList.get() )
+    if ( !m_xCurrentList.get() )
         impl_switchTo( Tables );
     else
-        m_pCurrentList->updateTableObjectList( m_rContext.allowViews() );
+        m_xCurrentList->updateTableObjectList( m_rContext.allowViews() );
 }
 
 void OAddTableDlg::impl_addTable()
 {
-    if ( m_pCurrentList->isLeafSelected() )
+    if ( m_xCurrentList->isLeafSelected() )
     {
         OUString sSelectedName, sAliasName;
-        sSelectedName = m_pCurrentList->getSelectedName( sAliasName );
+        sSelectedName = m_xCurrentList->getSelectedName( sAliasName );
 
         m_rContext.addTableWindow( sSelectedName, sAliasName );
     }
@@ -440,7 +427,7 @@ IMPL_LINK( OAddTableDlg, TableListDoubleClickHdl, void*, /*EMPTY_ARG*/ )
 
 IMPL_LINK( OAddTableDlg, TableListSelectHdl, void*, /*EMPTY_ARG*/ )
 {
-    aAddButton.Enable( m_pCurrentList->isLeafSelected() );
+    m_pAddButton->Enable( m_xCurrentList->isLeafSelected() );
     return 0;
 }
 
@@ -451,7 +438,7 @@ IMPL_LINK( OAddTableDlg, CloseClickHdl, Button*, /*pButton*/ )
 
 IMPL_LINK( OAddTableDlg, OnTypeSelected, void*, /*EMPTY_ARG*/ )
 {
-    if ( m_aCaseTables.IsChecked() )
+    if ( m_pCaseTables->IsChecked() )
         impl_switchTo( Tables );
     else
         impl_switchTo( Queries );
@@ -473,7 +460,6 @@ OUString OAddTableDlg::getDialogTitleForContext( IAddTableDialogContext& _rConte
 {
     OUString sTitle;
 
-    ::svt::OLocalResourceAccess aLocalRes( ModuleRes( DLG_JOIN_TABADD ), RSC_MODELESSDIALOG );
     if ( _rContext.allowQueries() )
         sTitle = ModuleRes( STR_ADD_TABLE_OR_QUERY );
     else
diff --git a/dbaccess/source/ui/dlg/adtabdlg.hrc b/dbaccess/source/ui/dlg/adtabdlg.hrc
deleted file mode 100644
index 4b64694..0000000
--- a/dbaccess/source/ui/dlg/adtabdlg.hrc
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef DBAUI_ADTABDLG_HRC
-#define DBAUI_ADTABDLG_HRC
-
-#define LB_TABLE_OR_QUERY   1
-#define LB_DATABASE         2
-
-#define FT_DATABASE 1
-
-#define PB_ADDTABLE 1
-#define PB_CLOSE    2
-#define PB_HELP     3
-
-#define RB_CASE_TABLES  1
-#define RB_CASE_QUERIES 2
-
-#define STR_ADD_TABLES          1
-#define STR_ADD_TABLE_OR_QUERY  2
-
-#endif // DBAUI_ADTABDLG_HRC
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/adtabdlg.src b/dbaccess/source/ui/dlg/adtabdlg.src
deleted file mode 100644
index 05867ed..0000000
--- a/dbaccess/source/ui/dlg/adtabdlg.src
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "adtabdlg.hrc"
-#include "dbaccess_helpid.hrc"
-#include "dbu_dlg.hrc"
-
-ModelessDialog DLG_JOIN_TABADD
-{
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    HelpID = HID_DLG_JOIN_TABADD ;
-    Size = MAP_APPFONT ( 178 , 147 ) ;
-    Moveable = TRUE ;
-    Closeable = TRUE ;
-    Hide = TRUE ;
-
-    RadioButton RB_CASE_TABLES
-    {
-        HelpID = "dbaccess:RadioButton:DLG_JOIN_TABADD:RB_CASE_TABLES";
-        Pos = MAP_APPFONT( 6, 6 );
-        Size = MAP_APPFONT( 50, 8 );
-        Text [ en-US ] = "Tables";
-    };
-
-    RadioButton RB_CASE_QUERIES
-    {
-        HelpID = "dbaccess:RadioButton:DLG_JOIN_TABADD:RB_CASE_QUERIES";
-        Pos = MAP_APPFONT( 62, 6 );
-        Size = MAP_APPFONT( 50, 8 );
-        Text [ en-US ] = "Queries";
-    };
-
-    Control LB_TABLE_OR_QUERY
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 6 , 18 ) ;
-        Size = MAP_APPFONT ( 106 , 122 ) ;
-        TabStop = TRUE ;
-        Hide = TRUE;
-        Group = TRUE;
-    };
-
-    PushButton PB_ADDTABLE
-    {
-        HelpID = "dbaccess:PushButton:DLG_JOIN_TABADD:PB_ADDTABLE";
-        Pos = MAP_APPFONT ( 123 , 6 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Text [ en-US ] = "~Add" ;
-        TabStop = TRUE ;
-        DefButton = TRUE ;
-    };
-
-    CancelButton PB_CLOSE
-    {
-        Pos = MAP_APPFONT ( 123 , 22 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        HelpId = HID_JOINSH_ADDTAB_CLOSE;
-        Text [ en-US ] = "~Close" ;
-        TabStop = TRUE ;
-    };
-
-    HelpButton PB_HELP
-    {
-        Pos = MAP_APPFONT ( 123 , 43 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-    };
-
-    String STR_ADD_TABLES
-    {
-        Text [ en-US ] = "Add Tables";
-    };
-
-    String STR_ADD_TABLE_OR_QUERY
-    {
-        Text [ en-US ] = "Add Table or Query" ;
-    };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx
index f4b8b70..947e582 100644
--- a/dbaccess/source/ui/inc/adtabdlg.hxx
+++ b/dbaccess/source/ui/inc/adtabdlg.hxx
@@ -19,20 +19,14 @@
 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_ADTABDLG_HXX
 #define INCLUDED_DBACCESS_SOURCE_UI_INC_ADTABDLG_HXX
 
+#include <boost/scoped_ptr.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
 #include <vcl/dialog.hxx>
-
 #include <vcl/button.hxx>
-
 #include <vcl/fixed.hxx>
-
-#include <com/sun/star/sdbc/XConnection.hpp>
-
 #include <vcl/lstbox.hxx>
-
 #include "tabletree.hxx"
 
-#include <memory>
-
 namespace dbaui
 {
     /** unifies the access to a list of table/query objects
@@ -64,20 +58,17 @@ namespace dbaui
 
     class OAddTableDlg : public ModelessDialog
     {
-        RadioButton         m_aCaseTables;
-        RadioButton         m_aCaseQueries;
+        RadioButton*        m_pCaseTables;
+        RadioButton*        m_pCaseQueries;
 
-        OTableTreeListBox   m_aTableList;
-        SvTreeListBox       m_aQueryList;
-        ::std::auto_ptr< TableObjectListFacade >
-                            m_pCurrentList;
+        OTableTreeListBox*  m_pTableList;
+        SvTreeListBox*      m_pQueryList;
+        boost::scoped_ptr< TableObjectListFacade > m_xCurrentList;
 
-        PushButton          aAddButton;
-        CancelButton        aCloseButton;
-        HelpButton          aHelpButton;
+        PushButton*         m_pAddButton;
+        PushButton*         m_pCloseButton;
 
-        IAddTableDialogContext&
-                            m_rContext;
+        IAddTableDialogContext& m_rContext;
 
         DECL_LINK( AddClickHdl, Button* );
         DECL_LINK( CloseClickHdl, Button* );
@@ -91,7 +82,7 @@ namespace dbaui
             IAddTableDialogContext& _rContext );
         virtual ~OAddTableDlg();
 
-        void DetermineAddTable() { aAddButton.Enable( impl_isAddAllowed() ); }
+        void DetermineAddTable() { m_pAddButton->Enable( impl_isAddAllowed() ); }
         void Update();
 
         static  OUString  getDialogTitleForContext(
diff --git a/dbaccess/source/ui/inc/dbu_dlg.hrc b/dbaccess/source/ui/inc/dbu_dlg.hrc
index dcf4450..bedbae4 100644
--- a/dbaccess/source/ui/inc/dbu_dlg.hrc
+++ b/dbaccess/source/ui/inc/dbu_dlg.hrc
@@ -69,8 +69,8 @@
     // FREE
 #define STR_COMMAND_EXECUTED_SUCCESSFULLY   RID_STR_DLG_START + 23
 #define STR_DIRECTSQL_CONNECTIONLOST        RID_STR_DLG_START + 24
-    // FREE
-    // FREE
+#define STR_ADD_TABLES                      RID_STR_DLG_START + 25
+#define STR_ADD_TABLE_OR_QUERY              RID_STR_DLG_START + 26
 #define STR_USERADMIN_NOT_AVAILABLE         RID_STR_DLG_START + 27
 #define STR_TAB_INDEX_SORTORDER             RID_STR_DLG_START + 28
 #define STR_TAB_INDEX_FIELD                 RID_STR_DLG_START + 29
diff --git a/dbaccess/uiconfig/ui/tablesjoindialog.ui b/dbaccess/uiconfig/ui/tablesjoindialog.ui
new file mode 100644
index 0000000..9cae194
--- /dev/null
+++ b/dbaccess/uiconfig/ui/tablesjoindialog.ui
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkDialog" id="TablesJoinDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="add">
+                <property name="label">gtk-add</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="close">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkGrid" id="grid1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="row_spacing">6</property>
+            <child>
+              <object class="GtkRadioButton" id="tables">
+                <property name="label" translatable="yes">Tables</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">queries</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="queries">
+                <property name="label" translatable="yes">Queries</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0.0099999997764825821</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">tables</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="dbulo-OTableTreeListBox" id="tablelist:border">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <child internal-child="selection">
+                  <object class="GtkTreeSelection" id="OTableTreeListBox-selection3"/>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="title">
+                <property name="can_focus">False</property>
+                <property name="no_show_all">True</property>
+                <property name="label" translatable="yes">Add Tables</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">4</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="alttitle">
+                <property name="can_focus">False</property>
+                <property name="no_show_all">True</property>
+                <property name="label" translatable="yes">Add Table or Query</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">5</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="svtlo-SvTreeListBox" id="querylist:border">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <child internal-child="selection">
+                  <object class="GtkTreeSelection" id="Tree List-selection3"/>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">3</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">add</action-widget>
+      <action-widget response="0">close</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>
commit aea6aab9f25467891d92efa43d91412576a00b8c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Feb 10 13:15:06 2014 +0000

    coverity#1130200 Unchecked dynamic_cast
    
    Change-Id: I9a6cfc27b1076fa682c591d920a7db8ec6f8a6ff

diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index cf9847c..2a31d7b 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -72,8 +72,7 @@ size_t VectorRef::Marshal(cl_kernel k, int argno, int, cl_program)
     size_t szHostBuffer = 0;
     if (ref->GetType() == formula::svSingleVectorRef) {
         const formula::SingleVectorRefToken* pSVR =
-            dynamic_cast< const formula::SingleVectorRefToken* >(ref);
-        assert(pSVR);
+            static_cast< const formula::SingleVectorRefToken* >(ref);
         pHostBuffer = const_cast<double*>(pSVR->GetArray().mpNumericArray);
         szHostBuffer = pSVR->GetArrayLength() * sizeof(double);
 #if 0
@@ -82,8 +81,7 @@ size_t VectorRef::Marshal(cl_kernel k, int argno, int, cl_program)
 #endif
     } else if (ref->GetType() == formula::svDoubleVectorRef) {
         const formula::DoubleVectorRefToken* pDVR =
-            dynamic_cast< const formula::DoubleVectorRefToken* >(ref);
-        assert(pDVR);
+            static_cast< const formula::DoubleVectorRefToken* >(ref);
         pHostBuffer = const_cast<double*>(
                 pDVR->GetArrays()[mnIndex].mpNumericArray);
         szHostBuffer = pDVR->GetArrayLength() * sizeof(double);
@@ -371,14 +369,12 @@ size_t DynamicKernelStringArgument::Marshal(cl_kernel k, int argno, int, cl_prog
     size_t nStrings = 0;
     if (ref->GetType() == formula::svSingleVectorRef) {
         const formula::SingleVectorRefToken* pSVR =
-            dynamic_cast< const formula::SingleVectorRefToken* >(ref);
-        assert(pSVR);
+            static_cast< const formula::SingleVectorRefToken* >(ref);
         nStrings = pSVR->GetArrayLength();
         vRef = pSVR->GetArray();
     } else if (ref->GetType() == formula::svDoubleVectorRef) {
         const formula::DoubleVectorRefToken* pDVR =
-            dynamic_cast< const formula::DoubleVectorRefToken* >(ref);
-        assert(pDVR);
+            static_cast< const formula::DoubleVectorRefToken* >(ref);
         nStrings = pDVR->GetArrayLength();
         vRef = pDVR->GetArrays()[mnIndex];
     }
@@ -495,8 +491,7 @@ public:
         FormulaToken *t = ft->GetFormulaToken();
         if (t->GetType() != formula::svDoubleVectorRef)
             throw Unhandled();
-        mpDVR = dynamic_cast<const formula::DoubleVectorRefToken *>(t);
-        assert(mpDVR);
+        mpDVR = static_cast<const formula::DoubleVectorRefToken *>(t);
         bIsStartFixed = mpDVR->IsStartFixed();
         bIsEndFixed = mpDVR->IsEndFixed();
     }
@@ -816,8 +811,7 @@ public:
         FormulaToken *t = ft->GetFormulaToken();
         if (t->GetType() != formula::svDoubleVectorRef)
             throw Unhandled();
-        mpDVR = dynamic_cast<const formula::DoubleVectorRefToken *>(t);
-        assert(mpDVR);
+        mpDVR = static_cast<const formula::DoubleVectorRefToken *>(t);
         bIsStartFixed = mpDVR->IsStartFixed();
         bIsEndFixed = mpDVR->IsEndFixed();
     }
@@ -1261,7 +1255,7 @@ public:
                 {
 #ifdef  ISNAN
                     const formula::SingleVectorRefToken* pSVR =
-                        dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+                        static_cast< const formula::SingleVectorRefToken* >(pCur);
                     ss << "if (gid0 < " << pSVR->GetArrayLength() << "){\n\t\t";
 #else
                     nItems += 1;
@@ -1373,7 +1367,7 @@ public:
             if (  ocPush==tmpCur->GetOpCode() )
             {
 
-                pCurDVR = dynamic_cast<
+                pCurDVR = static_cast<
                     const formula::DoubleVectorRefToken*>(tmpCur);
                 if ( !
                     ( (!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
@@ -1394,7 +1388,7 @@ public:
             tmpCur = vSubArguments[i]->GetFormulaToken();
             if(ocPush==tmpCur->GetOpCode())
             {
-                pCurDVR= dynamic_cast<
+                pCurDVR= static_cast<
                     const formula::DoubleVectorRefToken *>(tmpCur);
                 if(!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
                 {
@@ -1426,7 +1420,7 @@ public:
                      formula::svSingleVectorRef)
                 {
                     const formula::SingleVectorRefToken* pSVR =
-                    dynamic_cast< const formula::SingleVectorRefToken*>
+                    static_cast< const formula::SingleVectorRefToken*>
                          (vSubArguments[i]->GetFormulaToken());
                     ss<<pSVR->GetArrayLength();
                 }
@@ -1434,7 +1428,7 @@ public:
                           formula::svDoubleVectorRef)
                 {
                     const formula::DoubleVectorRefToken* pSVR =
-                    dynamic_cast< const formula::DoubleVectorRefToken*>
+                    static_cast< const formula::DoubleVectorRefToken*>
                           (vSubArguments[i]->GetFormulaToken());
                     ss<<pSVR->GetArrayLength();
                 }
@@ -1471,7 +1465,7 @@ public:
                         tmpCur = vSubArguments[i]->GetFormulaToken();
                         if(ocPush==tmpCur->GetOpCode())
                         {
-                            pCurDVR= dynamic_cast<
+                            pCurDVR= static_cast<
                                 const formula::DoubleVectorRefToken *>(tmpCur);
                             if(!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
                             {
@@ -1500,14 +1494,14 @@ public:
                             if(vSubArguments[i]->GetFormulaToken()->GetType() ==
                                     formula::svSingleVectorRef){
                                 const formula::SingleVectorRefToken* pSVR =
-                                    dynamic_cast< const formula::SingleVectorRefToken*>
+                                    static_cast< const formula::SingleVectorRefToken*>
                                     (vSubArguments[i]->GetFormulaToken());
                                 temp3<<pSVR->GetArrayLength();
                             }
                             else if(vSubArguments[i]->GetFormulaToken()->GetType() ==
                                     formula::svDoubleVectorRef){
                                 const formula::DoubleVectorRefToken* pSVR =
-                                    dynamic_cast< const formula::DoubleVectorRefToken*>
+                                    static_cast< const formula::DoubleVectorRefToken*>
                                     (vSubArguments[i]->GetFormulaToken());
                                 temp3<<pSVR->GetArrayLength();
                             }
@@ -1537,7 +1531,7 @@ public:
                     tmpCur = vSubArguments[i]->GetFormulaToken();
                     if(ocPush==tmpCur->GetOpCode())
                     {
-                        pCurDVR= dynamic_cast<
+                        pCurDVR= static_cast<
                             const formula::DoubleVectorRefToken *>(tmpCur);
                         if(!pCurDVR->IsStartFixed() && !pCurDVR->IsEndFixed())
                         {
@@ -1569,7 +1563,7 @@ public:
                                 formula::svSingleVectorRef)
                         {
                             const formula::SingleVectorRefToken* pSVR =
-                                dynamic_cast< const formula::SingleVectorRefToken*>
+                                static_cast< const formula::SingleVectorRefToken*>
                                 (vSubArguments[i]->GetFormulaToken());
                             temp4<<pSVR->GetArrayLength();
                         }
@@ -1577,7 +1571,7 @@ public:
                                 formula::svDoubleVectorRef)
                         {
                             const formula::DoubleVectorRefToken* pSVR =
-                                dynamic_cast< const formula::DoubleVectorRefToken*>
+                                static_cast< const formula::DoubleVectorRefToken*>
                                 (vSubArguments[i]->GetFormulaToken());
                             temp4<<pSVR->GetArrayLength();
                         }
@@ -1782,14 +1776,10 @@ public:
             KernelEnv kEnv;
             OpenclDevice::setKernelEnv(&kEnv);
             cl_int err;
-            DynamicKernelSlidingArgument<VectorRef> *slidingArgPtr =
-                dynamic_cast< DynamicKernelSlidingArgument<VectorRef> *>
-                (mvSubArguments[0].get());
             cl_mem pClmem2;
 
             if (OpSumCodeGen->NeedReductionKernel())
             {
-                assert(slidingArgPtr); (void) slidingArgPtr;
                 std::vector<cl_mem> vclmem;
                 for (SubArgumentsType::iterator it = mvSubArguments.begin(),
                         e= mvSubArguments.end(); it!=e; ++it)
@@ -1845,12 +1835,11 @@ public:
             cl_int err;
             DynamicKernelArgument *Arg = mvSubArguments[0].get();
             DynamicKernelSlidingArgument<VectorRef> *slidingArgPtr =
-                dynamic_cast< DynamicKernelSlidingArgument<VectorRef> *> (Arg);
+                static_cast< DynamicKernelSlidingArgument<VectorRef> *> (Arg);
             mpClmem2 = NULL;
 
             if (OpSumCodeGen->NeedReductionKernel())
             {
-                assert(slidingArgPtr);
                 size_t nInput = slidingArgPtr -> GetArrayLength();
                 size_t nCurWindowSize = slidingArgPtr -> GetWindowSize();
                 std::vector<SumIfsArgs> vclmem;
@@ -2060,7 +2049,7 @@ DynamicKernelArgument *VectorRefFactory(const std::string &s,
     }
 
     const formula::DoubleVectorRefToken* pDVR =
-        dynamic_cast< const formula::DoubleVectorRefToken* >(
+        static_cast< const formula::DoubleVectorRefToken* >(
                 ft->GetFormulaToken());
     // Window being too small to justify a parallel reduction
     if (pDVR->GetRefRowSize() < REDUCE_THRESHOLD)
@@ -2092,8 +2081,7 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(
                 if (pChild->GetType() == formula::svDoubleVectorRef)
                 {
                     const formula::DoubleVectorRefToken* pDVR =
-                        dynamic_cast< const formula::DoubleVectorRefToken* >(pChild);
-                    assert(pDVR);
+                        static_cast< const formula::DoubleVectorRefToken* >(pChild);
                     for (size_t j = 0; j < pDVR->GetArrays().size(); ++j)
                     {
                         if (pDVR->GetArrays()[j].mpNumericArray ||
@@ -2125,8 +2113,7 @@ DynamicKernelSoPArguments::DynamicKernelSoPArguments(
                     }
                 } else if (pChild->GetType() == formula::svSingleVectorRef) {
                     const formula::SingleVectorRefToken* pSVR =
-                        dynamic_cast< const formula::SingleVectorRefToken* >(pChild);
-                    assert(pSVR);
+                        static_cast< const formula::SingleVectorRefToken* >(pChild);
                     if (pSVR->GetArray().mpNumericArray &&
                         pCodeGen->takeNumeric() &&
                         pSVR->GetArray().mpStringArray &&
diff --git a/sc/source/core/opencl/op_addin.cxx b/sc/source/core/opencl/op_addin.cxx
index c8eb2e3..6b05527 100644
--- a/sc/source/core/opencl/op_addin.cxx
+++ b/sc/source/core/opencl/op_addin.cxx
@@ -49,7 +49,7 @@ void OpBesselj::GenSlidingWindowFunction(std::stringstream &ss,
         if(tmpCur0->GetType() == formula::svSingleVectorRef)
         {
             const formula::SingleVectorRefToken*tmpCurSVR0 =
-                dynamic_cast<const formula::SingleVectorRefToken *>(tmpCur0);
+                static_cast<const formula::SingleVectorRefToken *>(tmpCur0);
 #ifdef  ISNAN
             ss << "    if (gid0 < " << tmpCurSVR0->GetArrayLength() << ")\n";
             ss << "    {\n";
@@ -85,7 +85,7 @@ void OpBesselj::GenSlidingWindowFunction(std::stringstream &ss,
         if(tmpCur1->GetType() == formula::svSingleVectorRef)
         {
             const formula::SingleVectorRefToken*tmpCurSVR1 =
-                dynamic_cast<const formula::SingleVectorRefToken *>(tmpCur1);
+                static_cast<const formula::SingleVectorRefToken *>(tmpCur1);
 #ifdef  ISNAN
             ss << "    if (gid0 < " << tmpCurSVR1->GetArrayLength() << ")\n";
             ss << "    {\n";
diff --git a/sc/source/core/opencl/op_array.cxx b/sc/source/core/opencl/op_array.cxx
index a793996..60f2a40 100644
--- a/sc/source/core/opencl/op_array.cxx
+++ b/sc/source/core/opencl/op_array.cxx
@@ -41,7 +41,7 @@ void OpSumX2MY2::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         size_t nCurWindowSize = pCurDVR->GetArrayLength() <
         pCurDVR->GetRefRowSize() ? pCurDVR->GetArrayLength():
@@ -98,7 +98,7 @@ void OpSumX2PY2::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         size_t nCurWindowSize = pCurDVR->GetArrayLength() <
         pCurDVR->GetRefRowSize() ? pCurDVR->GetArrayLength():
@@ -154,7 +154,7 @@ void OpSumXMY2::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         size_t nCurWindowSize = pCurDVR->GetArrayLength() <
         pCurDVR->GetRefRowSize() ? pCurDVR->GetArrayLength():
diff --git a/sc/source/core/opencl/op_database.cxx b/sc/source/core/opencl/op_database.cxx
index 1535dc2..8ac8a99 100644
--- a/sc/source/core/opencl/op_database.cxx
+++ b/sc/source/core/opencl/op_database.cxx
@@ -43,7 +43,7 @@ void OpDmax::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         formula::FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         dataCol = pCurDVR1->GetArrays().size();
         dataRow = pCurDVR1->GetArrayLength();
@@ -53,7 +53,7 @@ void OpDmax::GenSlidingWindowFunction(std::stringstream &ss,
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
-         const formula::SingleVectorRefToken*pTmpDVR1= dynamic_cast<const
+         const formula::SingleVectorRefToken*pTmpDVR1= static_cast<const
          formula::SingleVectorRefToken *>(vSubArguments[dataCol]->
          GetFormulaToken());
          ss << "    tmp"<<dataCol<<"=";
@@ -71,7 +71,7 @@ void OpDmax::GenSlidingWindowFunction(std::stringstream &ss,
     {
         formula::FormulaToken *tmpCur = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         conditionCol = pCurDVR2->GetArrays().size();
         conditionRow = pCurDVR2->GetArrayLength();
@@ -86,9 +86,9 @@ void OpDmax::GenSlidingWindowFunction(std::stringstream &ss,
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
         formula::FormulaToken *tmpCur2 = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur1);
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur2);
 
         if(pCurDVR1->IsStartFixed() && pCurDVR1->IsEndFixed() &&
@@ -173,7 +173,7 @@ void OpDmin::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         formula::FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         dataCol = pCurDVR1->GetArrays().size();
         dataRow = pCurDVR1->GetArrayLength();
@@ -183,7 +183,7 @@ void OpDmin::GenSlidingWindowFunction(std::stringstream &ss,
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
-         const formula::SingleVectorRefToken*pTmpDVR1= dynamic_cast<const
+         const formula::SingleVectorRefToken*pTmpDVR1= static_cast<const
          formula::SingleVectorRefToken *>(vSubArguments[dataCol]->
          GetFormulaToken());
          ss << "    tmp"<<dataCol<<"=";
@@ -201,7 +201,7 @@ void OpDmin::GenSlidingWindowFunction(std::stringstream &ss,
     {
         formula::FormulaToken *tmpCur = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         conditionCol = pCurDVR2->GetArrays().size();
         conditionRow = pCurDVR2->GetArrayLength();
@@ -216,9 +216,9 @@ void OpDmin::GenSlidingWindowFunction(std::stringstream &ss,
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
         formula::FormulaToken *tmpCur2 = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur1);
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur2);
 
         if(pCurDVR1->IsStartFixed() && pCurDVR1->IsEndFixed() &&
@@ -304,7 +304,7 @@ void OpDproduct::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         formula::FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         dataCol = pCurDVR1->GetArrays().size();
         dataRow = pCurDVR1->GetArrayLength();
@@ -314,7 +314,7 @@ void OpDproduct::GenSlidingWindowFunction(std::stringstream &ss,
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
-         const formula::SingleVectorRefToken*pTmpDVR1= dynamic_cast<const
+         const formula::SingleVectorRefToken*pTmpDVR1= static_cast<const
          formula::SingleVectorRefToken *>(vSubArguments[dataCol]->
          GetFormulaToken());
          ss << "    tmp"<<dataCol<<"=";
@@ -332,7 +332,7 @@ void OpDproduct::GenSlidingWindowFunction(std::stringstream &ss,
     {
         formula::FormulaToken *tmpCur = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         conditionCol = pCurDVR2->GetArrays().size();
         conditionRow = pCurDVR2->GetArrayLength();
@@ -347,9 +347,9 @@ void OpDproduct::GenSlidingWindowFunction(std::stringstream &ss,
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
         formula::FormulaToken *tmpCur2 = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur1);
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur2);
 
         if(pCurDVR1->IsStartFixed() && pCurDVR1->IsEndFixed() &&
@@ -434,7 +434,7 @@ void OpDaverage::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         formula::FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         dataCol = pCurDVR1->GetArrays().size();
         dataRow = pCurDVR1->GetArrayLength();
@@ -444,7 +444,7 @@ void OpDaverage::GenSlidingWindowFunction(std::stringstream &ss,
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
-         const formula::SingleVectorRefToken*pTmpDVR1= dynamic_cast<const
+         const formula::SingleVectorRefToken*pTmpDVR1= static_cast<const
          formula::SingleVectorRefToken *>(vSubArguments[dataCol]->
          GetFormulaToken());
          ss << "    tmp"<<dataCol<<"=";
@@ -462,7 +462,7 @@ void OpDaverage::GenSlidingWindowFunction(std::stringstream &ss,
     {
         formula::FormulaToken *tmpCur = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         conditionCol = pCurDVR2->GetArrays().size();
         conditionRow = pCurDVR2->GetArrayLength();
@@ -477,9 +477,9 @@ void OpDaverage::GenSlidingWindowFunction(std::stringstream &ss,
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
         formula::FormulaToken *tmpCur2 = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur1);
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur2);
 
         if(pCurDVR1->IsStartFixed() && pCurDVR1->IsEndFixed() &&
@@ -569,7 +569,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         formula::FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         dataCol = pCurDVR1->GetArrays().size();
         dataRow = pCurDVR1->GetArrayLength();
@@ -579,7 +579,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss,
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
-         const formula::SingleVectorRefToken*pTmpDVR1= dynamic_cast<const
+         const formula::SingleVectorRefToken*pTmpDVR1= static_cast<const
          formula::SingleVectorRefToken *>(vSubArguments[dataCol]->
          GetFormulaToken());
          ss << "    tmp"<<dataCol<<"=";
@@ -597,7 +597,7 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss,
     {
         formula::FormulaToken *tmpCur = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         conditionCol = pCurDVR2->GetArrays().size();
         conditionRow = pCurDVR2->GetArrayLength();
@@ -612,9 +612,9 @@ void OpDstdev::GenSlidingWindowFunction(std::stringstream &ss,
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
         formula::FormulaToken *tmpCur2 = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur1);
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur2);
 
         if(pCurDVR1->IsStartFixed() && pCurDVR1->IsEndFixed() &&
@@ -754,7 +754,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         formula::FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         dataCol = pCurDVR1->GetArrays().size();
         dataRow = pCurDVR1->GetArrayLength();
@@ -764,7 +764,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss,
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
-         const formula::SingleVectorRefToken*pTmpDVR1= dynamic_cast<const
+         const formula::SingleVectorRefToken*pTmpDVR1= static_cast<const
          formula::SingleVectorRefToken *>(vSubArguments[dataCol]->
          GetFormulaToken());
          ss << "    tmp"<<dataCol<<"=";
@@ -782,7 +782,7 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss,
     {
         formula::FormulaToken *tmpCur = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         conditionCol = pCurDVR2->GetArrays().size();
         conditionRow = pCurDVR2->GetArrayLength();
@@ -797,9 +797,9 @@ void OpDstdevp::GenSlidingWindowFunction(std::stringstream &ss,
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
         formula::FormulaToken *tmpCur2 = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur1);
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur2);
 
         if(pCurDVR1->IsStartFixed() && pCurDVR1->IsEndFixed() &&
@@ -937,7 +937,7 @@ void OpDsum::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         formula::FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         dataCol = pCurDVR1->GetArrays().size();
         dataRow = pCurDVR1->GetArrayLength();
@@ -947,7 +947,7 @@ void OpDsum::GenSlidingWindowFunction(std::stringstream &ss,
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
-         const formula::SingleVectorRefToken*pTmpDVR1= dynamic_cast<const
+         const formula::SingleVectorRefToken*pTmpDVR1= static_cast<const
          formula::SingleVectorRefToken *>(vSubArguments[dataCol]->
          GetFormulaToken());
          ss << "    tmp"<<dataCol<<"=";
@@ -965,7 +965,7 @@ void OpDsum::GenSlidingWindowFunction(std::stringstream &ss,
     {
         formula::FormulaToken *tmpCur = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         conditionCol = pCurDVR2->GetArrays().size();
         conditionRow = pCurDVR2->GetArrayLength();
@@ -980,9 +980,9 @@ void OpDsum::GenSlidingWindowFunction(std::stringstream &ss,
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
         formula::FormulaToken *tmpCur2 = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur1);
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur2);
 
         if(pCurDVR1->IsStartFixed() && pCurDVR1->IsEndFixed() &&
@@ -1069,7 +1069,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         formula::FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         dataCol = pCurDVR1->GetArrays().size();
         dataRow = pCurDVR1->GetArrayLength();
@@ -1079,7 +1079,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss,
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
-         const formula::SingleVectorRefToken*pTmpDVR1= dynamic_cast<const
+         const formula::SingleVectorRefToken*pTmpDVR1= static_cast<const
          formula::SingleVectorRefToken *>(vSubArguments[dataCol]->
          GetFormulaToken());
          ss << "    tmp"<<dataCol<<"=";
@@ -1097,7 +1097,7 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss,
     {
         formula::FormulaToken *tmpCur = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         conditionCol = pCurDVR2->GetArrays().size();
         conditionRow = pCurDVR2->GetArrayLength();
@@ -1112,9 +1112,9 @@ void OpDvar::GenSlidingWindowFunction(std::stringstream &ss,
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
         formula::FormulaToken *tmpCur2 = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur1);
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur2);
 
         if(pCurDVR1->IsStartFixed() && pCurDVR1->IsEndFixed() &&
@@ -1254,7 +1254,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         formula::FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         dataCol = pCurDVR1->GetArrays().size();
         dataRow = pCurDVR1->GetArrayLength();
@@ -1264,7 +1264,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss,
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
-         const formula::SingleVectorRefToken*pTmpDVR1= dynamic_cast<const
+         const formula::SingleVectorRefToken*pTmpDVR1= static_cast<const
          formula::SingleVectorRefToken *>(vSubArguments[dataCol]->
          GetFormulaToken());
          ss << "    tmp"<<dataCol<<"=";
@@ -1282,7 +1282,7 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss,
     {
         formula::FormulaToken *tmpCur = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         conditionCol = pCurDVR2->GetArrays().size();
         conditionRow = pCurDVR2->GetArrayLength();
@@ -1297,9 +1297,9 @@ void OpDvarp::GenSlidingWindowFunction(std::stringstream &ss,
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
         formula::FormulaToken *tmpCur2 = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur1);
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur2);
 
         if(pCurDVR1->IsStartFixed() && pCurDVR1->IsEndFixed() &&
@@ -1437,7 +1437,7 @@ void OpDcount::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         formula::FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         dataCol = pCurDVR1->GetArrays().size();
         dataRow = pCurDVR1->GetArrayLength();
@@ -1447,7 +1447,7 @@ void OpDcount::GenSlidingWindowFunction(std::stringstream &ss,
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
-        const formula::SingleVectorRefToken*pTmpDVR1= dynamic_cast<const
+        const formula::SingleVectorRefToken*pTmpDVR1= static_cast<const
             formula::SingleVectorRefToken *>(vSubArguments[dataCol]
             ->GetFormulaToken());
          ss << "    tmp"<<dataCol<<"=";
@@ -1465,7 +1465,7 @@ void OpDcount::GenSlidingWindowFunction(std::stringstream &ss,
     {
         formula::FormulaToken *tmpCur = vSubArguments[dataCol + 1]
             ->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         conditionCol = pCurDVR2->GetArrays().size();
         conditionRow = pCurDVR2->GetArrayLength();
@@ -1480,9 +1480,9 @@ void OpDcount::GenSlidingWindowFunction(std::stringstream &ss,
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
         formula::FormulaToken *tmpCur2 = vSubArguments[dataCol + 1]
             ->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur1);
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur2);
 
         if(pCurDVR1->IsStartFixed() && pCurDVR1->IsEndFixed() &&
@@ -1568,7 +1568,7 @@ void OpDcount2::GenSlidingWindowFunction(std::stringstream &ss,
     formula::svDoubleVectorRef)
     {
         formula::FormulaToken *tmpCur = vSubArguments[0]->GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         dataCol = pCurDVR1->GetArrays().size();
         dataRow = pCurDVR1->GetArrayLength();
@@ -1578,7 +1578,7 @@ void OpDcount2::GenSlidingWindowFunction(std::stringstream &ss,
     if(vSubArguments[dataCol]->GetFormulaToken()->GetType() ==
      formula::svSingleVectorRef)
      {
-        const formula::SingleVectorRefToken*pTmpDVR1= dynamic_cast<const
+        const formula::SingleVectorRefToken*pTmpDVR1= static_cast<const
             formula::SingleVectorRefToken *>(vSubArguments[dataCol]
             ->GetFormulaToken());
          ss << "    tmp"<<dataCol<<"=";
@@ -1596,7 +1596,7 @@ void OpDcount2::GenSlidingWindowFunction(std::stringstream &ss,
     {
         formula::FormulaToken *tmpCur = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur);
         conditionCol = pCurDVR2->GetArrays().size();
         conditionRow = pCurDVR2->GetArrayLength();
@@ -1611,9 +1611,9 @@ void OpDcount2::GenSlidingWindowFunction(std::stringstream &ss,
         formula::FormulaToken *tmpCur1 = vSubArguments[0]->GetFormulaToken();
         formula::FormulaToken *tmpCur2 = vSubArguments[dataCol + 1]->
             GetFormulaToken();
-        const formula::DoubleVectorRefToken*pCurDVR1= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR1= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur1);
-        const formula::DoubleVectorRefToken*pCurDVR2= dynamic_cast<const
+        const formula::DoubleVectorRefToken*pCurDVR2= static_cast<const
             formula::DoubleVectorRefToken *>(tmpCur2);
 
         if(pCurDVR1->IsStartFixed() && pCurDVR1->IsEndFixed() &&
diff --git a/sc/source/core/opencl/op_financial.cxx b/sc/source/core/opencl/op_financial.cxx
index 4ead16c..6084964 100644
--- a/sc/source/core/opencl/op_financial.cxx
+++ b/sc/source/core/opencl/op_financial.cxx
@@ -43,15 +43,15 @@ void RRI::GenSlidingWindowFunction(
     ss << "    double nper;\n";
 #ifdef ISNAN
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur0);
 
     FormulaToken *tmpCur1 = vSubArguments[1]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR1= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur1);
 
     FormulaToken *tmpCur2 = vSubArguments[2]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR2= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur2);
 
     ss<< "    int buffer_nper_len = ";
@@ -126,7 +126,7 @@ vSubArguments)
         {
 #ifdef  ISNAN
                 const formula::SingleVectorRefToken* pSVR =
-                dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+                static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #else
 #endif
@@ -192,10 +192,10 @@ void OpDollarde::GenSlidingWindowFunction(
     ss << "double fFrac;\n\t";
 #ifdef ISNAN
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur0);
     FormulaToken *tmpCur1 = vSubArguments[1]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR1= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur1);
     ss<< "int buffer_dollar_len = ";
     ss<< tmpCurDVR0->GetArrayLength();
@@ -249,10 +249,10 @@ void OpDollarfr::GenSlidingWindowFunction(std::stringstream &ss,
     ss << "double fFrac;\n\t";
 #ifdef  ISNAN
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur0);
     FormulaToken *tmpCur1 = vSubArguments[1]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR1= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur1);
     ss<< "int buffer_dollar_len = ";
     ss<< tmpCurDVR0->GetArrayLength();
@@ -323,7 +323,7 @@ void OpDISC::GenSlidingWindowFunction(std::stringstream& ss,
         {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-                dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+                static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #endif
         }
@@ -404,7 +404,7 @@ void OpINTRATE::GenSlidingWindowFunction(std::stringstream& ss,
         {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-                dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+                static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #endif
         }
@@ -479,7 +479,7 @@ void OpFV::GenSlidingWindowFunction(std::stringstream& ss,
             {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-            dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+            static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if(gid0 >= " << pSVR->GetArrayLength() << " || isNan(";
             ss << vSubArguments[j]->GenSlidingWindowDeclRef();
             ss << "))\n";
@@ -532,7 +532,7 @@ void OpIPMT::GenSlidingWindowFunction(std::stringstream& ss,
             {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-            dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+            static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if(gid0 >= " << pSVR->GetArrayLength() << " || isNan(";
             ss << vSubArguments[j]->GenSlidingWindowDeclRef();
             ss << "))\n";
@@ -599,7 +599,7 @@ void OpISPMT::GenSlidingWindowFunction(std::stringstream& ss,
         {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-                dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+                static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #endif
         }
@@ -661,7 +661,7 @@ void OpDuration::GenSlidingWindowFunction(std::stringstream& ss,
         {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-                dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+                static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #endif
         }
@@ -740,7 +740,7 @@ void OpDuration_ADD::GenSlidingWindowFunction(std::stringstream& ss,
         {
 #ifdef ISNAN
             const formula::SingleVectorRefToken* pSVR =
-                dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+                static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if(gid0 >= " << pSVR->GetArrayLength() << " || isNan(";
             ss << vSubArguments[j]->GenSlidingWindowDeclRef();
             ss << "))\n";
@@ -801,7 +801,7 @@ void OpMDuration::GenSlidingWindowFunction(std::stringstream& ss,
         {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-                dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+                static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #endif
         }
@@ -846,7 +846,7 @@ void Fvschedule::GenSlidingWindowFunction(
     FormulaToken* pCur = vSubArguments[1]->GetFormulaToken();
     assert(pCur);
     const formula::DoubleVectorRefToken* pCurDVR =
-        dynamic_cast<const formula::DoubleVectorRefToken *>(pCur);
+        static_cast<const formula::DoubleVectorRefToken *>(pCur);
     size_t nCurWindowSize = pCurDVR->GetRefRowSize();
     ss << "\ndouble " << sSymName;
     ss << "_"<< BinFuncName() <<"(";
@@ -917,7 +917,7 @@ vSubArguments)
 #ifdef ISNAN
     if(tmpCur0->GetType() == formula::svSingleVectorRef)
     {
-        const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+        const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur0);
         ss <<"    if(gid0 >= "<<tmpCurDVR0->GetArrayLength()<<" || isNan(";
         ss <<vSubArguments[0]->GenSlidingWindowDeclRef();
@@ -930,7 +930,7 @@ vSubArguments)
 #ifdef ISNAN
     if(tmpCur1->GetType() == formula::svSingleVectorRef)
     {
-        const formula::SingleVectorRefToken*tmpCurDVR1= dynamic_cast<const
+        const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur1);
         ss <<"    if(gid0 >= "<<tmpCurDVR1->GetArrayLength()<<" || isNan(";
         ss <<vSubArguments[1]->GenSlidingWindowDeclRef();
@@ -944,7 +944,7 @@ vSubArguments)
 #ifdef ISNAN
     if(tmpCur2->GetType() == formula::svSingleVectorRef)
     {
-        const formula::SingleVectorRefToken*tmpCurDVR2= dynamic_cast<const
+        const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur2);
         ss <<"    if(gid0 >= "<<tmpCurDVR2->GetArrayLength()<<" || isNan(";
         ss <<vSubArguments[2]->GenSlidingWindowDeclRef();
@@ -957,7 +957,7 @@ vSubArguments)
 #ifdef ISNAN
     if(tmpCur3->GetType() == formula::svSingleVectorRef)
     {
-        const formula::SingleVectorRefToken*tmpCurDVR3= dynamic_cast<const
+        const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur3);
         ss <<"    if(gid0 >= "<<tmpCurDVR3->GetArrayLength()<<" || isNan(";
         ss <<vSubArguments[3]->GenSlidingWindowDeclRef();
@@ -971,7 +971,7 @@ vSubArguments)
 #ifdef ISNAN
     if(tmpCur4->GetType() == formula::svSingleVectorRef)
     {
-        const formula::SingleVectorRefToken*tmpCurDVR4= dynamic_cast<const
+        const formula::SingleVectorRefToken*tmpCurDVR4= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur4);
         ss <<"    if(gid0 >= "<<tmpCurDVR4->GetArrayLength()<<" || isNan(";
         ss <<vSubArguments[4]->GenSlidingWindowDeclRef();
@@ -986,7 +986,7 @@ vSubArguments)
 #ifdef ISNAN
     if(tmpCur5->GetType() == formula::svSingleVectorRef)
     {
-        const formula::SingleVectorRefToken*tmpCurDVR5= dynamic_cast<const
+        const formula::SingleVectorRefToken*tmpCurDVR5= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur5);
         ss <<"    if(gid0 >= "<<tmpCurDVR5->GetArrayLength()<<" || isNan(";
         ss <<vSubArguments[5]->GenSlidingWindowDeclRef();
@@ -1044,7 +1044,7 @@ void IRR::GenSlidingWindowFunction(std::stringstream &ss,
     {
 #ifdef  ISNAN
         const formula::SingleVectorRefToken* pSVR =
-            dynamic_cast< const formula::SingleVectorRefToken* >(pSur);
+            static_cast< const formula::SingleVectorRefToken* >(pSur);
         ss << "    if (gid0 >= " << pSVR->GetArrayLength() << ")\n";
         ss << "        fSchaetzwert = 0.1;\n";
         ss << "    if (isNan(fSchaetzwert))\n";
@@ -1069,7 +1069,7 @@ void IRR::GenSlidingWindowFunction(std::stringstream &ss,
     FormulaToken* pCur = vSubArguments[0]->GetFormulaToken();
     assert(pCur);
     const formula::DoubleVectorRefToken* pDVR =
-        dynamic_cast<const formula::DoubleVectorRefToken* >(pCur);
+        static_cast<const formula::DoubleVectorRefToken* >(pCur);
     size_t nCurWindowSize = pDVR->GetRefRowSize();
     ss << "        for ( ";
     if (!pDVR->IsStartFixed() && pDVR->IsEndFixed()) {
@@ -1238,7 +1238,7 @@ void XNPV::GenSlidingWindowFunction(
     FormulaToken *pCur = vSubArguments[1]->GetFormulaToken();
     assert(pCur);
     const formula::DoubleVectorRefToken* pCurDVR =
-        dynamic_cast<const formula::DoubleVectorRefToken *>(pCur);
+        static_cast<const formula::DoubleVectorRefToken *>(pCur);
     size_t nCurWindowSize = pCurDVR->GetRefRowSize();
     ss << "\ndouble " << sSymName;
     ss << "_"<< BinFuncName() <<"( ";
@@ -1262,15 +1262,15 @@ void XNPV::GenSlidingWindowFunction(
     ss << "double dateNull;\n\t";
 #ifdef ISNAN
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur0);
 
     FormulaToken *tmpCur1 = vSubArguments[1]->GetFormulaToken();
-    const formula::DoubleVectorRefToken*tmpCurDVR1= dynamic_cast<const
+    const formula::DoubleVectorRefToken*tmpCurDVR1= static_cast<const
     formula::DoubleVectorRefToken *>(tmpCur1);
 
     FormulaToken *tmpCur2 = vSubArguments[2]->GetFormulaToken();
-    const formula::DoubleVectorRefToken*tmpCurDVR2= dynamic_cast<const
+    const formula::DoubleVectorRefToken*tmpCurDVR2= static_cast<const
     formula::DoubleVectorRefToken *>(tmpCur2);
     ss<< "int buffer_rate_len = ";
     ss<< tmpCurDVR0->GetArrayLength();
@@ -1361,22 +1361,22 @@ void PriceMat::GenSlidingWindowFunction(
     ss <<"int  nBase;\n\t";
 #ifdef ISNAN
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur0);
     FormulaToken *tmpCur1 = vSubArguments[1]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR1= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur1);
     FormulaToken *tmpCur2 = vSubArguments[2]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR2= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur2);
     FormulaToken *tmpCur3 = vSubArguments[3]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR3= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur3);
     FormulaToken *tmpCur4 = vSubArguments[4]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR4= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR4= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur4);
     FormulaToken *tmpCur5 = vSubArguments[5]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR5= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR5= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur5);
 
     ss<< "int buffer_settle_len = ";
@@ -1483,19 +1483,19 @@ void OpSYD::GenSlidingWindowFunction(std::stringstream &ss,
     ss << "    double period;\n";
 #ifdef ISNAN
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur0);
 
     FormulaToken *tmpCur1 = vSubArguments[1]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR1= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur1);
 
     FormulaToken *tmpCur2 = vSubArguments[2]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR2= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur2);
 
     FormulaToken *tmpCur3 = vSubArguments[3]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR3= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur3);
 
     ss << "    int buffer_cost_len = ";
@@ -1563,17 +1563,17 @@ void MIRR::GenSlidingWindowFunction(
     FormulaToken* pCur = vSubArguments[0]->GetFormulaToken();
     assert(pCur);
     const formula::DoubleVectorRefToken* pCurDVR =
-    dynamic_cast<const formula::DoubleVectorRefToken *>(pCur);
+    static_cast<const formula::DoubleVectorRefToken *>(pCur);
     size_t nCurWindowSize = pCurDVR->GetRefRowSize();
     FormulaToken* pCur1 = vSubArguments[1]->GetFormulaToken();
     assert(pCur1);
     const formula::SingleVectorRefToken* pSVR1 =
-        dynamic_cast< const formula::SingleVectorRefToken* >(pCur1);
+        static_cast< const formula::SingleVectorRefToken* >(pCur1);
     assert(pSVR1);
     FormulaToken* pCur2 = vSubArguments[2]->GetFormulaToken();
     assert(pCur2);
     const formula::SingleVectorRefToken* pSVR2 =
-        dynamic_cast< const formula::SingleVectorRefToken* >(pCur2);
+        static_cast< const formula::SingleVectorRefToken* >(pCur2);
     assert(pSVR2);
 
     ss << "\ndouble " << sSymName;
@@ -1663,7 +1663,7 @@ void OpEffective::GenSlidingWindowFunction(std::stringstream& ss,
         {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-                dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+                static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #endif
         }
@@ -1732,15 +1732,15 @@ void OpTbilleq::GenSlidingWindowFunction(
 
 #ifdef ISNAN
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur0);
 
     FormulaToken *tmpCur1 = vSubArguments[1]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR1= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur1);
 
     FormulaToken *tmpCur2 = vSubArguments[2]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR2= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur2);
 
     ss<< "int buffer_tmp000_len = ";
@@ -1825,7 +1825,7 @@ void OpCumprinc::GenSlidingWindowFunction(std::stringstream &ss,
 #ifdef ISNAN
     if(tmpCur0->GetType() == formula::svSingleVectorRef)
     {
-        const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+        const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur0);
         ss <<"    if(gid0 >= "<<tmpCurDVR0->GetArrayLength()<<" || isNan(";
         ss <<vSubArguments[0]->GenSlidingWindowDeclRef();
@@ -1838,7 +1838,7 @@ void OpCumprinc::GenSlidingWindowFunction(std::stringstream &ss,
 #ifdef ISNAN
     if(tmpCur1->GetType() == formula::svSingleVectorRef)
     {
-        const formula::SingleVectorRefToken*tmpCurDVR1= dynamic_cast<const
+        const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur1);
         ss <<"    if(gid0 >= "<<tmpCurDVR1->GetArrayLength()<<" || isNan(";
         ss <<vSubArguments[1]->GenSlidingWindowDeclRef();
@@ -1852,7 +1852,7 @@ void OpCumprinc::GenSlidingWindowFunction(std::stringstream &ss,
 #ifdef ISNAN
     if(tmpCur2->GetType() == formula::svSingleVectorRef)
     {
-        const formula::SingleVectorRefToken*tmpCurDVR2= dynamic_cast<const
+        const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur2);
         ss <<"    if(gid0 >= "<<tmpCurDVR2->GetArrayLength()<<" || isNan(";
         ss <<vSubArguments[2]->GenSlidingWindowDeclRef();
@@ -1865,7 +1865,7 @@ void OpCumprinc::GenSlidingWindowFunction(std::stringstream &ss,
 #ifdef ISNAN
     if(tmpCur3->GetType() == formula::svSingleVectorRef)
     {
-        const formula::SingleVectorRefToken*tmpCurDVR3= dynamic_cast<const
+        const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur3);
         ss <<"    if(gid0 >= "<<tmpCurDVR3->GetArrayLength()<<" || isNan(";
         ss <<vSubArguments[3]->GenSlidingWindowDeclRef();
@@ -1879,7 +1879,7 @@ void OpCumprinc::GenSlidingWindowFunction(std::stringstream &ss,
 #ifdef ISNAN
     if(tmpCur4->GetType() == formula::svSingleVectorRef)
     {
-        const formula::SingleVectorRefToken*tmpCurDVR4= dynamic_cast<const
+        const formula::SingleVectorRefToken*tmpCurDVR4= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur4);
         ss <<"    if(gid0 >= "<<tmpCurDVR4->GetArrayLength()<<" || isNan(";
         ss <<vSubArguments[4]->GenSlidingWindowDeclRef();
@@ -1894,7 +1894,7 @@ void OpCumprinc::GenSlidingWindowFunction(std::stringstream &ss,
 #ifdef ISNAN
     if(tmpCur5->GetType() == formula::svSingleVectorRef)
     {
-        const formula::SingleVectorRefToken*tmpCurDVR5= dynamic_cast<const
+        const formula::SingleVectorRefToken*tmpCurDVR5= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur5);
         ss <<"    if(gid0 >= "<<tmpCurDVR5->GetArrayLength()<<" || isNan(";
         ss <<vSubArguments[5]->GenSlidingWindowDeclRef();
@@ -1957,22 +1957,22 @@ void OpAccrint::GenSlidingWindowFunction(
     ss << "    double fVal,fRate;\n";
 #ifdef ISNAN
     FormulaToken* tmpCur0 = vSubArguments[0]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur0);
     FormulaToken* tmpCur2 = vSubArguments[2]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR2= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur2);
     FormulaToken* tmpCur3 = vSubArguments[3]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR3= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur3);
     FormulaToken* tmpCur4 = vSubArguments[4]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR4= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR4= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur4);
     FormulaToken* tmpCur5 = vSubArguments[5]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR5= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR5= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur5);
     FormulaToken* tmpCur6 = vSubArguments[6]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR6= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR6= static_cast<const
         formula::SingleVectorRefToken *>(tmpCur6);
     ss<< "    int buffer_nIssue_len = ";
     ss<< tmpCurDVR0->GetArrayLength();
@@ -2084,22 +2084,22 @@ void OpAccrintm::GenSlidingWindowFunction(
     ss << "double fRate,fVal;\n\t";
 #ifdef ISNAN
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur0);
     FormulaToken *tmpCur1 = vSubArguments[1]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR1= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur1);
 
     FormulaToken *tmpCur2 = vSubArguments[2]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR2= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur2);
 
     FormulaToken *tmpCur3 = vSubArguments[3]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR3= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur3);
 
     FormulaToken *tmpCur4 = vSubArguments[4]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR4= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR4= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur4);
     ss<< "int buffer_nIssue_len = ";
     ss<< tmpCurDVR0->GetArrayLength();
@@ -2231,31 +2231,31 @@ void OpYield::GenSlidingWindowFunction(
 
 #ifdef ISNAN
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur0);
 
     FormulaToken *tmpCur1 = vSubArguments[1]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR1= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur1);
 
     FormulaToken *tmpCur2 = vSubArguments[2]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR2= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur2);
 
     FormulaToken *tmpCur3 = vSubArguments[3]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR3= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur3);
 
     FormulaToken *tmpCur4 = vSubArguments[4]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR4= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR4= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur4);
 
     FormulaToken *tmpCur5 = vSubArguments[5]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR5= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR5= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur5);
 
     FormulaToken *tmpCur6 = vSubArguments[6]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR6= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR6= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur6);
 
     ss<< "int buffer_tmp000_len = ";
@@ -2384,13 +2384,13 @@ void OpSLN::GenSlidingWindowFunction(std::stringstream &ss,
 #ifdef ISNAN
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
     const formula::SingleVectorRefToken*tmpCurDVR0=
-        dynamic_cast<const formula::SingleVectorRefToken *>(tmpCur0);
+        static_cast<const formula::SingleVectorRefToken *>(tmpCur0);
     FormulaToken *tmpCur1 = vSubArguments[1]->GetFormulaToken();
     const formula::SingleVectorRefToken*tmpCurDVR1=
-        dynamic_cast<const formula::SingleVectorRefToken *>(tmpCur1);
+        static_cast<const formula::SingleVectorRefToken *>(tmpCur1);
     FormulaToken *tmpCur2 = vSubArguments[2]->GetFormulaToken();
     const formula::SingleVectorRefToken*tmpCurDVR2=
-        dynamic_cast<const formula::SingleVectorRefToken *>(tmpCur2);
+        static_cast<const formula::SingleVectorRefToken *>(tmpCur2);
     ss<< "    int buffer_wert_len = ";
     ss<< tmpCurDVR0->GetArrayLength();
     ss << ";\n";
@@ -2470,27 +2470,27 @@ void OpYieldmat::GenSlidingWindowFunction(
 
 #ifdef ISNAN
     FormulaToken *tmpCur0 = vSubArguments[0]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR0= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR0= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur0);
 
     FormulaToken *tmpCur1 = vSubArguments[1]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR1= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR1= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur1);
 
     FormulaToken *tmpCur2 = vSubArguments[2]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR2= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR2= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur2);
 
     FormulaToken *tmpCur3 = vSubArguments[3]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR3= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR3= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur3);
 
     FormulaToken *tmpCur4 = vSubArguments[4]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR4= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR4= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur4);
 
     FormulaToken *tmpCur5 = vSubArguments[5]->GetFormulaToken();
-    const formula::SingleVectorRefToken*tmpCurDVR5= dynamic_cast<const
+    const formula::SingleVectorRefToken*tmpCurDVR5= static_cast<const
     formula::SingleVectorRefToken *>(tmpCur5);
 
     ss<< "int buffer_tmp000_len = ";
@@ -2505,7 +2505,7 @@ void OpYieldmat::GenSlidingWindowFunction(
     ss<< tmpCurDVR2->GetArrayLength();
     ss << ";\n\t";
 
-   ss<< "int buffer_tmp003_len = ";
+    ss<< "int buffer_tmp003_len = ";
     ss<< tmpCurDVR3->GetArrayLength();
     ss << ";\n\t";
 
@@ -2613,7 +2613,7 @@ void OpPMT::GenSlidingWindowFunction(std::stringstream &ss,
         {
 #ifdef  ISNAN
                 const formula::SingleVectorRefToken* pSVR =
-                dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+                static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #else
 #endif
@@ -2688,7 +2688,7 @@ void OpNPV::GenSlidingWindowFunction(std::stringstream &ss,
       if (pCur->GetType() == formula::svDoubleVectorRef)
       {
             const formula::DoubleVectorRefToken* pDVR =
-            dynamic_cast<const formula::DoubleVectorRefToken *>(pCur);
+            static_cast<const formula::DoubleVectorRefToken *>(pCur);
             size_t nCurWindowSize = pDVR->GetRefRowSize();
             ss << "    for (int i = ";
             if (!pDVR->IsStartFixed() && pDVR->IsEndFixed()) {
@@ -2725,7 +2725,7 @@ void OpNPV::GenSlidingWindowFunction(std::stringstream &ss,
         {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-            dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+            static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #else
 #endif
@@ -2851,7 +2851,7 @@ void OpPrice::GenSlidingWindowFunction(std::stringstream &ss,
         {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-                dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+                static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #else
 #endif
@@ -2941,7 +2941,7 @@ void OpOddlprice::GenSlidingWindowFunction(std::stringstream &ss,
         if (pCur->GetType() == formula::svDoubleVectorRef)
         {
             const formula::DoubleVectorRefToken* pDVR =
-            dynamic_cast<const formula::DoubleVectorRefToken *>(pCur);
+            static_cast<const formula::DoubleVectorRefToken *>(pCur);
             size_t nCurWindowSize = pDVR->GetRefRowSize();
             ss << "    for (int i = ";
             if (!pDVR->IsStartFixed() && pDVR->IsEndFixed()) {
@@ -2979,7 +2979,7 @@ void OpOddlprice::GenSlidingWindowFunction(std::stringstream &ss,
         {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-            dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+            static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #else
             nItems += 1;
@@ -3073,7 +3073,7 @@ void OpOddlyield::GenSlidingWindowFunction(std::stringstream &ss,
         if (pCur->GetType() == formula::svDoubleVectorRef)
         {
             const formula::DoubleVectorRefToken* pDVR =
-            dynamic_cast<const formula::DoubleVectorRefToken *>(pCur);
+            static_cast<const formula::DoubleVectorRefToken *>(pCur);
             size_t nCurWindowSize = pDVR->GetRefRowSize();
             ss << "    for (int i = ";
             if (!pDVR->IsStartFixed() && pDVR->IsEndFixed()) {
@@ -3111,7 +3111,7 @@ void OpOddlyield::GenSlidingWindowFunction(std::stringstream &ss,
         {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-            dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+            static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #else
             nItems += 1;
@@ -3206,7 +3206,7 @@ void OpPriceDisc::GenSlidingWindowFunction(std::stringstream &ss,
         {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-            dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+            static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #else
 #endif
@@ -3280,7 +3280,7 @@ void OpNper::GenSlidingWindowFunction(std::stringstream &ss,
         {
 #ifdef  ISNAN
             const formula::SingleVectorRefToken* pSVR =
-            dynamic_cast< const formula::SingleVectorRefToken* >(pCur);
+            static_cast< const formula::SingleVectorRefToken* >(pCur);
             ss << "    if (gid0 < " << pSVR->GetArrayLength() << "){\n";
 #else
             nItems += 1;
@@ -3372,7 +3372,7 @@ void OpPPMT::GenSlidingWindowFunction(std::stringstream &ss,
         {
 #ifdef  ISNAN

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list