summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/querydesign/QueryViewSwitch.cxx')
-rw-r--r--dbaccess/source/ui/querydesign/QueryViewSwitch.cxx54
1 files changed, 24 insertions, 30 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
index 2f940cf326f6..bf470cdbbad5 100644
--- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
+++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
@@ -40,7 +40,7 @@ OQueryViewSwitch::OQueryViewSwitch(OQueryContainerWindow* _pParent, OQueryContro
m_pTextView = new OQueryTextView(_pParent);
m_pDesignView = new OQueryDesignView( _pParent, _rController, _rxContext );
}
-// -----------------------------------------------------------------------------
+
OQueryViewSwitch::~OQueryViewSwitch()
{
DBG_DTOR(OQueryViewSwitch,NULL);
@@ -57,19 +57,19 @@ OQueryViewSwitch::~OQueryViewSwitch()
m_pDesignView = NULL;
}
}
-// -------------------------------------------------------------------------
+
void OQueryViewSwitch::Construct()
{
m_pDesignView->Construct( );
}
-// -----------------------------------------------------------------------------
+
void OQueryViewSwitch::initialize()
{
// initially be in SQL mode
m_pTextView->Show();
m_pDesignView->initialize();
}
-// -------------------------------------------------------------------------
+
void OQueryViewSwitch::resizeDocumentView(Rectangle& _rPlayground)
{
m_pTextView->SetPosSizePixel( _rPlayground.TopLeft(), _rPlayground.GetSize() );
@@ -79,21 +79,21 @@ void OQueryViewSwitch::resizeDocumentView(Rectangle& _rPlayground)
_rPlayground.SetPos( _rPlayground.BottomRight() );
_rPlayground.SetSize( Size( 0, 0 ) );
}
-// -----------------------------------------------------------------------------
+
sal_Bool OQueryViewSwitch::checkStatement()
{
if(m_pTextView->IsVisible())
return m_pTextView->checkStatement();
return m_pDesignView->checkStatement();
}
-// -----------------------------------------------------------------------------
+
OUString OQueryViewSwitch::getStatement()
{
if(m_pTextView->IsVisible())
return m_pTextView->getStatement();
return m_pDesignView->getStatement();
}
-// -----------------------------------------------------------------------------
+
void OQueryViewSwitch::setReadOnly(sal_Bool _bReadOnly)
{
if(m_pTextView->IsVisible())
@@ -101,7 +101,7 @@ void OQueryViewSwitch::setReadOnly(sal_Bool _bReadOnly)
else
m_pDesignView->setReadOnly(_bReadOnly);
}
-// -----------------------------------------------------------------------------
+
void OQueryViewSwitch::clear()
{
if(m_pTextView->IsVisible())
@@ -109,7 +109,7 @@ void OQueryViewSwitch::clear()
else
m_pDesignView->clear();
}
-// -----------------------------------------------------------------------------
+
void OQueryViewSwitch::GrabFocus()
{
if ( m_pTextView && m_pTextView->IsVisible() )
@@ -117,7 +117,7 @@ void OQueryViewSwitch::GrabFocus()
else if ( m_pDesignView && m_pDesignView->IsVisible() )
m_pDesignView->GrabFocus();
}
-// -----------------------------------------------------------------------------
+
void OQueryViewSwitch::setStatement(const OUString& _rsStatement)
{
if(m_pTextView->IsVisible())
@@ -125,7 +125,7 @@ void OQueryViewSwitch::setStatement(const OUString& _rsStatement)
else
m_pDesignView->setStatement(_rsStatement);
}
-// -----------------------------------------------------------------------------
+
void OQueryViewSwitch::copy()
{
if(m_pTextView->IsVisible())
@@ -133,28 +133,28 @@ void OQueryViewSwitch::copy()
else
m_pDesignView->copy();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OQueryViewSwitch::isCutAllowed()
{
if(m_pTextView->IsVisible())
return m_pTextView->isCutAllowed();
return m_pDesignView->isCutAllowed();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OQueryViewSwitch::isCopyAllowed()
{
if(m_pTextView->IsVisible())
return m_pTextView->isCopyAllowed();
return m_pDesignView->isCopyAllowed();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OQueryViewSwitch::isPasteAllowed()
{
if(m_pTextView->IsVisible())
return m_pTextView->isPasteAllowed();
return m_pDesignView->isPasteAllowed();
}
-// -----------------------------------------------------------------------------
+
void OQueryViewSwitch::cut()
{
if(m_pTextView->IsVisible())
@@ -162,7 +162,7 @@ void OQueryViewSwitch::cut()
else
m_pDesignView->cut();
}
-// -----------------------------------------------------------------------------
+
void OQueryViewSwitch::paste()
{
if(m_pTextView->IsVisible())
@@ -170,14 +170,13 @@ void OQueryViewSwitch::paste()
else
m_pDesignView->paste();
}
-// -----------------------------------------------------------------------------
+
OQueryContainerWindow* OQueryViewSwitch::getContainer() const
{
Window* pDesignParent = getDesignView() ? getDesignView()->GetParent() : NULL;
return static_cast< OQueryContainerWindow* >( pDesignParent );
}
-// -----------------------------------------------------------------------------
void OQueryViewSwitch::impl_forceSQLView()
{
OAddTableDlg* pAddTabDialog( getAddTableDialog() );
@@ -196,7 +195,6 @@ void OQueryViewSwitch::impl_forceSQLView()
m_pTextView->setStatement(static_cast<OQueryController&>(m_pDesignView->getController()).getStatement());
}
-// -----------------------------------------------------------------------------
void OQueryViewSwitch::forceInitialView()
{
OQueryController& rQueryController( static_cast< OQueryController& >( m_pDesignView->getController() ) );
@@ -223,7 +221,6 @@ void OQueryViewSwitch::forceInitialView()
impl_postViewSwitch( bGraphicalDesign, true );
}
-// -----------------------------------------------------------------------------
bool OQueryViewSwitch::switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo )
{
sal_Bool bRet = sal_True;
@@ -253,7 +250,6 @@ bool OQueryViewSwitch::switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo )
return impl_postViewSwitch( bGraphicalDesign, bRet );
}
-// -----------------------------------------------------------------------------
bool OQueryViewSwitch::impl_postViewSwitch( const bool i_bGraphicalDesign, const bool i_bSuccess )
{
if ( i_bSuccess )
@@ -278,42 +274,41 @@ bool OQueryViewSwitch::impl_postViewSwitch( const bool i_bGraphicalDesign, const
return i_bSuccess;
}
-// -----------------------------------------------------------------------------
OAddTableDlg* OQueryViewSwitch::getAddTableDialog()
{
if ( !m_pDesignView )
return NULL;
return m_pDesignView->getController().getAddTableDialog();
}
-// -----------------------------------------------------------------------------
+
sal_Bool OQueryViewSwitch::isSlotEnabled(sal_Int32 _nSlotId)
{
return m_pDesignView->isSlotEnabled(_nSlotId);
}
-// -----------------------------------------------------------------------------
+
void OQueryViewSwitch::setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable)
{
m_pDesignView->setSlotEnabled(_nSlotId,_bEnable);
}
-// -----------------------------------------------------------------------------
+
void OQueryViewSwitch::SaveUIConfig()
{
if(m_pDesignView->IsVisible())
m_pDesignView->SaveUIConfig();
}
-// -----------------------------------------------------------------------------
+
void OQueryViewSwitch::SetPosSizePixel( Point _rPt,Size _rSize)
{
m_pDesignView->SetPosSizePixel( _rPt,_rSize);
m_pDesignView->Resize();
m_pTextView->SetPosSizePixel( _rPt,_rSize);
}
-// -----------------------------------------------------------------------------
+
Reference< XComponentContext > OQueryViewSwitch::getORB() const
{
return m_pDesignView->getORB();
}
-// -----------------------------------------------------------------------------
+
bool OQueryViewSwitch::reset( ::dbtools::SQLExceptionInfo* _pErrorInfo )
{
m_pDesignView->reset();
@@ -325,12 +320,11 @@ bool OQueryViewSwitch::reset( ::dbtools::SQLExceptionInfo* _pErrorInfo )
return true;
}
-// -----------------------------------------------------------------------------
+
void OQueryViewSwitch::setNoneVisbleRow(sal_Int32 _nRows)
{
if(m_pDesignView)
m_pDesignView->setNoneVisbleRow(_nRows);
}
-// -----------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */