Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
2f2ac1c5
Kaydet (Commit)
2f2ac1c5
authored
Şub 28, 2001
tarafından
Ocke Janssen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
new relation design
üst
a4517b00
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
2862 additions
and
0 deletions
+2862
-0
ConnectionLine.hxx
dbaccess/source/ui/inc/ConnectionLine.hxx
+131
-0
ConnectionLineData.hxx
dbaccess/source/ui/inc/ConnectionLineData.hxx
+124
-0
JoinController.hxx
dbaccess/source/ui/inc/JoinController.hxx
+158
-0
JoinDesignView.hxx
dbaccess/source/ui/inc/JoinDesignView.hxx
+132
-0
JoinExchange.hxx
dbaccess/source/ui/inc/JoinExchange.hxx
+102
-0
RTableConnectionData.hxx
dbaccess/source/ui/inc/RTableConnectionData.hxx
+148
-0
RelationController.hxx
dbaccess/source/ui/inc/RelationController.hxx
+128
-0
RelationDesignView.hxx
dbaccess/source/ui/inc/RelationDesignView.hxx
+104
-0
RelationDlg.hxx
dbaccess/source/ui/inc/RelationDlg.hxx
+206
-0
RelationTableView.hxx
dbaccess/source/ui/inc/RelationTableView.hxx
+97
-0
TableConnection.hxx
dbaccess/source/ui/inc/TableConnection.hxx
+128
-0
TableConnectionData.hxx
dbaccess/source/ui/inc/TableConnectionData.hxx
+141
-0
TableWindow.hxx
dbaccess/source/ui/inc/TableWindow.hxx
+191
-0
TableWindowData.hxx
dbaccess/source/ui/inc/TableWindowData.hxx
+115
-0
TableWindowListBox.hxx
dbaccess/source/ui/inc/TableWindowListBox.hxx
+107
-0
TableWindowTitle.hxx
dbaccess/source/ui/inc/TableWindowTitle.hxx
+93
-0
RTableConnection.cxx
dbaccess/source/ui/relationdesign/RTableConnection.cxx
+196
-0
RTableConnection.hxx
dbaccess/source/ui/relationdesign/RTableConnection.hxx
+95
-0
RTableConnectionData.cxx
dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+0
-0
RelationController.cxx
dbaccess/source/ui/relationdesign/RelationController.cxx
+0
-0
RelationDesignView.cxx
dbaccess/source/ui/relationdesign/RelationDesignView.cxx
+162
-0
RelationTableView.cxx
dbaccess/source/ui/relationdesign/RelationTableView.cxx
+0
-0
makefile.mk
dbaccess/source/ui/relationdesign/makefile.mk
+92
-0
relation.src
dbaccess/source/ui/relationdesign/relation.src
+212
-0
No files found.
dbaccess/source/ui/inc/ConnectionLine.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: ConnectionLine.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:06:26 $
*
* 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_CONNECTIONLINE_HXX
#define DBAUI_CONNECTIONLINE_HXX
#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
#endif
#ifndef _STRING_HXX
#include <tools/string.hxx>
#endif
#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
#endif
class
SvLBoxEntry
;
class
OutputDevice
;
namespace
dbaui
{
//==================================================================
// ConnData ---------->* ConnLineData
// ^1 ^1
// | |
// Conn ---------->* ConnLine
//==================================================================
/*
the class OConnectionLine represents the graphical line between the to two windows
**/
class
OConnectionLineData
;
class
OTableConnection
;
class
OConnectionLine
{
OTableConnection
*
m_pTabConn
;
OConnectionLineData
*
m_pData
;
SvLBoxEntry
*
m_pSourceEntry
;
SvLBoxEntry
*
m_pDestEntry
;
Point
m_aSourceConnPos
,
m_aDestConnPos
;
Point
m_aSourceDescrLinePos
,
m_aDestDescrLinePos
;
public
:
OConnectionLine
(
OTableConnection
*
pConn
,
const
String
&
rSourceFieldName
=
String
(),
const
String
&
rDestFieldName
=
String
()
);
OConnectionLine
(
OTableConnection
*
pConn
,
OConnectionLineData
*
pLineData
);
OConnectionLine
(
const
OConnectionLine
&
rLine
);
virtual
~
OConnectionLine
();
virtual
OConnectionLine
&
operator
=
(
const
OConnectionLine
&
rLine
);
Rectangle
GetBoundingRect
();
BOOL
RecalcLine
();
void
Draw
(
OutputDevice
*
pOutDev
);
BOOL
CheckHit
(
const
Point
&
rMousePos
);
String
GetSourceFieldName
()
const
{
return
m_pData
->
GetSourceFieldName
();
}
String
GetDestFieldName
()
const
{
return
m_pData
->
GetDestFieldName
();
}
void
SetSourceFieldName
(
const
String
&
rSourceFieldName
);
void
SetDestFieldName
(
const
String
&
rDestFieldName
);
BOOL
Connect
(
const
String
&
rSourceFieldName
,
const
String
&
rDestFieldName
);
BOOL
IsValid
();
Rectangle
GetSourceTextPos
()
const
;
Rectangle
GetDestTextPos
()
const
;
OConnectionLineData
*
GetData
()
const
{
return
m_pData
;
}
};
}
#endif // DBAUI_CONNECTIONLINE_HXX
dbaccess/source/ui/inc/ConnectionLineData.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: ConnectionLineData.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:06:09 $
*
* 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
#define DBAUI_CONNECTIONLINEDATA_HXX
#ifndef _STRING_HXX
#include <tools/string.hxx>
#endif
#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
#endif
namespace
dbaui
{
//==================================================================
// ConnData ---------->* ConnLineData
// ^1 ^1
// | |
// Conn ---------->* ConnLine
//==================================================================
//==================================================================
/**
the class OConnectionLineData contains the data of a connection
e.g. the source and the destanation field
**/
class
OConnectionLineData
{
::
rtl
::
OUString
m_aSourceFieldName
;
::
rtl
::
OUString
m_aDestFieldName
;
public
:
OConnectionLineData
();
OConnectionLineData
(
const
::
rtl
::
OUString
&
rSourceFieldName
,
const
::
rtl
::
OUString
&
rDestFieldName
);
OConnectionLineData
(
const
OConnectionLineData
&
rConnLineData
);
virtual
~
OConnectionLineData
();
// eine Kopie der eigenen Instanz liefern (das ist mir irgendwie angenehmer als ein virtueller Zuweisungsoperator)
virtual
void
CopyFrom
(
const
OConnectionLineData
&
rSource
);
// Memberzugriff (schreiben)
void
SetFieldName
(
EConnectionSide
nWhich
,
const
::
rtl
::
OUString
&
strFieldName
)
{
if
(
nWhich
==
JTCS_FROM
)
m_aSourceFieldName
=
strFieldName
;
else
m_aDestFieldName
=
strFieldName
;
}
void
SetSourceFieldName
(
const
::
rtl
::
OUString
&
rSourceFieldName
){
SetFieldName
(
JTCS_FROM
,
rSourceFieldName
);
}
void
SetDestFieldName
(
const
::
rtl
::
OUString
&
rDestFieldName
){
SetFieldName
(
JTCS_TO
,
rDestFieldName
);
}
// Memberzugriff (lesen)
::
rtl
::
OUString
GetFieldName
(
EConnectionSide
nWhich
)
const
{
return
(
nWhich
==
JTCS_FROM
)
?
m_aSourceFieldName
:
m_aDestFieldName
;
}
::
rtl
::
OUString
GetSourceFieldName
()
const
{
return
GetFieldName
(
JTCS_FROM
);
}
::
rtl
::
OUString
GetDestFieldName
()
const
{
return
GetFieldName
(
JTCS_TO
);
}
virtual
BOOL
IsValid
();
virtual
void
Reset
();
virtual
OConnectionLineData
&
operator
=
(
const
OConnectionLineData
&
rConnLineData
);
};
}
#endif // DBAUI_CONNECTIONLINEDATA_HXX
dbaccess/source/ui/inc/JoinController.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: JoinController.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:04:53 $
*
* 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_JOINCONTROLLER_HXX
#define DBAUI_JOINCONTROLLER_HXX
#ifndef DBAUI_GENERICCONTROLLER_HXX
#include "genericcontroller.hxx"
#endif
#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
#endif
#ifndef _UNDO_HXX
#include <svtools/undo.hxx>
#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
#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
#endif
#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
#endif
#ifndef _MEMORY_
#include <memory>
#endif
class
VCLXWindow
;
namespace
dbaui
{
class
OTableConnectionData
;
class
OTableWindowData
;
class
OAddTableDlg
;
class
OTableWindow
;
class
OJoinController
:
public
OGenericUnoController
{
protected
:
SfxUndoManager
m_aUndoManager
;
::
std
::
vector
<
OTableConnectionData
*>
m_vTableConnectionData
;
::
std
::
vector
<
OTableWindowData
*>
m_vTableData
;
Fraction
m_aZoom
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XConnection
>
m_xConnection
;
::
rtl
::
OUString
m_sDataSourceName
;
// is set in initialze
OAddTableDlg
*
m_pAddTabDlg
;
// is set by the first call of execute, the owner is the design view
sal_Bool
m_bEditable
;
// is the control readonly or not
sal_Bool
m_bModified
;
// is the data modified
sal_Bool
m_bOwnConnection
;
// is true when we created our own connection
virtual
void
createNewConnection
(
sal_Bool
_bUI
=
sal_False
);
// state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
virtual
FeatureState
GetState
(
sal_uInt16
nId
);
// execute a feature
virtual
void
Execute
(
sal_uInt16
nId
);
public
:
OJoinController
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
_rM
);
~
OJoinController
();
// removes the connection from the vector and delete it
void
removeConnectionData
(
::
std
::
auto_ptr
<
OTableConnectionData
>
_pData
);
::
std
::
vector
<
OTableWindowData
*>*
getTableWindowData
()
{
return
&
m_vTableData
;
}
::
std
::
vector
<
OTableConnectionData
*>*
getTableConnectionData
()
{
return
&
m_vTableConnectionData
;}
void
SaveTabWinsPosSize
(
OJoinTableView
::
OTableWindowMap
*
pTabWinList
,
long
nOffsetX
,
long
nOffsetY
);
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XConnection
>
getConnection
()
{
return
m_xConnection
;
}
// should the statement be parsed by our own sql parser
sal_Bool
isReadOnly
()
const
{
return
!
m_bEditable
;
}
sal_Bool
isModified
()
const
{
return
m_bModified
;
}
virtual
void
setModified
(
sal_Bool
_bModified
=
sal_True
);
void
SaveTabWinPosSize
(
OTableWindow
*
pTabWin
,
long
nOffsetX
,
long
nOffsetY
);
// need for undo's and redo's
SfxUndoManager
*
getUndoMgr
();
// XEventListener
virtual
void
SAL_CALL
disposing
(
const
::
com
::
sun
::
star
::
lang
::
EventObject
&
Source
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// ::com::sun::star::lang::XComponent
virtual
void
SAL_CALL
dispose
();
//
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
);
};
}
#endif // DBAUI_JOINCONTROLLER_HXX
dbaccess/source/ui/inc/JoinDesignView.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: JoinDesignView.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:06:45 $
*
* 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_JOINDESIGNVIEW_HXX
#define DBAUI_JOINDESIGNVIEW_HXX
#ifndef DBAUI_DATAVIEW_HXX
#include "dataview.hxx"
#endif
#ifndef _VECTOR_
#include <vector>
#endif
#ifndef _STRING_HXX
#include <tools/string.hxx>
#endif
#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
#endif
//#ifndef DBAUI_JOINTABLEVIEW_HXX
//#include "JoinTableView.hxx"
//#endif
namespace
dbaui
{
class
OAddTableDlg
;
class
OTableConnection
;
class
OConnectionLineData
;
class
OJoinController
;
class
OScrollWindowHelper
;
class
OJoinTableView
;
class
OTableWindow
;
class
OJoinDesignView
:
public
ODataView
{
protected
:
OScrollWindowHelper
*
m_pScrollWindow
;
// contains only the scrollbars
OJoinTableView
*
m_pTableView
;
// presents the upper window
OAddTableDlg
*
m_pAddTabDlg
;
// create by the first execute of the add table slot
OJoinController
*
m_pController
;
public
:
OJoinDesignView
(
Window
*
pParent
,
OJoinController
*
_pController
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
);
virtual
~
OJoinDesignView
();
// set the view readonly or not
virtual
void
setReadOnly
(
sal_Bool
_bReadOnly
);
// set the statement for representation
/// late construction
virtual
void
Construct
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
awt
::
XControlModel
>&
xModel
);
virtual
void
initialize
();
virtual
void
SaveTabWinUIConfig
(
OTableWindow
*
pWin
);
OJoinController
*
getController
()
const
{
return
m_pController
;
}
// returs the add table dialog from the design view
OAddTableDlg
*
getAddTableDialog
()
{
return
m_pAddTabDlg
;
}
// called when fields are deleted
// called when a table from tabeview was deleted
void
TableDeleted
(
const
::
rtl
::
OUString
&
rAliasName
);
OJoinTableView
*
getTableView
()
{
return
m_pTableView
;
}
void
zoomTableView
(
const
Fraction
&
_rFraction
);
void
SaveUIConfig
();
protected
:
// return the Rectangle where I can paint myself
virtual
void
resizeControl
(
Rectangle
&
rRect
);
DECL_LINK
(
SplitHdl
,
void
*
);
};
}
#endif // DBAUI_JOINDESIGNVIEW_HXX
dbaccess/source/ui/inc/JoinExchange.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: JoinExchange.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:05:26 $
*
* 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_JOINEXCHANGE_HXX
#define DBAUI_JOINEXCHANGE_HXX
#ifndef DBAUI_DBEXCHANGE_HXX
#include "dbexchange.hxx"
#endif
#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
#endif
namespace
dbaui
{
struct
OJoinExchangeData
{
public
:
OTableWindowListBox
*
pListBox
;
// die ListBox innerhalb desselben (daraus kann man sich das TabWin und daraus den WinName besorgen)
SvLBoxEntry
*
pEntry
;
// der Eintrag, der gedraggt oder auf den gedroppt wurde
OJoinExchangeData
(
OTableWindowListBox
*
pBox
)
:
pListBox
(
pBox
),
pEntry
(
pBox
->
FirstSelected
())
{
}
};
//==================================================================
// OJoinExchObj :
// Zusaetzliche Daten fuer das Erzeugen von Joins in der JoinShell
//==================================================================
class
OJoinExchObj
{
static
String
m_sJoinFormat
;
protected
:
OJoinExchangeData
m_jxdSourceDescription
;
public
:
OJoinExchObj
(
const
OJoinExchangeData
&
jxdSource
);
~
OJoinExchObj
();
OJoinExchangeData
GetSourceDescription
()
const
{
return
m_jxdSourceDescription
;
}
};
}
#endif // DBAUI_JOINEXCHANGE_HXX
dbaccess/source/ui/inc/RTableConnectionData.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: RTableConnectionData.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:07:39 $
*
* 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_RTABLECONNECTIONDATA_HXX
#define DBAUI_RTABLECONNECTIONDATA_HXX
#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
#endif
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
#endif
#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
#endif
#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
#endif
namespace
dbaui
{
const
UINT16
CARDINAL_UNDEFINED
=
0x0000
;
const
UINT16
CARDINAL_ONE_MANY
=
0x0001
;
const
UINT16
CARDINAL_MANY_ONE
=
0x0002
;
const
UINT16
CARDINAL_ONE_ONE
=
0x0004
;
class
OConnectionLineData
;
//==================================================================
class
ORelationTableConnectionData
:
public
OTableConnectionData
{
::
rtl
::
OUString
m_sDatabaseName
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>
m_xTables
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
m_xSource
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
m_xDest
;
// @see com.sun.star.sdbc.KeyRule
sal_Int32
m_nUpdateRules
;
sal_Int32
m_nDeleteRules
;
sal_Int32
m_nCardinality
;
BOOL
checkPrimaryKey
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>&
_xTable
,
EConnectionSide
_eEConnectionSide
)
const
;
BOOL
IsSourcePrimKey
()
const
{
return
checkPrimaryKey
(
m_xSource
,
JTCS_FROM
);
}
BOOL
IsDestPrimKey
()
const
{
return
checkPrimaryKey
(
m_xDest
,
JTCS_TO
);
}
protected
:
virtual
OConnectionLineData
*
CreateLineDataObj
();
virtual
OConnectionLineData
*
CreateLineDataObj
(
const
OConnectionLineData
&
rConnLineData
);
public
:
ORelationTableConnectionData
();
ORelationTableConnectionData
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>&
_xTables
);
ORelationTableConnectionData
(
const
ORelationTableConnectionData
&
rConnData
);
ORelationTableConnectionData
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>&
_xTables
,
const
::
rtl
::
OUString
&
rSourceWinName
,
const
::
rtl
::
OUString
&
rDestWinName
,
const
::
rtl
::
OUString
&
rConnName
=
::
rtl
::
OUString
()
);
virtual
~
ORelationTableConnectionData
();
virtual
void
CopyFrom
(
const
OTableConnectionData
&
rSource
);
virtual
OTableConnectionData
*
NewInstance
()
const
{
return
new
ORelationTableConnectionData
();
}
ORelationTableConnectionData
&
operator
=
(
const
ORelationTableConnectionData
&
rConnData
);
::
rtl
::
OUString
GetDatabaseName
()
const
{
return
m_sDatabaseName
;
}
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>
getTables
()
const
{
return
m_xTables
;}
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
getSource
()
const
{
return
m_xSource
;}
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
getDest
()
const
{
return
m_xDest
;
}
virtual
void
SetSourceWinName
(
const
String
&
rSourceWinName
);
virtual
void
SetDestWinName
(
const
String
&
rDestWinName
);
void
SetCardinality
();
void
SetUpdateRules
(
sal_Int32
nAttr
){
m_nUpdateRules
=
nAttr
;
}
void
SetDeleteRules
(
sal_Int32
nAttr
){
m_nDeleteRules
=
nAttr
;
}
sal_Int32
GetUpdateRules
()
const
{
return
m_nUpdateRules
;
}
sal_Int32
GetDeleteRules
()
const
{
return
m_nDeleteRules
;
}
sal_Int32
GetCardinality
()
const
{
return
m_nCardinality
;
}
BOOL
Update
();
BOOL
IsConnectionPossible
();
void
ChangeOrientation
();
BOOL
DropRelation
();
};
}
#endif // DBAUI_RTABLECONNECTIONDATA_HXX
dbaccess/source/ui/inc/RelationController.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: RelationController.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:04:44 $
*
* 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_RELATIONCONTROLLER_HXX
#define DBAUI_RELATIONCONTROLLER_HXX
#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
#endif
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
#endif
#ifndef DBAUI_RELATIONDESIGNVIEW_HXX
#include "RelationDesignView.hxx"
#endif
class
VCLXWindow
;
namespace
dbaui
{
class
OTableConnectionData
;
class
OTableWindowData
;
class
OAddTableDlg
;
class
OTableFieldDesc
;
class
OTableWindow
;
class
ORelationController
:
public
OJoinController
{
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
m_xDataSource
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>
m_xTables
;
protected
:
// all the features which should be handled by this class
virtual
void
AddSupportedFeatures
();
// execute a feature
virtual
void
Execute
(
sal_uInt16
nId
);
virtual
ToolBox
*
CreateToolBox
(
Window
*
pParent
);
ORelationDesignView
*
getRelationView
()
{
return
static_cast
<
ORelationDesignView
*>
(
m_pView
);
}
void
loadData
();
sal_Bool
existsTable
(
const
::
rtl
::
OUString
&
_rComposedTableName
)
const
;
public
:
ORelationController
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
_rM
);
~
ORelationController
();
// temp
void
SaveTabWinsPosSize
(
OJoinTableView
::
OTableWindowMap
*
pTabWinList
,
long
nOffsetX
,
long
nOffsetY
);
virtual
sal_Bool
Construct
(
Window
*
pParent
);
// ::com::sun::star::beans::XPropertyChangeListener
virtual
void
SAL_CALL
propertyChange
(
const
::
com
::
sun
::
star
::
beans
::
PropertyChangeEvent
&
evt
);
// ::com::sun::star::container::XContainerListener
virtual
void
SAL_CALL
elementInserted
(
const
::
com
::
sun
::
star
::
container
::
ContainerEvent
&
Event
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
elementRemoved
(
const
::
com
::
sun
::
star
::
container
::
ContainerEvent
&
Event
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
elementReplaced
(
const
::
com
::
sun
::
star
::
container
::
ContainerEvent
&
Event
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// ::com::sun::star::frame::XController
virtual
sal_Bool
SAL_CALL
suspend
(
sal_Bool
bSuspend
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// XServiceInfo
virtual
::
rtl
::
OUString
SAL_CALL
getImplementationName
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// need by registration
static
::
rtl
::
OUString
getImplementationName_Static
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
static
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
getSupportedServiceNames_Static
(
void
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
static
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
SAL_CALL
Create
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
);
// lang::XInitialization
virtual
void
SAL_CALL
initialize
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Any
>&
aArguments
)
throw
(
::
com
::
sun
::
star
::
uno
::
Exception
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
};
}
#endif // DBAUI_RELATIONCONTROLLER_HXX
dbaccess/source/ui/inc/RelationDesignView.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: RelationDesignView.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:08:00 $
*
* 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_RELATIONDESIGNVIEW_HXX
#define DBAUI_RELATIONDESIGNVIEW_HXX
#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
#endif
#ifndef _VECTOR_
#include <vector>
#endif
#ifndef _STRING_HXX
#include <tools/string.hxx>
#endif
#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
#endif
#ifndef DBAUI_RELATION_TABLEVIEW_HXX
#include "RelationTableView.hxx"
#endif
namespace
dbaui
{
class
OAddTableDlg
;
class
OTableConnection
;
class
ORelationTableConnectionData
;
class
OConnectionLineData
;
class
ORelationController
;
class
ORelationDesignView
:
public
OJoinDesignView
{
public
:
ORelationDesignView
(
Window
*
pParent
,
ORelationController
*
_pController
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
);
virtual
~
ORelationDesignView
();
// set the statement for representation
/// late construction
virtual
void
Construct
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
awt
::
XControlModel
>&
xModel
);
virtual
void
initialize
();
};
}
#endif // DBAUI_RELATIONDESIGNVIEW_HXX
dbaccess/source/ui/inc/RelationDlg.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: RelationDlg.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:08:37 $
*
* 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_RELATIONDIALOG_HXX
#define DBAUI_RELATIONDIALOG_HXX
#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
#endif
#ifndef _GROUP_HXX //autogen
#include <vcl/group.hxx>
#endif
#ifndef _BUTTON_HXX //autogen
#include <vcl/button.hxx>
#endif
#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
#endif
#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
#endif
#ifndef _SV_LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
#endif
#ifndef _SVX_DBBROWSE_HXX
#include <svx/dbbrowse.hxx>
#endif // _SVX_DBBROWSE_HXX
#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
#endif
#ifndef DBAUI_RTABLECONNECTIONDATA_HXX
#include "RTableConnectionData.hxx"
#endif
#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
#endif
namespace
dbaui
{
//========================================================================
class
ORelationDialog
;
class
ORelationControl
:
public
DbBrowseBox
{
friend
class
ORelationDialog
;
ULONG
m_nDeActivateEvent
;
DbListBoxCtrl
*
m_pListCell
;
ORelationTableConnectionData
*
m_pConnData
;
long
m_nDataPos
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
m_xSourceDef
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
m_xDestDef
;
void
SetDef
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>&
xDest
,
sal_Int32
_nPos
);
public
:
ORelationControl
(
ORelationDialog
*
pParent
);
virtual
~
ORelationControl
();
void
SetSourceDef
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>&
_xNewSource
);
void
SetDestDef
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>&
_xNewDest
);
protected
:
virtual
void
Resize
();
virtual
long
PreNotify
(
NotifyEvent
&
rNEvt
);
virtual
BOOL
IsTabAllowed
(
BOOL
bForward
)
const
;
virtual
void
Init
()
{
DbBrowseBox
::
Init
();
}
// late construction
virtual
void
Init
(
ORelationTableConnectionData
*
_pConnData
);
virtual
void
InitController
(
DbCellControllerRef
&
rController
,
long
nRow
,
USHORT
nCol
);
virtual
DbCellController
*
GetController
(
long
nRow
,
USHORT
nCol
);
virtual
void
PaintCell
(
OutputDevice
&
rDev
,
const
Rectangle
&
rRect
,
USHORT
nColId
)
const
;
virtual
BOOL
SeekRow
(
long
nRow
);
virtual
BOOL
SaveModified
();
virtual
String
GetCellText
(
long
nRow
,
USHORT
nColId
);
virtual
void
CellModified
();
private
:
DECL_LINK
(
AsynchActivate
,
void
*
);
DECL_LINK
(
AsynchDeactivate
,
void
*
);
};
class
OJoinTableView
;
//========================================================================
class
ORelationDialog
:
public
ModalDialog
{
GroupBox
aGB_InvolvedTables
;
ListBox
m_lmbLeftTable
,
m_lmbRightTable
;
GroupBox
aGB_InvolvedFields
;
GroupBox
aGB_CascUpd
;
RadioButton
aRB_NoCascUpd
,
aRB_CascUpd
,
aRB_CascUpdNull
,
aRB_CascUpdDefault
;
GroupBox
aGB_CascDel
;
RadioButton
aRB_NoCascDel
,
aRB_CascDel
,
aRB_CascDelNull
,
aRB_CascDelDefault
;
OKButton
aPB_OK
;
CancelButton
aPB_CANCEL
;
HelpButton
aPB_HELP
;
ORelationControl
*
m_pRC_Tables
;
ORelationTableConnectionData
*
m_pConnData
;
ORelationTableConnectionData
*
m_pOrigConnData
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XConnection
>
m_xConnection
;
String
m_strCurrentLeft
;
String
m_strCurrentRight
;
BOOL
m_bTriedOneUpdate
;
public
:
ORelationDialog
(
OJoinTableView
*
pParent
,
ORelationTableConnectionData
*
pConnectionData
,
BOOL
bAllowTableSelect
=
FALSE
);
virtual
~
ORelationDialog
();
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
sdbc
::
XConnection
>
getConnection
(){
return
m_xConnection
;
}
void
NotifyCellChange
();
virtual
short
Execute
();
protected
:
void
Init
(
ORelationTableConnectionData
*
_pConnData
);
private
:
DECL_LINK
(
OKClickHdl
,
Button
*
);
DECL_LINK
(
OnTableChanged
,
ListBox
*
);
};
}
#endif // DBAUI_RELATIONDIALOG_HXX
dbaccess/source/ui/inc/RelationTableView.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: RelationTableView.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:05:04 $
*
* 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_RELATION_TABLEVIEW_HXX
#define DBAUI_RELATION_TABLEVIEW_HXX
#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
#endif
namespace
dbaui
{
class
ORelationDesignView
;
class
ORelationTableView
:
public
OJoinTableView
{
protected
:
virtual
void
ConnDoubleClicked
(
OTableConnection
*
pConnection
);
virtual
void
KeyInput
(
const
KeyEvent
&
rEvt
);
virtual
void
AddTabWin
(
const
::
rtl
::
OUString
&
_rComposedName
,
const
::
rtl
::
OUString
&
rWinName
,
BOOL
bNewTable
=
FALSE
);
public
:
ORelationTableView
(
Window
*
pParent
,
ORelationDesignView
*
pView
);
virtual
~
ORelationTableView
();
// virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL bNewTable = FALSE);
// virtual void RemoveTabWin( OTableWindow* pTabWin );
virtual
void
AddConnection
(
const
OJoinExchangeData
&
jxdSource
,
const
OJoinExchangeData
&
jxdDest
);
virtual
BOOL
RemoveConnection
(
OTableConnection
*
pConn
);
virtual
void
ReSync
();
void
AddNewRelation
();
// reisst den Dialog fuer eine voellig neue Relation hoch
// wird vom AddTabDlg benutzt, um festzustellen, ob noch Tabellen hinzugefuegt werden duerfen
virtual
BOOL
IsAddAllowed
();
};
}
#endif // DBAUI_RELATION_TABLEVIEW_HXX
dbaccess/source/ui/inc/TableConnection.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: TableConnection.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:05:50 $
*
* 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_TABLECONNECTION_HXX
#define DBAUI_TABLECONNECTION_HXX
#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
#endif
#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
#endif
#ifndef _VECTOR_
#include <vector>
#endif
#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
#endif
namespace
dbaui
{
class
OTableConnectionData
;
class
OTableWindow
;
class
OJoinTableView
;
class
OTableConnection
{
::
std
::
vector
<
OConnectionLine
*>
m_vConnLine
;
OTableConnectionData
*
m_pData
;
OJoinTableView
*
m_pParent
;
BOOL
m_bSelected
;
void
Init
();
protected
:
OConnectionLine
*
CreateConnLine
(
const
OConnectionLine
&
rConnLine
);
public
:
TYPEINFO
();
OTableConnection
(
OJoinTableView
*
pContainer
,
OTableConnectionData
*
pTabConnData
);
OTableConnection
(
const
OTableConnection
&
rConn
);
// WICHTIG : normalerweise bekomme ich von aussen einen Zeiger auf OTableConnectionData mitgegeben, hier aber muss ich
// mir (ueber OTableConnectionData::NewInstance) selber eine INstanz anlegen, die ich aber - wie in allen anderen Faellen auch -
// NIE loesche. Der Aufrufer ist also bei Benutzung dieses Constructors dafuer verantwortlich, meine Daten abzufragen und
// sich irgendwo zu merken, um sie dann irgendwann zu loeschen.
virtual
~
OTableConnection
();
OTableConnection
&
operator
=
(
const
OTableConnection
&
rConn
);
void
Select
();
void
Deselect
();
BOOL
IsSelected
()
const
{
return
m_bSelected
;
}
BOOL
CheckHit
(
const
Point
&
rMousePos
);
void
Invalidate
();
void
UpdateLineList
();
OTableWindow
*
GetSourceWin
()
const
;
OTableWindow
*
GetDestWin
()
const
;
void
RecalcLines
();
Rectangle
GetBoundingRect
();
OTableConnectionData
*
GetData
()
const
{
return
m_pData
;
}
const
::
std
::
vector
<
OConnectionLine
*>*
GetConnLineList
()
const
{
return
&
m_vConnLine
;
}
OJoinTableView
*
GetParent
(){
return
m_pParent
;
}
virtual
void
Draw
(
const
Rectangle
&
rRect
);
};
}
#endif // DBAUI_TABLECONNECTION_HXX
dbaccess/source/ui/inc/TableConnectionData.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: TableConnectionData.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:05:37 $
*
* 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_TABLECONNECTIONDATA_HXX
#define DBAUI_TABLECONNECTIONDATA_HXX
#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
#endif
#ifndef _VECTOR_
#include <vector>
#endif
#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
#endif
namespace
dbaui
{
#define MAX_CONN_COUNT 2
//==================================================================
// ConnData ---------->* ConnLineData
// ^1 ^1
// | |
// Conn ---------->* ConnLine
//==================================================================
//==================================================================
/*
the class OTableConnectionData contains all connectiondata which exists between two windows
**/
class
OTableConnectionData
{
protected
:
String
m_aSourceWinName
;
String
m_aDestWinName
;
String
m_aConnName
;
::
std
::
vector
<
OConnectionLineData
*>
m_vConnLineData
;
void
Init
();
void
Init
(
const
String
&
rSourceWinName
,
const
String
&
rDestWinName
,
const
String
&
rConnName
=
String
()
);
// Das erste Init baut darauf, dass die 3 String-Members schon korrekt gesetzt sind und aConnLineDataList leer ist.
// Das zweite stellt genau diesen Zustand her
virtual
OConnectionLineData
*
CreateLineDataObj
();
virtual
OConnectionLineData
*
CreateLineDataObj
(
const
OConnectionLineData
&
rConnLineData
);
public
:
TYPEINFO
();
OTableConnectionData
();
OTableConnectionData
(
const
String
&
rSourceWinName
,
const
String
&
rDestWinName
,
const
String
&
rConnName
=
String
()
);
OTableConnectionData
(
const
OTableConnectionData
&
rConnData
);
virtual
~
OTableConnectionData
();
// sich aus einer Quelle initialisieren (das ist mir irgendwie angenehmer als ein virtueller Zuweisungsoperator)
virtual
void
CopyFrom
(
const
OTableConnectionData
&
rSource
);
// eine neue Instanz meines eigenen Typs liefern (braucht NICHT initialisiert sein)
virtual
OTableConnectionData
*
NewInstance
()
const
;
// (von OTableConnectionData abgeleitete Klasse muessen entsprechend eine Instanz ihrer Klasse liefern)
OTableConnectionData
&
operator
=
(
const
OTableConnectionData
&
rConnData
);
BOOL
SetConnLine
(
USHORT
nIndex
,
const
String
&
rSourceFieldName
,
const
String
&
rDestFieldName
);
BOOL
AppendConnLine
(
const
::
rtl
::
OUString
&
rSourceFieldName
,
const
::
rtl
::
OUString
&
rDestFieldName
);
void
ResetConnLines
(
BOOL
bUseDefaults
=
TRUE
);
// loescht die Liste der ConnLines, bei bUseDefaults == TRUE werden danach MAX_CONN_COUNT neue Dummy-Linien eingefuegt
::
std
::
vector
<
OConnectionLineData
*>*
GetConnLineDataList
(){
return
&
m_vConnLineData
;
}
String
GetSourceWinName
()
const
{
return
m_aSourceWinName
;
}
String
GetDestWinName
()
const
{
return
m_aDestWinName
;
}
String
GetConnName
()
const
{
return
m_aConnName
;
}
virtual
void
SetSourceWinName
(
const
String
&
rSourceWinName
){
m_aSourceWinName
=
rSourceWinName
;
}
virtual
void
SetDestWinName
(
const
String
&
rDestWinName
){
m_aDestWinName
=
rDestWinName
;
}
virtual
void
SetConnName
(
const
String
&
rConnName
){
m_aConnName
=
rConnName
;
}
};
}
#endif // DBAUI_TABLECONNECTIONDATA_HXX
dbaccess/source/ui/inc/TableWindow.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: TableWindow.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:07: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_TABLEWINDOW_HXX
#define DBAUI_TABLEWINDOW_HXX
#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
#endif
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
#endif
#ifndef DBAUI_TABLEWINDOWTITLE_HXX
#include "TableWindowTitle.hxx"
#endif
#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
#endif
#ifndef DBAUI_TABLEWINDOWDATA_HXX
#include "TableWindowData.hxx"
#endif
#ifndef _VECTOR_
#include <vector>
#endif
#ifndef _SV_WINDOW_HXX
#include <vcl/window.hxx>
#endif
class
SvLBoxEntry
;
namespace
dbaui
{
//////////////////////////////////////////////////////////////////////////
// Flags fuer die Groessenanpassung der SbaJoinTabWins
const
UINT16
SIZING_NONE
=
0x0000
;
const
UINT16
SIZING_TOP
=
0x0001
;
const
UINT16
SIZING_BOTTOM
=
0x0002
;
const
UINT16
SIZING_LEFT
=
0x0004
;
const
UINT16
SIZING_RIGHT
=
0x0008
;
class
OTableWindowListBox
;
class
OJoinDesignView
;
class
OJoinTableView
;
class
OTableWindow
:
public
Window
{
friend
class
OTableWindowTitle
;
friend
class
OTableWindowListBox
;
protected
:
// und die Tabelle selber (brauche ich, da ich sie locken will, solange das Fenster lebt)
OTableWindowTitle
m_aTitle
;
OTableWindowListBox
*
m_pListBox
;
private
:
// the columns of the table
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
m_xTable
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>
m_xColumns
;
OTableWindowData
*
m_pData
;
::
rtl
::
OUString
m_strInitialWinName
;
UINT16
m_nSizingFlags
;
BOOL
m_bActive
;
void
Draw3DBorder
(
const
Rectangle
&
rRect
);
protected
:
virtual
void
Resize
();
virtual
void
Paint
(
const
Rectangle
&
rRect
);
virtual
void
MouseMove
(
const
MouseEvent
&
rEvt
);
virtual
void
MouseButtonDown
(
const
MouseEvent
&
rEvt
);
virtual
void
KeyInput
(
const
KeyEvent
&
rEvt
);
virtual
void
DataChanged
(
const
DataChangedEvent
&
rDCEvt
);
virtual
OTableWindowListBox
*
CreateListBox
();
// wird im ERSTEN Init aufgerufen
virtual
BOOL
FillListBox
();
// wird in JEDEM Init aufgerufen
virtual
void
EmptyListBox
();
// Liste wird geleert, damit haben abgeleitete Klassen die Moeglichkeit, eventuell gesetzte UserData zu loeschen
virtual
void
OnEntryDoubleClicked
(
SvLBoxEntry
*
pEntry
)
{
}
// wird aus dem DoubleClickHdl der ListBox heraus aufgerufen
// die unterliegende Tabellendefinition (un)locken
// void LockTable() { if (m_xTableDef.Is()) m_xTableDef->AddUsage(); }
// void UnlockTable() { if (m_xTableDef.Is()) m_xTableDef->ReleaseUsage(); }
public
:
TYPEINFO
();
OTableWindow
(
Window
*
pParent
,
OTableWindowData
*
pTabWinData
);
virtual
~
OTableWindow
();
// spaeter Constructor, siehe auch CreateListbox und FillListbox
virtual
BOOL
Init
();
OJoinTableView
*
getTableView
();
const
OJoinTableView
*
getTableView
()
const
;
OJoinDesignView
*
getDesignView
();
void
SetPosPixel
(
const
Point
&
rNewPos
);
void
SetSizePixel
(
const
Size
&
rNewSize
);
void
SetPosSizePixel
(
const
Point
&
rNewPos
,
const
Size
&
rNewSize
);
void
SetTitle
(
const
::
rtl
::
OUString
&
rTit
);
void
SetBoldTitle
(
BOOL
bBold
);
void
Remove
();
BOOL
IsActive
(){
return
m_bActive
;
}
::
rtl
::
OUString
GetTableName
()
const
{
return
m_pData
->
GetTableName
();
}
::
rtl
::
OUString
GetWinName
()
const
{
return
m_pData
->
GetWinName
();
}
::
rtl
::
OUString
GetComposedName
()
const
{
return
m_pData
->
GetComposedName
();
}
OTableWindowListBox
*
GetListBox
()
const
{
return
m_pListBox
;
}
OTableWindowData
*
GetData
()
const
{
return
m_pData
;
}
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>
GetOriginalColumns
()
const
{
return
m_xColumns
;
}
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
GetTable
()
const
{
return
m_xTable
;
}
UINT16
GetSizingFlags
()
const
{
return
m_nSizingFlags
;
}
// window override
virtual
void
StateChanged
(
StateChangedType
nStateChange
);
virtual
void
GetFocus
();
virtual
void
LoseFocus
();
// Linien neu zeichnen
void
InvalidateLines
();
// habe ich Connections nach aussen ?
BOOL
ExistsAConn
()
const
;
virtual
void
EnumValidFields
(
::
std
::
vector
<
::
rtl
::
OUString
>&
arrstrFields
);
};
}
#endif //DBAUI_TABLEWINDOW_HXX
dbaccess/source/ui/inc/TableWindowData.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: TableWindowData.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:05:14 $
*
* 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_TABLEWINDOWDATA_HXX
#define DBAUI_TABLEWINDOWDATA_HXX
#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
#endif
#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
#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
OTableWindowData
{
protected
:
::
rtl
::
OUString
m_aTableName
;
::
rtl
::
OUString
m_aWinName
;
::
rtl
::
OUString
m_sComposedName
;
Point
m_aPosition
;
Size
m_aSize
;
sal_Bool
m_bShowAll
;
public
:
TYPEINFO
();
OTableWindowData
();
OTableWindowData
(
const
::
rtl
::
OUString
&
_rComposedName
,
const
::
rtl
::
OUString
&
strTableName
,
const
::
rtl
::
OUString
&
rWinName
=
::
rtl
::
OUString
()
);
virtual
~
OTableWindowData
();
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
GetComposedName
()
const
{
return
m_sComposedName
;
}
::
rtl
::
OUString
GetTableName
()
const
{
return
m_aTableName
;
}
::
rtl
::
OUString
GetWinName
()
const
{
return
m_aWinName
;
}
Point
GetPosition
()
const
{
return
m_aPosition
;
}
Size
GetSize
()
const
{
return
m_aSize
;
}
BOOL
IsShowAll
()
const
{
return
m_bShowAll
;
}
BOOL
HasPosition
()
const
;
BOOL
HasSize
()
const
;
void
SetTableName
(
const
::
rtl
::
OUString
&
rTableName
)
{
m_aTableName
=
rTableName
;
}
void
SetWinName
(
const
::
rtl
::
OUString
&
rWinName
)
{
m_aWinName
=
rWinName
;
}
void
SetPosition
(
const
Point
&
rPos
)
{
m_aPosition
=
rPos
;
}
void
SetSize
(
const
Size
&
rSize
)
{
m_aSize
=
rSize
;
}
void
ShowAll
(
BOOL
bAll
)
{
m_bShowAll
=
bAll
;
}
};
}
#endif // DBAUI_TABLEWINDOWDATA_HXX
dbaccess/source/ui/inc/TableWindowListBox.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: TableWindowListBox.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:07: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_TABLEWINDOWLISTBOX_HXX
#define DBAUI_TABLEWINDOWLISTBOX_HXX
#ifndef _SVTREEBOX_HXX
#include <svtools/svtreebx.hxx>
#endif
namespace
dbaui
{
class
OTableWindow
;
class
OTableWindowListBox
:
public
SvTreeListBox
{
DECL_LINK
(
DoubleClickHdl
,
SvTreeListBox
*
);
DECL_LINK
(
ScrollUpHdl
,
SvTreeListBox
*
);
DECL_LINK
(
ScrollDownHdl
,
SvTreeListBox
*
);
Timer
m_aScrollTimer
;
Point
m_aMousePos
;
OTableWindow
*
m_pTabWin
;
BOOL
m_bReallyScrolled
:
1
;
BOOL
m_bDragSource
:
1
;
protected
:
virtual
void
Command
(
const
CommandEvent
&
rEvt
);
virtual
void
LoseFocus
();
virtual
void
GetFocus
();
virtual
void
NotifyScrolled
();
virtual
void
NotifyEndScroll
();
virtual
long
PreNotify
(
NotifyEvent
&
rNEvt
);
public
:
OTableWindowListBox
(
OTableWindow
*
pParent
,
const
String
&
rDatabaseName
,
const
String
&
rTableName
);
virtual
~
OTableWindowListBox
();
OTableWindow
*
GetTabWin
(){
return
m_pTabWin
;
}
virtual
BOOL
QueryDrop
(
DropEvent
&
rDEvt
);
virtual
BOOL
Drop
(
const
DropEvent
&
rDEvt
);
SvLBoxEntry
*
GetEntryFromText
(
const
String
&
rEntryText
);
};
}
#endif // DBAUI_TABLEWINDOWLISTBOX_HXX
dbaccess/source/ui/inc/TableWindowTitle.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: TableWindowTitle.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:08:17 $
*
* 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_TABLEWINDOWTITLE_HXX
#define DBAUI_TABLEWINDOWTITLE_HXX
#ifndef _SV_CTRL_HXX
#include <vcl/ctrl.hxx>
#endif
namespace
dbaui
{
class
OTableWindow
;
class
OTableWindowTitle
:
public
Control
{
OTableWindow
*
m_pTabWin
;
protected
:
virtual
void
Command
(
const
CommandEvent
&
rEvt
);
virtual
void
Paint
(
const
Rectangle
&
rRect
);
virtual
void
MouseButtonDown
(
const
MouseEvent
&
rEvt
);
virtual
void
KeyInput
(
const
KeyEvent
&
rEvt
);
virtual
void
DataChanged
(
const
DataChangedEvent
&
rDCEvt
);
public
:
OTableWindowTitle
(
OTableWindow
*
pParent
);
virtual
~
OTableWindowTitle
();
virtual
void
LoseFocus
();
virtual
void
GetFocus
();
virtual
void
RequestHelp
(
const
HelpEvent
&
rHEvt
);
// window override
virtual
void
StateChanged
(
StateChangedType
nStateChange
);
};
}
#endif // DBAUI_TABLEWINDOWTITLE_HXX
dbaccess/source/ui/relationdesign/RTableConnection.cxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: RTableConnection.cxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:06:52 $
*
* 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_RTABLECONNECTION_HXX
#include "RTableConnection.hxx"
#endif
#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
#endif
#ifndef DBAUI_RELATION_TABLEVIEW_HXX
#include "RelationTableView.hxx"
#endif
#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
#endif
using
namespace
dbaui
;
//========================================================================
// class ORelationTableConnection
//========================================================================
DBG_NAME
(
ORelationTableConnection
);
//------------------------------------------------------------------------
ORelationTableConnection
::
ORelationTableConnection
(
ORelationTableView
*
pContainer
,
ORelationTableConnectionData
*
pTabConnData
)
:
OTableConnection
(
pContainer
,
pTabConnData
)
{
DBG_CTOR
(
ORelationTableConnection
,
NULL
);
}
//------------------------------------------------------------------------
ORelationTableConnection
::
ORelationTableConnection
(
const
ORelationTableConnection
&
rConn
)
:
OTableConnection
(
rConn
)
{
DBG_CTOR
(
ORelationTableConnection
,
NULL
);
// keine eigenen Members, also reicht die Basisklassenfunktionalitaet
}
//------------------------------------------------------------------------
ORelationTableConnection
::~
ORelationTableConnection
()
{
DBG_DTOR
(
ORelationTableConnection
,
NULL
);
}
//------------------------------------------------------------------------
OConnectionLine
*
ORelationTableConnection
::
CreateConnLine
(
const
OConnectionLine
&
rConnLine
)
{
DBG_CHKTHIS
(
ORelationTableConnection
,
NULL
);
return
new
OConnectionLine
(
rConnLine
);
}
//------------------------------------------------------------------------
ORelationTableConnection
&
ORelationTableConnection
::
operator
=
(
const
ORelationTableConnection
&
rConn
)
{
DBG_CHKTHIS
(
ORelationTableConnection
,
NULL
);
// nicht dass es was aendern wuerde, da die Basisklasse das auch testet und ich keine eigenen Members zu kopieren habe
if
(
&
rConn
==
this
)
return
*
this
;
OTableConnection
::
operator
=
(
rConn
);
return
*
this
;
}
//------------------------------------------------------------------------
void
ORelationTableConnection
::
Draw
(
const
Rectangle
&
rRect
)
{
DBG_CHKTHIS
(
ORelationTableConnection
,
NULL
);
OTableConnection
::
Draw
(
rRect
);
ORelationTableConnectionData
*
pData
;
if
((
pData
=
(
ORelationTableConnectionData
*
)
GetData
())
&&
(
pData
->
GetCardinality
()
==
CARDINAL_UNDEFINED
)
)
return
;
//////////////////////////////////////////////////////////////////////
// Linien nach oberster Linie durchsuchen
Rectangle
aBoundingRect
;
long
nTop
=
GetBoundingRect
().
Bottom
();
long
nTemp
;
const
OConnectionLine
*
pTopLine
=
NULL
;
const
::
std
::
vector
<
OConnectionLine
*>*
pConnLineList
=
GetConnLineList
();
::
std
::
vector
<
OConnectionLine
*>::
const_iterator
aIter
=
pConnLineList
->
begin
();
for
(;
aIter
!=
pConnLineList
->
end
();
++
aIter
)
{
if
(
(
*
aIter
)
->
IsValid
()
)
{
aBoundingRect
=
(
*
aIter
)
->
GetBoundingRect
();
nTemp
=
aBoundingRect
.
Top
();
if
(
nTemp
<
nTop
)
{
nTop
=
nTemp
;
pTopLine
=
(
*
aIter
);
}
}
}
//////////////////////////////////////////////////////////////////////
// Kardinalitaet antragen
if
(
!
pTopLine
)
return
;
Rectangle
aSourcePos
=
pTopLine
->
GetSourceTextPos
();
Rectangle
aDestPos
=
pTopLine
->
GetDestTextPos
();
String
aSourceText
;
String
aDestText
;
switch
(
((
ORelationTableConnectionData
*
)
GetData
())
->
GetCardinality
()
)
{
case
CARDINAL_ONE_MANY
:
aSourceText
=
'1'
;
aDestText
=
'n'
;
break
;
case
CARDINAL_MANY_ONE
:
aSourceText
=
'n'
;
aDestText
=
'1'
;
break
;
case
CARDINAL_ONE_ONE
:
aSourceText
=
'1'
;
aDestText
=
'1'
;
break
;
}
if
(
IsSelected
())
GetParent
()
->
SetTextColor
(
Application
::
GetSettings
().
GetStyleSettings
().
GetHighlightColor
());
else
GetParent
()
->
SetTextColor
(
Application
::
GetSettings
().
GetStyleSettings
().
GetWindowTextColor
());
GetParent
()
->
DrawText
(
aSourcePos
,
aSourceText
,
TEXT_DRAW_CLIP
|
TEXT_DRAW_CENTER
|
TEXT_DRAW_BOTTOM
);
GetParent
()
->
DrawText
(
aDestPos
,
aDestText
,
TEXT_DRAW_CLIP
|
TEXT_DRAW_CENTER
|
TEXT_DRAW_BOTTOM
);
}
// -----------------------------------------------------------------------------
dbaccess/source/ui/relationdesign/RTableConnection.hxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: RTableConnection.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:09:00 $
*
* 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_RTABLECONNECTION_HXX
#define DBAUI_RTABLECONNECTION_HXX
#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
#endif
#ifndef DBAUI_RTABLECONNECTIONDATA_HXX
#include "RTableConnectionData.hxx"
#endif
namespace
dbaui
{
class
ORelationTableView
;
//==================================================================
class
ORelationTableConnection
:
public
OTableConnection
{
protected
:
OConnectionLine
*
CreateConnLine
(
const
OConnectionLine
&
rConnLine
);
public
:
ORelationTableConnection
(
ORelationTableView
*
pContainer
,
ORelationTableConnectionData
*
pTabConnData
);
ORelationTableConnection
(
const
ORelationTableConnection
&
rConn
);
// wichtiger Kommentar zum CopyConstructor siehe OTableConnection(const OTableConnection&)
virtual
~
ORelationTableConnection
();
ORelationTableConnection
&
operator
=
(
const
ORelationTableConnection
&
rConn
);
virtual
void
Draw
(
const
Rectangle
&
rRect
);
};
}
#endif // DBAUI_RTABLECONNECTION_HXX
dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
This diff is collapsed.
Click to expand it.
dbaccess/source/ui/relationdesign/RelationController.cxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
This diff is collapsed.
Click to expand it.
dbaccess/source/ui/relationdesign/RelationDesignView.cxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: RelationDesignView.cxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:07: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_RELATIONDESIGNVIEW_HXX
#include "RelationDesignView.hxx"
#endif
#ifndef DBAUI_RELATION_TABLEVIEW_HXX
#include "RelationTableView.hxx"
#endif
#ifndef _SV_TOOLBOX_HXX
#include <vcl/toolbox.hxx>
#endif
#ifndef DBAUI_RELATIONCONTROLLER_HXX
#include "RelationController.hxx"
#endif
#ifndef _UNDO_HXX
#include <svtools/undo.hxx>
#endif
#ifndef DBAUI_QYDLGTAB_HXX
#include "adtabdlg.hxx"
#endif
#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
#endif
#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
#endif
#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
#endif
#ifndef _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
#endif
#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
#endif
#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
#endif
#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
#endif
#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
#endif
#ifndef DBAUI_RTABLECONNECTION_HXX
#include "RTableConnection.hxx"
#endif
#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
#endif
#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
#endif
#ifndef DBAUI_RTABLECONNECTIONDATA_HXX
#include "RTableConnectionData.hxx"
#endif
#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
#endif
#ifndef _CPPUHELPER_EXTRACT_HXX_
#include <cppuhelper/extract.hxx>
#endif
#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
#endif
using
namespace
::
dbaui
;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
lang
;
using
namespace
::
com
::
sun
::
star
::
i18n
;
using
namespace
::
com
::
sun
::
star
::
sdbc
;
using
namespace
::
com
::
sun
::
star
::
beans
;
using
namespace
::
com
::
sun
::
star
::
container
;
ORelationDesignView
::
ORelationDesignView
(
Window
*
_pParent
,
ORelationController
*
_pController
,
const
Reference
<
XMultiServiceFactory
>&
_rFactory
)
:
OJoinDesignView
(
_pParent
,
_pController
,
_rFactory
)
{
}
// -----------------------------------------------------------------------------
ORelationDesignView
::~
ORelationDesignView
()
{
}
// -------------------------------------------------------------------------
void
ORelationDesignView
::
Construct
(
const
Reference
<
::
com
::
sun
::
star
::
awt
::
XControlModel
>&
xModel
)
{
m_pTableView
=
new
ORelationTableView
(
m_pScrollWindow
,
this
);
OJoinDesignView
::
Construct
(
xModel
);
// initialize m_xMe
}
// -----------------------------------------------------------------------------
void
ORelationDesignView
::
initialize
()
{
m_pTableView
->
ReSync
();
OJoinDesignView
::
initialize
();
}
// -----------------------------------------------------------------------------
dbaccess/source/ui/relationdesign/RelationTableView.cxx
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
This diff is collapsed.
Click to expand it.
dbaccess/source/ui/relationdesign/makefile.mk
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
#*************************************************************************
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.1 $
#
# last change: $Author: oj $ $Date: 2001-02-28 10:05:57 $
#
# 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): _______________________________________
#
#
#
#*************************************************************************
PRJ
=
..
$/
..
$/
..
PRJINC
=
$(PRJ)$/
source
PRJNAME
=
dbaccess
TARGET
=
relationdesign
ENABLE_EXCEPTIONS
=
TRUE
# --- Settings -----------------------------------------------------
.INCLUDE
:
settings.mk
# IMGLST_SRS=$(SRS)$/$(TARGET).srs
# --- Files --------------------------------------------------------
SLOFILES
=
\
$(SLO)$/
RTableConnection.obj
\
$(SLO)$/
RTableConnectionData.obj
\
$(SLO)$/
RelationTableView.obj
\
$(SLO)$/
RelationDesignView.obj
\
$(SLO)$/
RelationController.obj
SRCFILES
=
relation.src
# --- Targets -------------------------------------------------------
.INCLUDE
:
target.mk
$(SRS)$/$(TARGET).srs
:
$(SOLARINCDIR)$/svx$/globlmn.hrc
dbaccess/source/ui/relationdesign/relation.src
0 → 100644
Dosyayı görüntüle @
2f2ac1c5
/*************************************************************************
*
* $RCSfile: relation.src,v $
*
* $Revision: 1.1 $
*
* last change: $Author: oj $ $Date: 2001-02-28 10:06: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 _DBU_RESOURCE_HRC_
#include "dbu_resource.hrc"
#endif
#ifndef _GLOBLMN_HRC
#include <svx/globlmn.hrc>
#endif
#ifndef _CNTIDS_HRC
#include <sfx2/cntids.hrc>
#endif
#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
#endif
#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
#endif
#ifndef DBAUI_TOOLBOX_HXX
#include "toolbox.hrc"
#endif
ToolBox RID_BRW_REALTIONDESIGN_TOOLBOX
{
SVLook = TRUE ;
Pos = MAP_APPFONT ( 3 , 1 ) ;
Size = MAP_APPFONT ( 200 , 14 ) ;
OutputSize = TRUE ;
Align = BOXALIGN_TOP ;
ItemImageList = RID_DEFAULTIMAGELIST_SC ;
HideWhenDeactivate = TRUE ;
HelpId = HID_TLB_RELATIONDESIGN ;
ItemList =
{
ToolBoxItem
{
Identifier = ID_BROWSER_EDITDOC ;
HelpId = ID_BROWSER_EDITDOC ;
Text = "Bearbeiten" ;
Text [ ENGLISH ] = "Edit" ;
};
ToolBoxItem
{
Type = TOOLBOXITEM_SEPARATOR ;
};
ToolBoxItem
{
Identifier = ID_BROWSER_SAVEDOC ;
HelpId = ID_BROWSER_SAVEDOC ;
Text = "Speichern" ;
Text [ ENGLISH ] = "Save" ;
};
ToolBoxItem
{
Identifier = SID_PRINTDOCDIRECT ;
HelpId = SID_PRINTDOCDIRECT ;
Hide = TRUE;
Text = "Drucken" ;
Text [ ENGLISH ] = "Print" ;
};
ToolBoxItem
{
Type = TOOLBOXITEM_SEPARATOR ;
};
ToolBoxItem
{
Identifier = ID_BROWSER_UNDO ;
HelpId = ID_BROWSER_UNDO ;
Text = "Rckgngig" ;
Text [ ENGLISH ] = "Undo" ;
};
ToolBoxItem
{
Identifier = ID_BROWSER_REDO ;
HelpId = ID_BROWSER_REDO ;
Text = "Wiederherstellen" ;
Text [ ENGLISH ] = "Redo" ;
};
ToolBoxItem
{
Type = TOOLBOXITEM_SEPARATOR ;
};
ToolBoxItem
{
Identifier = ID_BROWSER_ADDTABLE;
HelpId = ID_BROWSER_ADDTABLE ;
Text = "Tabellen hinzufgen ..." ;
Text [ ENGLISH ] = "Add tables ..." ;
};
ToolboxItem
{
Type = TOOLBOXITEM_SEPARATOR;
};
ToolboxItem
{
Identifier = ID_REALTION_ADD_RELATION ;
HelpId = ID_REALTION_ADD_RELATION ;
Text = "neue Relation ..." ;
Text [ ENGLISH ] = "new relation ..." ;
};
/* ToolBoxItem
{
Identifier = SID_ZOOM_OUT ;
HelpId = SID_ZOOM_OUT ;
};
ToolBoxItem
{
Identifier = SID_ZOOM_IN ;
HelpId = SID_ZOOM_IN ;
};
*/
};
};
String STR_QUERY_REL_EDIT_RELATION
{
Text = "Diese Relation existiert bereits. Mchten Sie sie bearbeiten?" ;
Text [ ENGLISH ] = "This relation already exsits. Do you want to edit it?" ;
Text [ english_us ] = "This relation already exsits. Do you want to edit it?" ;
Text[ portuguese ] = "Esta relao j existe. Editar?";
Text[ russian ] = " . ?";
Text[ greek ] = " . ;";
Text[ dutch ] = "Deze relatie bestaat reeds. Wilt u deze bewerken.";
Text[ french ] = "Cette relation existe dj. Souhaitez-vous l'diter ?";
Text[ spanish ] = "Ya existe esta relacin. Desea editarla?";
Text[ italian ] = "Questa relazione esiste gi. Volete modificarla?";
Text[ danish ] = "Denne ralation eksisterer allerede. Vil du redigere den?";
Text[ swedish ] = "Den hr relationen finns redan. Vill Du bearbeta den?";
Text[ polish ] = "Relacja ju istnieje. Czy chcesz j edytowa?";
Text[ portuguese_brazilian ] = "This relation already exsits. Do you want to edit it?";
Text[ japanese ] = "ڰ݂͂łɂ܂BҏW܂?";
Text[ korean ] = " ̹ ֽϴ. ̰ Ͻðڽϱ ?";
Text[ chinese_simplified ] = "ϵѾڡ༭";
Text[ chinese_traditional ] = "oYwgsbCns襦H";
Text[ arabic ] = " . ǿ";
Text[ turkish ] = "Bu iliki mevcut durumda. Dzenlemek istiyor musunuz?";
};
String STR_RELATIONDESIGN
{
Text = "Relationenentwurf" ;
Text [ English ] = "Relation design" ;
Text [ english_us ] = "Relation design" ;
};
String STR_RELATIONDESIGN_NOT_AVAILABLE
{
Text = "Die Datenbank untersttzt keine Relationen. Der Relationenenwurf wird wieder geschlossen!" ;
Text [ English ] = "The database doesn't support any relations. The relation design will be closed!" ;
Text [ english_us ] = "The database doesn't support any relations. The relation design will be closed!" ;
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment