[Libreoffice-commits] core.git: dbaccess/Library_dbu.mk dbaccess/source

Noel Grandin noel at peralex.com
Mon Jul 4 10:52:31 UTC 2016


 dbaccess/Library_dbu.mk                            |    1 
 dbaccess/source/ui/inc/QueryDesignView.hxx         |   27 +++++------
 dbaccess/source/ui/inc/QueryTextView.hxx           |    1 
 dbaccess/source/ui/inc/QueryViewSwitch.hxx         |    4 +
 dbaccess/source/ui/inc/querycontroller.hxx         |    1 
 dbaccess/source/ui/inc/queryview.hxx               |   50 ---------------------
 dbaccess/source/ui/querydesign/QueryDesignView.cxx |   14 ++---
 dbaccess/source/ui/querydesign/QueryViewSwitch.cxx |    2 
 dbaccess/source/ui/querydesign/querycontroller.cxx |    1 
 dbaccess/source/ui/querydesign/queryview.cxx       |   33 -------------
 10 files changed, 21 insertions(+), 113 deletions(-)

New commits:
commit 64acc9d576be9166c2da6edc6f8478e2cf31f606
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 4 11:33:22 2016 +0200

    merge dbaui::OQueryView with dbaui::OQueryDesignView
    
    Change-Id: I9982d6c27863f533bfdb929d99602f0188972950
    Reviewed-on: https://gerrit.libreoffice.org/26895
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/dbaccess/Library_dbu.mk b/dbaccess/Library_dbu.mk
index d97e39ea..00db4f8 100644
--- a/dbaccess/Library_dbu.mk
+++ b/dbaccess/Library_dbu.mk
@@ -215,7 +215,6 @@ $(eval $(call gb_Library_add_exception_objects,dbu,\
     dbaccess/source/ui/querydesign/QueryTableView \
     dbaccess/source/ui/querydesign/QueryTabWinUndoAct \
     dbaccess/source/ui/querydesign/QueryTextView \
-    dbaccess/source/ui/querydesign/queryview \
     dbaccess/source/ui/querydesign/QueryViewSwitch \
     dbaccess/source/ui/querydesign/SelectionBrowseBox \
     dbaccess/source/ui/querydesign/TableConnection \
diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx
index 4632104..eb1b062 100644
--- a/dbaccess/source/ui/inc/QueryDesignView.hxx
+++ b/dbaccess/source/ui/inc/QueryDesignView.hxx
@@ -19,7 +19,7 @@
 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYDESIGNVIEW_HXX
 #define INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYDESIGNVIEW_HXX
 
-#include "queryview.hxx"
+#include "JoinDesignView.hxx"
 #include <vcl/split.hxx>
 #include "QEnumTypes.hxx"
 #include <com/sun/star/beans/XPropertySet.hpp>
@@ -54,8 +54,9 @@ namespace dbaui
 
     class OSelectionBrowseBox;
     class OQueryContainerWindow;
+    class OQueryController;
 
-    class OQueryDesignView : public OQueryView
+    class OQueryDesignView : public OJoinDesignView
     {
         enum ChildFocusState
         {
@@ -74,26 +75,24 @@ namespace dbaui
         bool                                m_bInSplitHandler;
 
     public:
-        OQueryDesignView(OQueryContainerWindow* pParent, OQueryController& _rController,const css::uno::Reference< css::uno::XComponentContext >& );
+        OQueryDesignView(OQueryContainerWindow* pParent, OQueryController& _rController, const css::uno::Reference< css::uno::XComponentContext >& );
         virtual ~OQueryDesignView();
         virtual void dispose() override;
 
-        virtual bool isCutAllowed() override;
-        virtual bool isPasteAllowed() override;
-        virtual bool isCopyAllowed() override;
-        virtual void copy() override;
-        virtual void cut() override;
-        virtual void paste() override;
+        bool isCutAllowed();
+        bool isPasteAllowed();
+        bool isCopyAllowed();
+        void copy();
+        void cut();
+        void paste();
         // clears the whole query
-        virtual void clear() override;
+        void clear();
         // set the view readonly or not
         virtual void setReadOnly(bool _bReadOnly) override;
         // check if the statement is correct when not returning false
         bool checkStatement();
-        // set the statement for representation
-        virtual void setStatement(const OUString& _rsStatement) override;
         // returns the current sql statement
-        virtual OUString getStatement() override;
+        OUString getStatement();
         /// late construction
         virtual void Construct() override;
         virtual void initialize() override;
@@ -154,7 +153,7 @@ namespace dbaui
         DECL_LINK_TYPED( SplitHdl, Splitter*, void );
 
     private:
-        using OQueryView::SaveTabWinUIConfig;
+        using OJoinDesignView::SaveTabWinUIConfig;
     };
 }
 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYDESIGNVIEW_HXX
diff --git a/dbaccess/source/ui/inc/QueryTextView.hxx b/dbaccess/source/ui/inc/QueryTextView.hxx
index 821f282..bf9cb97 100644
--- a/dbaccess/source/ui/inc/QueryTextView.hxx
+++ b/dbaccess/source/ui/inc/QueryTextView.hxx
@@ -19,7 +19,6 @@
 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYTEXTVIEW_HXX
 #define INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYTEXTVIEW_HXX
 
-#include "queryview.hxx"
 #include "querycontainerwindow.hxx"
 
 namespace dbaui
diff --git a/dbaccess/source/ui/inc/QueryViewSwitch.hxx b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
index eb7bf8f..397a5db 100644
--- a/dbaccess/source/ui/inc/QueryViewSwitch.hxx
+++ b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
@@ -19,7 +19,7 @@
 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYVIEWSWITCH_HXX
 #define INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYVIEWSWITCH_HXX
 
-#include "queryview.hxx"
+#include "JoinDesignView.hxx"
 
 namespace dbtools
 {
@@ -32,6 +32,8 @@ namespace dbaui
     class OQueryTextView;
     class OAddTableDlg;
     class OQueryContainerWindow;
+    class OQueryController;
+
     class OQueryViewSwitch
     {
         VclPtr<OQueryDesignView>   m_pDesignView;
diff --git a/dbaccess/source/ui/inc/querycontroller.hxx b/dbaccess/source/ui/inc/querycontroller.hxx
index a986495..92a7962 100644
--- a/dbaccess/source/ui/inc/querycontroller.hxx
+++ b/dbaccess/source/ui/inc/querycontroller.hxx
@@ -23,7 +23,6 @@
 #include "JoinController.hxx"
 #include "JoinTableView.hxx"
 #include "querycontainerwindow.hxx"
-#include "queryview.hxx"
 #include "svx/ParseContext.hxx"
 #include "TableFieldDescription.hxx"
 
diff --git a/dbaccess/source/ui/inc/queryview.hxx b/dbaccess/source/ui/inc/queryview.hxx
deleted file mode 100644
index 4ab846f..0000000
--- a/dbaccess/source/ui/inc/queryview.hxx
+++ /dev/null
@@ -1,50 +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 INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYVIEW_HXX
-#define INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYVIEW_HXX
-
-#include "JoinDesignView.hxx"
-
-namespace dbaui
-{
-    class OQueryController;
-    class OQueryView : public OJoinDesignView
-    {
-    public:
-        OQueryView(vcl::Window* pParent, OQueryController& _rController,const css::uno::Reference< css::uno::XComponentContext >& );
-
-        virtual bool isCutAllowed()     = 0;
-        virtual bool isPasteAllowed()   = 0;
-        virtual bool isCopyAllowed()    = 0;
-        virtual void copy()     = 0;
-        virtual void cut()      = 0;
-        virtual void paste()    = 0;
-        // clears the whole query
-        virtual void clear() = 0;
-        // set the view readonly or not
-        virtual void setReadOnly(bool _bReadOnly) override = 0;
-        // set the statement for representation
-        virtual void setStatement(const OUString& _rsStatement) = 0;
-        // returns the current sql statement
-        virtual OUString getStatement() = 0;
-    };
-}
-#endif // INCLUDED_DBACCESS_SOURCE_UI_INC_QUERYVIEW_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 160dca9..b7d4fac 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2477,7 +2477,7 @@ namespace
 OQueryDesignView::OQueryDesignView( OQueryContainerWindow* _pParent,
                                     OQueryController& _rController,
                                     const Reference< XComponentContext >& _rxContext)
-    :OQueryView( _pParent, _rController, _rxContext )
+    :OJoinDesignView( _pParent, _rController, _rxContext )
     ,m_aSplitter( VclPtr<Splitter>::Create(this) )
     ,m_eChildFocus(NONE)
     ,m_bInSplitHandler( false )
@@ -2514,7 +2514,7 @@ void OQueryDesignView::dispose()
         ::dbaui::notifySystemWindow(this,m_pTableView,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
     m_pSelectionBox.disposeAndClear();
     m_aSplitter.disposeAndClear();
-    OQueryView::dispose();
+    OJoinDesignView::dispose();
 }
 
 IMPL_LINK_NOARG_TYPED( OQueryDesignView, SplitHdl, Splitter*, void )
@@ -2534,7 +2534,7 @@ void OQueryDesignView::Construct()
 {
     m_pTableView = VclPtr<OQueryTableView>::Create(m_pScrollWindow,this);
     ::dbaui::notifySystemWindow(this,m_pTableView,::comphelper::mem_fun(&TaskPaneList::AddWindow));
-    OQueryView::Construct();
+    OJoinDesignView::Construct();
 }
 
 void OQueryDesignView::initialize()
@@ -2630,10 +2630,6 @@ void OQueryDesignView::clear()
     m_pTableView->ClearAll();
 }
 
-void OQueryDesignView::setStatement(const OUString& /*_rsStatement*/)
-{
-}
-
 void OQueryDesignView::copy()
 {
     if( m_eChildFocus == SELECTION)
@@ -2780,7 +2776,7 @@ bool OQueryDesignView::PreNotify(NotifyEvent& rNEvt)
             m_eChildFocus = TABLEVIEW;
     }
 
-    return OQueryView::PreNotify(rNEvt);
+    return OJoinDesignView::PreNotify(rNEvt);
 }
 
 // check if the statement is correct when not returning false
@@ -3094,7 +3090,7 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(const OTableFieldDesc
 
 void OQueryDesignView::GetFocus()
 {
-    OQueryView::GetFocus();
+    OJoinDesignView::GetFocus();
     if ( m_pSelectionBox && !m_pSelectionBox->HasChildPathFocus() )
     {
         // first we have to deactivate the current cell to refill when necessary
diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
index f114478..009f120 100644
--- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
+++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
@@ -92,8 +92,6 @@ void OQueryViewSwitch::setStatement(const OUString& _rsStatement)
 {
     if(m_pTextView->IsVisible())
         m_pTextView->setStatement(_rsStatement);
-    else
-        m_pDesignView->setStatement(_rsStatement);
 }
 
 void OQueryViewSwitch::copy()
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 8a96808..dd348e5 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -33,7 +33,6 @@
 #include "QueryDesignView.hxx"
 #include "QueryTableView.hxx"
 #include "QueryTextView.hxx"
-#include "queryview.hxx"
 #include "QueryViewSwitch.hxx"
 #include "sqlmessage.hxx"
 #include "TableConnectionData.hxx"
diff --git a/dbaccess/source/ui/querydesign/queryview.cxx b/dbaccess/source/ui/querydesign/queryview.cxx
deleted file mode 100644
index c18ef09..0000000
--- a/dbaccess/source/ui/querydesign/queryview.cxx
+++ /dev/null
@@ -1,33 +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 "queryview.hxx"
-#include "dbu_qry.hrc"
-#include "querycontroller.hxx"
-
-using namespace dbaui;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-OQueryView::OQueryView(vcl::Window* _pParent, OQueryController& _rController,const Reference< XComponentContext >& _rxContext)
-    :OJoinDesignView( _pParent, _rController, _rxContext )
-{
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list