Kaydet (Commit) e7189508 authored tarafından Ocke Janssen's avatar Ocke Janssen

new querydesign

üst db3cecce
/*************************************************************************
*
* $RCSfile: ConnectionData.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:19:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_CONNECTIONDATA_HXX
#define DBAUI_CONNECTIONDATA_HXX
namespace dbaui
{
//==================================================================
// ConnData ---------->* ConnLineData
// ^1 ^1
// | |
// Conn ---------->* ConnLine
//==================================================================
}
#endif // DBAUI_CONNECTIONDATA_HXX
DECLARE_LIST( OConnectionLineDataList, OConnectionLineData* );
//==================================================================
class SbaJoinTabConn;
DECLARE_LIST( OConnectionLineList, OConnectionLine* );
DECLARE_LIST( OTableConnectionDataList, OTableConnectionData* );
//==================================================================
const USHORT MAX_CONN_COUNT = 2;
class SbaJoinTabWin;
class SbaJoinTabWinCont;
DECLARE_LIST( SbaJoinTabConnList, SbaJoinTabConn* );
This diff is collapsed.
/*************************************************************************
*
* $RCSfile: ConnectionLineData.cxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:19:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
#endif
using namespace dbaui;
//==================================================================
//class OConnectionLineData
//==================================================================
//------------------------------------------------------------------------
OConnectionLineData::OConnectionLineData()
{
}
//------------------------------------------------------------------------
OConnectionLineData::OConnectionLineData( const ::rtl::OUString& rSourceFieldName, const ::rtl::OUString& rDestFieldName )
:m_aSourceFieldName( rSourceFieldName )
,m_aDestFieldName( rDestFieldName )
{
}
//------------------------------------------------------------------------
OConnectionLineData::OConnectionLineData( const OConnectionLineData& rConnLineData )
{
*this = rConnLineData;
}
//------------------------------------------------------------------------
OConnectionLineData::~OConnectionLineData()
{
}
//------------------------------------------------------------------------
void OConnectionLineData::CopyFrom(const OConnectionLineData& rSource)
{
*this = rSource;
// hier ziehe ich mich auf das (nicht-virtuelle) operator= zurueck, das nur meine Members kopiert
}
//------------------------------------------------------------------------
BOOL OConnectionLineData::IsValid()
{
return (GetSourceFieldName().getLength() && GetDestFieldName().getLength());
}
//------------------------------------------------------------------------
OConnectionLineData& OConnectionLineData::operator=( const OConnectionLineData& rConnLineData )
{
if (&rConnLineData == this)
return *this;
m_aSourceFieldName = rConnLineData.GetSourceFieldName();
m_aDestFieldName = rConnLineData.GetDestFieldName();
return *this;
}
//------------------------------------------------------------------------
void OConnectionLineData::Reset()
{
m_aDestFieldName = m_aSourceFieldName = ::rtl::OUString();
}
This diff is collapsed.
/*************************************************************************
*
* $RCSfile: QTableConnection.cxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:20:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_QUERYTABLECONNECTION_HXX
#include "QTableConnection.hxx"
#endif
#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
#endif
using namespace dbaui;
TYPEINIT1(OQueryTableConnection, OTableConnection);
//========================================================================
// class OQueryTableConnection
//========================================================================
DBG_NAME(OQueryTableConnection);
//------------------------------------------------------------------------
OQueryTableConnection::OQueryTableConnection(OQueryTableView* pContainer, OQueryTableConnectionData* pTabConnData)
:OTableConnection(pContainer, pTabConnData)
{
DBG_CTOR(OQueryTableConnection,NULL);
}
//------------------------------------------------------------------------
OQueryTableConnection::OQueryTableConnection(const OQueryTableConnection& rConn)
:OTableConnection( rConn )
{
DBG_CTOR(OQueryTableConnection,NULL);
// keine eigenen Members, also reicht die Basisklassenfunktionalitaet
}
//------------------------------------------------------------------------
OQueryTableConnection::~OQueryTableConnection()
{
DBG_DTOR(OQueryTableConnection,NULL);
}
//------------------------------------------------------------------------
OConnectionLine* OQueryTableConnection::CreateConnLine( const OConnectionLine& rConnLine )
{
// keine Spezialisierung bei den ConnectionLines, also eine Instanz der Standard-Klasse
return new OConnectionLine(rConnLine);
}
//------------------------------------------------------------------------
OQueryTableConnection& OQueryTableConnection::operator=(const OQueryTableConnection& rConn)
{
if (&rConn == this)
return *this;
OTableConnection::operator=(rConn);
// keine eigenen Members ...
return *this;
}
//------------------------------------------------------------------------
sal_Bool OQueryTableConnection::operator==(const OQueryTableConnection& rCompare)
{
DBG_ASSERT(GetData() && rCompare.GetData(), "OQueryTableConnection::operator== : einer der beiden Teilnehmer hat keine Daten !");
// allzuviel brauche ich nicht vergleichen (schon gar nicht alle Member) : lediglich die Fenster, an denen wir haengen, und
// die Indizies in der entsprechenden Tabelle muessen uebereinstimmen
OQueryTableConnectionData* pMyData = (OQueryTableConnectionData*)GetData();
OQueryTableConnectionData* pCompData = (OQueryTableConnectionData*)rCompare.GetData();
// Connections werden als gleich angesehen, wenn sie in Source-/Dest-Fenstername und Source-/Dest-FieldIndex uebereinstimmen ...
return ( ( (pMyData->GetSourceWinName() == pCompData->GetSourceWinName()) &&
(pMyData->GetDestWinName() == pCompData->GetDestWinName()) &&
(pMyData->GetFieldIndex(JTCS_TO) == pCompData->GetFieldIndex(JTCS_TO)) &&
(pMyData->GetFieldIndex(JTCS_FROM) == pCompData->GetFieldIndex(JTCS_FROM))
)
|| // ... oder diese Uebereinstimmung ueber Kreuz besteht
( (pMyData->GetSourceWinName() == pCompData->GetDestWinName()) &&
(pMyData->GetDestWinName() == pCompData->GetSourceWinName()) &&
(pMyData->GetFieldIndex(JTCS_TO) == pCompData->GetFieldIndex(JTCS_FROM)) &&
(pMyData->GetFieldIndex(JTCS_FROM) == pCompData->GetFieldIndex(JTCS_TO))
)
);
}
// -----------------------------------------------------------------------------
/*************************************************************************
*
* $RCSfile: QTableConnection.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:24:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_QUERYTABLECONNECTION_HXX
#define DBAUI_QUERYTABLECONNECTION_HXX
#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
#endif
#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
#endif
#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
#endif
namespace dbaui
{
//==================================================================
class OQueryTableView;
class OQueryTableConnection : public OTableConnection
{
sal_Bool m_bVisited; // is true if the conn was already visited through the join algorithm
protected:
OConnectionLine* CreateConnLine( const OConnectionLine& rConnLine );
public:
TYPEINFO();
OQueryTableConnection(OQueryTableView* pContainer, OQueryTableConnectionData* pTabConnData);
OQueryTableConnection(const OQueryTableConnection& rConn);
virtual ~OQueryTableConnection();
OQueryTableConnection& operator=(const OQueryTableConnection& rConn);
sal_Bool operator==(const OQueryTableConnection& rCompare);
::rtl::OUString GetAliasName(EConnectionSide nWhich) const { return static_cast<OQueryTableConnectionData*>(GetData())->GetAliasName(nWhich); }
sal_Bool IsVisited() const { return m_bVisited; }
void SetVisited(sal_Bool bVisited) { m_bVisited = bVisited; }
};
}
#endif // DBAUI_QUERYTABLECONNECTION_HXX
\ No newline at end of file
/*************************************************************************
*
* $RCSfile: QTableConnectionData.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:20:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#define DBAUI_QTABLECONNECTIONDATA_HXX
#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
#endif
#ifndef DBAUI_TABLEFIELDDESC_HXX
#include "TableFieldDescription.hxx"
#endif
#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
#endif
#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
#endif
namespace dbaui
{
class OQueryTableConnectionData : public OTableConnectionData
{
sal_Int32 m_nFromEntryIndex;
sal_Int32 m_nDestEntryIndex;
EJoinType m_eJoinType;
ETableFieldType m_eFromType;
ETableFieldType m_eDestType;
// meine Basisklasse merkt sich leider nur die Fensternamen (was hier das selbe wie die Aliasnamen ist), ich aber brauche
// auch Zugriff auf die realen Tabellennamen. Damit ich mir nicht die Fenster dazu merken muss (das waere schmutzig, da die
// TabConDatas normalerweise vom Dokument verwaltet werden und voellig losgeloest von der Repraesentation der Tabellen als
// Fenster sein sollten), habe ich zwei ::rtl::OUString-Member
::rtl::OUString m_strSourceTableName;
::rtl::OUString m_strDestTableName;
protected:
// fuer das Anlegen und Duplizieren von Lines vom eigenen Typ
virtual OConnectionLineData* CreateLineDataObj();
virtual OConnectionLineData* CreateLineDataObj( const OConnectionLineData& rConnLineData );
public:
TYPEINFO();
OQueryTableConnectionData();
OQueryTableConnectionData( const OQueryTableConnectionData& rConnData );
OQueryTableConnectionData( const ::rtl::OUString& strSourceTable, const ::rtl::OUString& strDestTable,
const ::rtl::OUString& strSourceAlias, const ::rtl::OUString& strDestAlias, const ::rtl::OUString& rConnName=::rtl::OUString());
virtual ~OQueryTableConnectionData();
virtual void CopyFrom(const OTableConnectionData& rSource);
virtual OTableConnectionData* NewInstance() const;
OQueryTableConnectionData& operator=( const OQueryTableConnectionData& rConnData );
::rtl::OUString GetTableName(EConnectionSide nWhich) const;
::rtl::OUString GetAliasName(EConnectionSide nWhich) const;
sal_Int32 GetFieldIndex(EConnectionSide nWhich) const { return nWhich==JTCS_TO ? m_nDestEntryIndex : m_nFromEntryIndex; }
void SetFieldIndex(EConnectionSide nWhich, sal_Int32 nVal) { if (nWhich==JTCS_TO) m_nDestEntryIndex=nVal; else m_nFromEntryIndex=nVal; }
ETableFieldType GetFieldType(EConnectionSide nWhich) const { return nWhich==JTCS_TO ? m_eDestType : m_eFromType; }
void SetFieldType(EConnectionSide nWhich, ETableFieldType eType) { if (nWhich==JTCS_TO) m_eDestType=eType; else m_eFromType=eType; }
void InitFromDrag(const OTableFieldDesc& rDragLeft, const OTableFieldDesc& rDragRight);
EJoinType GetJoinType() const { return m_eJoinType; };
void SetJoinType(const EJoinType& eJT) { m_eJoinType = eJT; };
};
}
#endif // DBAUI_QTABLECONNECTIONDATA_HXX
\ No newline at end of file
This diff is collapsed.
/*************************************************************************
*
* $RCSfile: QTableWindowData.cxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:20:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#include "QTableWindowData.hxx"
#endif
#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
#endif
using namespace dbaui;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::uno;
TYPEINIT1(OQueryTableWindowData, OTableWindowData);
DBG_NAME(OQueryTableWindowData);
//==================================================================
// class OQueryTableWindowData
//==================================================================
//------------------------------------------------------------------------------
OQueryTableWindowData::OQueryTableWindowData()
:OTableWindowData()
{
DBG_CTOR(OQueryTableWindowData,NULL);
m_bShowAll = sal_True;
}
//------------------------------------------------------------------------------
OQueryTableWindowData::OQueryTableWindowData(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rTableName, const ::rtl::OUString& rTableAlias )
:OTableWindowData(_rComposedName, rTableName, rTableAlias)
{
DBG_CTOR(OQueryTableWindowData,NULL);
m_bShowAll = sal_True;
}
//------------------------------------------------------------------------------
OQueryTableWindowData::~OQueryTableWindowData()
{
DBG_DTOR(OQueryTableWindowData,NULL);
}
//------------------------------------------------------------------------------
void OQueryTableWindowData::Load(const Reference<XObjectInputStream>& _rxIn)
{
OTableWindowData::Load(_rxIn);
}
//------------------------------------------------------------------------------
void OQueryTableWindowData::Save(const Reference<XObjectOutputStream>& _rxOut)
{
OTableWindowData::Save(_rxOut);
}
// -----------------------------------------------------------------------------
/*************************************************************************
*
* $RCSfile: QTableWindowData.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:24:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#define DBAUI_QUERY_TABLEWINDOWDATA_HXX
#ifndef DBAUI_TABLEWINDOWDATA_HXX
#include "TableWindowData.hxx"
#endif
#ifndef _VECTOR_
#include <vector>
#endif
#ifndef _COM_SUN_STAR_IO_XOBJECTOUTPUTSTREAM_HPP_
#include <com/sun/star/io/XObjectOutputStream.hpp>
#endif
#ifndef _COM_SUN_STAR_IO_XOBJECTINPUTSTREAM_HPP_
#include <com/sun/star/io/XObjectInputStream.hpp>
#endif
namespace dbaui
{
class OQueryTableWindowData : public OTableWindowData
{
protected:
// ::std::vector< ::rtl::OUString> m_vField;
public:
TYPEINFO();
OQueryTableWindowData();
OQueryTableWindowData(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rTableName, const ::rtl::OUString& rTableAlias);
virtual ~OQueryTableWindowData();
virtual void Load(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxIn);
virtual void Save(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOut);
::rtl::OUString GetAliasName() { return GetWinName(); }
void SetAliasName(const ::rtl::OUString& rNewAlias) { SetWinName(rNewAlias); }
};
}
#endif // DBAUI_QUERY_TABLEWINDOWDATA_HXX
/*************************************************************************
*
* $RCSfile: QueryAddTabConnUndoAction.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:24:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_QUERYADDTABCONNUNDOACTION_HXX
#define DBAUI_QUERYADDTABCONNUNDOACTION_HXX
#ifndef DBAUI_QUERYTABCONNUNDOACTION_HXX
#include "QueryTabConnUndoAction.hxx"
#endif
namespace dbaui
{
// ================================================================================================
// OQueryAddTabConnUndoAction - Undo-Klasse fuer Einfuegen einer Connection
class OQueryAddTabConnUndoAction : public OQueryTabConnUndoAction
{
public:
OQueryAddTabConnUndoAction(OQueryTableView* pOwner) : OQueryTabConnUndoAction(pOwner, STR_QUERY_UNDO_INSERTCONNECTION) { }
virtual void Undo() { m_pOwner->DropConnection(m_pConnection); SetOwnership(TRUE); }
virtual void Redo() { m_pOwner->GetConnection(m_pConnection); SetOwnership(FALSE); }
};
// ================================================================================================
// OQueryDelTabConnUndoAction - Undo-Klasse fuer Einfuegen einer Connection
class OQueryDelTabConnUndoAction : public OQueryTabConnUndoAction
{
public:
OQueryDelTabConnUndoAction(OQueryTableView* pOwner) : OQueryTabConnUndoAction(pOwner, STR_QUERY_UNDO_REMOVECONNECTION) { }
virtual void Undo() { m_pOwner->GetConnection(m_pConnection); SetOwnership(FALSE); }
virtual void Redo() { m_pOwner->DropConnection(m_pConnection); SetOwnership(TRUE); }
};
}
#endif // DBAUI_QUERYADDTABCONNUNDOACTION_HXX
/*************************************************************************
*
* $RCSfile: QueryDesignFieldUndoAct.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:20:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_QUERYDESIGNFIELDUNDOACT_HXX
#define DBAUI_QUERYDESIGNFIELDUNDOACT_HXX
#ifndef DBAUI_GENERALUNDO_HXX
#include "GeneralUndo.hxx"
#endif
#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
#endif
#ifndef DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
#include "SelectionBrowseBox.hxx"
#endif
namespace dbaui
{
// ================================================================================================
// OQueryDesignFieldUndoAct - Basisklasse fuer Undos in der Feldauflistung im Abfrageentwurf
class OQueryDesignFieldUndoAct : public OCommentUndoAction
{
protected:
OSelectionBrowseBox* pOwner;
long m_nColId;
virtual void Undo() = 0;
virtual void Redo() = 0;
public:
OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, USHORT nCommentID) : OCommentUndoAction(nCommentID), pOwner(pSelBrwBox), m_nColId(-1) { }
void SetColId(long nCol) { m_nColId = nCol; }
};
// ================================================================================================
// OTabFieldCellModifiedUndoAct - Undo-Klasse fuer Aendern einer Zelle einer Spaltenbeschreibung
class OTabFieldCellModifiedUndoAct : public OQueryDesignFieldUndoAct
{
protected:
String m_strNextCellContents;
sal_Int32 m_nCellIndex;
public:
OTabFieldCellModifiedUndoAct(OSelectionBrowseBox* pSelBrwBox) : OQueryDesignFieldUndoAct(pSelBrwBox, STR_QUERY_UNDO_MODIFY_CELL) { }
void SetCellContents(const String& str) { m_strNextCellContents = str; }
void SetCellIndex(sal_Int32 nIndex) { m_nCellIndex = nIndex; }
virtual void Undo();
virtual void Redo() { Undo(); }
};
// ================================================================================================
// OTabFieldSizedUndoAct - Undo-Klasse fuer Aendern einer Spaltenbreite
class OTabFieldSizedUndoAct : public OQueryDesignFieldUndoAct
{
protected:
long m_nNextWidth;
public:
OTabFieldSizedUndoAct(OSelectionBrowseBox* pSelBrwBox) : OQueryDesignFieldUndoAct(pSelBrwBox, STR_QUERY_UNDO_SIZE_COLUMN), m_nNextWidth(0) { }
void SetOriginalWidth(long nWidth) { m_nNextWidth = nWidth; }
virtual void Undo();
virtual void Redo() { Undo(); }
};
// ================================================================================================
// OTabFieldUndoAct - Basisklasse fuer Undos in der Feldauflistung im Abfrageentwurf, die mit Veraendern einer kompletten Feldbeschreibung zu tun haben
class OTabFieldUndoAct : public OQueryDesignFieldUndoAct
{
protected:
OTableFieldDesc* pDescr; // geloeschte Spaltenbeschreibung
BOOL m_bOwnerOfDescription;
public:
OTabFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, USHORT nCommentID) : OQueryDesignFieldUndoAct(pSelBrwBox, nCommentID) { }
virtual ~OTabFieldUndoAct() { if (m_bOwnerOfDescription) delete pDescr; }
void SetTabFieldDescr(OTableFieldDesc* pDescription) { pDescr = pDescription; }
// anschliessend bitte SetOwnership
void SetOwnership(BOOL bTakeIt) { m_bOwnerOfDescription = bTakeIt; }
};
// ================================================================================================
// OTabFieldDelUndoAct - Undo-Klasse fuer Loeschen eines Feldes
class OTabFieldDelUndoAct : public OTabFieldUndoAct
{
protected:
virtual void Undo() { pOwner->InsertColumn(pDescr, m_nColId); SetOwnership(FALSE); }
virtual void Redo() { pOwner->RemoveColumn((USHORT)m_nColId); SetOwnership(TRUE); }
public:
OTabFieldDelUndoAct(OSelectionBrowseBox* pSelBrwBox) : OTabFieldUndoAct(pSelBrwBox, STR_QUERY_UNDO_TABFIELDDELETE) { }
};
// ================================================================================================
// OTabFieldDelUndoAct - Undo-Klasse fuer Anlegen eines Feldes
class OTabFieldCreateUndoAct : public OTabFieldUndoAct
{
protected:
virtual void Undo() { pOwner->RemoveColumn((USHORT)m_nColId); SetOwnership(TRUE); }
virtual void Redo() { pOwner->InsertColumn(pDescr, m_nColId); SetOwnership(FALSE); }
public:
OTabFieldCreateUndoAct(OSelectionBrowseBox* pSelBrwBox) : OTabFieldUndoAct(pSelBrwBox, STR_QUERY_UNDO_TABFIELDCREATE) { }
};
}
#endif // DBAUI_QUERYDESIGNFIELDUNDOACT_HXX
/*************************************************************************
*
* $RCSfile: QueryDesignUndoAction.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:24:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_QUERYDESIGNUNDOACTION_HXX
#define DBAUI_QUERYDESIGNUNDOACTION_HXX
#ifndef DBAUI_GENERALUNDO_HXX
#include "GeneralUndo.hxx"
#endif
namespace dbaui
{
// ================================================================================================
// OQueryDesignUndoAction - Undo-Basisklasse fuer Aktionen im graphischen Abfrageentwurf (ohne Feldliste)
class OQueryTableView;
class OQueryDesignUndoAction : public OCommentUndoAction
{
protected:
OQueryTableView* m_pOwner; // in diesem Container spielt sich alles ab
public:
OQueryDesignUndoAction(OQueryTableView* pOwner, USHORT nCommentID) : OCommentUndoAction(nCommentID), m_pOwner(pOwner) { }
};
}
#endif // DBAUI_QUERYDESIGNUNDOACTION_HXX
/*************************************************************************
*
* $RCSfile: QueryMoveTabWinUndoAct.cxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:25:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_OQUERYMOVETABWINUNDOACT_HXX
#include "QueryMoveTabWinUndoAct.hxx"
#endif
#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
#endif
#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#include "QTableWindow.hxx"
#endif
using namespace dbaui;
//------------------------------------------------------------------------------
void OQueryMoveTabWinUndoAct::TogglePosition()
{
Point ptFrameScrollPos(m_pOwner->GetHScrollBar()->GetThumbPos(), m_pOwner->GetVScrollBar()->GetThumbPos());
Point ptNext = m_pTabWin->GetPosPixel() + ptFrameScrollPos;
m_pTabWin->SetPosPixel(m_ptNextPosition - ptFrameScrollPos);
// sieht so aus, als wenn das ptFrameScrollPos sinnlos ist, da ich es hier abziehe und auf das ptNext aufaddiere, wo
// ich es das naechste Mal ja wieder abziehe ... Aber ptFrameScrollPos kann sich natuerlich beim naechsten Mal schon wieder
// geaendert haben ...
m_pOwner->EnsureVisible(m_pTabWin);
m_ptNextPosition = ptNext;
}
/*************************************************************************
*
* $RCSfile: QuerySizeTabWinUndoAct.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:21:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_QUERYSIZETABWINUNDOACT_HXX
#define DBAUI_QUERYSIZETABWINUNDOACT_HXX
#ifndef DBAUI_QUERYDESIGNUNDOACTION_HXX
#include "QueryDesignUndoAction.hxx"
#endif
#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
#endif
namespace dbaui
{
// ================================================================================================
// OQuerySizeTabWinUndoAct - Undo-Klasse fuer Groessenveraenderung eines TabWins
class OQueryTableWindow;
class OQuerySizeTabWinUndoAct : public OQueryDesignUndoAction
{
Point m_ptNextPosition;
Size m_szNextSize;
OQueryTableWindow* m_pTabWin;
protected:
inline void ToggleSizePosition();
public:
OQuerySizeTabWinUndoAct(OQueryTableView* pOwner, const Point& ptOriginalPos, const Size& szOriginalSize, OQueryTableWindow* pTabWin);
// Nebenbedingung : es darf nicht gescrollt worden sein, waehrend die neue Groesse/Position ermittelt wurde, das heisst, die Position
// hier sind physische, nicht logische Koordinaten
// (im Gegensatz zur QueryMoveTabWinUndoAct)
virtual void Undo() { ToggleSizePosition(); }
virtual void Redo() { ToggleSizePosition(); }
};
//------------------------------------------------------------------------------
inline OQuerySizeTabWinUndoAct::OQuerySizeTabWinUndoAct(OQueryTableView* pOwner, const Point& ptOriginalPos, const Size& szOriginalSize, OQueryTableWindow* pTabWin)
:OQueryDesignUndoAction(pOwner, STR_QUERY_UNDO_SIZETABWIN)
,m_ptNextPosition(ptOriginalPos)
,m_szNextSize(szOriginalSize)
,m_pTabWin(pTabWin)
{
}
//------------------------------------------------------------------------------
inline void OQuerySizeTabWinUndoAct::ToggleSizePosition()
{
Point ptNext = m_pTabWin->GetPosPixel();
Size szNext = m_pTabWin->GetSizePixel();
m_pOwner->Invalidate(INVALIDATE_NOCHILDREN);
m_pTabWin->SetPosSizePixel(m_ptNextPosition, m_szNextSize);
m_pOwner->Invalidate(INVALIDATE_NOCHILDREN);
m_ptNextPosition = ptNext;
m_szNextSize = szNext;
}
}
#endif //DBAUI_QUERYSIZETABWINUNDOACT_HXX
/*************************************************************************
*
* $RCSfile: QueryTabConnUndoAction.cxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:25:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_QUERYTABCONNUNDOACTION_HXX
#include "QueryTabConnUndoAction.hxx"
#endif
#ifndef DBAUI_QUERYTABLECONNECTION_HXX
#include "QTableConnection.hxx"
#endif
#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
#endif
using namespace dbaui;
DBG_NAME(OQueryTabConnUndoAction);
// ------------------------------------------------------------------------------------------------
OQueryTabConnUndoAction::~OQueryTabConnUndoAction()
{
DBG_DTOR(OQueryTabConnUndoAction,NULL);
if (m_bOwnerOfConn)
{ // ich besitze die Connection -> loeschen
delete m_pConnection->GetData();
delete m_pConnection;
}
}
// ------------------------------------------------------------------------------------------------
OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, USHORT nCommentID)
:OQueryDesignUndoAction(pOwner, nCommentID)
,m_pConnection(NULL)
,m_bOwnerOfConn(FALSE)
{
DBG_CTOR(OQueryTabConnUndoAction,NULL);
}
/*************************************************************************
*
* $RCSfile: QueryTabWinShowUndoAct.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:25:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_QUERYTABWINSHOWUNDOACT_HXX
#define DBAUI_QUERYTABWINSHOWUNDOACT_HXX
#ifndef DBAUI_QUERYTABWINUNDOACT_HXX
#include "QueryTabWinUndoAct.hxx"
#endif
#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
#endif
namespace dbaui
{
// ================================================================================================
// OQueryTabWinShowUndoAct - Undo-Klasse fuer Anzeigen eines TabWins
class OQueryTabWinShowUndoAct : public OQueryTabWinUndoAct
{
public:
OQueryTabWinShowUndoAct(OQueryTableView* pOwner) : OQueryTabWinUndoAct(pOwner, STR_QUERY_UNDO_TABWINSHOW) { }
virtual void Undo() { m_pOwner->HideTabWin(m_pTabWin, this); SetOwnership(TRUE); }
virtual void Redo() { m_pOwner->ShowTabWin(m_pTabWin, this); SetOwnership(FALSE); }
};
// ================================================================================================
// OQueryTabWinDelUndoAct - Undo-Klasse fuer Loeschen eines TabWins
class OQueryTabWinDelUndoAct : public OQueryTabWinUndoAct
{
public:
OQueryTabWinDelUndoAct(OQueryTableView* pOwner) : OQueryTabWinUndoAct(pOwner, STR_QUERY_UNDO_TABWINDELETE) { }
virtual void Undo() { m_pOwner->ShowTabWin( m_pTabWin, this ); SetOwnership(FALSE); }
virtual void Redo() { m_pOwner->HideTabWin( m_pTabWin, this ); SetOwnership(TRUE); }
};
}
#endif // DBAUI_QUERYTABWINSHOWUNDOACT_HXX
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*************************************************************************
*
* $RCSfile: TableFieldInfo.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-05 09:21:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (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.openoffice.org/license.html.
*
* Software provided under this License is provided on an AS IS basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef DBAUI_TABLEFIELDINFO_HXX
#define DBAUI_TABLEFIELDINFO_HXX
#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
#endif
#ifndef _SAL_TYPES_H_
#include <sal/types.h>
#endif
namespace dbaui
{
class OTableFieldInfo
{
private:
ETableFieldType m_eFieldType;
sal_Int32 m_eDataType;
public:
OTableFieldInfo();
~OTableFieldInfo();
inline ETableFieldType GetKeyType() const { return m_eFieldType; }
inline void SetKey(ETableFieldType bKey=TAB_NORMAL_FIELD) { m_eFieldType = bKey; }
inline sal_Int32 GetDataType() const { return m_eDataType; }
inline void SetDataType(sal_Int32 eTyp) { m_eDataType = eTyp; }
};
}
#endif // DBAUI_TABLEFIELDINFO_HXX
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment